Skip to content

Conversation

@gabrycina
Copy link

Summary

Adds cursor-based pagination support to match backend API changes.

Breaking Change

messages.list() now returns PaginatedMessagesResponse:

# Before
messages = client.messages.list(task_id=task_id)
for m in messages: ...

# After
response = client.messages.list(task_id=task_id)
for m in response.data: ...

Changes

  • Add cursor and direction params to MessageListParams
  • Add PaginatedMessagesResponse type with data, next_cursor, has_more
  • Update list() method signature in Messages resource
  • Update tests for new response format

Related PRs

BREAKING CHANGE: messages.list() now returns PaginatedMessagesResponse
with {data, next_cursor, has_more} instead of list[TaskMessage].

Changes:
- Add cursor and direction params to MessageListParams
- Add PaginatedMessagesResponse type with data, next_cursor, has_more
- Update list() method signature in Messages resource
- Update tests for new response format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants