Skip to content

Commit

Permalink
[chore]: Update api
Browse files Browse the repository at this point in the history
  • Loading branch information
zzyangh committed Oct 25, 2024
1 parent 1719272 commit 0614c51
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 161 deletions.
62 changes: 31 additions & 31 deletions packages/shared/lib/api/sqle/service/SqlManage/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import {
GetGlobalSqlManageListFilterProjectPriorityEnum,
GetGlobalSqlManageStatisticsFilterProjectPriorityEnum,
GetSqlManageListFilterSourceEnum,
GetSqlManageListFilterAuditLevelEnum,
GetSqlManageListFilterStatusEnum,
Expand All @@ -10,8 +12,6 @@ import {
exportSqlManageV1FilterStatusEnum,
exportSqlManageV1SortFieldEnum,
exportSqlManageV1SortOrderEnum,
GetGlobalSqlManageListFilterProjectPriorityEnum,
GetGlobalSqlManageStatisticsFilterProjectPriorityEnum,
GetSqlManageListV2FilterSourceEnum,
GetSqlManageListV2FilterAuditLevelEnum,
GetSqlManageListV2FilterStatusEnum,
Expand All @@ -21,15 +21,41 @@ import {
} from './index.enum';

import {
IGetGlobalSqlManageListResp,
IGetGlobalSqlManageStatisticsResp,
IGetSqlManageListResp,
IBatchUpdateSqlManageReq,
IBaseRes,
IGetSqlManageRuleTipsResp,
IGetSqlManageSqlAnalysisResp,
IGetGlobalSqlManageListResp,
IGetGlobalSqlManageStatisticsResp
IGetSqlManageSqlAnalysisResp
} from '../common.d';

export interface IGetGlobalSqlManageListParams {
filter_project_uid?: string;

filter_instance_id?: string;

filter_project_priority?: GetGlobalSqlManageListFilterProjectPriorityEnum;

page_index: number;

page_size: number;
}

export interface IGetGlobalSqlManageListReturn
extends IGetGlobalSqlManageListResp {}

export interface IGetGlobalSqlManageStatisticsParams {
filter_project_uid?: string;

filter_instance_id?: string;

filter_project_priority?: GetGlobalSqlManageStatisticsFilterProjectPriorityEnum;
}

export interface IGetGlobalSqlManageStatisticsReturn
extends IGetGlobalSqlManageStatisticsResp {}

export interface IGetSqlManageListParams {
project_name: string;

Expand Down Expand Up @@ -126,32 +152,6 @@ export interface IGetSqlManageSqlAnalysisV1Params {
export interface IGetSqlManageSqlAnalysisV1Return
extends IGetSqlManageSqlAnalysisResp {}

export interface IGetGlobalSqlManageListParams {
filter_project_uid?: string;

filter_instance_id?: string;

filter_project_priority?: GetGlobalSqlManageListFilterProjectPriorityEnum;

page_index: number;

page_size: number;
}

export interface IGetGlobalSqlManageListReturn
extends IGetGlobalSqlManageListResp {}

export interface IGetGlobalSqlManageStatisticsParams {
filter_project_uid?: string;

filter_instance_id?: string;

filter_project_priority?: GetGlobalSqlManageStatisticsFilterProjectPriorityEnum;
}

export interface IGetGlobalSqlManageStatisticsReturn
extends IGetGlobalSqlManageStatisticsResp {}

export interface IGetSqlManageListV2Params {
project_name: string;

Expand Down
32 changes: 16 additions & 16 deletions packages/shared/lib/api/sqle/service/SqlManage/index.enum.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
/* tslint:disable no-duplicate-string */

export enum GetGlobalSqlManageListFilterProjectPriorityEnum {
'high' = 'high',

'medium' = 'medium',

'low' = 'low'
}

export enum GetGlobalSqlManageStatisticsFilterProjectPriorityEnum {
'high' = 'high',

'medium' = 'medium',

'low' = 'low'
}

export enum GetSqlManageListFilterSourceEnum {
'audit_plan' = 'audit_plan',

Expand Down Expand Up @@ -86,22 +102,6 @@ export enum exportSqlManageV1SortOrderEnum {
'desc' = 'desc'
}

export enum GetGlobalSqlManageListFilterProjectPriorityEnum {
'high' = 'high',

'medium' = 'medium',

'low' = 'low'
}

export enum GetGlobalSqlManageStatisticsFilterProjectPriorityEnum {
'high' = 'high',

'medium' = 'medium',

'low' = 'low'
}

export enum GetSqlManageListV2FilterSourceEnum {
'audit_plan' = 'audit_plan',

Expand Down
56 changes: 28 additions & 28 deletions packages/shared/lib/api/sqle/service/SqlManage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import ServiceBase from '../Service.base';
import { AxiosRequestConfig } from 'axios';

import {
IGetGlobalSqlManageListParams,
IGetGlobalSqlManageListReturn,
IGetGlobalSqlManageStatisticsParams,
IGetGlobalSqlManageStatisticsReturn,
IGetSqlManageListParams,
IGetSqlManageListReturn,
IBatchUpdateSqlManageParams,
Expand All @@ -16,15 +20,35 @@ import {
IGetSqlManageRuleTipsReturn,
IGetSqlManageSqlAnalysisV1Params,
IGetSqlManageSqlAnalysisV1Return,
IGetGlobalSqlManageListParams,
IGetGlobalSqlManageListReturn,
IGetGlobalSqlManageStatisticsParams,
IGetGlobalSqlManageStatisticsReturn,
IGetSqlManageListV2Params,
IGetSqlManageListV2Return
} from './index.d';

class SqlManageService extends ServiceBase {
public GetGlobalSqlManageList(
params: IGetGlobalSqlManageListParams,
options?: AxiosRequestConfig
) {
const paramsData = this.cloneDeep(params);
return this.get<IGetGlobalSqlManageListReturn>(
'/v1/dashboard/sql_manages',
paramsData,
options
);
}

public GetGlobalSqlManageStatistics(
params: IGetGlobalSqlManageStatisticsParams,
options?: AxiosRequestConfig
) {
const paramsData = this.cloneDeep(params);
return this.get<IGetGlobalSqlManageStatisticsReturn>(
'/v1/dashboard/sql_manages/statistics',
paramsData,
options
);
}

public GetSqlManageList(
params: IGetSqlManageListParams,
options?: AxiosRequestConfig
Expand Down Expand Up @@ -103,30 +127,6 @@ class SqlManageService extends ServiceBase {
);
}

public GetGlobalSqlManageList(
params: IGetGlobalSqlManageListParams,
options?: AxiosRequestConfig
) {
const paramsData = this.cloneDeep(params);
return this.get<IGetGlobalSqlManageListReturn>(
'/v1/sql_manages',
paramsData,
options
);
}

public GetGlobalSqlManageStatistics(
params: IGetGlobalSqlManageStatisticsParams,
options?: AxiosRequestConfig
) {
const paramsData = this.cloneDeep(params);
return this.get<IGetGlobalSqlManageStatisticsReturn>(
'/v1/sql_manages/statistics',
paramsData,
options
);
}

public GetSqlManageListV2(
params: IGetSqlManageListV2Params,
options?: AxiosRequestConfig
Expand Down
76 changes: 38 additions & 38 deletions packages/shared/lib/api/sqle/service/workflow/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import {
IScheduledTaskDefaultOptionV1Rsp,
IGetWorkflowsResV1,
IGlobalWorkflowStatisticsResV1,
IGetWorkflowTemplateResV1,
IUpdateWorkflowTemplateReqV1,
IBaseRes,
IGetWorkflowsResV1,
ICreateWorkflowReqV1,
IBatchCancelWorkflowsReqV1,
IBatchCompleteWorkflowsReqV1,
Expand All @@ -13,7 +14,6 @@ import {
IGetWorkflowTasksResV1,
IUpdateWorkflowScheduleReqV1,
IGetWorkflowStatisticOfInstancesResV1,
IGlobalWorkflowStatisticsResV1,
ICreateWorkflowReqV2,
ICreateWorkflowResV2,
IBatchCancelWorkflowsReqV2,
Expand All @@ -27,17 +27,50 @@ import {
} from '../common.d';

import {
getWorkflowsV1FilterStatusEnum,
exportWorkflowV1FilterStatusEnum,
getGlobalWorkflowsV1FilterStatusListEnum,
getGlobalWorkflowsV1FilterProjectPriorityEnum,
GetGlobalWorkflowStatisticsFilterStatusListEnum,
GetGlobalWorkflowStatisticsFilterProjectPriorityEnum
GetGlobalWorkflowStatisticsFilterProjectPriorityEnum,
getWorkflowsV1FilterStatusEnum,
exportWorkflowV1FilterStatusEnum
} from './index.enum';

export interface IGetScheduledTaskDefaultOptionV1Return
extends IScheduledTaskDefaultOptionV1Rsp {}

export interface IGetGlobalWorkflowsV1Params {
filter_create_user_id?: string;

filter_status_list?: getGlobalWorkflowsV1FilterStatusListEnum[];

filter_project_uid?: string;

filter_instance_id?: string;

filter_project_priority?: getGlobalWorkflowsV1FilterProjectPriorityEnum;

page_index: number;

page_size: number;
}

export interface IGetGlobalWorkflowsV1Return extends IGetWorkflowsResV1 {}

export interface IGetGlobalWorkflowStatisticsParams {
filter_create_user_id?: string;

filter_status_list?: GetGlobalWorkflowStatisticsFilterStatusListEnum[];

filter_project_uid?: string;

filter_instance_id?: string;

filter_project_priority?: GetGlobalWorkflowStatisticsFilterProjectPriorityEnum;
}

export interface IGetGlobalWorkflowStatisticsReturn
extends IGlobalWorkflowStatisticsResV1 {}

export interface IGetWorkflowTemplateV1Params {
project_name: string;
}
Expand Down Expand Up @@ -242,46 +275,13 @@ export interface IUpdateWorkflowScheduleV1Params

export interface IUpdateWorkflowScheduleV1Return extends IBaseRes {}

export interface IGetGlobalWorkflowsV1Params {
filter_create_user_id?: string;

filter_status_list?: getGlobalWorkflowsV1FilterStatusListEnum[];

filter_project_uid?: string;

filter_instance_id?: string;

filter_project_priority?: getGlobalWorkflowsV1FilterProjectPriorityEnum;

page_index: number;

page_size: number;
}

export interface IGetGlobalWorkflowsV1Return extends IGetWorkflowsResV1 {}

export interface IGetWorkflowStatisticOfInstancesParams {
instance_id: string;
}

export interface IGetWorkflowStatisticOfInstancesReturn
extends IGetWorkflowStatisticOfInstancesResV1 {}

export interface IGetGlobalWorkflowStatisticsParams {
filter_create_user_id?: string;

filter_status_list?: GetGlobalWorkflowStatisticsFilterStatusListEnum[];

filter_project_uid?: string;

filter_instance_id?: string;

filter_project_priority?: GetGlobalWorkflowStatisticsFilterProjectPriorityEnum;
}

export interface IGetGlobalWorkflowStatisticsReturn
extends IGlobalWorkflowStatisticsResV1 {}

export interface ICreateWorkflowV2Params extends ICreateWorkflowReqV2 {
project_name: string;
}
Expand Down
Loading

0 comments on commit 0614c51

Please sign in to comment.