listOrganizationMembers()
Returns a paginated member list with optional pagination, search, and sorting query params.
Usage
The following example shows a basic usage of the backend client from @wacht/nextjs/server.
import { wachtClient } from '@wacht/nextjs/server';export async function listOrganizationMembers(organizationId: string) { const client = await wachtClient(); return client.organizations.listOrganizationMembers(organizationId, { limit: 20, search: 'john', sort_key: 'created_at', sort_order: 'desc', });}Signature
function listOrganizationMembers( organizationId: string, options?: ListOrganizationMembersOptions,): Promise<PaginatedResponse<OrganizationMember>>Parameters
›organizationId?: string | undefined;
organizationId?: string | undefined;Stable organization id.
›options.limit?: number | undefined;
options.limit?: number | undefined;Maximum members to return.
›options.offset?: number | undefined;
options.offset?: number | undefined;Items to skip.
›options.search?: string | undefined;
options.search?: string | undefined;Search term forwarded to backend.
›options.sort_key?: string | undefined;
options.sort_key?: string | undefined;Sort key forwarded to backend.
›options.sort_order?: 'asc' | 'desc' | undefined;
options.sort_order?: 'asc' | 'desc' | undefined;Sort order for `sort_key`.
Return value
›data?: OrganizationMember[] | undefined;
data?: OrganizationMember[] | undefined;Member rows in the page.
›total?: number | undefined;
total?: number | undefined;Total number of organization members matching the current query.
›limit?: number | undefined;
limit?: number | undefined;Effective page size from backend response.
›offset?: number | undefined;
offset?: number | undefined;Effective page offset from backend response.
Behavior
- Returns a backend-scoped list response for this resource.
- Use pagination and filters from this method to build admin list views.
Examples
List with defaults
import { wachtClient } from '@wacht/nextjs/server';export async function listMembers(organizationId: string) { const client = await wachtClient(); return client.organizations.listOrganizationMembers(organizationId);}