Skip to content

Commit 452e787

Browse files
author
ChiveHao
authored
Userme (#637)
* feat: add UserMeEndpoint * optimize: remove getCurrentUser in UserEndpoint * build: gen new api-client v0.14.3+1 * fix: adjust api request in console. * docs: update CHANGELOG.MD
1 parent 17df8b8 commit 452e787

File tree

21 files changed

+1397
-1123
lines changed

21 files changed

+1397
-1123
lines changed

CHANGELOG.MD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
## 新特性
88

99
- 添加一些更为细致的权限目标(auth target)
10+
- 用户个人信息更新接口抽取 #636
1011

1112
# 0.14.2
1213

api/src/main/java/run/ikaros/api/constant/SecurityConst.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ interface Target {
4747
String API_CORE_USERS = API_PREFIX + "/users/**";
4848
String API_CORE_USER_ROLE = API_PREFIX + "/user/role/**";
4949
String API_CORE_USER_ROLES = API_PREFIX + "/user/roles/**";
50+
String API_CORE_USER_ME = API_PREFIX + "/user/me/**";
5051
String API_CORE_ROLE = API_PREFIX + "/role/**";
5152
String API_CORE_ROLES = API_PREFIX + "/roles/**";
5253
String API_CORE_ROLE_AUTHORITY = API_PREFIX + "/role/authority/**";

console/packages/api-client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ npm publish
5858
选择当前目录下的更改进行`git add .`
5959

6060
```bash
61-
git commit -am "build: gen new api-client v0.14.0+2"
61+
git commit -am "build: gen new api-client v0.14.3+1"
6262
```
6363

6464
合成版(powershell),升级 package.json 版本,并启动服务端后,在 api-client 路径下:

console/packages/api-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@runikaros/api-client",
3-
"version": "0.14.0+2",
3+
"version": "0.14.3+1",
44
"description": "Project ikaros console api-client package",
55
"type": "module",
66
"scripts": {

console/packages/api-client/src/.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ api/v1alpha1-subject-sync-platform-api.ts
2323
api/v1alpha1-tag-api.ts
2424
api/v1alpha1-task-api.ts
2525
api/v1alpha1-user-api.ts
26+
api/v1alpha1-user-me-api.ts
2627
api/v1alpha1-user-role-api.ts
2728
base.ts
2829
common.ts

console/packages/api-client/src/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ export * from "./api/v1alpha1-subject-sync-platform-api";
3434
export * from "./api/v1alpha1-tag-api";
3535
export * from "./api/v1alpha1-task-api";
3636
export * from "./api/v1alpha1-user-api";
37+
export * from "./api/v1alpha1-user-me-api";
3738
export * from "./api/v1alpha1-user-role-api";

console/packages/api-client/src/api/plugin-ikaros-run-v1alpha1-plugin-api.ts

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -374,22 +374,15 @@ export const PluginIkarosRunV1alpha1PluginApiAxiosParamCreator = function (
374374
},
375375
/**
376376
* Update plugin
377-
* @param {string} name Name of plugin
378377
* @param {Plugin} [plugin] Updated Plugin
379378
* @param {*} [options] Override http request option.
380379
* @throws {RequiredError}
381380
*/
382381
updatePlugin: async (
383-
name: string,
384382
plugin?: Plugin,
385383
options: AxiosRequestConfig = {}
386384
): Promise<RequestArgs> => {
387-
// verify required parameter 'name' is not null or undefined
388-
assertParamExists("updatePlugin", "name", name);
389-
const localVarPath = `/apis/plugin.ikaros.run/v1alpha1/plugin`.replace(
390-
`{${"name"}}`,
391-
encodeURIComponent(String(name))
392-
);
385+
const localVarPath = `/apis/plugin.ikaros.run/v1alpha1/plugin`;
393386
// use dummy base URL string because the URL constructor only accepts absolute URLs.
394387
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
395388
let baseOptions;
@@ -655,20 +648,17 @@ export const PluginIkarosRunV1alpha1PluginApiFp = function (
655648
},
656649
/**
657650
* Update plugin
658-
* @param {string} name Name of plugin
659651
* @param {Plugin} [plugin] Updated Plugin
660652
* @param {*} [options] Override http request option.
661653
* @throws {RequiredError}
662654
*/
663655
async updatePlugin(
664-
name: string,
665656
plugin?: Plugin,
666657
options?: AxiosRequestConfig
667658
): Promise<
668659
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Plugin>
669660
> {
670661
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePlugin(
671-
name,
672662
plugin,
673663
options
674664
);
@@ -818,11 +808,11 @@ export const PluginIkarosRunV1alpha1PluginApiFactory = function (
818808
* @throws {RequiredError}
819809
*/
820810
updatePlugin(
821-
requestParameters: PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest,
811+
requestParameters: PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest = {},
822812
options?: AxiosRequestConfig
823813
): AxiosPromise<Plugin> {
824814
return localVarFp
825-
.updatePlugin(requestParameters.name, requestParameters.plugin, options)
815+
.updatePlugin(requestParameters.plugin, options)
826816
.then((request) => request(axios, basePath));
827817
},
828818
/**
@@ -937,13 +927,6 @@ export interface PluginIkarosRunV1alpha1PluginApiGetPluginsByPagingRequest {
937927
* @interface PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest
938928
*/
939929
export interface PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest {
940-
/**
941-
* Name of plugin
942-
* @type {string}
943-
* @memberof PluginIkarosRunV1alpha1PluginApiUpdatePlugin
944-
*/
945-
readonly name: string;
946-
947930
/**
948931
* Updated Plugin
949932
* @type {Plugin}
@@ -1095,11 +1078,11 @@ export class PluginIkarosRunV1alpha1PluginApi extends BaseAPI {
10951078
* @memberof PluginIkarosRunV1alpha1PluginApi
10961079
*/
10971080
public updatePlugin(
1098-
requestParameters: PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest,
1081+
requestParameters: PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest = {},
10991082
options?: AxiosRequestConfig
11001083
) {
11011084
return PluginIkarosRunV1alpha1PluginApiFp(this.configuration)
1102-
.updatePlugin(requestParameters.name, requestParameters.plugin, options)
1085+
.updatePlugin(requestParameters.plugin, options)
11031086
.then((request) => request(this.axios, this.basePath));
11041087
}
11051088

console/packages/api-client/src/api/setting-ikaros-run-v1alpha1-configmap-api.ts

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -374,23 +374,15 @@ export const SettingIkarosRunV1alpha1ConfigmapApiAxiosParamCreator = function (
374374
},
375375
/**
376376
* Update configmap
377-
* @param {string} name Name of configmap
378377
* @param {ConfigMap} [configMap] Updated ConfigMap
379378
* @param {*} [options] Override http request option.
380379
* @throws {RequiredError}
381380
*/
382381
updateConfigmap: async (
383-
name: string,
384382
configMap?: ConfigMap,
385383
options: AxiosRequestConfig = {}
386384
): Promise<RequestArgs> => {
387-
// verify required parameter 'name' is not null or undefined
388-
assertParamExists("updateConfigmap", "name", name);
389-
const localVarPath =
390-
`/apis/setting.ikaros.run/v1alpha1/configmap`.replace(
391-
`{${"name"}}`,
392-
encodeURIComponent(String(name))
393-
);
385+
const localVarPath = `/apis/setting.ikaros.run/v1alpha1/configmap`;
394386
// use dummy base URL string because the URL constructor only accepts absolute URLs.
395387
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
396388
let baseOptions;
@@ -661,20 +653,17 @@ export const SettingIkarosRunV1alpha1ConfigmapApiFp = function (
661653
},
662654
/**
663655
* Update configmap
664-
* @param {string} name Name of configmap
665656
* @param {ConfigMap} [configMap] Updated ConfigMap
666657
* @param {*} [options] Override http request option.
667658
* @throws {RequiredError}
668659
*/
669660
async updateConfigmap(
670-
name: string,
671661
configMap?: ConfigMap,
672662
options?: AxiosRequestConfig
673663
): Promise<
674664
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigMap>
675665
> {
676666
const localVarAxiosArgs = await localVarAxiosParamCreator.updateConfigmap(
677-
name,
678667
configMap,
679668
options
680669
);
@@ -824,15 +813,11 @@ export const SettingIkarosRunV1alpha1ConfigmapApiFactory = function (
824813
* @throws {RequiredError}
825814
*/
826815
updateConfigmap(
827-
requestParameters: SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest,
816+
requestParameters: SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest = {},
828817
options?: AxiosRequestConfig
829818
): AxiosPromise<ConfigMap> {
830819
return localVarFp
831-
.updateConfigmap(
832-
requestParameters.name,
833-
requestParameters.configMap,
834-
options
835-
)
820+
.updateConfigmap(requestParameters.configMap, options)
836821
.then((request) => request(axios, basePath));
837822
},
838823
/**
@@ -947,13 +932,6 @@ export interface SettingIkarosRunV1alpha1ConfigmapApiGetConfigmapsByPagingReques
947932
* @interface SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest
948933
*/
949934
export interface SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest {
950-
/**
951-
* Name of configmap
952-
* @type {string}
953-
* @memberof SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmap
954-
*/
955-
readonly name: string;
956-
957935
/**
958936
* Updated ConfigMap
959937
* @type {ConfigMap}
@@ -1105,15 +1083,11 @@ export class SettingIkarosRunV1alpha1ConfigmapApi extends BaseAPI {
11051083
* @memberof SettingIkarosRunV1alpha1ConfigmapApi
11061084
*/
11071085
public updateConfigmap(
1108-
requestParameters: SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest,
1086+
requestParameters: SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest = {},
11091087
options?: AxiosRequestConfig
11101088
) {
11111089
return SettingIkarosRunV1alpha1ConfigmapApiFp(this.configuration)
1112-
.updateConfigmap(
1113-
requestParameters.name,
1114-
requestParameters.configMap,
1115-
options
1116-
)
1090+
.updateConfigmap(requestParameters.configMap, options)
11171091
.then((request) => request(this.axios, this.basePath));
11181092
}
11191093

0 commit comments

Comments
 (0)