Skip to content

Commit a35e9d8

Browse files
committed
🚚 Moved types about REST API responses to api/response.ts
1 parent d655b64 commit a35e9d8

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

scrapbox.ts renamed to api/response.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
import { Omit } from "./utils.ts";
2-
export * from "./userscript/blocks.ts";
3-
export * from "./userscript/nodes.ts";
4-
5-
/** scrapboxの行のメタデータ */
6-
export interface Line {
7-
/** 行のid */ id: string;
8-
/** 行のテキスト */ text: string;
9-
/** 一番最後に行を編集した人のid */ userId: string;
10-
/** 行の作成日時 */ created: number;
11-
/** 行の最終更新日時 */ updated: number;
12-
}
1+
import { Omit } from "../utils.ts";
2+
import { Line } from "../base.ts";
3+
import { NotFoundError, NotMemberError } from "./error.ts";
134

145
/** 関連ページのメタデータ */
156
export interface RelatedPage {
@@ -111,7 +102,6 @@ export interface Project {
111102
plan?: string;
112103
}
113104

114-
115105
/** the response type of https://scrpabox.io/api/projects/:projectname */
116106
export type ProjectResponse =
117107
| NotFoundError

base.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/** scrapboxの行のメタデータ */
2+
export interface Line {
3+
/** 行のid */ id: string;
4+
/** 行のテキスト */ text: string;
5+
/** 一番最後に行を編集した人のid */ userId: string;
6+
/** 行の作成日時 */ created: number;
7+
/** 行の最終更新日時 */ updated: number;
8+
}

0 commit comments

Comments
 (0)