Skip to content

feat: Add Waitlists API support - #1689

Merged
aksman-dev merged 2 commits into
mainfrom
feature/auth-6719-node-sdk-support-for-waitlists
Aug 31, 2026
Merged

feat: Add Waitlists API support#1689
aksman-dev merged 2 commits into
mainfrom
feature/auth-6719-node-sdk-support-for-waitlists

Conversation

@aksman-dev

Copy link
Copy Markdown
Contributor

Summary

Adds the waitlists REST API surface to workos.userManagement:

  • listWaitlists()GET /user_management/waitlists (single page; the endpoint is not paginated and its cursors are always null)
  • getWaitlist(waitlistId)GET /user_management/waitlists/:id (accepts the default alias for the environment's default waitlist)
  • listWaitlistEntries(waitlistId, options?)GET /user_management/waitlists/:id/entries with state / email filters and standard pagination
  • createWaitlistEntry(waitlistId, payload)POST /user_management/waitlists/:id/entries with additionalFields and sendConfirmationEmail; idempotent for duplicate emails
  • approveWaitlistEntry(waitlistEntryId)POST /user_management/waitlist_entries/:id/approve
  • denyWaitlistEntry(waitlistEntryId)POST /user_management/waitlist_entries/:id/deny
  • deleteWaitlistEntry(waitlistEntryId)DELETE /user_management/waitlist_entries/:id

Method shapes, field names, and nullability follow the published OpenAPI spec (workos/openapi-spec spec/open-api-spec.yaml as of ed12feb): WaitlistEntry with approved_at, optional additional_fields, nullable waitlist_id, and the send_confirmation_email create param. Follows the existing invitations patterns (interface + *Response pair, serializer modules, AutoPaginatable lists, path-param-first method signatures).

Test plan

  • npm run typecheck, npm run lint, npm run build — clean
  • npx jest src/user-management/user-management.spec.ts — 167 tests pass, including new coverage for all seven methods: URL construction, query-param serialization (state/email filters), body serialization (additional_fields, send_confirmation_email), the default waitlist alias, approve/deny state transitions, and the 422 user_already_exists error path

Fixes AUTH-6719

Adds the waitlists REST API surface to userManagement: list/get
waitlists, list/create entries on a waitlist (including the default
alias), and approve/deny/delete waitlist entries.

Fixes AUTH-6719
@aksman-dev
aksman-dev requested review from a team as code owners August 31, 2026 17:45
@aksman-dev
aksman-dev requested a review from mattolson August 31, 2026 17:45
@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

AUTH-6719

@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds the waitlists REST API surface to User Management.

  • Introduces typed waitlist and waitlist-entry models with request and response serializers.
  • Adds operations to list and retrieve waitlists and to list, create, approve, deny, and delete waitlist entries.
  • Returns the non-paginated waitlist collection as a plain list, resolving the previously reported redundant-refetch behavior.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/user-management/user-management.ts Adds seven waitlist operations and correctly models the non-paginated waitlist endpoint as a plain list without a refetch callback.
src/user-management/user-management.spec.ts Covers waitlist URLs, filters, payload serialization, response deserialization, state transitions, deletion, and API errors.
src/user-management/interfaces/waitlist-entry.interface.ts Defines the public and wire-format waitlist-entry contracts, including nullable approval and waitlist fields.
src/user-management/serializers/waitlist-entry.serializer.ts Converts waitlist-entry wire fields to the SDK-facing camelCase model and normalizes a missing waitlist ID to null.

Reviews (2): Last reviewed commit: "fix: Return a plain list from listWaitli..." | Re-trigger Greptile

Comment thread src/user-management/user-management.ts Outdated
The endpoint is not paginated, so an AutoPaginatable return would
refetch the already-complete response on autoPagination(). Follows
the listItContacts precedent for non-paginated list endpoints.
@aksman-dev
aksman-dev merged commit 0faa84f into main Aug 31, 2026
7 checks passed
@aksman-dev
aksman-dev deleted the feature/auth-6719-node-sdk-support-for-waitlists branch August 31, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants