diff --git a/src/events/interfaces/list-events-options.interface.ts b/src/events/interfaces/list-events-options.interface.ts index 003e4fc4c..9192afb2f 100644 --- a/src/events/interfaces/list-events-options.interface.ts +++ b/src/events/interfaces/list-events-options.interface.ts @@ -7,6 +7,16 @@ export interface ListEventOptions { limit?: number; after?: string; organizationId?: string; + /** + * As of 2026-06-11 the `GET /events` endpoint silently ignores this + * parameter and always returns events oldest-first regardless of whether + * `asc`, `desc`, `normal`, or nothing is sent — see + * {@link https://github.com/workos/workos-node/issues/1610}. The SDK + * continues to serialize the value on the wire so callers automatically + * pick up the server-side fix when it lands; until then, treat the + * response as ascending-by-`created_at` and seed cursor pagination from + * the oldest end of the stream. + */ order?: 'asc' | 'desc'; } @@ -17,5 +27,11 @@ export interface SerializedListEventOptions { limit?: number; after?: string; organization_id?: string; + /** + * Wire-layer mirror of {@link ListEventOptions.order}. The server-side bug + * lives at this layer: as of 2026-06-11 `GET /events?order=desc` returns + * events oldest-first regardless. See + * {@link https://github.com/workos/workos-node/issues/1610}. + */ order?: 'asc' | 'desc'; }