@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
@@ -1,27 +1,32 @@
1
- import { HttpClient, RequestParams } from './httpClient';
2
- export declare class Search<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1
+ import { HttpClient, RequestParams } from './HttpClient';
2
+ export declare class Search<SecurityDataType = unknown> {
3
+ http: HttpClient<SecurityDataType>;
4
+ constructor(http: HttpClient<SecurityDataType>);
3
5
  /**
4
6
  * No description
5
7
  *
6
8
  * @tags Search
7
9
  * @name SearchControllerSearchArticle
8
10
  * @request GET:/search/article
11
+ * @response `200` `ISearchControllerSearchArticleData`
9
12
  */
10
- searchControllerSearchArticle: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
13
+ searchArticle: (params?: RequestParams) => Promise<any>;
11
14
  /**
12
15
  * No description
13
16
  *
14
17
  * @tags Search
15
- * @name findAll
18
+ * @name SearchControllerFindAll
16
19
  * @request GET:/search
20
+ * @response `200` `ISearchControllerFindAllData`
17
21
  */
18
- findAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
22
+ findAll: (params?: RequestParams) => Promise<any>;
19
23
  /**
20
24
  * No description
21
25
  *
22
26
  * @tags Search
23
- * @name deleteById
27
+ * @name SearchControllerDeleteById
24
28
  * @request DELETE:/search/{id}
29
+ * @response `200` `ISearchControllerDeleteByIdData`
25
30
  */
26
- deleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
31
+ deleteById: (id: string, params?: RequestParams) => Promise<any>;
27
32
  }
@@ -11,18 +11,17 @@
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.Search = void 0;
14
- const httpClient_1 = require("./httpClient");
15
- class Search extends httpClient_1.HttpClient {
16
- constructor() {
17
- super(...arguments);
14
+ class Search {
15
+ constructor(http) {
18
16
  /**
19
17
  * No description
20
18
  *
21
19
  * @tags Search
22
20
  * @name SearchControllerSearchArticle
23
21
  * @request GET:/search/article
22
+ * @response `200` `ISearchControllerSearchArticleData`
24
23
  */
25
- this.searchControllerSearchArticle = (params = {}) => this.request({
24
+ this.searchArticle = (params = {}) => this.http.request({
26
25
  path: `/search/article`,
27
26
  method: 'GET',
28
27
  ...params,
@@ -31,10 +30,11 @@ class Search extends httpClient_1.HttpClient {
31
30
  * No description
32
31
  *
33
32
  * @tags Search
34
- * @name findAll
33
+ * @name SearchControllerFindAll
35
34
  * @request GET:/search
35
+ * @response `200` `ISearchControllerFindAllData`
36
36
  */
37
- this.findAll = (params = {}) => this.request({
37
+ this.findAll = (params = {}) => this.http.request({
38
38
  path: `/search`,
39
39
  method: 'GET',
40
40
  ...params,
@@ -43,14 +43,16 @@ class Search extends httpClient_1.HttpClient {
43
43
  * No description
44
44
  *
45
45
  * @tags Search
46
- * @name deleteById
46
+ * @name SearchControllerDeleteById
47
47
  * @request DELETE:/search/{id}
48
+ * @response `200` `ISearchControllerDeleteByIdData`
48
49
  */
49
- this.deleteById = (id, params = {}) => this.request({
50
+ this.deleteById = (id, params = {}) => this.http.request({
50
51
  path: `/search/${id}`,
51
52
  method: 'DELETE',
52
53
  ...params,
53
54
  });
55
+ this.http = http;
54
56
  }
55
57
  }
56
58
  exports.Search = Search;
@@ -0,0 +1,46 @@
1
+ export declare namespace Search {
2
+ /**
3
+ * No description
4
+ * @tags Search
5
+ * @name searchArticle
6
+ * @request GET:/search/article
7
+ * @response `200` `void`
8
+ */
9
+ namespace searchArticle {
10
+ type RequestParams = {};
11
+ type RequestQuery = {};
12
+ type RequestBody = never;
13
+ type RequestHeaders = {};
14
+ type ResponseBody = void;
15
+ }
16
+ /**
17
+ * No description
18
+ * @tags Search
19
+ * @name findAll
20
+ * @request GET:/search
21
+ * @response `200` `void`
22
+ */
23
+ namespace findAll {
24
+ type RequestParams = {};
25
+ type RequestQuery = {};
26
+ type RequestBody = never;
27
+ type RequestHeaders = {};
28
+ type ResponseBody = void;
29
+ }
30
+ /**
31
+ * No description
32
+ * @tags Search
33
+ * @name deleteById
34
+ * @request DELETE:/search/{id}
35
+ * @response `200` `void`
36
+ */
37
+ namespace deleteById {
38
+ type RequestParams = {
39
+ id: string;
40
+ };
41
+ type RequestQuery = {};
42
+ type RequestBody = never;
43
+ type RequestHeaders = {};
44
+ type ResponseBody = void;
45
+ }
46
+ }
@@ -0,0 +1,12 @@
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 });
@@ -1,20 +1,24 @@
1
- import { ISetting } from '../types/data-contracts';
2
- import { HttpClient, RequestParams } from './httpClient';
3
- export declare class Setting<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1
+ import { ISettingControllerUpdateData } from '../types';
2
+ import { HttpClient, RequestParams } from './HttpClient';
3
+ export declare class Setting<SecurityDataType = unknown> {
4
+ http: HttpClient<SecurityDataType>;
5
+ constructor(http: HttpClient<SecurityDataType>);
4
6
  /**
5
7
  * No description
6
8
  *
7
9
  * @tags Setting
8
10
  * @name SettingControllerUpdate
9
11
  * @request POST:/setting
12
+ * @response `200` `ISettingControllerUpdateData` 更新设置
10
13
  */
11
- settingControllerUpdate: (params?: RequestParams) => Promise<import("axios").AxiosResponse<ISetting[], any, {}>>;
14
+ update: (params?: RequestParams) => Promise<ISettingControllerUpdateData>;
12
15
  /**
13
16
  * No description
14
17
  *
15
18
  * @tags Setting
16
- * @name findAll
19
+ * @name SettingControllerFindAll
17
20
  * @request POST:/setting/get
21
+ * @response `200` `ISettingControllerFindAllData`
18
22
  */
19
- findAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
23
+ findAll: (params?: RequestParams) => Promise<any>;
20
24
  }
@@ -11,35 +11,35 @@
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.Setting = void 0;
14
- const httpClient_1 = require("./httpClient");
15
- class Setting extends httpClient_1.HttpClient {
16
- constructor() {
17
- super(...arguments);
14
+ class Setting {
15
+ constructor(http) {
18
16
  /**
19
17
  * No description
20
18
  *
21
19
  * @tags Setting
22
20
  * @name SettingControllerUpdate
23
21
  * @request POST:/setting
22
+ * @response `200` `ISettingControllerUpdateData` 更新设置
24
23
  */
25
- this.settingControllerUpdate = (params = {}) => this.request({
24
+ this.update = (params = {}) => this.http.request({
26
25
  path: `/setting`,
27
26
  method: 'POST',
28
- format: 'json',
29
27
  ...params,
30
28
  });
31
29
  /**
32
30
  * No description
33
31
  *
34
32
  * @tags Setting
35
- * @name findAll
33
+ * @name SettingControllerFindAll
36
34
  * @request POST:/setting/get
35
+ * @response `200` `ISettingControllerFindAllData`
37
36
  */
38
- this.findAll = (params = {}) => this.request({
37
+ this.findAll = (params = {}) => this.http.request({
39
38
  path: `/setting/get`,
40
39
  method: 'POST',
41
40
  ...params,
42
41
  });
42
+ this.http = http;
43
43
  }
44
44
  }
45
45
  exports.Setting = Setting;
@@ -0,0 +1,31 @@
1
+ import { ISetting } from '../types/data-contracts';
2
+ export declare namespace Setting {
3
+ /**
4
+ * No description
5
+ * @tags Setting
6
+ * @name update
7
+ * @request POST:/setting
8
+ * @response `200` `(ISetting)[]` 更新设置
9
+ */
10
+ namespace update {
11
+ type RequestParams = {};
12
+ type RequestQuery = {};
13
+ type RequestBody = never;
14
+ type RequestHeaders = {};
15
+ type ResponseBody = ISetting[];
16
+ }
17
+ /**
18
+ * No description
19
+ * @tags Setting
20
+ * @name findAll
21
+ * @request POST:/setting/get
22
+ * @response `200` `void`
23
+ */
24
+ namespace findAll {
25
+ type RequestParams = {};
26
+ type RequestQuery = {};
27
+ type RequestBody = never;
28
+ type RequestHeaders = {};
29
+ type ResponseBody = void;
30
+ }
31
+ }
@@ -0,0 +1,12 @@
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 });
@@ -1,28 +1,33 @@
1
- import { I_SMTP } from '../types/data-contracts';
2
- import { HttpClient, RequestParams } from './httpClient';
3
- export declare class Smtp<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1
+ import { ISmtpControllerCreateData } from '../types';
2
+ import { HttpClient, RequestParams } from './HttpClient';
3
+ export declare class Smtp<SecurityDataType = unknown> {
4
+ http: HttpClient<SecurityDataType>;
5
+ constructor(http: HttpClient<SecurityDataType>);
4
6
  /**
5
7
  * No description
6
8
  *
7
9
  * @tags Smtp
8
- * @name create
10
+ * @name SmtpControllerCreate
9
11
  * @request POST:/smtp
12
+ * @response `200` `ISmtpControllerCreateData` 发送邮件
10
13
  */
11
- create: (params?: RequestParams) => Promise<import("axios").AxiosResponse<I_SMTP[], any, {}>>;
14
+ create: (params?: RequestParams) => Promise<ISmtpControllerCreateData>;
12
15
  /**
13
16
  * No description
14
17
  *
15
18
  * @tags Smtp
16
- * @name findAll
19
+ * @name SmtpControllerFindAll
17
20
  * @request GET:/smtp
21
+ * @response `200` `ISmtpControllerFindAllData`
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 Smtp
24
- * @name deleteById
28
+ * @name SmtpControllerDeleteById
25
29
  * @request DELETE:/smtp/{id}
30
+ * @response `200` `ISmtpControllerDeleteByIdData`
26
31
  */
27
- deleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
32
+ deleteById: (id: string, params?: RequestParams) => Promise<any>;
28
33
  }
package/dist/api/Smtp.js CHANGED
@@ -11,31 +11,30 @@
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.Smtp = void 0;
14
- const httpClient_1 = require("./httpClient");
15
- class Smtp extends httpClient_1.HttpClient {
16
- constructor() {
17
- super(...arguments);
14
+ class Smtp {
15
+ constructor(http) {
18
16
  /**
19
17
  * No description
20
18
  *
21
19
  * @tags Smtp
22
- * @name create
20
+ * @name SmtpControllerCreate
23
21
  * @request POST:/smtp
22
+ * @response `200` `ISmtpControllerCreateData` 发送邮件
24
23
  */
25
- this.create = (params = {}) => this.request({
24
+ this.create = (params = {}) => this.http.request({
26
25
  path: `/smtp`,
27
26
  method: 'POST',
28
- format: 'json',
29
27
  ...params,
30
28
  });
31
29
  /**
32
30
  * No description
33
31
  *
34
32
  * @tags Smtp
35
- * @name findAll
33
+ * @name SmtpControllerFindAll
36
34
  * @request GET:/smtp
35
+ * @response `200` `ISmtpControllerFindAllData`
37
36
  */
38
- this.findAll = (params = {}) => this.request({
37
+ this.findAll = (params = {}) => this.http.request({
39
38
  path: `/smtp`,
40
39
  method: 'GET',
41
40
  ...params,
@@ -44,14 +43,16 @@ class Smtp extends httpClient_1.HttpClient {
44
43
  * No description
45
44
  *
46
45
  * @tags Smtp
47
- * @name deleteById
46
+ * @name SmtpControllerDeleteById
48
47
  * @request DELETE:/smtp/{id}
48
+ * @response `200` `ISmtpControllerDeleteByIdData`
49
49
  */
50
- this.deleteById = (id, params = {}) => this.request({
50
+ this.deleteById = (id, params = {}) => this.http.request({
51
51
  path: `/smtp/${id}`,
52
52
  method: 'DELETE',
53
53
  ...params,
54
54
  });
55
+ this.http = http;
55
56
  }
56
57
  }
57
58
  exports.Smtp = Smtp;
@@ -0,0 +1,47 @@
1
+ import { I_SMTP } from '../types/data-contracts';
2
+ export declare namespace Smtp {
3
+ /**
4
+ * No description
5
+ * @tags Smtp
6
+ * @name create
7
+ * @request POST:/smtp
8
+ * @response `200` `(I_SMTP)[]` 发送邮件
9
+ */
10
+ namespace create {
11
+ type RequestParams = {};
12
+ type RequestQuery = {};
13
+ type RequestBody = never;
14
+ type RequestHeaders = {};
15
+ type ResponseBody = I_SMTP[];
16
+ }
17
+ /**
18
+ * No description
19
+ * @tags Smtp
20
+ * @name findAll
21
+ * @request GET:/smtp
22
+ * @response `200` `void`
23
+ */
24
+ namespace findAll {
25
+ type RequestParams = {};
26
+ type RequestQuery = {};
27
+ type RequestBody = never;
28
+ type RequestHeaders = {};
29
+ type ResponseBody = void;
30
+ }
31
+ /**
32
+ * No description
33
+ * @tags Smtp
34
+ * @name deleteById
35
+ * @request DELETE:/smtp/{id}
36
+ * @response `200` `void`
37
+ */
38
+ namespace deleteById {
39
+ type RequestParams = {
40
+ id: string;
41
+ };
42
+ type RequestQuery = {};
43
+ type RequestBody = never;
44
+ type RequestHeaders = {};
45
+ type ResponseBody = void;
46
+ }
47
+ }
@@ -0,0 +1,12 @@
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 });
package/dist/api/Tag.d.ts CHANGED
@@ -1,52 +1,60 @@
1
- import { ITag } from '../types/data-contracts';
2
- import { HttpClient, RequestParams } from './httpClient';
3
- export declare class Tag<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1
+ import { ITagControllerCreateData } from '../types';
2
+ import { HttpClient, RequestParams } from './HttpClient';
3
+ export declare class Tag<SecurityDataType = unknown> {
4
+ http: HttpClient<SecurityDataType>;
5
+ constructor(http: HttpClient<SecurityDataType>);
4
6
  /**
5
7
  * No description
6
8
  *
7
9
  * @tags Tag
8
- * @name create
10
+ * @name TagControllerCreate
9
11
  * @request POST:/tag
12
+ * @response `200` `ITagControllerCreateData` 创建标签
10
13
  */
11
- create: (params?: RequestParams) => Promise<import("axios").AxiosResponse<ITag[], any, {}>>;
14
+ create: (params?: RequestParams) => Promise<ITagControllerCreateData>;
12
15
  /**
13
16
  * No description
14
17
  *
15
18
  * @tags Tag
16
- * @name findAll
19
+ * @name TagControllerFindAll
17
20
  * @request GET:/tag
21
+ * @response `200` `ITagControllerFindAllData`
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 Tag
24
- * @name findById
28
+ * @name TagControllerFindById
25
29
  * @request GET:/tag/{id}
30
+ * @response `200` `ITagControllerFindByIdData`
26
31
  */
27
- findById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
32
+ findById: (id: string, params?: RequestParams) => Promise<any>;
28
33
  /**
29
34
  * No description
30
35
  *
31
36
  * @tags Tag
32
- * @name updateById
37
+ * @name TagControllerUpdateById
33
38
  * @request PATCH:/tag/{id}
39
+ * @response `200` `ITagControllerUpdateByIdData`
34
40
  */
35
- updateById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
41
+ updateById: (id: string, params?: RequestParams) => Promise<any>;
36
42
  /**
37
43
  * No description
38
44
  *
39
45
  * @tags Tag
40
- * @name deleteById
46
+ * @name TagControllerDeleteById
41
47
  * @request DELETE:/tag/{id}
48
+ * @response `200` `ITagControllerDeleteByIdData`
42
49
  */
43
- deleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
50
+ deleteById: (id: string, params?: RequestParams) => Promise<any>;
44
51
  /**
45
52
  * No description
46
53
  *
47
54
  * @tags Tag
48
55
  * @name TagControllerGetArticleById
49
56
  * @request GET:/tag/{id}/article
57
+ * @response `200` `ITagControllerGetArticleByIdData`
50
58
  */
51
- tagControllerGetArticleById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
59
+ getArticleById: (id: string, params?: RequestParams) => Promise<any>;
52
60
  }
package/dist/api/Tag.js CHANGED
@@ -11,31 +11,30 @@
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.Tag = void 0;
14
- const httpClient_1 = require("./httpClient");
15
- class Tag extends httpClient_1.HttpClient {
16
- constructor() {
17
- super(...arguments);
14
+ class Tag {
15
+ constructor(http) {
18
16
  /**
19
17
  * No description
20
18
  *
21
19
  * @tags Tag
22
- * @name create
20
+ * @name TagControllerCreate
23
21
  * @request POST:/tag
22
+ * @response `200` `ITagControllerCreateData` 创建标签
24
23
  */
25
- this.create = (params = {}) => this.request({
24
+ this.create = (params = {}) => this.http.request({
26
25
  path: `/tag`,
27
26
  method: 'POST',
28
- format: 'json',
29
27
  ...params,
30
28
  });
31
29
  /**
32
30
  * No description
33
31
  *
34
32
  * @tags Tag
35
- * @name findAll
33
+ * @name TagControllerFindAll
36
34
  * @request GET:/tag
35
+ * @response `200` `ITagControllerFindAllData`
37
36
  */
38
- this.findAll = (params = {}) => this.request({
37
+ this.findAll = (params = {}) => this.http.request({
39
38
  path: `/tag`,
40
39
  method: 'GET',
41
40
  ...params,
@@ -44,10 +43,11 @@ class Tag extends httpClient_1.HttpClient {
44
43
  * No description
45
44
  *
46
45
  * @tags Tag
47
- * @name findById
46
+ * @name TagControllerFindById
48
47
  * @request GET:/tag/{id}
48
+ * @response `200` `ITagControllerFindByIdData`
49
49
  */
50
- this.findById = (id, params = {}) => this.request({
50
+ this.findById = (id, params = {}) => this.http.request({
51
51
  path: `/tag/${id}`,
52
52
  method: 'GET',
53
53
  ...params,
@@ -56,10 +56,11 @@ class Tag extends httpClient_1.HttpClient {
56
56
  * No description
57
57
  *
58
58
  * @tags Tag
59
- * @name updateById
59
+ * @name TagControllerUpdateById
60
60
  * @request PATCH:/tag/{id}
61
+ * @response `200` `ITagControllerUpdateByIdData`
61
62
  */
62
- this.updateById = (id, params = {}) => this.request({
63
+ this.updateById = (id, params = {}) => this.http.request({
63
64
  path: `/tag/${id}`,
64
65
  method: 'PATCH',
65
66
  ...params,
@@ -68,10 +69,11 @@ class Tag extends httpClient_1.HttpClient {
68
69
  * No description
69
70
  *
70
71
  * @tags Tag
71
- * @name deleteById
72
+ * @name TagControllerDeleteById
72
73
  * @request DELETE:/tag/{id}
74
+ * @response `200` `ITagControllerDeleteByIdData`
73
75
  */
74
- this.deleteById = (id, params = {}) => this.request({
76
+ this.deleteById = (id, params = {}) => this.http.request({
75
77
  path: `/tag/${id}`,
76
78
  method: 'DELETE',
77
79
  ...params,
@@ -82,12 +84,14 @@ class Tag extends httpClient_1.HttpClient {
82
84
  * @tags Tag
83
85
  * @name TagControllerGetArticleById
84
86
  * @request GET:/tag/{id}/article
87
+ * @response `200` `ITagControllerGetArticleByIdData`
85
88
  */
86
- this.tagControllerGetArticleById = (id, params = {}) => this.request({
89
+ this.getArticleById = (id, params = {}) => this.http.request({
87
90
  path: `/tag/${id}/article`,
88
91
  method: 'GET',
89
92
  ...params,
90
93
  });
94
+ this.http = http;
91
95
  }
92
96
  }
93
97
  exports.Tag = Tag;