Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fdc-website",
"version": "1.1.1",
"version": "1.2.0",
"description": "Fast Dog Coding portfolio site — a server-driven UI showcase built with Next.js, GraphQL, and Prisma.",
"keywords": [
"fast-dog-coding",
Expand Down
62 changes: 62 additions & 0 deletions packages/resume-master/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* Generated by `npm run vendor` from src/client.ts. HTTP client only. */
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getResume = getResume;
/** Production projection service. A non-empty `baseUrl` or `RESUME_SERVICE_URL` overrides it. */
const DEFAULT_RESUME_SERVICE_URL = "https://resume-master-nu.vercel.app";
function serviceUrl(baseUrl) {
const explicit = baseUrl?.trim();
if (explicit)
return explicit;
const fromEnv = process.env.RESUME_SERVICE_URL?.trim();
if (fromEnv)
return fromEnv;
return DEFAULT_RESUME_SERVICE_URL;
}
function requestBody(options) {
const body = {};
if (options.projectIds)
body.projectIds = options.projectIds;
if (options.workIds)
body.workIds = options.workIds;
if (options.keywords)
body.keywords = options.keywords;
if (options.mode === "strict" || options.mode === "expand")
body.mode = options.mode;
if (Object.hasOwn(options, "cutOffDate"))
body.cutOffDate = options.cutOffDate ?? null;
return JSON.stringify(body);
}
/**
* Fetch one client's projection.
* Reads nothing from disk, does not take a resume document, and does not
* carry allow lists. A non-empty `baseUrl` selects the service. Otherwise a
* non-empty `RESUME_SERVICE_URL` does. Otherwise the request goes to
* https://resume-master-nu.vercel.app. Errors never include the API key.
*/
async function getResume(apiKey, options = {}, baseUrl) {
if (typeof apiKey !== "string" || apiKey.length === 0) {
throw new Error("getResume requires an apiKey");
}
const root = serviceUrl(baseUrl);
const endpoint = new URL("/v1/resume", root.endsWith("/") ? root : `${root}/`);
let response;
try {
response = await fetch(endpoint, {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
Accept: "application/json",
"Content-Type": "application/json",
},
body: requestBody(options),
});
}
catch {
throw new Error("getResume request failed");
}
if (!response.ok) {
throw new Error(`getResume failed with HTTP ${response.status}`);
}
return (await response.json());
}
249 changes: 165 additions & 84 deletions packages/resume-master/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,134 +1,215 @@
/**
* Types for the resume-master v1.3.0 projection returned by POST /v1/resume.
* exhibitSlug is not part of this surface — the service strips it.
* Generated by `npm run generate:types` from this client's policy.
* Do not edit.
*/

/** ISO-8601 calendar date (YYYY-MM-DD) or timestamp accepted as cutOffDate. */
export type IsoDate = string;

/**
* resume-master API client whose policy filtered the projection.
* The portfolio website uses the portfolio API key.
* Projection for client "portfolio" at year date precision.
*/
export type ClientId = string;

/** Slice selector sent as `mode`. Accepted values are defined by the service. */
export type SliceMode = string;

export interface GetResumeOptions {
projectIds?: string[];
workIds?: string[];
keywords?: string[];
mode?: SliceMode;
cutOffDate?: IsoDate;
export interface PortfolioResume {
basics: PortfolioBasics;
work: PortfolioWork[];
projects: PortfolioProject[];
skills?: PortfolioSkill[];
education?: PortfolioEducation[];
interests?: PortfolioInterest[];
references?: PortfolioReference[];
meta: PortfolioMeta;
}

export interface ResumeBasics {
name?: string;
export interface PortfolioBasics {
name: string;
label?: string;
image?: string;
email?: string;
phone?: string;
url?: string;
summary?: string;
location?: {
address?: string;
postalCode?: string;
city?: string;
countryCode?: string;
region?: string;
};
profiles?: Array<{
network?: string;
username?: string;
url?: string;
}>;
location?: PortfolioLocation;
profiles?: PortfolioProfile[];
/**
* Country codes where this person is authorized to work for any employer.
* Not citizenship or immigration status.
*/
workAuthorization?: string[];
}

export interface PortfolioLocation {
city?: string;
region?: string;
countryCode?: string;
}

export interface PortfolioProfile {
network: string;
username?: string;
url?: string;
}

export interface WorkEntry {
export interface PortfolioWork {
id: string;
name?: string;
name: string;
position?: string;
url?: string;
startDate?: IsoDate;
endDate?: IsoDate;
/**
* Year the projection emits (YYYY).
*/
startDate?: string;
/**
* Year the projection emits (YYYY).
*/
endDate?: string;
summary?: string;
highlights?: string[];
location?: string;
description?: string;
/**
* How this row relates to employment history.
* "employer" is an employer or the consulting practice.
* "client" is an engagement delivered through another work row.
*/
kind?: "employer" | "client";
/**
* When kind is "client", the employer or practice work.id this engagement was via.
*/
via?: string;
/**
* Stable project ids under this employment or engagement.
*/
projects?: string[];
}

export interface ProjectEntry {
export interface PortfolioProject {
id: string;
name: string;
description?: string;
highlights?: string[];
keywords?: string[];
url?: string;
roles?: string[];
entity?: string;
type?: string;
startDate?: IsoDate;
endDate?: IsoDate;
/**
* JSON Resume roles.
*/
roles?: string[];
/**
* Year the projection emits (YYYY).
*/
startDate?: string;
/**
* Year the projection emits (YYYY).
*/
endDate?: string;
/**
* When true, startDate is a best-effort estimate.
*/
startDateApproximate?: boolean;
/**
* Short project blurb (JSON Resume description).
*/
description?: string;
challenge?: string;
approach?: string;
impact?: string;
/**
* Tech stack and topic tags (JSON Resume keywords).
*/
keywords?: string[];
url?: string;
}

export interface ReferenceEntry {
export interface PortfolioSkill {
name: string;
reference: string;
title?: string;
snippets?: string[];
/** Matches `work[].id` (for example "ks2-technologies" or "redspace"). */
workId?: string;
}

export interface SkillEntry {
name?: string;
level?: string;
keywords?: string[];
}

export interface EducationEntry {
institution?: string;
url?: string;
export interface PortfolioEducation {
institution: string;
area?: string;
studyType?: string;
startDate?: IsoDate;
endDate?: IsoDate;
score?: string;
courses?: string[];
/**
* Extension. Not in the core JSON Resume schema.
*/
location?: string;
}

export interface InterestEntry {
name?: string;
export interface PortfolioInterest {
name: string;
keywords?: string[];
}

export interface ProjectionMeta {
clientId?: ClientId;
mode?: SliceMode;
cutOffDate?: IsoDate;
generatedAt?: string;
version?: string;
export interface PortfolioReference {
name: string;
reference: string;
title?: string;
relationship?: string;
/**
* Year the projection emits (YYYY).
*/
date?: string;
url?: string;
/**
* Matching work id for the organization where this reference worked with the subject.
*/
workId?: string;
/**
* Short pull-quotes.
*/
snippets?: string[];
}
/**
* Projection metadata. Always present.
*/

export interface ProjectedResume {
basics?: ResumeBasics;
work?: WorkEntry[];
education?: EducationEntry[];
skills?: SkillEntry[];
interests?: InterestEntry[];
references?: ReferenceEntry[];
projects?: ProjectEntry[];
meta?: ProjectionMeta;
export interface PortfolioMeta {
/**
* Client whose policy produced this projection.
*/
clientId: "portfolio";
/**
* Cutoff actually applied, or null when the projection has no cutoff.
*/
cutOffDate: string | null;
/**
* Always true on a projection.
*/
projected: true;
}

export const DEFAULT_RESUME_SERVICE_URL: "https://resume-master-nu.vercel.app";
/**
* Names exported by resume-master 1.3.0.
* A re-vendored app can keep importing these names.
* Each alias is this client's projection, not the master document.
*/
export type IsoDate = string;
export type ClientId = string;
export type SliceMode = "strict" | "expand";
export type WorkKind = "employer" | "client";
export type ResumeBasics = PortfolioBasics;
export type WorkEntry = PortfolioWork;
export type ProjectEntry = PortfolioProject;
export type SkillEntry = PortfolioSkill;
export type EducationEntry = PortfolioEducation;
export type InterestEntry = PortfolioInterest;
export type ReferenceEntry = PortfolioReference;
export type ProjectionMeta = PortfolioMeta;
export type ProjectedResume = PortfolioResume;

/** Body accepted by `POST /v1/resume`. `asOf` is not a field. */
export interface GetResumeOptions {
projectIds?: string[];
workIds?: string[];
keywords?: string[];
mode?: SliceMode;
/**
* Honored only when this client's policy allows an override. `null` clears it.
*/
cutOffDate?: string | null;
}

export function getResume(
/**
* Fetch one client's projection.
* Reads nothing from disk, does not take a resume document, and does not
* carry allow lists. A non-empty `baseUrl` selects the service. Otherwise a
* non-empty `RESUME_SERVICE_URL` does. Otherwise the request goes to
* https://resume-master-nu.vercel.app. Errors never include the API key.
*/
export declare function getResume(
apiKey: string,
options?: GetResumeOptions,
baseUrl?: string,
): Promise<ProjectedResume>;
): Promise<PortfolioResume>;
Loading
Loading