joinSpace
Joins a space as the logged-in user, or requests to join if the space requires approval.The Sublay space ID.
Promise<JoinSpaceResponse>
leaveSpace
Leaves a space as the logged-in user.The Sublay space ID.
Promise<LeaveSpaceResponse>
checkMyMembership
Checks the logged-in user’s membership status in a space.The Sublay space ID.
Promise<CheckMyMembershipResponse>
fetchSpaceMembers
Fetches a paginated list of a space’s members, filterable by role and status.The Sublay space ID.
The page number to fetch.
The number of members to return per page.
Filter by role:
"admin", "moderator", or "member".Filter by status:
"pending", "active", "banned", or "rejected".Promise<SpaceMembersResponse>
fetchSpaceTeam
Fetches the team (admins and moderators) of a space.The Sublay space ID.
Promise<SpaceTeamResponse>
updateMemberRole
Updates a member’s role within a space.The Sublay space ID.
The membership ID of the member to update.
The new role:
"admin", "moderator", or "member".Promise<UpdateMemberRoleResponse>
approveMembership
Approves a pending membership request.The Sublay space ID.
The membership ID of the pending member.
Promise<ApproveMemberResponse>
declineMembership
Declines a pending membership request.The Sublay space ID.
The membership ID of the pending member.
Promise<DeclineMemberResponse>
banMember
Bans a member from a space.The Sublay space ID.
The membership ID of the member to ban.
Promise<{ message: string; membership: { id: string; status: "banned" } }>
unbanMember
Unbans a previously banned member.The Sublay space ID.
The membership ID of the member to unban.
Promise<{ message: string; membership: { id: string; status: "active" } }>
