@courseproof/types
v0.1.1
Published
[](https://opensource.org/licenses/MIT)
Maintainers
Readme
@courseproof/types
Shared TypeScript type definitions for the CourseProof certificate verification ecosystem. Defines the core interfaces, enums, and type contracts used across all packages.
Exports
Core Interfaces
| Export | Description |
|--------|-------------|
| Certificate | Verified certificate data model — title, issuer, recipient, dates, skills, metadata |
| Provider | Contract for a learning platform provider — detect(), verify(), verifyById(), extract(), scanQRCode() |
| ProviderCapabilities | Describes what operations a provider supports |
| CertificateResult | Wraps success/failure with optional certificate, error, and warnings |
| VerificationError | Error object with code, message, and optional details |
| CacheEntry / CacheBackend | Caching contract used by the cache layer |
| AIConfig / AIExtractionResult | AI provider configuration and extraction result |
Type Aliases
| Export | Values |
|--------|--------|
| InputFormat | "url" | "credential-id" | "pdf" | "image" | "qr-code" | "zip" | "html" | "json" | "csv" |
| ExportFormat | "json" | "csv" | "markdown" | "html" | "resume" | "linkedin" | "portfolio" | "open-badge" |
| VerificationErrorCode | "UNKNOWN_PLATFORM" | "NETWORK_ERROR" | "INVALID_CERTIFICATE" | etc. |
Report Interfaces
| Export | Description |
|--------|-------------|
| AnalyticsReport | Aggregated stats — counts by platform/year/skill/issuer, averages |
| ComparisonReport | Report comparing certificates — shared issuers, skills, timeline |
| CourseRecommendation | Recommended course with relevance score and matched skills |
Usage
import type { Certificate, Provider, CertificateResult } from "@courseproof/types";
function printCert(cert: Certificate) {
console.log(`${cert.title} — ${cert.issuer.name} (${cert.issueDate})`);
}Installation
npm install @courseproof/typesLicense
MIT — see LICENSE for details.
Part of the CourseProof monorepo.
