@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.
Files changed (109) hide show
  1. package/LICENSE +21 -0
  2. package/demos/simple.ts +65 -0
  3. package/dist/api/Admin.d.ts +14 -0
  4. package/dist/api/Admin.js +32 -0
  5. package/dist/api/All.d.ts +14 -0
  6. package/dist/api/All.js +32 -0
  7. package/dist/api/Archives.d.ts +14 -0
  8. package/dist/api/Archives.js +32 -0
  9. package/dist/api/Article.d.ts +108 -0
  10. package/dist/api/Article.js +177 -0
  11. package/dist/api/Auth.d.ts +27 -0
  12. package/dist/api/Auth.js +56 -0
  13. package/dist/api/Book.d.ts +15 -0
  14. package/dist/api/Book.js +33 -0
  15. package/dist/api/Category.d.ts +44 -0
  16. package/dist/api/Category.js +81 -0
  17. package/dist/api/Chapter.d.ts +15 -0
  18. package/dist/api/Chapter.js +33 -0
  19. package/dist/api/Comment.d.ts +52 -0
  20. package/dist/api/Comment.js +93 -0
  21. package/dist/api/File.d.ts +36 -0
  22. package/dist/api/File.js +69 -0
  23. package/dist/api/Get.d.ts +14 -0
  24. package/dist/api/Get.js +32 -0
  25. package/dist/api/Github.d.ts +14 -0
  26. package/dist/api/Github.js +32 -0
  27. package/dist/api/Host.d.ts +14 -0
  28. package/dist/api/Host.js +32 -0
  29. package/dist/api/Id.d.ts +284 -0
  30. package/dist/api/Id.js +422 -0
  31. package/dist/api/Knowledge.d.ts +68 -0
  32. package/dist/api/Knowledge.js +118 -0
  33. package/dist/api/Login.d.ts +14 -0
  34. package/dist/api/Login.js +32 -0
  35. package/dist/api/Page.d.ts +52 -0
  36. package/dist/api/Page.js +93 -0
  37. package/dist/api/Password.d.ts +15 -0
  38. package/dist/api/Password.js +33 -0
  39. package/dist/api/Recommend.d.ts +14 -0
  40. package/dist/api/Recommend.js +32 -0
  41. package/dist/api/Register.d.ts +15 -0
  42. package/dist/api/Register.js +33 -0
  43. package/dist/api/Search.d.ts +27 -0
  44. package/dist/api/Search.js +56 -0
  45. package/dist/api/Setting.d.ts +20 -0
  46. package/dist/api/Setting.js +45 -0
  47. package/dist/api/Smtp.d.ts +28 -0
  48. package/dist/api/Smtp.js +57 -0
  49. package/dist/api/Tag.d.ts +52 -0
  50. package/dist/api/Tag.js +93 -0
  51. package/dist/api/Update.d.ts +15 -0
  52. package/dist/api/Update.js +33 -0
  53. package/dist/api/Upload.d.ts +15 -0
  54. package/dist/api/Upload.js +33 -0
  55. package/dist/api/Url.d.ts +14 -0
  56. package/dist/api/Url.js +32 -0
  57. package/dist/api/User.d.ts +36 -0
  58. package/dist/api/User.js +72 -0
  59. package/dist/api/View.d.ts +44 -0
  60. package/dist/api/View.js +81 -0
  61. package/dist/api/api-instance.d.ts +39 -0
  62. package/dist/api/api-instance.js +46 -0
  63. package/dist/api/http-client.d.ts +41 -0
  64. package/dist/api/http-client.js +94 -0
  65. package/dist/api/httpClient.d.ts +41 -0
  66. package/dist/api/httpClient.js +94 -0
  67. package/dist/api/index.d.ts +18 -0
  68. package/dist/api/index.js +43 -0
  69. package/dist/index.d.ts +9 -0
  70. package/dist/index.js +46 -0
  71. package/dist/types/data-contracts.d.ts +177 -0
  72. package/dist/types/data-contracts.js +12 -0
  73. package/dist/types/index.d.ts +1 -0
  74. package/dist/types/index.js +19 -0
  75. package/dist/utils/common.d.ts +23 -0
  76. package/dist/utils/common.js +78 -0
  77. package/dist/utils/http.d.ts +3 -0
  78. package/dist/utils/http.js +47 -0
  79. package/dist/utils/index.d.ts +2 -0
  80. package/dist/utils/index.js +20 -0
  81. package/package.json +19 -0
  82. package/scripts/generate-api-types.js +571 -0
  83. package/scripts/generate-swagger.js +47 -0
  84. package/scripts/organize-api.js +136 -0
  85. package/src/api/Article.ts +186 -0
  86. package/src/api/Auth.ts +54 -0
  87. package/src/api/Category.ts +82 -0
  88. package/src/api/Comment.ts +95 -0
  89. package/src/api/File.ts +69 -0
  90. package/src/api/Knowledge.ts +122 -0
  91. package/src/api/Page.ts +95 -0
  92. package/src/api/Search.ts +54 -0
  93. package/src/api/Setting.ts +43 -0
  94. package/src/api/Smtp.ts +56 -0
  95. package/src/api/Tag.ts +95 -0
  96. package/src/api/User.ts +72 -0
  97. package/src/api/View.ts +82 -0
  98. package/src/api/api-instance.ts +69 -0
  99. package/src/api/httpClient.ts +140 -0
  100. package/src/api/index.ts +25 -0
  101. package/src/index.ts +18 -0
  102. package/src/types/data-contracts.ts +198 -0
  103. package/src/types/index.ts +4 -0
  104. package/src/utils/common.ts +108 -0
  105. package/src/utils/http.ts +52 -0
  106. package/src/utils/index.ts +5 -0
  107. package/test-final.js +56 -0
  108. package/test-import.js +34 -0
  109. 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
+ }
@@ -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
+ }
@@ -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
+ }
@@ -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
+ }
@@ -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
+ }
@@ -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;