@fecommunity/reactpress-toolkit 1.0.0-beta.1 → 1.0.0-beta.3
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/api/Article.d.ts +44 -29
- package/dist/api/Article.js +42 -31
- package/dist/api/Auth.d.ts +11 -6
- package/dist/api/Auth.js +10 -8
- package/dist/api/Category.d.ts +20 -13
- package/dist/api/Category.js +18 -15
- package/dist/api/Comment.d.ts +22 -14
- package/dist/api/Comment.js +20 -16
- package/dist/api/File.d.ts +16 -10
- package/dist/api/File.js +14 -12
- package/dist/api/{http-client.d.ts → HttpClient.d.ts} +2 -2
- package/dist/api/{http-client.js → HttpClient.js} +4 -2
- package/dist/api/Knowledge.d.ts +29 -19
- package/dist/api/Knowledge.js +27 -22
- package/dist/api/Page.d.ts +23 -15
- package/dist/api/Page.js +21 -17
- package/dist/api/Search.d.ts +12 -7
- package/dist/api/Search.js +11 -9
- package/dist/api/Setting.d.ts +10 -6
- package/dist/api/Setting.js +8 -8
- package/dist/api/Smtp.d.ts +14 -9
- package/dist/api/Smtp.js +12 -11
- package/dist/api/Tag.d.ts +22 -14
- package/dist/api/Tag.js +20 -16
- package/dist/api/User.d.ts +15 -8
- package/dist/api/User.js +13 -13
- package/dist/api/View.d.ts +19 -12
- package/dist/api/View.js +17 -14
- 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/config/env.d.ts +1 -0
- package/dist/config/env.js +93 -0
- package/dist/config/global.d.ts +34 -0
- package/dist/config/global.js +382 -0
- package/dist/config/i18n.d.ts +5 -0
- package/dist/config/i18n.js +47 -0
- package/dist/config/index.d.ts +14 -0
- package/dist/config/index.js +30 -0
- package/dist/index.d.ts +8 -9
- package/dist/index.js +20 -18
- package/dist/locales/en.json +97 -0
- package/dist/locales/zh.json +97 -0
- package/dist/types/index.d.ts +245 -1
- package/dist/types/index.js +10 -17
- package/dist/utils/index.d.ts +33 -2
- package/dist/utils/index.js +57 -18
- package/package.json +15 -6
- package/demos/simple.ts +0 -65
- 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/Archives.d.ts +0 -14
- package/dist/api/Archives.js +0 -32
- package/dist/api/Book.d.ts +0 -15
- package/dist/api/Book.js +0 -33
- package/dist/api/Chapter.d.ts +0 -15
- package/dist/api/Chapter.js +0 -33
- 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/Login.d.ts +0 -14
- package/dist/api/Login.js +0 -32
- 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/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/api-instance.d.ts +0 -39
- package/dist/api/api-instance.js +0 -46
- package/dist/api/httpClient.d.ts +0 -41
- package/dist/api/httpClient.js +0 -94
- package/dist/types/data-contracts.d.ts +0 -177
- package/dist/types/data-contracts.js +0 -12
- package/dist/utils/common.d.ts +0 -23
- package/dist/utils/common.js +0 -78
- package/dist/utils/http.d.ts +0 -3
- package/dist/utils/http.js +0 -47
- 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/Setting.js
CHANGED
|
@@ -11,35 +11,35 @@
|
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.Setting = void 0;
|
|
14
|
-
|
|
15
|
-
|
|
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.
|
|
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
|
|
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;
|
package/dist/api/Smtp.d.ts
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HttpClient, RequestParams } from './
|
|
3
|
-
export declare class Smtp<SecurityDataType = unknown>
|
|
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
|
|
10
|
+
* @name SmtpControllerCreate
|
|
9
11
|
* @request POST:/smtp
|
|
12
|
+
* @response `200` `ISmtpControllerCreateData` 发送邮件
|
|
10
13
|
*/
|
|
11
|
-
create: (params?: RequestParams) => Promise<
|
|
14
|
+
create: (params?: RequestParams) => Promise<ISmtpControllerCreateData>;
|
|
12
15
|
/**
|
|
13
16
|
* No description
|
|
14
17
|
*
|
|
15
18
|
* @tags Smtp
|
|
16
|
-
* @name
|
|
19
|
+
* @name SmtpControllerFindAll
|
|
17
20
|
* @request GET:/smtp
|
|
21
|
+
* @response `200` `ISmtpControllerFindAllData`
|
|
18
22
|
*/
|
|
19
|
-
findAll: (params?: RequestParams) => Promise<
|
|
23
|
+
findAll: (params?: RequestParams) => Promise<any>;
|
|
20
24
|
/**
|
|
21
25
|
* No description
|
|
22
26
|
*
|
|
23
27
|
* @tags Smtp
|
|
24
|
-
* @name
|
|
28
|
+
* @name SmtpControllerDeleteById
|
|
25
29
|
* @request DELETE:/smtp/{id}
|
|
30
|
+
* @response `200` `ISmtpControllerDeleteByIdData`
|
|
26
31
|
*/
|
|
27
|
-
deleteById: (id: string, params?: RequestParams) => Promise<
|
|
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
|
-
|
|
15
|
-
|
|
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
|
|
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
|
|
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
|
|
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;
|
package/dist/api/Tag.d.ts
CHANGED
|
@@ -1,52 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HttpClient, RequestParams } from './
|
|
3
|
-
export declare class Tag<SecurityDataType = unknown>
|
|
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
|
|
10
|
+
* @name TagControllerCreate
|
|
9
11
|
* @request POST:/tag
|
|
12
|
+
* @response `200` `ITagControllerCreateData` 创建标签
|
|
10
13
|
*/
|
|
11
|
-
create: (params?: RequestParams) => Promise<
|
|
14
|
+
create: (params?: RequestParams) => Promise<ITagControllerCreateData>;
|
|
12
15
|
/**
|
|
13
16
|
* No description
|
|
14
17
|
*
|
|
15
18
|
* @tags Tag
|
|
16
|
-
* @name
|
|
19
|
+
* @name TagControllerFindAll
|
|
17
20
|
* @request GET:/tag
|
|
21
|
+
* @response `200` `ITagControllerFindAllData`
|
|
18
22
|
*/
|
|
19
|
-
findAll: (params?: RequestParams) => Promise<
|
|
23
|
+
findAll: (params?: RequestParams) => Promise<any>;
|
|
20
24
|
/**
|
|
21
25
|
* No description
|
|
22
26
|
*
|
|
23
27
|
* @tags Tag
|
|
24
|
-
* @name
|
|
28
|
+
* @name TagControllerFindById
|
|
25
29
|
* @request GET:/tag/{id}
|
|
30
|
+
* @response `200` `ITagControllerFindByIdData`
|
|
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 Tag
|
|
32
|
-
* @name
|
|
37
|
+
* @name TagControllerUpdateById
|
|
33
38
|
* @request PATCH:/tag/{id}
|
|
39
|
+
* @response `200` `ITagControllerUpdateByIdData`
|
|
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 Tag
|
|
40
|
-
* @name
|
|
46
|
+
* @name TagControllerDeleteById
|
|
41
47
|
* @request DELETE:/tag/{id}
|
|
48
|
+
* @response `200` `ITagControllerDeleteByIdData`
|
|
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 Tag
|
|
48
55
|
* @name TagControllerGetArticleById
|
|
49
56
|
* @request GET:/tag/{id}/article
|
|
57
|
+
* @response `200` `ITagControllerGetArticleByIdData`
|
|
50
58
|
*/
|
|
51
|
-
|
|
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
|
-
|
|
15
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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;
|
package/dist/api/User.d.ts
CHANGED
|
@@ -1,36 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HttpClient, RequestParams } from './
|
|
3
|
-
export declare class User<SecurityDataType = unknown>
|
|
1
|
+
import { IUserControllerFindAllData, IUserControllerRegisterData, IUserControllerUpdateData, IUserControllerUpdatePasswordData } from '../types';
|
|
2
|
+
import { HttpClient, RequestParams } from './HttpClient';
|
|
3
|
+
export declare class User<SecurityDataType = unknown> {
|
|
4
|
+
http: HttpClient<SecurityDataType>;
|
|
5
|
+
constructor(http: HttpClient<SecurityDataType>);
|
|
4
6
|
/**
|
|
5
7
|
* No description
|
|
6
8
|
*
|
|
7
9
|
* @tags User
|
|
8
|
-
* @name
|
|
10
|
+
* @name UserControllerFindAll
|
|
9
11
|
* @request GET:/user
|
|
12
|
+
* @response `200` `IUserControllerFindAllData` 获取用户列表
|
|
13
|
+
* @response `403` `void` 无权获取用户列表
|
|
10
14
|
*/
|
|
11
|
-
findAll: (params?: RequestParams) => Promise<
|
|
15
|
+
findAll: (params?: RequestParams) => Promise<IUserControllerFindAllData>;
|
|
12
16
|
/**
|
|
13
17
|
* No description
|
|
14
18
|
*
|
|
15
19
|
* @tags User
|
|
16
20
|
* @name UserControllerRegister
|
|
17
21
|
* @request POST:/user/register
|
|
22
|
+
* @response `201` `IUserControllerRegisterData` 创建用户
|
|
18
23
|
*/
|
|
19
|
-
|
|
24
|
+
register: (params?: RequestParams) => Promise<IUserControllerRegisterData>;
|
|
20
25
|
/**
|
|
21
26
|
* No description
|
|
22
27
|
*
|
|
23
28
|
* @tags User
|
|
24
29
|
* @name UserControllerUpdate
|
|
25
30
|
* @request POST:/user/update
|
|
31
|
+
* @response `200` `IUserControllerUpdateData` 更新用户成功
|
|
26
32
|
*/
|
|
27
|
-
|
|
33
|
+
update: (params?: RequestParams) => Promise<IUserControllerUpdateData>;
|
|
28
34
|
/**
|
|
29
35
|
* No description
|
|
30
36
|
*
|
|
31
37
|
* @tags User
|
|
32
38
|
* @name UserControllerUpdatePassword
|
|
33
39
|
* @request POST:/user/password
|
|
40
|
+
* @response `201` `IUserControllerUpdatePasswordData` 更新密码成功
|
|
34
41
|
*/
|
|
35
|
-
|
|
42
|
+
updatePassword: (params?: RequestParams) => Promise<IUserControllerUpdatePasswordData>;
|
|
36
43
|
}
|
package/dist/api/User.js
CHANGED
|
@@ -11,21 +11,20 @@
|
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.User = void 0;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
14
|
+
class User {
|
|
15
|
+
constructor(http) {
|
|
18
16
|
/**
|
|
19
17
|
* No description
|
|
20
18
|
*
|
|
21
19
|
* @tags User
|
|
22
|
-
* @name
|
|
20
|
+
* @name UserControllerFindAll
|
|
23
21
|
* @request GET:/user
|
|
22
|
+
* @response `200` `IUserControllerFindAllData` 获取用户列表
|
|
23
|
+
* @response `403` `void` 无权获取用户列表
|
|
24
24
|
*/
|
|
25
|
-
this.findAll = (params = {}) => this.request({
|
|
25
|
+
this.findAll = (params = {}) => this.http.request({
|
|
26
26
|
path: `/user`,
|
|
27
27
|
method: 'GET',
|
|
28
|
-
format: 'json',
|
|
29
28
|
...params,
|
|
30
29
|
});
|
|
31
30
|
/**
|
|
@@ -34,11 +33,11 @@ class User extends httpClient_1.HttpClient {
|
|
|
34
33
|
* @tags User
|
|
35
34
|
* @name UserControllerRegister
|
|
36
35
|
* @request POST:/user/register
|
|
36
|
+
* @response `201` `IUserControllerRegisterData` 创建用户
|
|
37
37
|
*/
|
|
38
|
-
this.
|
|
38
|
+
this.register = (params = {}) => this.http.request({
|
|
39
39
|
path: `/user/register`,
|
|
40
40
|
method: 'POST',
|
|
41
|
-
format: 'json',
|
|
42
41
|
...params,
|
|
43
42
|
});
|
|
44
43
|
/**
|
|
@@ -47,11 +46,11 @@ class User extends httpClient_1.HttpClient {
|
|
|
47
46
|
* @tags User
|
|
48
47
|
* @name UserControllerUpdate
|
|
49
48
|
* @request POST:/user/update
|
|
49
|
+
* @response `200` `IUserControllerUpdateData` 更新用户成功
|
|
50
50
|
*/
|
|
51
|
-
this.
|
|
51
|
+
this.update = (params = {}) => this.http.request({
|
|
52
52
|
path: `/user/update`,
|
|
53
53
|
method: 'POST',
|
|
54
|
-
format: 'json',
|
|
55
54
|
...params,
|
|
56
55
|
});
|
|
57
56
|
/**
|
|
@@ -60,13 +59,14 @@ class User extends httpClient_1.HttpClient {
|
|
|
60
59
|
* @tags User
|
|
61
60
|
* @name UserControllerUpdatePassword
|
|
62
61
|
* @request POST:/user/password
|
|
62
|
+
* @response `201` `IUserControllerUpdatePasswordData` 更新密码成功
|
|
63
63
|
*/
|
|
64
|
-
this.
|
|
64
|
+
this.updatePassword = (params = {}) => this.http.request({
|
|
65
65
|
path: `/user/password`,
|
|
66
66
|
method: 'POST',
|
|
67
|
-
format: 'json',
|
|
68
67
|
...params,
|
|
69
68
|
});
|
|
69
|
+
this.http = http;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
exports.User = User;
|
package/dist/api/View.d.ts
CHANGED
|
@@ -1,44 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HttpClient, RequestParams } from './
|
|
3
|
-
export declare class View<SecurityDataType = unknown>
|
|
1
|
+
import { IViewControllerCreateData } from '../types';
|
|
2
|
+
import { HttpClient, RequestParams } from './HttpClient';
|
|
3
|
+
export declare class View<SecurityDataType = unknown> {
|
|
4
|
+
http: HttpClient<SecurityDataType>;
|
|
5
|
+
constructor(http: HttpClient<SecurityDataType>);
|
|
4
6
|
/**
|
|
5
7
|
* No description
|
|
6
8
|
*
|
|
7
9
|
* @tags View
|
|
8
|
-
* @name
|
|
10
|
+
* @name ViewControllerCreate
|
|
9
11
|
* @request POST:/view
|
|
12
|
+
* @response `200` `IViewControllerCreateData` 访问记录添加成功
|
|
10
13
|
*/
|
|
11
|
-
create: (params?: RequestParams) => Promise<
|
|
14
|
+
create: (params?: RequestParams) => Promise<IViewControllerCreateData>;
|
|
12
15
|
/**
|
|
13
16
|
* No description
|
|
14
17
|
*
|
|
15
18
|
* @tags View
|
|
16
|
-
* @name
|
|
19
|
+
* @name ViewControllerFindAll
|
|
17
20
|
* @request GET:/view
|
|
21
|
+
* @response `200` `IViewControllerFindAllData`
|
|
18
22
|
*/
|
|
19
|
-
findAll: (params?: RequestParams) => Promise<
|
|
23
|
+
findAll: (params?: RequestParams) => Promise<any>;
|
|
20
24
|
/**
|
|
21
25
|
* No description
|
|
22
26
|
*
|
|
23
27
|
* @tags View
|
|
24
28
|
* @name ViewControllerFindByUrl
|
|
25
29
|
* @request GET:/view/url
|
|
30
|
+
* @response `200` `IViewControllerFindByUrlData`
|
|
26
31
|
*/
|
|
27
|
-
|
|
32
|
+
findByUrl: (params?: RequestParams) => Promise<any>;
|
|
28
33
|
/**
|
|
29
34
|
* No description
|
|
30
35
|
*
|
|
31
36
|
* @tags View
|
|
32
|
-
* @name
|
|
37
|
+
* @name ViewControllerFindById
|
|
33
38
|
* @request GET:/view/{id}
|
|
39
|
+
* @response `200` `IViewControllerFindByIdData`
|
|
34
40
|
*/
|
|
35
|
-
findById: (id: string, params?: RequestParams) => Promise<
|
|
41
|
+
findById: (id: string, params?: RequestParams) => Promise<any>;
|
|
36
42
|
/**
|
|
37
43
|
* No description
|
|
38
44
|
*
|
|
39
45
|
* @tags View
|
|
40
|
-
* @name
|
|
46
|
+
* @name ViewControllerDeleteById
|
|
41
47
|
* @request DELETE:/view/{id}
|
|
48
|
+
* @response `200` `IViewControllerDeleteByIdData`
|
|
42
49
|
*/
|
|
43
|
-
deleteById: (id: string, params?: RequestParams) => Promise<
|
|
50
|
+
deleteById: (id: string, params?: RequestParams) => Promise<any>;
|
|
44
51
|
}
|
package/dist/api/View.js
CHANGED
|
@@ -11,31 +11,30 @@
|
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.View = void 0;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
14
|
+
class View {
|
|
15
|
+
constructor(http) {
|
|
18
16
|
/**
|
|
19
17
|
* No description
|
|
20
18
|
*
|
|
21
19
|
* @tags View
|
|
22
|
-
* @name
|
|
20
|
+
* @name ViewControllerCreate
|
|
23
21
|
* @request POST:/view
|
|
22
|
+
* @response `200` `IViewControllerCreateData` 访问记录添加成功
|
|
24
23
|
*/
|
|
25
|
-
this.create = (params = {}) => this.request({
|
|
24
|
+
this.create = (params = {}) => this.http.request({
|
|
26
25
|
path: `/view`,
|
|
27
26
|
method: 'POST',
|
|
28
|
-
format: 'json',
|
|
29
27
|
...params,
|
|
30
28
|
});
|
|
31
29
|
/**
|
|
32
30
|
* No description
|
|
33
31
|
*
|
|
34
32
|
* @tags View
|
|
35
|
-
* @name
|
|
33
|
+
* @name ViewControllerFindAll
|
|
36
34
|
* @request GET:/view
|
|
35
|
+
* @response `200` `IViewControllerFindAllData`
|
|
37
36
|
*/
|
|
38
|
-
this.findAll = (params = {}) => this.request({
|
|
37
|
+
this.findAll = (params = {}) => this.http.request({
|
|
39
38
|
path: `/view`,
|
|
40
39
|
method: 'GET',
|
|
41
40
|
...params,
|
|
@@ -46,8 +45,9 @@ class View extends httpClient_1.HttpClient {
|
|
|
46
45
|
* @tags View
|
|
47
46
|
* @name ViewControllerFindByUrl
|
|
48
47
|
* @request GET:/view/url
|
|
48
|
+
* @response `200` `IViewControllerFindByUrlData`
|
|
49
49
|
*/
|
|
50
|
-
this.
|
|
50
|
+
this.findByUrl = (params = {}) => this.http.request({
|
|
51
51
|
path: `/view/url`,
|
|
52
52
|
method: 'GET',
|
|
53
53
|
...params,
|
|
@@ -56,10 +56,11 @@ class View extends httpClient_1.HttpClient {
|
|
|
56
56
|
* No description
|
|
57
57
|
*
|
|
58
58
|
* @tags View
|
|
59
|
-
* @name
|
|
59
|
+
* @name ViewControllerFindById
|
|
60
60
|
* @request GET:/view/{id}
|
|
61
|
+
* @response `200` `IViewControllerFindByIdData`
|
|
61
62
|
*/
|
|
62
|
-
this.findById = (id, params = {}) => this.request({
|
|
63
|
+
this.findById = (id, params = {}) => this.http.request({
|
|
63
64
|
path: `/view/${id}`,
|
|
64
65
|
method: 'GET',
|
|
65
66
|
...params,
|
|
@@ -68,14 +69,16 @@ class View extends httpClient_1.HttpClient {
|
|
|
68
69
|
* No description
|
|
69
70
|
*
|
|
70
71
|
* @tags View
|
|
71
|
-
* @name
|
|
72
|
+
* @name ViewControllerDeleteById
|
|
72
73
|
* @request DELETE:/view/{id}
|
|
74
|
+
* @response `200` `IViewControllerDeleteByIdData`
|
|
73
75
|
*/
|
|
74
|
-
this.deleteById = (id, params = {}) => this.request({
|
|
76
|
+
this.deleteById = (id, params = {}) => this.http.request({
|
|
75
77
|
path: `/view/${id}`,
|
|
76
78
|
method: 'DELETE',
|
|
77
79
|
...params,
|
|
78
80
|
});
|
|
81
|
+
this.http = http;
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
exports.View = View;
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export * from './httpClient';
|
|
15
|
-
export { HttpClient } from './httpClient';
|
|
16
|
-
export type { HttpClientConfig } from './httpClient';
|
|
17
|
-
export * from './api-instance';
|
|
18
|
-
export { default as api } from './api-instance';
|
|
1
|
+
export { Article } from './Article';
|
|
2
|
+
export { Auth } from './Auth';
|
|
3
|
+
export { Category } from './Category';
|
|
4
|
+
export { Comment } from './Comment';
|
|
5
|
+
export { File } from './File';
|
|
6
|
+
export { Knowledge } from './Knowledge';
|
|
7
|
+
export { Page } from './Page';
|
|
8
|
+
export { Search } from './Search';
|
|
9
|
+
export { Setting } from './Setting';
|
|
10
|
+
export { Smtp } from './Smtp';
|
|
11
|
+
export { Tag } from './Tag';
|
|
12
|
+
export { User } from './User';
|
|
13
|
+
export { View } from './View';
|