@fecommunity/reactpress-toolkit 1.0.0-beta.1 → 1.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.
Files changed (130) hide show
  1. package/README.md +405 -0
  2. package/dist/Article.d.ts +121 -0
  3. package/dist/Article.js +189 -0
  4. package/dist/Auth.d.ts +30 -0
  5. package/dist/Auth.js +59 -0
  6. package/dist/Category.d.ts +49 -0
  7. package/dist/Category.js +85 -0
  8. package/dist/Comment.d.ts +58 -0
  9. package/dist/Comment.js +98 -0
  10. package/dist/File.d.ts +40 -0
  11. package/dist/File.js +72 -0
  12. package/dist/HttpClient.d.ts +41 -0
  13. package/dist/HttpClient.js +94 -0
  14. package/dist/Knowledge.d.ts +76 -0
  15. package/dist/Knowledge.js +124 -0
  16. package/dist/Page.d.ts +58 -0
  17. package/dist/Page.js +98 -0
  18. package/dist/Search.d.ts +30 -0
  19. package/dist/Search.js +59 -0
  20. package/dist/Setting.d.ts +22 -0
  21. package/dist/Setting.js +46 -0
  22. package/dist/Smtp.d.ts +31 -0
  23. package/dist/Smtp.js +59 -0
  24. package/dist/Tag.d.ts +58 -0
  25. package/dist/Tag.js +98 -0
  26. package/dist/User.d.ts +41 -0
  27. package/dist/User.js +73 -0
  28. package/dist/View.d.ts +49 -0
  29. package/dist/View.js +85 -0
  30. package/dist/api/ApiInstance.d.ts +39 -0
  31. package/dist/api/ApiInstance.js +46 -0
  32. package/dist/api/Article.d.ts +44 -29
  33. package/dist/api/Article.js +42 -31
  34. package/dist/api/ArticleRoute.d.ts +201 -0
  35. package/dist/api/ArticleRoute.js +12 -0
  36. package/dist/api/Auth.d.ts +11 -6
  37. package/dist/api/Auth.js +10 -8
  38. package/dist/api/AuthRoute.d.ts +44 -0
  39. package/dist/api/AuthRoute.js +12 -0
  40. package/dist/api/Category.d.ts +20 -13
  41. package/dist/api/Category.js +18 -15
  42. package/dist/api/CategoryRoute.d.ts +79 -0
  43. package/dist/api/CategoryRoute.js +12 -0
  44. package/dist/api/Comment.d.ts +22 -14
  45. package/dist/api/Comment.js +20 -16
  46. package/dist/api/CommentRoute.d.ts +95 -0
  47. package/dist/api/CommentRoute.js +12 -0
  48. package/dist/api/File.d.ts +16 -10
  49. package/dist/api/File.js +14 -12
  50. package/dist/api/FileRoute.d.ts +63 -0
  51. package/dist/api/FileRoute.js +12 -0
  52. package/dist/api/Knowledge.d.ts +29 -19
  53. package/dist/api/Knowledge.js +27 -22
  54. package/dist/api/KnowledgeRoute.d.ts +125 -0
  55. package/dist/api/KnowledgeRoute.js +12 -0
  56. package/dist/api/Page.d.ts +23 -15
  57. package/dist/api/Page.js +21 -17
  58. package/dist/api/PageRoute.d.ts +95 -0
  59. package/dist/api/PageRoute.js +12 -0
  60. package/dist/api/Search.d.ts +12 -7
  61. package/dist/api/Search.js +11 -9
  62. package/dist/api/SearchRoute.d.ts +46 -0
  63. package/dist/api/SearchRoute.js +12 -0
  64. package/dist/api/Setting.d.ts +10 -6
  65. package/dist/api/Setting.js +8 -8
  66. package/dist/api/SettingRoute.d.ts +31 -0
  67. package/dist/api/SettingRoute.js +12 -0
  68. package/dist/api/Smtp.d.ts +14 -9
  69. package/dist/api/Smtp.js +12 -11
  70. package/dist/api/SmtpRoute.d.ts +47 -0
  71. package/dist/api/SmtpRoute.js +12 -0
  72. package/dist/api/Tag.d.ts +22 -14
  73. package/dist/api/Tag.js +20 -16
  74. package/dist/api/TagRoute.d.ts +95 -0
  75. package/dist/api/TagRoute.js +12 -0
  76. package/dist/api/User.d.ts +15 -8
  77. package/dist/api/User.js +13 -13
  78. package/dist/api/UserRoute.d.ts +60 -0
  79. package/dist/api/UserRoute.js +12 -0
  80. package/dist/api/View.d.ts +19 -12
  81. package/dist/api/View.js +17 -14
  82. package/dist/api/ViewRoute.d.ts +77 -0
  83. package/dist/api/ViewRoute.js +12 -0
  84. package/dist/api/httpClient.d.ts +5 -5
  85. package/dist/api/httpClient.js +4 -2
  86. package/dist/api/index.d.ts +13 -18
  87. package/dist/api/index.js +28 -41
  88. package/dist/api/instance.d.ts +47 -0
  89. package/dist/api/instance.js +71 -0
  90. package/dist/data-contracts.d.ts +245 -0
  91. package/dist/data-contracts.js +12 -0
  92. package/dist/index.d.ts +5 -9
  93. package/dist/index.js +16 -21
  94. package/dist/types/index.d.ts +245 -1
  95. package/dist/types/index.js +10 -17
  96. package/dist/utils/common.d.ts +1 -3
  97. package/dist/utils/common.js +5 -31
  98. package/dist/utils/http.js +4 -6
  99. package/dist/utils/index.d.ts +33 -2
  100. package/dist/utils/index.js +57 -18
  101. package/package.json +11 -6
  102. package/demos/simple.ts +0 -65
  103. package/scripts/generate-api-types.js +0 -571
  104. package/scripts/generate-swagger.js +0 -47
  105. package/scripts/organize-api.js +0 -136
  106. package/src/api/Article.ts +0 -186
  107. package/src/api/Auth.ts +0 -54
  108. package/src/api/Category.ts +0 -82
  109. package/src/api/Comment.ts +0 -95
  110. package/src/api/File.ts +0 -69
  111. package/src/api/Knowledge.ts +0 -122
  112. package/src/api/Page.ts +0 -95
  113. package/src/api/Search.ts +0 -54
  114. package/src/api/Setting.ts +0 -43
  115. package/src/api/Smtp.ts +0 -56
  116. package/src/api/Tag.ts +0 -95
  117. package/src/api/User.ts +0 -72
  118. package/src/api/View.ts +0 -82
  119. package/src/api/api-instance.ts +0 -69
  120. package/src/api/httpClient.ts +0 -140
  121. package/src/api/index.ts +0 -25
  122. package/src/index.ts +0 -18
  123. package/src/types/data-contracts.ts +0 -198
  124. package/src/types/index.ts +0 -4
  125. package/src/utils/common.ts +0 -108
  126. package/src/utils/http.ts +0 -52
  127. package/src/utils/index.ts +0 -5
  128. package/test-final.js +0 -56
  129. package/test-import.js +0 -34
  130. package/tsconfig.json +0 -20
package/dist/Tag.js ADDED
@@ -0,0 +1,98 @@
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.Tag = void 0;
14
+ const HttpClient_1 = require("./HttpClient");
15
+ class Tag extends HttpClient_1.HttpClient {
16
+ constructor() {
17
+ super(...arguments);
18
+ /**
19
+ * No description
20
+ *
21
+ * @tags Tag
22
+ * @name TagControllerCreate
23
+ * @request POST:/tag
24
+ * @response `200` `ITagControllerCreateData` 创建标签
25
+ */
26
+ this.tagControllerCreate = (params = {}) => this.request({
27
+ path: `/tag`,
28
+ method: 'POST',
29
+ ...params,
30
+ });
31
+ /**
32
+ * No description
33
+ *
34
+ * @tags Tag
35
+ * @name TagControllerFindAll
36
+ * @request GET:/tag
37
+ * @response `200` `ITagControllerFindAllData`
38
+ */
39
+ this.tagControllerFindAll = (params = {}) => this.request({
40
+ path: `/tag`,
41
+ method: 'GET',
42
+ ...params,
43
+ });
44
+ /**
45
+ * No description
46
+ *
47
+ * @tags Tag
48
+ * @name TagControllerFindById
49
+ * @request GET:/tag/{id}
50
+ * @response `200` `ITagControllerFindByIdData`
51
+ */
52
+ this.tagControllerFindById = (id, params = {}) => this.request({
53
+ path: `/tag/${id}`,
54
+ method: 'GET',
55
+ ...params,
56
+ });
57
+ /**
58
+ * No description
59
+ *
60
+ * @tags Tag
61
+ * @name TagControllerUpdateById
62
+ * @request PATCH:/tag/{id}
63
+ * @response `200` `ITagControllerUpdateByIdData`
64
+ */
65
+ this.tagControllerUpdateById = (id, params = {}) => this.request({
66
+ path: `/tag/${id}`,
67
+ method: 'PATCH',
68
+ ...params,
69
+ });
70
+ /**
71
+ * No description
72
+ *
73
+ * @tags Tag
74
+ * @name TagControllerDeleteById
75
+ * @request DELETE:/tag/{id}
76
+ * @response `200` `ITagControllerDeleteByIdData`
77
+ */
78
+ this.tagControllerDeleteById = (id, params = {}) => this.request({
79
+ path: `/tag/${id}`,
80
+ method: 'DELETE',
81
+ ...params,
82
+ });
83
+ /**
84
+ * No description
85
+ *
86
+ * @tags Tag
87
+ * @name TagControllerGetArticleById
88
+ * @request GET:/tag/{id}/article
89
+ * @response `200` `ITagControllerGetArticleByIdData`
90
+ */
91
+ this.tagControllerGetArticleById = (id, params = {}) => this.request({
92
+ path: `/tag/${id}/article`,
93
+ method: 'GET',
94
+ ...params,
95
+ });
96
+ }
97
+ }
98
+ exports.Tag = Tag;
package/dist/User.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ import { IUserControllerFindAllData, IUserControllerRegisterData, IUserControllerUpdateData, IUserControllerUpdatePasswordData } from './data-contracts';
2
+ import { HttpClient, RequestParams } from './HttpClient';
3
+ export declare class User<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
4
+ /**
5
+ * No description
6
+ *
7
+ * @tags User
8
+ * @name UserControllerFindAll
9
+ * @request GET:/user
10
+ * @response `200` `IUserControllerFindAllData` 获取用户列表
11
+ * @response `403` `void` 无权获取用户列表
12
+ */
13
+ userControllerFindAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUserControllerFindAllData, any, {}>>;
14
+ /**
15
+ * No description
16
+ *
17
+ * @tags User
18
+ * @name UserControllerRegister
19
+ * @request POST:/user/register
20
+ * @response `201` `IUserControllerRegisterData` 创建用户
21
+ */
22
+ userControllerRegister: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUserControllerRegisterData, any, {}>>;
23
+ /**
24
+ * No description
25
+ *
26
+ * @tags User
27
+ * @name UserControllerUpdate
28
+ * @request POST:/user/update
29
+ * @response `200` `IUserControllerUpdateData` 更新用户成功
30
+ */
31
+ userControllerUpdate: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUserControllerUpdateData, any, {}>>;
32
+ /**
33
+ * No description
34
+ *
35
+ * @tags User
36
+ * @name UserControllerUpdatePassword
37
+ * @request POST:/user/password
38
+ * @response `201` `IUserControllerUpdatePasswordData` 更新密码成功
39
+ */
40
+ userControllerUpdatePassword: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUserControllerUpdatePasswordData, any, {}>>;
41
+ }
package/dist/User.js ADDED
@@ -0,0 +1,73 @@
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.User = void 0;
14
+ const HttpClient_1 = require("./HttpClient");
15
+ class User extends HttpClient_1.HttpClient {
16
+ constructor() {
17
+ super(...arguments);
18
+ /**
19
+ * No description
20
+ *
21
+ * @tags User
22
+ * @name UserControllerFindAll
23
+ * @request GET:/user
24
+ * @response `200` `IUserControllerFindAllData` 获取用户列表
25
+ * @response `403` `void` 无权获取用户列表
26
+ */
27
+ this.userControllerFindAll = (params = {}) => this.request({
28
+ path: `/user`,
29
+ method: 'GET',
30
+ ...params,
31
+ });
32
+ /**
33
+ * No description
34
+ *
35
+ * @tags User
36
+ * @name UserControllerRegister
37
+ * @request POST:/user/register
38
+ * @response `201` `IUserControllerRegisterData` 创建用户
39
+ */
40
+ this.userControllerRegister = (params = {}) => this.request({
41
+ path: `/user/register`,
42
+ method: 'POST',
43
+ ...params,
44
+ });
45
+ /**
46
+ * No description
47
+ *
48
+ * @tags User
49
+ * @name UserControllerUpdate
50
+ * @request POST:/user/update
51
+ * @response `200` `IUserControllerUpdateData` 更新用户成功
52
+ */
53
+ this.userControllerUpdate = (params = {}) => this.request({
54
+ path: `/user/update`,
55
+ method: 'POST',
56
+ ...params,
57
+ });
58
+ /**
59
+ * No description
60
+ *
61
+ * @tags User
62
+ * @name UserControllerUpdatePassword
63
+ * @request POST:/user/password
64
+ * @response `201` `IUserControllerUpdatePasswordData` 更新密码成功
65
+ */
66
+ this.userControllerUpdatePassword = (params = {}) => this.request({
67
+ path: `/user/password`,
68
+ method: 'POST',
69
+ ...params,
70
+ });
71
+ }
72
+ }
73
+ exports.User = User;
package/dist/View.d.ts ADDED
@@ -0,0 +1,49 @@
1
+ import { IViewControllerCreateData } from './data-contracts';
2
+ import { HttpClient, RequestParams } from './HttpClient';
3
+ export declare class View<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
4
+ /**
5
+ * No description
6
+ *
7
+ * @tags View
8
+ * @name ViewControllerCreate
9
+ * @request POST:/view
10
+ * @response `200` `IViewControllerCreateData` 访问记录添加成功
11
+ */
12
+ viewControllerCreate: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IViewControllerCreateData, any, {}>>;
13
+ /**
14
+ * No description
15
+ *
16
+ * @tags View
17
+ * @name ViewControllerFindAll
18
+ * @request GET:/view
19
+ * @response `200` `IViewControllerFindAllData`
20
+ */
21
+ viewControllerFindAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
22
+ /**
23
+ * No description
24
+ *
25
+ * @tags View
26
+ * @name ViewControllerFindByUrl
27
+ * @request GET:/view/url
28
+ * @response `200` `IViewControllerFindByUrlData`
29
+ */
30
+ viewControllerFindByUrl: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
31
+ /**
32
+ * No description
33
+ *
34
+ * @tags View
35
+ * @name ViewControllerFindById
36
+ * @request GET:/view/{id}
37
+ * @response `200` `IViewControllerFindByIdData`
38
+ */
39
+ viewControllerFindById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
40
+ /**
41
+ * No description
42
+ *
43
+ * @tags View
44
+ * @name ViewControllerDeleteById
45
+ * @request DELETE:/view/{id}
46
+ * @response `200` `IViewControllerDeleteByIdData`
47
+ */
48
+ viewControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
49
+ }
package/dist/View.js ADDED
@@ -0,0 +1,85 @@
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.View = void 0;
14
+ const HttpClient_1 = require("./HttpClient");
15
+ class View extends HttpClient_1.HttpClient {
16
+ constructor() {
17
+ super(...arguments);
18
+ /**
19
+ * No description
20
+ *
21
+ * @tags View
22
+ * @name ViewControllerCreate
23
+ * @request POST:/view
24
+ * @response `200` `IViewControllerCreateData` 访问记录添加成功
25
+ */
26
+ this.viewControllerCreate = (params = {}) => this.request({
27
+ path: `/view`,
28
+ method: 'POST',
29
+ ...params,
30
+ });
31
+ /**
32
+ * No description
33
+ *
34
+ * @tags View
35
+ * @name ViewControllerFindAll
36
+ * @request GET:/view
37
+ * @response `200` `IViewControllerFindAllData`
38
+ */
39
+ this.viewControllerFindAll = (params = {}) => this.request({
40
+ path: `/view`,
41
+ method: 'GET',
42
+ ...params,
43
+ });
44
+ /**
45
+ * No description
46
+ *
47
+ * @tags View
48
+ * @name ViewControllerFindByUrl
49
+ * @request GET:/view/url
50
+ * @response `200` `IViewControllerFindByUrlData`
51
+ */
52
+ this.viewControllerFindByUrl = (params = {}) => this.request({
53
+ path: `/view/url`,
54
+ method: 'GET',
55
+ ...params,
56
+ });
57
+ /**
58
+ * No description
59
+ *
60
+ * @tags View
61
+ * @name ViewControllerFindById
62
+ * @request GET:/view/{id}
63
+ * @response `200` `IViewControllerFindByIdData`
64
+ */
65
+ this.viewControllerFindById = (id, params = {}) => this.request({
66
+ path: `/view/${id}`,
67
+ method: 'GET',
68
+ ...params,
69
+ });
70
+ /**
71
+ * No description
72
+ *
73
+ * @tags View
74
+ * @name ViewControllerDeleteById
75
+ * @request DELETE:/view/{id}
76
+ * @response `200` `IViewControllerDeleteByIdData`
77
+ */
78
+ this.viewControllerDeleteById = (id, params = {}) => this.request({
79
+ path: `/view/${id}`,
80
+ method: 'DELETE',
81
+ ...params,
82
+ });
83
+ }
84
+ }
85
+ exports.View = View;
@@ -0,0 +1,39 @@
1
+ import { HttpClientConfig } from './HttpClient';
2
+ import { Article } from './Article';
3
+ import { Auth } from './Auth';
4
+ import { Category } from './Category';
5
+ import { Comment } from './Comment';
6
+ import { File } from './File';
7
+ import { Knowledge } from './Knowledge';
8
+ import { Page } from './Page';
9
+ import { Search } from './Search';
10
+ import { Setting } from './Setting';
11
+ import { Smtp } from './Smtp';
12
+ import { Tag } from './Tag';
13
+ import { User } from './User';
14
+ import { View } from './View';
15
+ export interface ApiConfig<SecurityDataType = unknown> extends HttpClientConfig<SecurityDataType> {
16
+ }
17
+ export interface ApiInstance<SecurityDataType = unknown> {
18
+ article: Article<SecurityDataType>;
19
+ auth: Auth<SecurityDataType>;
20
+ category: Category<SecurityDataType>;
21
+ comment: Comment<SecurityDataType>;
22
+ file: File<SecurityDataType>;
23
+ knowledge: Knowledge<SecurityDataType>;
24
+ page: Page<SecurityDataType>;
25
+ search: Search<SecurityDataType>;
26
+ setting: Setting<SecurityDataType>;
27
+ smtp: Smtp<SecurityDataType>;
28
+ tag: Tag<SecurityDataType>;
29
+ user: User<SecurityDataType>;
30
+ view: View<SecurityDataType>;
31
+ }
32
+ /**
33
+ * 创建 API 实例
34
+ * @param config API 配置
35
+ * @returns API 实例对象
36
+ */
37
+ export declare function createApiInstance<SecurityDataType = unknown>(config?: ApiConfig<SecurityDataType>): ApiInstance<SecurityDataType>;
38
+ export declare const api: ApiInstance<unknown>;
39
+ export default api;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ // API 实例化文件
3
+ // 自动生成,请勿手动修改
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.api = exports.createApiInstance = void 0;
6
+ const HttpClient_1 = require("./HttpClient");
7
+ const Article_1 = require("./Article");
8
+ const Auth_1 = require("./Auth");
9
+ const Category_1 = require("./Category");
10
+ const Comment_1 = require("./Comment");
11
+ const File_1 = require("./File");
12
+ const Knowledge_1 = require("./Knowledge");
13
+ const Page_1 = require("./Page");
14
+ const Search_1 = require("./Search");
15
+ const Setting_1 = require("./Setting");
16
+ const Smtp_1 = require("./Smtp");
17
+ const Tag_1 = require("./Tag");
18
+ const User_1 = require("./User");
19
+ const View_1 = require("./View");
20
+ /**
21
+ * 创建 API 实例
22
+ * @param config API 配置
23
+ * @returns API 实例对象
24
+ */
25
+ function createApiInstance(config = {}) {
26
+ const httpClient = new HttpClient_1.HttpClient(config);
27
+ return {
28
+ article: new Article_1.Article(config),
29
+ auth: new Auth_1.Auth(config),
30
+ category: new Category_1.Category(config),
31
+ comment: new Comment_1.Comment(config),
32
+ file: new File_1.File(config),
33
+ knowledge: new Knowledge_1.Knowledge(config),
34
+ page: new Page_1.Page(config),
35
+ search: new Search_1.Search(config),
36
+ setting: new Setting_1.Setting(config),
37
+ smtp: new Smtp_1.Smtp(config),
38
+ tag: new Tag_1.Tag(config),
39
+ user: new User_1.User(config),
40
+ view: new View_1.View(config),
41
+ };
42
+ }
43
+ exports.createApiInstance = createApiInstance;
44
+ // 默认 API 实例
45
+ exports.api = createApiInstance();
46
+ exports.default = exports.api;
@@ -1,108 +1,123 @@
1
- import { IArticle } from '../types/data-contracts';
2
- import { HttpClient, RequestParams } from './httpClient';
3
- export declare class Article<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1
+ import { IArticleControllerCreateData } from '../types';
2
+ import { HttpClient, RequestParams } from './HttpClient';
3
+ export declare class Article<SecurityDataType = unknown> {
4
+ http: HttpClient<SecurityDataType>;
5
+ constructor(http: HttpClient<SecurityDataType>);
4
6
  /**
5
7
  * No description
6
8
  *
7
9
  * @tags Article
8
- * @name create
10
+ * @name ArticleControllerCreate
9
11
  * @request POST:/article
12
+ * @response `200` `IArticleControllerCreateData` 创建文章
10
13
  */
11
- create: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IArticle[], any, {}>>;
14
+ create: (params?: RequestParams) => Promise<IArticleControllerCreateData>;
12
15
  /**
13
16
  * No description
14
17
  *
15
18
  * @tags Article
16
- * @name findAll
19
+ * @name ArticleControllerFindAll
17
20
  * @request GET:/article
21
+ * @response `200` `IArticleControllerFindAllData`
18
22
  */
19
- findAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
23
+ findAll: (params?: RequestParams) => Promise<any>;
20
24
  /**
21
25
  * No description
22
26
  *
23
27
  * @tags Article
24
- * @name findByCategory
28
+ * @name ArticleControllerFindArticlesByCategory
25
29
  * @request GET:/article/category/{id}
30
+ * @response `200` `IArticleControllerFindArticlesByCategoryData`
26
31
  */
27
- findByCategory: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
32
+ findArticlesByCategory: (id: string, params?: RequestParams) => Promise<any>;
28
33
  /**
29
34
  * No description
30
35
  *
31
36
  * @tags Article
32
- * @name findByTag
37
+ * @name ArticleControllerFindArticlesByTag
33
38
  * @request GET:/article/tag/{id}
39
+ * @response `200` `IArticleControllerFindArticlesByTagData`
34
40
  */
35
- findByTag: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
41
+ findArticlesByTag: (id: string, params?: RequestParams) => Promise<any>;
36
42
  /**
37
43
  * No description
38
44
  *
39
45
  * @tags Article
40
- * @name getRecommendations
46
+ * @name ArticleControllerGetRecommendArticles
41
47
  * @request GET:/article/all/recommend
48
+ * @response `200` `IArticleControllerGetRecommendArticlesData`
42
49
  */
43
- getRecommendations: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
50
+ getRecommendArticles: (params?: RequestParams) => Promise<any>;
44
51
  /**
45
52
  * No description
46
53
  *
47
54
  * @tags Article
48
- * @name getArchives
55
+ * @name ArticleControllerGetArchives
49
56
  * @request GET:/article/archives
57
+ * @response `200` `IArticleControllerGetArchivesData`
50
58
  */
51
- getArchives: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
59
+ getArchives: (params?: RequestParams) => Promise<any>;
52
60
  /**
53
61
  * No description
54
62
  *
55
63
  * @tags Article
56
- * @name recommend
64
+ * @name ArticleControllerRecommend
57
65
  * @request GET:/article/recommend
66
+ * @response `200` `IArticleControllerRecommendData`
58
67
  */
59
- recommend: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
68
+ recommend: (params?: RequestParams) => Promise<any>;
60
69
  /**
61
70
  * No description
62
71
  *
63
72
  * @tags Article
64
- * @name findById
73
+ * @name ArticleControllerFindById
65
74
  * @request GET:/article/{id}
75
+ * @response `200` `IArticleControllerFindByIdData`
66
76
  */
67
- findById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
77
+ findById: (id: string, params?: RequestParams) => Promise<any>;
68
78
  /**
69
79
  * No description
70
80
  *
71
81
  * @tags Article
72
- * @name updateById
82
+ * @name ArticleControllerUpdateById
73
83
  * @request PATCH:/article/{id}
84
+ * @response `200` `IArticleControllerUpdateByIdData`
74
85
  */
75
- updateById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
86
+ updateById: (id: string, params?: RequestParams) => Promise<any>;
76
87
  /**
77
88
  * No description
78
89
  *
79
90
  * @tags Article
80
- * @name deleteById
91
+ * @name ArticleControllerDeleteById
81
92
  * @request DELETE:/article/{id}
93
+ * @response `200` `IArticleControllerDeleteByIdData`
82
94
  */
83
- deleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
95
+ deleteById: (id: string, params?: RequestParams) => Promise<any>;
84
96
  /**
85
97
  * No description
86
98
  *
87
99
  * @tags Article
88
- * @name checkPassword
100
+ * @name ArticleControllerCheckPassword
89
101
  * @request POST:/article/{id}/checkPassword
102
+ * @response `200` `IArticleControllerCheckPasswordData`
90
103
  */
91
- checkPassword: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
104
+ checkPassword: (id: string, params?: RequestParams) => Promise<any>;
92
105
  /**
93
106
  * No description
94
107
  *
95
108
  * @tags Article
96
- * @name updateViews
109
+ * @name ArticleControllerUpdateViewsById
97
110
  * @request POST:/article/{id}/views
111
+ * @response `200` `IArticleControllerUpdateViewsByIdData`
98
112
  */
99
- updateViews: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
113
+ updateViewsById: (id: string, params?: RequestParams) => Promise<any>;
100
114
  /**
101
115
  * No description
102
116
  *
103
117
  * @tags Article
104
- * @name updateLikes
118
+ * @name ArticleControllerUpdateLikesById
105
119
  * @request POST:/article/{id}/likes
120
+ * @response `200` `IArticleControllerUpdateLikesByIdData`
106
121
  */
107
- updateLikes: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
122
+ updateLikesById: (id: string, params?: RequestParams) => Promise<any>;
108
123
  }