Skip to content

Commit dd7afe3

Browse files
committed
sdk: release 0.10.0
1 parent 559244a commit dd7afe3

13 files changed

Lines changed: 53 additions & 92 deletions

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ The format is based on Keep a Changelog.
66

77
## [Unreleased]
88

9+
## [0.10.0] - 2026-03-12
10+
11+
### Removed
12+
13+
1. removed five exact public alias duplicates from the SDK surface: `account.acceptSale()`, `account.cancelSale()`, `account.declineOffer()`, `listings.unlistBulkListings()`, and `listings.unlistListing()`
14+
15+
### Changed
16+
17+
1. standardized the canonical trade/offer/listing naming surface around `acceptTrade()`, `cancelTrade()`, `cancelOffer()`, `deleteBulkListings()`, and `deleteListing()`
18+
919
## [0.9.4] - 2026-03-11
1020

1121
### Added

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The project is intentionally conservative about claims. Anything called `impleme
3636

3737
> The goal is simple: be the SDK you reach for first if you want serious CSFloat automation instead of a thin wrapper.
3838
>
39-
> Install from npm: [`csfloat-node-sdk@0.9.4`](https://www.npmjs.com/package/csfloat-node-sdk)
39+
> Install from npm: [`csfloat-node-sdk@0.10.0`](https://www.npmjs.com/package/csfloat-node-sdk)
4040
4141
## Documentation
4242

@@ -104,17 +104,17 @@ This SDK is optimized for:
104104

105105
## What’s In The Current Generation
106106

107-
- live-confirmed offer flows: create, counter, cancel, decline, history, plus a low-level `acceptOffer()` helper for the browser-observed accept route
108-
- live-confirmed purchase flows: direct `buyNow`, buy-order create/update/delete, seller-side `acceptSale`
109-
- state-gated trade lifecycle helpers, including seller-side `acceptSale()`, buyer-side `markTradesReceived()`, and low-level single-trade helpers such as `markTradeReceived()`, `cannotDeliverTrade()`, and `rollbackTrade()`
107+
- live-confirmed offer flows: create, counter, cancel, history, plus a low-level `acceptOffer()` helper for the browser-observed accept route
108+
- live-confirmed purchase flows: direct `buyNow`, buy-order create/update/delete, seller-side `acceptTrade`
109+
- state-gated trade lifecycle helpers, including seller-side `acceptTrade()`, buyer-side `markTradesReceived()`, and low-level single-trade helpers such as `markTradeReceived()`, `cannotDeliverTrade()`, and `rollbackTrade()`
110110
- low-level trade sync helpers for the browser-observed Steam status routes: `syncSteamNewOffer()` and `syncSteamOffers()`, with optional asset-annotation payloads on the new-offer route
111111
- low-level account verification helpers for `verifyEmail()` and `verifySms()`
112112
- live-confirmed buy-order insight flows: inspect-based lookup and similar-order discovery
113113
- live-confirmed buy-order expression workflows via `account.createBuyOrder({ expression, ... })`, `account.getSimilarBuyOrders({ expression }, ...)`, and composable builder helpers
114114
- workflow-first helpers via `sdk.workflows` for public feed snapshots, account workspace snapshots, and single-skin buy-order insights
115115
- live-confirmed support helpers around adjacent account/insight flows such as `meta.getNotary()`, `account.createNotaryToken()`, `account.createGsInspectToken()`, and `account.getSimilarBuyOrders()`
116116
- live-confirmed auction flow pieces: bid history, max-price `placeBid()`, `deleteAutoBid()` cancellation on cheap auctions, and stable item-route bootstrap reads for `getBuyOrders()` / `getSimilar()` around active auction listings
117-
- live-confirmed bulk listing controls: `createBulkListings()`, `updateBulkListings()`, and `deleteBulkListings()` / `unlistBulkListings()`
117+
- live-confirmed bulk listing controls: `createBulkListings()`, `updateBulkListings()`, and `deleteBulkListings()`
118118
- live-confirmed public/account helpers around app bootstrap, schema media, checker lookup, and payments, including `meta.getApp()`, `meta.getSchemaBrowse()`, `meta.getItemExampleScreenshot()`, `meta.inspectItem()`, and `account.getPendingDeposits()`
119119
- public market helpers: `price-list`, wear presets, range builders, category helpers
120120
- browser-auth discoveries promoted into SDK surface where they proved stable, including `createRecommenderToken()`
@@ -149,12 +149,12 @@ See [API_COVERAGE.md](./API_COVERAGE.md) for the endpoint-by-endpoint support ma
149149
| Area | Status | Methods |
150150
|---|---|---|
151151
| Meta | implemented | `meta.getSchema()`, `meta.getSchemaBrowse()`, `meta.getItemExampleScreenshot()`, `meta.inspectItem()`, `meta.getExchangeRates()`, `meta.getApp()`, `meta.getLocation()`, `meta.getNotary()` |
152-
| Account | implemented | `account.getMe()`, `account.getTrades()`, `account.getTrade()`, `account.getTradeBuyerDetails()`, `account.cannotDeliverTrade()`, `account.disputeTrade()`, `account.syncSteamNewOffer()`, `account.syncSteamOffers()`, `account.acceptTrades()`, `account.markTradesReceived()`, `account.markTradeReceived()`, `account.acceptTrade()`, `account.acceptSale()`, `account.cancelTrades()`, `account.cancelTrade()`, `account.cancelSale()`, `account.rollbackTrade()`, `account.manualVerifyTrade()`, `account.verifyTradeRollback()`, `account.getOffers()`, `account.createOffer()`, `account.getOffer()`, `account.acceptOffer()`, `account.getOfferHistory()`, `account.counterOffer()`, `account.cancelOffer()`, `account.declineOffer()`, `account.getWatchlist()`, `account.iterateWatchlist()`, `account.getOffersTimeline()`, `account.getNotifications()`, `account.getTransactions()`, `account.exportTransactions()`, `account.getAccountStanding()`, `account.getBuyOrders()`, `account.getBuyOrdersForInspect()`, `account.getSimilarBuyOrders()`, `account.createBuyOrder()`, `account.updateBuyOrder()`, `account.deleteBuyOrder()`, `account.getAutoBids()`, `account.deleteAutoBid()`, `account.createRecommenderToken()`, `account.createNotaryToken()`, `account.createGsInspectToken()`, `account.getMaxWithdrawable()`, `account.getPendingDeposits()`, `account.getPendingWithdrawals()`, `account.deletePendingWithdrawal()`, `account.getExtensionStatus()`, `account.getMobileStatus()`, `account.verifyEmail()`, `account.verifySms()`, `account.updateMe()`, `account.setOffersEnabled()`, `account.setStallPublic()`, `account.setAway()`, `account.setMaxOfferDiscount()`, `account.updateTradeUrl()`, `account.updateBackground()`, `account.updateUsername()`, `account.markNotificationsRead()`, `account.setMobileStatus()` |
152+
| Account | implemented | `account.getMe()`, `account.getTrades()`, `account.getTrade()`, `account.getTradeBuyerDetails()`, `account.cannotDeliverTrade()`, `account.disputeTrade()`, `account.syncSteamNewOffer()`, `account.syncSteamOffers()`, `account.acceptTrades()`, `account.markTradesReceived()`, `account.markTradeReceived()`, `account.acceptTrade()`, `account.cancelTrades()`, `account.cancelTrade()`, `account.rollbackTrade()`, `account.manualVerifyTrade()`, `account.verifyTradeRollback()`, `account.getOffers()`, `account.createOffer()`, `account.getOffer()`, `account.acceptOffer()`, `account.getOfferHistory()`, `account.counterOffer()`, `account.cancelOffer()`, `account.getWatchlist()`, `account.iterateWatchlist()`, `account.getOffersTimeline()`, `account.getNotifications()`, `account.getTransactions()`, `account.exportTransactions()`, `account.getAccountStanding()`, `account.getBuyOrders()`, `account.getBuyOrdersForInspect()`, `account.getSimilarBuyOrders()`, `account.createBuyOrder()`, `account.updateBuyOrder()`, `account.deleteBuyOrder()`, `account.getAutoBids()`, `account.deleteAutoBid()`, `account.createRecommenderToken()`, `account.createNotaryToken()`, `account.createGsInspectToken()`, `account.getMaxWithdrawable()`, `account.getPendingDeposits()`, `account.getPendingWithdrawals()`, `account.deletePendingWithdrawal()`, `account.getExtensionStatus()`, `account.getMobileStatus()`, `account.verifyEmail()`, `account.verifySms()`, `account.updateMe()`, `account.setOffersEnabled()`, `account.setStallPublic()`, `account.setAway()`, `account.setMaxOfferDiscount()`, `account.updateTradeUrl()`, `account.updateBackground()`, `account.updateUsername()`, `account.markNotificationsRead()`, `account.setMobileStatus()` |
153153
| Inventory | implemented | `inventory.getInventory()` |
154154
| Public users | implemented | `users.getUser()` |
155155
| User stall | implemented | `stall.getStall()`, `stall.iterateStall()` |
156156
| Listings | implemented | `listings.getListings()`, `listings.getPriceList()`, `listings.iterateListings()`, `listings.getListingById()`, `listings.getBids()`, `listings.placeBid()`, `listings.getBuyOrders()`, `listings.getSimilar()`, `listings.buyNow()`, `listings.buyListing()`, `listings.addToWatchlist()`, `listings.removeFromWatchlist()` |
157-
| Listing mutations | implemented | `listings.createListing()`, `listings.createBuyNowListing()`, `listings.createAuctionListing()`, `listings.createBulkListings()`, `listings.updateBulkListings()`, `listings.deleteBulkListings()`, `listings.unlistBulkListings()`, `listings.updateListing()`, `listings.updateListingPrice()`, `listings.updateListingDescription()`, `listings.updateListingMaxOfferDiscount()`, `listings.updateListingPrivate()`, `listings.deleteListing()`, `listings.unlistListing()`, `listings.addToWatchlist()`, `listings.removeFromWatchlist()`, `listings.buyNow()`, `listings.buyListing()` |
157+
| Listing mutations | implemented | `listings.createListing()`, `listings.createBuyNowListing()`, `listings.createAuctionListing()`, `listings.createBulkListings()`, `listings.updateBulkListings()`, `listings.deleteBulkListings()`, `listings.updateListing()`, `listings.updateListingPrice()`, `listings.updateListingDescription()`, `listings.updateListingMaxOfferDiscount()`, `listings.updateListingPrivate()`, `listings.deleteListing()`, `listings.addToWatchlist()`, `listings.removeFromWatchlist()`, `listings.buyNow()`, `listings.buyListing()` |
158158
| Loadout API | implemented | `loadout.getLoadouts()`, `loadout.getDiscoverLoadouts()`, `loadout.getSkinLoadouts()`, `loadout.getUserLoadouts()`, `loadout.getLoadout()`, `loadout.getFavoriteLoadouts()`, `loadout.createLoadout()`, `loadout.cloneLoadout()`, `loadout.updateLoadout()`, `loadout.deleteLoadout()`, `loadout.recommend()`, `loadout.recommendForSkin()`, `loadout.recommendStickers()`, `loadout.recommendStickersForSkin()`, `loadout.generateRecommendations()`, `loadout.favoriteLoadout()`, `loadout.unfavoriteLoadout()` |
159159
| History | implemented | `history.getSales()`, `history.getGraph()` |
160160
| Workflows | implemented | `workflows.getPublicMarketFeeds()`, `workflows.getAccountWorkspace()`, `workflows.getSingleSkinBuyOrderInsights()` |
@@ -759,9 +759,9 @@ const counter = await sdk.account.counterOffer(offer.id!, {
759759

760760
await sdk.account.cancelOffer(counter.id!);
761761

762-
await sdk.account.declineOffer(offer.id!);
762+
await sdk.account.cancelOffer(offer.id!);
763763

764-
await sdk.account.acceptSale("950524496987687389");
764+
await sdk.account.acceptTrade("950524496987687389");
765765

766766
await sdk.listings.buyListing("807440137469430127", 3);
767767
```

docs/resource-reference.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,8 @@ Key types:
6666
| `markTradesReceived(tradeIdsOrRequest)` | `Promise<CsfloatTrade[]>` | bulk buyer receipt flow | state-gated by actual Steam offer lifecycle |
6767
| `markTradeReceived(tradeId)` | `Promise<CsfloatTradeActionResponse>` | single buyer receipt flow | low-level single-trade route |
6868
| `acceptTrade(tradeId)` | `Promise<CsfloatTrade>` | accept one queued trade | seller-side single trade flow |
69-
| `acceptSale(tradeId)` | `Promise<CsfloatTrade>` | seller-oriented alias for `acceptTrade()` | convenience alias |
7069
| `cancelTrades(tradeIdsOrRequest)` | `Promise<CsfloatTradeBatchResponse>` | bulk seller cancel flow | bundle-backed route |
7170
| `cancelTrade(tradeId)` | `Promise<CsfloatMessageResponse>` | cancel one trade | seller-side single cancel flow |
72-
| `cancelSale(tradeId)` | `Promise<CsfloatMessageResponse>` | seller-oriented alias for `cancelTrade()` | convenience alias |
7371
| `cannotDeliverTrade(tradeId)` | `Promise<CsfloatTradeActionResponse>` | seller-side cannot-deliver flow | low-level failure path |
7472
| `disputeTrade(tradeId)` | `Promise<CsfloatTradeActionResponse>` | open the browser-confirmed dispute route | low-level recovery path |
7573
| `rollbackTrade(tradeId)` | `Promise<CsfloatTradeActionResponse>` | request rollback handling | low-level recovery path |
@@ -93,7 +91,6 @@ Write payload guide:
9391
| `getOfferHistory(offerId)` | `Promise<CsfloatOffer[]>` | load the offer thread history | historical offer chain |
9492
| `counterOffer(offerId, request)` | `Promise<CsfloatOffer>` | seller-side counter offer | request type is `CounterOfferRequest` |
9593
| `cancelOffer(offerId)` | `Promise<CsfloatMessageResponse>` | cancel an offer thread | close/cancel flow |
96-
| `declineOffer(offerId)` | `Promise<CsfloatMessageResponse>` | ergonomic alias for cancel/decline close | same route as `cancelOffer()` |
9794
| `getOffersTimeline(params?)` | `Promise<CsfloatOffersResponse>` | profile timeline-style offer feed | limit-focused snapshot helper |
9895

9996
Key types:
@@ -218,14 +215,12 @@ Listing note:
218215
| `createBulkListings(requests)` | `Promise<CsfloatListing[]>` | bulk list multiple contracts | requires at least one item |
219216
| `updateBulkListings(modifications)` | `Promise<CsfloatListing[]>` | bulk edit multiple listings | currently centered on validated bulk modification semantics |
220217
| `deleteBulkListings(contractIds)` | `Promise<CsfloatMessageResponse>` | bulk delist multiple contracts | requires at least one contract id |
221-
| `unlistBulkListings(contractIds)` | `Promise<CsfloatMessageResponse>` | alias for bulk delist | convenience alias |
222218
| `updateListing(listingId, request)` | `Promise<CsfloatListing>` | patch one listing | low-level generic listing patch |
223219
| `updateListingPrice(listingId, price)` | `Promise<CsfloatListing>` | change listing price | convenience wrapper |
224220
| `updateListingDescription(listingId, description)` | `Promise<CsfloatListing>` | change listing description | convenience wrapper |
225221
| `updateListingMaxOfferDiscount(listingId, maxOfferDiscount)` | `Promise<CsfloatListing>` | change max-offer discount on a listing | convenience wrapper |
226222
| `updateListingPrivate(listingId, isPrivate)` | `Promise<CsfloatListing>` | toggle listing privacy | convenience wrapper |
227223
| `deleteListing(listingId)` | `Promise<CsfloatListing \| null>` | delist one listing | delete/unlist lifecycle step |
228-
| `unlistListing(listingId)` | `Promise<CsfloatListing \| null>` | alias for `deleteListing()` | convenience alias |
229224

230225
Important validation notes:
231226

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "csfloat-node-sdk",
3-
"version": "0.9.4",
3+
"version": "0.10.0",
44
"description": "Live-validated Node.js / TypeScript SDK for the CSFloat API and public companion surfaces.",
55
"homepage": "https://github.com/Krablante/csfloat-node-sdk",
66
"repository": {

src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { CsfloatSdkError, type CsfloatErrorKind } from "./errors.js";
22
import type { QueryParams } from "./types.js";
33
import { cleanParams } from "./utils.js";
44

5-
const DEFAULT_USER_AGENT = "csfloat-node-sdk/0.9.4";
5+
const DEFAULT_USER_AGENT = "csfloat-node-sdk/0.10.0";
66
const DEFAULT_MAX_RETRIES = 2;
77
const DEFAULT_RETRY_DELAY_MS = 250;
88
const DEFAULT_MAX_RETRY_DELAY_MS = 2_000;

src/resources/account.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ export class AccountResource {
141141
return this.client.post<CsfloatTrade>(`trades/${tradeId}/accept`, {});
142142
}
143143

144-
acceptSale(tradeId: string): Promise<CsfloatTrade> {
145-
return this.acceptTrade(tradeId);
146-
}
147-
148144
cancelTrades(tradeIds: string[] | AcceptTradesRequest): Promise<CsfloatTradeBatchResponse> {
149145
const body = Array.isArray(tradeIds)
150146
? { trade_ids: tradeIds }
@@ -157,10 +153,6 @@ export class AccountResource {
157153
return this.client.delete<CsfloatMessageResponse>(`trades/${tradeId}`);
158154
}
159155

160-
cancelSale(tradeId: string): Promise<CsfloatMessageResponse> {
161-
return this.cancelTrade(tradeId);
162-
}
163-
164156
/**
165157
* Low-level rollback helper for bundle-confirmed seller/buyer recovery flows.
166158
* Keep this conservative: route shape is stable, outcome semantics are still trade-state-specific.
@@ -216,10 +208,6 @@ export class AccountResource {
216208
return this.client.delete<CsfloatMessageResponse>(`offers/${offerId}`);
217209
}
218210

219-
declineOffer(offerId: string): Promise<CsfloatMessageResponse> {
220-
return this.cancelOffer(offerId);
221-
}
222-
223211
getWatchlist(
224212
params: CsfloatWatchlistParams = {},
225213
): Promise<CsfloatListingsResponse> {

src/resources/listings.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ export class ListingsResource {
145145
});
146146
}
147147

148-
unlistBulkListings(contractIds: string[]): Promise<CsfloatMessageResponse> {
149-
return this.deleteBulkListings(contractIds);
150-
}
151-
152148
updateListing(listingId: string, request: UpdateListingRequest): Promise<CsfloatListing> {
153149
return this.client.patch<CsfloatListing>(`listings/${listingId}`, request);
154150
}
@@ -176,10 +172,6 @@ export class ListingsResource {
176172
return this.client.delete<CsfloatListing | null>(`listings/${listingId}`);
177173
}
178174

179-
unlistListing(listingId: string): Promise<CsfloatListing | null> {
180-
return this.deleteListing(listingId);
181-
}
182-
183175
private validateCreateListingRequest(request: CreateListingRequest): void {
184176
if (request.description && request.description.length > 32) {
185177
throw new CsfloatSdkError("description cannot be longer than 32 characters");

test/account.test.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,6 @@ describe("AccountResource", () => {
177177
expect(post).toHaveBeenCalledWith("trades/950524496987687389/received", {});
178178
});
179179

180-
it("accepts a sale through the single-trade alias", async () => {
181-
const post = vi.fn(async (_path: string, _body: unknown) => null);
182-
const resource = new AccountResource({ post } as never);
183-
184-
await resource.acceptSale("950524496987687389");
185-
186-
expect(post).toHaveBeenCalledWith("trades/950524496987687389/accept", {});
187-
});
188-
189180
it("cancels trades in bulk", async () => {
190181
const post = vi.fn(async (_path: string, _body: unknown) => null);
191182
const resource = new AccountResource({ post } as never);
@@ -206,15 +197,6 @@ describe("AccountResource", () => {
206197
expect(del).toHaveBeenCalledWith("trades/950524496987687389");
207198
});
208199

209-
it("cancels a sale through the single-trade alias", async () => {
210-
const del = vi.fn(async (_path: string) => null);
211-
const resource = new AccountResource({ delete: del } as never);
212-
213-
await resource.cancelSale("950524496987687389");
214-
215-
expect(del).toHaveBeenCalledWith("trades/950524496987687389");
216-
});
217-
218200
it("hits the low-level rollback trade route", async () => {
219201
const post = vi.fn(async (_path: string, _body: unknown) => null);
220202
const resource = new AccountResource({ post } as never);
@@ -304,15 +286,6 @@ describe("AccountResource", () => {
304286
expect(del).toHaveBeenCalledWith("offers/950527619626041456");
305287
});
306288

307-
it("declines an offer through the same delete route", async () => {
308-
const del = vi.fn(async (_path: string) => null);
309-
const resource = new AccountResource({ delete: del } as never);
310-
311-
await resource.declineOffer("950531563567843184");
312-
313-
expect(del).toHaveBeenCalledWith("offers/950531563567843184");
314-
});
315-
316289
it("requests authenticated watchlist with params", async () => {
317290
const get = vi.fn(async (_path: string, _params?: unknown) => null);
318291
const resource = new AccountResource({ get } as never);

test/client.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("CsfloatHttpClient", () => {
2828
method: "GET",
2929
headers: expect.objectContaining({
3030
Authorization: "secret",
31-
"User-Agent": "csfloat-node-sdk/0.9.4",
31+
"User-Agent": "csfloat-node-sdk/0.10.0",
3232
}),
3333
});
3434
});

test/listings.test.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -202,20 +202,6 @@ describe("ListingsResource", () => {
202202
});
203203
});
204204

205-
it("aliases unlistBulkListings to the same bulk-delist route", async () => {
206-
const patch = vi.fn(async (_path: string, _body?: unknown) => ({ message: "contracts delisted" }));
207-
const resource = new ListingsResource({
208-
...client,
209-
patch,
210-
} as never);
211-
212-
await resource.unlistBulkListings(["a"]);
213-
214-
expect(patch).toHaveBeenCalledWith("listings/bulk-delist", {
215-
contract_ids: ["a"],
216-
});
217-
});
218-
219205
it("rejects empty bulk delist payloads", async () => {
220206
const resource = new ListingsResource(client);
221207

@@ -411,4 +397,16 @@ describe("ListingsResource", () => {
411397
max_price: 9,
412398
});
413399
});
400+
401+
it("deletes a single listing", async () => {
402+
const del = vi.fn(async (_path: string) => null);
403+
const resource = new ListingsResource({
404+
...client,
405+
delete: del,
406+
} as never);
407+
408+
await resource.deleteListing("950170960026273280");
409+
410+
expect(del).toHaveBeenCalledWith("listings/950170960026273280");
411+
});
414412
});

0 commit comments

Comments
 (0)