Skip to content
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

fix: update typing for not-yet published stories #862

Closed

Conversation

finnboeger
Copy link
Contributor

Pull request type

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Other (please describe):

How to test this PR

Create a new story in the root directory (and only save it, don't publish it) and access its draft version via the API. The response should contain the following null values that are not yet reflected in the typing:

{
   "story":{
      ...
      "parent_id": null,
      ...
      "first_published_at":null,
      "release_id":null,
      ...
      "default_full_slug":null,
      "translated_slugs":null
   },
   ...
}

What is the new behavior?

fields can now be null according to the typing

Other information

I've missed those fields in #763 as I only checked for published stories, this should now cover all story states.

It may be a good idea to split between Published/Non-Published state but that's probably something for usages of the library as it would be a big change.

@edodusi
Copy link
Contributor

edodusi commented Dec 30, 2024

Hey @finnboeger thanks for this, I put your suggested fields in #917 and added you as a co-author

@edodusi edodusi closed this Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold [Issue] Temporarily paused issues. v7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants