import * as effect_Cause from 'effect/Cause'; import * as effect_Types from 'effect/Types'; import { ComponentNode, compileComponent } from '@okrapdf/component'; import { Effect } from 'effect'; import { l as PageLocationCitation, P as ProcessingCapabilities, b7 as UploadInput, b1 as SessionCreateOptions, a as OkraSession, b0 as SessionAttachOptions, H as CollectionSummary, s as Collection, z as CollectionQueryOptions, F as CollectionQueryStream, w as CollectionExportOptions, x as CollectionMarkdownExport, aM as OkraFiles, bk as ApiResourceCatalog, bl as ApiResource, bm as ApiAction, O as OkraClientOptions, b8 as UploadOptions, aU as ParseOptions, aT as ParseJob, aN as OkraJob, bn as CreateJobOptions, aC as JobListOptions, aD as JobListResponse, aJ as OkraFile, ao as FileListOptions, aK as OkraFileListResponse, J as DeleteFileResult, am as DocumentSpecRecord, a4 as DocumentConfigUpdate, a3 as DocumentConfigResult, ak as DocumentSpec, a_ as ReparseOptions, a$ as ReparseResult, bd as VerifyParams, be as VerifyResult, m as ApplyWorkflowOptions, n as ApplyWorkflowResult, A as ApiKeyWorkflowConfigResponse, h as DocumentAsset, D as DocumentStatus, W as WaitOptions, a8 as DocumentEventStreamOptions, a7 as DocumentEventStream, c as Page, E as EntitiesResponse, Q as QueryResult, L as LogsOptions, d as LogEntry, C as CompletionOptions, b as CompletionEvent, G as GenerateOptions, i as GenerateResult, j as StructuredSchema, ae as DocumentListItem, I as DeleteDocumentResult, aY as ReadDocumentOptions, aZ as ReadDocumentResult, e as PublishResult, f as ShareLinkOptions, g as ShareLinkResult, aA as InvoiceExtractionRunOptions, ax as InvoiceExtractionRun, az as InvoiceExtractionRunListOptions, ay as InvoiceExtractionRunList, as as InvoiceExtractionExceptionList, aw as InvoiceExtractionResolveExceptionOptions, at as InvoiceExtractionExceptionResolution } from './types-R6f5p55r.js'; type OkraContextToolName = 'resolve_source' | 'read_structure' | 'get_context' | 'ask' | 'open_source'; type OkraContextAllowanceScope = 'public_unlicensed' | 'open_license' | 'public_domain' | 'user_private' | 'owner_permissioned' | 'blocked'; type OkraContextScope = 'metadata' | 'structure' | 'bounded_context' | 'answer' | 'source_redirect' | 'full_text' | 'full_markdown'; interface OkraContextPolicy { structure: boolean; cited_snippets: boolean; qa: boolean; summaries: 'disabled' | 'bounded' | 'allowed'; full_text_export: boolean; full_markdown: boolean; read_full_section: boolean; cross_user_cache: boolean; requires_original_source: boolean; max_snippet_chars: number; max_context_tokens: number; max_adjacent_snippets: number; } interface ResolveSourceRequest { url?: string; sha256?: string; title_hint?: string; user_asserted_access?: boolean; } interface ResolveSourceResponse { object: 'pdf_source'; source_id: string; canonical_url?: string; sha256?: string; title?: string; page_count?: number; detected_license: { status: 'unknown' | 'unlicensed' | 'open_license' | 'public_domain' | 'permissioned' | 'blocked'; label: string; url?: string; confidence: number; evidence: string[]; }; allowance_scope: OkraContextAllowanceScope; allowance_policy?: OkraContextPolicy; confidence: number; warnings: string[]; is_synthetic?: boolean; } interface ReadStructureRequest { source_id: string; max_depth?: number; include_artifacts?: boolean; } interface ContextStructureNode { id: string; title: string; level: number; kind?: 'front_matter' | 'toc' | 'section' | 'subsection' | 'appendix' | 'table' | 'figure' | 'form' | 'references' | 'metadata'; page_start: number; page_end?: number; parent_id?: string; path?: string[]; token_estimate: number; content_kinds?: Array<'text' | 'table' | 'figure' | 'form' | 'appendix' | 'references' | 'metadata'>; confidence?: number; summary_preview?: string; } interface ContextStructureArtifact { id: string; title_hint?: string; page: number; section_id?: string; columns: string[]; row_count_hint?: number; confidence?: number; } interface ReadStructureResponse { object: 'pdf_structure'; source_id: string; title?: string; canonical_url?: string; page_count?: number; pages_parsed?: number; coverage?: 'unknown' | 'empty' | 'partial' | 'complete'; page_coverage?: 'unknown' | 'empty' | 'partial' | 'complete'; page_coverage_percent?: number; allowance_scope: OkraContextAllowanceScope; policy?: OkraContextPolicy; outline: ContextStructureNode[]; tables: ContextStructureArtifact[]; figures: ContextStructureArtifact[]; generated_at?: string; } interface GetContextRequest { source_id: string; query: string; section_ids?: string[]; context_scope?: OkraContextScope; max_tokens?: number; } /** * Context (ask/get/resolve) citations are the same Anthropic page_location * contract as extract/collections — one citation type across the SDK (M-CITE). * Kept as a named alias so existing `ContextCitation` imports still resolve. */ type ContextCitation = PageLocationCitation; interface ContextBlock { block_id: string; kind: 'snippet' | 'table_summary' | 'figure_summary' | 'metadata' | 'section_summary' | 'navigation'; section_id?: string; page?: number; page_start?: number; page_end?: number; title?: string; text: string; token_estimate: number; citations: ContextCitation[]; confidence?: number; } interface GetContextResponse { object: 'pdf_context'; source_id: string; query: string; context_scope: OkraContextScope; context_blocks: ContextBlock[]; citations: ContextCitation[]; omitted_reason?: 'scope_limit' | 'copyright_guardrail' | 'token_budget' | 'not_found' | 'original_source_required'; policy?: OkraContextPolicy; } interface AskContextRequest { source_id: string; question: string; section_ids?: string[]; max_answer_tokens?: number; } interface AskContextResponse { object: 'pdf_answer'; source_id: string; question: string; answer: string; citations: ContextCitation[]; confidence: number; follow_up_sections: string[]; policy?: OkraContextPolicy; } interface OpenSourceRequest { source_id: string; page?: number; section_id?: string; } interface OpenSourceResponse { object: 'original_source_link'; source_id: string; url: string; page?: number; section_id?: string; } interface OkraContextClient { resolveSource(request: ResolveSourceRequest, signal?: AbortSignal): Promise; readStructure(request: ReadStructureRequest, signal?: AbortSignal): Promise; getContext(request: GetContextRequest, signal?: AbortSignal): Promise; ask(request: AskContextRequest, signal?: AbortSignal): Promise; openSource(request: OpenSourceRequest, signal?: AbortSignal): Promise; } type OkraContextOperation = 'resolveSource' | 'readStructure' | 'getContext' | 'ask' | 'openSource'; type OkraContextFailureReason = 'request' | 'transport' | 'read_body' | 'decode' | 'response' | 'offline_fixture'; declare const OkraContextError_base: new = {}>(args: effect_Types.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => effect_Cause.YieldableError & { readonly _tag: "OkraContextError"; } & Readonly; /** Safe native failure: request/response payloads and credentials are never fields. */ declare class OkraContextError extends OkraContextError_base<{ readonly operation: OkraContextOperation; readonly reason: OkraContextFailureReason; readonly message: string; readonly status?: number; }> { } interface OkraContextEffectClient { resolveSource(request: ResolveSourceRequest, signal?: AbortSignal): Effect.Effect; readStructure(request: ReadStructureRequest, signal?: AbortSignal): Effect.Effect; getContext(request: GetContextRequest, signal?: AbortSignal): Effect.Effect; ask(request: AskContextRequest, signal?: AbortSignal): Effect.Effect; openSource(request: OpenSourceRequest, signal?: AbortSignal): Effect.Effect; } interface OfflineContextExample { id: string; sample_id: string; title: string; user_query: string; user_visible_result: string; tool_name: OkraContextToolName; request: ResolveSourceRequest | ReadStructureRequest | GetContextRequest | AskContextRequest | OpenSourceRequest; response: ResolveSourceResponse | ReadStructureResponse | GetContextResponse | AskContextResponse | OpenSourceResponse; } interface ContextTraceComparison { id: string; sample_id: string; title: string; task: string; baseline: { strategy: 'without_okra'; summary: string; token_estimate: number; pages_touched: number[]; result_confidence: number; risk_notes: string[]; }; okra: { strategy: 'with_okra'; summary: string; token_estimate: number; pages_touched: number[]; result_confidence: number; risk_notes: string[]; }; outcome: { target_table_id?: string; target_page?: number; saved_tokens_estimate: number; token_reduction_percent: number; pages_avoided: number; result: string; }; } interface ContextAgentSimulation { id: string; sample_id: string; title: string; agent_user: { kind: 'claude' | 'codex' | 'other_agent'; name: string; prompt: string; }; mocked_tool_exchanges: OfflineContextExample[]; final_handoff: { parser_task: string; target_table_id?: string; target_page?: number; expected_title?: string; expected_columns: string[]; validation_checks: string[]; }; } interface OfflineContextFixture { id: string; title: string; description: string; source: ResolveSourceResponse; structure: ReadStructureResponse; contextResponses: GetContextResponse[]; answers: AskContextResponse[]; examples: OfflineContextExample[]; traces: ContextTraceComparison[]; simulations: ContextAgentSimulation[]; } declare const offlineContextFixtures: OfflineContextFixture[]; declare function listOfflineContextFixtures(): Array>; declare function getOfflineContextFixture(id?: string): OfflineContextFixture; /** Original compatibility cause without exposing it on the safe tagged failure. */ declare function okraContextErrorCause(error: OkraContextError): unknown; declare function restoreOkraContextError(effect: Effect.Effect): Effect.Effect; declare function runOkraContextEffect(effect: Effect.Effect): Promise; declare function contextEffectClientToPromise(client: OkraContextEffectClient): OkraContextClient; declare function createOfflineContextEffectClient(fixtureId?: string): OkraContextEffectClient; declare function createOfflineContextClient(fixtureId?: string): OkraContextClient; interface HttpContextClientOptions { baseUrl?: string; apiKey?: string; sharedSecret?: string; fetch?: typeof globalThis.fetch; } declare function createHttpContextEffectClient(options?: HttpContextClientOptions): OkraContextEffectClient; declare function createHttpContextClient(options?: HttpContextClientOptions): OkraContextClient; type WorkflowPresetName = 'default' | 'llamaparse_ocr' | 'parse_proxy_ocr' | 'docling_ocr'; declare const DEFAULT_WORKFLOW_CAPABILITIES: ProcessingCapabilities; declare const WORKFLOW_PRESETS: Record; type DynamicWorkflowStepKind = 'ocr' | 'gate' | 'code' | 'vlm'; type DynamicWorkflowOutputKind = 'text' | 'markdown' | 'layout' | 'bbox' | 'tables' | 'figures' | 'json'; type DynamicWorkflowDatasetProvider = 'huggingface' | 'okra' | 'local' | 'url'; interface DynamicWorkflowDatasetRef { provider: DynamicWorkflowDatasetProvider; id: string; split?: string; revision?: string; documentColumn?: string; expectedColumn?: string; metadataColumns?: string[]; sourceUrl?: string; license?: string; } interface DynamicWorkflowStepBase { id: string; kind: DynamicWorkflowStepKind; label?: string; needs?: string[]; metadata?: Record; } interface DynamicWorkflowOcrStep extends DynamicWorkflowStepBase { kind: 'ocr'; provider: string; tier?: 'fast' | 'standard' | 'premium'; pages?: string; outputs?: DynamicWorkflowOutputKind[]; vendorOptions?: Record; } type DynamicWorkflowGateCondition = { type: 'min_confidence'; stepId: string; min: number; path?: string; } | { type: 'json_path_exists'; stepId: string; path: string; } | { type: 'numeric_tolerance'; stepId: string; expected: string | number; tolerance: number; path?: string; } | { type: 'expression'; expression: string; }; interface DynamicWorkflowGateStep extends DynamicWorkflowStepBase { kind: 'gate'; condition: DynamicWorkflowGateCondition; onFail?: 'continue' | 'skip_item' | 'escalate' | 'fail_run'; } interface DynamicWorkflowCodeStep extends DynamicWorkflowStepBase { kind: 'code'; runtime: 'javascript' | 'python'; code: string; input?: Record; timeoutMs?: number; } interface DynamicWorkflowVlmStep extends DynamicWorkflowStepBase { kind: 'vlm'; model: string; prompt: string; scope?: 'document' | 'page' | 'region' | 'table' | 'figure'; schema?: Record; temperature?: number; maxOutputTokens?: number; vendorOptions?: Record; } type DynamicWorkflowStep = DynamicWorkflowOcrStep | DynamicWorkflowGateStep | DynamicWorkflowCodeStep | DynamicWorkflowVlmStep; type DynamicWorkflowEvalMetric = { id: string; kind: 'exact_numeric'; targetStepId: string; outputPath: string; expectedPath: string; } | { id: string; kind: 'numeric_tolerance'; targetStepId: string; outputPath: string; expectedPath: string; tolerance: number; } | { id: string; kind: 'json_schema'; targetStepId: string; schema: Record; } | { id: string; kind: 'custom_code'; targetStepId: string; runtime: 'javascript' | 'python'; code: string; } | { id: string; kind: 'string_check'; targetStepId: string; outputPath: string; expectedPath: string; operation: 'eq'; } | { id: string; kind: 'text_similarity'; targetStepId: string; outputPath: string; expectedPath: string; evaluationMetric: 'bleu' | 'fuzzy_match'; passThreshold: number; } | { id: string; kind: 'score_model'; targetStepId: string; outputPath: string; expectedPath: string; instruction: string; range: readonly [number, number]; passThreshold: number; model?: string; }; interface DynamicWorkflowEvalConfig { dataset: DynamicWorkflowDatasetRef; metrics: DynamicWorkflowEvalMetric[]; primaryMetricId?: string; maxItems?: number; } interface DynamicWorkflowDefinition { object?: 'okra.dynamic_workflow'; version?: '2026-06-08'; id: string; name: string; description?: string; inputs?: Record; steps: DynamicWorkflowStep[]; eval?: DynamicWorkflowEvalConfig; metadata?: Record; } interface DynamicWorkflowValidationResult { ok: boolean; errors: string[]; warnings: string[]; stepKinds: Record; } interface DynamicWorkflowRunOptions { dataset?: DynamicWorkflowDatasetRef; inputs?: Record; metadata?: Record; dryRun?: boolean; signal?: AbortSignal; } interface DynamicWorkflowRun { id: string; object: 'workflow_eval_run' | 'workflow_run' | 'workflow_plan'; status: 'planned' | 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled'; workflowId: string; dataset?: DynamicWorkflowDatasetRef; evalRunId?: string; summary?: Record; eventsUrl?: string; resultsUrl?: string; createdAt?: string; updatedAt?: string; } interface DynamicWorkflowRunListOptions { workflowId?: string; datasetId?: string; status?: DynamicWorkflowRun['status']; limit?: number; cursor?: string; signal?: AbortSignal; } interface DynamicWorkflowRunList { object: 'list'; data: DynamicWorkflowRun[]; hasMore: boolean; nextCursor: string | null; } interface DynamicWorkflowExample { id: string; title: string; paperIds: string[]; definition: DynamicWorkflowDefinition; } interface DynamicWorkflowStepPrimitive { kind: DynamicWorkflowStepKind; purpose: string; required: string[]; optional: string[]; emits: string[]; example: DynamicWorkflowStep; notes: string[]; } interface DynamicWorkflowBuildStepsGuide { object: 'dynamic_workflow_steps_guide'; version: '2026-06-08'; execution_model: { unit: 'versioned_workflow_definition'; step_order: string; hosted_runtime: string; versioning: string; }; primitives: DynamicWorkflowStepPrimitive[]; usage: string[]; example_workflow: DynamicWorkflowDefinition; } interface DynamicWorkflowBuildResult { object: 'dynamic_workflow_build'; version: '2026-06-08'; workflow_id: string; name: string; source_path?: string; validation: DynamicWorkflowValidationResult; execution_model: DynamicWorkflowBuildStepsGuide['execution_model']; step_graph: Array<{ id: string; kind: DynamicWorkflowStepKind; label?: string; needs: string[]; }>; capabilities: ProcessingCapabilities | null; agent_workflow_source: string | null; } type DynamicWorkflowOperation = 'define' | 'capabilities' | 'compile' | 'build'; type DynamicWorkflowFailureReason = 'validation' | 'compilation'; declare const DynamicWorkflowError_base: new = {}>(args: effect_Types.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => effect_Cause.YieldableError & { readonly _tag: "DynamicWorkflowError"; } & Readonly; /** Safe native failure: the submitted definition and arbitrary metadata are not retained. */ declare class DynamicWorkflowError extends DynamicWorkflowError_base<{ readonly operation: DynamicWorkflowOperation; readonly reason: DynamicWorkflowFailureReason; readonly message: string; readonly issues: readonly string[]; }> { } interface PreparedDynamicWorkflow { definition: DynamicWorkflowDefinition; capabilities: ProcessingCapabilities; agentWorkflowSource: string; } /** Original compatibility cause without exposing the submitted workflow on the tagged failure. */ declare function dynamicWorkflowErrorCause(error: DynamicWorkflowError): unknown; declare function restoreDynamicWorkflowError(program: Effect.Effect): Effect.Effect; /** * Validate the contract shape locally. Execution still belongs to the hosted * dynamic workflow runtime and its permissioned arsenal. */ declare function validateDynamicWorkflow(definition: DynamicWorkflowDefinition): DynamicWorkflowValidationResult; declare function defineDynamicWorkflowEffect(definition: DynamicWorkflowDefinition): Effect.Effect; /** Synchronous compatibility adapter for the original SDK surface. */ declare function defineDynamicWorkflow(definition: DynamicWorkflowDefinition): DynamicWorkflowDefinition; declare function dynamicWorkflowToCapabilitiesEffect(definition: DynamicWorkflowDefinition): Effect.Effect; /** Synchronous compatibility adapter for the original SDK surface. */ declare function dynamicWorkflowToCapabilities(definition: DynamicWorkflowDefinition): ProcessingCapabilities; declare function prepareDynamicWorkflowEffect(definition: DynamicWorkflowDefinition): Effect.Effect; declare function dynamicWorkflowToAgentWorkflowSourceEffect(definition: DynamicWorkflowDefinition): Effect.Effect; /** Synchronous compatibility adapter for the original SDK surface. */ declare function dynamicWorkflowToAgentWorkflowSource(definition: DynamicWorkflowDefinition): string; declare function buildDynamicWorkflowDefinitionEffect(definition: DynamicWorkflowDefinition, options?: { sourcePath?: string; }): Effect.Effect; /** Synchronous compatibility adapter for the original SDK surface. */ declare function buildDynamicWorkflowDefinition(definition: DynamicWorkflowDefinition, options?: { sourcePath?: string; }): DynamicWorkflowBuildResult; declare const DYNAMIC_WORKFLOW_EXAMPLES: Record; declare function listDynamicWorkflowExamples(): DynamicWorkflowExample[]; declare function getDynamicWorkflowExample(id: string): DynamicWorkflowExample | undefined; /** * Returns immutable capabilities for a named workflow preset. * Optional overrides are deep-merged on top for per-app tuning. */ declare function workflowPreset(name: WorkflowPresetName, overrides?: ProcessingCapabilities): ProcessingCapabilities; declare const ClientHttpError_base: new = {}>(args: effect_Types.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => effect_Cause.YieldableError & { readonly _tag: "ClientHttpError"; } & Readonly; declare class ClientHttpError extends ClientHttpError_base<{ readonly method: string; readonly status?: number; }> { constructor(input: { method: string; status?: number; cause: unknown; }); get cause(): unknown; } declare class OkraClient { private readonly baseUrl; private readonly apiKey?; private readonly sharedSecret?; private readonly fetchImpl; private documentStatusRoute; readonly sessions: { create: (sourceOrDocId: UploadInput, options?: SessionCreateOptions) => Promise; from: (documentId: string, options?: SessionAttachOptions) => OkraSession; }; readonly collections: { list: (signal?: AbortSignal) => Promise; get: (collectionId: string, signal?: AbortSignal) => Promise; query: (collectionId: string, prompt: string, options?: CollectionQueryOptions) => CollectionQueryStream; exportMarkdown: (collectionId: string, options?: AbortSignal | CollectionExportOptions) => Promise; }; readonly files: OkraFiles; readonly resources: { list: (signal?: AbortSignal) => Promise; get: (name: string, signal?: AbortSignal) => Promise; }; readonly context: OkraContextClient; readonly contextEffect: OkraContextEffectClient; readonly workflows: { run: (definition: DynamicWorkflowDefinition, options?: DynamicWorkflowRunOptions) => Promise; getRun: (runId: string, signal?: AbortSignal) => Promise; listRuns: (options?: DynamicWorkflowRunListOptions) => Promise; }; readonly components: { compile: (component: ComponentNode) => ReturnType; run: (component: ComponentNode, options?: DynamicWorkflowRunOptions) => Promise; }; constructor(options: OkraClientOptions); createSessionEffect: (this: OkraClient, sourceOrDocId: UploadInput, options: SessionCreateOptions) => Effect.Effect; listResources(signal?: AbortSignal): Promise; getResource(name: string, signal?: AbortSignal): Promise; private collectionList; private collectionGet; private collectionQuery; private collectionExportPath; private collectionExportMarkdown; upload(input: UploadInput, options?: UploadOptions): Promise; private uploadEffect; private uploadSourceEffect; private fileUpload; private fileUploadEffect; private chooseFileTransport; private fileUploadMultipartEffect; private fileUploadDirectEffect; parse(opts: ParseOptions): Promise; private parseEffect; getJob(jobId: string, signal?: AbortSignal): Promise; /** Native job lookup. Interruption joins response cleanup before the operation ends. */ getJobEffect: (this: OkraClient, jobId: string, signal?: AbortSignal | undefined) => Effect.Effect, ClientHttpError, never>; createJob(options: CreateJobOptions): Promise; listJobs(options?: JobListOptions): Promise; /** Native listing for callers which compose lookup and polling in one lifetime. */ listJobsEffect: (this: OkraClient, options?: JobListOptions | undefined) => Effect.Effect; getFile(fileId: string, signal?: AbortSignal): Promise; listFiles(options?: FileListOptions): Promise; deleteFile(fileId: string, signal?: AbortSignal): Promise; fileDownloadUrl(fileId: string): string; getConfig(documentId: string, signal?: AbortSignal): Promise; getConfigEffect: (this: OkraClient, documentId: string, signal?: AbortSignal | undefined) => Effect.Effect; updateConfig(documentId: string, update: DocumentConfigUpdate, signal?: AbortSignal): Promise; updateConfigEffect: (this: OkraClient, documentId: string, update: DocumentSpec, signal?: AbortSignal | undefined) => Effect.Effect; reparse(documentId: string, options?: ReparseOptions): Promise; private reparseEffect; verify(documentId: string, params: VerifyParams): Promise; applyWorkflow(documentId: string, options: ApplyWorkflowOptions): Promise; private applyWorkflowEffect; getKeyWorkflow(signal?: AbortSignal): Promise; setKeyWorkflow(defaultCapabilities: ApiKeyWorkflowConfigResponse['default_capabilities'], signal?: AbortSignal): Promise; runDynamicWorkflow(definition: DynamicWorkflowDefinition, options?: DynamicWorkflowRunOptions): Promise; private runDynamicWorkflowEffect; getDynamicWorkflowRun(runId: string, signal?: AbortSignal): Promise; listDynamicWorkflowRuns(options?: DynamicWorkflowRunListOptions): Promise; assets(documentId: string, signal?: AbortSignal): Promise; assetsEffect(documentId: string, signal?: AbortSignal): Effect.Effect>[], ClientHttpError, never>; asset>(documentId: string, assetId: string, signal?: AbortSignal): Promise | null>; assetEffect(documentId: string, assetId: string, signal?: AbortSignal): Effect.Effect | null, ClientHttpError, never>; status(documentId: string, signal?: AbortSignal): Promise; statusEffect: (this: OkraClient, documentId: string, signal?: AbortSignal | undefined) => Effect.Effect; wait(documentId: string, options?: WaitOptions): Promise; private waitEffect; private waitPollEffect; private waitRealtimeEffect; /** Build a WebSocket URL for the document event protocol. */ private buildWsUrl; /** Open a real-time event stream for a document. */ events(documentId: string, options?: DocumentEventStreamOptions): DocumentEventStream; pages(documentId: string, options?: { range?: string; signal?: AbortSignal; }): Promise; pagesEffect: (this: OkraClient, documentId: string, options?: { range?: string; signal?: AbortSignal; } | undefined) => Effect.Effect; page(documentId: string, pageNumber: number, signal?: AbortSignal): Promise; pageEffect: (this: OkraClient, documentId: string, pageNumber: number, signal?: AbortSignal | undefined) => Effect.Effect; downloadUrl(documentId: string): string; entities(documentId: string, options?: { type?: string; limit?: number; offset?: number; signal?: AbortSignal; }): Promise; query(documentId: string, sql: string, signal?: AbortSignal): Promise; logs(documentId: string, options?: LogsOptions): Promise; stream(documentId: string, query: string, options?: CompletionOptions): AsyncGenerator; /** Native completion producer; the public iterator supplies its bounded queue as the consumer. */ streamEffect(documentId: string, query: string, options: CompletionOptions | undefined, emit: (event: CompletionEvent) => Effect.Effect): Effect.Effect; generate(documentId: string, query: string, options?: GenerateOptions & { schema?: undefined; }): Promise; generate(documentId: string, query: string, options: GenerateOptions & { schema: StructuredSchema; }): Promise>; generateEffect(documentId: string, query: string, options?: GenerateOptions): Effect.Effect, ClientHttpError>; private generateStructuredEffect; listDocuments(signal?: AbortSignal): Promise; deleteDocument(documentId: string, signal?: AbortSignal): Promise; read(documentId: string, options?: ReadDocumentOptions): Promise; modelEndpoint(documentId: string): string; publish(documentId: string, signal?: AbortSignal): Promise; shareLink(documentId: string, options?: ShareLinkOptions): Promise; runInvoiceExtraction(options: InvoiceExtractionRunOptions): Promise; listInvoiceExtractionRuns(options?: InvoiceExtractionRunListOptions): Promise; getInvoiceExtractionRun(runId: string, signal?: AbortSignal): Promise; retryInvoiceExtractionRun(runId: string, signal?: AbortSignal): Promise; listInvoiceExtractionExceptions(runId: string, signal?: AbortSignal): Promise; resolveInvoiceExtractionException(runId: string, exceptionId: string, options: InvoiceExtractionResolveExceptionOptions): Promise; request(path: string, init?: RequestInit): Promise; /** Compose an authenticated JSON request without starting another Promise runtime. */ requestEffect(path: string, init?: RequestInit): Effect.Effect; get url(): string; private authHeaders; private rawRequest; private fetchAbsolutePromise; private requestJson; private runHttpEffect; private withResponseEffect; private requestJsonEffect; private projectJsonResponse; private parseBody; private resolveBinaryUploadEffect; } export { type ReadStructureResponse as $, type AskContextRequest as A, type DynamicWorkflowStepBase as B, type ContextAgentSimulation as C, DEFAULT_WORKFLOW_CAPABILITIES as D, type DynamicWorkflowStepKind as E, type DynamicWorkflowValidationResult as F, type DynamicWorkflowVlmStep as G, type GetContextRequest as H, type GetContextResponse as I, type HttpContextClientOptions as J, type OfflineContextExample as K, type OfflineContextFixture as L, type OkraContextAllowanceScope as M, type OkraContextClient as N, OkraClient as O, type OkraContextEffectClient as P, OkraContextError as Q, type OkraContextFailureReason as R, type OkraContextOperation as S, type OkraContextPolicy as T, type OkraContextScope as U, type OkraContextToolName as V, type WorkflowPresetName as W, type OpenSourceRequest as X, type OpenSourceResponse as Y, type PreparedDynamicWorkflow as Z, type ReadStructureRequest as _, type AskContextResponse as a, type ResolveSourceRequest as a0, type ResolveSourceResponse as a1, WORKFLOW_PRESETS as a2, buildDynamicWorkflowDefinition as a3, buildDynamicWorkflowDefinitionEffect as a4, contextEffectClientToPromise as a5, createHttpContextClient as a6, createHttpContextEffectClient as a7, createOfflineContextClient as a8, createOfflineContextEffectClient as a9, defineDynamicWorkflow as aa, defineDynamicWorkflowEffect as ab, dynamicWorkflowErrorCause as ac, dynamicWorkflowToAgentWorkflowSource as ad, dynamicWorkflowToAgentWorkflowSourceEffect as ae, dynamicWorkflowToCapabilities as af, dynamicWorkflowToCapabilitiesEffect as ag, getDynamicWorkflowExample as ah, getOfflineContextFixture as ai, listDynamicWorkflowExamples as aj, listOfflineContextFixtures as ak, offlineContextFixtures as al, okraContextErrorCause as am, prepareDynamicWorkflowEffect as an, restoreDynamicWorkflowError as ao, restoreOkraContextError as ap, runOkraContextEffect as aq, validateDynamicWorkflow as ar, workflowPreset as as, type ContextBlock as b, type ContextCitation as c, type ContextStructureArtifact as d, type ContextStructureNode as e, type ContextTraceComparison as f, DYNAMIC_WORKFLOW_EXAMPLES as g, type DynamicWorkflowCodeStep as h, type DynamicWorkflowDatasetProvider as i, type DynamicWorkflowDatasetRef as j, type DynamicWorkflowDefinition as k, DynamicWorkflowError as l, type DynamicWorkflowEvalConfig as m, type DynamicWorkflowEvalMetric as n, type DynamicWorkflowExample as o, type DynamicWorkflowFailureReason as p, type DynamicWorkflowGateCondition as q, type DynamicWorkflowGateStep as r, type DynamicWorkflowOcrStep as s, type DynamicWorkflowOperation as t, type DynamicWorkflowOutputKind as u, type DynamicWorkflowRun as v, type DynamicWorkflowRunList as w, type DynamicWorkflowRunListOptions as x, type DynamicWorkflowRunOptions as y, type DynamicWorkflowStep as z };