@planpoint/sdk
Official TypeScript SDK for the Planpoint API.Installation
Quick Start
API Reference
Authentication
login(options)
Authenticate and receive a JWT token.
Returns:
LoginResponse — { message: string, access_token: string }
Projects
getMyProjects(options)
List all projects belonging to the authenticated user. Requires auth.
Returns: ProjectSummary[] — { _id, name, namespace?, hostName?, status?, paused?, createdAt? }
findProject(options)
Find a public project by namespace and hostname. No auth required.
Returns:
Project — full project with floors, units, settings
getProject(options)
Get a project by ID. Requires auth.
Returns:
Project
updateProject(options)
Update project settings. Requires auth.
Returns:
Project
Groups
getGroups(options)
List all groups for the authenticated user.
Returns: GroupsListResponse — { records: Group[], count: number }
getGroup(options)
Get a group by ID.
Returns:
Group — { _id, name, namespace?, hostName?, type?, projects?, isOwner?, isAdmin?, isEditor? }
createGroup(options)
Create a new group.
Returns:
Group
updateGroup(options)
Update a group.
Returns:
Group
Floors
getFloors(options)
List all floors for a project.
Returns:
FloorFull[] — { _id, name?, project, level?, position?, path?, image? }
getFloor(options)
Get a floor by ID.
Returns:
FloorFull
createFloor(options)
Create a new floor.
Returns:
FloorFull
updateFloor(options)
Update a floor.
Returns:
FloorFull
Units
getUnits(options)
List all units for a project.
Returns:
UnitsListResponse — { records: UnitFull[], count: number }
UnitFull: { _id, floor, name?, unitNumber?, status?, price?, bed?, bath?, sqft?, model?, orientation?, parking? }
status values: Available | OnHold | Sold | Leased | Unavailable
getUnit(options)
Get a unit by ID.
Returns:
UnitFull
createUnit(options)
Create a new unit.
Returns:
UnitFull
updateUnit(options)
Update a unit.
Returns:
UnitFull
deleteUnit(options)
Delete a unit.
Returns:
{ message: string }
batchUpdateUnits(options)
Update multiple units at once.
Returns:
UnitFull[]
Leads
getLeads(options)
List all leads for a project.
Returns:
Lead[] — { _id?, name?, email?, phone?, message?, unit?, createdAt? }