import { z } from 'zod'; import type { PortAttachmentGrant, PortFrameAnyVersion as PortFrame, PortFrameSchemaVersion } from './portFrameModel.ts'; export declare const PortFrameIssueCodes: readonly ["port.after-terminal", "port.attachment-expired", "port.attachment-mismatch", "port.credit-exceeded", "port.dapp-id-mismatch", "port.deadline-expired", "port.duplicate-terminal", "port.host-session-mismatch", "port.frame-version-mismatch", "port.invalid", "port.operation-not-granted", "port.principal-mismatch", "port.protocol-version-mismatch", "port.request-mismatch", "port.resume-not-supported", "port.stale-incarnation", "port.stale-plan", "port.stream-mismatch", "port.stream-not-granted", "port.stream-sequence-invalid", "port.terminal-missing"]; export declare const PortFrameIssueCodeZod: z.ZodEnum<{ "port.after-terminal": "port.after-terminal"; "port.attachment-expired": "port.attachment-expired"; "port.attachment-mismatch": "port.attachment-mismatch"; "port.credit-exceeded": "port.credit-exceeded"; "port.dapp-id-mismatch": "port.dapp-id-mismatch"; "port.deadline-expired": "port.deadline-expired"; "port.duplicate-terminal": "port.duplicate-terminal"; "port.host-session-mismatch": "port.host-session-mismatch"; "port.frame-version-mismatch": "port.frame-version-mismatch"; "port.invalid": "port.invalid"; "port.operation-not-granted": "port.operation-not-granted"; "port.principal-mismatch": "port.principal-mismatch"; "port.protocol-version-mismatch": "port.protocol-version-mismatch"; "port.request-mismatch": "port.request-mismatch"; "port.resume-not-supported": "port.resume-not-supported"; "port.stale-incarnation": "port.stale-incarnation"; "port.stale-plan": "port.stale-plan"; "port.stream-mismatch": "port.stream-mismatch"; "port.stream-not-granted": "port.stream-not-granted"; "port.stream-sequence-invalid": "port.stream-sequence-invalid"; "port.terminal-missing": "port.terminal-missing"; }>; export type PortFrameIssueCode = z.infer; export interface PortFrameIssue { code: PortFrameIssueCode; message: string; path: (number | string)[]; } export interface PortFrameValidationContext { authenticatedPrincipalId: string; frameSchemaVersion?: PortFrameSchemaVersion; grant: PortAttachmentGrant; now: number; } export interface PortFrameValidationFailure { issues: PortFrameIssue[]; success: false; } export interface PortFrameValidationSuccess { success: true; value: T; } export type PortFrameValidationResult = PortFrameValidationFailure | PortFrameValidationSuccess; export declare function validatePortFrame(value: unknown, context: PortFrameValidationContext): PortFrameValidationResult; export declare function validatePortTranscript(values: readonly unknown[], context: PortFrameValidationContext): PortFrameValidationResult; //# sourceMappingURL=portFrameValidation.d.ts.map