@origen-ui/admin-cli 1.0.2 → 1.0.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 (27) hide show
  1. package/package.json +1 -1
  2. package/templates/current/clean/CHANGELOG.md +19 -0
  3. package/templates/current/clean/package.json +15 -15
  4. package/templates/current/clean/scaffold.lock.json +2 -2
  5. package/templates/current/clean/src/api/generated/data-contracts.ts +268 -0
  6. package/templates/current/clean/src/api/generated/http-client.ts +266 -0
  7. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/206/205/345/256/271/346/226/207/347/253/240.ts +147 -0
  8. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/256/241/350/256/241.ts +53 -0
  9. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/346/226/207/344/273/266/344/270/212/344/274/240.ts +66 -0
  10. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/347/224/250/346/210/267.ts +172 -0
  11. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/217/234/345/215/225.ts +183 -0
  12. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/247/222/350/211/262.ts +170 -0
  13. package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/256/242/345/215/225/350/215/211/347/250/277.ts +171 -0
  14. package/templates/current/clean/src/api/generated//350/256/244/350/257/201.ts +98 -0
  15. package/templates/current/examples/CHANGELOG.md +19 -0
  16. package/templates/current/examples/package.json +15 -15
  17. package/templates/current/examples/scaffold.lock.json +2 -2
  18. package/templates/current/examples/src/api/generated/data-contracts.ts +268 -0
  19. package/templates/current/examples/src/api/generated/http-client.ts +266 -0
  20. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/206/205/345/256/271/346/226/207/347/253/240.ts +147 -0
  21. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/256/241/350/256/241.ts +53 -0
  22. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/346/226/207/344/273/266/344/270/212/344/274/240.ts +66 -0
  23. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/347/224/250/346/210/267.ts +172 -0
  24. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/217/234/345/215/225.ts +183 -0
  25. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/247/222/350/211/262.ts +170 -0
  26. package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/256/242/345/215/225/350/215/211/347/250/277.ts +171 -0
  27. package/templates/current/examples/src/api/generated//350/256/244/350/257/201.ts +98 -0
@@ -0,0 +1,53 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ // @ts-nocheck
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
+
13
+ import { PageResultRbacAuditEvent } from "./data-contracts";
14
+ import { HttpClient, RequestParams } from "./http-client";
15
+
16
+ export class 系统管理审计<SecurityDataType = unknown> {
17
+ http: HttpClient<SecurityDataType>;
18
+
19
+ constructor(http: HttpClient<SecurityDataType>) {
20
+ this.http = http;
21
+ }
22
+
23
+ /**
24
+ * No description
25
+ *
26
+ * @tags 系统管理-审计
27
+ * @name AuditList
28
+ * @summary 获取审计日志列表
29
+ * @request GET:/system/audit
30
+ * @secure
31
+ * @response `200` `PageResultRbacAuditEvent` 成功
32
+ */
33
+ auditList = (
34
+ query?: {
35
+ /** @default 1 */
36
+ page?: number;
37
+ /** @default 20 */
38
+ pageSize?: number;
39
+ keyword?: string;
40
+ action?: string;
41
+ targetType?: "user" | "role" | "menu" | "authorization";
42
+ },
43
+ params: RequestParams = {},
44
+ ) =>
45
+ this.http.request<PageResultRbacAuditEvent, any>({
46
+ path: `/system/audit`,
47
+ method: "GET",
48
+ query: query,
49
+ secure: true,
50
+ format: "json",
51
+ ...params,
52
+ });
53
+ }
@@ -0,0 +1,66 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ // @ts-nocheck
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
+
13
+ import { UploadResponse } from "./data-contracts";
14
+ import { ContentType, HttpClient, RequestParams } from "./http-client";
15
+
16
+ export class 系统管理文件上传<SecurityDataType = unknown> {
17
+ http: HttpClient<SecurityDataType>;
18
+
19
+ constructor(http: HttpClient<SecurityDataType>) {
20
+ this.http = http;
21
+ }
22
+
23
+ /**
24
+ * No description
25
+ *
26
+ * @tags 系统管理-文件上传
27
+ * @name UploadsCreate
28
+ * @summary 上传文件
29
+ * @request POST:/system/uploads
30
+ * @secure
31
+ * @response `200` `UploadResponse` 上传成功
32
+ */
33
+ uploadsCreate = (
34
+ data: {
35
+ /** @format binary */
36
+ file: File;
37
+ },
38
+ params: RequestParams = {},
39
+ ) =>
40
+ this.http.request<UploadResponse, any>({
41
+ path: `/system/uploads`,
42
+ method: "POST",
43
+ body: data,
44
+ secure: true,
45
+ type: ContentType.FormData,
46
+ format: "json",
47
+ ...params,
48
+ });
49
+ /**
50
+ * No description
51
+ *
52
+ * @tags 系统管理-文件上传
53
+ * @name UploadsDelete
54
+ * @summary 删除文件
55
+ * @request DELETE:/system/uploads/{id}
56
+ * @secure
57
+ * @response `204` `void` 删除成功
58
+ */
59
+ uploadsDelete = (id: string, params: RequestParams = {}) =>
60
+ this.http.request<void, any>({
61
+ path: `/system/uploads/${id}`,
62
+ method: "DELETE",
63
+ secure: true,
64
+ ...params,
65
+ });
66
+ }
@@ -0,0 +1,172 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ // @ts-nocheck
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
+
13
+ import {
14
+ AdminUser,
15
+ AdminUserDraft,
16
+ PageResultAdminUser,
17
+ } from "./data-contracts";
18
+ import { ContentType, HttpClient, RequestParams } from "./http-client";
19
+
20
+ export class 系统管理用户<SecurityDataType = unknown> {
21
+ http: HttpClient<SecurityDataType>;
22
+
23
+ constructor(http: HttpClient<SecurityDataType>) {
24
+ this.http = http;
25
+ }
26
+
27
+ /**
28
+ * No description
29
+ *
30
+ * @tags 系统管理-用户
31
+ * @name UsersList
32
+ * @summary 获取用户列表
33
+ * @request GET:/system/users
34
+ * @secure
35
+ * @response `200` `PageResultAdminUser` 成功
36
+ */
37
+ usersList = (
38
+ query?: {
39
+ /** @default 1 */
40
+ page?: number;
41
+ /** @default 20 */
42
+ pageSize?: number;
43
+ keyword?: string;
44
+ name?: string;
45
+ department?: string;
46
+ roleId?: string;
47
+ status?: "active" | "suspended";
48
+ sortBy?: string;
49
+ sortOrder?: "asc" | "desc";
50
+ },
51
+ params: RequestParams = {},
52
+ ) =>
53
+ this.http.request<PageResultAdminUser, any>({
54
+ path: `/system/users`,
55
+ method: "GET",
56
+ query: query,
57
+ secure: true,
58
+ format: "json",
59
+ ...params,
60
+ });
61
+ /**
62
+ * No description
63
+ *
64
+ * @tags 系统管理-用户
65
+ * @name UsersCreate
66
+ * @summary 创建用户
67
+ * @request POST:/system/users
68
+ * @secure
69
+ * @response `200` `AdminUser` 创建成功
70
+ */
71
+ usersCreate = (data: AdminUserDraft, params: RequestParams = {}) =>
72
+ this.http.request<AdminUser, any>({
73
+ path: `/system/users`,
74
+ method: "POST",
75
+ body: data,
76
+ secure: true,
77
+ type: ContentType.Json,
78
+ format: "json",
79
+ ...params,
80
+ });
81
+ /**
82
+ * No description
83
+ *
84
+ * @tags 系统管理-用户
85
+ * @name UsersDelete
86
+ * @summary 删除用户
87
+ * @request DELETE:/system/users
88
+ * @secure
89
+ * @response `204` `void` 删除成功
90
+ */
91
+ usersDelete = (
92
+ data: {
93
+ ids: string[];
94
+ },
95
+ params: RequestParams = {},
96
+ ) =>
97
+ this.http.request<void, any>({
98
+ path: `/system/users`,
99
+ method: "DELETE",
100
+ body: data,
101
+ secure: true,
102
+ type: ContentType.Json,
103
+ ...params,
104
+ });
105
+ /**
106
+ * No description
107
+ *
108
+ * @tags 系统管理-用户
109
+ * @name UsersDetail
110
+ * @summary 获取用户详情
111
+ * @request GET:/system/users/{id}
112
+ * @secure
113
+ * @response `200` `AdminUser` 成功
114
+ */
115
+ usersDetail = (id: string, params: RequestParams = {}) =>
116
+ this.http.request<AdminUser, any>({
117
+ path: `/system/users/${id}`,
118
+ method: "GET",
119
+ secure: true,
120
+ format: "json",
121
+ ...params,
122
+ });
123
+ /**
124
+ * No description
125
+ *
126
+ * @tags 系统管理-用户
127
+ * @name UsersUpdate
128
+ * @summary 更新用户
129
+ * @request PUT:/system/users/{id}
130
+ * @secure
131
+ * @response `200` `AdminUser` 更新成功
132
+ */
133
+ usersUpdate = (
134
+ id: string,
135
+ data: AdminUserDraft,
136
+ params: RequestParams = {},
137
+ ) =>
138
+ this.http.request<AdminUser, any>({
139
+ path: `/system/users/${id}`,
140
+ method: "PUT",
141
+ body: data,
142
+ secure: true,
143
+ type: ContentType.Json,
144
+ format: "json",
145
+ ...params,
146
+ });
147
+ /**
148
+ * No description
149
+ *
150
+ * @tags 系统管理-用户
151
+ * @name UsersStatusPartialUpdate
152
+ * @summary 批量更新用户状态
153
+ * @request PATCH:/system/users/status
154
+ * @secure
155
+ * @response `204` `void` 更新成功
156
+ */
157
+ usersStatusPartialUpdate = (
158
+ data: {
159
+ ids: string[];
160
+ status: "active" | "suspended";
161
+ },
162
+ params: RequestParams = {},
163
+ ) =>
164
+ this.http.request<void, any>({
165
+ path: `/system/users/status`,
166
+ method: "PATCH",
167
+ body: data,
168
+ secure: true,
169
+ type: ContentType.Json,
170
+ ...params,
171
+ });
172
+ }
@@ -0,0 +1,183 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ // @ts-nocheck
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
+
13
+ import {
14
+ BackendMenuNode,
15
+ PageResultRbacMenu,
16
+ RbacMenu,
17
+ RbacMenuDraft,
18
+ } from "./data-contracts";
19
+ import { ContentType, HttpClient, RequestParams } from "./http-client";
20
+
21
+ export class 系统管理菜单<SecurityDataType = unknown> {
22
+ http: HttpClient<SecurityDataType>;
23
+
24
+ constructor(http: HttpClient<SecurityDataType>) {
25
+ this.http = http;
26
+ }
27
+
28
+ /**
29
+ * No description
30
+ *
31
+ * @tags 系统管理-菜单
32
+ * @name MenusTreeList
33
+ * @summary 获取菜单树
34
+ * @request GET:/system/menus/tree
35
+ * @secure
36
+ * @response `200` `(BackendMenuNode)[]` 成功
37
+ */
38
+ menusTreeList = (params: RequestParams = {}) =>
39
+ this.http.request<BackendMenuNode[], any>({
40
+ path: `/system/menus/tree`,
41
+ method: "GET",
42
+ secure: true,
43
+ format: "json",
44
+ ...params,
45
+ });
46
+ /**
47
+ * No description
48
+ *
49
+ * @tags 系统管理-菜单
50
+ * @name MenusList
51
+ * @summary 获取菜单列表
52
+ * @request GET:/system/menus
53
+ * @secure
54
+ * @response `200` `PageResultRbacMenu` 成功
55
+ */
56
+ menusList = (
57
+ query?: {
58
+ /** @default 1 */
59
+ page?: number;
60
+ /** @default 20 */
61
+ pageSize?: number;
62
+ keyword?: string;
63
+ status?: "active" | "suspended";
64
+ kind?: "directory" | "page" | "button";
65
+ },
66
+ params: RequestParams = {},
67
+ ) =>
68
+ this.http.request<PageResultRbacMenu, any>({
69
+ path: `/system/menus`,
70
+ method: "GET",
71
+ query: query,
72
+ secure: true,
73
+ format: "json",
74
+ ...params,
75
+ });
76
+ /**
77
+ * No description
78
+ *
79
+ * @tags 系统管理-菜单
80
+ * @name MenusCreate
81
+ * @summary 创建菜单
82
+ * @request POST:/system/menus
83
+ * @secure
84
+ * @response `200` `RbacMenu` 创建成功
85
+ */
86
+ menusCreate = (data: RbacMenuDraft, params: RequestParams = {}) =>
87
+ this.http.request<RbacMenu, any>({
88
+ path: `/system/menus`,
89
+ method: "POST",
90
+ body: data,
91
+ secure: true,
92
+ type: ContentType.Json,
93
+ format: "json",
94
+ ...params,
95
+ });
96
+ /**
97
+ * No description
98
+ *
99
+ * @tags 系统管理-菜单
100
+ * @name MenusDelete
101
+ * @summary 删除菜单
102
+ * @request DELETE:/system/menus
103
+ * @secure
104
+ * @response `204` `void` 删除成功
105
+ */
106
+ menusDelete = (
107
+ data: {
108
+ ids: string[];
109
+ },
110
+ params: RequestParams = {},
111
+ ) =>
112
+ this.http.request<void, any>({
113
+ path: `/system/menus`,
114
+ method: "DELETE",
115
+ body: data,
116
+ secure: true,
117
+ type: ContentType.Json,
118
+ ...params,
119
+ });
120
+ /**
121
+ * No description
122
+ *
123
+ * @tags 系统管理-菜单
124
+ * @name MenusDetail
125
+ * @summary 获取菜单详情
126
+ * @request GET:/system/menus/{id}
127
+ * @secure
128
+ * @response `200` `RbacMenu` 成功
129
+ */
130
+ menusDetail = (id: string, params: RequestParams = {}) =>
131
+ this.http.request<RbacMenu, any>({
132
+ path: `/system/menus/${id}`,
133
+ method: "GET",
134
+ secure: true,
135
+ format: "json",
136
+ ...params,
137
+ });
138
+ /**
139
+ * No description
140
+ *
141
+ * @tags 系统管理-菜单
142
+ * @name MenusUpdate
143
+ * @summary 更新菜单
144
+ * @request PUT:/system/menus/{id}
145
+ * @secure
146
+ * @response `200` `RbacMenu` 更新成功
147
+ */
148
+ menusUpdate = (id: string, data: RbacMenuDraft, params: RequestParams = {}) =>
149
+ this.http.request<RbacMenu, any>({
150
+ path: `/system/menus/${id}`,
151
+ method: "PUT",
152
+ body: data,
153
+ secure: true,
154
+ type: ContentType.Json,
155
+ format: "json",
156
+ ...params,
157
+ });
158
+ /**
159
+ * No description
160
+ *
161
+ * @tags 系统管理-菜单
162
+ * @name MenusStatusPartialUpdate
163
+ * @summary 批量更新菜单状态
164
+ * @request PATCH:/system/menus/status
165
+ * @secure
166
+ * @response `204` `void` 更新成功
167
+ */
168
+ menusStatusPartialUpdate = (
169
+ data: {
170
+ ids: string[];
171
+ status: "active" | "suspended";
172
+ },
173
+ params: RequestParams = {},
174
+ ) =>
175
+ this.http.request<void, any>({
176
+ path: `/system/menus/status`,
177
+ method: "PATCH",
178
+ body: data,
179
+ secure: true,
180
+ type: ContentType.Json,
181
+ ...params,
182
+ });
183
+ }
@@ -0,0 +1,170 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ // @ts-nocheck
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
+
13
+ import {
14
+ AdminRole,
15
+ AdminRoleDraft,
16
+ PageResultAdminRole,
17
+ } from "./data-contracts";
18
+ import { ContentType, HttpClient, RequestParams } from "./http-client";
19
+
20
+ export class 系统管理角色<SecurityDataType = unknown> {
21
+ http: HttpClient<SecurityDataType>;
22
+
23
+ constructor(http: HttpClient<SecurityDataType>) {
24
+ this.http = http;
25
+ }
26
+
27
+ /**
28
+ * No description
29
+ *
30
+ * @tags 系统管理-角色
31
+ * @name RolesList
32
+ * @summary 获取角色列表
33
+ * @request GET:/system/roles
34
+ * @secure
35
+ * @response `200` `PageResultAdminRole` 成功
36
+ */
37
+ rolesList = (
38
+ query?: {
39
+ /** @default 1 */
40
+ page?: number;
41
+ /** @default 20 */
42
+ pageSize?: number;
43
+ keyword?: string;
44
+ name?: string;
45
+ status?: "active" | "suspended";
46
+ sortBy?: string;
47
+ sortOrder?: "asc" | "desc";
48
+ },
49
+ params: RequestParams = {},
50
+ ) =>
51
+ this.http.request<PageResultAdminRole, any>({
52
+ path: `/system/roles`,
53
+ method: "GET",
54
+ query: query,
55
+ secure: true,
56
+ format: "json",
57
+ ...params,
58
+ });
59
+ /**
60
+ * No description
61
+ *
62
+ * @tags 系统管理-角色
63
+ * @name RolesCreate
64
+ * @summary 创建角色
65
+ * @request POST:/system/roles
66
+ * @secure
67
+ * @response `200` `AdminRole` 创建成功
68
+ */
69
+ rolesCreate = (data: AdminRoleDraft, params: RequestParams = {}) =>
70
+ this.http.request<AdminRole, any>({
71
+ path: `/system/roles`,
72
+ method: "POST",
73
+ body: data,
74
+ secure: true,
75
+ type: ContentType.Json,
76
+ format: "json",
77
+ ...params,
78
+ });
79
+ /**
80
+ * No description
81
+ *
82
+ * @tags 系统管理-角色
83
+ * @name RolesDelete
84
+ * @summary 删除角色
85
+ * @request DELETE:/system/roles
86
+ * @secure
87
+ * @response `204` `void` 删除成功
88
+ */
89
+ rolesDelete = (
90
+ data: {
91
+ ids: string[];
92
+ },
93
+ params: RequestParams = {},
94
+ ) =>
95
+ this.http.request<void, any>({
96
+ path: `/system/roles`,
97
+ method: "DELETE",
98
+ body: data,
99
+ secure: true,
100
+ type: ContentType.Json,
101
+ ...params,
102
+ });
103
+ /**
104
+ * No description
105
+ *
106
+ * @tags 系统管理-角色
107
+ * @name RolesDetail
108
+ * @summary 获取角色详情
109
+ * @request GET:/system/roles/{id}
110
+ * @secure
111
+ * @response `200` `AdminRole` 成功
112
+ */
113
+ rolesDetail = (id: string, params: RequestParams = {}) =>
114
+ this.http.request<AdminRole, any>({
115
+ path: `/system/roles/${id}`,
116
+ method: "GET",
117
+ secure: true,
118
+ format: "json",
119
+ ...params,
120
+ });
121
+ /**
122
+ * No description
123
+ *
124
+ * @tags 系统管理-角色
125
+ * @name RolesUpdate
126
+ * @summary 更新角色
127
+ * @request PUT:/system/roles/{id}
128
+ * @secure
129
+ * @response `200` `AdminRole` 更新成功
130
+ */
131
+ rolesUpdate = (
132
+ id: string,
133
+ data: AdminRoleDraft,
134
+ params: RequestParams = {},
135
+ ) =>
136
+ this.http.request<AdminRole, any>({
137
+ path: `/system/roles/${id}`,
138
+ method: "PUT",
139
+ body: data,
140
+ secure: true,
141
+ type: ContentType.Json,
142
+ format: "json",
143
+ ...params,
144
+ });
145
+ /**
146
+ * No description
147
+ *
148
+ * @tags 系统管理-角色
149
+ * @name RolesStatusPartialUpdate
150
+ * @summary 批量更新角色状态
151
+ * @request PATCH:/system/roles/status
152
+ * @secure
153
+ * @response `204` `void` 更新成功
154
+ */
155
+ rolesStatusPartialUpdate = (
156
+ data: {
157
+ ids: string[];
158
+ status: "active" | "suspended";
159
+ },
160
+ params: RequestParams = {},
161
+ ) =>
162
+ this.http.request<void, any>({
163
+ path: `/system/roles/status`,
164
+ method: "PATCH",
165
+ body: data,
166
+ secure: true,
167
+ type: ContentType.Json,
168
+ ...params,
169
+ });
170
+ }