connections module acts on the logged-in user’s own mutual connections — bidirectional relationships, similar to “friends.” Use it to list established connections, inspect outgoing and incoming pending requests, and accept, decline, or remove connections.
fetchConnections
Returns a paginated list of your established (mutual) connections.Page number (1-indexed). Defaults to
1.Results per page. Defaults to
20.Promise<PaginatedResponse<EstablishedConnection>>, where EstablishedConnection is { id, connectedUser, connectedAt }.
fetchConnectionsCount
Returns the number of your established connections.Promise<{ count: number }>
fetchSentPendingConnections
Returns a paginated list of your outgoing connection requests that are still pending.Page number (1-indexed). Defaults to
1.Results per page. Defaults to
20.Promise<PaginatedResponse<PendingConnection>>, where PendingConnection is { id, message?, createdAt, user, type: "received" | "sent" }.
fetchReceivedPendingConnections
Returns a paginated list of incoming connection requests you have received.Page number (1-indexed). Defaults to
1.Results per page. Defaults to
20.Promise<PaginatedResponse<PendingConnection>>
acceptConnection
Accepts a pending incoming connection request.The ID of the pending connection request to accept.
Promise<{ id: string; status: string; createdAt?: string; respondedAt?: string }>
declineConnection
Declines a pending incoming connection request.The ID of the pending connection request to decline.
Promise<{ id: string; status: string; createdAt?: string; respondedAt?: string }>
removeConnection
Removes an established connection by its connection ID.The connection ID to remove.
Promise<void>
