@fecommunity/reactpress-toolkit 1.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -27
- package/dist/config/env.d.ts +1 -0
- package/dist/config/env.js +89 -0
- package/dist/config/global.d.ts +34 -0
- package/dist/config/global.js +390 -0
- package/dist/config/i18n.d.ts +4 -0
- package/dist/config/i18n.js +43 -0
- package/dist/config/index.d.ts +15 -0
- package/dist/config/index.js +25 -0
- package/dist/index.d.ts +11 -5
- package/dist/index.js +17 -20
- package/dist/locales/en.json +97 -0
- package/dist/locales/zh.json +97 -0
- package/package.json +15 -3
- package/dist/Article.d.ts +0 -121
- package/dist/Article.js +0 -189
- package/dist/Auth.d.ts +0 -30
- package/dist/Auth.js +0 -59
- package/dist/Category.d.ts +0 -49
- package/dist/Category.js +0 -85
- package/dist/Comment.d.ts +0 -58
- package/dist/Comment.js +0 -98
- package/dist/File.d.ts +0 -40
- package/dist/File.js +0 -72
- package/dist/HttpClient.d.ts +0 -41
- package/dist/HttpClient.js +0 -94
- package/dist/Knowledge.d.ts +0 -76
- package/dist/Knowledge.js +0 -124
- package/dist/Page.d.ts +0 -58
- package/dist/Page.js +0 -98
- package/dist/Search.d.ts +0 -30
- package/dist/Search.js +0 -59
- package/dist/Setting.d.ts +0 -22
- package/dist/Setting.js +0 -46
- package/dist/Smtp.d.ts +0 -31
- package/dist/Smtp.js +0 -59
- package/dist/Tag.d.ts +0 -58
- package/dist/Tag.js +0 -98
- package/dist/User.d.ts +0 -41
- package/dist/User.js +0 -73
- package/dist/View.d.ts +0 -49
- package/dist/View.js +0 -85
- package/dist/api/Admin.d.ts +0 -14
- package/dist/api/Admin.js +0 -32
- package/dist/api/All.d.ts +0 -14
- package/dist/api/All.js +0 -32
- package/dist/api/ApiInstance.d.ts +0 -39
- package/dist/api/ApiInstance.js +0 -46
- package/dist/api/Archives.d.ts +0 -14
- package/dist/api/Archives.js +0 -32
- package/dist/api/ArticleRoute.d.ts +0 -201
- package/dist/api/ArticleRoute.js +0 -12
- package/dist/api/AuthRoute.d.ts +0 -44
- package/dist/api/AuthRoute.js +0 -12
- package/dist/api/Book.d.ts +0 -15
- package/dist/api/Book.js +0 -33
- package/dist/api/CategoryRoute.d.ts +0 -79
- package/dist/api/CategoryRoute.js +0 -12
- package/dist/api/Chapter.d.ts +0 -15
- package/dist/api/Chapter.js +0 -33
- package/dist/api/CommentRoute.d.ts +0 -95
- package/dist/api/CommentRoute.js +0 -12
- package/dist/api/FileRoute.d.ts +0 -63
- package/dist/api/FileRoute.js +0 -12
- package/dist/api/Get.d.ts +0 -14
- package/dist/api/Get.js +0 -32
- package/dist/api/Github.d.ts +0 -14
- package/dist/api/Github.js +0 -32
- package/dist/api/Host.d.ts +0 -14
- package/dist/api/Host.js +0 -32
- package/dist/api/Id.d.ts +0 -284
- package/dist/api/Id.js +0 -422
- package/dist/api/KnowledgeRoute.d.ts +0 -125
- package/dist/api/KnowledgeRoute.js +0 -12
- package/dist/api/Login.d.ts +0 -14
- package/dist/api/Login.js +0 -32
- package/dist/api/PageRoute.d.ts +0 -95
- package/dist/api/PageRoute.js +0 -12
- package/dist/api/Password.d.ts +0 -15
- package/dist/api/Password.js +0 -33
- package/dist/api/Recommend.d.ts +0 -14
- package/dist/api/Recommend.js +0 -32
- package/dist/api/Register.d.ts +0 -15
- package/dist/api/Register.js +0 -33
- package/dist/api/SearchRoute.d.ts +0 -46
- package/dist/api/SearchRoute.js +0 -12
- package/dist/api/SettingRoute.d.ts +0 -31
- package/dist/api/SettingRoute.js +0 -12
- package/dist/api/SmtpRoute.d.ts +0 -47
- package/dist/api/SmtpRoute.js +0 -12
- package/dist/api/TagRoute.d.ts +0 -95
- package/dist/api/TagRoute.js +0 -12
- package/dist/api/Update.d.ts +0 -15
- package/dist/api/Update.js +0 -33
- package/dist/api/Upload.d.ts +0 -15
- package/dist/api/Upload.js +0 -33
- package/dist/api/Url.d.ts +0 -14
- package/dist/api/Url.js +0 -32
- package/dist/api/UserRoute.d.ts +0 -60
- package/dist/api/UserRoute.js +0 -12
- package/dist/api/ViewRoute.d.ts +0 -77
- package/dist/api/ViewRoute.js +0 -12
- package/dist/api/api-instance.d.ts +0 -39
- package/dist/api/api-instance.js +0 -46
- package/dist/api/http-client.d.ts +0 -41
- package/dist/api/http-client.js +0 -94
- package/dist/data-contracts.d.ts +0 -245
- package/dist/data-contracts.js +0 -12
- package/dist/types/data-contracts.d.ts +0 -177
- package/dist/types/data-contracts.js +0 -12
- package/dist/utils/common.d.ts +0 -21
- package/dist/utils/common.js +0 -52
- package/dist/utils/http.d.ts +0 -3
- package/dist/utils/http.js +0 -45
- /package/dist/api/{httpClient.d.ts → HttpClient.d.ts} +0 -0
- /package/dist/api/{httpClient.js → HttpClient.js} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.globalSetting = exports.defaultLocale = exports.locales = exports.messages = exports.file = exports.config = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* 环境变量配置
|
|
6
|
+
*/
|
|
7
|
+
const env_1 = require("./env");
|
|
8
|
+
Object.defineProperty(exports, "file", { enumerable: true, get: function () { return env_1.file; } });
|
|
9
|
+
const i18n_1 = require("./i18n");
|
|
10
|
+
Object.defineProperty(exports, "messages", { enumerable: true, get: function () { return i18n_1.messages; } });
|
|
11
|
+
Object.defineProperty(exports, "locales", { enumerable: true, get: function () { return i18n_1.locales; } });
|
|
12
|
+
Object.defineProperty(exports, "defaultLocale", { enumerable: true, get: function () { return i18n_1.defaultLocale; } });
|
|
13
|
+
const global_1 = require("./global");
|
|
14
|
+
Object.defineProperty(exports, "globalSetting", { enumerable: true, get: function () { return global_1.globalSetting; } });
|
|
15
|
+
// Create a unified config object that includes all configuration properties
|
|
16
|
+
const config = {
|
|
17
|
+
...env_1.config,
|
|
18
|
+
locales: i18n_1.locales,
|
|
19
|
+
defaultLocale: i18n_1.defaultLocale,
|
|
20
|
+
messages: i18n_1.messages,
|
|
21
|
+
globalSetting: global_1.globalSetting,
|
|
22
|
+
file: env_1.file
|
|
23
|
+
};
|
|
24
|
+
exports.config = config;
|
|
25
|
+
exports.default = config;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { api, createApiInstance } from './api/instance';
|
|
2
|
+
import * as types from './types';
|
|
3
|
+
import * as utils from './utils';
|
|
4
|
+
import * as config from './config';
|
|
5
|
+
declare const http: {
|
|
6
|
+
createApiInstance: typeof createApiInstance;
|
|
7
|
+
instance: import("axios").AxiosInstance;
|
|
8
|
+
setSecurityData: (data: unknown) => void;
|
|
9
|
+
request: <T = any, _E = any>({ secure, path, type, query, format, body, ...params }: import("./api/HttpClient").FullRequestParams) => Promise<T>;
|
|
10
|
+
};
|
|
11
|
+
export { api, types, utils, config, http };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
2
|
+
// Automatically generated API toolkit for ReactPress
|
|
3
|
+
// Do not manually modify this file
|
|
4
|
+
// Generated at: 9/25/2025, 9:47:27 PM
|
|
3
5
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
6
|
if (k2 === undefined) k2 = k;
|
|
5
|
-
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
7
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
10
8
|
}) : (function(o, m, k, k2) {
|
|
11
9
|
if (k2 === undefined) k2 = k;
|
|
12
10
|
o[k2] = m[k];
|
|
@@ -24,18 +22,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
22
|
return result;
|
|
25
23
|
};
|
|
26
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.
|
|
28
|
-
|
|
29
|
-
var instance_1 = require("./api/instance");
|
|
25
|
+
exports.http = exports.config = exports.utils = exports.types = exports.api = void 0;
|
|
26
|
+
const instance_1 = require("./api/instance");
|
|
30
27
|
Object.defineProperty(exports, "api", { enumerable: true, get: function () { return instance_1.api; } });
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
exports.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
const types = __importStar(require("./types"));
|
|
29
|
+
exports.types = types;
|
|
30
|
+
const utils = __importStar(require("./utils"));
|
|
31
|
+
exports.utils = utils;
|
|
32
|
+
const config = __importStar(require("./config"));
|
|
33
|
+
exports.config = config;
|
|
34
|
+
const http = {
|
|
35
|
+
...instance_1.http,
|
|
36
|
+
createApiInstance: instance_1.createApiInstance,
|
|
37
|
+
};
|
|
38
|
+
exports.http = http;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"zh": "Chinese",
|
|
3
|
+
"en": "English",
|
|
4
|
+
"serverNotAvaliable": "The server is going to launch a rocket for Musk now",
|
|
5
|
+
"pageMissing": "This page went to space with Bezos",
|
|
6
|
+
"archives": "Archives",
|
|
7
|
+
"total": "Total",
|
|
8
|
+
"totalSearch": "Totally searched ",
|
|
9
|
+
"piece": " Count",
|
|
10
|
+
"passwd": "Password",
|
|
11
|
+
"wrongPasswd": "Wrong Password",
|
|
12
|
+
"protectedArticleMsg": "The article is protected, please enter the access password",
|
|
13
|
+
"backHome": "Back to Home",
|
|
14
|
+
"confirm": "Confirm",
|
|
15
|
+
"unknownTitle": "Unknown Title",
|
|
16
|
+
"articleCover": "Article Cover",
|
|
17
|
+
"publishAt": "Publish At",
|
|
18
|
+
"readings": "Reading",
|
|
19
|
+
"copyrightInfo": "Copyright Information",
|
|
20
|
+
"copyrightContent": "Non-commercial-Attribution-Freely Reprinted",
|
|
21
|
+
"categoryArticle": "Category",
|
|
22
|
+
"gettingArticle": "Fetching articles...",
|
|
23
|
+
"comment": "Comment",
|
|
24
|
+
"gettingKnowledge": "Fetching knowledge books...",
|
|
25
|
+
"knowledgeBooks": "Knowledge Books",
|
|
26
|
+
"readingCount": "reading",
|
|
27
|
+
"startReading": "Start Reading",
|
|
28
|
+
"pleaseWait": "Coming soon",
|
|
29
|
+
"otherKnowledges": "Other Knowledge Books",
|
|
30
|
+
"unknownKnowledgeChapter": "Unknown Chapter",
|
|
31
|
+
"recommendToReading": "Recommended Readings",
|
|
32
|
+
"yu": "About",
|
|
33
|
+
"tagRelativeArticles": "tag related articles",
|
|
34
|
+
"all": "All",
|
|
35
|
+
"readingCountTemplate": "reading",
|
|
36
|
+
"articleCountTemplate": "count",
|
|
37
|
+
"share": "Share",
|
|
38
|
+
"empty": "No data",
|
|
39
|
+
"categoryTitle": "Category",
|
|
40
|
+
"home": "Home",
|
|
41
|
+
"knowledge": "Knowledge",
|
|
42
|
+
"commentNamespace": {
|
|
43
|
+
"reply": "Reply",
|
|
44
|
+
"emoji": "Emoji",
|
|
45
|
+
"replyPlaceholder": "Please enter the content of the comment (Markdown is supported)",
|
|
46
|
+
"publish": "Send",
|
|
47
|
+
"close": "Close",
|
|
48
|
+
"commentSuccess": "The comment is successful and has been submitted for review",
|
|
49
|
+
"userInfoTitle": "Please set your information",
|
|
50
|
+
"userInfoName": "Username",
|
|
51
|
+
"userInfoNameValidMsg": "Please tell me your name",
|
|
52
|
+
"userInfoPassword": "Password",
|
|
53
|
+
"userInfoPasswordValidMsg": "Please enter correct password",
|
|
54
|
+
"userInfoEmail": "Email",
|
|
55
|
+
"userInfoEmailValidMsg": "Please enter email",
|
|
56
|
+
"userInfoIllegalEmailValidMsg": "Please enter correct email",
|
|
57
|
+
"userInfoConfirm": "Login",
|
|
58
|
+
"userInfoCancel": "Cancel",
|
|
59
|
+
"logout": "Logout",
|
|
60
|
+
"register": "Register",
|
|
61
|
+
"userRegister": "User Register",
|
|
62
|
+
"userInfoPleaseEnterConfirmPassword": "Confirm Password",
|
|
63
|
+
"confirmPasswordIsNotMatchTips": "Confirm password is not match your password",
|
|
64
|
+
"registerSuccessTips": "Register Success",
|
|
65
|
+
"registerSuccessToLoginTips": "Registration successful, login now ?",
|
|
66
|
+
"loginSuccess": "Login succeeded",
|
|
67
|
+
"areYouNoAccount": "Don't have an account?",
|
|
68
|
+
"registerNow": "Register now?",
|
|
69
|
+
"openAuth": "Use third-party login",
|
|
70
|
+
"areYouHasAccount": "Do you already have an account?",
|
|
71
|
+
"loginNow": "Login now",
|
|
72
|
+
"toggleNeedSetInfo": "Incomplete email information, please complete personal information."
|
|
73
|
+
},
|
|
74
|
+
"loading": "Loading",
|
|
75
|
+
"copySuccess": "Copy successfully",
|
|
76
|
+
"copy": "copy",
|
|
77
|
+
"article": "Articles",
|
|
78
|
+
"searchArticle": "Search Articles",
|
|
79
|
+
"searchArticlePlaceholder": "Enter keywords, search articles",
|
|
80
|
+
"shareNamespace": {
|
|
81
|
+
"title": "Share Poster",
|
|
82
|
+
"createingPoster": "The poster is being generated, please be patient...",
|
|
83
|
+
"createdPosterSuccess": "The poster is completed.",
|
|
84
|
+
"createdPosterError": "Fail to generate poster.",
|
|
85
|
+
"qrcode": "Scan the QR code to read the article",
|
|
86
|
+
"shareFrom": " Original shared from "
|
|
87
|
+
},
|
|
88
|
+
"tagTitle": "Tags",
|
|
89
|
+
"toc": "Toc",
|
|
90
|
+
"logingWithGithub": "Login With Github, Please wait...",
|
|
91
|
+
"useGithubToLogin": "Login with Github account",
|
|
92
|
+
"loginTipMessage": "Please login, otherwise you will not be able to comment. If you need an account, you can go to the admin system to register",
|
|
93
|
+
"rssSubscribe": "RSS Subscription",
|
|
94
|
+
"aboutUs": "About Us",
|
|
95
|
+
"nav": "Navigation",
|
|
96
|
+
"suggestions": "Suggestions"
|
|
97
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"zh": "汉语",
|
|
3
|
+
"en": "英文",
|
|
4
|
+
"serverNotAvaliable": "服务器暂时去给马斯克发射火箭去了",
|
|
5
|
+
"pageMissing": "页面和贝佐斯去太空旅行了~~",
|
|
6
|
+
"archives": "时光圈",
|
|
7
|
+
"total": "共计",
|
|
8
|
+
"totalSearch": "共搜索到",
|
|
9
|
+
"piece": "篇",
|
|
10
|
+
"passwd": "密码",
|
|
11
|
+
"wrongPasswd": "密码错误",
|
|
12
|
+
"protectedArticleMsg": "文章受保护,请输入访问密码",
|
|
13
|
+
"backHome": "回首页",
|
|
14
|
+
"confirm": "确认",
|
|
15
|
+
"unknownTitle": "未知标题",
|
|
16
|
+
"articleCover": "文章封面",
|
|
17
|
+
"publishAt": "发布于",
|
|
18
|
+
"readings": "阅读量",
|
|
19
|
+
"copyrightInfo": "版权信息",
|
|
20
|
+
"copyrightContent": "非商用-署名-自由转载,转载请注明出处。",
|
|
21
|
+
"categoryArticle": "分类文章",
|
|
22
|
+
"gettingArticle": "正在获取文章...",
|
|
23
|
+
"comment": "评论",
|
|
24
|
+
"gettingKnowledge": "正在获取知识...",
|
|
25
|
+
"knowledgeBooks": "专辑",
|
|
26
|
+
"readingCount": "次阅读",
|
|
27
|
+
"startReading": "开始阅读",
|
|
28
|
+
"pleaseWait": "敬请期待",
|
|
29
|
+
"otherKnowledges": "其他知识笔记",
|
|
30
|
+
"unknownKnowledgeChapter": "未知章节内容",
|
|
31
|
+
"recommendToReading": "推荐阅读",
|
|
32
|
+
"yu": "与",
|
|
33
|
+
"tagRelativeArticles": "标签有关的文章",
|
|
34
|
+
"all": "所有",
|
|
35
|
+
"readingCountTemplate": "次阅读",
|
|
36
|
+
"articleCountTemplate": "篇文章",
|
|
37
|
+
"share": "分享",
|
|
38
|
+
"empty": "暂无数据",
|
|
39
|
+
"categoryTitle": "文章分类",
|
|
40
|
+
"commentNamespace": {
|
|
41
|
+
"reply": "回复",
|
|
42
|
+
"emoji": "表情",
|
|
43
|
+
"replyPlaceholder": "请输入评论内容(支持 Markdown)",
|
|
44
|
+
"publish": "发布",
|
|
45
|
+
"close": "收起",
|
|
46
|
+
"commentSuccess": "评论成功,已提交审核",
|
|
47
|
+
"userInfoTitle": "帐密登录",
|
|
48
|
+
"userInfoName": "名称",
|
|
49
|
+
"userInfoNameValidMsg": "请输入您的称呼",
|
|
50
|
+
"userInfoPassword": "密码",
|
|
51
|
+
"userInfoPasswordValidMsg": "请输入密码",
|
|
52
|
+
"userInfoEmail": "邮箱",
|
|
53
|
+
"userInfoEmailValidMsg": "请输入邮箱",
|
|
54
|
+
"userInfoIllegalEmailValidMsg": "邮箱格式不正确",
|
|
55
|
+
"userInfoConfirm": "登录",
|
|
56
|
+
"userInfoCancel": "取消",
|
|
57
|
+
"logout": "退出",
|
|
58
|
+
"register": "注册",
|
|
59
|
+
"userRegister": "用户注册",
|
|
60
|
+
"userInfoPleaseEnterConfirmPassword": "请输入确认密码",
|
|
61
|
+
"confirmPasswordIsNotMatchTips": "确认密码和密码不匹配",
|
|
62
|
+
"registerSuccessTips": "注册成功",
|
|
63
|
+
"registerSuccessToLoginTips": "注册成功, 是否跳转到登陆",
|
|
64
|
+
"loginSuccess": "登录成功",
|
|
65
|
+
"areYouNoAccount": "没有账号?",
|
|
66
|
+
"registerNow": "立即注册",
|
|
67
|
+
"openAuth": "第三方登录",
|
|
68
|
+
"areYouHasAccount": "已有账号?",
|
|
69
|
+
"loginNow": "立即登录",
|
|
70
|
+
"toggleNeedSetInfo": "邮箱信息不完整,请完善个人资料。"
|
|
71
|
+
},
|
|
72
|
+
"loading": "加载中",
|
|
73
|
+
"copySuccess": "复制成功",
|
|
74
|
+
"copy": "复制",
|
|
75
|
+
"article": "文章",
|
|
76
|
+
"home": "首页",
|
|
77
|
+
"knowledge": "专辑",
|
|
78
|
+
"searchArticle": "文章搜索",
|
|
79
|
+
"searchArticlePlaceholder": "输入关键字,搜索文章",
|
|
80
|
+
"shareNamespace": {
|
|
81
|
+
"title": "分享海报",
|
|
82
|
+
"createingPoster": "海报生成中,请耐心等待...",
|
|
83
|
+
"createdPosterSuccess": "分享海报制作完成。",
|
|
84
|
+
"createdPosterError": "分享海报制作失败,请手动截图",
|
|
85
|
+
"qrcode": "识别二维码查看文章",
|
|
86
|
+
"shareFrom": " 原文分享自"
|
|
87
|
+
},
|
|
88
|
+
"tagTitle": "文章标签",
|
|
89
|
+
"toc": "目录",
|
|
90
|
+
"logingWithGithub": "Github 授权登录中,请稍等......",
|
|
91
|
+
"useGithubToLogin": "使用 Github 账号登录",
|
|
92
|
+
"loginTipMessage": "请登录账号,否则无法进行评论。",
|
|
93
|
+
"rssSubscribe": "RSS 订阅",
|
|
94
|
+
"aboutUs": "关于我们",
|
|
95
|
+
"nav": "导航",
|
|
96
|
+
"suggestions": "建议"
|
|
97
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fecommunity/reactpress-toolkit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/index.js",
|
|
8
|
+
"./api": "./dist/api/index.js",
|
|
9
|
+
"./api/instance": "./dist/api/instance.js",
|
|
10
|
+
"./types": "./dist/types/index.js",
|
|
11
|
+
"./utils": "./dist/utils/index.js",
|
|
12
|
+
"./config": "./dist/config/index.js"
|
|
13
|
+
},
|
|
5
14
|
"files": [
|
|
6
15
|
"dist"
|
|
7
16
|
],
|
|
@@ -11,14 +20,17 @@
|
|
|
11
20
|
"description": "",
|
|
12
21
|
"dependencies": {
|
|
13
22
|
"axios": "^1.12.2",
|
|
23
|
+
"dotenv": "^8.6.0",
|
|
24
|
+
"fs-extra": "^10.0.0",
|
|
14
25
|
"lodash": "^4.17.21",
|
|
15
26
|
"swagger-typescript-api": "^12.0.4"
|
|
16
27
|
},
|
|
17
28
|
"devDependencies": {
|
|
18
|
-
"@types/
|
|
29
|
+
"@types/fs-extra": "^9.0.13",
|
|
30
|
+
"@types/node": "^17.0.22"
|
|
19
31
|
},
|
|
20
32
|
"scripts": {
|
|
21
33
|
"generate": "node scripts/generate-swagger.js",
|
|
22
|
-
"build": "tsc"
|
|
34
|
+
"build": "tsc && cp -r src/locales dist/"
|
|
23
35
|
}
|
|
24
36
|
}
|
package/dist/Article.d.ts
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { IArticleControllerCreateData } from './data-contracts';
|
|
2
|
-
import { HttpClient, RequestParams } from './HttpClient';
|
|
3
|
-
export declare class Article<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
|
|
4
|
-
/**
|
|
5
|
-
* No description
|
|
6
|
-
*
|
|
7
|
-
* @tags Article
|
|
8
|
-
* @name ArticleControllerCreate
|
|
9
|
-
* @request POST:/article
|
|
10
|
-
* @response `200` `IArticleControllerCreateData` 创建文章
|
|
11
|
-
*/
|
|
12
|
-
articleControllerCreate: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IArticleControllerCreateData, any, {}>>;
|
|
13
|
-
/**
|
|
14
|
-
* No description
|
|
15
|
-
*
|
|
16
|
-
* @tags Article
|
|
17
|
-
* @name ArticleControllerFindAll
|
|
18
|
-
* @request GET:/article
|
|
19
|
-
* @response `200` `IArticleControllerFindAllData`
|
|
20
|
-
*/
|
|
21
|
-
articleControllerFindAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
22
|
-
/**
|
|
23
|
-
* No description
|
|
24
|
-
*
|
|
25
|
-
* @tags Article
|
|
26
|
-
* @name ArticleControllerFindArticlesByCategory
|
|
27
|
-
* @request GET:/article/category/{id}
|
|
28
|
-
* @response `200` `IArticleControllerFindArticlesByCategoryData`
|
|
29
|
-
*/
|
|
30
|
-
articleControllerFindArticlesByCategory: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
31
|
-
/**
|
|
32
|
-
* No description
|
|
33
|
-
*
|
|
34
|
-
* @tags Article
|
|
35
|
-
* @name ArticleControllerFindArticlesByTag
|
|
36
|
-
* @request GET:/article/tag/{id}
|
|
37
|
-
* @response `200` `IArticleControllerFindArticlesByTagData`
|
|
38
|
-
*/
|
|
39
|
-
articleControllerFindArticlesByTag: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
40
|
-
/**
|
|
41
|
-
* No description
|
|
42
|
-
*
|
|
43
|
-
* @tags Article
|
|
44
|
-
* @name ArticleControllerGetRecommendArticles
|
|
45
|
-
* @request GET:/article/all/recommend
|
|
46
|
-
* @response `200` `IArticleControllerGetRecommendArticlesData`
|
|
47
|
-
*/
|
|
48
|
-
articleControllerGetRecommendArticles: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
49
|
-
/**
|
|
50
|
-
* No description
|
|
51
|
-
*
|
|
52
|
-
* @tags Article
|
|
53
|
-
* @name ArticleControllerGetArchives
|
|
54
|
-
* @request GET:/article/archives
|
|
55
|
-
* @response `200` `IArticleControllerGetArchivesData`
|
|
56
|
-
*/
|
|
57
|
-
articleControllerGetArchives: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
58
|
-
/**
|
|
59
|
-
* No description
|
|
60
|
-
*
|
|
61
|
-
* @tags Article
|
|
62
|
-
* @name ArticleControllerRecommend
|
|
63
|
-
* @request GET:/article/recommend
|
|
64
|
-
* @response `200` `IArticleControllerRecommendData`
|
|
65
|
-
*/
|
|
66
|
-
articleControllerRecommend: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
67
|
-
/**
|
|
68
|
-
* No description
|
|
69
|
-
*
|
|
70
|
-
* @tags Article
|
|
71
|
-
* @name ArticleControllerFindById
|
|
72
|
-
* @request GET:/article/{id}
|
|
73
|
-
* @response `200` `IArticleControllerFindByIdData`
|
|
74
|
-
*/
|
|
75
|
-
articleControllerFindById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
76
|
-
/**
|
|
77
|
-
* No description
|
|
78
|
-
*
|
|
79
|
-
* @tags Article
|
|
80
|
-
* @name ArticleControllerUpdateById
|
|
81
|
-
* @request PATCH:/article/{id}
|
|
82
|
-
* @response `200` `IArticleControllerUpdateByIdData`
|
|
83
|
-
*/
|
|
84
|
-
articleControllerUpdateById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
85
|
-
/**
|
|
86
|
-
* No description
|
|
87
|
-
*
|
|
88
|
-
* @tags Article
|
|
89
|
-
* @name ArticleControllerDeleteById
|
|
90
|
-
* @request DELETE:/article/{id}
|
|
91
|
-
* @response `200` `IArticleControllerDeleteByIdData`
|
|
92
|
-
*/
|
|
93
|
-
articleControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
94
|
-
/**
|
|
95
|
-
* No description
|
|
96
|
-
*
|
|
97
|
-
* @tags Article
|
|
98
|
-
* @name ArticleControllerCheckPassword
|
|
99
|
-
* @request POST:/article/{id}/checkPassword
|
|
100
|
-
* @response `200` `IArticleControllerCheckPasswordData`
|
|
101
|
-
*/
|
|
102
|
-
articleControllerCheckPassword: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
103
|
-
/**
|
|
104
|
-
* No description
|
|
105
|
-
*
|
|
106
|
-
* @tags Article
|
|
107
|
-
* @name ArticleControllerUpdateViewsById
|
|
108
|
-
* @request POST:/article/{id}/views
|
|
109
|
-
* @response `200` `IArticleControllerUpdateViewsByIdData`
|
|
110
|
-
*/
|
|
111
|
-
articleControllerUpdateViewsById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
112
|
-
/**
|
|
113
|
-
* No description
|
|
114
|
-
*
|
|
115
|
-
* @tags Article
|
|
116
|
-
* @name ArticleControllerUpdateLikesById
|
|
117
|
-
* @request POST:/article/{id}/likes
|
|
118
|
-
* @response `200` `IArticleControllerUpdateLikesByIdData`
|
|
119
|
-
*/
|
|
120
|
-
articleControllerUpdateLikesById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
121
|
-
}
|
package/dist/Article.js
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/*
|
|
5
|
-
* ---------------------------------------------------------------
|
|
6
|
-
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
7
|
-
* ## ##
|
|
8
|
-
* ## AUTHOR: acacode ##
|
|
9
|
-
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
10
|
-
* ---------------------------------------------------------------
|
|
11
|
-
*/
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.Article = void 0;
|
|
14
|
-
const HttpClient_1 = require("./HttpClient");
|
|
15
|
-
class Article extends HttpClient_1.HttpClient {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
/**
|
|
19
|
-
* No description
|
|
20
|
-
*
|
|
21
|
-
* @tags Article
|
|
22
|
-
* @name ArticleControllerCreate
|
|
23
|
-
* @request POST:/article
|
|
24
|
-
* @response `200` `IArticleControllerCreateData` 创建文章
|
|
25
|
-
*/
|
|
26
|
-
this.articleControllerCreate = (params = {}) => this.request({
|
|
27
|
-
path: `/article`,
|
|
28
|
-
method: 'POST',
|
|
29
|
-
...params,
|
|
30
|
-
});
|
|
31
|
-
/**
|
|
32
|
-
* No description
|
|
33
|
-
*
|
|
34
|
-
* @tags Article
|
|
35
|
-
* @name ArticleControllerFindAll
|
|
36
|
-
* @request GET:/article
|
|
37
|
-
* @response `200` `IArticleControllerFindAllData`
|
|
38
|
-
*/
|
|
39
|
-
this.articleControllerFindAll = (params = {}) => this.request({
|
|
40
|
-
path: `/article`,
|
|
41
|
-
method: 'GET',
|
|
42
|
-
...params,
|
|
43
|
-
});
|
|
44
|
-
/**
|
|
45
|
-
* No description
|
|
46
|
-
*
|
|
47
|
-
* @tags Article
|
|
48
|
-
* @name ArticleControllerFindArticlesByCategory
|
|
49
|
-
* @request GET:/article/category/{id}
|
|
50
|
-
* @response `200` `IArticleControllerFindArticlesByCategoryData`
|
|
51
|
-
*/
|
|
52
|
-
this.articleControllerFindArticlesByCategory = (id, params = {}) => this.request({
|
|
53
|
-
path: `/article/category/${id}`,
|
|
54
|
-
method: 'GET',
|
|
55
|
-
...params,
|
|
56
|
-
});
|
|
57
|
-
/**
|
|
58
|
-
* No description
|
|
59
|
-
*
|
|
60
|
-
* @tags Article
|
|
61
|
-
* @name ArticleControllerFindArticlesByTag
|
|
62
|
-
* @request GET:/article/tag/{id}
|
|
63
|
-
* @response `200` `IArticleControllerFindArticlesByTagData`
|
|
64
|
-
*/
|
|
65
|
-
this.articleControllerFindArticlesByTag = (id, params = {}) => this.request({
|
|
66
|
-
path: `/article/tag/${id}`,
|
|
67
|
-
method: 'GET',
|
|
68
|
-
...params,
|
|
69
|
-
});
|
|
70
|
-
/**
|
|
71
|
-
* No description
|
|
72
|
-
*
|
|
73
|
-
* @tags Article
|
|
74
|
-
* @name ArticleControllerGetRecommendArticles
|
|
75
|
-
* @request GET:/article/all/recommend
|
|
76
|
-
* @response `200` `IArticleControllerGetRecommendArticlesData`
|
|
77
|
-
*/
|
|
78
|
-
this.articleControllerGetRecommendArticles = (params = {}) => this.request({
|
|
79
|
-
path: `/article/all/recommend`,
|
|
80
|
-
method: 'GET',
|
|
81
|
-
...params,
|
|
82
|
-
});
|
|
83
|
-
/**
|
|
84
|
-
* No description
|
|
85
|
-
*
|
|
86
|
-
* @tags Article
|
|
87
|
-
* @name ArticleControllerGetArchives
|
|
88
|
-
* @request GET:/article/archives
|
|
89
|
-
* @response `200` `IArticleControllerGetArchivesData`
|
|
90
|
-
*/
|
|
91
|
-
this.articleControllerGetArchives = (params = {}) => this.request({
|
|
92
|
-
path: `/article/archives`,
|
|
93
|
-
method: 'GET',
|
|
94
|
-
...params,
|
|
95
|
-
});
|
|
96
|
-
/**
|
|
97
|
-
* No description
|
|
98
|
-
*
|
|
99
|
-
* @tags Article
|
|
100
|
-
* @name ArticleControllerRecommend
|
|
101
|
-
* @request GET:/article/recommend
|
|
102
|
-
* @response `200` `IArticleControllerRecommendData`
|
|
103
|
-
*/
|
|
104
|
-
this.articleControllerRecommend = (params = {}) => this.request({
|
|
105
|
-
path: `/article/recommend`,
|
|
106
|
-
method: 'GET',
|
|
107
|
-
...params,
|
|
108
|
-
});
|
|
109
|
-
/**
|
|
110
|
-
* No description
|
|
111
|
-
*
|
|
112
|
-
* @tags Article
|
|
113
|
-
* @name ArticleControllerFindById
|
|
114
|
-
* @request GET:/article/{id}
|
|
115
|
-
* @response `200` `IArticleControllerFindByIdData`
|
|
116
|
-
*/
|
|
117
|
-
this.articleControllerFindById = (id, params = {}) => this.request({
|
|
118
|
-
path: `/article/${id}`,
|
|
119
|
-
method: 'GET',
|
|
120
|
-
...params,
|
|
121
|
-
});
|
|
122
|
-
/**
|
|
123
|
-
* No description
|
|
124
|
-
*
|
|
125
|
-
* @tags Article
|
|
126
|
-
* @name ArticleControllerUpdateById
|
|
127
|
-
* @request PATCH:/article/{id}
|
|
128
|
-
* @response `200` `IArticleControllerUpdateByIdData`
|
|
129
|
-
*/
|
|
130
|
-
this.articleControllerUpdateById = (id, params = {}) => this.request({
|
|
131
|
-
path: `/article/${id}`,
|
|
132
|
-
method: 'PATCH',
|
|
133
|
-
...params,
|
|
134
|
-
});
|
|
135
|
-
/**
|
|
136
|
-
* No description
|
|
137
|
-
*
|
|
138
|
-
* @tags Article
|
|
139
|
-
* @name ArticleControllerDeleteById
|
|
140
|
-
* @request DELETE:/article/{id}
|
|
141
|
-
* @response `200` `IArticleControllerDeleteByIdData`
|
|
142
|
-
*/
|
|
143
|
-
this.articleControllerDeleteById = (id, params = {}) => this.request({
|
|
144
|
-
path: `/article/${id}`,
|
|
145
|
-
method: 'DELETE',
|
|
146
|
-
...params,
|
|
147
|
-
});
|
|
148
|
-
/**
|
|
149
|
-
* No description
|
|
150
|
-
*
|
|
151
|
-
* @tags Article
|
|
152
|
-
* @name ArticleControllerCheckPassword
|
|
153
|
-
* @request POST:/article/{id}/checkPassword
|
|
154
|
-
* @response `200` `IArticleControllerCheckPasswordData`
|
|
155
|
-
*/
|
|
156
|
-
this.articleControllerCheckPassword = (id, params = {}) => this.request({
|
|
157
|
-
path: `/article/${id}/checkPassword`,
|
|
158
|
-
method: 'POST',
|
|
159
|
-
...params,
|
|
160
|
-
});
|
|
161
|
-
/**
|
|
162
|
-
* No description
|
|
163
|
-
*
|
|
164
|
-
* @tags Article
|
|
165
|
-
* @name ArticleControllerUpdateViewsById
|
|
166
|
-
* @request POST:/article/{id}/views
|
|
167
|
-
* @response `200` `IArticleControllerUpdateViewsByIdData`
|
|
168
|
-
*/
|
|
169
|
-
this.articleControllerUpdateViewsById = (id, params = {}) => this.request({
|
|
170
|
-
path: `/article/${id}/views`,
|
|
171
|
-
method: 'POST',
|
|
172
|
-
...params,
|
|
173
|
-
});
|
|
174
|
-
/**
|
|
175
|
-
* No description
|
|
176
|
-
*
|
|
177
|
-
* @tags Article
|
|
178
|
-
* @name ArticleControllerUpdateLikesById
|
|
179
|
-
* @request POST:/article/{id}/likes
|
|
180
|
-
* @response `200` `IArticleControllerUpdateLikesByIdData`
|
|
181
|
-
*/
|
|
182
|
-
this.articleControllerUpdateLikesById = (id, params = {}) => this.request({
|
|
183
|
-
path: `/article/${id}/likes`,
|
|
184
|
-
method: 'POST',
|
|
185
|
-
...params,
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
exports.Article = Article;
|
package/dist/Auth.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { HttpClient, RequestParams } from './HttpClient';
|
|
2
|
-
export declare class Auth<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
|
|
3
|
-
/**
|
|
4
|
-
* No description
|
|
5
|
-
*
|
|
6
|
-
* @tags Auth
|
|
7
|
-
* @name AuthControllerLogin
|
|
8
|
-
* @request POST:/auth/login
|
|
9
|
-
* @response `200` `IAuthControllerLoginData`
|
|
10
|
-
*/
|
|
11
|
-
authControllerLogin: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
12
|
-
/**
|
|
13
|
-
* No description
|
|
14
|
-
*
|
|
15
|
-
* @tags Auth
|
|
16
|
-
* @name AuthControllerCreateBook
|
|
17
|
-
* @request POST:/auth/admin
|
|
18
|
-
* @response `201` `IAuthControllerCreateBookData`
|
|
19
|
-
*/
|
|
20
|
-
authControllerCreateBook: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
21
|
-
/**
|
|
22
|
-
* No description
|
|
23
|
-
*
|
|
24
|
-
* @tags Auth
|
|
25
|
-
* @name AuthControllerLoginWithGithub
|
|
26
|
-
* @request POST:/auth/github
|
|
27
|
-
* @response `201` `IAuthControllerLoginWithGithubData`
|
|
28
|
-
*/
|
|
29
|
-
authControllerLoginWithGithub: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
30
|
-
}
|