Docs / built-apps / clearStagedFiles

clearStagedFiles

utilitysince 0.2.7not for built apps

Client function: clear all staged files for a site (the .staging marker is preserved).

import { clearStagedFiles } from 'flowstack-sdk'

Non-React client function. DELETE /api/v1/sites/{siteId}/staged.

Signature

clearStagedFiles(credentials, siteId, config?): Promise<ApiResponse<{ cleared: boolean; site_id: string; deleted_count: number }>>

Parameters

ParamTypeNotesDescription
credentialsFlowstackCredentialsrequiredThe app owner's credentials (owner-scoped JWT).
siteIdstringrequiredThe site/app id to operate on.
configFlowstackClientConfigsince 0.2.7Client config (baseUrl, appScope, tenantId as needed).

Returns

FieldTypeDescription
Promise<ApiResponse<{ cleared: boolean; site_id: string; deleted_count: number }>>How many staged files were deleted.

Examples

Clear staged files
await clearStagedFiles(credentials, siteId, { appScope });
WarningOwner/management operation — call it with the app owner's credentials from a builder/dashboard/server context, not from inside the generated app's end-user runtime. builtAppSafe is false.

See also

stageFiles · listStagedFiles

Source: src/api/client.ts (Site Ops, P0-156) · Also available in llms-full.txt and registry.json.