Skip to content

Missing type for the redirect inside renderingContent #217

@krzysztofkaszanek

Description

@krzysztofkaszanek

Version

@nuxtjs/algolia: 1.10.2
nuxt: 3.15.1

Steps to reproduce

  1. Try to access the redirect property of listing.renderingContent.
  2. Get the type error that redirect does not exist on type of renderingContent

What is Expected?

It's possible to define a redirect rule in Algolia. https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/#create-a-rule-with-the-api
If it's defined, the response will contain the redirect object inside renderingContent:

...
renderingContent: {
    ...
    redirect: {
        url: '/a/redirect/path/'
    }
}

The type for redirect should be defined in renderingContent: https://github.com/nuxt-modules/algolia/blob/main/src/types.ts#L630

What is actually happening?

I get the type error when trying to use renderingContent.redirect.url

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions