feat: add postListing/postOffer API methods, deprecate legacy order endpoints#1936
Merged
feat: add postListing/postOffer API methods, deprecate legacy order endpoints#1936
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
api.postListing()andapi.postOffer()methods that return nativeListing/Offertypes from the upcoming os2-core response format changespostOrder,getOrder,getOrdersas@deprecatedwith migration guidanceListingPostQueryResponseandOfferPostQueryResponsetypesNon-breaking
All existing method signatures and return types are preserved. Consumers can migrate at their own pace:
sdk.createListing()→OrderV2(no change)sdk.api.postListing()→Listing/sdk.api.postOffer()→OfferListing/Offerby defaultTest plan
🤖 Generated with Claude Code