Skip to content

fix(types): add back the pagination keys #653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Conversation

wolfy1339
Copy link
Member

Resolves #652


Before the change?

  • The types didn't include the total_count property

After the change?

  • The types now contain the total_count property

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@wolfy1339 wolfy1339 added the Type: Bug Something isn't working as documented label Feb 3, 2025
Copy link
Contributor

github-actions bot commented Feb 3, 2025

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@wolfy1339 wolfy1339 merged commit 8b8c500 into main Feb 13, 2025
10 checks passed
@wolfy1339 wolfy1339 deleted the fix-pagination-types branch February 13, 2025 19:28
Copy link
Contributor

🎉 This PR is included in version 11.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@@ -54,9 +54,23 @@ type GetResultsType<T> = T extends { data: any[] }
? T["data"][KnownKeysMatching<T["data"], any[]>]
: never;

// Ensure that the type always returns the paginated results and not a mix of paginated results and the response object
type NormalizeResponse<T> = Omit<T, "data"> & { data: GetResultsType<T> };

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: total_count missing from paginated response types
3 participants