loadProject
Function: loadProject()
loadProject(
projectId):Promise<ProjectState>
Defined in: apps/builder-web/src/api/client.ts:195
Loads full project state from backend, including its current or latest AppSchema version.
Backend routes:
GET /projects/:projectIdGET /projects/:projectId/versions
Selection logic:
- if
project.currentVersionIdis set and found in versions → use it; - otherwise fallback to the last version in the list.
Parameters
projectId
string
ID of the project to load.
Returns
Promise<ProjectState>
Full ProjectState for the editor.
Throws
Error if project has no versions.