fix(medusa): import and use RequestQueryFields from types package (#7275)

Noticed that `RequestQueryFields` is defined in both the `medusa` and `types` package. Within the `medusa` package sometimes it uses the local type definition or the definition in `types`.

This PR removes the type definition of `RequestQueryFields` in `medusa` and uses that in `types` instead.
This commit is contained in:
Shahed Nasser
2024-05-08 12:55:29 +00:00
committed by GitHub
parent 67944dcc92
commit c71a06c87f
6 changed files with 15 additions and 36 deletions
+4 -1
View File
@@ -201,11 +201,14 @@ export type QueryConfig<TEntity extends BaseEntity> = {
export type RequestQueryFields = {
/**
* Comma-separated relations that should be expanded in the returned data.
* @deprecated Use `fields` instead and the relations will be inferred
*/
expand?: string
/**
* Comma-separated fields that should be included in the returned data.
* if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
* without prefix it will replace the entire default fields.
*/
fields?: string
@@ -220,7 +223,7 @@ export type RequestQueryFields = {
limit?: number
/**
* Field to sort items in the list by.
* The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
*/
order?: string
}