npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@86d-app/auctions

v0.0.25

Published

Time-limited product auctions with bidding, reserve prices, and buy-it-now for 86d commerce platform

Readme

@86d-app/auctions

Time-limited product auctions for 86d commerce platform. Supports English (ascending), Dutch (descending), and sealed (blind) auction types with reserve prices, buy-it-now, anti-sniping protection, and auction watching.

Installation

import auctions from "@86d-app/auctions";

export default defineStore({
  modules: [
    auctions({
      defaultAntiSniping: true,
      defaultAntiSnipingMinutes: 5,
    }),
  ],
});

Configuration

| Option | Type | Default | Description | |--------|------|---------|-------------| | defaultAntiSniping | boolean | true | Whether anti-sniping protection is enabled by default for new auctions | | defaultAntiSnipingMinutes | number | 5 | Default minutes to extend auction end time on last-minute bids |

Auction Types

| Type | Description | |------|-------------| | english | Ascending bids. Standard auction format — bids go up from starting price | | dutch | Descending price. Price drops on interval until someone buys. Requires priceDropAmount and priceDropIntervalMinutes | | sealed | Blind bidding. Each customer places one bid. Highest wins when auction ends |

Entities

Auction

The auction listing with type, pricing, schedule, and status.

| Field | Type | Description | |-------|------|-------------| | id | string | Unique auction ID | | title | string | Auction title | | description | string? | Auction description | | productId | string | Product being auctioned | | productName | string | Product display name | | imageUrl | string? | Product image URL | | type | english \| dutch \| sealed | Auction type | | status | draft \| scheduled \| active \| ended \| sold \| cancelled | Current status | | startingPrice | number | Starting bid amount (cents) | | reservePrice | number | Minimum price to sell (0 = no reserve) | | buyNowPrice | number | Buy-it-now price (0 = disabled) | | bidIncrement | number | Minimum bid increment (cents) | | currentBid | number | Current highest bid (cents) | | bidCount | number | Total bids placed | | highestBidderId | string? | Current highest bidder | | winnerId | string? | Winner (set after auction ends) | | finalPrice | number? | Final sale price (cents) | | startsAt | Date | When auction starts | | endsAt | Date | When auction ends | | antiSnipingEnabled | boolean | Whether anti-sniping extends end time | | antiSnipingMinutes | number | Minutes to extend on last-minute bids |

Bid

An individual bid placed by a customer.

| Field | Type | Description | |-------|------|-------------| | id | string | Unique bid ID | | auctionId | string | Associated auction | | customerId | string | Bidder's customer ID | | customerName | string? | Bidder's display name | | amount | number | Bid amount (cents) | | maxAutoBid | number? | Maximum auto-bid amount | | isWinning | boolean | Whether this is the current winning bid | | isAutoBid | boolean | Whether placed automatically |

Auction Watch

Tracks customers watching an auction for updates.

| Field | Type | Description | |-------|------|-------------| | id | string | Unique watch ID | | auctionId | string | Auction being watched | | customerId | string | Watching customer |

Store Endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /auctions | List auctions (filter by status, type) | | GET | /auctions/:id | Get auction details | | GET | /auctions/:id/bids | List bids for an auction | | POST | /auctions/bids/place | Place a bid (requires auth) | | POST | /auctions/buy-now | Buy at buy-it-now price (requires auth) | | POST | /auctions/watch | Watch an auction (requires auth) | | POST | /auctions/unwatch | Stop watching an auction (requires auth) | | GET | /auctions/my-bids | List customer's own bids (requires auth) | | GET | /auctions/my-watches | List customer's watched auctions (requires auth) |

Admin Endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /admin/auctions | List all auctions (all statuses) | | POST | /admin/auctions/create | Create a new auction | | GET | /admin/auctions/summary | Get auction analytics summary | | GET | /admin/auctions/:id | Get auction detail with recent bids and watcher count | | PUT | /admin/auctions/:id/update | Update auction (draft/scheduled only) | | DELETE | /admin/auctions/:id/delete | Delete auction (not active/sold) | | POST | /admin/auctions/:id/publish | Publish auction (draft/scheduled) | | POST | /admin/auctions/:id/cancel | Cancel auction | | POST | /admin/auctions/:id/close | Close auction (determine winner) | | GET | /admin/auctions/:id/bids | List bids for an auction |

Controller API

interface AuctionController {
  // Auction CRUD
  createAuction(params: CreateAuctionParams): Promise<Auction>;
  updateAuction(id: string, params: UpdateAuctionParams): Promise<Auction | null>;
  getAuction(id: string): Promise<Auction | null>;
  listAuctions(params?): Promise<Auction[]>;
  deleteAuction(id: string): Promise<boolean>;

  // Lifecycle
  publishAuction(id: string): Promise<Auction | null>;
  cancelAuction(id: string): Promise<Auction | null>;
  closeAuction(id: string): Promise<Auction | null>;

  // Bidding
  placeBid(params: PlaceBidParams): Promise<BidResult>;
  getBid(id: string): Promise<Bid | null>;
  listBids(auctionId: string, params?): Promise<Bid[]>;
  getHighestBid(auctionId: string): Promise<Bid | null>;
  getBidsByCustomer(customerId: string, params?): Promise<Bid[]>;

  // Buy-it-now
  buyNow(params: BuyNowParams): Promise<Auction>;

  // Watching
  watchAuction(auctionId: string, customerId: string): Promise<AuctionWatch>;
  unwatchAuction(auctionId: string, customerId: string): Promise<boolean>;
  getWatchers(auctionId: string): Promise<AuctionWatch[]>;
  isWatching(auctionId: string, customerId: string): Promise<boolean>;
  getWatchedAuctions(customerId: string): Promise<AuctionWatch[]>;

  // Analytics
  getAuctionSummary(): Promise<AuctionSummary>;
}

Auction Lifecycle

draft → scheduled → active → ended/sold
                      ↘
                   cancelled
  • Auctions are auto-set to active or scheduled based on startsAt
  • Only draft/scheduled auctions can be edited
  • closeAuctionsold if reserve met and bids exist, otherwise ended
  • buyNow immediately transitions to sold

Anti-Sniping Protection

When enabled, if a bid is placed within antiSnipingMinutes of the auction end, the end time is extended. This prevents last-second bidding from winning unfairly.

Store Components

| Component | Description | |-----------|-------------| | AuctionListing | Browsable grid of active auctions | | AuctionPage | Detailed auction view with bid history |

Admin Components

| Component | Description | |-----------|-------------| | AuctionsList | Dashboard with summary stats and auction list | | AuctionDetail | Detailed view with bids and watcher count |

Notes

  • All monetary values (prices, bids) are in cents
  • Reserve price of 0 means no reserve (item sells to highest bidder)
  • Buy-it-now price of 0 means buy-it-now is disabled
  • Highest bidder cannot bid again (prevents self-outbidding)
  • Sealed auctions allow only one bid per customer
  • Watch is idempotent — re-watching returns existing watch record