Skip to content

feat: add postListing/postOffer API methods, deprecate legacy order endpoints#1936

Merged
ryanio merged 2 commits intomainfrom
migrate-deprecated-order-response
Mar 11, 2026
Merged

feat: add postListing/postOffer API methods, deprecate legacy order endpoints#1936
ryanio merged 2 commits intomainfrom
migrate-deprecated-order-response

Conversation

@ryanio
Copy link
Collaborator

@ryanio ryanio commented Mar 11, 2026

Summary

  • Adds new api.postListing() and api.postOffer() methods that return native Listing/Offer types from the upcoming os2-core response format changes
  • Marks postOrder, getOrder, getOrders as @deprecated with migration guidance
  • Adds ListingPostQueryResponse and OfferPostQueryResponse types

Non-breaking

All existing method signatures and return types are preserved. Consumers can migrate at their own pace:

  1. Now: Keep using sdk.createListing()OrderV2 (no change)
  2. When ready: Use sdk.api.postListing()Listing / sdk.api.postOffer()Offer
  3. Future major version: SDK methods switch to return Listing/Offer by default

Test plan

  • All 642 unit tests passing
  • TypeScript compilation clean
  • Zero breaking changes — purely additive

🤖 Generated with Claude Code

ryanio and others added 2 commits March 11, 2026 13:57
The os2-core POST listing/offer endpoints now return both a deprecated
`order` field and new `listing`/`offer` fields with the v2 response
format. This PR migrates the SDK to read from the new fields.

BREAKING CHANGES:
- `createListing` now returns `Listing` instead of `OrderV2`
- `createOffer` now returns `Offer` instead of `OrderV2`
- `createBulkListings` returns `BulkListingResult` instead of `BulkOrderResult`
- `createBulkOffers` returns `BulkOfferResult` instead of `BulkOrderResult`
- New `postListing`/`postOffer` API methods replace deprecated `postOrder`
- GET orders endpoints (`getOrder`/`getOrders`) marked as deprecated

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add new API methods that return native Listing/Offer types from the
upcoming os2-core response format changes. Existing methods and return
types are preserved — consumers can migrate at their own pace.

- Add postListing() and postOffer() on OpenSeaAPI and OrdersAPI
- Add ListingPostQueryResponse and OfferPostQueryResponse types
- Mark deprecated methods with @deprecated JSDoc annotations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ryanio ryanio changed the title feat: migrate to v2 listing/offer response types feat: add postListing/postOffer API methods, deprecate legacy order endpoints Mar 11, 2026
@ryanio ryanio merged commit ac22260 into main Mar 11, 2026
8 checks passed
@ryanio ryanio deleted the migrate-deprecated-order-response branch March 11, 2026 21:08
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.

1 participant