import { Span, AttributeValue, SpanOptions, Tracer, Context } from '@opentelemetry/api'; import { z } from 'zod'; import { S as SemConvAttributes } from './types-BvCQH8F1.js'; declare const chatMessageSchema: z.ZodObject<{ role: z.ZodOptional, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">, z.ZodLiteral<"tool">, z.ZodLiteral<"unknown">]>>; content: z.ZodNullable; text: z.ZodOptional; content: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodOptional, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool_call">; toolName: z.ZodOptional; toolCallId: z.ZodOptional; args: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool_result">; toolName: z.ZodOptional; toolCallId: z.ZodOptional; result: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"binary">; mimeType: z.ZodString; data: z.ZodOptional; url: z.ZodOptional; id: z.ZodOptional; filename: z.ZodOptional; }, z.core.$strip>]>>]>>>; parts: z.ZodOptional; text: z.ZodOptional; content: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodOptional, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool_call">; toolName: z.ZodOptional; toolCallId: z.ZodOptional; args: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool_result">; toolName: z.ZodOptional; toolCallId: z.ZodOptional; result: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"binary">; mimeType: z.ZodString; data: z.ZodOptional; url: z.ZodOptional; id: z.ZodOptional; filename: z.ZodOptional; }, z.core.$strip>]>>>; function_call: z.ZodNullable; arguments: z.ZodOptional; }, z.core.$strip>>>; tool_calls: z.ZodNullable; arguments: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>>>>; tool_call_id: z.ZodNullable>; name: z.ZodNullable>; reasoning_content: z.ZodNullable>; }, z.core.$strip>; type ChatMessage = z.infer; declare const typedValueTextSchema: z.ZodObject<{ type: z.ZodLiteral<"text">; value: z.ZodString; }, z.core.$strip>; type TypedValueText = z.infer; declare const typedValueRawSchema: z.ZodObject<{ type: z.ZodLiteral<"raw">; value: z.ZodString; }, z.core.$strip>; type TypedValueRaw = z.infer; declare const typedValueJsonSchema: z.ZodObject<{ type: z.ZodLiteral<"json">; value: z.ZodNullable, z.ZodArray]>>; }, z.core.$strip>; type TypedValueJson = z.infer; declare const typedValueGuardrailResultSchema: z.ZodObject<{ type: z.ZodLiteral<"guardrail_result">; value: z.ZodObject<{ status: z.ZodUnion, z.ZodLiteral<"skipped">, z.ZodLiteral<"error">]>; passed: z.ZodNullable>; score: z.ZodNullable>; label: z.ZodNullable>; details: z.ZodNullable>; cost: z.ZodNullable>>; }, z.core.$strip>; }, z.core.$strip>; type TypedValueGuardrailResult = z.infer; declare const typedValueEvaluationResultSchema: z.ZodObject<{ type: z.ZodLiteral<"evaluation_result">; value: z.ZodObject<{ status: z.ZodUnion, z.ZodLiteral<"skipped">, z.ZodLiteral<"error">]>; passed: z.ZodNullable>; score: z.ZodNullable>; label: z.ZodNullable>; details: z.ZodNullable>; cost: z.ZodNullable>>; }, z.core.$strip>; }, z.core.$strip>; type TypedValueEvaluationResult = z.infer; declare const typedValueChatMessagesSchema: z.ZodObject<{ type: z.ZodLiteral<"chat_messages">; value: z.ZodArray, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">, z.ZodLiteral<"tool">, z.ZodLiteral<"unknown">]>>; content: z.ZodNullable; text: z.ZodOptional; content: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodOptional, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool_call">; toolName: z.ZodOptional; toolCallId: z.ZodOptional; args: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool_result">; toolName: z.ZodOptional; toolCallId: z.ZodOptional; result: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"binary">; mimeType: z.ZodString; data: z.ZodOptional; url: z.ZodOptional; id: z.ZodOptional; filename: z.ZodOptional; }, z.core.$strip>]>>]>>>; parts: z.ZodOptional; text: z.ZodOptional; content: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodOptional, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool_call">; toolName: z.ZodOptional; toolCallId: z.ZodOptional; args: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool_result">; toolName: z.ZodOptional; toolCallId: z.ZodOptional; result: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"binary">; mimeType: z.ZodString; data: z.ZodOptional; url: z.ZodOptional; id: z.ZodOptional; filename: z.ZodOptional; }, z.core.$strip>]>>>; function_call: z.ZodNullable; arguments: z.ZodOptional; }, z.core.$strip>>>; tool_calls: z.ZodNullable; arguments: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>>>>; tool_call_id: z.ZodNullable>; name: z.ZodNullable>; reasoning_content: z.ZodNullable>; }, z.core.$strip>>; }, z.core.$strip>; type TypedValueChatMessages = z.infer; type SpanInputOutput = TypedValueText | TypedValueChatMessages | TypedValueGuardrailResult | TypedValueEvaluationResult | TypedValueJson | TypedValueRaw | { type: "list"; value: SpanInputOutput[]; }; /** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ interface paths { "/": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get all prompts for a project */ get: operations["getIndex"]; put?: never; /** @description Create a new prompt with default initial version */ post: operations["postIndex"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/agents": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List all non-archived agents for the project (paginated) */ get: operations["getApiAgents"]; put?: never; /** @description Create a new agent */ post: operations["postApiAgents"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/agents/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get an agent by its id */ get: operations["getApiAgentsById"]; put?: never; post?: never; /** @description Archive an agent (soft-delete) */ delete: operations["deleteApiAgentsById"]; options?: never; head?: never; /** @description Update an agent by its id */ patch: operations["patchApiAgentsById"]; trace?: never; }; "/api/analytics/timeseries": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Query analytics timeseries data with metrics, aggregations, and filters */ post: operations["postApiAnalyticsTimeseries"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/annotations": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Returns all annotations for project */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Annotation response */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Annotation"][]; }; }; /** @description Unexpected error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Error"]; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/annotations/trace/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Returns all annotations for single trace */ get: { parameters: { query?: never; header?: never; path: { /** @description ID of trace to fetch */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Annotation response */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Annotation"][]; }; }; /** @description Unexpected error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Error"]; }; }; }; }; put?: never; /** @description Create an annotation for a single trace */ post: { parameters: { query?: never; header?: never; path: { /** @description ID of the trace to annotate */ id: string; }; cookie?: never; }; /** @description Annotation data */ requestBody: { content: { "application/json": { comment?: string; isThumbsUp?: boolean; email?: string; }; }; }; responses: { /** @description Annotation created */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Annotation"]; }; }; /** @description Invalid input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Error"]; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/annotations/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Returns a single annotation based on the ID supplied */ get: { parameters: { query?: never; header?: never; path: { /** @description ID of annotation to fetch */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Annotation response */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Annotation"]; }; }; /** @description Unexpected error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Error"]; }; }; }; }; put?: never; post?: never; /** @description Deletes a single annotation based on the ID supplied */ delete: { parameters: { query?: never; header?: never; path: { /** @description ID of annotation to delete */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Annotation response */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { status?: string; message?: string; }; }; }; /** @description Unexpected error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Error"]; }; }; }; }; options?: never; head?: never; /** @description Updates a single annotation based on the ID supplied */ patch: { parameters: { query?: never; header?: never; path: { /** @description ID of annotation to delete */ id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { comment?: string; isThumbsUp?: boolean; email?: string; }; }; }; responses: { /** @description Annotation response */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { status?: string; message?: string; }; }; }; /** @description Unexpected error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Error"]; }; }; }; }; trace?: never; }; "/api/api-keys": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List API keys * @description List all API keys owned by the authenticated user in this organization. Requires organization:view permission. */ get: operations["listApiKeys"]; put?: never; /** * Create an API key * @description Create a new API key. For service keys, pass keyType:"service". Optionally scope to specific projects via projectIds (ADMIN on each). Omit projectIds for full org access. The plaintext token is returned once — store it securely. */ post: operations["createApiKey"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/api-keys/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Revoke an API key * @description Revoke (soft-delete) an API key. Revoked keys can no longer authenticate. Requires organization:manage permission. */ delete: operations["revokeApiKey"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/dashboards": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List all dashboards for the project with graph counts */ get: operations["getApiDashboards"]; put?: never; /** @description Create a new dashboard */ post: operations["postApiDashboards"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/dashboards/reorder": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; /** @description Reorder dashboards by providing an ordered list of IDs */ put: operations["putApiDashboardsReorder"]; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/dashboards/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a dashboard by its id, including its graphs */ get: operations["getApiDashboardsById"]; put?: never; post?: never; /** @description Delete a dashboard and its graphs (hard delete, cascade) */ delete: operations["deleteApiDashboardsById"]; options?: never; head?: never; /** @description Rename a dashboard */ patch: operations["patchApiDashboardsById"]; trace?: never; }; "/api/dataset": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List all non-archived datasets for the project (paginated) */ get: operations["getApiDataset"]; put?: never; /** @description Create a new dataset */ post: operations["postApiDataset"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/dataset/upload": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Create a new dataset from an uploaded file (CSV, JSON, JSONL) */ post: operations["postApiDatasetUpload"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/dataset/{slugOrId}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a dataset by its slug or id. */ get: operations["getApiDatasetBySlugOrId"]; put?: never; post?: never; /** @description Archive a dataset (soft-delete) */ delete: operations["deleteApiDatasetBySlugOrId"]; options?: never; head?: never; /** @description Update a dataset by its slug or id */ patch: operations["patchApiDatasetBySlugOrId"]; trace?: never; }; "/api/dataset/{slugOrId}/records": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List records for a dataset (paginated) */ get: operations["getApiDatasetBySlugOrIdRecords"]; put?: never; /** @description Create records in a dataset in batch */ post: operations["postApiDatasetBySlugOrIdRecords"]; /** @description Delete records from a dataset by IDs */ delete: operations["deleteApiDatasetBySlugOrIdRecords"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/dataset/{slugOrId}/records/{recordId}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; delete?: never; options?: never; head?: never; /** @description Update or create a record in a dataset */ patch: operations["patchApiDatasetBySlugOrIdRecordsByRecordId"]; trace?: never; }; "/api/dataset/{slugOrId}/upload": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Upload a file (CSV, JSON, JSONL) to an existing dataset */ post: operations["postApiDatasetBySlugOrIdUpload"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/dataset/{slug}/entries": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Add entries to a dataset */ post: operations["postApiDatasetBySlugEntries"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/experiments/runs/{runId}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get the current status of an evaluation run for polling. Returns progress while running, and summary when completed. */ get: operations["getEvaluationsV3RunStatus"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/experiments/{slug}/run": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Start execution of a saved Evaluations V3 experiment by slug. Returns immediately with a runId for polling, or streams SSE events if Accept: text/event-stream header is provided. */ post: operations["postEvaluationsV3Run"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/evaluators": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get all evaluators for a project */ get: operations["getApiEvaluators"]; put?: never; /** @description Create a new evaluator */ post: operations["postApiEvaluators"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/evaluators/{idOrSlug}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a specific evaluator by ID or slug */ get: operations["getApiEvaluatorsByIdOrSlug"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/evaluators/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; /** @description Update an existing evaluator */ put: operations["putApiEvaluatorsById"]; post?: never; /** @description Archive (soft-delete) an evaluator */ delete: operations["deleteApiEvaluatorsById"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/gateway/v1/budgets": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List budgets applicable to the project * @description Returns every budget that could apply to requests routed through this project — org, team, and project scope. VK and principal-scoped budgets are returned via their detail pages. */ get: operations["getApiGatewayV1Budgets"]; put?: never; /** * Create budget * @description Creates an organization-owned budget. The scope discriminates which resource the budget covers (organization / team / project / virtual_key / principal). */ post: operations["postApiGatewayV1Budgets"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/gateway/v1/budgets/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Archive budget * @description Soft-delete — the row is marked archived and no longer counted by the budget engine. Historical ledger entries are retained. */ delete: operations["deleteApiGatewayV1BudgetsById"]; options?: never; head?: never; /** * Update budget * @description Partial update — scope and window are immutable after create. Use explicit null to clear timezone / description. */ patch: operations["patchApiGatewayV1BudgetsById"]; trace?: never; }; "/api/gateway/v1/cache-rules": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List cache-control rules * @description Organization-scoped operator-authored rules. Returned sorted priority DESC; archived rules excluded. Matchers and action are returned verbatim as JSON. */ get: operations["getApiGatewayV1Cache-rules"]; put?: never; /** * Create a cache rule * @description Matchers are ANDed across non-null fields; at least one matcher is required. Mode is one of respect/force/disable. TTL is clamped to [0, 86400]. Salt is an optional cache-bust tag (max 64 chars). All writes emit a ChangeEvent so the gateway picks up the new rule within 30 s via its /changes long-poll. */ post: operations["postApiGatewayV1Cache-rules"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/gateway/v1/cache-rules/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get a cache rule * @description Returns the rule if it belongs to the caller's organisation; 404 otherwise. Archived rules are NOT returned (use the audit log to inspect removed rules). */ get: operations["getApiGatewayV1Cache-rulesById"]; put?: never; post?: never; /** * Archive a cache rule * @description Soft-delete — sets archivedAt. The rule stops matching new requests. Audit log retains before/after snapshots. Returns the archived row. */ delete: operations["deleteApiGatewayV1Cache-rulesById"]; options?: never; head?: never; /** * Update a cache rule * @description Partial update. `matchers` and `action` REPLACE the stored value when provided (not merged field-by-field). Omitting them leaves the stored value untouched. The rule id + organisation are immutable. */ patch: operations["patchApiGatewayV1Cache-rulesById"]; trace?: never; }; "/api/gateway/v1/providers": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List provider bindings * @description Lists every gateway-bound model-provider credential for the caller's project, including health and rate-limit settings. */ get: operations["getApiGatewayV1Providers"]; put?: never; /** * Bind a model provider to the gateway * @description Creates a GatewayProviderCredential binding. Reuses the ModelProvider API key already configured in project settings; this only adds gateway-specific settings (rate limits, rotation, fallback priority). */ post: operations["postApiGatewayV1Providers"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/gateway/v1/providers/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Disable provider binding * @description Marks the binding disabled. Requests routing to this slot are skipped (fallback chain continues). Historical ledger rows are retained. */ delete: operations["deleteApiGatewayV1ProvidersById"]; options?: never; head?: never; /** * Update provider binding * @description Partial update of gateway-specific settings (rate limits, rotation, slot, extra headers). The underlying ModelProvider credentials are managed in project settings, not here. */ patch: operations["patchApiGatewayV1ProvidersById"]; trace?: never; }; "/api/gateway/v1/virtual-keys": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List virtual keys * @description Returns every non-archived virtual key in the caller's project, ordered by creation time. */ get: operations["getApiGatewayV1Virtual-keys"]; put?: never; /** * Create virtual key * @description Mints a new virtual key and returns the secret exactly once. The caller MUST persist the `secret` value — LangWatch stores only a hash. */ post: operations["postApiGatewayV1Virtual-keys"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/gateway/v1/virtual-keys/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Get virtual key */ get: operations["getApiGatewayV1Virtual-keysById"]; put?: never; post?: never; delete?: never; options?: never; head?: never; /** * Update virtual key * @description Partial update — send only the fields you want to change. `provider_credential_ids` replaces the entire fallback chain. `config` is deep-merged. */ patch: operations["patchApiGatewayV1Virtual-keysById"]; trace?: never; }; "/api/gateway/v1/virtual-keys/{id}/revoke": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Revoke virtual key * @description Marks the virtual key as revoked. Clients using it start receiving 401 within ~60s (the gateway's change-event long-poll period). */ post: operations["postApiGatewayV1Virtual-keysByIdRevoke"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/gateway/v1/virtual-keys/{id}/rotate": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Rotate virtual key secret * @description Mints a fresh secret for an existing VK. The old secret remains valid for 24h (grace window) so in-flight clients can roll over. */ post: operations["postApiGatewayV1Virtual-keysByIdRotate"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/graphs": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List all custom graphs, optionally filtered by dashboard */ get: operations["getApiGraphs"]; put?: never; /** @description Create a custom graph on a dashboard */ post: operations["postApiGraphs"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/graphs/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a custom graph by its ID */ get: operations["getApiGraphsById"]; put?: never; post?: never; /** @description Delete a custom graph */ delete: operations["deleteApiGraphsById"]; options?: never; head?: never; /** @description Update a custom graph's name, definition, or filters */ patch: operations["patchApiGraphsById"]; trace?: never; }; "/api/model-providers": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List all model providers for a project with masked API keys */ get: operations["getApiModel-providers"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/model-providers/{provider}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; /** @description Create or update a model provider */ put: operations["putApiModel-providersByProvider"]; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/monitors": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List all online evaluation monitors for the project */ get: operations["getApiMonitors"]; put?: never; /** @description Create a new online evaluation monitor */ post: operations["postApiMonitors"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/monitors/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a monitor by its ID */ get: operations["getApiMonitorsById"]; put?: never; post?: never; /** @description Delete a monitor */ delete: operations["deleteApiMonitorsById"]; options?: never; head?: never; /** @description Update a monitor (name, enabled state, settings, etc.) */ patch: operations["patchApiMonitorsById"]; trace?: never; }; "/api/monitors/{id}/toggle": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Enable or disable a monitor */ post: operations["postApiMonitorsByIdToggle"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/projects": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List projects * @description List all non-archived projects for the organization (paginated). Requires an admin API key with project:view permission. */ get: operations["listProjects"]; put?: never; /** * Create a project * @description Create a new project in the organization. Returns the project with its API key (sk-lw-...) for sending traces. Provide either teamId (existing team) or newTeamName (creates a new team). Requires project:create permission. */ post: operations["createProject"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/projects/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get a project * @description Get a project by ID, including its API key. Requires project:view permission. */ get: operations["getProject"]; put?: never; post?: never; /** * Archive a project * @description Soft-delete (archive) a project. Archived projects are excluded from list responses. Requires project:delete permission. */ delete: operations["archiveProject"]; options?: never; head?: never; /** * Update a project * @description Update project fields. Only provided fields are changed. Requires project:update permission. */ patch: operations["updateProject"]; trace?: never; }; "/api/prompts": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get all prompts for a project */ get: operations["getApiPrompts"]; put?: never; /** @description Create a new prompt with default initial version */ post: operations["postApiPrompts"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/prompts/tags": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List all prompt tag definitions for the organization */ get: operations["getApiPromptsTags"]; put?: never; /** @description Create a custom prompt tag definition for the organization */ post: operations["postApiPromptsTags"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/prompts/tags/{tag}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; /** @description Rename a prompt tag definition */ put: operations["putApiPromptsTagsByTag"]; post?: never; /** @description Delete a prompt tag definition and cascade to assignments */ delete: operations["deleteApiPromptsTagsByTag"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/prompts/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a specific prompt by slug, with optional shorthand syntax for tags and versions. Pass a bare slug like "pizza-prompt" to get the latest version, "pizza-prompt:production" to resolve a tagged version, or "pizza-prompt:2" to fetch version 2. Alternatively, use the tag or version query parameters with a bare slug. */ get: operations["getApiPromptsById"]; /** @description Update a prompt */ put: operations["putApiPromptsById"]; post?: never; /** @description Delete a prompt */ delete: operations["deleteApiPromptsById"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/prompts/{id}/sync": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Sync/upsert a prompt with local content */ post: operations["postApiPromptsByIdSync"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/prompts/{id}/tags/{tag}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; /** @description Assign a tag (e.g. "production", "staging") to a specific prompt version */ put: operations["putApiPromptsByIdTagsByTag"]; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/prompts/{id}/versions": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get all versions for a prompt. Does not include base prompt data, only versioned data. */ get: operations["getApiPromptsByIdVersions"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/prompts/{id}/versions/{versionId}/restore": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Restore a prompt to a previous version. Creates a new version with the same config data as the specified version. */ post: operations["postApiPromptsByIdVersionsByVersionIdRestore"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/scenario-events": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Create a new scenario event */ post: operations["postApiScenario-events"]; /** @description Archive the simulation runs for a batch run and/or scenario set. Requires at least one of batchRunId or scenarioSetId — archiving every run in the project in one call is not supported. */ delete: operations["deleteApiScenario-events"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/scenarios": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get all scenarios for a project */ get: operations["getApiScenarios"]; put?: never; /** @description Create a new scenario */ post: operations["postApiScenarios"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/scenarios/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a specific scenario by ID */ get: operations["getApiScenariosById"]; /** @description Update an existing scenario */ put: operations["putApiScenariosById"]; post?: never; /** @description Archive (soft-delete) a scenario */ delete: operations["deleteApiScenariosById"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/secrets": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List all secrets for the project (values are never returned) */ get: operations["getApiSecrets"]; put?: never; /** @description Create a new project secret. The value is encrypted at rest and never returned. */ post: operations["postApiSecrets"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/secrets/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a secret by its ID (value is never returned) */ get: operations["getApiSecretsById"]; /** @description Update a secret's value */ put: operations["putApiSecretsById"]; post?: never; /** @description Delete a secret */ delete: operations["deleteApiSecretsById"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/simulation-runs": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List simulation runs, optionally filtered by scenarioSetId or batchRunId */ get: operations["getApiSimulation-runs"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/simulation-runs/batches/list": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List batch summaries for a scenario set (pass/fail counts per batch) */ get: operations["getApiSimulation-runsBatchesList"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/simulation-runs/{scenarioRunId}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a single simulation run by its ID */ get: operations["getApiSimulation-runsByScenarioRunId"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/suites": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List all non-archived suites (run plans) for the project */ get: operations["getApiSuites"]; put?: never; /** @description Create a new suite (run plan) */ post: operations["postApiSuites"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/suites/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a suite (run plan) by its ID */ get: operations["getApiSuitesById"]; put?: never; post?: never; /** @description Archive (soft-delete) a suite (run plan) */ delete: operations["deleteApiSuitesById"]; options?: never; head?: never; /** @description Update a suite (run plan) */ patch: operations["patchApiSuitesById"]; trace?: never; }; "/api/suites/{id}/duplicate": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Duplicate a suite (run plan) */ post: operations["postApiSuitesByIdDuplicate"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/suites/{id}/run": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Trigger a suite run. Schedules scenario executions for all active scenarios × targets × repeatCount. */ post: operations["postApiSuitesByIdRun"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/trace/search": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Search traces * @description Search for traces based on given criteria */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["SearchRequest"]; }; }; responses: { /** @description Successful response */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["SearchResponse"]; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/trace/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Returns single trace details based on the ID supplied */ get: { parameters: { query?: never; header?: never; path: { /** @description ID of trace to share */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Trace details with spans and evaluations */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @example trace_BKZL_X0TKSD4oa1aBJTc_ */ trace_id?: string; /** @example KAXYxPR8MUgTcP8CF193y */ project_id?: string; metadata?: { /** @example 0.1.11 */ sdk_version?: string; /** @example python */ sdk_language?: string; }; timestamps?: { /** @example 1721382486868 */ started_at?: number; /** @example 1721382492894 */ inserted_at?: number; /** @example 1721382492894 */ updated_at?: number; }; input?: { /** @example hi */ value?: string; }; output?: { /** @example Hey there! 👋😊 */ value?: string; }; metrics?: { /** @example 1449 */ first_token_ms?: number; /** @example 1543 */ total_time_ms?: number; /** @example 20 */ prompt_tokens?: number; /** @example 7 */ completion_tokens?: number; /** @example true */ tokens_estimated?: boolean; }; /** @example null */ error?: { stacktrace?: string[]; message?: string; has_error?: boolean; } | null; /** * @example [ * "cccd21e0b70c706034dfd9f7772816a3" * ] */ indexing_md5s?: string[]; spans?: { /** @example trace_BKZL_X0TKSD4oa1aBJTc_ */ trace_id?: string; /** @example span_h1xUkcUJilhudDrLeQbR_ */ span_id?: string; timestamps?: { /** @example 1721382488392 */ finished_at?: number; /** @example 1721382492027 */ updated_at?: number; /** @example 1721382486895 */ started_at?: number; /** @example 1721382488317 */ first_token_at?: number; /** @example 1721382492027 */ inserted_at?: number; }; /** @example llm */ type?: string; /** @example null */ error?: { stacktrace?: string[]; message?: string; has_error?: boolean; } | null; params?: { /** @example true */ stream?: boolean; /** @example 1 */ temperature?: number; }; /** @example KAXYxPR8MUgTcP8CF193y */ project_id?: string; /** @example span_ijZNjUMTz3ys0Z0YKwF_T */ parent_id?: string | null; /** @example null */ name?: string | null; /** @example openai/gpt-4o */ model?: string; metrics?: { /** @example true */ tokens_estimated?: boolean; /** @example 7 */ completion_tokens?: number; /** @example 20 */ prompt_tokens?: number; }; input?: { /** @example chat_messages */ type?: string; /** * @example [ * { * "role": "system", * "content": "You are a helpful assistant that only reply in short tweet-like responses, using lots of emojis." * }, * { * "role": "user", * "content": "hi" * } * ] */ value?: { /** @example system */ role?: string; /** @example You are a helpful assistant that only reply in short tweet-like responses, using lots of emojis. */ content?: string; }[]; }; output?: { /** @example chat_messages */ type?: string; /** * @example [ * { * "role": "assistant", * "content": "Hey there! 👋😊" * } * ] */ value?: { /** @example assistant */ role?: string; /** @example Hey there! 👋😊 */ content?: string; }[]; }; }[]; evaluations?: { /** @example check_VCagriZHNWICSOM09dXjM */ evaluation_id?: string; /** @example Ragas Answer Relevancy */ name?: string; /** @example ragas/answer_relevancy */ type?: string; /** @example trace_BKZL_X0TKSD4oa1aBJTc_ */ trace_id?: string; /** @example KAXYxPR8MUgTcP8CF193y */ project_id?: string; /** @example error */ status?: string; timestamps?: { /** @example 1721383657788 */ updated_at?: number; /** @example 1721382493358 */ inserted_at?: number; }; error?: { /** * @example [ * "TypeError: fetch failed" * ] */ stacktrace?: string[]; /** @example fetch failed */ message?: string; /** @example true */ has_error?: boolean; }; }[]; }; }; }; /** @description Unexpected error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Error"]; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/trace/{id}/share": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Returns a public path for a trace */ post: { parameters: { query?: never; header?: never; path: { /** @description ID of trace to share */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Public path created */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { path?: string; }; }; }; /** @description Unexpected error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Error"]; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/trace/{id}/unshare": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Deletes a public path for a trace */ post: { parameters: { query?: never; header?: never; path: { /** @description ID of trace to unshare */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Public path deleted */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { message?: string; }; }; }; /** @description Unexpected error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Error"]; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/traces/search": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Search traces for a project */ post: operations["postApiTracesSearch"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/traces/{traceId}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a single trace by ID. */ get: operations["getApiTracesByTraceId"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/triggers": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List all active triggers (automations) for the project */ get: operations["getApiTriggers"]; put?: never; /** @description Create a new trigger (automation) */ post: operations["postApiTriggers"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/triggers/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a trigger by its ID */ get: operations["getApiTriggersById"]; put?: never; post?: never; /** @description Delete (soft-delete) a trigger */ delete: operations["deleteApiTriggersById"]; options?: never; head?: never; /** @description Update a trigger (name, active state, message, filters) */ patch: operations["patchApiTriggersById"]; trace?: never; }; "/api/workflows": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description List all non-archived workflows for the project */ get: operations["getApiWorkflows"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/workflows/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Get a workflow by its ID */ get: operations["getApiWorkflowsById"]; put?: never; post?: never; /** @description Archive (soft-delete) a workflow */ delete: operations["deleteApiWorkflowsById"]; options?: never; head?: never; /** @description Update a workflow's metadata (name, icon, description) */ patch: operations["patchApiWorkflowsById"]; trace?: never; }; "/api/model-defaults": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** @description Snapshot of the default-model cascade for this project: effective resolution per role, plus the configs the caller can read. */ get: operations["getApiModel-defaults"]; put?: never; /** @description Create a default-model config attached to one or more scopes. JSON keys may be roles (DEFAULT, FAST, EMBEDDINGS) or registered feature keys; missing keys inherit from a higher scope. */ post: operations["postApiModel-defaults"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/model-defaults/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; /** @description Update a config's JSON payload and/or its scope attachments. Sending `scopes: []` deletes the config. */ put: operations["putApiModel-defaultsById"]; post?: never; /** @description Delete a default-model config. Scope attachments cascade. */ delete: operations["deleteApiModel-defaultsById"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/governance/ingestion-templates": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List ingestion templates * @description Returns the union of platform-published default templates and any org-authored templates visible to the caller's organization. Disabled / archived rows are filtered out. `ottl_rules` is empty in this end-user shape; admins use GET /ingestion-templates/admin to read the canonical OTTL. */ get: operations["getApiGovernanceIngestion-templates"]; put?: never; /** * Create org-authored ingestion template * @description Creates a brand-new template scoped to the caller's organization. Slug is auto-generated. Platform rows (organizationId IS NULL) are NEVER created via this endpoint — admins customize platform defaults via POST /ingestion-templates/clone instead. */ post: operations["postApiGovernanceIngestion-templates"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/governance/ingestion-templates/admin": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List ingestion templates (admin shape, includes OTTL) * @description Same union as the user list but includes the canonical `ottl_rules` source for every row. Used by admin tooling to render the transparency block / authoring drawer. */ get: operations["getApiGovernanceIngestion-templatesAdmin"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/governance/ingestion-templates/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get ingestion template * @description Single-template lookup by id, scoped to the caller's organization. Cross-org probes collapse to 404 (no enumeration vector). */ get: operations["getApiGovernanceIngestion-templatesById"]; put?: never; post?: never; /** * Soft-archive an org-authored template * @description Marks the row archived; existing ingestion keys continue to land traces but the row disappears from list views. Platform-published rows reject with 403. */ delete: operations["deleteApiGovernanceIngestion-templatesById"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api/governance/ingestion-templates/{id}/ottl-rules": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; delete?: never; options?: never; head?: never; /** * Replace ottl_rules on an org-authored template * @description Audit-logged with line counts pre/post. Platform-published rows reject with 403. Admins must clone a platform row before editing it. */ patch: operations["patchApiGovernanceIngestion-templatesByIdOttl-rules"]; trace?: never; }; "/api/governance/ingestion-templates/clone": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Clone a platform-published template into the caller's org * @description Forks the source row's source_type / display_name / OTTL into a fresh org-authored row that the admin can then edit via PATCH /ingestion-templates/:id/ottl-rules. */ post: operations["postApiGovernanceIngestion-templatesClone"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/events/track": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Record a user event (e.g. thumbs up/down, selected text) attached to a trace. Predefined event types validate against their schemas; custom event types pass through `trackEventRESTParamsValidatorSchema`. */ post: operations["postApiEventsTrack"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api/traces/{traceId}/metadata": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; delete?: never; options?: never; head?: never; /** * Update trace metadata * @description Update metadata on a trace after creation. Inserts a synthetic span carrying the new attributes through the standard ingestion pipeline. New keys are added, existing keys are updated, missing keys are preserved. Labels replace entirely. */ patch: operations["patchApiTracesByTraceIdMetadata"]; trace?: never; }; } interface components { schemas: { Annotation: { /** @description The ID of the annotation */ id?: string; /** @description The ID of the project */ projectId?: string; /** @description The ID of the trace */ traceId?: string; /** @description The comment of the annotation */ comment?: string; /** @description The thumbs up status of the annotation */ isThumbsUp?: boolean; /** @description The ID of the user */ userId?: string; /** @description The created at of the annotation */ createdAt?: string; /** @description The updated at of the annotation */ updatedAt?: string; /** @description The email of the user */ email?: string; }; Error: { /** Format: int32 */ error: number; message: string; }; SearchRequest: { query?: string; /** Format: date-time */ startDate?: string; /** Format: date-time */ endDate?: string; /** @example 1000 */ pageSize?: number; /** @example 123 */ scrollId?: string; filters?: { [key: string]: string[]; }; }; SearchResponse: { traces?: components["schemas"]["Trace"][]; pagination?: components["schemas"]["Pagination"]; }; Trace: { trace_id?: string; project_id?: string; timestamps?: components["schemas"]["Timestamps"]; input?: components["schemas"]["Input"]; output?: components["schemas"]["Output"]; metadata?: components["schemas"]["Metadata"]; metrics?: components["schemas"]["Metrics"]; indexing_md5s?: string[]; error?: string | null; evaluations?: components["schemas"]["Evaluation"][]; contexts?: unknown[]; }; Timestamps: { inserted_at?: number; started_at?: number; updated_at?: number; }; Input: { value?: string; }; Output: { value?: string; }; Metadata: { sdk_language?: string; sdk_version?: string; }; Metrics: { tokens_estimated?: boolean; completion_tokens?: number; prompt_tokens?: number; total_cost?: number; total_time_ms?: number; first_token_ms?: number | null; }; Evaluation: { evaluation_id?: string; score?: number; timestamps?: components["schemas"]["EvaluationTimestamps"]; evaluator_id?: string; name?: string; details?: string; passed?: boolean; label?: string | null; type?: string; status?: string; }; EvaluationTimestamps: { finished_at?: number; updated_at?: number; }; Pagination: { page?: number; limit?: number; total?: number; }; DatasetPostEntries: { /** * @example [ * { * "input": "hi", * "output": "Hello, how can I help you today?" * } * ] */ entries: { [key: string]: unknown; }[]; }; Project: { /** @description Project ID (project_...) */ id?: string; name?: string; slug?: string; language?: string; framework?: string; teamId?: string; /** @enum {string} */ piiRedactionLevel?: "STRICT" | "ESSENTIAL" | "DISABLED"; /** Format: date-time */ createdAt?: string; /** Format: date-time */ updatedAt?: string; }; ApiKeyInfo: { id?: string; name?: string; description?: string | null; /** Format: date-time */ createdAt?: string; /** Format: date-time */ expiresAt?: string | null; /** Format: date-time */ lastUsedAt?: string | null; /** Format: date-time */ revokedAt?: string | null; roleBindings?: { id?: string; /** @enum {string} */ role?: "ADMIN" | "MEMBER" | "VIEWER"; /** @enum {string} */ scopeType?: "ORGANIZATION" | "TEAM" | "PROJECT"; scopeId?: string; }[]; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } interface operations { getIndex: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; handle: string | null; /** @enum {string} */ scope: "ORGANIZATION" | "PROJECT"; name: string; updatedAt: string; projectId: string; organizationId: string; version: number; versionId: string; versionCreatedAt: string; model: string; prompt: string; messages: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; response_format: { /** @enum {string} */ type: "json_schema"; json_schema: { name: string; schema: Record; }; } | null; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; postIndex: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { handle: string; /** * @default PROJECT * @enum {string} */ scope?: "ORGANIZATION" | "PROJECT"; authorId?: string; prompt?: string; messages?: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; inputs?: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict"; }[]; outputs?: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; }; }; }; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; handle: string | null; /** @enum {string} */ scope: "ORGANIZATION" | "PROJECT"; name: string; updatedAt: string; projectId: string; organizationId: string; version: number; versionId: string; versionCreatedAt: string; model: string; prompt: string; messages: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; response_format: { /** @enum {string} */ type: "json_schema"; json_schema: { name: string; schema: Record; }; } | null; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; getApiAgents: { parameters: { query?: { page?: number; limit?: number; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: never; }; postApiAgents: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; /** @enum {string} */ type: "signature" | "code" | "workflow" | "http"; config: { [key: string]: unknown; }; workflowId?: string; }; }; }; responses: never; }; getApiAgentsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: never; }; deleteApiAgentsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: never; }; patchApiAgentsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { name?: string; /** @enum {string} */ type?: "signature" | "code" | "workflow" | "http"; config?: { [key: string]: unknown; }; workflowId?: string | null; }; }; }; responses: never; }; postApiAnalyticsTimeseries: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { startDate: number | string; endDate: number | string; query?: string; /** @default {} */ filters?: { "topics.topics"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "topics.subtopics"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.user_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.thread_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.customer_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.labels"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.key"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.value"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.prompt_ids"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "traces.origin"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "traces.error"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "traces.name"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "spans.type"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "spans.model"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.guardrails_only"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.has_passed"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.has_score"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.has_label"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.passed"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.score"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.state"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.label"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.event_type"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.metrics.key"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.metrics.value"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.event_details.key"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "annotations.hasAnnotation"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; }; traceIds?: string[]; negateFilters?: boolean; series: { /** @enum {string} */ metric: "metadata.trace_id" | "metadata.user_id" | "metadata.thread_id" | "metadata.span_type" | "sentiment.thumbs_up_down" | "performance.completion_time" | "performance.first_token" | "performance.total_cost" | "performance.cost_billed" | "performance.cost_non_billed" | "performance.prompt_tokens" | "performance.completion_tokens" | "performance.total_tokens" | "performance.tokens_per_second" | "events.event_type" | "events.event_score" | "events.event_details" | "evaluations.evaluation_score" | "evaluations.evaluation_pass_rate" | "evaluations.evaluation_runs" | "threads.average_duration_per_thread"; key?: string; subkey?: string; /** @enum {string} */ aggregation: "terms" | "cardinality" | "avg" | "sum" | "min" | "max" | "median" | "p99" | "p95" | "p90"; pipeline?: { /** @enum {string} */ field: "trace_id" | "user_id" | "thread_id" | "customer_id"; /** @enum {string} */ aggregation: "sum" | "avg" | "min" | "max"; }; filters?: { "topics.topics"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "topics.subtopics"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.user_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.thread_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.customer_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.labels"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.key"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.value"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.prompt_ids"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "traces.origin"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "traces.error"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "traces.name"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "spans.type"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "spans.model"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.guardrails_only"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.has_passed"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.has_score"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.has_label"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.passed"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.score"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.state"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.label"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.event_type"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.metrics.key"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.metrics.value"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.event_details.key"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "annotations.hasAnnotation"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; }; asPercent?: boolean; }[]; /** @enum {string} */ groupBy?: "topics.topics" | "traces.trace_name" | "metadata.user_id" | "metadata.thread_id" | "metadata.customer_id" | "metadata.labels" | "metadata.model" | "metadata.span_type" | "sentiment.thumbs_up_down" | "events.event_type" | "evaluations.evaluation_passed" | "evaluations.evaluation_label" | "evaluations.evaluation_processing_state" | "error.has_error"; groupByKey?: string; timeScale?: "full" | number; timeZone: string; }; }; }; responses: { /** @description Timeseries analytics data with current and previous periods */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { currentPeriod: { [key: string]: unknown; }[]; previousPeriod: { [key: string]: unknown; }[]; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; listApiKeys: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description List of API keys */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { data?: components["schemas"]["ApiKeyInfo"][]; }; }; }; /** @description Invalid or missing API key token */ 401: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Insufficient permissions (requires organization:view) */ 403: { headers: { [name: string]: unknown; }; content?: never; }; }; }; createApiKey: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { /** @description Human-readable name for this token */ name: string; /** @description Optional description */ description?: string; /** * Format: date-time * @description Optional expiration date (ISO 8601) */ expiresAt?: string; /** @description Role bindings that define what this token can access */ bindings: { /** * @description Role to grant * @enum {string} */ role: "ADMIN" | "MEMBER" | "VIEWER"; /** * @description Scope level * @enum {string} */ scopeType: "ORGANIZATION" | "TEAM" | "PROJECT"; /** @description ID of the organization, team, or project */ scopeId: string; }[]; /** * @description personal = tied to a user. service = not tied to any user, for automation. * @default personal * @enum {string} */ keyType?: "personal" | "service"; /** @description For service keys with restricted scope: list of project IDs to grant ADMIN access to. Omit for full org access. */ projectIds?: string[]; }; }; }; responses: { /** @description API key created. The token field contains the plaintext key — it is only shown once. */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Plaintext API key token (sk-lw-...). Store securely — shown only once. */ token?: string; apiKey?: { id?: string; name?: string; /** Format: date-time */ createdAt?: string; }; }; }; }; /** @description Invalid or missing API key token */ 401: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Requested binding exceeds the creator's own permissions, or scope does not belong to this organization */ 403: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Validation error (missing name, empty bindings, etc.) */ 422: { headers: { [name: string]: unknown; }; content?: never; }; }; }; revokeApiKey: { parameters: { query?: never; header?: never; path: { /** @description API key ID */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description API key revoked successfully */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { success?: boolean; }; }; }; /** @description Invalid or missing API key token */ 401: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Not authorized to revoke this API key (owned by another user) */ 403: { headers: { [name: string]: unknown; }; content?: never; }; /** @description API key not found */ 404: { headers: { [name: string]: unknown; }; content?: never; }; /** @description API key is already revoked */ 409: { headers: { [name: string]: unknown; }; content?: never; }; }; }; getApiDashboards: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: never; }; postApiDashboards: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; }; }; }; responses: never; }; putApiDashboardsReorder: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { dashboardIds: string[]; }; }; }; responses: never; }; getApiDashboardsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: never; }; deleteApiDashboardsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: never; }; patchApiDashboardsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; }; }; }; responses: never; }; getApiDataset: { parameters: { query?: { page?: number; limit?: number; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: never; }; postApiDataset: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; /** @default [] */ columnTypes?: { name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; }; responses: never; }; postApiDatasetUpload: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: never; }; getApiDatasetBySlugOrId: { parameters: { query?: never; header?: never; path: { slugOrId: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { data: { id: string; datasetId: string; projectId: string; entry: { [key: string]: unknown; }; createdAt: string; updatedAt: string; }[]; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Dataset not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiDatasetBySlugOrId: { parameters: { query?: never; header?: never; path: { slugOrId: string; }; cookie?: never; }; requestBody?: never; responses: never; }; patchApiDatasetBySlugOrId: { parameters: { query?: never; header?: never; path: { slugOrId: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { name?: string; columnTypes?: { name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; }; responses: never; }; getApiDatasetBySlugOrIdRecords: { parameters: { query?: { page?: number; limit?: number; }; header?: never; path: { slugOrId: string; }; cookie?: never; }; requestBody?: never; responses: never; }; postApiDatasetBySlugOrIdRecords: { parameters: { query?: never; header?: never; path: { slugOrId: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { entries: { [key: string]: unknown; }[]; }; }; }; responses: never; }; deleteApiDatasetBySlugOrIdRecords: { parameters: { query?: never; header?: never; path: { slugOrId: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { recordIds: string[]; }; }; }; responses: never; }; patchApiDatasetBySlugOrIdRecordsByRecordId: { parameters: { query?: never; header?: never; path: { slugOrId: string; recordId: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { entry: { [key: string]: unknown; }; }; }; }; responses: never; }; postApiDatasetBySlugOrIdUpload: { parameters: { query?: never; header?: never; path: { slugOrId: string; }; cookie?: never; }; requestBody?: never; responses: never; }; postApiDatasetBySlugEntries: { parameters: { query?: never; header?: never; path: { slug: string; }; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["DatasetPostEntries"]; }; }; responses: never; }; getEvaluationsV3RunStatus: { parameters: { query?: never; header?: never; path: { /** @description The run ID returned from POST /api/experiments/{slug}/run */ runId: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Run status */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { runId: string; /** @enum {string} */ status: "pending" | "running" | "completed" | "failed" | "stopped"; /** @description Number of cells completed */ progress: number; /** @description Total number of cells */ total: number; /** @description Unix timestamp when run started */ startedAt?: number; /** @description Unix timestamp when run finished (only present when completed/failed/stopped) */ finishedAt?: number; /** @description Execution summary (only present when completed) */ summary?: { runId?: string; totalCells?: number; completedCells?: number; failedCells?: number; /** @description Total execution time in milliseconds */ duration?: number; /** @description URL to view the run in LangWatch */ runUrl?: string; }; /** @description Error message (only present when failed) */ error?: string; }; }; }; /** @description Unauthorized - Missing or invalid API key */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Run not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; postEvaluationsV3Run: { parameters: { query?: never; header?: never; path: { /** @description The slug of the evaluation to run */ slug: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Run started successfully */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @description Unique identifier for this run */ runId: string; /** * @description Initial status of the run * @enum {string} */ status: "running"; /** @description Total number of cells to execute */ total: number; /** @description URL to view the run in LangWatch */ runUrl?: string; }; "text/event-stream": string; }; }; /** @description Unauthorized - Missing or invalid API key */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Evaluation not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; }; }; getApiEvaluators: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; projectId: string; name: string; slug: string | null; type: string; config: { [key: string]: unknown; } | null; workflowId: string | null; copiedFromEvaluatorId: string | null; createdAt: string; updatedAt: string; fields: { identifier: string; type: string; optional?: boolean; }[]; outputFields: { identifier: string; type: string; optional?: boolean; }[]; workflowName?: string; workflowIcon?: string; /** Format: uri */ platformUrl: string; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiEvaluators: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; config: { [key: string]: unknown; }; }; }; }; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; projectId: string; name: string; slug: string | null; type: string; config: { [key: string]: unknown; } | null; workflowId: string | null; copiedFromEvaluatorId: string | null; createdAt: string; updatedAt: string; fields: { identifier: string; type: string; optional?: boolean; }[]; outputFields: { identifier: string; type: string; optional?: boolean; }[]; workflowName?: string; workflowIcon?: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiEvaluatorsByIdOrSlug: { parameters: { query?: never; header?: never; path: { idOrSlug: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; projectId: string; name: string; slug: string | null; type: string; config: { [key: string]: unknown; } | null; workflowId: string | null; copiedFromEvaluatorId: string | null; createdAt: string; updatedAt: string; fields: { identifier: string; type: string; optional?: boolean; }[]; outputFields: { identifier: string; type: string; optional?: boolean; }[]; workflowName?: string; workflowIcon?: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Evaluator not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; putApiEvaluatorsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { name?: string; config?: { [key: string]: unknown; }; }; }; }; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; projectId: string; name: string; slug: string | null; type: string; config: { [key: string]: unknown; } | null; workflowId: string | null; copiedFromEvaluatorId: string | null; createdAt: string; updatedAt: string; fields: { identifier: string; type: string; optional?: boolean; }[]; outputFields: { identifier: string; type: string; optional?: boolean; }[]; workflowName?: string; workflowIcon?: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad request (e.g. attempting to change evaluatorType) */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Evaluator not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiEvaluatorsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { success: boolean; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Evaluator not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiGatewayV1Budgets: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Applicable budgets */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { data: { id: string; organization_id: string; scope_type: string; scope_id: string; name: string; description: string | null; window: string; /** @enum {string} */ on_breach: "BLOCK" | "WARN"; limit_usd: string; spent_usd: string; resets_at: string; archived_at: string | null; }[]; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiGatewayV1Budgets: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Budget created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { budget: { id: string; organization_id: string; scope_type: string; scope_id: string; name: string; description: string | null; window: string; /** @enum {string} */ on_breach: "BLOCK" | "WARN"; limit_usd: string; spent_usd: string; resets_at: string; archived_at: string | null; }; }; }; }; /** @description Validation error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiGatewayV1BudgetsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Archived */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { budget: { id: string; organization_id: string; scope_type: string; scope_id: string; name: string; description: string | null; window: string; /** @enum {string} */ on_breach: "BLOCK" | "WARN"; limit_usd: string; spent_usd: string; resets_at: string; archived_at: string | null; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; patchApiGatewayV1BudgetsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { budget: { id: string; organization_id: string; scope_type: string; scope_id: string; name: string; description: string | null; window: string; /** @enum {string} */ on_breach: "BLOCK" | "WARN"; limit_usd: string; spent_usd: string; resets_at: string; archived_at: string | null; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiGatewayV1Cache-rules": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Cache rules for the organisation */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { data: { id: string; organization_id: string; name: string; description: string | null; priority: number; enabled: boolean; matchers: { [key: string]: unknown; }; action: { /** @enum {string} */ mode: "respect" | "force" | "disable"; ttl?: number; salt?: string; }; /** @enum {string} */ mode_enum: "RESPECT" | "FORCE" | "DISABLE"; archived_at: string | null; created_at: string; updated_at: string; }[]; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "postApiGatewayV1Cache-rules": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { cache_rule: { id: string; organization_id: string; name: string; description: string | null; priority: number; enabled: boolean; matchers: { [key: string]: unknown; }; action: { /** @enum {string} */ mode: "respect" | "force" | "disable"; ttl?: number; salt?: string; }; /** @enum {string} */ mode_enum: "RESPECT" | "FORCE" | "DISABLE"; archived_at: string | null; created_at: string; updated_at: string; }; }; }; }; /** @description Validation error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiGatewayV1Cache-rulesById": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The rule */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { cache_rule: { id: string; organization_id: string; name: string; description: string | null; priority: number; enabled: boolean; matchers: { [key: string]: unknown; }; action: { /** @enum {string} */ mode: "respect" | "force" | "disable"; ttl?: number; salt?: string; }; /** @enum {string} */ mode_enum: "RESPECT" | "FORCE" | "DISABLE"; archived_at: string | null; created_at: string; updated_at: string; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "deleteApiGatewayV1Cache-rulesById": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Archived */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { cache_rule: { id: string; organization_id: string; name: string; description: string | null; priority: number; enabled: boolean; matchers: { [key: string]: unknown; }; action: { /** @enum {string} */ mode: "respect" | "force" | "disable"; ttl?: number; salt?: string; }; /** @enum {string} */ mode_enum: "RESPECT" | "FORCE" | "DISABLE"; archived_at: string | null; created_at: string; updated_at: string; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "patchApiGatewayV1Cache-rulesById": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { cache_rule: { id: string; organization_id: string; name: string; description: string | null; priority: number; enabled: boolean; matchers: { [key: string]: unknown; }; action: { /** @enum {string} */ mode: "respect" | "force" | "disable"; ttl?: number; salt?: string; }; /** @enum {string} */ mode_enum: "RESPECT" | "FORCE" | "DISABLE"; archived_at: string | null; created_at: string; updated_at: string; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiGatewayV1Providers: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Provider bindings */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { data: { id: string; model_provider_id: string; model_provider_name: string; slot: string; rate_limit_rpm: number | null; rate_limit_tpm: number | null; rate_limit_rpd: number | null; rotation_policy: string; fallback_priority_global: number | null; health_status: string; disabled_at: string | null; created_at: string; }[]; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiGatewayV1Providers: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Binding created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { provider_credential: { id: string; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiGatewayV1ProvidersById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Disabled */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { provider_credential: { id: string; disabled_at: string | null; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; patchApiGatewayV1ProvidersById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { provider_credential: { id: string; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiGatewayV1Virtual-keys": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Virtual keys for the project */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { data: { id: string; display_prefix: string; name: string; description: string | null; /** @enum {string} */ status: "active" | "revoked"; principal_user_id: string | null; provider_credential_ids: string[]; revision: string; last_used_at: string | null; created_at: string; }[]; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "postApiGatewayV1Virtual-keys": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Virtual key created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { virtual_key: { id: string; display_prefix: string; name: string; description: string | null; /** @enum {string} */ status: "active" | "revoked"; principal_user_id: string | null; provider_credential_ids: string[]; revision: string; last_used_at: string | null; created_at: string; }; secret: string; }; }; }; /** @description Validation error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiGatewayV1Virtual-keysById": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Virtual key detail */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { virtual_key: { id: string; display_prefix: string; name: string; description: string | null; /** @enum {string} */ status: "active" | "revoked"; principal_user_id: string | null; provider_credential_ids: string[]; revision: string; last_used_at: string | null; created_at: string; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "patchApiGatewayV1Virtual-keysById": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { virtual_key: { id: string; display_prefix: string; name: string; description: string | null; /** @enum {string} */ status: "active" | "revoked"; principal_user_id: string | null; provider_credential_ids: string[]; revision: string; last_used_at: string | null; created_at: string; }; }; }; }; /** @description Validation error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "postApiGatewayV1Virtual-keysByIdRevoke": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Revoked */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { virtual_key: { id: string; display_prefix: string; name: string; description: string | null; /** @enum {string} */ status: "active" | "revoked"; principal_user_id: string | null; provider_credential_ids: string[]; revision: string; last_used_at: string | null; created_at: string; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "postApiGatewayV1Virtual-keysByIdRotate": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Rotated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { virtual_key: { id: string; display_prefix: string; name: string; description: string | null; /** @enum {string} */ status: "active" | "revoked"; principal_user_id: string | null; provider_credential_ids: string[]; revision: string; last_used_at: string | null; created_at: string; }; secret: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiGraphs: { parameters: { query?: { dashboardId?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; graph: { [key: string]: unknown; }; filters: { [key: string]: unknown; } | null; dashboardId: string | null; gridColumn: number; gridRow: number; colSpan: number; rowSpan: number; createdAt: string; updatedAt: string; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiGraphs: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; graph: { [key: string]: unknown; }; dashboardId?: string; filters?: { [key: string]: unknown; }; gridColumn?: number; gridRow?: number; colSpan?: number; rowSpan?: number; }; }; }; responses: { /** @description Graph created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; graph: { [key: string]: unknown; }; filters: { [key: string]: unknown; } | null; dashboardId: string | null; gridColumn: number; gridRow: number; colSpan: number; rowSpan: number; createdAt: string; updatedAt: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiGraphsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; graph: { [key: string]: unknown; }; filters: { [key: string]: unknown; } | null; dashboardId: string | null; gridColumn: number; gridRow: number; colSpan: number; rowSpan: number; createdAt: string; updatedAt: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Graph not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiGraphsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Graph deleted */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; deleted: boolean; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Graph not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; patchApiGraphsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { name?: string; graph?: { [key: string]: unknown; }; filters?: { [key: string]: unknown; }; }; }; }; responses: { /** @description Graph updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; graph: { [key: string]: unknown; }; filters: { [key: string]: unknown; } | null; dashboardId: string | null; gridColumn: number; gridRow: number; colSpan: number; rowSpan: number; createdAt: string; updatedAt: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Graph not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiModel-providers": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { [key: string]: { id?: string; provider: string; enabled: boolean; customKeys: { [key: string]: unknown; } | null; deploymentMapping?: null; models?: string[] | null; embeddingsModels?: string[] | null; customModels?: { modelId: string; displayName: string; /** @enum {string} */ mode: "chat" | "embedding"; maxTokens?: number | null; supportedParameters?: ("temperature" | "max_tokens" | "top_p" | "frequency_penalty" | "presence_penalty" | "top_k" | "min_p" | "repetition_penalty" | "seed" | "reasoning" | "verbosity")[]; multimodalInputs?: ("image" | "file" | "audio")[]; }[] | null; customEmbeddingsModels?: { modelId: string; displayName: string; /** @enum {string} */ mode: "chat" | "embedding"; maxTokens?: number | null; supportedParameters?: ("temperature" | "max_tokens" | "top_p" | "frequency_penalty" | "presence_penalty" | "top_k" | "min_p" | "repetition_penalty" | "seed" | "reasoning" | "verbosity")[]; multimodalInputs?: ("image" | "file" | "audio")[]; }[] | null; disabledByDefault?: boolean; extraHeaders?: { key: string; value: string; }[] | null; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "putApiModel-providersByProvider": { parameters: { query?: never; header?: never; path: { provider: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { enabled: boolean; customKeys?: { [key: string]: unknown; }; customModels?: { modelId: string; displayName: string; /** @enum {string} */ mode: "chat" | "embedding"; maxTokens?: number | null; supportedParameters?: ("temperature" | "max_tokens" | "top_p" | "frequency_penalty" | "presence_penalty" | "top_k" | "min_p" | "repetition_penalty" | "seed" | "reasoning" | "verbosity")[]; multimodalInputs?: ("image" | "file" | "audio")[]; }[] | string[]; customEmbeddingsModels?: { modelId: string; displayName: string; /** @enum {string} */ mode: "chat" | "embedding"; maxTokens?: number | null; supportedParameters?: ("temperature" | "max_tokens" | "top_p" | "frequency_penalty" | "presence_penalty" | "top_k" | "min_p" | "repetition_penalty" | "seed" | "reasoning" | "verbosity")[]; multimodalInputs?: ("image" | "file" | "audio")[]; }[] | string[]; extraHeaders?: { key: string; value: string; }[]; defaultModel?: string; }; }; }; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { [key: string]: { id?: string; provider: string; enabled: boolean; customKeys: { [key: string]: unknown; } | null; deploymentMapping?: null; models?: string[] | null; embeddingsModels?: string[] | null; customModels?: { modelId: string; displayName: string; /** @enum {string} */ mode: "chat" | "embedding"; maxTokens?: number | null; supportedParameters?: ("temperature" | "max_tokens" | "top_p" | "frequency_penalty" | "presence_penalty" | "top_k" | "min_p" | "repetition_penalty" | "seed" | "reasoning" | "verbosity")[]; multimodalInputs?: ("image" | "file" | "audio")[]; }[] | null; customEmbeddingsModels?: { modelId: string; displayName: string; /** @enum {string} */ mode: "chat" | "embedding"; maxTokens?: number | null; supportedParameters?: ("temperature" | "max_tokens" | "top_p" | "frequency_penalty" | "presence_penalty" | "top_k" | "min_p" | "repetition_penalty" | "seed" | "reasoning" | "verbosity")[]; multimodalInputs?: ("image" | "file" | "audio")[]; }[] | null; disabledByDefault?: boolean; extraHeaders?: { key: string; value: string; }[] | null; }; }; }; }; /** @description Bad request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiMonitors: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; slug: string; checkType: string; enabled: boolean; /** @enum {string} */ executionMode: "ON_MESSAGE" | "AS_GUARDRAIL" | "MANUALLY"; sample: number; level: string; evaluatorId: string | null; preconditions?: unknown; parameters?: unknown; mappings?: null; threadIdleTimeout: number | null; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiMonitors: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; checkType: string; /** * @default ON_MESSAGE * @enum {string} */ executionMode?: "ON_MESSAGE" | "AS_GUARDRAIL" | "MANUALLY"; /** @default [] */ preconditions?: unknown[]; /** @default {} */ parameters?: { [key: string]: unknown; }; mappings?: { mapping: { [key: string]: { source: ("trace_id" | "thread_id" | "timestamp" | "input" | "output" | "contexts" | "contexts.string_list" | "metrics.total_cost" | "metrics.first_token_ms" | "metrics.total_time_ms" | "metrics.prompt_tokens" | "metrics.completion_tokens" | "metrics.total_tokens" | "spans" | "spans.llm.input" | "spans.llm.output" | "metadata" | "evaluations" | "annotations" | "events" | "threads" | "threads_until_current" | "formatted_trace") | ""; key?: string; subkey?: string; selectedFields?: string[]; /** @constant */ type?: "trace"; } | { source: ("thread_id" | "traces" | "formatted_traces") | ""; key?: string; subkey?: string; selectedFields?: string[]; /** @constant */ type: "thread"; }; }; expansions: ("spans.llm.span_id" | "spans.all.span_id" | "annotations.id" | "events.event_id")[]; } | null; /** @default 1 */ sample?: number; evaluatorId?: string; /** * @default trace * @enum {string} */ level?: "trace" | "thread"; threadIdleTimeout?: number | null; }; }; }; responses: { /** @description Monitor created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; slug: string; checkType: string; enabled: boolean; /** @enum {string} */ executionMode: "ON_MESSAGE" | "AS_GUARDRAIL" | "MANUALLY"; sample: number; level: string; evaluatorId: string | null; preconditions?: unknown; parameters?: unknown; mappings?: null; threadIdleTimeout: number | null; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiMonitorsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; slug: string; checkType: string; enabled: boolean; /** @enum {string} */ executionMode: "ON_MESSAGE" | "AS_GUARDRAIL" | "MANUALLY"; sample: number; level: string; evaluatorId: string | null; preconditions?: unknown; parameters?: unknown; mappings?: null; threadIdleTimeout: number | null; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Monitor not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiMonitorsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Monitor deleted */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; deleted: boolean; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Monitor not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; patchApiMonitorsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { name?: string; enabled?: boolean; checkType?: string; /** @enum {string} */ executionMode?: "ON_MESSAGE" | "AS_GUARDRAIL" | "MANUALLY"; preconditions?: unknown[]; parameters?: { [key: string]: unknown; }; mappings?: { mapping: { [key: string]: { source: ("trace_id" | "thread_id" | "timestamp" | "input" | "output" | "contexts" | "contexts.string_list" | "metrics.total_cost" | "metrics.first_token_ms" | "metrics.total_time_ms" | "metrics.prompt_tokens" | "metrics.completion_tokens" | "metrics.total_tokens" | "spans" | "spans.llm.input" | "spans.llm.output" | "metadata" | "evaluations" | "annotations" | "events" | "threads" | "threads_until_current" | "formatted_trace") | ""; key?: string; subkey?: string; selectedFields?: string[]; /** @constant */ type?: "trace"; } | { source: ("thread_id" | "traces" | "formatted_traces") | ""; key?: string; subkey?: string; selectedFields?: string[]; /** @constant */ type: "thread"; }; }; expansions: ("spans.llm.span_id" | "spans.all.span_id" | "annotations.id" | "events.event_id")[]; } | null; sample?: number; evaluatorId?: string | null; /** @enum {string} */ level?: "trace" | "thread"; threadIdleTimeout?: number | null; }; }; }; responses: { /** @description Monitor updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; slug: string; checkType: string; enabled: boolean; /** @enum {string} */ executionMode: "ON_MESSAGE" | "AS_GUARDRAIL" | "MANUALLY"; sample: number; level: string; evaluatorId: string | null; preconditions?: unknown; parameters?: unknown; mappings?: null; threadIdleTimeout: number | null; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Monitor not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiMonitorsByIdToggle: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { enabled: boolean; }; }; }; responses: { /** @description Monitor toggled */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; enabled: boolean; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Monitor not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; listProjects: { parameters: { query?: { page?: number; limit?: number; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Paginated list of projects */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { data?: components["schemas"]["Project"][]; pagination?: components["schemas"]["Pagination"]; }; }; }; /** @description Invalid or missing API key token */ 401: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Insufficient permissions for this operation */ 403: { headers: { [name: string]: unknown; }; content?: never; }; }; }; createProject: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": { /** @description Project name */ name: string; /** @description ID of an existing team to assign the project to */ teamId?: string; /** @description Name for a new team to create and assign the project to */ newTeamName?: string; /** @description Programming language (e.g. python, typescript) */ language: string; /** @description Framework (e.g. langchain, vercel-ai, openai) */ framework: string; }; }; }; responses: { /** @description Project created. Returns a scoped service API key for this project. */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Project"] & { /** @description Scoped service API key with ADMIN on this project (sk-lw-..._...). Store securely — shown only once. */ serviceApiKey?: string; /** @description ID of the auto-created service key, for management via DELETE /api/api-keys/{id}. */ serviceApiKeyId?: string; }; }; }; /** @description Team does not belong to this organization */ 400: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Invalid or missing API key token */ 401: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Insufficient permissions (requires project:create) */ 403: { headers: { [name: string]: unknown; }; content?: never; }; /** @description A project with this name already exists in the team */ 409: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Validation error (missing required fields) */ 422: { headers: { [name: string]: unknown; }; content?: never; }; }; }; getProject: { parameters: { query?: never; header?: never; path: { /** @description Project ID (project_...) */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Project details. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Project"]; }; }; /** @description Invalid or missing API key token */ 401: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Insufficient permissions for this operation */ 403: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Project not found */ 404: { headers: { [name: string]: unknown; }; content?: never; }; }; }; archiveProject: { parameters: { query?: never; header?: never; path: { /** @description Project ID */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Project archived */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id?: string; name?: string; /** Format: date-time */ archivedAt?: string; }; }; }; /** @description Invalid or missing API key token */ 401: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Insufficient permissions (requires project:delete) */ 403: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Project not found */ 404: { headers: { [name: string]: unknown; }; content?: never; }; }; }; updateProject: { parameters: { query?: never; header?: never; path: { /** @description Project ID */ id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { name?: string; language?: string; framework?: string; /** @enum {string} */ piiRedactionLevel?: "STRICT" | "ESSENTIAL" | "DISABLED"; }; }; }; responses: { /** @description Updated project */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["Project"]; }; }; /** @description Invalid or missing API key token */ 401: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Insufficient permissions (requires project:update) */ 403: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Project not found */ 404: { headers: { [name: string]: unknown; }; content?: never; }; }; }; getApiPrompts: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; handle: string | null; /** @enum {string} */ scope: "ORGANIZATION" | "PROJECT"; name: string; updatedAt: string; projectId: string; organizationId: string; versionId: string; authorId?: string | null; version: number; createdAt: string; commitMessage?: string | null; prompt: string; /** @default [] */ messages: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; /** @default [] */ inputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages"; }[]; outputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; model: string; temperature?: number; maxTokens?: number; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; promptingTechnique?: { /** @enum {string} */ type: "few_shot" | "in_context" | "chain_of_thought"; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; }; responseFormat?: { /** @enum {string} */ type: "json_schema"; json_schema: { name: string; schema: { [key: string]: unknown; }; } | null; }; /** @default [] */ tags: { name: string; versionId: string; }[]; /** @default {} */ parameters: { [key: string]: unknown; }; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiPrompts: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { handle: string; /** * @default PROJECT * @enum {string} */ scope?: "ORGANIZATION" | "PROJECT"; model?: string; temperature?: number; maxTokens?: number; commitMessage?: string; authorId?: string; prompt?: string; messages?: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; inputs?: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages"; }[]; outputs?: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; /** @enum {string} */ schemaVersion?: "1.0"; tags?: string[]; parameters?: { [key: string]: unknown; }; }; }; }; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; handle: string | null; /** @enum {string} */ scope: "ORGANIZATION" | "PROJECT"; name: string; updatedAt: string; projectId: string; organizationId: string; versionId: string; authorId?: string | null; version: number; createdAt: string; commitMessage?: string | null; prompt: string; /** @default [] */ messages: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; /** @default [] */ inputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages"; }[]; outputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; model: string; temperature?: number; maxTokens?: number; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; promptingTechnique?: { /** @enum {string} */ type: "few_shot" | "in_context" | "chain_of_thought"; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; }; responseFormat?: { /** @enum {string} */ type: "json_schema"; json_schema: { name: string; schema: { [key: string]: unknown; }; } | null; }; /** @default [] */ tags: { name: string; versionId: string; }[]; /** @default {} */ parameters: { [key: string]: unknown; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Conflict */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiPromptsTags: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; createdAt: string; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiPromptsTags: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; }; }; }; responses: { /** @description Tag created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; createdAt: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; putApiPromptsTagsByTag: { parameters: { query?: never; header?: never; path: { tag: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; }; }; }; responses: { /** @description Tag renamed */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; createdAt: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiPromptsTagsByTag: { parameters: { query?: never; header?: never; path: { tag: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Tag deleted */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiPromptsById: { parameters: { query?: { /** @description Specific version number to retrieve. Cannot be used when the id path already contains a shorthand suffix. */ version?: number; /** @description Fetch the version pointed to by this tag (e.g., "production", "staging"). Cannot be used when the id path already contains a shorthand suffix. */ tag?: string; }; header?: never; path: { /** @description Prompt slug or shorthand. Supports three formats: (1) bare slug — "pizza-prompt" returns the latest version; (2) slug:tag — "pizza-prompt:production" returns the version pointed to by that tag; (3) slug:version — "pizza-prompt:2" returns that specific version number. "slug:latest" is equivalent to the bare slug. Cannot be combined with the tag or version query parameters. */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; handle: string | null; /** @enum {string} */ scope: "ORGANIZATION" | "PROJECT"; name: string; updatedAt: string; projectId: string; organizationId: string; versionId: string; authorId?: string | null; version: number; createdAt: string; commitMessage?: string | null; prompt: string; /** @default [] */ messages: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; /** @default [] */ inputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages"; }[]; outputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; model: string; temperature?: number; maxTokens?: number; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; promptingTechnique?: { /** @enum {string} */ type: "few_shot" | "in_context" | "chain_of_thought"; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; }; responseFormat?: { /** @enum {string} */ type: "json_schema"; json_schema: { name: string; schema: { [key: string]: unknown; }; } | null; }; /** @default [] */ tags: { name: string; versionId: string; }[]; /** @default {} */ parameters: { [key: string]: unknown; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Prompt not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; putApiPromptsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { model?: string; temperature?: number; maxTokens?: number; commitMessage: string; authorId?: string; prompt?: string; messages?: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; inputs?: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages"; }[]; outputs?: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; /** @enum {string} */ schemaVersion?: "1.0"; tags?: string[]; parameters?: { [key: string]: unknown; }; /** @enum {string} */ scope?: "ORGANIZATION" | "PROJECT"; handle?: string; }; }; }; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; handle: string | null; /** @enum {string} */ scope: "ORGANIZATION" | "PROJECT"; name: string; updatedAt: string; projectId: string; organizationId: string; versionId: string; authorId?: string | null; version: number; createdAt: string; commitMessage?: string | null; prompt: string; /** @default [] */ messages: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; /** @default [] */ inputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages"; }[]; outputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; model: string; temperature?: number; maxTokens?: number; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; promptingTechnique?: { /** @enum {string} */ type: "few_shot" | "in_context" | "chain_of_thought"; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; }; responseFormat?: { /** @enum {string} */ type: "json_schema"; json_schema: { name: string; schema: { [key: string]: unknown; }; } | null; }; /** @default [] */ tags: { name: string; versionId: string; }[]; /** @default {} */ parameters: { [key: string]: unknown; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Prompt not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Conflict */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message: string; }; }; }; /** @description Invalid input */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiPromptsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { success: boolean; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Prompt not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiPromptsByIdSync: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { configData: { prompt: string; /** @default [] */ messages?: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; /** @default [] */ inputs?: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages"; }[]; outputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; model: string; temperature?: number; max_tokens?: number; top_p?: number; frequency_penalty?: number; presence_penalty?: number; seed?: number; top_k?: number; min_p?: number; repetition_penalty?: number; reasoning?: string; reasoning_effort?: string; thinkingLevel?: string; effort?: string; verbosity?: string; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; prompting_technique?: { /** @enum {string} */ type: "few_shot" | "in_context" | "chain_of_thought"; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; }; response_format?: { /** @enum {string} */ type: "json_schema"; json_schema: { name: string; schema: { [key: string]: unknown; }; } | null; }; }; parameters?: { [key: string]: unknown; }; localVersion?: number; commitMessage?: string; }; }; }; responses: { /** @description Sync result */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @enum {string} */ action: "created" | "updated" | "conflict" | "up_to_date"; prompt?: { id: string; handle: string | null; /** @enum {string} */ scope: "ORGANIZATION" | "PROJECT"; name: string; updatedAt: string; projectId: string; organizationId: string; versionId: string; authorId?: string | null; version: number; createdAt: string; commitMessage?: string | null; prompt: string; /** @default [] */ messages: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; /** @default [] */ inputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages"; }[]; outputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; model: string; temperature?: number; maxTokens?: number; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; promptingTechnique?: { /** @enum {string} */ type: "few_shot" | "in_context" | "chain_of_thought"; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; }; responseFormat?: { /** @enum {string} */ type: "json_schema"; json_schema: { name: string; schema: { [key: string]: unknown; }; } | null; }; /** @default [] */ tags: { name: string; versionId: string; }[]; /** @default {} */ parameters: { [key: string]: unknown; }; }; conflictInfo?: { localVersion: number; remoteVersion: number; differences: string[]; remoteConfigData: { prompt: string; /** @default [] */ messages: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; /** @default [] */ inputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages"; }[]; outputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; model: string; temperature?: number; max_tokens?: number; top_p?: number; frequency_penalty?: number; presence_penalty?: number; seed?: number; top_k?: number; min_p?: number; repetition_penalty?: number; reasoning?: string; reasoning_effort?: string; thinkingLevel?: string; effort?: string; verbosity?: string; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; prompting_technique?: { /** @enum {string} */ type: "few_shot" | "in_context" | "chain_of_thought"; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; }; response_format?: { /** @enum {string} */ type: "json_schema"; json_schema: { name: string; schema: { [key: string]: unknown; }; } | null; }; }; remoteConfig?: { [key: string]: unknown; }; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; putApiPromptsByIdTagsByTag: { parameters: { query?: never; header?: never; path: { /** @description The tag to assign (e.g., "production", "staging", or a custom tag) */ tag: string; id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { versionId: string; }; }; }; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { configId: string; versionId: string; tag: string; updatedAt: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Prompt not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Invalid tag or version */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiPromptsByIdVersions: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; handle: string | null; /** @enum {string} */ scope: "ORGANIZATION" | "PROJECT"; name: string; updatedAt: string; projectId: string; organizationId: string; versionId: string; authorId?: string | null; version: number; createdAt: string; commitMessage?: string | null; prompt: string; /** @default [] */ messages: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; /** @default [] */ inputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages"; }[]; outputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; model: string; temperature?: number; maxTokens?: number; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; promptingTechnique?: { /** @enum {string} */ type: "few_shot" | "in_context" | "chain_of_thought"; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; }; responseFormat?: { /** @enum {string} */ type: "json_schema"; json_schema: { name: string; schema: { [key: string]: unknown; }; } | null; }; /** @default [] */ tags: { name: string; versionId: string; }[]; /** @default {} */ parameters: { [key: string]: unknown; }; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Prompt not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiPromptsByIdVersionsByVersionIdRestore: { parameters: { query?: never; header?: never; path: { id: string; versionId: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; handle: string | null; /** @enum {string} */ scope: "ORGANIZATION" | "PROJECT"; name: string; updatedAt: string; projectId: string; organizationId: string; versionId: string; authorId?: string | null; version: number; createdAt: string; commitMessage?: string | null; prompt: string; /** @default [] */ messages: { /** @enum {string} */ role: "user" | "assistant" | "system"; content: string; }[]; /** @default [] */ inputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages"; }[]; outputs: { identifier: string; /** @enum {string} */ type: "str" | "float" | "bool" | "json_schema"; json_schema?: { type: string; } & { [key: string]: unknown; }; }[]; model: string; temperature?: number; maxTokens?: number; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; promptingTechnique?: { /** @enum {string} */ type: "few_shot" | "in_context" | "chain_of_thought"; demonstrations?: { id?: string; name?: string; inline?: { records: { [key: string]: unknown[]; }; columnTypes: { id?: string; name: string; type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image"; }[]; }; }; }; responseFormat?: { /** @enum {string} */ type: "json_schema"; json_schema: { name: string; schema: { [key: string]: unknown; }; } | null; }; /** @default [] */ tags: { name: string; versionId: string; }[]; /** @default {} */ parameters: { [key: string]: unknown; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Prompt or version not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "postApiScenario-events": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { /** @constant */ type: "SCENARIO_RUN_STARTED"; timestamp: number; rawEvent?: unknown; batchRunId: string; scenarioId: string; scenarioRunId: string; /** @default default */ scenarioSetId?: string; metadata: { name?: string; description?: string; langwatch?: { targetReferenceId: string; /** @enum {string} */ targetType: "prompt" | "http" | "code" | "workflow"; simulationSuiteId?: string; }; } & { [key: string]: unknown; }; } | { /** @constant */ type: "SCENARIO_RUN_FINISHED"; timestamp: number; rawEvent?: unknown; batchRunId: string; scenarioId: string; scenarioRunId: string; /** @default default */ scenarioSetId?: string; /** @enum {string} */ status: "SUCCESS" | "ERROR" | "CANCELLED" | "IN_PROGRESS" | "PENDING" | "FAILED" | "STALLED" | "QUEUED" | "RUNNING"; results?: { /** @enum {string} */ verdict: "success" | "failure" | "inconclusive"; reasoning?: string; metCriteria: string[]; unmetCriteria: string[]; error?: string; } | null; } | { /** @constant */ type: "SCENARIO_MESSAGE_SNAPSHOT"; timestamp: number; rawEvent?: unknown; messages: ((({ id: string; /** @constant */ role: "developer"; content: string; name?: string; encryptedValue?: string; } | { id: string; /** @constant */ role: "system"; content: string; name?: string; encryptedValue?: string; } | { id: string; /** @constant */ role: "assistant"; content?: string; name?: string; encryptedValue?: string; toolCalls?: { id: string; /** @constant */ type: "function"; function: { name: string; arguments: string; }; encryptedValue?: string; }[]; } | { id: string; /** @constant */ role: "user"; content: string | ({ /** @constant */ type: "text"; text: string; } | { /** @constant */ type: "image"; source: { /** @constant */ type: "data"; value: string; mimeType: string; } | { /** @constant */ type: "url"; value: string; mimeType?: string; }; metadata?: unknown; } | { /** @constant */ type: "audio"; source: { /** @constant */ type: "data"; value: string; mimeType: string; } | { /** @constant */ type: "url"; value: string; mimeType?: string; }; metadata?: unknown; } | { /** @constant */ type: "video"; source: { /** @constant */ type: "data"; value: string; mimeType: string; } | { /** @constant */ type: "url"; value: string; mimeType?: string; }; metadata?: unknown; } | { /** @constant */ type: "document"; source: { /** @constant */ type: "data"; value: string; mimeType: string; } | { /** @constant */ type: "url"; value: string; mimeType?: string; }; metadata?: unknown; } | { /** @constant */ type: "binary"; mimeType: string; id?: string; url?: string; data?: string; filename?: string; })[]; name?: string; encryptedValue?: string; } | { id: string; content: string; /** @constant */ role: "tool"; toolCallId: string; error?: string; encryptedValue?: string; } | { id: string; /** @constant */ role: "activity"; activityType: string; content: { [key: string]: unknown; }; } | { id: string; /** @constant */ role: "reasoning"; content: string; encryptedValue?: string; }) | { role?: "system" | "user" | "assistant" | "function" | "tool" | "unknown"; content?: string | ({ /** @constant */ type: "text"; text?: string; content?: string; } | { text: string; } | { /** @constant */ type: "image_url"; image_url?: { url: string; detail?: "auto" | "low" | "high"; }; } | { /** @constant */ type: "tool_call"; toolName?: string; toolCallId?: string; args?: string; } | { /** @constant */ type: "tool_result"; toolName?: string; toolCallId?: string; result?: unknown; } | { /** @constant */ type: "binary"; mimeType: string; data?: string; url?: string; id?: string; filename?: string; })[] | null; parts?: ({ /** @constant */ type: "text"; text?: string; content?: string; } | { text: string; } | { /** @constant */ type: "image_url"; image_url?: { url: string; detail?: "auto" | "low" | "high"; }; } | { /** @constant */ type: "tool_call"; toolName?: string; toolCallId?: string; args?: string; } | { /** @constant */ type: "tool_result"; toolName?: string; toolCallId?: string; result?: unknown; } | { /** @constant */ type: "binary"; mimeType: string; data?: string; url?: string; id?: string; filename?: string; })[]; function_call?: { name?: string; arguments?: string; } | null; tool_calls?: { id: string; type: string; function: { name?: string; arguments?: string; }; }[] | null; tool_call_id?: string | null; name?: string | null; reasoning_content?: string | null; }) & { id?: string; trace_id?: string; })[]; batchRunId: string; scenarioId: string; scenarioRunId: string; /** @default default */ scenarioSetId?: string; } | { /** @constant */ type: "SCENARIO_TEXT_MESSAGE_START"; timestamp: number; rawEvent?: unknown; batchRunId: string; scenarioId: string; scenarioRunId: string; /** @default default */ scenarioSetId?: string; messageId: string; role: string; messageIndex?: number; } | { /** @constant */ type: "SCENARIO_TEXT_MESSAGE_END"; timestamp: number; rawEvent?: unknown; batchRunId: string; scenarioId: string; scenarioRunId: string; /** @default default */ scenarioSetId?: string; messageId: string; role: string; content?: string; message?: { [key: string]: unknown; }; traceId?: string; messageIndex?: number; } | { /** @constant */ type: "SCENARIO_TEXT_MESSAGE_CONTENT"; timestamp: number; rawEvent?: unknown; batchRunId: string; scenarioId: string; scenarioRunId: string; /** @default default */ scenarioSetId?: string; messageId: string; delta: string; } | { /** @constant */ type: "SCENARIO_TOOL_CALL_START"; timestamp: number; rawEvent?: unknown; batchRunId: string; scenarioId: string; scenarioRunId: string; /** @default default */ scenarioSetId?: string; toolCallId: string; toolCallName: string; parentMessageId?: string; } | { /** @constant */ type: "SCENARIO_TOOL_CALL_ARGS"; timestamp: number; rawEvent?: unknown; batchRunId: string; scenarioId: string; scenarioRunId: string; /** @default default */ scenarioSetId?: string; toolCallId: string; delta: string; } | { /** @constant */ type: "SCENARIO_TOOL_CALL_END"; timestamp: number; rawEvent?: unknown; batchRunId: string; scenarioId: string; scenarioRunId: string; /** @default default */ scenarioSetId?: string; toolCallId: string; }; }; }; responses: { /** @description Event created successfully */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { success: boolean; url?: string | null; }; }; }; /** @description Invalid event data */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "deleteApiScenario-events": { parameters: { query?: { batchRunId?: string; scenarioSetId?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Matching runs archived successfully */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { success: boolean; url?: string | null; }; }; }; /** @description No scope provided — a batchRunId or scenarioSetId is required */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiScenarios: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; situation: string; criteria: string[]; labels: string[]; /** Format: uri */ platformUrl: string; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiScenarios: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; situation: string; /** @default [] */ criteria?: string[]; /** @default [] */ labels?: string[]; }; }; }; responses: { /** @description Scenario created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; situation: string; criteria: string[]; labels: string[]; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiScenariosById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; situation: string; criteria: string[]; labels: string[]; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Scenario not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; putApiScenariosById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { name?: string; situation?: string; criteria?: string[]; labels?: string[]; }; }; }; responses: { /** @description Scenario updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; situation: string; criteria: string[]; labels: string[]; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Scenario not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiScenariosById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Scenario archived */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; archived: boolean; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Scenario not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiSecrets: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; projectId: string; name: string; createdAt: string; updatedAt: string; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiSecrets: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; value: string; }; }; }; responses: { /** @description Secret created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; projectId: string; name: string; createdAt: string; updatedAt: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Secret with this name already exists */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiSecretsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; projectId: string; name: string; createdAt: string; updatedAt: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Secret not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; putApiSecretsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { value: string; }; }; }; responses: { /** @description Secret updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; projectId: string; name: string; createdAt: string; updatedAt: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Secret not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiSecretsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Secret deleted */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; deleted: boolean; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Secret not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiSimulation-runs": { parameters: { query?: { scenarioSetId?: string; batchRunId?: string; limit?: number; cursor?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { runs: { scenarioId: string; batchRunId: string; scenarioRunId: string; name: string | null; description: string | null; status: string; results: { verdict?: string | null; reasoning?: string | null; metCriteria?: string[]; unmetCriteria?: string[]; error?: string | null; } | null; messages: { role: string; content: string; }[]; timestamp: number; updatedAt: number; durationInMs: number; totalCost?: number; /** Format: uri */ platformUrl: string; }[]; hasMore?: boolean; nextCursor?: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiSimulation-runsBatchesList": { parameters: { query: { scenarioSetId: string; limit?: number; cursor?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { batches: { batchRunId: string; totalCount: number; passCount: number; failCount: number; runningCount: number; stalledCount: number; lastRunAt: number; lastUpdatedAt: number; firstCompletedAt: number | null; allCompletedAt: number | null; }[]; hasMore?: boolean; nextCursor?: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiSimulation-runsByScenarioRunId": { parameters: { query?: never; header?: never; path: { scenarioRunId: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { scenarioId: string; batchRunId: string; scenarioRunId: string; name: string | null; description: string | null; status: string; results: { verdict?: string | null; reasoning?: string | null; metCriteria?: string[]; unmetCriteria?: string[]; error?: string | null; } | null; messages: { role: string; content: string; }[]; timestamp: number; updatedAt: number; durationInMs: number; totalCost?: number; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Run not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiSuites: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; slug: string; description: string | null; scenarioIds: string[]; targets: { /** @enum {string} */ type: "prompt" | "http" | "code" | "workflow"; referenceId: string; }[]; repeatCount: number; labels: string[]; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiSuites: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; description?: string; scenarioIds: string[]; targets: { /** @enum {string} */ type: "prompt" | "http" | "code" | "workflow"; referenceId: string; }[]; /** @default 1 */ repeatCount?: number; /** @default [] */ labels?: string[]; }; }; }; responses: { /** @description Suite created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; slug: string; description: string | null; scenarioIds: string[]; targets: { /** @enum {string} */ type: "prompt" | "http" | "code" | "workflow"; referenceId: string; }[]; repeatCount: number; labels: string[]; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiSuitesById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; slug: string; description: string | null; scenarioIds: string[]; targets: { /** @enum {string} */ type: "prompt" | "http" | "code" | "workflow"; referenceId: string; }[]; repeatCount: number; labels: string[]; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Suite not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiSuitesById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Suite archived */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; archived: boolean; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Suite not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; patchApiSuitesById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { name?: string; description?: string | null; scenarioIds?: string[]; targets?: { /** @enum {string} */ type: "prompt" | "http" | "code" | "workflow"; referenceId: string; }[]; repeatCount?: number; labels?: string[]; }; }; }; responses: { /** @description Suite updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; slug: string; description: string | null; scenarioIds: string[]; targets: { /** @enum {string} */ type: "prompt" | "http" | "code" | "workflow"; referenceId: string; }[]; repeatCount: number; labels: string[]; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Suite not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiSuitesByIdDuplicate: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Suite duplicated */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; slug: string; description: string | null; scenarioIds: string[]; targets: { /** @enum {string} */ type: "prompt" | "http" | "code" | "workflow"; referenceId: string; }[]; repeatCount: number; labels: string[]; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Suite not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiSuitesByIdRun: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { idempotencyKey?: string; }; }; }; responses: { /** @description Suite run scheduled */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { scheduled: boolean; batchRunId: string; setId: string; jobCount: number; skippedArchived: { scenarios: string[]; targets: string[]; }; items: { scenarioRunId: string; scenarioId: string; target: { /** @enum {string} */ type: "prompt" | "http" | "code" | "workflow"; referenceId: string; }; name: string | null; }[]; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Suite not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiTracesSearch: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { query?: string; /** @default {} */ filters?: { "topics.topics"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "topics.subtopics"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.user_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.thread_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.customer_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.labels"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.key"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.value"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "metadata.prompt_ids"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "traces.origin"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "traces.error"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "traces.name"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "spans.type"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "spans.model"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.guardrails_only"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.has_passed"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.has_score"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.evaluator_id.has_label"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.passed"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.score"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.state"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "evaluations.label"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.event_type"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.metrics.key"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.metrics.value"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "events.event_details.key"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; "annotations.hasAnnotation"?: string[] | { [key: string]: string[]; } | { [key: string]: { [key: string]: string[]; }; }; }; traceIds?: string[]; negateFilters?: boolean; pageOffset?: number; pageSize?: number; groupBy?: string; sortBy?: string; sortDirection?: string; updatedAt?: number; scrollId?: string | null; startDate: number | string; endDate: number | string; /** * @description Output format: 'digest' (AI-readable trace digest) or 'json' (full raw data) * @enum {string} */ format?: "digest" | "json"; /** @description When true, fetches full span data for each trace. Useful for bulk export. Default false. */ includeSpans?: boolean; llmMode?: boolean; /** * @description Which timestamp the startDate/endDate window filters on. 'occurred' (default) selects traces by when they happened. 'updated' selects traces by when they were last modified — use this for incremental ETL ('give me everything changed since my last pull'), since a trace can occur long before it gains a later evaluation or annotation. * @enum {string} */ dateField?: "occurred" | "updated"; /** * @description Entity root to read from. Only 'traces' is supported today. Defaults to 'traces' when 'select' is present. * @enum {string} */ from?: "traces"; /** @description Flat list of dotted-path columns to project, e.g. ['trace_id','metadata.user_id','events.type','evaluations.score']. Paths group by root in the response: scalar fields stay top-level, 'metadata.*' nests under a metadata object, and 'events.*'/'annotations.*'/'evaluations.*' return as nested arrays (one row per trace). When present, the response gains a top-level 'schema' field describing the resolved columns. When omitted, the response is unchanged from the legacy shape. */ select?: string[]; }; }; }; responses: { /** @description Matching traces with pagination */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { traces: unknown[]; pagination: { totalHits: number; scrollId?: string; }; /** @description Present only when 'select' is provided. Describes the resolved columns — the dotted path, its value type, and whether it belongs to a nested child collection — so callers can pre-allocate a typed reader. */ schema?: { from: string; columns: { path: string; type: string; collection: boolean; }[]; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiTracesByTraceId: { parameters: { query?: { /** @description Output format: 'digest' (default, AI-readable) or 'json' (full raw data) */ format?: "digest" | "json"; /** @description Deprecated: use format=digest instead */ llmMode?: "true" | "false" | "1" | "0"; }; header?: never; path: { /** @description The trace ID — either the full 32-char ID or a unique prefix (≥ 8 chars). Prefix lookup is scoped to the authenticated project. */ traceId: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Trace detail with spans, evaluations, and ASCII tree */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { [key: string]: unknown; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Trace not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { message: string; }; }; }; /** @description Ambiguous trace ID prefix — the prefix matches more than one trace */ 409: { headers: { [name: string]: unknown; }; content: { "application/json": { message: string; candidateTraceIds: string[]; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiTriggers: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; /** @enum {string} */ action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE"; actionParams: { [key: string]: unknown; }; filters: { [key: string]: unknown; }; active: boolean; message: string | null; /** @enum {string|null} */ alertType: "CRITICAL" | "WARNING" | "INFO" | null; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiTriggers: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { name: string; /** @enum {string} */ action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE"; /** @default {} */ actionParams?: { [key: string]: unknown; }; /** @default {} */ filters?: { [key: string]: unknown; }; message?: string; /** @enum {string} */ alertType?: "CRITICAL" | "WARNING" | "INFO"; }; }; }; responses: { /** @description Trigger created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; /** @enum {string} */ action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE"; actionParams: { [key: string]: unknown; }; filters: { [key: string]: unknown; }; active: boolean; message: string | null; /** @enum {string|null} */ alertType: "CRITICAL" | "WARNING" | "INFO" | null; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiTriggersById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; /** @enum {string} */ action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE"; actionParams: { [key: string]: unknown; }; filters: { [key: string]: unknown; }; active: boolean; message: string | null; /** @enum {string|null} */ alertType: "CRITICAL" | "WARNING" | "INFO" | null; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Trigger not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiTriggersById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Trigger deleted */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; deleted: boolean; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Trigger not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; patchApiTriggersById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { name?: string; active?: boolean; message?: string | null; /** @enum {string|null} */ alertType?: "CRITICAL" | "WARNING" | "INFO" | null; filters?: { [key: string]: unknown; }; actionParams?: { [key: string]: unknown; }; }; }; }; responses: { /** @description Trigger updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; /** @enum {string} */ action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE"; actionParams: { [key: string]: unknown; }; filters: { [key: string]: unknown; }; active: boolean; message: string | null; /** @enum {string|null} */ alertType: "CRITICAL" | "WARNING" | "INFO" | null; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Trigger not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiWorkflows: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; icon: string | null; description: string | null; isEvaluator: boolean; isComponent: boolean; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }[]; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; getApiWorkflowsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; icon: string | null; description: string | null; isEvaluator: boolean; isComponent: boolean; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Workflow not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; deleteApiWorkflowsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Workflow archived */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; archived: boolean; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Workflow not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; patchApiWorkflowsById: { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { name?: string; icon?: string; description?: string; }; }; }; responses: { /** @description Workflow updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; name: string; icon: string | null; description: string | null; isEvaluator: boolean; isComponent: boolean; createdAt: string; updatedAt: string; /** Format: uri */ platformUrl: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Workflow not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiModel-defaults": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { scope: { projectId: string; teamId: string | null; organizationId: string | null; organizationName: string | null; }; effective: { DEFAULT: { model: string; source: string; scope: string | null; } | null; FAST: { model: string; source: string; scope: string | null; } | null; EMBEDDINGS: { model: string; source: string; scope: string | null; } | null; }; configs: { id: string; config: { [key: string]: string; }; scopes: { /** @enum {string} */ type: "ORGANIZATION" | "TEAM" | "PROJECT"; id: string; name: string; }[]; createdAt: string; updatedAt: string; }[]; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "postApiModel-defaults": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { config: { [key: string]: string; }; scopes: { /** @enum {string} */ scopeType: "ORGANIZATION" | "TEAM" | "PROJECT"; scopeId: string; }[]; }; }; }; responses: { /** @description Success */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "putApiModel-defaultsById": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { config?: { [key: string]: string; }; scopes?: { /** @enum {string} */ scopeType: "ORGANIZATION" | "TEAM" | "PROJECT"; scopeId: string; }[]; }; }; }; responses: { /** @description Updated */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "deleteApiModel-defaultsById": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Deleted */ 204: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiGovernanceIngestion-templates": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Templates visible to the caller */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { data: { id: string; slug: string; source_type: string; display_name: string; description: string | null; icon_asset: string | null; credential_schema: string | null; ottl_rules: string; platform_published: boolean; enabled: boolean; organization_id: string | null; }[]; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "postApiGovernanceIngestion-templates": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Template created */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { ingestion_template: { id: string; slug: string; source_type: string; display_name: string; description: string | null; icon_asset: string | null; credential_schema: string | null; ottl_rules: string; platform_published: boolean; enabled: boolean; organization_id: string | null; }; }; }; }; /** @description Validation error */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiGovernanceIngestion-templatesAdmin": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Admin templates */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { data: { id: string; slug: string; source_type: string; display_name: string; description: string | null; icon_asset: string | null; credential_schema: string | null; ottl_rules: string; platform_published: boolean; enabled: boolean; organization_id: string | null; }[]; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "getApiGovernanceIngestion-templatesById": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Template detail */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { ingestion_template: { id: string; slug: string; source_type: string; display_name: string; description: string | null; icon_asset: string | null; credential_schema: string | null; ottl_rules: string; platform_published: boolean; enabled: boolean; organization_id: string | null; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "deleteApiGovernanceIngestion-templatesById": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Archived */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @constant */ archived: true; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Platform template immutable */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Template not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "patchApiGovernanceIngestion-templatesByIdOttl-rules": { parameters: { query?: never; header?: never; path: { id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Updated */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { ingestion_template: { id: string; slug: string; source_type: string; display_name: string; description: string | null; icon_asset: string | null; credential_schema: string | null; ottl_rules: string; platform_published: boolean; enabled: boolean; organization_id: string | null; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Platform template immutable */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Template not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; "postApiGovernanceIngestion-templatesClone": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Cloned */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": { ingestion_template: { id: string; slug: string; source_type: string; display_name: string; description: string | null; icon_asset: string | null; credential_schema: string | null; ottl_rules: string; platform_published: boolean; enabled: boolean; organization_id: string | null; }; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Source template not found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { error: { type: string; code: string; message: string; }; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; postApiEventsTrack: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Event tracked */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @constant */ message: "Event tracked"; }; }; }; /** @description Invalid event payload */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; patchApiTracesByTraceIdMetadata: { parameters: { query?: never; header?: never; path: { traceId: string; }; cookie?: never; }; requestBody?: { content: { "application/json": { metadata: { [key: string]: string | number | boolean | string[] | { [key: string]: unknown; }; }; }; }; }; responses: { /** @description Metadata updated successfully */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { traceId: string; }; }; }; /** @description Bad Request */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Unprocessable Entity */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; /** @description Internal Server Error */ 500: { headers: { [name: string]: unknown; }; content: { "application/json": { error: string; message?: string; }; }; }; }; }; } /** * Zod schema for core prompt data - the essential fields needed for functionality */ declare const corePromptDataSchema: z.ZodObject<{ model: z.ZodString; messages: z.ZodArray; content: z.ZodString; }, z.core.$strip>>; prompt: z.ZodOptional; temperature: z.ZodOptional; maxTokens: z.ZodOptional; responseFormat: z.ZodOptional; json_schema: z.ZodNullable; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; /** * Combined schema for complete prompt data */ declare const promptDataSchema: z.ZodObject<{ parameters: z.ZodOptional>; id: z.ZodOptional; handle: z.ZodOptional>; version: z.ZodOptional; versionId: z.ZodOptional; scope: z.ZodOptional>; model: z.ZodString; messages: z.ZodArray; content: z.ZodString; }, z.core.$strip>>; prompt: z.ZodOptional; temperature: z.ZodOptional; maxTokens: z.ZodOptional; responseFormat: z.ZodOptional; json_schema: z.ZodNullable; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; /** * Type for template variables - supporting common data types */ type TemplateVariables = Record; /** * Core data needed for prompt functionality */ type CorePromptData = z.infer; /** * Combined type for creating prompts */ type PromptData = z.infer; type CreatePromptBody = NonNullable["content"]["application/json"]; type UpdatePromptBody = NonNullable["content"]["application/json"]; type PromptResponse = NonNullable; type PromptScope = paths["/api/prompts"]["post"]["responses"]["200"]["content"]["application/json"]["scope"]; type TagDefinition = NonNullable[number]; type CreatedTag = NonNullable; /** * Fetch policy for prompt retrieval. * Controls how prompts are fetched and cached. */ declare enum FetchPolicy { /** Use local file if available, otherwise fetch from API (default) */ MATERIALIZED_FIRST = "MATERIALIZED_FIRST", /** Always try API first, fall back to materialized */ ALWAYS_FETCH = "ALWAYS_FETCH", /** Fetch every X minutes, use materialized between fetches */ CACHE_TTL = "CACHE_TTL", /** Never fetch, use materialized files only */ MATERIALIZED_ONLY = "MATERIALIZED_ONLY" } /** * The Prompt class provides a standardized interface for working with prompt objects * within the SDK, focusing on core functionality needed for template compilation and execution. * Keeps only essential fields while maintaining compatibility with tracing and observability. */ declare class Prompt { readonly model: string; readonly messages: Array<{ role: "user" | "assistant" | "system"; content: string; }>; readonly prompt?: string; readonly temperature?: number; readonly maxTokens?: number; readonly responseFormat?: CorePromptData["responseFormat"]; readonly parameters: Record; readonly id?: string; readonly handle?: string | null; readonly version?: number; readonly versionId?: string; readonly scope?: PromptScope; constructor(data: PromptData); private extractSystemPrompt; /** * Compile the prompt template with provided variables (lenient - missing variables become empty) * @param variables - Object containing variable values for template compilation * @returns CompiledPrompt instance with compiled content */ private _compile; compile(variables?: TemplateVariables): CompiledPrompt; /** * Compile with validation - throws error if required variables are missing * @param variables - Template variables * @returns CompiledPrompt instance with compiled content */ compileStrict(variables: TemplateVariables): CompiledPrompt; } /** * Represents a compiled prompt that extends Prompt with reference to the original template */ declare class CompiledPrompt extends Prompt { readonly original: Prompt; constructor(compiledData: PromptData, original: Prompt); } /** * Simple chat message type with just role and content */ interface SimpleChatMessage { role: string; content: unknown; } /** * Valid input/output types for span data */ declare const INPUT_OUTPUT_TYPES: readonly ["text", "raw", "chat_messages", "list", "json", "guardrail_result", "evaluation_result"]; type InputOutputType = typeof INPUT_OUTPUT_TYPES[number]; type JsonSerializable = string | number | boolean | null | JsonSerializable[] | Record; /** * Supported types of spans for LangWatch observability. These types categorize the nature of the span for downstream analysis and visualization. * * @example * import { spanTypes, SpanType } from './span'; * const myType: SpanType = 'llm'; */ declare const spanTypes: readonly ["span", "llm", "chain", "tool", "agent", "guardrail", "evaluation", "rag", "prompt", "workflow", "component", "module", "server", "client", "producer", "consumer", "task", "unknown"]; type SpanType = (typeof spanTypes)[number]; /** * Context for a RAG (Retrieval-Augmented Generation) span. * * This structure is used to record which document and chunk were retrieved and used as context for a generation. * * @property document_id - Unique identifier for the source document. * @property chunk_id - Unique identifier for the chunk within the document. * @property content - The actual content of the chunk provided to the model. * * @example * const ragContext: LangWatchSpanRAGContext = { * document_id: 'doc-123', * chunk_id: 'chunk-456', * content: 'Relevant passage from the document.' * }; */ interface LangWatchSpanRAGContext { document_id: string; chunk_id: string; content: string; } /** * Metrics for a LangWatch span. * * @property promptTokens - The number of prompt tokens used. * @property completionTokens - The number of completion tokens used. * @property cost - The cost of the span. */ interface LangWatchSpanMetrics { /** The number of prompt tokens used */ promptTokens?: number; /** The number of completion tokens used */ completionTokens?: number; /** The cost of the span */ cost?: number; } /** * Options for creating a LangWatch span. * * @param attributes - Additional attributes to add to the span. */ interface LangWatchSpanOptions extends SpanOptions { /** Additional attributes to add to the span. */ attributes?: SemConvAttributes; } /** * Extension of OpenTelemetry's Span with LangWatch-specific helpers for LLM, RAG, and GenAI tracing. * * This interface provides ergonomic methods for recording structured LLM/GenAI data, such as inputs, outputs, RAG contexts, and message events. * * All methods return `this` for chaining. * * @example * const span = createLangWatchSpan(otelSpan); * span * .setType('llm') * .setInput({ prompt: 'Hello' }) * .setOutput('Hi!') * .addGenAIUserMessageEvent({ content: 'Hello' }) * .addGenAIAssistantMessageEvent({ content: 'Hi!' }); */ interface LangWatchSpan extends Span { /** * Set multiple attributes for the span. * * @param attributes - The attributes object * @returns this */ setAttributes(attributes: SemConvAttributes): this; /** * Set a single attribute for the span. * * @param key - The attribute key * @param value - The attribute value * @returns this */ setAttribute(key: keyof SemConvAttributes, value: AttributeValue): this; /** * Set the type of the span (e.g., 'llm', 'rag', 'tool', etc). * * This is used for downstream filtering and analytics. * * @param type - The span type (see SpanType) * @returns this */ setType(type: SpanType): this; /** * Set the request model name for the span. * * This is typically the model name sent in the API request (e.g., 'gpt-4', 'claude-3'). * * @param model - The request model name * @returns this */ setRequestModel(model: string): this; /** * Set the response model name for the span. * * This is the model name returned in the API response, if different from the request. * * @param model - The response model name * @returns this */ setResponseModel(model: string): this; /** * Set multiple RAG contexts for the span. * * Use this to record all retrieved documents/chunks used as context for a generation. * * @param ragContexts - Array of RAG context objects * @returns this */ setRAGContexts(ragContexts: LangWatchSpanRAGContext[]): this; /** * Set a single RAG context for the span. * * Use this if only one context was retrieved. * * @param ragContext - The RAG context object * @returns this */ setRAGContext(ragContext: LangWatchSpanRAGContext): this; /** * Set the metrics for the span. * * @param metrics - The metrics object * @returns this */ setMetrics(metrics: LangWatchSpanMetrics): this; /** * Set the selected prompt for the span. This will attach this prompt to the trace. If * this is set on multiple spans, the last one will be used. * * @param prompt - The prompt object * @returns this */ setSelectedPrompt(prompt: Prompt): this; /** * Record the input to the span with explicit type control. * * @param type - Force as "text" type * @param input - String input value * @returns this */ setInput(type: "text", input: string): this; /** * Record the input to the span with explicit type control. * * @param type - Force as "raw" type * @param input - Any input value * @returns this */ setInput(type: "raw", input: unknown): this; /** * Record the input to the span with explicit type control. * * @param type - Force as "chat_messages" type * @param input - Chat messages array (supports both ChatMessage[] and SimpleChatMessage[]) * @returns this */ setInput(type: "chat_messages", input: ChatMessage[] | SimpleChatMessage[]): this; /** * Record the input to the span with explicit type control. * * @param type - Force as "list" type * @param input - SpanInputOutput array * @returns this */ setInput(type: "list", input: SpanInputOutput[]): this; /** * Record the input to the span with explicit type control. * * @param type - Force as "json" type * @param input - Any JSON-serializable value * @returns this */ setInput(type: "json", input: unknown): this; /** * Record the input to the span with explicit type control. * * @param type - Force as "guardrail_result" type * @param input - Guardrail result value * @returns this */ setInput(type: "guardrail_result", input: unknown): this; /** * Record the input to the span with explicit type control. * * @param type - Force as "evaluation_result" type * @param input - Evaluation result value * @returns this */ setInput(type: "evaluation_result", input: unknown): this; /** * Record the input to the span with automatic type detection. * * Automatically detects: strings → text, ChatMessage[] → chat_messages, * arrays → list, objects → json. * * @param input - The input value (auto-detected type) * @returns this */ setInput(input: unknown): this; /** * Record the output from the span with explicit type control. * * @param type - Force as "text" type * @param output - String output value * @returns this */ setOutput(type: "text", output: string): this; /** * Record the output from the span with explicit type control. * * @param type - Force as "raw" type * @param output - Any output value * @returns this */ setOutput(type: "raw", output: unknown): this; /** * Record the output from the span with explicit type control. * * @param type - Force as "chat_messages" type * @param output - Chat messages array (supports both ChatMessage[] and SimpleChatMessage[]) * @returns this */ setOutput(type: "chat_messages", output: ChatMessage[] | SimpleChatMessage[]): this; /** * Record the output from the span with explicit type control. * * @param type - Force as "list" type * @param output - SpanInputOutput array * @returns this */ setOutput(type: "list", output: SpanInputOutput[]): this; /** * Record the output from the span with explicit type control. * * @param type - Force as "json" type * @param output - Any JSON-serializable value * @returns this */ setOutput(type: "json", output: unknown): this; /** * Record the output from the span with explicit type control. * * @param type - Force as "guardrail_result" type * @param output - Guardrail result value * @returns this */ setOutput(type: "guardrail_result", output: unknown): this; /** * Record the output from the span with explicit type control. * * @param type - Force as "evaluation_result" type * @param output - Evaluation result value * @returns this */ setOutput(type: "evaluation_result", output: unknown): this; /** * Record the output from the span with automatic type detection. * * Automatically detects: strings → text, ChatMessage[] → chat_messages, * arrays → list, objects → json. * * @param output - The output value (auto-detected type) * @returns this */ setOutput(output: unknown): this; } /** * Enhanced LangWatch tracer interface that extends OpenTelemetry's Tracer. * * This tracer provides additional functionality beyond the standard OpenTelemetry tracer: * - Returns LangWatchSpan instances instead of standard OpenTelemetry Spans * - Includes a custom `withActiveSpan` method for simplified span lifecycle management * - Automatic error handling and span status management in `withActiveSpan` * - Enhanced type safety with strongly-typed callback functions * * @example Basic usage * ```typescript * const tracer = getLangWatchTracer('my-service', '1.0.0'); * * // Create and manage spans manually * const span = tracer.startSpan('operation'); * span.setAttributes({ key: 'value' }); * span.end(); * * // Use active span with automatic lifecycle management * const result = await tracer.startActiveSpan('async-operation', async (span) => { * span.setAttributes({ userId: '123' }); * return await someAsyncWork(); * }); * * // Use withActiveSpan for automatic error handling and span cleanup * const result = await tracer.withActiveSpan('safe-operation', async (span) => { * // Span is automatically ended and errors are properly recorded * return await riskyOperation(); * }); * ``` */ interface LangWatchTracer extends Tracer { /** * Starts a new LangWatchSpan without setting it as the active span. * * **Enhanced from OpenTelemetry**: Returns a LangWatchSpan instead of a standard Span, * providing additional LangWatch-specific functionality like structured input/output * recording and enhanced attribute management. * * @param name - The name of the span * @param options - Optional span configuration options * @param context - Optional context to use for extracting parent span information * @returns A new LangWatchSpan instance * * @example * ```typescript * const span = tracer.startSpan('database-query'); * span.setAttributes({ * 'db.statement': 'SELECT * FROM users', * 'db.operation': 'select' * }); * * try { * const result = await database.query('SELECT * FROM users'); * span.setStatus({ code: SpanStatusCode.OK }); * return result; * } catch (error) { * span.setStatus({ * code: SpanStatusCode.ERROR, * message: error.message * }); * span.recordException(error); * throw error; * } finally { * span.end(); * } * ``` */ startSpan(name: string, options?: LangWatchSpanOptions, context?: Context): LangWatchSpan; /** * Starts a new active LangWatchSpan and executes the provided function within its context. * * **Same as OpenTelemetry** but with LangWatchSpan: The span is automatically set as active * in the current context for the duration of the function execution. The span must be * manually ended within the callback function. * * @param name - The name of the span * @param fn - Function to execute with the active span * @returns The return value of the provided function * * @example * ```typescript * const result = tracer.startActiveSpan('user-operation', (span) => { * span.setAttributes({ userId: '123' }); * * try { * const userData = fetchUserData(); * span.setStatus({ code: SpanStatusCode.OK }); * return userData; * } catch (error) { * span.setStatus({ * code: SpanStatusCode.ERROR, * message: error.message * }); * throw error; * } finally { * span.end(); // Must manually end the span * } * }); * ``` */ startActiveSpan unknown>(name: string, fn: F): ReturnType; /** * Starts a new active LangWatchSpan with options and executes the provided function. * * @param name - The name of the span * @param options - Span configuration options * @param fn - Function to execute with the active span * @returns The return value of the provided function */ startActiveSpan unknown>(name: string, options: LangWatchSpanOptions, fn: F): ReturnType; /** * Starts a new active LangWatchSpan with options and context, then executes the function. * * @param name - The name of the span * @param options - Span configuration options * @param context - Context to use for extracting parent span information * @param fn - Function to execute with the active span * @returns The return value of the provided function */ startActiveSpan unknown>(name: string, options: LangWatchSpanOptions, context: Context, fn: F): ReturnType; /** * **LangWatch Enhancement**: Creates and manages a span with **automatic lifecycle and error handling**. * * 🚀 **Automatic span management, batteries included**: * - ✅ **Span automatically ends** when your function completes (success or failure) * - ✅ **Errors automatically handled** - exceptions are caught, recorded, and span marked as ERROR * - ✅ **No need to call `span.end()`** - completely managed for you * - ✅ **No try/catch needed** - error recording is automatic * * **Key differences from OpenTelemetry's startActiveSpan**: * - Automatically ends the span when the function completes * - Automatically sets span status to ERROR and records exceptions on thrown errors * - Handles both synchronous and asynchronous functions seamlessly * - Provides a safer, more convenient API for span management * * **Perfect for**: Operations where you want zero boilerplate span management. * Just focus on your business logic - span lifecycle is handled automatically. * * @param name - The name of the span * @param fn - Function to execute with the managed span (can be sync or async) * @returns A promise that resolves to the return value of the provided function * * @example ✅ Clean code - NO manual span management needed * ```typescript * // ✅ AUTOMATIC span ending and error handling * const result = await tracer.withActiveSpan('risky-operation', async (span) => { * span.setAttributes({ operation: 'data-processing' }); * * if (Math.random() > 0.5) { * throw new Error('Random failure'); // ✅ Automatically recorded, span marked as ERROR * } * * return 'success'; * // ✅ NO span.end() needed - automatically handled! * // ✅ NO try/catch needed - errors automatically recorded! * }); * ``` * * @example ❌ vs ✅ Compare with manual span management * ```typescript * // ❌ Manual span management (what you DON'T need to do) * const span = tracer.startSpan('operation'); * try { * span.setAttributes({ key: 'value' }); * const result = await doWork(); * span.setStatus({ code: SpanStatusCode.OK }); * return result; * } catch (error) { * span.setStatus({ code: SpanStatusCode.ERROR, message: error.message }); * span.recordException(error); * throw error; * } finally { * span.end(); // Must remember to end! * } * * // ✅ With withActiveSpan (clean and automatic) * const result = await tracer.withActiveSpan('operation', async (span) => { * span.setAttributes({ key: 'value' }); * return await doWork(); // That's it! Everything else is automatic * }); * ``` * * @example ✅ Synchronous operations (no async/await needed) * ```typescript * const result = await tracer.withActiveSpan('sync-calc', (span) => { * span.setAttributes({ calculation: 'fibonacci' }); * return fibonacci(10); // ✅ Synchronous function - span ends automatically * }); * * // ✅ Even with operations that might throw * const data = await tracer.withActiveSpan('read-config', (span) => { * span.setAttributes({ file: 'config.json' }); * return JSON.parse(fs.readFileSync('config.json', 'utf8')); // ✅ Errors auto-handled * }); * ``` */ withActiveSpan unknown>(name: string, fn: F): ReturnType; /** * Creates and manages a span with options and automatic lifecycle management. * * @param name - The name of the span * @param options - Span configuration options * @param fn - Function to execute with the managed span (can be sync or async) * @returns A promise that resolves to the return value of the provided function */ withActiveSpan unknown>(name: string, options: LangWatchSpanOptions, fn: F): ReturnType; /** * Creates and manages a span with options, context, and automatic lifecycle management. * * @param name - The name of the span * @param options - Span configuration options * @param context - Context to use for extracting parent span information * @param fn - Function to execute with the managed span (can be sync or async) * @returns A promise that resolves to the return value of the provided function */ withActiveSpan unknown>(name: string, options: LangWatchSpanOptions, context: Context, fn: F): ReturnType; } export { type ChatMessage as C, FetchPolicy as F, INPUT_OUTPUT_TYPES as I, type JsonSerializable as J, type LangWatchTracer as L, type PromptResponse as P, type SimpleChatMessage as S, type TagDefinition as T, type UpdatePromptBody as U, type LangWatchSpan as a, type InputOutputType as b, type LangWatchSpanMetrics as c, type LangWatchSpanOptions as d, type LangWatchSpanRAGContext as e, type SpanType as f, type CreatePromptBody as g, type CreatedTag as h, type PromptData as i, Prompt as j, type components as k, type operations as o, type paths as p, spanTypes as s };