import type { ContractRouterClient } from "@orpc/contract"; import type { OtlpLogsRequest } from "../otlp-contracts/index.js"; import type { ProjectRegion, PublicApiContract } from "../public-api/index.js"; import { type WebSocketLogEntry as TailLogEntry, WebSocketLogEntrySchema as TailLogEntrySchema, type LogFilters as TailLogFilters, LogFiltersSchema as TailLogFiltersSchema, type WebSocketLogResource as TailLogResource, WebSocketLogResourceSchema as TailLogResourceSchema } from "../tail-ws-contracts/index.js"; import { z } from "zod"; export type { TailLogEntry, TailLogFilters, TailLogResource }; export { TailLogEntrySchema, TailLogFiltersSchema, TailLogResourceSchema }; /** * Input accepted by the tail SSE helper. */ export declare const TailLogsInputSchema: z.ZodObject<{ projectId: z.ZodOptional; filters: z.ZodOptional>; services: z.ZodOptional>; environments: z.ZodOptional>; searchTerm: z.ZodOptional; traceId: z.ZodOptional; attributes: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; export type TailLogsInput = z.infer; /** * Input accepted by the OTLP log forwarding helper. */ export declare const ForwardLogsInputSchema: z.ZodObject<{ publicKey: z.ZodString; logs: z.ZodCustom; }, z.core.$strip>; export type ForwardLogsInput = z.infer; /** * Result returned by the OTLP log forwarding helper. */ export declare const ForwardLogsOutputSchema: z.ZodObject<{ forwardedCount: z.ZodNumber; failedCount: z.ZodNumber; }, z.core.$strip>; export type ForwardLogsOutput = z.infer; /** * Agent-readable examples for the SDK's OTLP intake helper. */ export declare const forwardLogsExamples: { name: string; input: { publicKey: string; logs: { resourceLogs: { resource: { attributes: { key: string; value: { stringValue: string; }; }[]; }; scopeLogs: { scope: { name: string; version: string; }; logRecords: { severityText: string; body: { stringValue: string; }; }[]; }[]; }[]; }; }; output: { forwardedCount: number; failedCount: number; }; }[]; /** * Minimal credential provider shape needed by log transports. */ export interface LogCredentialProvider { getToken(): string | Promise; getProjectId?(): string | undefined | Promise; } /** * Caller-facing params for tail transport. */ export interface TailLogsParams extends TailLogsInput { region?: ProjectRegion; signal?: AbortSignal; } /** * Caller-facing params for intake transport. */ export interface ForwardLogsParams extends ForwardLogsInput { projectId?: string; region?: ProjectRegion; sazabiInternalForwarding?: { secret: string; source?: string; }; } /** * Async iterator returned by the tail transport. */ export type TailLogStream = AsyncIterableIterator; /** * Runtime dependencies for custom log transports. */ export interface LogTransportOptions { raw: ContractRouterClient; credentialProvider: LogCredentialProvider; fetch?: typeof globalThis.fetch; /** Used to infer non-production SSE defaults when `tailBaseUrl` is omitted. */ apiBaseUrl?: string; intakeBaseUrl?: string; tailBaseUrl?: string; } /** * Creates the custom tail and intake transport surface. */ export declare const createLogTransports: (options: LogTransportOptions) => { tail: (input: TailLogsParams) => Promise; forward: (input: ForwardLogsParams) => Promise; };