Skip to content

chore(backend): Add date filter types to user list endpoint#7793

Open
wobsoriano wants to merge 3 commits intomainfrom
rob/USER-4253-user-list-query-params
Open

chore(backend): Add date filter types to user list endpoint#7793
wobsoriano wants to merge 3 commits intomainfrom
rob/USER-4253-user-list-query-params

Conversation

@wobsoriano
Copy link
Member

@wobsoriano wobsoriano commented Feb 6, 2026

Description

Adds four new query parameter types to users.getUserList():

  • lastActiveAtBefore - Filter users by last activity before date
  • lastActiveAtAfter - Filter users by last activity after date
  • createdAtBefore - Filter users created before date
  • createdAtAfter - Filter users created after date

Also deprecates last_active_at_since in favor of lastActiveAtAfter.

This align with clerk/clerk_go#8193 to support advanced dashboard filtering.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • New Features

    • Added comprehensive date-based filtering to the user list endpoint, enabling filtering by last activity date and creation date with before/after timestamp parameters to provide granular control over user queries.
  • Deprecations

    • The last_active_at_since parameter is now deprecated; use the new date filtering options instead.

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

🦋 Changeset detected

Latest commit: 89604cb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@clerk/backend Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Feb 6, 2026 7:39pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

This pull request adds support for date-based filtering to the user list endpoint in the backend SDK. A changeset entry documents the patch version bump. The UserListParams type is extended with four new optional numeric query parameters: lastActiveAtBefore, lastActiveAtAfter, createdAtBefore, and createdAtAfter. The deprecated last_active_at_since parameter is retained. Comprehensive test coverage is added for the user list method, validating headers, query parameters, and response data for both individual and combined date filters, along with pagination and ordering parameters.

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR addresses only 4 of 8 required query parameters from USER-4253, missing email_address_query, phone_number_query, username_query, and name_query. Complete implementation by adding support for email_address_query, phone_number_query, username_query, and name_query parameters to UserListParams.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Out of Scope Changes check ✅ Passed All changes are within scope: date filter parameters, type definitions, tests, and changeset documentation directly support the linked issue requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: adding date filter types (lastActiveAtBefore, lastActiveAtAfter, createdAtBefore, createdAtAfter) to the UserListParams type in the user list endpoint, which aligns with the PR's primary objective.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 6, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7793

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7793

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7793

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7793

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7793

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7793

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7793

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7793

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7793

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7793

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7793

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7793

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7793

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7793

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7793

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7793

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7793

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7793

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7793

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7793

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7793

commit: 89604cb

@wobsoriano wobsoriano changed the title chore(backend): Add date filter parameters to user list endpoint chore(backend): Add date filter types to user list endpoint Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant