Docs / built-apps / listStagedFiles

listStagedFiles

utilitysince 0.2.7not for built apps

Client function: list the files currently staged for a site.

import { listStagedFiles } from 'flowstack-sdk'

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

Signature

listStagedFiles(credentials, siteId, config?): Promise<ApiResponse<StagedFilesList>>

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<StagedFilesList>>StagedFilesList: { site_id, staged_files: { path, size_bytes, staged_at }[], count }.

Examples

List staged files
const res = await listStagedFiles(credentials, siteId, { appScope });
if (res.ok) console.log(res.data.count, 'staged');
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 · clearStagedFiles

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