fix: c
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled

This commit is contained in:
2025-12-24 14:42:57 +08:00
parent 08e79c60e7
commit 7743cdc29a
49 changed files with 2179 additions and 4575 deletions

View File

@@ -25,6 +25,37 @@ export namespace FeatureApi {
api_id?: string;
name?: string;
}
export interface FeatureExampleItem {
id: number;
feature_id: number;
api_id: string;
data: string;
create_time: string;
update_time: string;
}
export interface ConfigFeatureExampleRequest {
feature_id: number;
data: string;
}
export interface ConfigFeatureExampleResponse {
success: boolean;
}
export interface GetFeatureExampleRequest {
feature_id: number;
}
export interface GetFeatureExampleResponse {
id: number;
feature_id: number;
api_id: string;
data: string;
create_time: string;
update_time: string;
}
}
/**
@@ -72,10 +103,35 @@ async function deleteFeature(id: number) {
return requestClient.delete<{ success: boolean }>(`/feature/delete/${id}`);
}
/**
* 配置功能示例数据
* @param data 示例数据配置
*/
async function configFeatureExample(
data: FeatureApi.ConfigFeatureExampleRequest,
) {
return requestClient.post<FeatureApi.ConfigFeatureExampleResponse>(
'/feature/config-example',
data,
);
}
/**
* 获取功能示例数据
* @param featureId 功能ID
*/
async function getFeatureExample(featureId: number) {
return requestClient.get<FeatureApi.GetFeatureExampleResponse>(
`/feature/example/${featureId}`,
);
}
export {
configFeatureExample,
createFeature,
deleteFeature,
getFeatureDetail,
getFeatureExample,
getFeatureList,
updateFeature,
};