@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.
- package/README.md +405 -0
- package/dist/Article.d.ts +121 -0
- package/dist/Article.js +189 -0
- package/dist/Auth.d.ts +30 -0
- package/dist/Auth.js +59 -0
- package/dist/Category.d.ts +49 -0
- package/dist/Category.js +85 -0
- package/dist/Comment.d.ts +58 -0
- package/dist/Comment.js +98 -0
- package/dist/File.d.ts +40 -0
- package/dist/File.js +72 -0
- package/dist/HttpClient.d.ts +41 -0
- package/dist/HttpClient.js +94 -0
- package/dist/Knowledge.d.ts +76 -0
- package/dist/Knowledge.js +124 -0
- package/dist/Page.d.ts +58 -0
- package/dist/Page.js +98 -0
- package/dist/Search.d.ts +30 -0
- package/dist/Search.js +59 -0
- package/dist/Setting.d.ts +22 -0
- package/dist/Setting.js +46 -0
- package/dist/Smtp.d.ts +31 -0
- package/dist/Smtp.js +59 -0
- package/dist/Tag.d.ts +58 -0
- package/dist/Tag.js +98 -0
- package/dist/User.d.ts +41 -0
- package/dist/User.js +73 -0
- package/dist/View.d.ts +49 -0
- package/dist/View.js +85 -0
- package/dist/api/ApiInstance.d.ts +39 -0
- package/dist/api/ApiInstance.js +46 -0
- package/dist/api/Article.d.ts +44 -29
- package/dist/api/Article.js +42 -31
- package/dist/api/ArticleRoute.d.ts +201 -0
- package/dist/api/ArticleRoute.js +12 -0
- package/dist/api/Auth.d.ts +11 -6
- package/dist/api/Auth.js +10 -8
- package/dist/api/AuthRoute.d.ts +44 -0
- package/dist/api/AuthRoute.js +12 -0
- package/dist/api/Category.d.ts +20 -13
- package/dist/api/Category.js +18 -15
- package/dist/api/CategoryRoute.d.ts +79 -0
- package/dist/api/CategoryRoute.js +12 -0
- package/dist/api/Comment.d.ts +22 -14
- package/dist/api/Comment.js +20 -16
- package/dist/api/CommentRoute.d.ts +95 -0
- package/dist/api/CommentRoute.js +12 -0
- package/dist/api/File.d.ts +16 -10
- package/dist/api/File.js +14 -12
- package/dist/api/FileRoute.d.ts +63 -0
- package/dist/api/FileRoute.js +12 -0
- package/dist/api/Knowledge.d.ts +29 -19
- package/dist/api/Knowledge.js +27 -22
- package/dist/api/KnowledgeRoute.d.ts +125 -0
- package/dist/api/KnowledgeRoute.js +12 -0
- package/dist/api/Page.d.ts +23 -15
- package/dist/api/Page.js +21 -17
- package/dist/api/PageRoute.d.ts +95 -0
- package/dist/api/PageRoute.js +12 -0
- package/dist/api/Search.d.ts +12 -7
- package/dist/api/Search.js +11 -9
- package/dist/api/SearchRoute.d.ts +46 -0
- package/dist/api/SearchRoute.js +12 -0
- package/dist/api/Setting.d.ts +10 -6
- package/dist/api/Setting.js +8 -8
- package/dist/api/SettingRoute.d.ts +31 -0
- package/dist/api/SettingRoute.js +12 -0
- package/dist/api/Smtp.d.ts +14 -9
- package/dist/api/Smtp.js +12 -11
- package/dist/api/SmtpRoute.d.ts +47 -0
- package/dist/api/SmtpRoute.js +12 -0
- package/dist/api/Tag.d.ts +22 -14
- package/dist/api/Tag.js +20 -16
- package/dist/api/TagRoute.d.ts +95 -0
- package/dist/api/TagRoute.js +12 -0
- package/dist/api/User.d.ts +15 -8
- package/dist/api/User.js +13 -13
- package/dist/api/UserRoute.d.ts +60 -0
- package/dist/api/UserRoute.js +12 -0
- package/dist/api/View.d.ts +19 -12
- package/dist/api/View.js +17 -14
- package/dist/api/ViewRoute.d.ts +77 -0
- package/dist/api/ViewRoute.js +12 -0
- package/dist/api/httpClient.d.ts +5 -5
- package/dist/api/httpClient.js +4 -2
- package/dist/api/index.d.ts +13 -18
- package/dist/api/index.js +28 -41
- package/dist/api/instance.d.ts +47 -0
- package/dist/api/instance.js +71 -0
- package/dist/data-contracts.d.ts +245 -0
- package/dist/data-contracts.js +12 -0
- package/dist/index.d.ts +5 -9
- package/dist/index.js +16 -21
- package/dist/types/index.d.ts +245 -1
- package/dist/types/index.js +10 -17
- package/dist/utils/common.d.ts +1 -3
- package/dist/utils/common.js +5 -31
- package/dist/utils/http.js +4 -6
- package/dist/utils/index.d.ts +33 -2
- package/dist/utils/index.js +57 -18
- package/package.json +11 -6
- package/demos/simple.ts +0 -65
- package/scripts/generate-api-types.js +0 -571
- package/scripts/generate-swagger.js +0 -47
- package/scripts/organize-api.js +0 -136
- package/src/api/Article.ts +0 -186
- package/src/api/Auth.ts +0 -54
- package/src/api/Category.ts +0 -82
- package/src/api/Comment.ts +0 -95
- package/src/api/File.ts +0 -69
- package/src/api/Knowledge.ts +0 -122
- package/src/api/Page.ts +0 -95
- package/src/api/Search.ts +0 -54
- package/src/api/Setting.ts +0 -43
- package/src/api/Smtp.ts +0 -56
- package/src/api/Tag.ts +0 -95
- package/src/api/User.ts +0 -72
- package/src/api/View.ts +0 -82
- package/src/api/api-instance.ts +0 -69
- package/src/api/httpClient.ts +0 -140
- package/src/api/index.ts +0 -25
- package/src/index.ts +0 -18
- package/src/types/data-contracts.ts +0 -198
- package/src/types/index.ts +0 -4
- package/src/utils/common.ts +0 -108
- package/src/utils/http.ts +0 -52
- package/src/utils/index.ts +0 -5
- package/test-final.js +0 -56
- package/test-import.js +0 -34
- package/tsconfig.json +0 -20
package/dist/api/Category.js
CHANGED
|
@@ -11,31 +11,30 @@
|
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.Category = void 0;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
14
|
+
class Category {
|
|
15
|
+
constructor(http) {
|
|
18
16
|
/**
|
|
19
17
|
* No description
|
|
20
18
|
*
|
|
21
19
|
* @tags Category
|
|
22
|
-
* @name
|
|
20
|
+
* @name CategoryControllerCreate
|
|
23
21
|
* @request POST:/category
|
|
22
|
+
* @response `200` `ICategoryControllerCreateData` 添加分类
|
|
24
23
|
*/
|
|
25
|
-
this.create = (params = {}) => this.request({
|
|
24
|
+
this.create = (params = {}) => this.http.request({
|
|
26
25
|
path: `/category`,
|
|
27
26
|
method: 'POST',
|
|
28
|
-
format: 'json',
|
|
29
27
|
...params,
|
|
30
28
|
});
|
|
31
29
|
/**
|
|
32
30
|
* No description
|
|
33
31
|
*
|
|
34
32
|
* @tags Category
|
|
35
|
-
* @name
|
|
33
|
+
* @name CategoryControllerFindAll
|
|
36
34
|
* @request GET:/category
|
|
35
|
+
* @response `200` `ICategoryControllerFindAllData`
|
|
37
36
|
*/
|
|
38
|
-
this.findAll = (params = {}) => this.request({
|
|
37
|
+
this.findAll = (params = {}) => this.http.request({
|
|
39
38
|
path: `/category`,
|
|
40
39
|
method: 'GET',
|
|
41
40
|
...params,
|
|
@@ -44,10 +43,11 @@ class Category extends httpClient_1.HttpClient {
|
|
|
44
43
|
* No description
|
|
45
44
|
*
|
|
46
45
|
* @tags Category
|
|
47
|
-
* @name
|
|
46
|
+
* @name CategoryControllerFindById
|
|
48
47
|
* @request GET:/category/{id}
|
|
48
|
+
* @response `200` `ICategoryControllerFindByIdData`
|
|
49
49
|
*/
|
|
50
|
-
this.findById = (id, params = {}) => this.request({
|
|
50
|
+
this.findById = (id, params = {}) => this.http.request({
|
|
51
51
|
path: `/category/${id}`,
|
|
52
52
|
method: 'GET',
|
|
53
53
|
...params,
|
|
@@ -56,10 +56,11 @@ class Category extends httpClient_1.HttpClient {
|
|
|
56
56
|
* No description
|
|
57
57
|
*
|
|
58
58
|
* @tags Category
|
|
59
|
-
* @name
|
|
59
|
+
* @name CategoryControllerUpdateById
|
|
60
60
|
* @request PATCH:/category/{id}
|
|
61
|
+
* @response `200` `ICategoryControllerUpdateByIdData`
|
|
61
62
|
*/
|
|
62
|
-
this.updateById = (id, params = {}) => this.request({
|
|
63
|
+
this.updateById = (id, params = {}) => this.http.request({
|
|
63
64
|
path: `/category/${id}`,
|
|
64
65
|
method: 'PATCH',
|
|
65
66
|
...params,
|
|
@@ -68,14 +69,16 @@ class Category extends httpClient_1.HttpClient {
|
|
|
68
69
|
* No description
|
|
69
70
|
*
|
|
70
71
|
* @tags Category
|
|
71
|
-
* @name
|
|
72
|
+
* @name CategoryControllerDeleteById
|
|
72
73
|
* @request DELETE:/category/{id}
|
|
74
|
+
* @response `200` `ICategoryControllerDeleteByIdData`
|
|
73
75
|
*/
|
|
74
|
-
this.deleteById = (id, params = {}) => this.request({
|
|
76
|
+
this.deleteById = (id, params = {}) => this.http.request({
|
|
75
77
|
path: `/category/${id}`,
|
|
76
78
|
method: 'DELETE',
|
|
77
79
|
...params,
|
|
78
80
|
});
|
|
81
|
+
this.http = http;
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
exports.Category = Category;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ICategory } from '../types/data-contracts';
|
|
2
|
+
export declare namespace Category {
|
|
3
|
+
/**
|
|
4
|
+
* No description
|
|
5
|
+
* @tags Category
|
|
6
|
+
* @name create
|
|
7
|
+
* @request POST:/category
|
|
8
|
+
* @response `200` `(ICategory)[]` 添加分类
|
|
9
|
+
*/
|
|
10
|
+
namespace create {
|
|
11
|
+
type RequestParams = {};
|
|
12
|
+
type RequestQuery = {};
|
|
13
|
+
type RequestBody = never;
|
|
14
|
+
type RequestHeaders = {};
|
|
15
|
+
type ResponseBody = ICategory[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* No description
|
|
19
|
+
* @tags Category
|
|
20
|
+
* @name findAll
|
|
21
|
+
* @request GET:/category
|
|
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 Category
|
|
34
|
+
* @name findById
|
|
35
|
+
* @request GET:/category/{id}
|
|
36
|
+
* @response `200` `void`
|
|
37
|
+
*/
|
|
38
|
+
namespace findById {
|
|
39
|
+
type RequestParams = {
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
42
|
+
type RequestQuery = {};
|
|
43
|
+
type RequestBody = never;
|
|
44
|
+
type RequestHeaders = {};
|
|
45
|
+
type ResponseBody = void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* No description
|
|
49
|
+
* @tags Category
|
|
50
|
+
* @name updateById
|
|
51
|
+
* @request PATCH:/category/{id}
|
|
52
|
+
* @response `200` `void`
|
|
53
|
+
*/
|
|
54
|
+
namespace updateById {
|
|
55
|
+
type RequestParams = {
|
|
56
|
+
id: string;
|
|
57
|
+
};
|
|
58
|
+
type RequestQuery = {};
|
|
59
|
+
type RequestBody = never;
|
|
60
|
+
type RequestHeaders = {};
|
|
61
|
+
type ResponseBody = void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* No description
|
|
65
|
+
* @tags Category
|
|
66
|
+
* @name deleteById
|
|
67
|
+
* @request DELETE:/category/{id}
|
|
68
|
+
* @response `200` `void`
|
|
69
|
+
*/
|
|
70
|
+
namespace deleteById {
|
|
71
|
+
type RequestParams = {
|
|
72
|
+
id: string;
|
|
73
|
+
};
|
|
74
|
+
type RequestQuery = {};
|
|
75
|
+
type RequestBody = never;
|
|
76
|
+
type RequestHeaders = {};
|
|
77
|
+
type ResponseBody = void;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -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/Comment.d.ts
CHANGED
|
@@ -1,52 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HttpClient, RequestParams } from './
|
|
3
|
-
export declare class Comment<SecurityDataType = unknown>
|
|
1
|
+
import { ICommentControllerCreateData } from '../types';
|
|
2
|
+
import { HttpClient, RequestParams } from './HttpClient';
|
|
3
|
+
export declare class Comment<SecurityDataType = unknown> {
|
|
4
|
+
http: HttpClient<SecurityDataType>;
|
|
5
|
+
constructor(http: HttpClient<SecurityDataType>);
|
|
4
6
|
/**
|
|
5
7
|
* No description
|
|
6
8
|
*
|
|
7
9
|
* @tags Comment
|
|
8
|
-
* @name
|
|
10
|
+
* @name CommentControllerCreate
|
|
9
11
|
* @request POST:/comment
|
|
12
|
+
* @response `200` `ICommentControllerCreateData` 创建评论
|
|
10
13
|
*/
|
|
11
|
-
create: (params?: RequestParams) => Promise<
|
|
14
|
+
create: (params?: RequestParams) => Promise<ICommentControllerCreateData>;
|
|
12
15
|
/**
|
|
13
16
|
* No description
|
|
14
17
|
*
|
|
15
18
|
* @tags Comment
|
|
16
|
-
* @name
|
|
19
|
+
* @name CommentControllerFindAll
|
|
17
20
|
* @request GET:/comment
|
|
21
|
+
* @response `200` `ICommentControllerFindAllData`
|
|
18
22
|
*/
|
|
19
|
-
findAll: (params?: RequestParams) => Promise<
|
|
23
|
+
findAll: (params?: RequestParams) => Promise<any>;
|
|
20
24
|
/**
|
|
21
25
|
* No description
|
|
22
26
|
*
|
|
23
27
|
* @tags Comment
|
|
24
|
-
* @name
|
|
28
|
+
* @name CommentControllerFindById
|
|
25
29
|
* @request GET:/comment/{id}
|
|
30
|
+
* @response `200` `ICommentControllerFindByIdData`
|
|
26
31
|
*/
|
|
27
|
-
findById: (id: string, params?: RequestParams) => Promise<
|
|
32
|
+
findById: (id: string, params?: RequestParams) => Promise<any>;
|
|
28
33
|
/**
|
|
29
34
|
* No description
|
|
30
35
|
*
|
|
31
36
|
* @tags Comment
|
|
32
|
-
* @name
|
|
37
|
+
* @name CommentControllerUpdateById
|
|
33
38
|
* @request PATCH:/comment/{id}
|
|
39
|
+
* @response `200` `ICommentControllerUpdateByIdData`
|
|
34
40
|
*/
|
|
35
|
-
updateById: (id: string, params?: RequestParams) => Promise<
|
|
41
|
+
updateById: (id: string, params?: RequestParams) => Promise<any>;
|
|
36
42
|
/**
|
|
37
43
|
* No description
|
|
38
44
|
*
|
|
39
45
|
* @tags Comment
|
|
40
|
-
* @name
|
|
46
|
+
* @name CommentControllerDeleteById
|
|
41
47
|
* @request DELETE:/comment/{id}
|
|
48
|
+
* @response `200` `ICommentControllerDeleteByIdData`
|
|
42
49
|
*/
|
|
43
|
-
deleteById: (id: string, params?: RequestParams) => Promise<
|
|
50
|
+
deleteById: (id: string, params?: RequestParams) => Promise<any>;
|
|
44
51
|
/**
|
|
45
52
|
* No description
|
|
46
53
|
*
|
|
47
54
|
* @tags Comment
|
|
48
55
|
* @name CommentControllerGetArticleComments
|
|
49
56
|
* @request GET:/comment/host/{hostId}
|
|
57
|
+
* @response `200` `ICommentControllerGetArticleCommentsData`
|
|
50
58
|
*/
|
|
51
|
-
|
|
59
|
+
getArticleComments: (hostId: string, params?: RequestParams) => Promise<any>;
|
|
52
60
|
}
|
package/dist/api/Comment.js
CHANGED
|
@@ -11,31 +11,30 @@
|
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.Comment = void 0;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
14
|
+
class Comment {
|
|
15
|
+
constructor(http) {
|
|
18
16
|
/**
|
|
19
17
|
* No description
|
|
20
18
|
*
|
|
21
19
|
* @tags Comment
|
|
22
|
-
* @name
|
|
20
|
+
* @name CommentControllerCreate
|
|
23
21
|
* @request POST:/comment
|
|
22
|
+
* @response `200` `ICommentControllerCreateData` 创建评论
|
|
24
23
|
*/
|
|
25
|
-
this.create = (params = {}) => this.request({
|
|
24
|
+
this.create = (params = {}) => this.http.request({
|
|
26
25
|
path: `/comment`,
|
|
27
26
|
method: 'POST',
|
|
28
|
-
format: 'json',
|
|
29
27
|
...params,
|
|
30
28
|
});
|
|
31
29
|
/**
|
|
32
30
|
* No description
|
|
33
31
|
*
|
|
34
32
|
* @tags Comment
|
|
35
|
-
* @name
|
|
33
|
+
* @name CommentControllerFindAll
|
|
36
34
|
* @request GET:/comment
|
|
35
|
+
* @response `200` `ICommentControllerFindAllData`
|
|
37
36
|
*/
|
|
38
|
-
this.findAll = (params = {}) => this.request({
|
|
37
|
+
this.findAll = (params = {}) => this.http.request({
|
|
39
38
|
path: `/comment`,
|
|
40
39
|
method: 'GET',
|
|
41
40
|
...params,
|
|
@@ -44,10 +43,11 @@ class Comment extends httpClient_1.HttpClient {
|
|
|
44
43
|
* No description
|
|
45
44
|
*
|
|
46
45
|
* @tags Comment
|
|
47
|
-
* @name
|
|
46
|
+
* @name CommentControllerFindById
|
|
48
47
|
* @request GET:/comment/{id}
|
|
48
|
+
* @response `200` `ICommentControllerFindByIdData`
|
|
49
49
|
*/
|
|
50
|
-
this.findById = (id, params = {}) => this.request({
|
|
50
|
+
this.findById = (id, params = {}) => this.http.request({
|
|
51
51
|
path: `/comment/${id}`,
|
|
52
52
|
method: 'GET',
|
|
53
53
|
...params,
|
|
@@ -56,10 +56,11 @@ class Comment extends httpClient_1.HttpClient {
|
|
|
56
56
|
* No description
|
|
57
57
|
*
|
|
58
58
|
* @tags Comment
|
|
59
|
-
* @name
|
|
59
|
+
* @name CommentControllerUpdateById
|
|
60
60
|
* @request PATCH:/comment/{id}
|
|
61
|
+
* @response `200` `ICommentControllerUpdateByIdData`
|
|
61
62
|
*/
|
|
62
|
-
this.updateById = (id, params = {}) => this.request({
|
|
63
|
+
this.updateById = (id, params = {}) => this.http.request({
|
|
63
64
|
path: `/comment/${id}`,
|
|
64
65
|
method: 'PATCH',
|
|
65
66
|
...params,
|
|
@@ -68,10 +69,11 @@ class Comment extends httpClient_1.HttpClient {
|
|
|
68
69
|
* No description
|
|
69
70
|
*
|
|
70
71
|
* @tags Comment
|
|
71
|
-
* @name
|
|
72
|
+
* @name CommentControllerDeleteById
|
|
72
73
|
* @request DELETE:/comment/{id}
|
|
74
|
+
* @response `200` `ICommentControllerDeleteByIdData`
|
|
73
75
|
*/
|
|
74
|
-
this.deleteById = (id, params = {}) => this.request({
|
|
76
|
+
this.deleteById = (id, params = {}) => this.http.request({
|
|
75
77
|
path: `/comment/${id}`,
|
|
76
78
|
method: 'DELETE',
|
|
77
79
|
...params,
|
|
@@ -82,12 +84,14 @@ class Comment extends httpClient_1.HttpClient {
|
|
|
82
84
|
* @tags Comment
|
|
83
85
|
* @name CommentControllerGetArticleComments
|
|
84
86
|
* @request GET:/comment/host/{hostId}
|
|
87
|
+
* @response `200` `ICommentControllerGetArticleCommentsData`
|
|
85
88
|
*/
|
|
86
|
-
this.
|
|
89
|
+
this.getArticleComments = (hostId, params = {}) => this.http.request({
|
|
87
90
|
path: `/comment/host/${hostId}`,
|
|
88
91
|
method: 'GET',
|
|
89
92
|
...params,
|
|
90
93
|
});
|
|
94
|
+
this.http = http;
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
exports.Comment = Comment;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { IComment } from '../types/data-contracts';
|
|
2
|
+
export declare namespace Comment {
|
|
3
|
+
/**
|
|
4
|
+
* No description
|
|
5
|
+
* @tags Comment
|
|
6
|
+
* @name create
|
|
7
|
+
* @request POST:/comment
|
|
8
|
+
* @response `200` `(IComment)[]` 创建评论
|
|
9
|
+
*/
|
|
10
|
+
namespace create {
|
|
11
|
+
type RequestParams = {};
|
|
12
|
+
type RequestQuery = {};
|
|
13
|
+
type RequestBody = never;
|
|
14
|
+
type RequestHeaders = {};
|
|
15
|
+
type ResponseBody = IComment[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* No description
|
|
19
|
+
* @tags Comment
|
|
20
|
+
* @name findAll
|
|
21
|
+
* @request GET:/comment
|
|
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 Comment
|
|
34
|
+
* @name findById
|
|
35
|
+
* @request GET:/comment/{id}
|
|
36
|
+
* @response `200` `void`
|
|
37
|
+
*/
|
|
38
|
+
namespace findById {
|
|
39
|
+
type RequestParams = {
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
42
|
+
type RequestQuery = {};
|
|
43
|
+
type RequestBody = never;
|
|
44
|
+
type RequestHeaders = {};
|
|
45
|
+
type ResponseBody = void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* No description
|
|
49
|
+
* @tags Comment
|
|
50
|
+
* @name updateById
|
|
51
|
+
* @request PATCH:/comment/{id}
|
|
52
|
+
* @response `200` `void`
|
|
53
|
+
*/
|
|
54
|
+
namespace updateById {
|
|
55
|
+
type RequestParams = {
|
|
56
|
+
id: string;
|
|
57
|
+
};
|
|
58
|
+
type RequestQuery = {};
|
|
59
|
+
type RequestBody = never;
|
|
60
|
+
type RequestHeaders = {};
|
|
61
|
+
type ResponseBody = void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* No description
|
|
65
|
+
* @tags Comment
|
|
66
|
+
* @name deleteById
|
|
67
|
+
* @request DELETE:/comment/{id}
|
|
68
|
+
* @response `200` `void`
|
|
69
|
+
*/
|
|
70
|
+
namespace deleteById {
|
|
71
|
+
type RequestParams = {
|
|
72
|
+
id: string;
|
|
73
|
+
};
|
|
74
|
+
type RequestQuery = {};
|
|
75
|
+
type RequestBody = never;
|
|
76
|
+
type RequestHeaders = {};
|
|
77
|
+
type ResponseBody = void;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* No description
|
|
81
|
+
* @tags Comment
|
|
82
|
+
* @name getArticleComments
|
|
83
|
+
* @request GET:/comment/host/{hostId}
|
|
84
|
+
* @response `200` `void`
|
|
85
|
+
*/
|
|
86
|
+
namespace getArticleComments {
|
|
87
|
+
type RequestParams = {
|
|
88
|
+
hostId: string;
|
|
89
|
+
};
|
|
90
|
+
type RequestQuery = {};
|
|
91
|
+
type RequestBody = never;
|
|
92
|
+
type RequestHeaders = {};
|
|
93
|
+
type ResponseBody = void;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -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/File.d.ts
CHANGED
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HttpClient, RequestParams } from './
|
|
3
|
-
export declare class File<SecurityDataType = unknown>
|
|
1
|
+
import { IFileControllerUploadFileData } from '../types';
|
|
2
|
+
import { HttpClient, RequestParams } from './HttpClient';
|
|
3
|
+
export declare class File<SecurityDataType = unknown> {
|
|
4
|
+
http: HttpClient<SecurityDataType>;
|
|
5
|
+
constructor(http: HttpClient<SecurityDataType>);
|
|
4
6
|
/**
|
|
5
7
|
* No description
|
|
6
8
|
*
|
|
7
9
|
* @tags File
|
|
8
10
|
* @name FileControllerUploadFile
|
|
9
11
|
* @request POST:/file/upload
|
|
12
|
+
* @response `200` `IFileControllerUploadFileData` 上传文件
|
|
10
13
|
*/
|
|
11
|
-
|
|
14
|
+
uploadFile: (params?: RequestParams) => Promise<IFileControllerUploadFileData>;
|
|
12
15
|
/**
|
|
13
16
|
* No description
|
|
14
17
|
*
|
|
15
18
|
* @tags File
|
|
16
|
-
* @name
|
|
19
|
+
* @name FileControllerFindAll
|
|
17
20
|
* @request GET:/file
|
|
21
|
+
* @response `200` `IFileControllerFindAllData`
|
|
18
22
|
*/
|
|
19
|
-
findAll: (params?: RequestParams) => Promise<
|
|
23
|
+
findAll: (params?: RequestParams) => Promise<any>;
|
|
20
24
|
/**
|
|
21
25
|
* No description
|
|
22
26
|
*
|
|
23
27
|
* @tags File
|
|
24
|
-
* @name
|
|
28
|
+
* @name FileControllerFindById
|
|
25
29
|
* @request GET:/file/{id}
|
|
30
|
+
* @response `200` `IFileControllerFindByIdData`
|
|
26
31
|
*/
|
|
27
|
-
findById: (id: string, params?: RequestParams) => Promise<
|
|
32
|
+
findById: (id: string, params?: RequestParams) => Promise<any>;
|
|
28
33
|
/**
|
|
29
34
|
* No description
|
|
30
35
|
*
|
|
31
36
|
* @tags File
|
|
32
|
-
* @name
|
|
37
|
+
* @name FileControllerDeleteById
|
|
33
38
|
* @request DELETE:/file/{id}
|
|
39
|
+
* @response `200` `IFileControllerDeleteByIdData`
|
|
34
40
|
*/
|
|
35
|
-
deleteById: (id: string, params?: RequestParams) => Promise<
|
|
41
|
+
deleteById: (id: string, params?: RequestParams) => Promise<any>;
|
|
36
42
|
}
|
package/dist/api/File.js
CHANGED
|
@@ -11,31 +11,30 @@
|
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.File = void 0;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
14
|
+
class File {
|
|
15
|
+
constructor(http) {
|
|
18
16
|
/**
|
|
19
17
|
* No description
|
|
20
18
|
*
|
|
21
19
|
* @tags File
|
|
22
20
|
* @name FileControllerUploadFile
|
|
23
21
|
* @request POST:/file/upload
|
|
22
|
+
* @response `200` `IFileControllerUploadFileData` 上传文件
|
|
24
23
|
*/
|
|
25
|
-
this.
|
|
24
|
+
this.uploadFile = (params = {}) => this.http.request({
|
|
26
25
|
path: `/file/upload`,
|
|
27
26
|
method: 'POST',
|
|
28
|
-
format: 'json',
|
|
29
27
|
...params,
|
|
30
28
|
});
|
|
31
29
|
/**
|
|
32
30
|
* No description
|
|
33
31
|
*
|
|
34
32
|
* @tags File
|
|
35
|
-
* @name
|
|
33
|
+
* @name FileControllerFindAll
|
|
36
34
|
* @request GET:/file
|
|
35
|
+
* @response `200` `IFileControllerFindAllData`
|
|
37
36
|
*/
|
|
38
|
-
this.findAll = (params = {}) => this.request({
|
|
37
|
+
this.findAll = (params = {}) => this.http.request({
|
|
39
38
|
path: `/file`,
|
|
40
39
|
method: 'GET',
|
|
41
40
|
...params,
|
|
@@ -44,10 +43,11 @@ class File extends httpClient_1.HttpClient {
|
|
|
44
43
|
* No description
|
|
45
44
|
*
|
|
46
45
|
* @tags File
|
|
47
|
-
* @name
|
|
46
|
+
* @name FileControllerFindById
|
|
48
47
|
* @request GET:/file/{id}
|
|
48
|
+
* @response `200` `IFileControllerFindByIdData`
|
|
49
49
|
*/
|
|
50
|
-
this.findById = (id, params = {}) => this.request({
|
|
50
|
+
this.findById = (id, params = {}) => this.http.request({
|
|
51
51
|
path: `/file/${id}`,
|
|
52
52
|
method: 'GET',
|
|
53
53
|
...params,
|
|
@@ -56,14 +56,16 @@ class File extends httpClient_1.HttpClient {
|
|
|
56
56
|
* No description
|
|
57
57
|
*
|
|
58
58
|
* @tags File
|
|
59
|
-
* @name
|
|
59
|
+
* @name FileControllerDeleteById
|
|
60
60
|
* @request DELETE:/file/{id}
|
|
61
|
+
* @response `200` `IFileControllerDeleteByIdData`
|
|
61
62
|
*/
|
|
62
|
-
this.deleteById = (id, params = {}) => this.request({
|
|
63
|
+
this.deleteById = (id, params = {}) => this.http.request({
|
|
63
64
|
path: `/file/${id}`,
|
|
64
65
|
method: 'DELETE',
|
|
65
66
|
...params,
|
|
66
67
|
});
|
|
68
|
+
this.http = http;
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
exports.File = File;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { IFile } from '../types/data-contracts';
|
|
2
|
+
export declare namespace File {
|
|
3
|
+
/**
|
|
4
|
+
* No description
|
|
5
|
+
* @tags File
|
|
6
|
+
* @name uploadFile
|
|
7
|
+
* @request POST:/file/upload
|
|
8
|
+
* @response `200` `(IFile)[]` 上传文件
|
|
9
|
+
*/
|
|
10
|
+
namespace uploadFile {
|
|
11
|
+
type RequestParams = {};
|
|
12
|
+
type RequestQuery = {};
|
|
13
|
+
type RequestBody = never;
|
|
14
|
+
type RequestHeaders = {};
|
|
15
|
+
type ResponseBody = IFile[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* No description
|
|
19
|
+
* @tags File
|
|
20
|
+
* @name findAll
|
|
21
|
+
* @request GET:/file
|
|
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 File
|
|
34
|
+
* @name findById
|
|
35
|
+
* @request GET:/file/{id}
|
|
36
|
+
* @response `200` `void`
|
|
37
|
+
*/
|
|
38
|
+
namespace findById {
|
|
39
|
+
type RequestParams = {
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
42
|
+
type RequestQuery = {};
|
|
43
|
+
type RequestBody = never;
|
|
44
|
+
type RequestHeaders = {};
|
|
45
|
+
type ResponseBody = void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* No description
|
|
49
|
+
* @tags File
|
|
50
|
+
* @name deleteById
|
|
51
|
+
* @request DELETE:/file/{id}
|
|
52
|
+
* @response `200` `void`
|
|
53
|
+
*/
|
|
54
|
+
namespace deleteById {
|
|
55
|
+
type RequestParams = {
|
|
56
|
+
id: string;
|
|
57
|
+
};
|
|
58
|
+
type RequestQuery = {};
|
|
59
|
+
type RequestBody = never;
|
|
60
|
+
type RequestHeaders = {};
|
|
61
|
+
type ResponseBody = void;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -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 });
|