@fecommunity/reactpress-toolkit 1.0.0-beta.1
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/LICENSE +21 -0
- package/demos/simple.ts +65 -0
- package/dist/api/Admin.d.ts +14 -0
- package/dist/api/Admin.js +32 -0
- package/dist/api/All.d.ts +14 -0
- package/dist/api/All.js +32 -0
- package/dist/api/Archives.d.ts +14 -0
- package/dist/api/Archives.js +32 -0
- package/dist/api/Article.d.ts +108 -0
- package/dist/api/Article.js +177 -0
- package/dist/api/Auth.d.ts +27 -0
- package/dist/api/Auth.js +56 -0
- package/dist/api/Book.d.ts +15 -0
- package/dist/api/Book.js +33 -0
- package/dist/api/Category.d.ts +44 -0
- package/dist/api/Category.js +81 -0
- package/dist/api/Chapter.d.ts +15 -0
- package/dist/api/Chapter.js +33 -0
- package/dist/api/Comment.d.ts +52 -0
- package/dist/api/Comment.js +93 -0
- package/dist/api/File.d.ts +36 -0
- package/dist/api/File.js +69 -0
- package/dist/api/Get.d.ts +14 -0
- package/dist/api/Get.js +32 -0
- package/dist/api/Github.d.ts +14 -0
- package/dist/api/Github.js +32 -0
- package/dist/api/Host.d.ts +14 -0
- package/dist/api/Host.js +32 -0
- package/dist/api/Id.d.ts +284 -0
- package/dist/api/Id.js +422 -0
- package/dist/api/Knowledge.d.ts +68 -0
- package/dist/api/Knowledge.js +118 -0
- package/dist/api/Login.d.ts +14 -0
- package/dist/api/Login.js +32 -0
- package/dist/api/Page.d.ts +52 -0
- package/dist/api/Page.js +93 -0
- package/dist/api/Password.d.ts +15 -0
- package/dist/api/Password.js +33 -0
- package/dist/api/Recommend.d.ts +14 -0
- package/dist/api/Recommend.js +32 -0
- package/dist/api/Register.d.ts +15 -0
- package/dist/api/Register.js +33 -0
- package/dist/api/Search.d.ts +27 -0
- package/dist/api/Search.js +56 -0
- package/dist/api/Setting.d.ts +20 -0
- package/dist/api/Setting.js +45 -0
- package/dist/api/Smtp.d.ts +28 -0
- package/dist/api/Smtp.js +57 -0
- package/dist/api/Tag.d.ts +52 -0
- package/dist/api/Tag.js +93 -0
- package/dist/api/Update.d.ts +15 -0
- package/dist/api/Update.js +33 -0
- package/dist/api/Upload.d.ts +15 -0
- package/dist/api/Upload.js +33 -0
- package/dist/api/Url.d.ts +14 -0
- package/dist/api/Url.js +32 -0
- package/dist/api/User.d.ts +36 -0
- package/dist/api/User.js +72 -0
- package/dist/api/View.d.ts +44 -0
- package/dist/api/View.js +81 -0
- package/dist/api/api-instance.d.ts +39 -0
- package/dist/api/api-instance.js +46 -0
- package/dist/api/http-client.d.ts +41 -0
- package/dist/api/http-client.js +94 -0
- package/dist/api/httpClient.d.ts +41 -0
- package/dist/api/httpClient.js +94 -0
- package/dist/api/index.d.ts +18 -0
- package/dist/api/index.js +43 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +46 -0
- package/dist/types/data-contracts.d.ts +177 -0
- package/dist/types/data-contracts.js +12 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +19 -0
- package/dist/utils/common.d.ts +23 -0
- package/dist/utils/common.js +78 -0
- package/dist/utils/http.d.ts +3 -0
- package/dist/utils/http.js +47 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +20 -0
- package/package.json +19 -0
- package/scripts/generate-api-types.js +571 -0
- package/scripts/generate-swagger.js +47 -0
- package/scripts/organize-api.js +136 -0
- package/src/api/Article.ts +186 -0
- package/src/api/Auth.ts +54 -0
- package/src/api/Category.ts +82 -0
- package/src/api/Comment.ts +95 -0
- package/src/api/File.ts +69 -0
- package/src/api/Knowledge.ts +122 -0
- package/src/api/Page.ts +95 -0
- package/src/api/Search.ts +54 -0
- package/src/api/Setting.ts +43 -0
- package/src/api/Smtp.ts +56 -0
- package/src/api/Tag.ts +95 -0
- package/src/api/User.ts +72 -0
- package/src/api/View.ts +82 -0
- package/src/api/api-instance.ts +69 -0
- package/src/api/httpClient.ts +140 -0
- package/src/api/index.ts +25 -0
- package/src/index.ts +18 -0
- package/src/types/data-contracts.ts +198 -0
- package/src/types/index.ts +4 -0
- package/src/utils/common.ts +108 -0
- package/src/utils/http.ts +52 -0
- package/src/utils/index.ts +5 -0
- package/test-final.js +56 -0
- package/test-import.js +34 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { I_SMTP } from '../types/data-contracts';
|
|
2
|
+
import { HttpClient, RequestParams } from './httpClient';
|
|
3
|
+
export declare class Smtp<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
|
|
4
|
+
/**
|
|
5
|
+
* No description
|
|
6
|
+
*
|
|
7
|
+
* @tags Smtp
|
|
8
|
+
* @name create
|
|
9
|
+
* @request POST:/smtp
|
|
10
|
+
*/
|
|
11
|
+
create: (params?: RequestParams) => Promise<import("axios").AxiosResponse<I_SMTP[], any, {}>>;
|
|
12
|
+
/**
|
|
13
|
+
* No description
|
|
14
|
+
*
|
|
15
|
+
* @tags Smtp
|
|
16
|
+
* @name findAll
|
|
17
|
+
* @request GET:/smtp
|
|
18
|
+
*/
|
|
19
|
+
findAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
20
|
+
/**
|
|
21
|
+
* No description
|
|
22
|
+
*
|
|
23
|
+
* @tags Smtp
|
|
24
|
+
* @name deleteById
|
|
25
|
+
* @request DELETE:/smtp/{id}
|
|
26
|
+
*/
|
|
27
|
+
deleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
28
|
+
}
|
package/dist/api/Smtp.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
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.Smtp = void 0;
|
|
14
|
+
const httpClient_1 = require("./httpClient");
|
|
15
|
+
class Smtp extends httpClient_1.HttpClient {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
/**
|
|
19
|
+
* No description
|
|
20
|
+
*
|
|
21
|
+
* @tags Smtp
|
|
22
|
+
* @name create
|
|
23
|
+
* @request POST:/smtp
|
|
24
|
+
*/
|
|
25
|
+
this.create = (params = {}) => this.request({
|
|
26
|
+
path: `/smtp`,
|
|
27
|
+
method: 'POST',
|
|
28
|
+
format: 'json',
|
|
29
|
+
...params,
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* No description
|
|
33
|
+
*
|
|
34
|
+
* @tags Smtp
|
|
35
|
+
* @name findAll
|
|
36
|
+
* @request GET:/smtp
|
|
37
|
+
*/
|
|
38
|
+
this.findAll = (params = {}) => this.request({
|
|
39
|
+
path: `/smtp`,
|
|
40
|
+
method: 'GET',
|
|
41
|
+
...params,
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* No description
|
|
45
|
+
*
|
|
46
|
+
* @tags Smtp
|
|
47
|
+
* @name deleteById
|
|
48
|
+
* @request DELETE:/smtp/{id}
|
|
49
|
+
*/
|
|
50
|
+
this.deleteById = (id, params = {}) => this.request({
|
|
51
|
+
path: `/smtp/${id}`,
|
|
52
|
+
method: 'DELETE',
|
|
53
|
+
...params,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.Smtp = Smtp;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ITag } from '../types/data-contracts';
|
|
2
|
+
import { HttpClient, RequestParams } from './httpClient';
|
|
3
|
+
export declare class Tag<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
|
|
4
|
+
/**
|
|
5
|
+
* No description
|
|
6
|
+
*
|
|
7
|
+
* @tags Tag
|
|
8
|
+
* @name create
|
|
9
|
+
* @request POST:/tag
|
|
10
|
+
*/
|
|
11
|
+
create: (params?: RequestParams) => Promise<import("axios").AxiosResponse<ITag[], any, {}>>;
|
|
12
|
+
/**
|
|
13
|
+
* No description
|
|
14
|
+
*
|
|
15
|
+
* @tags Tag
|
|
16
|
+
* @name findAll
|
|
17
|
+
* @request GET:/tag
|
|
18
|
+
*/
|
|
19
|
+
findAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
20
|
+
/**
|
|
21
|
+
* No description
|
|
22
|
+
*
|
|
23
|
+
* @tags Tag
|
|
24
|
+
* @name findById
|
|
25
|
+
* @request GET:/tag/{id}
|
|
26
|
+
*/
|
|
27
|
+
findById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
28
|
+
/**
|
|
29
|
+
* No description
|
|
30
|
+
*
|
|
31
|
+
* @tags Tag
|
|
32
|
+
* @name updateById
|
|
33
|
+
* @request PATCH:/tag/{id}
|
|
34
|
+
*/
|
|
35
|
+
updateById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
36
|
+
/**
|
|
37
|
+
* No description
|
|
38
|
+
*
|
|
39
|
+
* @tags Tag
|
|
40
|
+
* @name deleteById
|
|
41
|
+
* @request DELETE:/tag/{id}
|
|
42
|
+
*/
|
|
43
|
+
deleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
44
|
+
/**
|
|
45
|
+
* No description
|
|
46
|
+
*
|
|
47
|
+
* @tags Tag
|
|
48
|
+
* @name TagControllerGetArticleById
|
|
49
|
+
* @request GET:/tag/{id}/article
|
|
50
|
+
*/
|
|
51
|
+
tagControllerGetArticleById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
52
|
+
}
|
package/dist/api/Tag.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
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 create
|
|
23
|
+
* @request POST:/tag
|
|
24
|
+
*/
|
|
25
|
+
this.create = (params = {}) => this.request({
|
|
26
|
+
path: `/tag`,
|
|
27
|
+
method: 'POST',
|
|
28
|
+
format: 'json',
|
|
29
|
+
...params,
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* No description
|
|
33
|
+
*
|
|
34
|
+
* @tags Tag
|
|
35
|
+
* @name findAll
|
|
36
|
+
* @request GET:/tag
|
|
37
|
+
*/
|
|
38
|
+
this.findAll = (params = {}) => this.request({
|
|
39
|
+
path: `/tag`,
|
|
40
|
+
method: 'GET',
|
|
41
|
+
...params,
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* No description
|
|
45
|
+
*
|
|
46
|
+
* @tags Tag
|
|
47
|
+
* @name findById
|
|
48
|
+
* @request GET:/tag/{id}
|
|
49
|
+
*/
|
|
50
|
+
this.findById = (id, params = {}) => this.request({
|
|
51
|
+
path: `/tag/${id}`,
|
|
52
|
+
method: 'GET',
|
|
53
|
+
...params,
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* No description
|
|
57
|
+
*
|
|
58
|
+
* @tags Tag
|
|
59
|
+
* @name updateById
|
|
60
|
+
* @request PATCH:/tag/{id}
|
|
61
|
+
*/
|
|
62
|
+
this.updateById = (id, params = {}) => this.request({
|
|
63
|
+
path: `/tag/${id}`,
|
|
64
|
+
method: 'PATCH',
|
|
65
|
+
...params,
|
|
66
|
+
});
|
|
67
|
+
/**
|
|
68
|
+
* No description
|
|
69
|
+
*
|
|
70
|
+
* @tags Tag
|
|
71
|
+
* @name deleteById
|
|
72
|
+
* @request DELETE:/tag/{id}
|
|
73
|
+
*/
|
|
74
|
+
this.deleteById = (id, params = {}) => this.request({
|
|
75
|
+
path: `/tag/${id}`,
|
|
76
|
+
method: 'DELETE',
|
|
77
|
+
...params,
|
|
78
|
+
});
|
|
79
|
+
/**
|
|
80
|
+
* No description
|
|
81
|
+
*
|
|
82
|
+
* @tags Tag
|
|
83
|
+
* @name TagControllerGetArticleById
|
|
84
|
+
* @request GET:/tag/{id}/article
|
|
85
|
+
*/
|
|
86
|
+
this.tagControllerGetArticleById = (id, params = {}) => this.request({
|
|
87
|
+
path: `/tag/${id}/article`,
|
|
88
|
+
method: 'GET',
|
|
89
|
+
...params,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.Tag = Tag;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IUser } from '../types/data-contracts';
|
|
2
|
+
import { HttpClient, RequestParams } from './http-client';
|
|
3
|
+
export declare class Update<SecurityDataType = unknown> {
|
|
4
|
+
http: HttpClient<SecurityDataType>;
|
|
5
|
+
constructor(http: HttpClient<SecurityDataType>);
|
|
6
|
+
/**
|
|
7
|
+
* No description
|
|
8
|
+
*
|
|
9
|
+
* @tags User
|
|
10
|
+
* @name UserControllerUpdate
|
|
11
|
+
* @request POST:/user/update
|
|
12
|
+
* @response `200` `(IUser)[]` 更新用户成功
|
|
13
|
+
*/
|
|
14
|
+
userControllerUpdate: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUser[], any, {}>>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.Update = void 0;
|
|
14
|
+
class Update {
|
|
15
|
+
constructor(http) {
|
|
16
|
+
/**
|
|
17
|
+
* No description
|
|
18
|
+
*
|
|
19
|
+
* @tags User
|
|
20
|
+
* @name UserControllerUpdate
|
|
21
|
+
* @request POST:/user/update
|
|
22
|
+
* @response `200` `(IUser)[]` 更新用户成功
|
|
23
|
+
*/
|
|
24
|
+
this.userControllerUpdate = (params = {}) => this.http.request({
|
|
25
|
+
path: `/user/update`,
|
|
26
|
+
method: 'POST',
|
|
27
|
+
format: 'json',
|
|
28
|
+
...params,
|
|
29
|
+
});
|
|
30
|
+
this.http = http;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.Update = Update;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IFile } from '../types/data-contracts';
|
|
2
|
+
import { HttpClient, RequestParams } from './http-client';
|
|
3
|
+
export declare class Upload<SecurityDataType = unknown> {
|
|
4
|
+
http: HttpClient<SecurityDataType>;
|
|
5
|
+
constructor(http: HttpClient<SecurityDataType>);
|
|
6
|
+
/**
|
|
7
|
+
* No description
|
|
8
|
+
*
|
|
9
|
+
* @tags File
|
|
10
|
+
* @name FileControllerUploadFile
|
|
11
|
+
* @request POST:/file/upload
|
|
12
|
+
* @response `200` `(IFile)[]` 上传文件
|
|
13
|
+
*/
|
|
14
|
+
fileControllerUploadFile: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IFile[], any, {}>>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.Upload = void 0;
|
|
14
|
+
class Upload {
|
|
15
|
+
constructor(http) {
|
|
16
|
+
/**
|
|
17
|
+
* No description
|
|
18
|
+
*
|
|
19
|
+
* @tags File
|
|
20
|
+
* @name FileControllerUploadFile
|
|
21
|
+
* @request POST:/file/upload
|
|
22
|
+
* @response `200` `(IFile)[]` 上传文件
|
|
23
|
+
*/
|
|
24
|
+
this.fileControllerUploadFile = (params = {}) => this.http.request({
|
|
25
|
+
path: `/file/upload`,
|
|
26
|
+
method: 'POST',
|
|
27
|
+
format: 'json',
|
|
28
|
+
...params,
|
|
29
|
+
});
|
|
30
|
+
this.http = http;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.Upload = Upload;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpClient, RequestParams } from './http-client';
|
|
2
|
+
export declare class Url<SecurityDataType = unknown> {
|
|
3
|
+
http: HttpClient<SecurityDataType>;
|
|
4
|
+
constructor(http: HttpClient<SecurityDataType>);
|
|
5
|
+
/**
|
|
6
|
+
* No description
|
|
7
|
+
*
|
|
8
|
+
* @tags View
|
|
9
|
+
* @name ViewControllerFindByUrl
|
|
10
|
+
* @request GET:/view/url
|
|
11
|
+
* @response `200` `void`
|
|
12
|
+
*/
|
|
13
|
+
viewControllerFindByUrl: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
14
|
+
}
|
package/dist/api/Url.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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.Url = void 0;
|
|
14
|
+
class Url {
|
|
15
|
+
constructor(http) {
|
|
16
|
+
/**
|
|
17
|
+
* No description
|
|
18
|
+
*
|
|
19
|
+
* @tags View
|
|
20
|
+
* @name ViewControllerFindByUrl
|
|
21
|
+
* @request GET:/view/url
|
|
22
|
+
* @response `200` `void`
|
|
23
|
+
*/
|
|
24
|
+
this.viewControllerFindByUrl = (params = {}) => this.http.request({
|
|
25
|
+
path: `/view/url`,
|
|
26
|
+
method: 'GET',
|
|
27
|
+
...params,
|
|
28
|
+
});
|
|
29
|
+
this.http = http;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.Url = Url;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IUser } from '../types/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 findAll
|
|
9
|
+
* @request GET:/user
|
|
10
|
+
*/
|
|
11
|
+
findAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUser[], any, {}>>;
|
|
12
|
+
/**
|
|
13
|
+
* No description
|
|
14
|
+
*
|
|
15
|
+
* @tags User
|
|
16
|
+
* @name UserControllerRegister
|
|
17
|
+
* @request POST:/user/register
|
|
18
|
+
*/
|
|
19
|
+
userControllerRegister: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUser[], any, {}>>;
|
|
20
|
+
/**
|
|
21
|
+
* No description
|
|
22
|
+
*
|
|
23
|
+
* @tags User
|
|
24
|
+
* @name UserControllerUpdate
|
|
25
|
+
* @request POST:/user/update
|
|
26
|
+
*/
|
|
27
|
+
userControllerUpdate: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUser[], any, {}>>;
|
|
28
|
+
/**
|
|
29
|
+
* No description
|
|
30
|
+
*
|
|
31
|
+
* @tags User
|
|
32
|
+
* @name UserControllerUpdatePassword
|
|
33
|
+
* @request POST:/user/password
|
|
34
|
+
*/
|
|
35
|
+
userControllerUpdatePassword: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUser[], any, {}>>;
|
|
36
|
+
}
|
package/dist/api/User.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
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 findAll
|
|
23
|
+
* @request GET:/user
|
|
24
|
+
*/
|
|
25
|
+
this.findAll = (params = {}) => this.request({
|
|
26
|
+
path: `/user`,
|
|
27
|
+
method: 'GET',
|
|
28
|
+
format: 'json',
|
|
29
|
+
...params,
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* No description
|
|
33
|
+
*
|
|
34
|
+
* @tags User
|
|
35
|
+
* @name UserControllerRegister
|
|
36
|
+
* @request POST:/user/register
|
|
37
|
+
*/
|
|
38
|
+
this.userControllerRegister = (params = {}) => this.request({
|
|
39
|
+
path: `/user/register`,
|
|
40
|
+
method: 'POST',
|
|
41
|
+
format: 'json',
|
|
42
|
+
...params,
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* No description
|
|
46
|
+
*
|
|
47
|
+
* @tags User
|
|
48
|
+
* @name UserControllerUpdate
|
|
49
|
+
* @request POST:/user/update
|
|
50
|
+
*/
|
|
51
|
+
this.userControllerUpdate = (params = {}) => this.request({
|
|
52
|
+
path: `/user/update`,
|
|
53
|
+
method: 'POST',
|
|
54
|
+
format: 'json',
|
|
55
|
+
...params,
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* No description
|
|
59
|
+
*
|
|
60
|
+
* @tags User
|
|
61
|
+
* @name UserControllerUpdatePassword
|
|
62
|
+
* @request POST:/user/password
|
|
63
|
+
*/
|
|
64
|
+
this.userControllerUpdatePassword = (params = {}) => this.request({
|
|
65
|
+
path: `/user/password`,
|
|
66
|
+
method: 'POST',
|
|
67
|
+
format: 'json',
|
|
68
|
+
...params,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.User = User;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IView } from '../types/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 create
|
|
9
|
+
* @request POST:/view
|
|
10
|
+
*/
|
|
11
|
+
create: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IView[], any, {}>>;
|
|
12
|
+
/**
|
|
13
|
+
* No description
|
|
14
|
+
*
|
|
15
|
+
* @tags View
|
|
16
|
+
* @name findAll
|
|
17
|
+
* @request GET:/view
|
|
18
|
+
*/
|
|
19
|
+
findAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
20
|
+
/**
|
|
21
|
+
* No description
|
|
22
|
+
*
|
|
23
|
+
* @tags View
|
|
24
|
+
* @name ViewControllerFindByUrl
|
|
25
|
+
* @request GET:/view/url
|
|
26
|
+
*/
|
|
27
|
+
viewControllerFindByUrl: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
28
|
+
/**
|
|
29
|
+
* No description
|
|
30
|
+
*
|
|
31
|
+
* @tags View
|
|
32
|
+
* @name findById
|
|
33
|
+
* @request GET:/view/{id}
|
|
34
|
+
*/
|
|
35
|
+
findById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
36
|
+
/**
|
|
37
|
+
* No description
|
|
38
|
+
*
|
|
39
|
+
* @tags View
|
|
40
|
+
* @name deleteById
|
|
41
|
+
* @request DELETE:/view/{id}
|
|
42
|
+
*/
|
|
43
|
+
deleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
44
|
+
}
|
package/dist/api/View.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
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 create
|
|
23
|
+
* @request POST:/view
|
|
24
|
+
*/
|
|
25
|
+
this.create = (params = {}) => this.request({
|
|
26
|
+
path: `/view`,
|
|
27
|
+
method: 'POST',
|
|
28
|
+
format: 'json',
|
|
29
|
+
...params,
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* No description
|
|
33
|
+
*
|
|
34
|
+
* @tags View
|
|
35
|
+
* @name findAll
|
|
36
|
+
* @request GET:/view
|
|
37
|
+
*/
|
|
38
|
+
this.findAll = (params = {}) => this.request({
|
|
39
|
+
path: `/view`,
|
|
40
|
+
method: 'GET',
|
|
41
|
+
...params,
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* No description
|
|
45
|
+
*
|
|
46
|
+
* @tags View
|
|
47
|
+
* @name ViewControllerFindByUrl
|
|
48
|
+
* @request GET:/view/url
|
|
49
|
+
*/
|
|
50
|
+
this.viewControllerFindByUrl = (params = {}) => this.request({
|
|
51
|
+
path: `/view/url`,
|
|
52
|
+
method: 'GET',
|
|
53
|
+
...params,
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* No description
|
|
57
|
+
*
|
|
58
|
+
* @tags View
|
|
59
|
+
* @name findById
|
|
60
|
+
* @request GET:/view/{id}
|
|
61
|
+
*/
|
|
62
|
+
this.findById = (id, params = {}) => this.request({
|
|
63
|
+
path: `/view/${id}`,
|
|
64
|
+
method: 'GET',
|
|
65
|
+
...params,
|
|
66
|
+
});
|
|
67
|
+
/**
|
|
68
|
+
* No description
|
|
69
|
+
*
|
|
70
|
+
* @tags View
|
|
71
|
+
* @name deleteById
|
|
72
|
+
* @request DELETE:/view/{id}
|
|
73
|
+
*/
|
|
74
|
+
this.deleteById = (id, params = {}) => this.request({
|
|
75
|
+
path: `/view/${id}`,
|
|
76
|
+
method: 'DELETE',
|
|
77
|
+
...params,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
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;
|