• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ProjectOpenSea / opensea-js / 19312829602

12 Nov 2025 09:43PM UTC coverage: 87.224% (-0.1%) from 87.319%
19312829602

push

github

web-flow
fix: correct getCollectionOffers return type and add pagination support (#1818)

* fix: correct getCollectionOffers return type and fix AssetEventType enum

- Change getCollectionOffers return type from ListCollectionOffersResponse to GetOffersResponse
- Add pagination parameters (limit, next) to getCollectionOffers method
- Remove unused ListCollectionOffersResponse import from api.ts
- Update all related unit and integration tests to use correct response type
- Add tests for pagination parameters
- Add null check for offer.criteria in integration test
- Remove invalid AssetEventType enum values (CANCEL, REDEMPTION)
- Update documentation to reflect only valid event types (ORDER, SALE, TRANSFER)
- Bump package version from 8.0.5 to 8.0.6

The API returns { "offers": [...], "next": "..." } which matches GetOffersResponse, not ListCollectionOffersResponse which lacks the pagination cursor.

API testing confirmed only 3 valid event types: order, sale, transfer. The CANCEL and REDEMPTION enum values returned API errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update null address terminology in API reference

* Update null address terminology in documentation

* fix: correct AssetEventType enum to match actual OpenSea API behavior

This commit updates the event types to accurately reflect the OpenSea API's
actual behavior based on live API testing with the boredapeyachtclub collection.

Key changes:
- AssetEventType enum now has: SALE, TRANSFER, ORDER (not individual listing/offer types)
- Added OrderEventType enum to distinguish order types: LISTING, ITEM_OFFER,
  COLLECTION_OFFER, TRAIT_OFFER
- OrderEvent type now includes order_type field to specify the kind of order
- Updated documentation to clarify that ORDER cannot be used as a filter parameter
- All tests updated to use correct event structure with order_type field

API behavior discovered:
- The API returns event_type "ord... (continued)

453 of 665 branches covered (68.12%)

Branch coverage included in aggregate %.

28 of 29 new or added lines in 5 files covered. (96.55%)

4 existing lines in 1 file now uncovered.

4019 of 4462 relevant lines covered (90.07%)

4.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.28
/src/api/api.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc