Skip to content

Commit

Permalink
Merge pull request #59 from DSM-Repo/refactor
Browse files Browse the repository at this point in the history
`try fixing
  • Loading branch information
six-standard authored Sep 9, 2024
2 parents 9b6fa8a + d9a0699 commit a83afab
Show file tree
Hide file tree
Showing 78 changed files with 1,416 additions and 1,347 deletions.
1,957 changes: 959 additions & 998 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ms-npm-2.1.2-ec0c1512ff-a437714e2f.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9 changes: 8 additions & 1 deletion configs/types-config/package.json
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
{}
{
"name": "@configs/type",
"packageManager": "[email protected]",
"main": "./src",
"dependencies": {
"typescript": "5.4.5"
}
}
118 changes: 116 additions & 2 deletions configs/types-config/src/Api.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,117 @@
export = ApiCommon;
import { Document } from "./Document";

declare namespace ApiCommon {}
type CommonLayout<T> = {
data: T;
number_of_data: number;
};

declare namespace Auth {
interface LoginInput {
account_id: string;
password: string;
}

interface LoginOutput {
access_token: string;
refresh_token: string;
access_expired_at: number;
refresh_expired_at: number;
}
}

export declare namespace Resume {
type recentlySharedData = {
id: string;
year: number;
grade: number;
generation: number;
};

type resumeStudentData = {
resume_id: string;
student_info: {
name: string;
school_number: string;
};
status: Document.statusType;
feedback_list: Feedback.feedbackData[];
};

export interface Resume {
introduce: {
heading: string;
introduce: string;
};
recently_shared: recentlySharedData[];
}

type ResumeStudent = CommonLayout<resumeStudentData>;
interface ResumeStudentDetail extends Document.resume {}
interface ResumeDetail extends Document.resume {}
interface ResumeCompletion {
writer_info: boolean;
introduce: boolean;
certificate_and_award: boolean;
activity: boolean;
project: boolean;
percent_complete: number;
}
}

export declare namespace Major {
type majorData = {
id: string;
};

type Major = CommonLayout<majorData[]>;

interface MajorAdd {
majors: string[];
}
}

export declare namespace Library {
type accessType = "PUBLIC" | "PRIVATE";

type libraryListData = {
id: string;
access_right: accessType;
year: number;
grade: number;
generation: number;
};

type indexData = {
name: string;
major: string;
student_number: number;
page_number: number;
};

type Library = CommonLayout<libraryListData[]>;
interface LibraryAdd {
pdf: string;
index: {};
}
interface LibraryDetail {
id: string;
access_right: accessType;
year: number;
grade: number;
generation: number;
resume_url: string;
index: indexData[];
}
}

export declare namespace Feedback {
type statusType = "PENDING" | "CONFIRMED";

type feedbackData = {
id: string;
comment: string;
type: string;
status: statusType;
rejected: true;
};
}
38 changes: 21 additions & 17 deletions configs/types-config/src/Document.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
export = Document;

type statusType = "ONGOING" | "SUBMITTED" | "RELEASED";
type achieveType = "AWARD" | "CERTIFICATE";
type projectType = "PERSONAL" | "TEAM";

type imageType = {
image_path: string;
original_name: string;
Expand All @@ -21,8 +15,18 @@ type classType = {
school_number?: string;
};

declare namespace Document {
export interface resume {
export declare namespace Document {
type sectionType =
| "WRITER_INFO"
| "INTRODUCE"
| "PROJECT"
| "CERTIFICATE"
| "ACHIEVEMENT";
type statusType = "ONGOING" | "SUBMITTED" | "RELEASED";
type achieveType = "AWARD" | "CERTIFICATE";
type projectType = "PERSONAL" | "TEAM";

interface resume {
id: string;
status: statusType;
writer: writer;
Expand All @@ -32,14 +36,14 @@ declare namespace Document {
project_list: project_list[];
}

export type student = {
type student = {
name: string;
class_info: classType;
profile_image: string;
major_name: string;
};

export type writer = {
type writer = {
name: string;
class_info: classType;
email: string;
Expand All @@ -49,44 +53,44 @@ declare namespace Document {
skill_set: string[];
};

export type introduce = {
type introduce = {
heading: string;
introduce: string;
};

export type achievement_list = {
type achievement_list = {
element_id: string;
name: string;
institution: string;
date: string;
type: achieveType;
};

export type activity_list = {
type activity_list = {
element_id: string;
name: string;
date: dateType;
description: string;
is_period: boolean;
};

export type project_list = {
type project_list = {
element_id: string;
name: string;
logo?: imageType;
type: projectType;
date?: dateType;
skill_set: string[];
sections: sectionType[];
sections: sectionData[];
url: string;
};

export type major = {
type majorData = {
id: string;
name: string;
};

export type sectionType = {
type sectionData = {
element_id: string;
title: string;
description: string;
Expand Down
2 changes: 2 additions & 0 deletions configs/types-config/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * as Api from "./Api";
export { Document } from "./Document";
Loading

0 comments on commit a83afab

Please sign in to comment.