Repository navigation
feat: enhance listMembers method with pagination and filtering options - #6
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PluginApiClient.listMembers()now returns one cursor-paginated page and accepts filters, instead of returning every project member as an array. This matches the host change in Paca-AI/paca#571, where the project members endpoint is paginated.Changes
listMembers(opts?: ListMembersOptions): Promise<MemberPage>search: words that must all appear in the member's username, name or handle (server-side).ids: look up specific members by membership id or account id (at most 100).cursor: the previous page'snext_cursor.pageSize: 1-100.ListMembersOptionsandMemberPage({items, page_size, next_cursor, total_count}).ProjectMember:role_name: stringis replaced by an optionalroles?: {id, name}[], matching what the members endpoint returns for a member who can hold several roles.Breaking changes
listMembers()returns a page object, notProjectMember[]. Callers must read.itemsand follownext_cursorfor more.ProjectMember.role_nameis gone; useroles.This needs a new SDK version. Plugins pin published versions, so they must bump their dependency and adapt
listMemberscalls (the time-logging and example plugins are already updated on the plugin side).Testing
tsc --noEmitpasses. No tests were added; the change is type-level plus a query-string builder.