mirror of https://gitee.com/topiam/eiam
⚡ 优化
parent
29f54ece54
commit
5893369709
|
@ -18,7 +18,6 @@
|
||||||
import { download, filterParamConverter, sortParamConverter } from '@/utils/utils';
|
import { download, filterParamConverter, sortParamConverter } from '@/utils/utils';
|
||||||
import type { RequestData } from '@ant-design/pro-components';
|
import type { RequestData } from '@ant-design/pro-components';
|
||||||
import type { SortOrder } from 'antd/es/table/interface';
|
import type { SortOrder } from 'antd/es/table/interface';
|
||||||
import type { ReactText } from 'react';
|
|
||||||
import { request } from '@umijs/max';
|
import { request } from '@umijs/max';
|
||||||
import type { UploadFile } from 'antd/es/upload/interface';
|
import type { UploadFile } from 'antd/es/upload/interface';
|
||||||
|
|
||||||
|
@ -28,7 +27,7 @@ import type { UploadFile } from 'antd/es/upload/interface';
|
||||||
export async function getAppTemplateList(
|
export async function getAppTemplateList(
|
||||||
params: Record<string, any>,
|
params: Record<string, any>,
|
||||||
sort: Record<string, SortOrder>,
|
sort: Record<string, SortOrder>,
|
||||||
filter: Record<string, ReactText[] | null>,
|
filter: Record<string, string[] | null>,
|
||||||
): Promise<RequestData<AppAPI.ListTemplate>> {
|
): Promise<RequestData<AppAPI.ListTemplate>> {
|
||||||
return request<API.ApiResult<AppAPI.ListTemplate>>('/api/v1/app/template/list', {
|
return request<API.ApiResult<AppAPI.ListTemplate>>('/api/v1/app/template/list', {
|
||||||
params: { ...params, ...sortParamConverter(sort), ...filterParamConverter(filter) },
|
params: { ...params, ...sortParamConverter(sort), ...filterParamConverter(filter) },
|
||||||
|
@ -59,7 +58,7 @@ export async function getAppTemplateFormSchema(
|
||||||
export async function getAppList(
|
export async function getAppList(
|
||||||
params?: Record<string, any>,
|
params?: Record<string, any>,
|
||||||
sort?: Record<string, SortOrder>,
|
sort?: Record<string, SortOrder>,
|
||||||
filter?: Record<string, ReactText[] | null>,
|
filter?: Record<string, string[] | null>,
|
||||||
): Promise<RequestData<AppAPI.AppList>> {
|
): Promise<RequestData<AppAPI.AppList>> {
|
||||||
return request<API.ApiResult<AppAPI.AppList>>('/api/v1/app/list', {
|
return request<API.ApiResult<AppAPI.AppList>>('/api/v1/app/list', {
|
||||||
params: { ...params, ...sortParamConverter(sort), ...filterParamConverter(filter) },
|
params: { ...params, ...sortParamConverter(sort), ...filterParamConverter(filter) },
|
||||||
|
@ -190,7 +189,7 @@ export async function getCertList(
|
||||||
export async function getAppAccountList(
|
export async function getAppAccountList(
|
||||||
params: Record<string, any>,
|
params: Record<string, any>,
|
||||||
sort: Record<string, SortOrder>,
|
sort: Record<string, SortOrder>,
|
||||||
filter: Record<string, ReactText[] | null>,
|
filter: Record<string, string[] | null>,
|
||||||
): Promise<RequestData<AppAPI.AppAccountList>> {
|
): Promise<RequestData<AppAPI.AppAccountList>> {
|
||||||
return request<API.ApiResult<AppAPI.AppAccountList>>('/api/v1/app/account/list', {
|
return request<API.ApiResult<AppAPI.AppAccountList>>('/api/v1/app/account/list', {
|
||||||
params: { ...params, ...sortParamConverter(sort), ...filterParamConverter(filter) },
|
params: { ...params, ...sortParamConverter(sort), ...filterParamConverter(filter) },
|
||||||
|
@ -232,7 +231,7 @@ export async function removeAccount(id: string): Promise<API.ApiResult<boolean>>
|
||||||
export async function getAppAccessPolicyList(
|
export async function getAppAccessPolicyList(
|
||||||
params: Record<string, any>,
|
params: Record<string, any>,
|
||||||
sort: Record<string, SortOrder>,
|
sort: Record<string, SortOrder>,
|
||||||
filter: Record<string, ReactText[] | null>,
|
filter: Record<string, string[] | null>,
|
||||||
): Promise<RequestData<AppAPI.AppAccessPolicyList>> {
|
): Promise<RequestData<AppAPI.AppAccessPolicyList>> {
|
||||||
return request<API.ApiResult<AppAPI.AppAccessPolicyList>>('/api/v1/app/access_policy/list', {
|
return request<API.ApiResult<AppAPI.AppAccessPolicyList>>('/api/v1/app/access_policy/list', {
|
||||||
params: { ...params, ...sortParamConverter(sort), ...filterParamConverter(filter) },
|
params: { ...params, ...sortParamConverter(sort), ...filterParamConverter(filter) },
|
||||||
|
|
|
@ -373,7 +373,6 @@ declare namespace AccountAPI {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用管理API类型定义
|
* 应用管理API类型定义
|
||||||
*
|
*
|
||||||
|
@ -381,7 +380,6 @@ declare namespace AccountAPI {
|
||||||
* Created by support@topiam.cn on 2020/9/13 11:26
|
* Created by support@topiam.cn on 2020/9/13 11:26
|
||||||
*/
|
*/
|
||||||
declare namespace AppAPI {
|
declare namespace AppAPI {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用账户列表
|
* 应用账户列表
|
||||||
*/
|
*/
|
||||||
|
@ -410,4 +408,54 @@ declare namespace AppAPI {
|
||||||
//Effect
|
//Effect
|
||||||
effect: string;
|
effect: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用列表
|
||||||
|
*/
|
||||||
|
export type AppList = {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
icon?: string;
|
||||||
|
protocol: string;
|
||||||
|
enabled: boolean;
|
||||||
|
type: string;
|
||||||
|
template: string;
|
||||||
|
remark: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用模板
|
||||||
|
*/
|
||||||
|
export type ListTemplate = {
|
||||||
|
protocol: string;
|
||||||
|
type: string;
|
||||||
|
code: string;
|
||||||
|
icon: string;
|
||||||
|
name: string;
|
||||||
|
desc: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用信息
|
||||||
|
*/
|
||||||
|
export type GetApp = {
|
||||||
|
id: string;
|
||||||
|
type: string;
|
||||||
|
name: string;
|
||||||
|
icon: string;
|
||||||
|
template: string;
|
||||||
|
protocol: string;
|
||||||
|
protocolName: string;
|
||||||
|
clientId: string;
|
||||||
|
clientSecret: string;
|
||||||
|
//sso发起方
|
||||||
|
initLoginType: string;
|
||||||
|
//sso登录链接
|
||||||
|
initLoginUrl: string;
|
||||||
|
nameIdValueType: string;
|
||||||
|
//授权范围
|
||||||
|
authorizationType: string;
|
||||||
|
enabled: boolean;
|
||||||
|
remark: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue