@fecommunity/reactpress-toolkit 1.0.0-beta.2 → 1.0.0-beta.4

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 +222 -25
  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 +89 -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 +4 -0
  39. package/dist/config/i18n.js +43 -0
  40. package/dist/config/index.d.ts +15 -0
  41. package/dist/config/index.js +25 -0
  42. package/dist/index.d.ts +11 -5
  43. package/dist/index.js +18 -25
  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 +20 -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/Tag.js CHANGED
@@ -11,31 +11,30 @@
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.Tag = void 0;
14
- const HttpClient_1 = require("./HttpClient");
15
- class Tag extends HttpClient_1.HttpClient {
16
- constructor() {
17
- super(...arguments);
14
+ class Tag {
15
+ constructor(http) {
18
16
  /**
19
17
  * No description
20
18
  *
21
19
  * @tags Tag
22
- * @name create
20
+ * @name TagControllerCreate
23
21
  * @request POST:/tag
22
+ * @response `200` `ITagControllerCreateData` 创建标签
24
23
  */
25
- this.create = (params = {}) => this.request({
24
+ this.create = (params = {}) => this.http.request({
26
25
  path: `/tag`,
27
26
  method: 'POST',
28
- format: 'json',
29
27
  ...params,
30
28
  });
31
29
  /**
32
30
  * No description
33
31
  *
34
32
  * @tags Tag
35
- * @name findAll
33
+ * @name TagControllerFindAll
36
34
  * @request GET:/tag
35
+ * @response `200` `ITagControllerFindAllData`
37
36
  */
38
- this.findAll = (params = {}) => this.request({
37
+ this.findAll = (params = {}) => this.http.request({
39
38
  path: `/tag`,
40
39
  method: 'GET',
41
40
  ...params,
@@ -44,10 +43,11 @@ class Tag extends HttpClient_1.HttpClient {
44
43
  * No description
45
44
  *
46
45
  * @tags Tag
47
- * @name findById
46
+ * @name TagControllerFindById
48
47
  * @request GET:/tag/{id}
48
+ * @response `200` `ITagControllerFindByIdData`
49
49
  */
50
- this.findById = (id, params = {}) => this.request({
50
+ this.findById = (id, params = {}) => this.http.request({
51
51
  path: `/tag/${id}`,
52
52
  method: 'GET',
53
53
  ...params,
@@ -56,10 +56,11 @@ class Tag extends HttpClient_1.HttpClient {
56
56
  * No description
57
57
  *
58
58
  * @tags Tag
59
- * @name updateById
59
+ * @name TagControllerUpdateById
60
60
  * @request PATCH:/tag/{id}
61
+ * @response `200` `ITagControllerUpdateByIdData`
61
62
  */
62
- this.updateById = (id, params = {}) => this.request({
63
+ this.updateById = (id, params = {}) => this.http.request({
63
64
  path: `/tag/${id}`,
64
65
  method: 'PATCH',
65
66
  ...params,
@@ -68,10 +69,11 @@ class Tag extends HttpClient_1.HttpClient {
68
69
  * No description
69
70
  *
70
71
  * @tags Tag
71
- * @name deleteById
72
+ * @name TagControllerDeleteById
72
73
  * @request DELETE:/tag/{id}
74
+ * @response `200` `ITagControllerDeleteByIdData`
73
75
  */
74
- this.deleteById = (id, params = {}) => this.request({
76
+ this.deleteById = (id, params = {}) => this.http.request({
75
77
  path: `/tag/${id}`,
76
78
  method: 'DELETE',
77
79
  ...params,
@@ -80,14 +82,16 @@ class Tag extends HttpClient_1.HttpClient {
80
82
  * No description
81
83
  *
82
84
  * @tags Tag
83
- * @name getArticleById
85
+ * @name TagControllerGetArticleById
84
86
  * @request GET:/tag/{id}/article
87
+ * @response `200` `ITagControllerGetArticleByIdData`
85
88
  */
86
- this.getArticleById = (id, params = {}) => this.request({
89
+ this.getArticleById = (id, params = {}) => this.http.request({
87
90
  path: `/tag/${id}/article`,
88
91
  method: 'GET',
89
92
  ...params,
90
93
  });
94
+ this.http = http;
91
95
  }
92
96
  }
93
97
  exports.Tag = Tag;
@@ -1,36 +1,43 @@
1
- import { IUser } from '../types/data-contracts';
1
+ import { IUserControllerFindAllData, IUserControllerRegisterData, IUserControllerUpdateData, IUserControllerUpdatePasswordData } from '../types';
2
2
  import { HttpClient, RequestParams } from './HttpClient';
3
- export declare class User<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
3
+ export declare class User<SecurityDataType = unknown> {
4
+ http: HttpClient<SecurityDataType>;
5
+ constructor(http: HttpClient<SecurityDataType>);
4
6
  /**
5
7
  * No description
6
8
  *
7
9
  * @tags User
8
- * @name findAll
10
+ * @name UserControllerFindAll
9
11
  * @request GET:/user
12
+ * @response `200` `IUserControllerFindAllData` 获取用户列表
13
+ * @response `403` `void` 无权获取用户列表
10
14
  */
11
- findAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUser[], any, {}>>;
15
+ findAll: (params?: RequestParams) => Promise<IUserControllerFindAllData>;
12
16
  /**
13
17
  * No description
14
18
  *
15
19
  * @tags User
16
- * @name register
20
+ * @name UserControllerRegister
17
21
  * @request POST:/user/register
22
+ * @response `201` `IUserControllerRegisterData` 创建用户
18
23
  */
19
- register: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUser[], any, {}>>;
24
+ register: (params?: RequestParams) => Promise<IUserControllerRegisterData>;
20
25
  /**
21
26
  * No description
22
27
  *
23
28
  * @tags User
24
- * @name update
29
+ * @name UserControllerUpdate
25
30
  * @request POST:/user/update
31
+ * @response `200` `IUserControllerUpdateData` 更新用户成功
26
32
  */
27
- update: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUser[], any, {}>>;
33
+ update: (params?: RequestParams) => Promise<IUserControllerUpdateData>;
28
34
  /**
29
35
  * No description
30
36
  *
31
37
  * @tags User
32
- * @name updatePassword
38
+ * @name UserControllerUpdatePassword
33
39
  * @request POST:/user/password
40
+ * @response `201` `IUserControllerUpdatePasswordData` 更新密码成功
34
41
  */
35
- updatePassword: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IUser[], any, {}>>;
42
+ updatePassword: (params?: RequestParams) => Promise<IUserControllerUpdatePasswordData>;
36
43
  }
package/dist/api/User.js CHANGED
@@ -11,62 +11,62 @@
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.User = void 0;
14
- const HttpClient_1 = require("./HttpClient");
15
- class User extends HttpClient_1.HttpClient {
16
- constructor() {
17
- super(...arguments);
14
+ class User {
15
+ constructor(http) {
18
16
  /**
19
17
  * No description
20
18
  *
21
19
  * @tags User
22
- * @name findAll
20
+ * @name UserControllerFindAll
23
21
  * @request GET:/user
22
+ * @response `200` `IUserControllerFindAllData` 获取用户列表
23
+ * @response `403` `void` 无权获取用户列表
24
24
  */
25
- this.findAll = (params = {}) => this.request({
25
+ this.findAll = (params = {}) => this.http.request({
26
26
  path: `/user`,
27
27
  method: 'GET',
28
- format: 'json',
29
28
  ...params,
30
29
  });
31
30
  /**
32
31
  * No description
33
32
  *
34
33
  * @tags User
35
- * @name register
34
+ * @name UserControllerRegister
36
35
  * @request POST:/user/register
36
+ * @response `201` `IUserControllerRegisterData` 创建用户
37
37
  */
38
- this.register = (params = {}) => this.request({
38
+ this.register = (params = {}) => this.http.request({
39
39
  path: `/user/register`,
40
40
  method: 'POST',
41
- format: 'json',
42
41
  ...params,
43
42
  });
44
43
  /**
45
44
  * No description
46
45
  *
47
46
  * @tags User
48
- * @name update
47
+ * @name UserControllerUpdate
49
48
  * @request POST:/user/update
49
+ * @response `200` `IUserControllerUpdateData` 更新用户成功
50
50
  */
51
- this.update = (params = {}) => this.request({
51
+ this.update = (params = {}) => this.http.request({
52
52
  path: `/user/update`,
53
53
  method: 'POST',
54
- format: 'json',
55
54
  ...params,
56
55
  });
57
56
  /**
58
57
  * No description
59
58
  *
60
59
  * @tags User
61
- * @name updatePassword
60
+ * @name UserControllerUpdatePassword
62
61
  * @request POST:/user/password
62
+ * @response `201` `IUserControllerUpdatePasswordData` 更新密码成功
63
63
  */
64
- this.updatePassword = (params = {}) => this.request({
64
+ this.updatePassword = (params = {}) => this.http.request({
65
65
  path: `/user/password`,
66
66
  method: 'POST',
67
- format: 'json',
68
67
  ...params,
69
68
  });
69
+ this.http = http;
70
70
  }
71
71
  }
72
72
  exports.User = User;
@@ -1,44 +1,51 @@
1
- import { IView } from '../types/data-contracts';
1
+ import { IViewControllerCreateData } from '../types';
2
2
  import { HttpClient, RequestParams } from './HttpClient';
3
- export declare class View<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
3
+ export declare class View<SecurityDataType = unknown> {
4
+ http: HttpClient<SecurityDataType>;
5
+ constructor(http: HttpClient<SecurityDataType>);
4
6
  /**
5
7
  * No description
6
8
  *
7
9
  * @tags View
8
- * @name create
10
+ * @name ViewControllerCreate
9
11
  * @request POST:/view
12
+ * @response `200` `IViewControllerCreateData` 访问记录添加成功
10
13
  */
11
- create: (params?: RequestParams) => Promise<import("axios").AxiosResponse<IView[], any, {}>>;
14
+ create: (params?: RequestParams) => Promise<IViewControllerCreateData>;
12
15
  /**
13
16
  * No description
14
17
  *
15
18
  * @tags View
16
- * @name findAll
19
+ * @name ViewControllerFindAll
17
20
  * @request GET:/view
21
+ * @response `200` `IViewControllerFindAllData`
18
22
  */
19
- findAll: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
23
+ findAll: (params?: RequestParams) => Promise<any>;
20
24
  /**
21
25
  * No description
22
26
  *
23
27
  * @tags View
24
- * @name findByUrl
28
+ * @name ViewControllerFindByUrl
25
29
  * @request GET:/view/url
30
+ * @response `200` `IViewControllerFindByUrlData`
26
31
  */
27
- findByUrl: (params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
32
+ findByUrl: (params?: RequestParams) => Promise<any>;
28
33
  /**
29
34
  * No description
30
35
  *
31
36
  * @tags View
32
- * @name findById
37
+ * @name ViewControllerFindById
33
38
  * @request GET:/view/{id}
39
+ * @response `200` `IViewControllerFindByIdData`
34
40
  */
35
- findById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
41
+ findById: (id: string, params?: RequestParams) => Promise<any>;
36
42
  /**
37
43
  * No description
38
44
  *
39
45
  * @tags View
40
- * @name deleteById
46
+ * @name ViewControllerDeleteById
41
47
  * @request DELETE:/view/{id}
48
+ * @response `200` `IViewControllerDeleteByIdData`
42
49
  */
43
- deleteById: (id: string, params?: RequestParams) => Promise<import("axios").AxiosResponse<void, any, {}>>;
50
+ deleteById: (id: string, params?: RequestParams) => Promise<any>;
44
51
  }
package/dist/api/View.js CHANGED
@@ -11,31 +11,30 @@
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.View = void 0;
14
- const HttpClient_1 = require("./HttpClient");
15
- class View extends HttpClient_1.HttpClient {
16
- constructor() {
17
- super(...arguments);
14
+ class View {
15
+ constructor(http) {
18
16
  /**
19
17
  * No description
20
18
  *
21
19
  * @tags View
22
- * @name create
20
+ * @name ViewControllerCreate
23
21
  * @request POST:/view
22
+ * @response `200` `IViewControllerCreateData` 访问记录添加成功
24
23
  */
25
- this.create = (params = {}) => this.request({
24
+ this.create = (params = {}) => this.http.request({
26
25
  path: `/view`,
27
26
  method: 'POST',
28
- format: 'json',
29
27
  ...params,
30
28
  });
31
29
  /**
32
30
  * No description
33
31
  *
34
32
  * @tags View
35
- * @name findAll
33
+ * @name ViewControllerFindAll
36
34
  * @request GET:/view
35
+ * @response `200` `IViewControllerFindAllData`
37
36
  */
38
- this.findAll = (params = {}) => this.request({
37
+ this.findAll = (params = {}) => this.http.request({
39
38
  path: `/view`,
40
39
  method: 'GET',
41
40
  ...params,
@@ -44,10 +43,11 @@ class View extends HttpClient_1.HttpClient {
44
43
  * No description
45
44
  *
46
45
  * @tags View
47
- * @name findByUrl
46
+ * @name ViewControllerFindByUrl
48
47
  * @request GET:/view/url
48
+ * @response `200` `IViewControllerFindByUrlData`
49
49
  */
50
- this.findByUrl = (params = {}) => this.request({
50
+ this.findByUrl = (params = {}) => this.http.request({
51
51
  path: `/view/url`,
52
52
  method: 'GET',
53
53
  ...params,
@@ -56,10 +56,11 @@ class View extends HttpClient_1.HttpClient {
56
56
  * No description
57
57
  *
58
58
  * @tags View
59
- * @name findById
59
+ * @name ViewControllerFindById
60
60
  * @request GET:/view/{id}
61
+ * @response `200` `IViewControllerFindByIdData`
61
62
  */
62
- this.findById = (id, params = {}) => this.request({
63
+ this.findById = (id, params = {}) => this.http.request({
63
64
  path: `/view/${id}`,
64
65
  method: 'GET',
65
66
  ...params,
@@ -68,14 +69,16 @@ class View extends HttpClient_1.HttpClient {
68
69
  * No description
69
70
  *
70
71
  * @tags View
71
- * @name deleteById
72
+ * @name ViewControllerDeleteById
72
73
  * @request DELETE:/view/{id}
74
+ * @response `200` `IViewControllerDeleteByIdData`
73
75
  */
74
- this.deleteById = (id, params = {}) => this.request({
76
+ this.deleteById = (id, params = {}) => this.http.request({
75
77
  path: `/view/${id}`,
76
78
  method: 'DELETE',
77
79
  ...params,
78
80
  });
81
+ this.http = http;
79
82
  }
80
83
  }
81
84
  exports.View = View;
@@ -1,18 +1,13 @@
1
- export * from './Article';
2
- export * from './Auth';
3
- export * from './Category';
4
- export * from './Comment';
5
- export * from './File';
6
- export * from './HttpClient';
7
- export * from './Knowledge';
8
- export * from './Page';
9
- export * from './Search';
10
- export * from './Setting';
11
- export * from './Smtp';
12
- export * from './Tag';
13
- export * from './User';
14
- export * from './View';
15
- export { default as HttpClient } from './HttpClient';
16
- export type { HttpClientConfig } from './HttpClient';
17
- export * from './ApiInstance';
18
- export { default as api } from './ApiInstance';
1
+ export { Article } from './Article';
2
+ export { Auth } from './Auth';
3
+ export { Category } from './Category';
4
+ export { Comment } from './Comment';
5
+ export { File } from './File';
6
+ export { Knowledge } from './Knowledge';
7
+ export { Page } from './Page';
8
+ export { Search } from './Search';
9
+ export { Setting } from './Setting';
10
+ export { Smtp } from './Smtp';
11
+ export { Tag } from './Tag';
12
+ export { User } from './User';
13
+ export { View } from './View';
package/dist/api/index.js CHANGED
@@ -1,42 +1,30 @@
1
1
  "use strict";
2
- // API 客户端索引
3
- // 自动生成,请勿手动修改
4
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
- if (k2 === undefined) k2 = k;
6
- var desc = Object.getOwnPropertyDescriptor(m, k);
7
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
- desc = { enumerable: true, get: function() { return m[k]; } };
9
- }
10
- Object.defineProperty(o, k2, desc);
11
- }) : (function(o, m, k, k2) {
12
- if (k2 === undefined) k2 = k;
13
- o[k2] = m[k];
14
- }));
15
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
- };
18
- var __importDefault = (this && this.__importDefault) || function (mod) {
19
- return (mod && mod.__esModule) ? mod : { "default": mod };
20
- };
2
+ // Auto-generated API module index
21
3
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.api = exports.HttpClient = void 0;
23
- __exportStar(require("./Article"), exports);
24
- __exportStar(require("./Auth"), exports);
25
- __exportStar(require("./Category"), exports);
26
- __exportStar(require("./Comment"), exports);
27
- __exportStar(require("./File"), exports);
28
- __exportStar(require("./HttpClient"), exports);
29
- __exportStar(require("./Knowledge"), exports);
30
- __exportStar(require("./Page"), exports);
31
- __exportStar(require("./Search"), exports);
32
- __exportStar(require("./Setting"), exports);
33
- __exportStar(require("./Smtp"), exports);
34
- __exportStar(require("./Tag"), exports);
35
- __exportStar(require("./User"), exports);
36
- __exportStar(require("./View"), exports);
37
- var HttpClient_1 = require("./HttpClient");
38
- Object.defineProperty(exports, "HttpClient", { enumerable: true, get: function () { return __importDefault(HttpClient_1).default; } });
39
- // API 实例化
40
- __exportStar(require("./ApiInstance"), exports);
41
- var ApiInstance_1 = require("./ApiInstance");
42
- Object.defineProperty(exports, "api", { enumerable: true, get: function () { return __importDefault(ApiInstance_1).default; } });
4
+ exports.View = exports.User = exports.Tag = exports.Smtp = exports.Setting = exports.Search = exports.Page = exports.Knowledge = exports.File = exports.Comment = exports.Category = exports.Auth = exports.Article = void 0;
5
+ var Article_1 = require("./Article");
6
+ Object.defineProperty(exports, "Article", { enumerable: true, get: function () { return Article_1.Article; } });
7
+ var Auth_1 = require("./Auth");
8
+ Object.defineProperty(exports, "Auth", { enumerable: true, get: function () { return Auth_1.Auth; } });
9
+ var Category_1 = require("./Category");
10
+ Object.defineProperty(exports, "Category", { enumerable: true, get: function () { return Category_1.Category; } });
11
+ var Comment_1 = require("./Comment");
12
+ Object.defineProperty(exports, "Comment", { enumerable: true, get: function () { return Comment_1.Comment; } });
13
+ var File_1 = require("./File");
14
+ Object.defineProperty(exports, "File", { enumerable: true, get: function () { return File_1.File; } });
15
+ var Knowledge_1 = require("./Knowledge");
16
+ Object.defineProperty(exports, "Knowledge", { enumerable: true, get: function () { return Knowledge_1.Knowledge; } });
17
+ var Page_1 = require("./Page");
18
+ Object.defineProperty(exports, "Page", { enumerable: true, get: function () { return Page_1.Page; } });
19
+ var Search_1 = require("./Search");
20
+ Object.defineProperty(exports, "Search", { enumerable: true, get: function () { return Search_1.Search; } });
21
+ var Setting_1 = require("./Setting");
22
+ Object.defineProperty(exports, "Setting", { enumerable: true, get: function () { return Setting_1.Setting; } });
23
+ var Smtp_1 = require("./Smtp");
24
+ Object.defineProperty(exports, "Smtp", { enumerable: true, get: function () { return Smtp_1.Smtp; } });
25
+ var Tag_1 = require("./Tag");
26
+ Object.defineProperty(exports, "Tag", { enumerable: true, get: function () { return Tag_1.Tag; } });
27
+ var User_1 = require("./User");
28
+ Object.defineProperty(exports, "User", { enumerable: true, get: function () { return User_1.User; } });
29
+ var View_1 = require("./View");
30
+ Object.defineProperty(exports, "View", { enumerable: true, get: function () { return View_1.View; } });
@@ -0,0 +1,47 @@
1
+ import { HttpClient } 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 declare const http: HttpClient<unknown>;
16
+ export declare const api: {
17
+ article: Article<unknown>;
18
+ auth: Auth<unknown>;
19
+ category: Category<unknown>;
20
+ comment: Comment<unknown>;
21
+ file: File<unknown>;
22
+ knowledge: Knowledge<unknown>;
23
+ page: Page<unknown>;
24
+ search: Search<unknown>;
25
+ setting: Setting<unknown>;
26
+ smtp: Smtp<unknown>;
27
+ tag: Tag<unknown>;
28
+ user: User<unknown>;
29
+ view: View<unknown>;
30
+ };
31
+ export declare function createApiInstance(config: any): {
32
+ article: Article<unknown>;
33
+ auth: Auth<unknown>;
34
+ category: Category<unknown>;
35
+ comment: Comment<unknown>;
36
+ file: File<unknown>;
37
+ knowledge: Knowledge<unknown>;
38
+ page: Page<unknown>;
39
+ search: Search<unknown>;
40
+ setting: Setting<unknown>;
41
+ smtp: Smtp<unknown>;
42
+ tag: Tag<unknown>;
43
+ user: User<unknown>;
44
+ view: View<unknown>;
45
+ };
46
+ export default api;
47
+ export { Article, Auth, Category, Comment, File, Knowledge, Page, Search, Setting, Smtp, Tag, User, View, };
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.View = exports.User = exports.Tag = exports.Smtp = exports.Setting = exports.Search = exports.Page = exports.Knowledge = exports.File = exports.Comment = exports.Category = exports.Auth = exports.Article = exports.createApiInstance = exports.api = exports.http = void 0;
4
+ const HttpClient_1 = require("./HttpClient");
5
+ // Auto-generated API instance
6
+ const Article_1 = require("./Article");
7
+ Object.defineProperty(exports, "Article", { enumerable: true, get: function () { return Article_1.Article; } });
8
+ const Auth_1 = require("./Auth");
9
+ Object.defineProperty(exports, "Auth", { enumerable: true, get: function () { return Auth_1.Auth; } });
10
+ const Category_1 = require("./Category");
11
+ Object.defineProperty(exports, "Category", { enumerable: true, get: function () { return Category_1.Category; } });
12
+ const Comment_1 = require("./Comment");
13
+ Object.defineProperty(exports, "Comment", { enumerable: true, get: function () { return Comment_1.Comment; } });
14
+ const File_1 = require("./File");
15
+ Object.defineProperty(exports, "File", { enumerable: true, get: function () { return File_1.File; } });
16
+ const Knowledge_1 = require("./Knowledge");
17
+ Object.defineProperty(exports, "Knowledge", { enumerable: true, get: function () { return Knowledge_1.Knowledge; } });
18
+ const Page_1 = require("./Page");
19
+ Object.defineProperty(exports, "Page", { enumerable: true, get: function () { return Page_1.Page; } });
20
+ const Search_1 = require("./Search");
21
+ Object.defineProperty(exports, "Search", { enumerable: true, get: function () { return Search_1.Search; } });
22
+ const Setting_1 = require("./Setting");
23
+ Object.defineProperty(exports, "Setting", { enumerable: true, get: function () { return Setting_1.Setting; } });
24
+ const Smtp_1 = require("./Smtp");
25
+ Object.defineProperty(exports, "Smtp", { enumerable: true, get: function () { return Smtp_1.Smtp; } });
26
+ const Tag_1 = require("./Tag");
27
+ Object.defineProperty(exports, "Tag", { enumerable: true, get: function () { return Tag_1.Tag; } });
28
+ const User_1 = require("./User");
29
+ Object.defineProperty(exports, "User", { enumerable: true, get: function () { return User_1.User; } });
30
+ const View_1 = require("./View");
31
+ Object.defineProperty(exports, "View", { enumerable: true, get: function () { return View_1.View; } });
32
+ // Create default HTTP client
33
+ exports.http = new HttpClient_1.HttpClient();
34
+ // Create API instance with all modules
35
+ exports.api = {
36
+ article: new Article_1.Article(exports.http),
37
+ auth: new Auth_1.Auth(exports.http),
38
+ category: new Category_1.Category(exports.http),
39
+ comment: new Comment_1.Comment(exports.http),
40
+ file: new File_1.File(exports.http),
41
+ knowledge: new Knowledge_1.Knowledge(exports.http),
42
+ page: new Page_1.Page(exports.http),
43
+ search: new Search_1.Search(exports.http),
44
+ setting: new Setting_1.Setting(exports.http),
45
+ smtp: new Smtp_1.Smtp(exports.http),
46
+ tag: new Tag_1.Tag(exports.http),
47
+ user: new User_1.User(exports.http),
48
+ view: new View_1.View(exports.http),
49
+ };
50
+ // Create custom API instance function
51
+ function createApiInstance(config) {
52
+ const customHttp = new HttpClient_1.HttpClient(config);
53
+ return {
54
+ article: new Article_1.Article(customHttp),
55
+ auth: new Auth_1.Auth(customHttp),
56
+ category: new Category_1.Category(customHttp),
57
+ comment: new Comment_1.Comment(customHttp),
58
+ file: new File_1.File(customHttp),
59
+ knowledge: new Knowledge_1.Knowledge(customHttp),
60
+ page: new Page_1.Page(customHttp),
61
+ search: new Search_1.Search(customHttp),
62
+ setting: new Setting_1.Setting(customHttp),
63
+ smtp: new Smtp_1.Smtp(customHttp),
64
+ tag: new Tag_1.Tag(customHttp),
65
+ user: new User_1.User(customHttp),
66
+ view: new View_1.View(customHttp),
67
+ };
68
+ }
69
+ exports.createApiInstance = createApiInstance;
70
+ // Export default API instance
71
+ exports.default = exports.api;
@@ -0,0 +1 @@
1
+ export declare const file: string, config: Record<string, string>;