@vitaeflow/sdk-js
Version:
Official JavaScript/TypeScript SDK for VitaeFlow - Embed and extract structured resume data from PDFs
120 lines • 3.29 kB
TypeScript
/**
* TypeScript type definitions for VitaeFlow SDK
*/
export interface VitaeFlowOptions {
/** Enable compression for large JSON (default: true) */
compression?: boolean;
/** Minimum size in bytes to trigger compression (default: 1024) */
compressionThreshold?: number;
/** Enable debug logging (default: false) */
logging?: boolean;
/** Log level (default: "info") */
logLevel?: "debug" | "info" | "warn" | "error";
}
export interface EmbedOptions {
/** Force compression regardless of size */
forceCompress?: boolean;
/** Skip hash calculation */
skipHash?: boolean;
}
export interface ExtractOptions {
/** Verify data integrity with hash (default: true) */
verifyIntegrity?: boolean;
/** Validate against schema (default: true) */
validate?: boolean;
}
export interface ExtractResult {
/** Whether extraction was successful */
success: boolean;
/** Whether the PDF contains VitaeFlow data */
hasVitaeFlowData: boolean;
/** Extracted CV data */
data?: CVData;
/** Error message if extraction failed */
error?: string;
/** Metadata about the extraction */
metadata?: {
compressed?: boolean;
hash?: string;
extractedAt: string;
integrityVerified?: boolean;
};
/** Validation result if validation was performed */
validation?: ValidationResult;
}
export interface ValidationResult {
/** Whether data is valid */
valid: boolean;
/** List of validation errors */
errors: string[];
}
export interface CVData {
/** VitaeFlow schema version */
version: string;
/** Metadata about the CV document */
meta: {
/** ISO 8601 timestamp when created */
createdAt: string;
/** ISO 8601 timestamp when last updated */
updatedAt?: string;
/** Source system that generated this CV */
source?: string;
/** Language code (BCP 47) */
language?: string;
};
/** The actual resume content */
resume: {
/** Basic personal information */
basics: PersonalInfo;
/** Work experience */
experience?: Experience[];
/** Education history */
education?: Education[];
/** Skills and languages */
skills?: Skills;
};
}
export interface PersonalInfo {
firstName: string;
lastName: string;
email: string;
phone?: string;
headline?: string;
summary?: string;
location?: {
city?: string;
region?: string;
country?: string;
};
website?: string;
linkedin?: string;
github?: string;
}
export interface Experience {
position: string;
company: string;
startDate: string;
endDate?: string;
current?: boolean;
location?: string;
description?: string;
highlights?: string[];
}
export interface Education {
institution: string;
area?: string;
degree?: string;
startDate?: string;
endDate?: string;
location?: string;
}
export interface Skills {
technical?: string[];
soft?: string[];
languages?: Language[];
}
export interface Language {
name: string;
level?: "native" | "fluent" | "professional" | "conversational" | "basic";
}
//# sourceMappingURL=index.d.ts.map