/
Count Services for Pending Membership Invitations & Membership Requests

Count Services for Pending Membership Invitations & Membership Requests

Problem

Currently, the Web Client gather the total number of pending membership invitations and membership requests to show notification on Team tab.

PLFM-4274 - Getting issue details... STATUS  describes how this number was calculated using existing APIs. Each the services that contributes to the count makes 2 database calls. A user who is admin of N teams would requires c+N API calls. This causes  PLFM-3990 - Getting issue details... STATUS .


Also, we discourage running count query against the database to fill PaginatedResult's totalNumberOfResult; and planned to replace the use of totalNumberOfResult with nextPageToken.  PLFM-4259 - Getting issue details... STATUS  captures the work related to this.

Proposed Solution

Since Membership Invitation and Membership Request data are stored in 2 different tables in the database, we proposed the following services:

ActionMethodURLResponseBody
Retrieve the number of pending Membership InvitationsGET/membershipInvitation/openInvitationCountCount
Retrieve the number of pending Membership Requests for teams that user is adminGET/membershipRequest/openRequestCountCount



Related content

Closing a Team to New Membership Requests
Closing a Team to New Membership Requests
More like this
Form Submission
Form Submission
More like this
Synapse Subscription Services
Synapse Subscription Services
More like this
Simplifying the user management codebase
Simplifying the user management codebase
More like this
Simplifying the user management codebase
Simplifying the user management codebase
More like this
Mentioning a Team in a Discussion Thread
Mentioning a Team in a Discussion Thread
More like this