storyblok / storyblok-js-client

Universal JavaScript client for Storyblok's API
MIT License
129 stars 87 forks source link

updated_at (among others) missing from ISbStoryData interface. #477

Closed SebbeJohansson closed 1 year ago

SebbeJohansson commented 1 year ago

storyblok.com

updated_at (among others) missing from ISbStoryData interface resulting in poor intellisense and errors

Expected Behavior

I expect that all the fields are present in the ISbStoryData interface. image

Current Behavior

Right now only some selected fields are present in the ISbStoryData interface. This results in errors and poor intellisense. image

Steps to Reproduce

  1. Setup a storyblok projekt.
  2. Use the StoryblokBridge and run a listener on ['published', 'change', 'input'].
    onMounted(() => {
      console.log('on mounted');
      const { StoryblokBridge } = window;
      const storyblokInstance = new StoryblokBridge();
      storyblokInstance.on(['published', 'change', 'input'], (event) => {
        console.log('update on change and input');
        console.log(event?.story?.updated_at);
        story.value = event.story;
      });
    });
  3. Print the resulting story and check the error.
thiagosaife commented 1 year ago

@SebbeJohansson We're improving all the application's interfaces. I'll let you know when it's done through this thread.

SebbeJohansson commented 1 year ago

@thiagosaife Thanks! 😁

thiagosaife commented 1 year ago

Hi @SebbeJohansson We just opened a new pull request to solve this one. I'll keep you posted here.

SebbeJohansson commented 1 year ago

Amazing 🥳

thiagosaife commented 1 year ago

@SebbeJohansson We're about to launch our next Typescripted version. I'll close this one, but you'll be notified through our channels when this happens. This issue will be solved for sure.