All files / types job.ts

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

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 691x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
export type {
  Arrangement,
  ArrangementConfidence,
  Seniority,
  SalaryPeriod,
  Salary,
  Fit,
  JobStatus,
  PageExtractPayload as PageExtract,
  JobAnalysisResponse as JobAnalysis,
  StructuredSource,
  StructuredSourceKind,
  ExtractionStrategy,
  ExtractionProvenance,
  ExtractArgs,
} from "../../shared/types/job";
export { JOB_STATUSES, ARRANGEMENTS } from "../../shared/types/job";
 
/** Discriminates a saved posting's origin. Absent/"url" for every save the extension made before this feature. */
export type PostingSource = "url" | "document" | "paste";
 
/** A persisted posting in the saved-jobs library. */
export interface SavedJob {
  schemaVersion: number;
  canonicalUrl: string;
  sourceUrl: string;
  /** Absent means "url" — every pre-005 saved job (FR-020). */
  source?: PostingSource;
  analysis: import("../../shared/types/job").JobAnalysisResponse;
  status: import("../../shared/types/job").JobStatus;
  notes: string;
  savedAt: string;
  updatedAt: string;
}
 
/** User-authored candidate profile, stored locally, sent only with analysis requests. */
export interface CandidateProfile {
  text: string;
  dealbreakers: string[];
  updatedAt: string;
}
 
export type JobErrorCode =
  | "network-error"
  | "service-error"
  | "not-configured"
  | "extract-too-large"
  | "thin-content"
  | "no-access"
  | "usage-limit-reached"
  | "unknown";
 
/** contracts/metering.md 429 `usage` echo — carried on a usage-limit-reached error. */
export interface UsageInfo {
  count: number;
  limit: number;
  resetsAt: string;
  tier: "free" | "premium";
}
 
export interface JobPanelError {
  code: JobErrorCode;
  message: string;
  action: string;
  retryable: boolean;
  /** Present only for code "usage-limit-reached" (FR-009 exhausted state). */
  usage?: UsageInfo;
}