Skip to content

Strapi 5 global params like status not recognized in find() type definitions #473

@yseStudio

Description

@yseStudio

Version
@nuxtjs/strapi: v2.0.0
strapi : v5.15.1
nuxt: v3.10.0

Reproduction Link

Steps to reproduce

const { find } = useStrapi()

const res = await find('subscribtions', {
  status: 'draft', // ← parameter global bawaan Strapi 5
  filters: {
    state: { $eq: 'pending' },
  },
  populate: '*',
})

TypeScript will give an error:

Object literal may only specify known properties, and 'status' does not exist in type 'Strapi5RequestParams'.
What is Expected?

Parameters like status (a global query default in Strapi 5) should be accepted without error by the find() helper since Strapi 5 officially supports global parameters like status, etc.

What is actually happening?
TypeScript throws an error:

Object literals may only specify known properties, and 'status' does not exist in type 'Strapi5RequestParams'.

This leaves devs with manual (unsafe) type casts, or unable to use global parameters like status

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