/** * Strict Zod schema for the OB 3.0 OpenBadgeCredential envelope. * * Phase-2 scope: top-level envelope only. Inner classes * (`AchievementSubject`, `Achievement`, `Profile`, `Image`, * `Result`, etc.) stay `passthrough` and are filled in by Phases * 3–7. The cross-field VCDM v1/v2 date discriminator * (`issuanceDate` vs `validFrom`) lives here. * * @see `docs/plans/2026-04-18-openbadges-recognizer-and-subchecks/02-envelope-and-date-discriminator.md` */ import { z } from 'zod'; import type { RecognitionResult } from '../../types/recognition.js'; /** * The composed envelope schema. Annotated as `z.ZodTypeAny` on * the public export to break the inferred-type chain — without * this, `tsc --declaration` runs into TS7056 ("inferred type * exceeds the maximum length the compiler will serialize") * because the union/refine layers compound across every nested * class schema (Phase 7 was the straw that broke the camel's * back). Runtime behavior is unaffected; consumers narrow * `Obv3p0OpenBadgeCredential` (typed as a permissive record * below) at use, typically via `recognizedProfile`. */ export declare const Obv3p0OpenBadgeCredentialSchema: z.ZodTypeAny; /** * The normalized OB 3.0 OpenBadgeCredential shape produced by * {@link parseObv3p0OpenBadgeCredential}. * * Typed as `Record` because the strict envelope * inference is too deep to emit as a `.d.ts` (see schema export's * note on TS7056). Consumers that need deeper static typing * should narrow with `recognizedProfile === 'obv3p0.openbadge'` * and then cast to a domain-specific interface; runtime * validation has already proven the shape. */ export type Obv3p0OpenBadgeCredential = Record; /** * Parse an unknown into an `Obv3p0OpenBadgeCredential`. Returns a * {@link RecognitionResult} suitable for direct use as a * `RecognizerSpec.parse` implementation. */ export declare function parseObv3p0OpenBadgeCredential(credential: unknown): RecognitionResult; //# sourceMappingURL=openbadge-credential-v3p0.d.ts.map