@fecommunity/reactpress-cli 0.1.0 → 0.2.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/bin/reactpress.js +246 -0
- package/lib/api-dev-runner.js +6 -0
- package/lib/api-dev.js +84 -0
- package/lib/bootstrap.js +109 -0
- package/lib/build.js +23 -0
- package/lib/dev.js +109 -0
- package/lib/docker.js +156 -0
- package/lib/http.js +80 -0
- package/lib/lifecycle.js +138 -0
- package/lib/paths.js +75 -0
- package/lib/pm2.js +31 -0
- package/lib/process.js +45 -0
- package/lib/publish.js +947 -0
- package/lib/root.js +31 -0
- package/lib/spawn.js +85 -0
- package/lib/status.js +54 -0
- package/package.json +32 -52
- package/ui/banner.js +16 -0
- package/ui/interactive.js +158 -0
- package/ui/theme.js +25 -0
- package/toolkit/dist/api/Article.d.ts +0 -123
- package/toolkit/dist/api/Article.js +0 -188
- package/toolkit/dist/api/Auth.d.ts +0 -32
- package/toolkit/dist/api/Auth.js +0 -58
- package/toolkit/dist/api/Category.d.ts +0 -51
- package/toolkit/dist/api/Category.js +0 -84
- package/toolkit/dist/api/Comment.d.ts +0 -60
- package/toolkit/dist/api/Comment.js +0 -97
- package/toolkit/dist/api/File.d.ts +0 -42
- package/toolkit/dist/api/File.js +0 -71
- package/toolkit/dist/api/HttpClient.d.ts +0 -41
- package/toolkit/dist/api/HttpClient.js +0 -96
- package/toolkit/dist/api/Knowledge.d.ts +0 -78
- package/toolkit/dist/api/Knowledge.js +0 -123
- package/toolkit/dist/api/Page.d.ts +0 -60
- package/toolkit/dist/api/Page.js +0 -97
- package/toolkit/dist/api/Search.d.ts +0 -32
- package/toolkit/dist/api/Search.js +0 -58
- package/toolkit/dist/api/Setting.d.ts +0 -24
- package/toolkit/dist/api/Setting.js +0 -45
- package/toolkit/dist/api/Smtp.d.ts +0 -33
- package/toolkit/dist/api/Smtp.js +0 -58
- package/toolkit/dist/api/Tag.d.ts +0 -60
- package/toolkit/dist/api/Tag.js +0 -97
- package/toolkit/dist/api/User.d.ts +0 -43
- package/toolkit/dist/api/User.js +0 -72
- package/toolkit/dist/api/View.d.ts +0 -51
- package/toolkit/dist/api/View.js +0 -84
- package/toolkit/dist/api/index.d.ts +0 -13
- package/toolkit/dist/api/index.js +0 -30
- package/toolkit/dist/api/instance.d.ts +0 -47
- package/toolkit/dist/api/instance.js +0 -71
- package/toolkit/dist/config/env.d.ts +0 -1
- package/toolkit/dist/config/env.js +0 -89
- package/toolkit/dist/config/global.d.ts +0 -34
- package/toolkit/dist/config/global.js +0 -382
- package/toolkit/dist/config/i18n.d.ts +0 -4
- package/toolkit/dist/config/i18n.js +0 -43
- package/toolkit/dist/config/index.d.ts +0 -15
- package/toolkit/dist/config/index.js +0 -25
- package/toolkit/dist/index.d.ts +0 -11
- package/toolkit/dist/index.js +0 -38
- package/toolkit/dist/locales/en.json +0 -97
- package/toolkit/dist/locales/zh.json +0 -97
- package/toolkit/dist/types/index.d.ts +0 -245
- package/toolkit/dist/types/index.js +0 -12
- package/toolkit/dist/utils/index.d.ts +0 -33
- package/toolkit/dist/utils/index.js +0 -59
- package/toolkit/package.json +0 -19
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance, AxiosRequestConfig, ResponseType } from 'axios';
|
|
2
|
-
export declare type QueryParamsType = Record<string | number, any>;
|
|
3
|
-
export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {
|
|
4
|
-
/** set parameter to `true` for call `securityWorker` for this request */
|
|
5
|
-
secure?: boolean;
|
|
6
|
-
/** request path */
|
|
7
|
-
path: string;
|
|
8
|
-
/** content type of request body */
|
|
9
|
-
type?: ContentType;
|
|
10
|
-
/** query params */
|
|
11
|
-
query?: QueryParamsType;
|
|
12
|
-
/** format of response (i.e. response.json() -> format: "json") */
|
|
13
|
-
format?: ResponseType;
|
|
14
|
-
/** request body */
|
|
15
|
-
body?: unknown;
|
|
16
|
-
}
|
|
17
|
-
export declare type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
|
|
18
|
-
export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {
|
|
19
|
-
securityWorker?: (securityData: SecurityDataType | null) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
|
|
20
|
-
secure?: boolean;
|
|
21
|
-
format?: ResponseType;
|
|
22
|
-
}
|
|
23
|
-
export declare enum ContentType {
|
|
24
|
-
Json = "application/json",
|
|
25
|
-
FormData = "multipart/form-data",
|
|
26
|
-
UrlEncoded = "application/x-www-form-urlencoded",
|
|
27
|
-
Text = "text/plain"
|
|
28
|
-
}
|
|
29
|
-
export declare class HttpClient<SecurityDataType = unknown> {
|
|
30
|
-
instance: AxiosInstance;
|
|
31
|
-
private securityData;
|
|
32
|
-
private securityWorker?;
|
|
33
|
-
private secure?;
|
|
34
|
-
private format?;
|
|
35
|
-
constructor({ securityWorker, secure, format, ...axiosConfig }?: ApiConfig<SecurityDataType>);
|
|
36
|
-
setSecurityData: (data: SecurityDataType | null) => void;
|
|
37
|
-
protected mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig;
|
|
38
|
-
protected stringifyFormItem(formItem: unknown): string;
|
|
39
|
-
protected createFormData(input: Record<string, unknown>): FormData;
|
|
40
|
-
request: <T = any, _E = any>({ secure, path, type, query, format, body, ...params }: FullRequestParams) => Promise<T>;
|
|
41
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
-
};
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.HttpClient = exports.ContentType = void 0;
|
|
17
|
-
const axios_1 = __importDefault(require("axios"));
|
|
18
|
-
var ContentType;
|
|
19
|
-
(function (ContentType) {
|
|
20
|
-
ContentType["Json"] = "application/json";
|
|
21
|
-
ContentType["FormData"] = "multipart/form-data";
|
|
22
|
-
ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
|
|
23
|
-
ContentType["Text"] = "text/plain";
|
|
24
|
-
})(ContentType = exports.ContentType || (exports.ContentType = {}));
|
|
25
|
-
class HttpClient {
|
|
26
|
-
constructor({ securityWorker, secure, format, ...axiosConfig } = {}) {
|
|
27
|
-
this.securityData = null;
|
|
28
|
-
this.setSecurityData = (data) => {
|
|
29
|
-
this.securityData = data;
|
|
30
|
-
};
|
|
31
|
-
this.request = async ({ secure, path, type, query, format, body, ...params }) => {
|
|
32
|
-
const secureParams = ((typeof secure === 'boolean' ? secure : this.secure) &&
|
|
33
|
-
this.securityWorker &&
|
|
34
|
-
(await this.securityWorker(this.securityData))) ||
|
|
35
|
-
{};
|
|
36
|
-
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
37
|
-
const responseFormat = format || this.format || undefined;
|
|
38
|
-
if (type === ContentType.FormData && body && body !== null && typeof body === 'object') {
|
|
39
|
-
body = this.createFormData(body);
|
|
40
|
-
}
|
|
41
|
-
if (type === ContentType.Text && body && body !== null && typeof body !== 'string') {
|
|
42
|
-
body = JSON.stringify(body);
|
|
43
|
-
}
|
|
44
|
-
return this.instance
|
|
45
|
-
.request({
|
|
46
|
-
...requestParams,
|
|
47
|
-
headers: {
|
|
48
|
-
...(requestParams.headers || {}),
|
|
49
|
-
...(type && type !== ContentType.FormData ? { 'Content-Type': type } : {}),
|
|
50
|
-
},
|
|
51
|
-
params: query,
|
|
52
|
-
responseType: responseFormat,
|
|
53
|
-
data: body,
|
|
54
|
-
url: path,
|
|
55
|
-
})
|
|
56
|
-
.then((response) => response.data);
|
|
57
|
-
};
|
|
58
|
-
this.instance = axios_1.default.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || 'http://localhost:3002' });
|
|
59
|
-
this.secure = secure;
|
|
60
|
-
this.format = format;
|
|
61
|
-
this.securityWorker = securityWorker;
|
|
62
|
-
}
|
|
63
|
-
mergeRequestParams(params1, params2) {
|
|
64
|
-
const method = params1.method || (params2 && params2.method);
|
|
65
|
-
return {
|
|
66
|
-
...this.instance.defaults,
|
|
67
|
-
...params1,
|
|
68
|
-
...(params2 || {}),
|
|
69
|
-
headers: {
|
|
70
|
-
...((method && this.instance.defaults.headers[method.toLowerCase()]) || {}),
|
|
71
|
-
...(params1.headers || {}),
|
|
72
|
-
...((params2 && params2.headers) || {}),
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
stringifyFormItem(formItem) {
|
|
77
|
-
if (typeof formItem === 'object' && formItem !== null) {
|
|
78
|
-
return JSON.stringify(formItem);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
return `${formItem}`;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
createFormData(input) {
|
|
85
|
-
return Object.keys(input || {}).reduce((formData, key) => {
|
|
86
|
-
const property = input[key];
|
|
87
|
-
const propertyContent = property instanceof Array ? property : [property];
|
|
88
|
-
for (const formItem of propertyContent) {
|
|
89
|
-
const isFileType = formItem instanceof Blob || formItem instanceof File;
|
|
90
|
-
formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem));
|
|
91
|
-
}
|
|
92
|
-
return formData;
|
|
93
|
-
}, new FormData());
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.HttpClient = HttpClient;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { IKnowledgeControllerCreateBookData, IKnowledgeControllerCreateChapterData } from '../types';
|
|
2
|
-
import { HttpClient, RequestParams } from './HttpClient';
|
|
3
|
-
export declare class Knowledge<SecurityDataType = unknown> {
|
|
4
|
-
http: HttpClient<SecurityDataType>;
|
|
5
|
-
constructor(http: HttpClient<SecurityDataType>);
|
|
6
|
-
/**
|
|
7
|
-
* No description
|
|
8
|
-
*
|
|
9
|
-
* @tags Knowledge
|
|
10
|
-
* @name KnowledgeControllerCreateBook
|
|
11
|
-
* @request POST:/Knowledge/book
|
|
12
|
-
* @response `200` `IKnowledgeControllerCreateBookData` 创建知识库
|
|
13
|
-
*/
|
|
14
|
-
createBook: (params?: RequestParams) => Promise<IKnowledgeControllerCreateBookData>;
|
|
15
|
-
/**
|
|
16
|
-
* No description
|
|
17
|
-
*
|
|
18
|
-
* @tags Knowledge
|
|
19
|
-
* @name KnowledgeControllerCreateChapter
|
|
20
|
-
* @request POST:/Knowledge/chapter
|
|
21
|
-
* @response `200` `IKnowledgeControllerCreateChapterData` 创建知识章节
|
|
22
|
-
*/
|
|
23
|
-
createChapter: (params?: RequestParams) => Promise<IKnowledgeControllerCreateChapterData>;
|
|
24
|
-
/**
|
|
25
|
-
* No description
|
|
26
|
-
*
|
|
27
|
-
* @tags Knowledge
|
|
28
|
-
* @name KnowledgeControllerDeleteById
|
|
29
|
-
* @request DELETE:/Knowledge/{id}
|
|
30
|
-
* @response `200` `IKnowledgeControllerDeleteByIdData`
|
|
31
|
-
*/
|
|
32
|
-
deleteById: (id: string, params?: RequestParams) => Promise<any>;
|
|
33
|
-
/**
|
|
34
|
-
* No description
|
|
35
|
-
*
|
|
36
|
-
* @tags Knowledge
|
|
37
|
-
* @name KnowledgeControllerUpdateById
|
|
38
|
-
* @request PATCH:/Knowledge/{id}
|
|
39
|
-
* @response `200` `IKnowledgeControllerUpdateByIdData`
|
|
40
|
-
*/
|
|
41
|
-
updateById: (id: string, params?: RequestParams) => Promise<any>;
|
|
42
|
-
/**
|
|
43
|
-
* No description
|
|
44
|
-
*
|
|
45
|
-
* @tags Knowledge
|
|
46
|
-
* @name KnowledgeControllerFindById
|
|
47
|
-
* @request GET:/Knowledge/{id}
|
|
48
|
-
* @response `200` `IKnowledgeControllerFindByIdData`
|
|
49
|
-
*/
|
|
50
|
-
findById: (id: string, params?: RequestParams) => Promise<any>;
|
|
51
|
-
/**
|
|
52
|
-
* No description
|
|
53
|
-
*
|
|
54
|
-
* @tags Knowledge
|
|
55
|
-
* @name KnowledgeControllerFindAll
|
|
56
|
-
* @request GET:/Knowledge
|
|
57
|
-
* @response `200` `IKnowledgeControllerFindAllData`
|
|
58
|
-
*/
|
|
59
|
-
findAll: (params?: RequestParams) => Promise<any>;
|
|
60
|
-
/**
|
|
61
|
-
* No description
|
|
62
|
-
*
|
|
63
|
-
* @tags Knowledge
|
|
64
|
-
* @name KnowledgeControllerUpdateViewsById
|
|
65
|
-
* @request POST:/Knowledge/{id}/views
|
|
66
|
-
* @response `200` `IKnowledgeControllerUpdateViewsByIdData`
|
|
67
|
-
*/
|
|
68
|
-
updateViewsById: (id: string, params?: RequestParams) => Promise<any>;
|
|
69
|
-
/**
|
|
70
|
-
* No description
|
|
71
|
-
*
|
|
72
|
-
* @tags Knowledge
|
|
73
|
-
* @name KnowledgeControllerUpdateLikesById
|
|
74
|
-
* @request POST:/Knowledge/{id}/likes
|
|
75
|
-
* @response `200` `IKnowledgeControllerUpdateLikesByIdData`
|
|
76
|
-
*/
|
|
77
|
-
updateLikesById: (id: string, params?: RequestParams) => Promise<any>;
|
|
78
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
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.Knowledge = void 0;
|
|
14
|
-
class Knowledge {
|
|
15
|
-
constructor(http) {
|
|
16
|
-
/**
|
|
17
|
-
* No description
|
|
18
|
-
*
|
|
19
|
-
* @tags Knowledge
|
|
20
|
-
* @name KnowledgeControllerCreateBook
|
|
21
|
-
* @request POST:/Knowledge/book
|
|
22
|
-
* @response `200` `IKnowledgeControllerCreateBookData` 创建知识库
|
|
23
|
-
*/
|
|
24
|
-
this.createBook = (params = {}) => this.http.request({
|
|
25
|
-
path: `/Knowledge/book`,
|
|
26
|
-
method: 'POST',
|
|
27
|
-
...params,
|
|
28
|
-
});
|
|
29
|
-
/**
|
|
30
|
-
* No description
|
|
31
|
-
*
|
|
32
|
-
* @tags Knowledge
|
|
33
|
-
* @name KnowledgeControllerCreateChapter
|
|
34
|
-
* @request POST:/Knowledge/chapter
|
|
35
|
-
* @response `200` `IKnowledgeControllerCreateChapterData` 创建知识章节
|
|
36
|
-
*/
|
|
37
|
-
this.createChapter = (params = {}) => this.http.request({
|
|
38
|
-
path: `/Knowledge/chapter`,
|
|
39
|
-
method: 'POST',
|
|
40
|
-
...params,
|
|
41
|
-
});
|
|
42
|
-
/**
|
|
43
|
-
* No description
|
|
44
|
-
*
|
|
45
|
-
* @tags Knowledge
|
|
46
|
-
* @name KnowledgeControllerDeleteById
|
|
47
|
-
* @request DELETE:/Knowledge/{id}
|
|
48
|
-
* @response `200` `IKnowledgeControllerDeleteByIdData`
|
|
49
|
-
*/
|
|
50
|
-
this.deleteById = (id, params = {}) => this.http.request({
|
|
51
|
-
path: `/Knowledge/${id}`,
|
|
52
|
-
method: 'DELETE',
|
|
53
|
-
...params,
|
|
54
|
-
});
|
|
55
|
-
/**
|
|
56
|
-
* No description
|
|
57
|
-
*
|
|
58
|
-
* @tags Knowledge
|
|
59
|
-
* @name KnowledgeControllerUpdateById
|
|
60
|
-
* @request PATCH:/Knowledge/{id}
|
|
61
|
-
* @response `200` `IKnowledgeControllerUpdateByIdData`
|
|
62
|
-
*/
|
|
63
|
-
this.updateById = (id, params = {}) => this.http.request({
|
|
64
|
-
path: `/Knowledge/${id}`,
|
|
65
|
-
method: 'PATCH',
|
|
66
|
-
...params,
|
|
67
|
-
});
|
|
68
|
-
/**
|
|
69
|
-
* No description
|
|
70
|
-
*
|
|
71
|
-
* @tags Knowledge
|
|
72
|
-
* @name KnowledgeControllerFindById
|
|
73
|
-
* @request GET:/Knowledge/{id}
|
|
74
|
-
* @response `200` `IKnowledgeControllerFindByIdData`
|
|
75
|
-
*/
|
|
76
|
-
this.findById = (id, params = {}) => this.http.request({
|
|
77
|
-
path: `/Knowledge/${id}`,
|
|
78
|
-
method: 'GET',
|
|
79
|
-
...params,
|
|
80
|
-
});
|
|
81
|
-
/**
|
|
82
|
-
* No description
|
|
83
|
-
*
|
|
84
|
-
* @tags Knowledge
|
|
85
|
-
* @name KnowledgeControllerFindAll
|
|
86
|
-
* @request GET:/Knowledge
|
|
87
|
-
* @response `200` `IKnowledgeControllerFindAllData`
|
|
88
|
-
*/
|
|
89
|
-
this.findAll = (params = {}) => this.http.request({
|
|
90
|
-
path: `/Knowledge`,
|
|
91
|
-
method: 'GET',
|
|
92
|
-
...params,
|
|
93
|
-
});
|
|
94
|
-
/**
|
|
95
|
-
* No description
|
|
96
|
-
*
|
|
97
|
-
* @tags Knowledge
|
|
98
|
-
* @name KnowledgeControllerUpdateViewsById
|
|
99
|
-
* @request POST:/Knowledge/{id}/views
|
|
100
|
-
* @response `200` `IKnowledgeControllerUpdateViewsByIdData`
|
|
101
|
-
*/
|
|
102
|
-
this.updateViewsById = (id, params = {}) => this.http.request({
|
|
103
|
-
path: `/Knowledge/${id}/views`,
|
|
104
|
-
method: 'POST',
|
|
105
|
-
...params,
|
|
106
|
-
});
|
|
107
|
-
/**
|
|
108
|
-
* No description
|
|
109
|
-
*
|
|
110
|
-
* @tags Knowledge
|
|
111
|
-
* @name KnowledgeControllerUpdateLikesById
|
|
112
|
-
* @request POST:/Knowledge/{id}/likes
|
|
113
|
-
* @response `200` `IKnowledgeControllerUpdateLikesByIdData`
|
|
114
|
-
*/
|
|
115
|
-
this.updateLikesById = (id, params = {}) => this.http.request({
|
|
116
|
-
path: `/Knowledge/${id}/likes`,
|
|
117
|
-
method: 'POST',
|
|
118
|
-
...params,
|
|
119
|
-
});
|
|
120
|
-
this.http = http;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
exports.Knowledge = Knowledge;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { IPageControllerCreateData } from '../types';
|
|
2
|
-
import { HttpClient, RequestParams } from './HttpClient';
|
|
3
|
-
export declare class Page<SecurityDataType = unknown> {
|
|
4
|
-
http: HttpClient<SecurityDataType>;
|
|
5
|
-
constructor(http: HttpClient<SecurityDataType>);
|
|
6
|
-
/**
|
|
7
|
-
* No description
|
|
8
|
-
*
|
|
9
|
-
* @tags Page
|
|
10
|
-
* @name PageControllerCreate
|
|
11
|
-
* @request POST:/page
|
|
12
|
-
* @response `200` `IPageControllerCreateData` 创建页面
|
|
13
|
-
*/
|
|
14
|
-
create: (params?: RequestParams) => Promise<IPageControllerCreateData>;
|
|
15
|
-
/**
|
|
16
|
-
* No description
|
|
17
|
-
*
|
|
18
|
-
* @tags Page
|
|
19
|
-
* @name PageControllerFindAll
|
|
20
|
-
* @request GET:/page
|
|
21
|
-
* @response `200` `IPageControllerFindAllData`
|
|
22
|
-
*/
|
|
23
|
-
findAll: (params?: RequestParams) => Promise<any>;
|
|
24
|
-
/**
|
|
25
|
-
* No description
|
|
26
|
-
*
|
|
27
|
-
* @tags Page
|
|
28
|
-
* @name PageControllerFindById
|
|
29
|
-
* @request GET:/page/{id}
|
|
30
|
-
* @response `200` `IPageControllerFindByIdData`
|
|
31
|
-
*/
|
|
32
|
-
findById: (id: string, params?: RequestParams) => Promise<any>;
|
|
33
|
-
/**
|
|
34
|
-
* No description
|
|
35
|
-
*
|
|
36
|
-
* @tags Page
|
|
37
|
-
* @name PageControllerUpdateById
|
|
38
|
-
* @request PATCH:/page/{id}
|
|
39
|
-
* @response `200` `IPageControllerUpdateByIdData`
|
|
40
|
-
*/
|
|
41
|
-
updateById: (id: string, params?: RequestParams) => Promise<any>;
|
|
42
|
-
/**
|
|
43
|
-
* No description
|
|
44
|
-
*
|
|
45
|
-
* @tags Page
|
|
46
|
-
* @name PageControllerDeleteById
|
|
47
|
-
* @request DELETE:/page/{id}
|
|
48
|
-
* @response `200` `IPageControllerDeleteByIdData`
|
|
49
|
-
*/
|
|
50
|
-
deleteById: (id: string, params?: RequestParams) => Promise<any>;
|
|
51
|
-
/**
|
|
52
|
-
* No description
|
|
53
|
-
*
|
|
54
|
-
* @tags Page
|
|
55
|
-
* @name PageControllerUpdateViewsById
|
|
56
|
-
* @request POST:/page/{id}/views
|
|
57
|
-
* @response `200` `IPageControllerUpdateViewsByIdData`
|
|
58
|
-
*/
|
|
59
|
-
updateViewsById: (id: string, params?: RequestParams) => Promise<any>;
|
|
60
|
-
}
|
package/toolkit/dist/api/Page.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
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.Page = void 0;
|
|
14
|
-
class Page {
|
|
15
|
-
constructor(http) {
|
|
16
|
-
/**
|
|
17
|
-
* No description
|
|
18
|
-
*
|
|
19
|
-
* @tags Page
|
|
20
|
-
* @name PageControllerCreate
|
|
21
|
-
* @request POST:/page
|
|
22
|
-
* @response `200` `IPageControllerCreateData` 创建页面
|
|
23
|
-
*/
|
|
24
|
-
this.create = (params = {}) => this.http.request({
|
|
25
|
-
path: `/page`,
|
|
26
|
-
method: 'POST',
|
|
27
|
-
...params,
|
|
28
|
-
});
|
|
29
|
-
/**
|
|
30
|
-
* No description
|
|
31
|
-
*
|
|
32
|
-
* @tags Page
|
|
33
|
-
* @name PageControllerFindAll
|
|
34
|
-
* @request GET:/page
|
|
35
|
-
* @response `200` `IPageControllerFindAllData`
|
|
36
|
-
*/
|
|
37
|
-
this.findAll = (params = {}) => this.http.request({
|
|
38
|
-
path: `/page`,
|
|
39
|
-
method: 'GET',
|
|
40
|
-
...params,
|
|
41
|
-
});
|
|
42
|
-
/**
|
|
43
|
-
* No description
|
|
44
|
-
*
|
|
45
|
-
* @tags Page
|
|
46
|
-
* @name PageControllerFindById
|
|
47
|
-
* @request GET:/page/{id}
|
|
48
|
-
* @response `200` `IPageControllerFindByIdData`
|
|
49
|
-
*/
|
|
50
|
-
this.findById = (id, params = {}) => this.http.request({
|
|
51
|
-
path: `/page/${id}`,
|
|
52
|
-
method: 'GET',
|
|
53
|
-
...params,
|
|
54
|
-
});
|
|
55
|
-
/**
|
|
56
|
-
* No description
|
|
57
|
-
*
|
|
58
|
-
* @tags Page
|
|
59
|
-
* @name PageControllerUpdateById
|
|
60
|
-
* @request PATCH:/page/{id}
|
|
61
|
-
* @response `200` `IPageControllerUpdateByIdData`
|
|
62
|
-
*/
|
|
63
|
-
this.updateById = (id, params = {}) => this.http.request({
|
|
64
|
-
path: `/page/${id}`,
|
|
65
|
-
method: 'PATCH',
|
|
66
|
-
...params,
|
|
67
|
-
});
|
|
68
|
-
/**
|
|
69
|
-
* No description
|
|
70
|
-
*
|
|
71
|
-
* @tags Page
|
|
72
|
-
* @name PageControllerDeleteById
|
|
73
|
-
* @request DELETE:/page/{id}
|
|
74
|
-
* @response `200` `IPageControllerDeleteByIdData`
|
|
75
|
-
*/
|
|
76
|
-
this.deleteById = (id, params = {}) => this.http.request({
|
|
77
|
-
path: `/page/${id}`,
|
|
78
|
-
method: 'DELETE',
|
|
79
|
-
...params,
|
|
80
|
-
});
|
|
81
|
-
/**
|
|
82
|
-
* No description
|
|
83
|
-
*
|
|
84
|
-
* @tags Page
|
|
85
|
-
* @name PageControllerUpdateViewsById
|
|
86
|
-
* @request POST:/page/{id}/views
|
|
87
|
-
* @response `200` `IPageControllerUpdateViewsByIdData`
|
|
88
|
-
*/
|
|
89
|
-
this.updateViewsById = (id, params = {}) => this.http.request({
|
|
90
|
-
path: `/page/${id}/views`,
|
|
91
|
-
method: 'POST',
|
|
92
|
-
...params,
|
|
93
|
-
});
|
|
94
|
-
this.http = http;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
exports.Page = Page;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { HttpClient, RequestParams } from './HttpClient';
|
|
2
|
-
export declare class Search<SecurityDataType = unknown> {
|
|
3
|
-
http: HttpClient<SecurityDataType>;
|
|
4
|
-
constructor(http: HttpClient<SecurityDataType>);
|
|
5
|
-
/**
|
|
6
|
-
* No description
|
|
7
|
-
*
|
|
8
|
-
* @tags Search
|
|
9
|
-
* @name SearchControllerSearchArticle
|
|
10
|
-
* @request GET:/search/article
|
|
11
|
-
* @response `200` `ISearchControllerSearchArticleData`
|
|
12
|
-
*/
|
|
13
|
-
searchArticle: (params?: RequestParams) => Promise<any>;
|
|
14
|
-
/**
|
|
15
|
-
* No description
|
|
16
|
-
*
|
|
17
|
-
* @tags Search
|
|
18
|
-
* @name SearchControllerFindAll
|
|
19
|
-
* @request GET:/search
|
|
20
|
-
* @response `200` `ISearchControllerFindAllData`
|
|
21
|
-
*/
|
|
22
|
-
findAll: (params?: RequestParams) => Promise<any>;
|
|
23
|
-
/**
|
|
24
|
-
* No description
|
|
25
|
-
*
|
|
26
|
-
* @tags Search
|
|
27
|
-
* @name SearchControllerDeleteById
|
|
28
|
-
* @request DELETE:/search/{id}
|
|
29
|
-
* @response `200` `ISearchControllerDeleteByIdData`
|
|
30
|
-
*/
|
|
31
|
-
deleteById: (id: string, params?: RequestParams) => Promise<any>;
|
|
32
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
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.Search = void 0;
|
|
14
|
-
class Search {
|
|
15
|
-
constructor(http) {
|
|
16
|
-
/**
|
|
17
|
-
* No description
|
|
18
|
-
*
|
|
19
|
-
* @tags Search
|
|
20
|
-
* @name SearchControllerSearchArticle
|
|
21
|
-
* @request GET:/search/article
|
|
22
|
-
* @response `200` `ISearchControllerSearchArticleData`
|
|
23
|
-
*/
|
|
24
|
-
this.searchArticle = (params = {}) => this.http.request({
|
|
25
|
-
path: `/search/article`,
|
|
26
|
-
method: 'GET',
|
|
27
|
-
...params,
|
|
28
|
-
});
|
|
29
|
-
/**
|
|
30
|
-
* No description
|
|
31
|
-
*
|
|
32
|
-
* @tags Search
|
|
33
|
-
* @name SearchControllerFindAll
|
|
34
|
-
* @request GET:/search
|
|
35
|
-
* @response `200` `ISearchControllerFindAllData`
|
|
36
|
-
*/
|
|
37
|
-
this.findAll = (params = {}) => this.http.request({
|
|
38
|
-
path: `/search`,
|
|
39
|
-
method: 'GET',
|
|
40
|
-
...params,
|
|
41
|
-
});
|
|
42
|
-
/**
|
|
43
|
-
* No description
|
|
44
|
-
*
|
|
45
|
-
* @tags Search
|
|
46
|
-
* @name SearchControllerDeleteById
|
|
47
|
-
* @request DELETE:/search/{id}
|
|
48
|
-
* @response `200` `ISearchControllerDeleteByIdData`
|
|
49
|
-
*/
|
|
50
|
-
this.deleteById = (id, params = {}) => this.http.request({
|
|
51
|
-
path: `/search/${id}`,
|
|
52
|
-
method: 'DELETE',
|
|
53
|
-
...params,
|
|
54
|
-
});
|
|
55
|
-
this.http = http;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.Search = Search;
|
|
@@ -1,24 +0,0 @@
|
|
|
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>);
|
|
6
|
-
/**
|
|
7
|
-
* No description
|
|
8
|
-
*
|
|
9
|
-
* @tags Setting
|
|
10
|
-
* @name SettingControllerUpdate
|
|
11
|
-
* @request POST:/setting
|
|
12
|
-
* @response `200` `ISettingControllerUpdateData` 更新设置
|
|
13
|
-
*/
|
|
14
|
-
update: (params?: RequestParams) => Promise<ISettingControllerUpdateData>;
|
|
15
|
-
/**
|
|
16
|
-
* No description
|
|
17
|
-
*
|
|
18
|
-
* @tags Setting
|
|
19
|
-
* @name SettingControllerFindAll
|
|
20
|
-
* @request POST:/setting/get
|
|
21
|
-
* @response `200` `ISettingControllerFindAllData`
|
|
22
|
-
*/
|
|
23
|
-
findAll: (params?: RequestParams) => Promise<any>;
|
|
24
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
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.Setting = void 0;
|
|
14
|
-
class Setting {
|
|
15
|
-
constructor(http) {
|
|
16
|
-
/**
|
|
17
|
-
* No description
|
|
18
|
-
*
|
|
19
|
-
* @tags Setting
|
|
20
|
-
* @name SettingControllerUpdate
|
|
21
|
-
* @request POST:/setting
|
|
22
|
-
* @response `200` `ISettingControllerUpdateData` 更新设置
|
|
23
|
-
*/
|
|
24
|
-
this.update = (params = {}) => this.http.request({
|
|
25
|
-
path: `/setting`,
|
|
26
|
-
method: 'POST',
|
|
27
|
-
...params,
|
|
28
|
-
});
|
|
29
|
-
/**
|
|
30
|
-
* No description
|
|
31
|
-
*
|
|
32
|
-
* @tags Setting
|
|
33
|
-
* @name SettingControllerFindAll
|
|
34
|
-
* @request POST:/setting/get
|
|
35
|
-
* @response `200` `ISettingControllerFindAllData`
|
|
36
|
-
*/
|
|
37
|
-
this.findAll = (params = {}) => this.http.request({
|
|
38
|
-
path: `/setting/get`,
|
|
39
|
-
method: 'POST',
|
|
40
|
-
...params,
|
|
41
|
-
});
|
|
42
|
-
this.http = http;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.Setting = Setting;
|