Skip to content

Commit

Permalink
Merge pull request #24 from HyunsDev:develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
HyunsDev authored Mar 7, 2024
2 parents 7995cc9 + c7040da commit c064d3c
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 48 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unibook-client",
"version": "1.0.23",
"version": "1.0.24",
"repository": "https://github.com/HyunsDev/unibook-client.git",
"author": "혀느현스 <[email protected]>",
"license": "Unlicense",
Expand Down
7 changes: 6 additions & 1 deletion src/endpoint/book/section/export/endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ export const ExportSectionPDF: Endpoint<
method: "POST",
path: (e) => `/books/${e.bookId}/sections/${e.sectionId}/export/pdf`,
pathParams: ["bookId", "sectionId"],
queryParams: ["withChildren"],
};
export type ExportSectionPDFReqPath = {
bookId: number | string;
sectionId: number | string;
};
export type ExportSectionPDFReq = ExportSectionPDFReqPath;
export type ExportSectionPDFReqQuery = {
withChildren?: "true" | "false";
};
export type ExportSectionPDFReq = ExportSectionPDFReqPath &
ExportSectionPDFReqQuery;
export type ExportSectionPDFRes = {
url: string;
};
51 changes: 27 additions & 24 deletions src/object/adminSection.object.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
import { AdminSectionPreviewObject } from "./adminSectionPreview.object";

export class AdminSectionObject {
id: number;
title: string;
bookId: number;
notionPageId: string;
recordMap?: any;
parent?: AdminSectionPreviewObject;
children?: AdminSectionPreviewObject[];
order: number;
isIntroduction: boolean;
cachedAt: string;
cachedHtmlZipFileUrl?: string;

constructor(data: {
id: number;
title: string;
bookId: number;
Expand All @@ -11,28 +24,18 @@ export class AdminSectionObject {
order: number;
isIntroduction: boolean;
cachedAt: string;

constructor(data: {
id: number;
title: string;
bookId: number;
notionPageId: string;
recordMap?: any;
parent?: AdminSectionPreviewObject;
children?: AdminSectionPreviewObject[];
order: number;
isIntroduction: boolean;
cachedAt: string;
}) {
this.id = data.id;
this.title = data.title;
this.bookId = data.bookId;
this.notionPageId = data.notionPageId;
this.recordMap = data.recordMap;
this.parent = data.parent;
this.children = data.children;
this.order = data.order;
this.isIntroduction = data.isIntroduction;
this.cachedAt = data.cachedAt;
}
cachedHtmlZipFileUrl?: string;
}) {
this.id = data.id;
this.title = data.title;
this.bookId = data.bookId;
this.notionPageId = data.notionPageId;
this.recordMap = data.recordMap;
this.parent = data.parent;
this.children = data.children;
this.order = data.order;
this.isIntroduction = data.isIntroduction;
this.cachedAt = data.cachedAt;
this.cachedHtmlZipFileUrl = data.cachedHtmlZipFileUrl;
}
}
47 changes: 25 additions & 22 deletions src/object/adminSectionPreview.object.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
export class AdminSectionPreviewObject {
id: number;
title: string;
bookId: number;
notionPageId: string;
parent?: AdminSectionPreviewObject;
children?: AdminSectionPreviewObject[];
order: number;
isIntroduction: boolean;
cachedAt: string;
cachedHtmlZipFileUrl?: string;

constructor(data: {
id: number;
title: string;
bookId: number;
Expand All @@ -8,26 +20,17 @@ export class AdminSectionPreviewObject {
order: number;
isIntroduction: boolean;
cachedAt: string;

constructor(data: {
id: number;
title: string;
bookId: number;
notionPageId: string;
parent?: AdminSectionPreviewObject;
children?: AdminSectionPreviewObject[];
order: number;
isIntroduction: boolean;
cachedAt: string;
}) {
this.id = data.id;
this.title = data.title;
this.bookId = data.bookId;
this.notionPageId = data.notionPageId;
this.parent = data.parent;
this.children = data.children;
this.order = data.order;
this.isIntroduction = data.isIntroduction;
this.cachedAt = data.cachedAt;
}
cachedHtmlZipFileUrl?: string;
}) {
this.id = data.id;
this.title = data.title;
this.bookId = data.bookId;
this.notionPageId = data.notionPageId;
this.parent = data.parent;
this.children = data.children;
this.order = data.order;
this.isIntroduction = data.isIntroduction;
this.cachedAt = data.cachedAt;
this.cachedHtmlZipFileUrl = data.cachedHtmlZipFileUrl;
}
}

0 comments on commit c064d3c

Please sign in to comment.