import * as grpc from '@grpc/grpc-js'; import { z } from 'zod'; import type { AuthParams } from '../adapter.interface.js'; export interface GrpcServiceHandler { [methodName: string]: (call: { request: Record; metadata: grpc.Metadata; getPeer: () => string; sendMetadata: () => void; end?: () => void; write?: (chunk: unknown) => boolean; destroy?: (error?: Error) => void; on?: (event: string, listener: (...args: unknown[]) => void) => unknown; emit?: (event: string, ...args: unknown[]) => boolean; }, callback?: (error: grpc.ServiceError | null, response?: Record) => void) => void; } export type GrpcResponse = Record | Record[]; export declare const GrpcOperationSchema: z.ZodObject<{ service: z.ZodEnum<["SessionService", "ContextService", "HealthService"]>; method: z.ZodString; request: z.ZodOptional; streaming: z.ZodDefault>; }, "strip", z.ZodTypeAny, { method: string; service: "SessionService" | "ContextService" | "HealthService"; streaming: boolean; request?: unknown; }, { method: string; service: "SessionService" | "ContextService" | "HealthService"; request?: unknown; streaming?: boolean | undefined; }>; export type GrpcOperation = z.infer; export declare const AuthParamsSchema: z.ZodObject<{ type: z.ZodEnum<["jwt", "apikey", "session"]>; credentials: z.ZodString; }, "strip", z.ZodTypeAny, { type: "session" | "apikey" | "jwt"; credentials: string; }, { type: "session" | "apikey" | "jwt"; credentials: string; }>; export interface MockStreamCall { request: Record; metadata: grpc.Metadata; getPeer: () => string; sendMetadata: () => void; write: (chunk: unknown) => boolean; end: () => void; destroy: (error?: Error) => void; on: () => MockStreamCall; emit: () => boolean; } export interface ErrorDetails { errorMessage: string; errorCode: string; statusCode: number; } export interface ServiceMetadata { name: string; methods: Array<{ name: string; type: 'unary' | 'server-streaming' | 'client-streaming' | 'bidirectional-streaming'; }>; } export interface GrpcCapabilities { protocol: string; version: string; features: string[]; [key: string]: unknown; } export type ValidationResult = { success: true; data: T; } | { success: false; error: string; }; export interface ExecuteRequestParams { operation: unknown; auth?: unknown; sessionId?: string; } export interface MetadataOptions { auth?: AuthParams; sessionId?: string; requestId?: string; } //# sourceMappingURL=types.d.ts.map