Skip to content

Commit 2c6d660

Browse files
committed
Release v0.2.0
1 parent 1beb531 commit 2c6d660

13 files changed

Lines changed: 12223 additions & 0 deletions

.github/workflows/npm-publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Node.js Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write
12+
contents: read
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: actions/setup-node@v6
16+
with:
17+
node-version: "22"
18+
registry-url: https://registry.npmjs.org/
19+
- run: npm install
20+
- run: npm run build
21+
- run: npm test
22+
# Auth via OIDC trusted publishing (id-token: write + --provenance)
23+
- run: npm publish --provenance --access public

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+
node_modules/

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# @opensea/api-types
2+
3+
## 0.2.0
4+
5+
### Minor Changes
6+
7+
- b3a5e84: Add drops endpoints, trending/top collections, and account resolve
8+
9+
- api-types: Sync OpenAPI spec with 6 new endpoints and 8 new schemas (drops, trending/top collections, account resolve)
10+
- SDK: New DropsAPI class, extended CollectionsAPI and AccountsAPI with new methods
11+
- CLI: New `drops` command, `collections trending/top` subcommands, `accounts resolve` subcommand

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,25 @@
11
# @opensea/api-types
2+
3+
Auto-generated TypeScript types from the OpenSea API OpenAPI spec.
4+
5+
## Updating the spec
6+
7+
```bash
8+
# Fetch latest spec from the API (once the endpoint is live)
9+
pnpm --filter @opensea/api-types run update-spec
10+
11+
# Rebuild types
12+
pnpm --filter @opensea/api-types run build
13+
```
14+
15+
The `opensea-api.json` file is committed to git intentionally — it's the versioned source of truth for codegen. The `update-spec` script fetches the latest version from the API and writes it locally. Commit the updated spec so diffs show exactly what changed in the API.
16+
17+
## Usage
18+
19+
```typescript
20+
import type { Schemas, OperationResponse, OperationQueryParams } from "@opensea/api-types";
21+
22+
type Collection = Schemas["CollectionResponse"];
23+
type ListingsResult = OperationResponse<"get_listings_1">;
24+
type ListParams = OperationQueryParams<"list_collections">;
25+
```

0 commit comments

Comments
 (0)