-
-
Notifications
You must be signed in to change notification settings - Fork 661
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web): support functions recycle bin (#1398)
* feat(web): add functions recycle bin * feat(web): add function recycle bin * fix(web): * fix(web): fix i18n & ts type --------- Co-authored-by: 0fatal <72899968+0fatal@users.noreply.github.com>
- Loading branch information
1 parent
1ee6def
commit 1d22b6e
Showing
19 changed files
with
668 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
// @ts-ignore | ||
/* eslint-disable */ | ||
/////////////////////////////////////////////////////////////////////// | ||
// // | ||
// this file is autogenerated by service-generate // | ||
// do not edit this file manually // | ||
// // | ||
/////////////////////////////////////////////////////////////////////// | ||
/// <reference path = "api-auto.d.ts" /> | ||
import request from "@/utils/request"; | ||
import useGlobalStore from "@/pages/globalStore"; | ||
|
||
/** | ||
* Delete function Recycle bin items | ||
*/ | ||
export async function FunctionRecycleBinControllerDeleteRecycleBinItems( | ||
params: Definitions.DeleteRecycleBinItemsDto, | ||
): Promise<{ | ||
error: string; | ||
data: Definitions.Number; | ||
}> { | ||
// /v1/recycle-bin/{appid}/functions/delete | ||
let _params: { [key: string]: any } = { | ||
appid: useGlobalStore.getState().currentApp?.appid || "", | ||
...params, | ||
}; | ||
return request(`/v1/recycle-bin/${_params.appid}/functions/delete`, { | ||
method: "POST", | ||
data: params, | ||
}); | ||
} | ||
|
||
/** | ||
* Empty function Recycle bin items | ||
*/ | ||
export async function FunctionRecycleBinControllerEmptyRecycleBin( | ||
params: Paths.FunctionRecycleBinControllerEmptyRecycleBin.BodyParameters, | ||
): Promise<{ | ||
error: string; | ||
data: Definitions.Number; | ||
}> { | ||
// /v1/recycle-bin/{appid}/functions | ||
let _params: { [key: string]: any } = { | ||
appid: useGlobalStore.getState().currentApp?.appid || "", | ||
...params, | ||
}; | ||
return request(`/v1/recycle-bin/${_params.appid}/functions`, { | ||
method: "DELETE", | ||
data: params, | ||
}); | ||
} | ||
|
||
/** | ||
* Get cloud function recycle bin | ||
*/ | ||
export async function FunctionRecycleBinControllerGetRecycleBin( | ||
params: Paths.FunctionRecycleBinControllerGetRecycleBin.BodyParameters, | ||
): Promise<{ | ||
error: string; | ||
data: Paths.FunctionRecycleBinControllerGetRecycleBin.Responses; | ||
}> { | ||
// /v1/recycle-bin/{appid}/functions | ||
let _params: { [key: string]: any } = { | ||
appid: useGlobalStore.getState().currentApp?.appid || "", | ||
...params, | ||
}; | ||
return request(`/v1/recycle-bin/${_params.appid}/functions`, { | ||
method: "GET", | ||
params: params, | ||
}); | ||
} | ||
|
||
/** | ||
* restore function Recycle bin items | ||
*/ | ||
export async function FunctionRecycleBinControllerRestoreRecycleBinItems( | ||
params: Definitions.RestoreRecycleBinItemsDto, | ||
): Promise<{ | ||
error: string; | ||
data: Definitions.Number; | ||
}> { | ||
// /v1/recycle-bin/{appid}/functions/restore | ||
let _params: { [key: string]: any } = { | ||
appid: useGlobalStore.getState().currentApp?.appid || "", | ||
...params, | ||
}; | ||
return request(`/v1/recycle-bin/${_params.appid}/functions/restore`, { | ||
method: "POST", | ||
data: params, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.