🚀 release v3.0.0

This commit is contained in:
Amruth Pillai
2022-03-06 22:48:29 +01:00
parent 00505a9e5d
commit 9c1380f401
373 changed files with 12050 additions and 15783 deletions

BIN
schema/.DS_Store vendored Normal file

Binary file not shown.

4
schema/.eslintrc.json Normal file
View File

@ -0,0 +1,4 @@
{
"extends": "../.eslintrc.json",
"ignorePatterns": ["dist"]
}

1
schema/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/dist

14
schema/package.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "@reactive-resume/schema",
"type": "commonjs",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"scripts": {
"build": "tsc",
"lint": "eslint --fix --ext .ts ./src"
},
"devDependencies": {
"eslint": "^8.10.0",
"typescript": "<4.6.0"
}
}

4
schema/src/atoms.ts Normal file
View File

@ -0,0 +1,4 @@
export type DateRange = {
start?: string;
end?: string;
};

41
schema/src/basics.ts Normal file
View File

@ -0,0 +1,41 @@
export type Location = {
address: string;
city: string;
region: string;
country: string;
postalCode: string;
};
export type Profile = {
id?: string;
network: string;
username: string;
url?: string;
};
export type PhotoShape = 'square' | 'rounded-square' | 'circle';
export type PhotoFilters = {
size: number;
shape: PhotoShape;
border: boolean;
grayscale: boolean;
};
export type Photo = {
url?: string;
visible: boolean;
filters: PhotoFilters;
};
export type Basics = {
name: string;
photo: Photo;
email: string;
phone: string;
website: string;
headline: string;
summary: string;
location: Location;
profiles: Profile[];
};

18
schema/src/fonts.ts Normal file
View File

@ -0,0 +1,18 @@
export enum FontCategory {
'display' = 'display',
'handwriting' = 'handwriting',
'monospace' = 'monospace',
'sans-serif' = 'sans-serif',
'serif' = 'serif',
}
export type Font = {
family: string;
variants: string[];
subsets: string[];
version: string;
lastModified: string;
files: Record<string, string>;
category: FontCategory;
kind: string;
};

8
schema/src/index.ts Normal file
View File

@ -0,0 +1,8 @@
export * from './atoms';
export * from './basics';
export * from './fonts';
export * from './integrations';
export * from './metadata';
export * from './resume';
export * from './section';
export * from './user';

View File

@ -0,0 +1 @@
export type Integration = 'linkedin' | 'json-resume' | 'reactive-resume';

32
schema/src/metadata.ts Normal file
View File

@ -0,0 +1,32 @@
export type CustomCSS = {
value: string;
visible: boolean;
};
export type Theme = {
text: string;
background: string;
primary: string;
};
export type TypeCategory = 'heading' | 'body';
export type TypeProperty = 'family' | 'size';
export type Typography = {
family: Record<TypeCategory, string>;
size: Record<TypeCategory, number>;
};
export type DateConfig = {
format: string;
};
export type Metadata = {
css: CustomCSS;
theme: Theme;
layout: string[][][]; // page.column.section
template: string;
typography: Typography;
date: DateConfig;
language: string;
};

19
schema/src/resume.ts Normal file
View File

@ -0,0 +1,19 @@
import { Basics } from './basics';
import { Metadata } from './metadata';
import { Section } from './section';
import { User } from './user';
export type Resume = {
id: number;
shortId: string;
name: string;
slug: string;
image: string;
user: User;
basics: Basics;
sections: Record<string, Section>;
metadata: Metadata;
public: boolean;
createdAt: Date;
updatedAt: Date;
};

139
schema/src/section.ts Normal file
View File

@ -0,0 +1,139 @@
import { DateRange } from './atoms';
import { Profile } from './basics';
export type WorkExperience = {
id?: string;
name: string;
position: string;
date?: DateRange;
url?: string;
summary?: string;
};
export type Education = {
id?: string;
institution: string;
degree: string;
area?: string;
score?: string;
date?: DateRange;
url?: string;
summary?: string;
courses?: string[];
};
export type Award = {
id?: string;
title: string;
awarder: string;
date?: string;
url?: string;
summary?: string;
};
export type Certificate = {
id?: string;
name: string;
issuer: string;
date?: string;
url?: string;
summary?: string;
};
export type Volunteer = {
id?: string;
organization: string;
position: string;
date?: DateRange;
url?: string;
summary?: string;
};
export type Publication = {
id?: string;
name: string;
publisher: string;
date?: string;
url?: string;
summary?: string;
};
export type Skill = {
id?: string;
name: string;
level: string;
levelNum: number;
keywords?: string[];
};
export type Language = {
id?: string;
name: string;
level: string;
levelNum: number;
};
export type Interest = {
id?: string;
name: string;
keywords?: string[];
};
export type Project = {
id?: string;
name: string;
description: string;
date?: DateRange;
url?: string;
summary?: string;
keywords?: string[];
};
export type Reference = {
id?: string;
name: string;
relationship: string;
phone?: string;
email?: string;
summary?: string;
};
export type Custom = {
id?: string;
title: string;
subtitle?: string;
date?: DateRange;
url?: string;
level?: string;
levelNum?: number;
summary?: string;
keywords?: string[];
};
export type ListItem =
| Award
| Certificate
| Education
| Interest
| Language
| Profile
| Project
| Publication
| Reference
| Skill
| Volunteer
| WorkExperience
| Custom;
export type SectionType = 'basic' | 'custom';
export type SectionPath = `sections.${string}`;
export type Section = {
id?: string;
name: string;
type: SectionType;
columns: number;
visible: boolean;
items: ListItem[];
};

14
schema/src/user.ts Normal file
View File

@ -0,0 +1,14 @@
import { Resume } from './resume';
export type User = {
id: number;
name: string;
username: string;
email: string;
password?: string;
provider: 'email' | 'google';
resetToken?: string;
resumes: Resume[];
createdAt: Date;
updatedAt: Date;
};

8
schema/tsconfig.json Normal file
View File

@ -0,0 +1,8 @@
{
"extends": "../tsconfig.base.json",
"include": ["src/**/*"],
"compilerOptions": {
"outDir": "dist",
"declaration": true
}
}