Skip to content

Commit bc0d673

Browse files
committed
Release v0.5.0
Origin-SHA: d37574a8bc57be0693083dff9f65187f15b52490
1 parent bcd7485 commit bc0d673

6 files changed

Lines changed: 317 additions & 71 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ jobs:
1414
- uses: actions/setup-node@v6
1515
with:
1616
node-version-file: .nvmrc
17-
- run: npm install
17+
# --legacy-peer-deps mirrors pnpm's permissive peer-dep behavior used in the
18+
# monorepo. Without it, npm install fails on openapi-typescript@^7 which
19+
# declares a strict `typescript@^5.x` peer while we ship typescript@^6.
20+
- run: npm install --legacy-peer-deps
1821
- run: npm run build
1922
- run: npm run lint
2023
- run: npm test

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @opensea/api-types
22

3+
## 0.5.0
4+
5+
### Minor Changes
6+
7+
- Sync OpenAPI spec. Adds the `POST /api/v2/tools/usage` endpoint and new schema types (`Eip3009Fields`, `X402SettlementFields`, `ToolUsageRequest`, `ToolUsageResponse`), and adds `active_stage`/`next_stage` fields to `DropResponse` and `DropDetailedResponse`. All changes are additive and non-breaking.
8+
39
## 0.4.4
410

511
### Patch Changes

opensea-api.json

Lines changed: 191 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,42 @@
120120
}
121121
}
122122
},
123+
"/api/v2/tools/usage": {
124+
"post": {
125+
"tags": ["Tool Endpoints [Beta]"],
126+
"summary": "[Beta] Report tool usage (metrics only)",
127+
"description": "[Beta] Report verified tool usage for metrics and analytics purposes only. Supports verification_type: eip3009_authorization (free tools, identity proof) or x402_settlement (paid tools, onchain USDC payment verification). This endpoint does NOT trigger any onchain transactions. This endpoint is under active development and may change without notice.",
128+
"operationId": "report_tool_usage",
129+
"requestBody": {
130+
"content": {
131+
"application/json": {
132+
"schema": {
133+
"$ref": "#/components/schemas/ToolUsageRequest"
134+
}
135+
}
136+
},
137+
"required": true
138+
},
139+
"responses": {
140+
"200": {
141+
"description": "OK",
142+
"content": {
143+
"*/*": {
144+
"schema": {
145+
"$ref": "#/components/schemas/ToolUsageResponse"
146+
}
147+
}
148+
}
149+
},
150+
"400": {
151+
"$ref": "#/components/responses/BadRequest"
152+
},
153+
"500": {
154+
"$ref": "#/components/responses/InternalError"
155+
}
156+
}
157+
}
158+
},
123159
"/api/v2/tokens/batch": {
124160
"post": {
125161
"tags": ["Token Endpoints"],
@@ -5785,6 +5821,98 @@
57855821
"total_spent"
57865822
]
57875823
},
5824+
"Eip3009Fields": {
5825+
"type": "object",
5826+
"properties": {
5827+
"caller_address": {
5828+
"type": "string"
5829+
},
5830+
"signature": {
5831+
"type": "string"
5832+
},
5833+
"chain_id": {
5834+
"type": "integer",
5835+
"format": "int64"
5836+
},
5837+
"from": {
5838+
"type": "string"
5839+
},
5840+
"to": {
5841+
"type": "string"
5842+
},
5843+
"value": {
5844+
"type": "integer"
5845+
},
5846+
"valid_after": {
5847+
"type": "integer"
5848+
},
5849+
"valid_before": {
5850+
"type": "integer"
5851+
},
5852+
"nonce": {
5853+
"type": "string"
5854+
}
5855+
}
5856+
},
5857+
"ToolUsageRequest": {
5858+
"type": "object",
5859+
"properties": {
5860+
"verification_type": {
5861+
"type": "string"
5862+
},
5863+
"tool_chain_id": {
5864+
"type": "integer",
5865+
"format": "int64"
5866+
},
5867+
"tool_registry_address": {
5868+
"type": "string"
5869+
},
5870+
"tool_onchain_id": {
5871+
"type": "integer",
5872+
"format": "int64"
5873+
},
5874+
"latency_ms": {
5875+
"type": "integer",
5876+
"format": "int64"
5877+
},
5878+
"eip3009": {
5879+
"$ref": "#/components/schemas/Eip3009Fields"
5880+
},
5881+
"x402": {
5882+
"$ref": "#/components/schemas/X402SettlementFields"
5883+
}
5884+
}
5885+
},
5886+
"X402SettlementFields": {
5887+
"type": "object",
5888+
"properties": {
5889+
"caller_address": {
5890+
"type": "string"
5891+
},
5892+
"tx_hash": {
5893+
"type": "string"
5894+
},
5895+
"chain_id": {
5896+
"type": "integer",
5897+
"format": "int64"
5898+
}
5899+
}
5900+
},
5901+
"ToolUsageResponse": {
5902+
"type": "object",
5903+
"properties": {
5904+
"id": {
5905+
"type": "string"
5906+
},
5907+
"verified": {
5908+
"type": "boolean"
5909+
},
5910+
"verification_type": {
5911+
"type": "string"
5912+
}
5913+
},
5914+
"required": ["id", "verification_type", "verified"]
5915+
},
57885916
"BatchTokensRequest": {
57895917
"type": "object",
57905918
"description": "Request body for batch token retrieval by contract identifiers",
@@ -10076,6 +10204,14 @@
1007610204
"opensea_url": {
1007710205
"type": "string",
1007810206
"description": "OpenSea URL for the drop"
10207+
},
10208+
"active_stage": {
10209+
"$ref": "#/components/schemas/DropStageResponse",
10210+
"description": "The currently-minting stage, if the drop is live. Null if not minting."
10211+
},
10212+
"next_stage": {
10213+
"$ref": "#/components/schemas/DropStageResponse",
10214+
"description": "The earliest upcoming stage by start_time when the drop is not currently minting (e.g. before it starts or between stages). Null if the drop is live or has no future stages."
1007910215
}
1008010216
},
1008110217
"required": [
@@ -10087,6 +10223,53 @@
1008710223
"opensea_url"
1008810224
]
1008910225
},
10226+
"DropStageResponse": {
10227+
"type": "object",
10228+
"description": "A mint stage within a drop",
10229+
"properties": {
10230+
"uuid": {
10231+
"type": "string",
10232+
"description": "Stage UUID"
10233+
},
10234+
"stage_type": {
10235+
"type": "string",
10236+
"description": "Stage type",
10237+
"example": "public_sale"
10238+
},
10239+
"label": {
10240+
"type": "string",
10241+
"description": "Stage label/name"
10242+
},
10243+
"price": {
10244+
"type": "string",
10245+
"description": "Mint price per token in wei (decimal string)"
10246+
},
10247+
"price_currency_address": {
10248+
"type": "string",
10249+
"description": "Currency contract address (e.g. 0x0000...0000 for native token)"
10250+
},
10251+
"start_time": {
10252+
"type": "string",
10253+
"description": "Stage start time (ISO 8601)"
10254+
},
10255+
"end_time": {
10256+
"type": "string",
10257+
"description": "Stage end time (ISO 8601)"
10258+
},
10259+
"max_per_wallet": {
10260+
"type": "string",
10261+
"description": "Max tokens mintable per wallet in this stage"
10262+
}
10263+
},
10264+
"required": [
10265+
"end_time",
10266+
"max_per_wallet",
10267+
"price_currency_address",
10268+
"stage_type",
10269+
"start_time",
10270+
"uuid"
10271+
]
10272+
},
1009010273
"DropDetailedResponse": {
1009110274
"type": "object",
1009210275
"description": "Detailed drop information including stages and supply",
@@ -10127,6 +10310,14 @@
1012710310
"type": "string",
1012810311
"description": "OpenSea URL for the drop"
1012910312
},
10313+
"active_stage": {
10314+
"$ref": "#/components/schemas/DropStageResponse",
10315+
"description": "The currently-minting stage, if the drop is live. Null if not minting."
10316+
},
10317+
"next_stage": {
10318+
"$ref": "#/components/schemas/DropStageResponse",
10319+
"description": "The earliest upcoming stage by start_time when the drop is not currently minting (e.g. before it starts or between stages). Null if the drop is live or has no future stages."
10320+
},
1013010321
"stages": {
1013110322
"type": "array",
1013210323
"description": "Drop stages (public sale, presale, etc.)",
@@ -10153,53 +10344,6 @@
1015310344
"stages"
1015410345
]
1015510346
},
10156-
"DropStageResponse": {
10157-
"type": "object",
10158-
"description": "A mint stage within a drop",
10159-
"properties": {
10160-
"uuid": {
10161-
"type": "string",
10162-
"description": "Stage UUID"
10163-
},
10164-
"stage_type": {
10165-
"type": "string",
10166-
"description": "Stage type",
10167-
"example": "public_sale"
10168-
},
10169-
"label": {
10170-
"type": "string",
10171-
"description": "Stage label/name"
10172-
},
10173-
"price": {
10174-
"type": "string",
10175-
"description": "Mint price per token in wei (decimal string)"
10176-
},
10177-
"price_currency_address": {
10178-
"type": "string",
10179-
"description": "Currency contract address (e.g. 0x0000...0000 for native token)"
10180-
},
10181-
"start_time": {
10182-
"type": "string",
10183-
"description": "Stage start time (ISO 8601)"
10184-
},
10185-
"end_time": {
10186-
"type": "string",
10187-
"description": "Stage end time (ISO 8601)"
10188-
},
10189-
"max_per_wallet": {
10190-
"type": "string",
10191-
"description": "Max tokens mintable per wallet in this stage"
10192-
}
10193-
},
10194-
"required": [
10195-
"end_time",
10196-
"max_per_wallet",
10197-
"price_currency_address",
10198-
"stage_type",
10199-
"start_time",
10200-
"uuid"
10201-
]
10202-
},
1020310347
"DropDeployReceiptResponse": {
1020410348
"type": "object",
1020510349
"description": "Deploy contract receipt status",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opensea/api-types",
3-
"version": "0.4.4",
3+
"version": "0.5.0",
44
"description": "Auto-generated TypeScript types from the OpenSea API OpenAPI spec",
55
"license": "MIT",
66
"author": "OpenSea Developers",

0 commit comments

Comments
 (0)