@fecommunity/reactpress-toolkit 1.0.0-beta.2 → 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.
Files changed (150) hide show
  1. package/README.md +221 -6
  2. package/dist/api/Article.d.ts +43 -28
  3. package/dist/api/Article.js +42 -31
  4. package/dist/api/Auth.d.ts +12 -7
  5. package/dist/api/Auth.js +12 -10
  6. package/dist/api/Category.d.ts +19 -12
  7. package/dist/api/Category.js +18 -15
  8. package/dist/api/Comment.d.ts +22 -14
  9. package/dist/api/Comment.js +21 -17
  10. package/dist/api/File.d.ts +16 -10
  11. package/dist/api/File.js +15 -13
  12. package/dist/{HttpClient.d.ts → api/HttpClient.d.ts} +2 -2
  13. package/dist/{HttpClient.js → api/HttpClient.js} +4 -2
  14. package/dist/api/Knowledge.d.ts +28 -18
  15. package/dist/api/Knowledge.js +27 -22
  16. package/dist/api/Page.d.ts +22 -14
  17. package/dist/api/Page.js +21 -17
  18. package/dist/api/Search.d.ts +12 -7
  19. package/dist/api/Search.js +12 -10
  20. package/dist/api/Setting.d.ts +10 -6
  21. package/dist/api/Setting.js +9 -9
  22. package/dist/api/Smtp.d.ts +13 -8
  23. package/dist/api/Smtp.js +12 -11
  24. package/dist/api/Tag.d.ts +22 -14
  25. package/dist/api/Tag.js +21 -17
  26. package/dist/api/User.d.ts +17 -10
  27. package/dist/api/User.js +16 -16
  28. package/dist/api/View.d.ts +19 -12
  29. package/dist/api/View.js +18 -15
  30. package/dist/api/index.d.ts +13 -18
  31. package/dist/api/index.js +28 -40
  32. package/dist/api/instance.d.ts +47 -0
  33. package/dist/api/instance.js +71 -0
  34. package/dist/config/env.d.ts +1 -0
  35. package/dist/config/env.js +93 -0
  36. package/dist/config/global.d.ts +34 -0
  37. package/dist/config/global.js +382 -0
  38. package/dist/config/i18n.d.ts +5 -0
  39. package/dist/config/i18n.js +47 -0
  40. package/dist/config/index.d.ts +14 -0
  41. package/dist/config/index.js +30 -0
  42. package/dist/index.d.ts +7 -4
  43. package/dist/index.js +21 -18
  44. package/dist/locales/en.json +97 -0
  45. package/dist/locales/zh.json +97 -0
  46. package/dist/types/index.d.ts +245 -1
  47. package/dist/types/index.js +10 -17
  48. package/dist/utils/index.d.ts +33 -2
  49. package/dist/utils/index.js +57 -18
  50. package/package.json +12 -5
  51. package/dist/Article.d.ts +0 -121
  52. package/dist/Article.js +0 -189
  53. package/dist/Auth.d.ts +0 -30
  54. package/dist/Auth.js +0 -59
  55. package/dist/Category.d.ts +0 -49
  56. package/dist/Category.js +0 -85
  57. package/dist/Comment.d.ts +0 -58
  58. package/dist/Comment.js +0 -98
  59. package/dist/File.d.ts +0 -40
  60. package/dist/File.js +0 -72
  61. package/dist/Knowledge.d.ts +0 -76
  62. package/dist/Knowledge.js +0 -124
  63. package/dist/Page.d.ts +0 -58
  64. package/dist/Page.js +0 -98
  65. package/dist/Search.d.ts +0 -30
  66. package/dist/Search.js +0 -59
  67. package/dist/Setting.d.ts +0 -22
  68. package/dist/Setting.js +0 -46
  69. package/dist/Smtp.d.ts +0 -31
  70. package/dist/Smtp.js +0 -59
  71. package/dist/Tag.d.ts +0 -58
  72. package/dist/Tag.js +0 -98
  73. package/dist/User.d.ts +0 -41
  74. package/dist/User.js +0 -73
  75. package/dist/View.d.ts +0 -49
  76. package/dist/View.js +0 -85
  77. package/dist/api/Admin.d.ts +0 -14
  78. package/dist/api/Admin.js +0 -32
  79. package/dist/api/All.d.ts +0 -14
  80. package/dist/api/All.js +0 -32
  81. package/dist/api/ApiInstance.d.ts +0 -39
  82. package/dist/api/ApiInstance.js +0 -46
  83. package/dist/api/Archives.d.ts +0 -14
  84. package/dist/api/Archives.js +0 -32
  85. package/dist/api/ArticleRoute.d.ts +0 -201
  86. package/dist/api/ArticleRoute.js +0 -12
  87. package/dist/api/AuthRoute.d.ts +0 -44
  88. package/dist/api/AuthRoute.js +0 -12
  89. package/dist/api/Book.d.ts +0 -15
  90. package/dist/api/Book.js +0 -33
  91. package/dist/api/CategoryRoute.d.ts +0 -79
  92. package/dist/api/CategoryRoute.js +0 -12
  93. package/dist/api/Chapter.d.ts +0 -15
  94. package/dist/api/Chapter.js +0 -33
  95. package/dist/api/CommentRoute.d.ts +0 -95
  96. package/dist/api/CommentRoute.js +0 -12
  97. package/dist/api/FileRoute.d.ts +0 -63
  98. package/dist/api/FileRoute.js +0 -12
  99. package/dist/api/Get.d.ts +0 -14
  100. package/dist/api/Get.js +0 -32
  101. package/dist/api/Github.d.ts +0 -14
  102. package/dist/api/Github.js +0 -32
  103. package/dist/api/Host.d.ts +0 -14
  104. package/dist/api/Host.js +0 -32
  105. package/dist/api/Id.d.ts +0 -284
  106. package/dist/api/Id.js +0 -422
  107. package/dist/api/KnowledgeRoute.d.ts +0 -125
  108. package/dist/api/KnowledgeRoute.js +0 -12
  109. package/dist/api/Login.d.ts +0 -14
  110. package/dist/api/Login.js +0 -32
  111. package/dist/api/PageRoute.d.ts +0 -95
  112. package/dist/api/PageRoute.js +0 -12
  113. package/dist/api/Password.d.ts +0 -15
  114. package/dist/api/Password.js +0 -33
  115. package/dist/api/Recommend.d.ts +0 -14
  116. package/dist/api/Recommend.js +0 -32
  117. package/dist/api/Register.d.ts +0 -15
  118. package/dist/api/Register.js +0 -33
  119. package/dist/api/SearchRoute.d.ts +0 -46
  120. package/dist/api/SearchRoute.js +0 -12
  121. package/dist/api/SettingRoute.d.ts +0 -31
  122. package/dist/api/SettingRoute.js +0 -12
  123. package/dist/api/SmtpRoute.d.ts +0 -47
  124. package/dist/api/SmtpRoute.js +0 -12
  125. package/dist/api/TagRoute.d.ts +0 -95
  126. package/dist/api/TagRoute.js +0 -12
  127. package/dist/api/Update.d.ts +0 -15
  128. package/dist/api/Update.js +0 -33
  129. package/dist/api/Upload.d.ts +0 -15
  130. package/dist/api/Upload.js +0 -33
  131. package/dist/api/Url.d.ts +0 -14
  132. package/dist/api/Url.js +0 -32
  133. package/dist/api/UserRoute.d.ts +0 -60
  134. package/dist/api/UserRoute.js +0 -12
  135. package/dist/api/ViewRoute.d.ts +0 -77
  136. package/dist/api/ViewRoute.js +0 -12
  137. package/dist/api/api-instance.d.ts +0 -39
  138. package/dist/api/api-instance.js +0 -46
  139. package/dist/api/http-client.d.ts +0 -41
  140. package/dist/api/http-client.js +0 -94
  141. package/dist/api/httpClient.d.ts +0 -42
  142. package/dist/api/httpClient.js +0 -95
  143. package/dist/data-contracts.d.ts +0 -245
  144. package/dist/data-contracts.js +0 -12
  145. package/dist/types/data-contracts.d.ts +0 -177
  146. package/dist/types/data-contracts.js +0 -12
  147. package/dist/utils/common.d.ts +0 -21
  148. package/dist/utils/common.js +0 -52
  149. package/dist/utils/http.d.ts +0 -3
  150. package/dist/utils/http.js +0 -45
package/dist/api/Get.d.ts DELETED
@@ -1,14 +0,0 @@
1
- import { HttpClient, RequestParams } from './http-client';
2
- export declare class Get<SecurityDataType = unknown> {
3
- http: HttpClient<SecurityDataType>;
4
- constructor(http: HttpClient<SecurityDataType>);
5
- /**
6
- * No description
7
- *
8
- * @tags Setting
9
- * @name SettingControllerFindAll
10
- * @request POST:/setting/get
11
- * @response `200` `void`
12
- */
13
- settingControllerFindAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
14
- }
package/dist/api/Get.js DELETED
@@ -1,32 +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.Get = void 0;
14
- class Get {
15
- constructor(http) {
16
- /**
17
- * No description
18
- *
19
- * @tags Setting
20
- * @name SettingControllerFindAll
21
- * @request POST:/setting/get
22
- * @response `200` `void`
23
- */
24
- this.settingControllerFindAll = (params = {}) => this.http.request({
25
- path: `/setting/get`,
26
- method: 'POST',
27
- ...params,
28
- });
29
- this.http = http;
30
- }
31
- }
32
- exports.Get = Get;
@@ -1,14 +0,0 @@
1
- import { HttpClient, RequestParams } from './http-client';
2
- export declare class Github<SecurityDataType = unknown> {
3
- http: HttpClient<SecurityDataType>;
4
- constructor(http: HttpClient<SecurityDataType>);
5
- /**
6
- * No description
7
- *
8
- * @tags Auth
9
- * @name AuthControllerLoginWithGithub
10
- * @request POST:/auth/github
11
- * @response `201` `void`
12
- */
13
- authControllerLoginWithGithub: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
14
- }
@@ -1,32 +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.Github = void 0;
14
- class Github {
15
- constructor(http) {
16
- /**
17
- * No description
18
- *
19
- * @tags Auth
20
- * @name AuthControllerLoginWithGithub
21
- * @request POST:/auth/github
22
- * @response `201` `void`
23
- */
24
- this.authControllerLoginWithGithub = (params = {}) => this.http.request({
25
- path: `/auth/github`,
26
- method: 'POST',
27
- ...params,
28
- });
29
- this.http = http;
30
- }
31
- }
32
- exports.Github = Github;
@@ -1,14 +0,0 @@
1
- import { HttpClient, RequestParams } from './http-client';
2
- export declare class Host<SecurityDataType = unknown> {
3
- http: HttpClient<SecurityDataType>;
4
- constructor(http: HttpClient<SecurityDataType>);
5
- /**
6
- * No description
7
- *
8
- * @tags Comment
9
- * @name CommentControllerGetArticleComments
10
- * @request GET:/comment/host/{hostId}
11
- * @response `200` `void`
12
- */
13
- commentControllerGetArticleComments: (hostId: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
14
- }
package/dist/api/Host.js DELETED
@@ -1,32 +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.Host = void 0;
14
- class Host {
15
- constructor(http) {
16
- /**
17
- * No description
18
- *
19
- * @tags Comment
20
- * @name CommentControllerGetArticleComments
21
- * @request GET:/comment/host/{hostId}
22
- * @response `200` `void`
23
- */
24
- this.commentControllerGetArticleComments = (hostId, params = {}) => this.http.request({
25
- path: `/comment/host/${hostId}`,
26
- method: 'GET',
27
- ...params,
28
- });
29
- this.http = http;
30
- }
31
- }
32
- exports.Host = Host;
package/dist/api/Id.d.ts DELETED
@@ -1,284 +0,0 @@
1
- import { HttpClient, RequestParams } from './http-client';
2
- export declare class Id<SecurityDataType = unknown> {
3
- http: HttpClient<SecurityDataType>;
4
- constructor(http: HttpClient<SecurityDataType>);
5
- /**
6
- * No description
7
- *
8
- * @tags Smtp
9
- * @name SmtpControllerDeleteById
10
- * @request DELETE:/smtp/{id}
11
- * @response `200` `void`
12
- */
13
- smtpControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
14
- /**
15
- * No description
16
- *
17
- * @tags File
18
- * @name FileControllerFindById
19
- * @request GET:/file/{id}
20
- * @response `200` `void`
21
- */
22
- fileControllerFindById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
23
- /**
24
- * No description
25
- *
26
- * @tags File
27
- * @name FileControllerDeleteById
28
- * @request DELETE:/file/{id}
29
- * @response `200` `void`
30
- */
31
- fileControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
32
- /**
33
- * No description
34
- *
35
- * @tags Tag
36
- * @name TagControllerFindById
37
- * @request GET:/tag/{id}
38
- * @response `200` `void`
39
- */
40
- tagControllerFindById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
41
- /**
42
- * No description
43
- *
44
- * @tags Tag
45
- * @name TagControllerUpdateById
46
- * @request PATCH:/tag/{id}
47
- * @response `200` `void`
48
- */
49
- tagControllerUpdateById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
50
- /**
51
- * No description
52
- *
53
- * @tags Tag
54
- * @name TagControllerDeleteById
55
- * @request DELETE:/tag/{id}
56
- * @response `200` `void`
57
- */
58
- tagControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
59
- /**
60
- * No description
61
- *
62
- * @tags Tag
63
- * @name TagControllerGetArticleById
64
- * @request GET:/tag/{id}/article
65
- * @response `200` `void`
66
- */
67
- tagControllerGetArticleById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
68
- /**
69
- * No description
70
- *
71
- * @tags Article
72
- * @name ArticleControllerFindById
73
- * @request GET:/article/{id}
74
- * @response `200` `void`
75
- */
76
- articleControllerFindById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
77
- /**
78
- * No description
79
- *
80
- * @tags Article
81
- * @name ArticleControllerUpdateById
82
- * @request PATCH:/article/{id}
83
- * @response `200` `void`
84
- */
85
- articleControllerUpdateById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
86
- /**
87
- * No description
88
- *
89
- * @tags Article
90
- * @name ArticleControllerDeleteById
91
- * @request DELETE:/article/{id}
92
- * @response `200` `void`
93
- */
94
- articleControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
95
- /**
96
- * No description
97
- *
98
- * @tags Article
99
- * @name ArticleControllerCheckPassword
100
- * @request POST:/article/{id}/checkPassword
101
- * @response `200` `void`
102
- */
103
- articleControllerCheckPassword: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
104
- /**
105
- * No description
106
- *
107
- * @tags Article
108
- * @name ArticleControllerUpdateViewsById
109
- * @request POST:/article/{id}/views
110
- * @response `200` `void`
111
- */
112
- articleControllerUpdateViewsById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
113
- /**
114
- * No description
115
- *
116
- * @tags Article
117
- * @name ArticleControllerUpdateLikesById
118
- * @request POST:/article/{id}/likes
119
- * @response `200` `void`
120
- */
121
- articleControllerUpdateLikesById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
122
- /**
123
- * No description
124
- *
125
- * @tags Category
126
- * @name CategoryControllerFindById
127
- * @request GET:/category/{id}
128
- * @response `200` `void`
129
- */
130
- categoryControllerFindById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
131
- /**
132
- * No description
133
- *
134
- * @tags Category
135
- * @name CategoryControllerUpdateById
136
- * @request PATCH:/category/{id}
137
- * @response `200` `void`
138
- */
139
- categoryControllerUpdateById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
140
- /**
141
- * No description
142
- *
143
- * @tags Category
144
- * @name CategoryControllerDeleteById
145
- * @request DELETE:/category/{id}
146
- * @response `200` `void`
147
- */
148
- categoryControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
149
- /**
150
- * No description
151
- *
152
- * @tags Knowledge
153
- * @name KnowledgeControllerDeleteById
154
- * @request DELETE:/Knowledge/{id}
155
- * @response `200` `void`
156
- */
157
- knowledgeControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
158
- /**
159
- * No description
160
- *
161
- * @tags Knowledge
162
- * @name KnowledgeControllerUpdateById
163
- * @request PATCH:/Knowledge/{id}
164
- * @response `200` `void`
165
- */
166
- knowledgeControllerUpdateById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
167
- /**
168
- * No description
169
- *
170
- * @tags Knowledge
171
- * @name KnowledgeControllerFindById
172
- * @request GET:/Knowledge/{id}
173
- * @response `200` `void`
174
- */
175
- knowledgeControllerFindById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
176
- /**
177
- * No description
178
- *
179
- * @tags Knowledge
180
- * @name KnowledgeControllerUpdateViewsById
181
- * @request POST:/Knowledge/{id}/views
182
- * @response `200` `void`
183
- */
184
- knowledgeControllerUpdateViewsById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
185
- /**
186
- * No description
187
- *
188
- * @tags Knowledge
189
- * @name KnowledgeControllerUpdateLikesById
190
- * @request POST:/Knowledge/{id}/likes
191
- * @response `200` `void`
192
- */
193
- knowledgeControllerUpdateLikesById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
194
- /**
195
- * No description
196
- *
197
- * @tags Comment
198
- * @name CommentControllerFindById
199
- * @request GET:/comment/{id}
200
- * @response `200` `void`
201
- */
202
- commentControllerFindById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
203
- /**
204
- * No description
205
- *
206
- * @tags Comment
207
- * @name CommentControllerUpdateById
208
- * @request PATCH:/comment/{id}
209
- * @response `200` `void`
210
- */
211
- commentControllerUpdateById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
212
- /**
213
- * No description
214
- *
215
- * @tags Comment
216
- * @name CommentControllerDeleteById
217
- * @request DELETE:/comment/{id}
218
- * @response `200` `void`
219
- */
220
- commentControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
221
- /**
222
- * No description
223
- *
224
- * @tags Page
225
- * @name PageControllerFindById
226
- * @request GET:/page/{id}
227
- * @response `200` `void`
228
- */
229
- pageControllerFindById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
230
- /**
231
- * No description
232
- *
233
- * @tags Page
234
- * @name PageControllerUpdateById
235
- * @request PATCH:/page/{id}
236
- * @response `200` `void`
237
- */
238
- pageControllerUpdateById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
239
- /**
240
- * No description
241
- *
242
- * @tags Page
243
- * @name PageControllerDeleteById
244
- * @request DELETE:/page/{id}
245
- * @response `200` `void`
246
- */
247
- pageControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
248
- /**
249
- * No description
250
- *
251
- * @tags Page
252
- * @name PageControllerUpdateViewsById
253
- * @request POST:/page/{id}/views
254
- * @response `200` `void`
255
- */
256
- pageControllerUpdateViewsById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
257
- /**
258
- * No description
259
- *
260
- * @tags View
261
- * @name ViewControllerFindById
262
- * @request GET:/view/{id}
263
- * @response `200` `void`
264
- */
265
- viewControllerFindById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
266
- /**
267
- * No description
268
- *
269
- * @tags View
270
- * @name ViewControllerDeleteById
271
- * @request DELETE:/view/{id}
272
- * @response `200` `void`
273
- */
274
- viewControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
275
- /**
276
- * No description
277
- *
278
- * @tags Search
279
- * @name SearchControllerDeleteById
280
- * @request DELETE:/search/{id}
281
- * @response `200` `void`
282
- */
283
- searchControllerDeleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
284
- }