All files / types template.ts

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81                                                6x                                                                                                                
/**
 * Template types for CV/rirekisho markdown generation
 */
 
import type { OutputFormat } from './config.js';
 
/**
 * Supported template languages
 */
export type TemplateLanguage = 'en' | 'ja';
 
/**
 * Template generation options
 */
export interface TemplateOptions {
  readonly language: TemplateLanguage;
  readonly format: OutputFormat;
  readonly includeComments: boolean;
  readonly outputPath: string | undefined;
}
 
/**
 * Default template options
 */
export const DEFAULT_TEMPLATE_OPTIONS: Omit<TemplateOptions, 'outputPath'> = {
  language: 'en',
  format: 'cv',
  includeComments: true,
} as const;
 
/**
 * Section template definition
 */
export interface SectionTemplate {
  readonly id: string;
  readonly title: string;
  readonly description: string;
  readonly content: string;
  readonly usage: 'cv' | 'rirekisho' | 'both' | 'cover_letter' | 'all';
}
 
/**
 * Frontmatter field template
 */
export interface FrontmatterFieldTemplate {
  readonly key: string;
  readonly example: string;
  readonly description: string;
  readonly required: boolean;
}
 
/**
 * Complete template definition for a language
 */
export interface TemplateDefinition {
  readonly language: TemplateLanguage;
  readonly frontmatterFields: readonly FrontmatterFieldTemplate[];
  readonly sections: readonly SectionTemplate[];
}
 
/**
 * Template info for listing available templates
 */
export interface TemplateInfo {
  readonly language: TemplateLanguage;
  readonly languageName: string;
  readonly formats: readonly OutputFormat[];
  readonly sectionCount: number;
  readonly frontmatterFieldCount: number;
}
 
/**
 * Section info for listing available sections
 */
export interface SectionInfo {
  readonly id: string;
  readonly title: string;
  readonly description: string;
  readonly usage: 'cv' | 'rirekisho' | 'both' | 'cover_letter' | 'all';
}