Skip to content

Commit

Permalink
Userme (#637)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ChiveHao authored Jul 31, 2024
1 parent 17df8b8 commit 452e787
Show file tree
Hide file tree
Showing 21 changed files with 1,397 additions and 1,123 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## 新特性

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

# 0.14.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ interface Target {
String API_CORE_USERS = API_PREFIX + "/users/**";
String API_CORE_USER_ROLE = API_PREFIX + "/user/role/**";
String API_CORE_USER_ROLES = API_PREFIX + "/user/roles/**";
String API_CORE_USER_ME = API_PREFIX + "/user/me/**";
String API_CORE_ROLE = API_PREFIX + "/role/**";
String API_CORE_ROLES = API_PREFIX + "/roles/**";
String API_CORE_ROLE_AUTHORITY = API_PREFIX + "/role/authority/**";
Expand Down
2 changes: 1 addition & 1 deletion console/packages/api-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ npm publish
选择当前目录下的更改进行`git add .`

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

合成版(powershell),升级 package.json 版本,并启动服务端后,在 api-client 路径下:
Expand Down
2 changes: 1 addition & 1 deletion console/packages/api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@runikaros/api-client",
"version": "0.14.0+2",
"version": "0.14.3+1",
"description": "Project ikaros console api-client package",
"type": "module",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions console/packages/api-client/src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ api/v1alpha1-subject-sync-platform-api.ts
api/v1alpha1-tag-api.ts
api/v1alpha1-task-api.ts
api/v1alpha1-user-api.ts
api/v1alpha1-user-me-api.ts
api/v1alpha1-user-role-api.ts
base.ts
common.ts
Expand Down
1 change: 1 addition & 0 deletions console/packages/api-client/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ export * from "./api/v1alpha1-subject-sync-platform-api";
export * from "./api/v1alpha1-tag-api";
export * from "./api/v1alpha1-task-api";
export * from "./api/v1alpha1-user-api";
export * from "./api/v1alpha1-user-me-api";
export * from "./api/v1alpha1-user-role-api";
Original file line number Diff line number Diff line change
Expand Up @@ -374,22 +374,15 @@ export const PluginIkarosRunV1alpha1PluginApiAxiosParamCreator = function (
},
/**
* Update plugin
* @param {string} name Name of plugin
* @param {Plugin} [plugin] Updated Plugin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updatePlugin: async (
name: string,
plugin?: Plugin,
options: AxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'name' is not null or undefined
assertParamExists("updatePlugin", "name", name);
const localVarPath = `/apis/plugin.ikaros.run/v1alpha1/plugin`.replace(
`{${"name"}}`,
encodeURIComponent(String(name))
);
const localVarPath = `/apis/plugin.ikaros.run/v1alpha1/plugin`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
Expand Down Expand Up @@ -655,20 +648,17 @@ export const PluginIkarosRunV1alpha1PluginApiFp = function (
},
/**
* Update plugin
* @param {string} name Name of plugin
* @param {Plugin} [plugin] Updated Plugin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updatePlugin(
name: string,
plugin?: Plugin,
options?: AxiosRequestConfig
): Promise<
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Plugin>
> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePlugin(
name,
plugin,
options
);
Expand Down Expand Up @@ -818,11 +808,11 @@ export const PluginIkarosRunV1alpha1PluginApiFactory = function (
* @throws {RequiredError}
*/
updatePlugin(
requestParameters: PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest,
requestParameters: PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest = {},
options?: AxiosRequestConfig
): AxiosPromise<Plugin> {
return localVarFp
.updatePlugin(requestParameters.name, requestParameters.plugin, options)
.updatePlugin(requestParameters.plugin, options)
.then((request) => request(axios, basePath));
},
/**
Expand Down Expand Up @@ -937,13 +927,6 @@ export interface PluginIkarosRunV1alpha1PluginApiGetPluginsByPagingRequest {
* @interface PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest
*/
export interface PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest {
/**
* Name of plugin
* @type {string}
* @memberof PluginIkarosRunV1alpha1PluginApiUpdatePlugin
*/
readonly name: string;

/**
* Updated Plugin
* @type {Plugin}
Expand Down Expand Up @@ -1095,11 +1078,11 @@ export class PluginIkarosRunV1alpha1PluginApi extends BaseAPI {
* @memberof PluginIkarosRunV1alpha1PluginApi
*/
public updatePlugin(
requestParameters: PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest,
requestParameters: PluginIkarosRunV1alpha1PluginApiUpdatePluginRequest = {},
options?: AxiosRequestConfig
) {
return PluginIkarosRunV1alpha1PluginApiFp(this.configuration)
.updatePlugin(requestParameters.name, requestParameters.plugin, options)
.updatePlugin(requestParameters.plugin, options)
.then((request) => request(this.axios, this.basePath));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,23 +374,15 @@ export const SettingIkarosRunV1alpha1ConfigmapApiAxiosParamCreator = function (
},
/**
* Update configmap
* @param {string} name Name of configmap
* @param {ConfigMap} [configMap] Updated ConfigMap
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateConfigmap: async (
name: string,
configMap?: ConfigMap,
options: AxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'name' is not null or undefined
assertParamExists("updateConfigmap", "name", name);
const localVarPath =
`/apis/setting.ikaros.run/v1alpha1/configmap`.replace(
`{${"name"}}`,
encodeURIComponent(String(name))
);
const localVarPath = `/apis/setting.ikaros.run/v1alpha1/configmap`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
Expand Down Expand Up @@ -661,20 +653,17 @@ export const SettingIkarosRunV1alpha1ConfigmapApiFp = function (
},
/**
* Update configmap
* @param {string} name Name of configmap
* @param {ConfigMap} [configMap] Updated ConfigMap
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateConfigmap(
name: string,
configMap?: ConfigMap,
options?: AxiosRequestConfig
): Promise<
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigMap>
> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateConfigmap(
name,
configMap,
options
);
Expand Down Expand Up @@ -824,15 +813,11 @@ export const SettingIkarosRunV1alpha1ConfigmapApiFactory = function (
* @throws {RequiredError}
*/
updateConfigmap(
requestParameters: SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest,
requestParameters: SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest = {},
options?: AxiosRequestConfig
): AxiosPromise<ConfigMap> {
return localVarFp
.updateConfigmap(
requestParameters.name,
requestParameters.configMap,
options
)
.updateConfigmap(requestParameters.configMap, options)
.then((request) => request(axios, basePath));
},
/**
Expand Down Expand Up @@ -947,13 +932,6 @@ export interface SettingIkarosRunV1alpha1ConfigmapApiGetConfigmapsByPagingReques
* @interface SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest
*/
export interface SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest {
/**
* Name of configmap
* @type {string}
* @memberof SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmap
*/
readonly name: string;

/**
* Updated ConfigMap
* @type {ConfigMap}
Expand Down Expand Up @@ -1105,15 +1083,11 @@ export class SettingIkarosRunV1alpha1ConfigmapApi extends BaseAPI {
* @memberof SettingIkarosRunV1alpha1ConfigmapApi
*/
public updateConfigmap(
requestParameters: SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest,
requestParameters: SettingIkarosRunV1alpha1ConfigmapApiUpdateConfigmapRequest = {},
options?: AxiosRequestConfig
) {
return SettingIkarosRunV1alpha1ConfigmapApiFp(this.configuration)
.updateConfigmap(
requestParameters.name,
requestParameters.configMap,
options
)
.updateConfigmap(requestParameters.configMap, options)
.then((request) => request(this.axios, this.basePath));
}

Expand Down
Loading

0 comments on commit 452e787

Please sign in to comment.