📝 docs(API): add documentation for postBuildInit function
✨ feat(API): add postBuildInit function to post the build init of a flow
The postBuildInit function has been added to post the build init of a flow. The function takes in a flow object and returns a promise that resolves to an AxiosResponse containing the build status. Documentation has been added to the function to improve code readability and maintainability.
This commit is contained in:
parent
d28d7483dd
commit
ef5623e1b3
1 changed files with 15 additions and 0 deletions
|
|
@ -277,12 +277,27 @@ export async function getVersion() {
|
|||
*/
|
||||
export async function getHealth() {
|
||||
return await axios.get("/health"); // Health is the only endpoint that doesn't require /api/v1
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the build status of a flow.
|
||||
* @param {string} flowId - The ID of the flow to fetch the build status for.
|
||||
* @returns {Promise<BuildStatusTypeAPI>} A promise that resolves to an AxiosResponse containing the build status.
|
||||
*
|
||||
*/
|
||||
export async function getBuildStatus(
|
||||
flowId: string
|
||||
): Promise<BuildStatusTypeAPI> {
|
||||
return await axios.get(`/api/v1/build/${flowId}/status`);
|
||||
}
|
||||
|
||||
//docs for postbuildinit
|
||||
/**
|
||||
* Posts the build init of a flow.
|
||||
* @param {string} flowId - The ID of the flow to fetch the build status for.
|
||||
* @returns {Promise<InitTypeAPI>} A promise that resolves to an AxiosResponse containing the build status.
|
||||
*
|
||||
*/
|
||||
export async function postBuildInit(
|
||||
flow: FlowType
|
||||
): Promise<AxiosResponse<InitTypeAPI>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue