From 468aae8aa1f5b7aad1e88b74ca9288be2b487535 Mon Sep 17 00:00:00 2001 From: Brian Chen Date: Wed, 5 Jul 2023 18:39:19 -0500 Subject: [PATCH] Add pageKey to GetOwnersForContractResponse (#347) --- CHANGELOG.md | 1 + src/types/types.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e981911..5e27bb12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Added a new method `CoreNamespace.isContractAddress()` to easily check if an address is a contract or EOA. The method accepts a string address and returns a boolean value indicating if the given address is a contract address or not. ### Minor Changes +- Fixed a bug where `GetOwnersForContractResponse` was missing the `pageKey` field. ## 2.9.1 diff --git a/src/types/types.ts b/src/types/types.ts index a6229ae1..9cc87875 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -856,6 +856,9 @@ export interface GetOwnersForContractResponse { * Total count of unique owners. Only present if * {@link GetOwnersForContractOptions.includeCount} is true. */ totalCount?: number; + + /** Optional page key that is returned when a collection has more than 50,000 owners. */ + pageKey?: string; } /** @@ -868,7 +871,7 @@ export interface GetOwnersForContractWithTokenBalancesResponse { owners: NftContractOwner[]; /** Optional page key that is returned when a collection has more than 50,000 owners. */ - pageKey?: string; + pageKey: string; } /** @@ -1616,7 +1619,10 @@ export interface GetOwnersForContractOptions { /** Optional page key to paginate the next page for large requests. */ pageKey?: string; - /** If true, include total count of owners in the response. */ + /** + * If true, include total count of owners in the response. Only applicable + * when `withTokenBalances` is not set to `true`. + */ includeCount?: boolean; }