Skip to content

Commit 48a1b5d

Browse files
authored
feat: add uniqueItemCount to OpenSeaCollection type (#1837)
1 parent acd6b33 commit 48a1b5d

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "opensea-js",
3-
"version": "8.0.9",
3+
"version": "8.0.10",
44
"description": "TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data",
55
"license": "MIT",
66
"author": "OpenSea Developers",

src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ export interface OpenSeaCollection {
306306
paymentTokens: OpenSeaPaymentToken[];
307307
/** The total supply of the collection (minted minus burned) */
308308
totalSupply: number;
309+
/** The number of unique items in the collection */
310+
uniqueItemCount: number;
309311
/** The created date of the collection */
310312
createdDate: string;
311313
/** When defined, the zone required for orders for the collection */

src/utils/converters.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export const collectionFromJSON = (collection: any): OpenSeaCollection => {
4343
rarity: rarityFromJSON(collection.rarity),
4444
paymentTokens: (collection.payment_tokens ?? []).map(paymentTokenFromJSON),
4545
totalSupply: collection.total_supply,
46+
uniqueItemCount: collection.unique_item_count,
4647
createdDate: collection.created_date,
4748
requiredZone: collection.required_zone,
4849
};

test/fixtures/collections.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const mockCollection: OpenSeaCollection = {
2727
rarity: null,
2828
paymentTokens: [],
2929
totalSupply: 10000,
30+
uniqueItemCount: 10000,
3031
createdDate: "2024-01-01T00:00:00Z",
3132
};
3233

0 commit comments

Comments
 (0)