Skip to content

fix(NOJIRA-123): fix return type in themes list #82

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 2 commits into from
Oct 4, 2023

Conversation

rubentypeform
Copy link
Contributor

Description

  • Add a Typeform.API.Themes namespace with a List interface that matches the returned type from the GET /themes endpoint.
  • Change the themes.list() method return type from Promise<Typeform.Theme[]> to the new Promise<Typeform.API.Themes.List>.

Motivation and Context

When using the js-api-client library with Typescript, the return type from themes.list() does not match the payload returned by the endpoint, making it quite difficult to work with.

Testing

I'm not sure how to test this yet, sorry.

Backward Compatibility

These changes will break backward compatibility.

Screenshots

None.

@mathio mathio marked this pull request as ready for review October 4, 2023 10:02
@mathio mathio requested a review from a team October 4, 2023 10:02
@mathio mathio changed the title fix(types): fix return type in themes list fix(NOJIRA-123): fix return type in themes list Oct 4, 2023
@mathio
Copy link
Contributor

mathio commented Oct 4, 2023

Thank you for updating types 💪

I have rebased your PR on latest main and resolved conflicts.

Let's merge this.

@mathio mathio merged commit a74622a into main Oct 4, 2023
@typeform-ops-gha
Copy link

🎉 This PR is included in version 1.8.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@rubentypeform rubentypeform deleted the fix/themes-list-return-type branch October 4, 2023 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants