Skip to content

Commit 879eaf3

Browse files
authored
Merge pull request #71 from takker99:deepl
feat(api): Add types for /api/deepl/translate?text=:text
2 parents d832dea + d767c2a commit 879eaf3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

api/deepl/translate.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* The response type of /api/deepl/translate?text=:text, which is used in [Translation mode (beta)](https://scrapbox.io/help/Translation_mode_(beta)).
3+
*
4+
* This API internall calls [DeepL API Pro](https://www.deepl.com/docs-api/).
5+
*/
6+
export interface TranslationResult {
7+
/** Translated text */
8+
result: string;
9+
}

rest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export * from "./error.ts";
99
export * from "./stream-event.ts";
1010

1111
export * from "./api/commits/project/pageId.ts";
12+
export * from "./api/deepl/translate.ts";
1213
export * from "./api/deleted-pages/project/pageId.ts";
1314
export * from "./api/embed-text/twitter.ts";
1415
export * from "./api/embed-text/url.ts";

0 commit comments

Comments
 (0)