Fix(medusa, inventory, stock-location, types, utils): Modules sdk build query (#5713)
* remove defaults * take 2 * works now * add changeset * pricing module and pricing service list take null updates * update handlers * update product module service with take:null where relevant * no spread * note to self:default offset should be 0, not 15
This commit is contained in:
1 parent
faa528159d
commit
18afe0b9ad
19 files changed
+103
-45
No files matched your search
@@ -4,11 +4,11 @@ import {
|
||||
FindOperator,
|
||||
FindOptionsSelect,
|
||||
FindOptionsWhere,
|
||||
OrderByCondition,
|
||||
} from "typeorm"
|
||||
OrderByCondition
|
||||
} from "typeorm";
|
||||
|
||||
import { FindOptionsOrder } from "typeorm/find-options/FindOptionsOrder"
|
||||
import { FindOptionsRelations } from "typeorm/find-options/FindOptionsRelations"
|
||||
import { FindOptionsOrder } from "typeorm/find-options/FindOptionsOrder";
|
||||
import { FindOptionsRelations } from "typeorm/find-options/FindOptionsRelations";
|
||||
|
||||
/**
|
||||
* Utility type used to remove some optional attributes (coming from K) from a type T
|
||||
@@ -42,8 +42,8 @@ export type Writable<T> = {
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*
|
||||
* An object that is used to configure how an entity is retrieved from the database. It accepts as a typed parameter an `Entity` class,
|
||||
*
|
||||
* An object that is used to configure how an entity is retrieved from the database. It accepts as a typed parameter an `Entity` class,
|
||||
* which provides correct typing of field names in its properties.
|
||||
*/
|
||||
export interface FindConfig<Entity> {
|
||||
@@ -54,17 +54,17 @@ export interface FindConfig<Entity> {
|
||||
/**
|
||||
* A number indicating the number of records to skip before retrieving the results.
|
||||
*/
|
||||
skip?: number
|
||||
skip?: number | null | undefined
|
||||
/**
|
||||
* A number indicating the number of records to return in the result.
|
||||
*/
|
||||
take?: number
|
||||
take?: number | null | undefined
|
||||
/**
|
||||
* An array of strings, each being relation names of the entity to retrieve in the result.
|
||||
*/
|
||||
relations?: string[]
|
||||
/**
|
||||
* An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`
|
||||
* An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`
|
||||
* to sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.
|
||||
*/
|
||||
order?: { [K: string]: "ASC" | "DESC" }
|
||||
@@ -165,6 +165,7 @@ export type DeleteResponse = {
|
||||
}
|
||||
|
||||
export interface EmptyQueryParams {}
|
||||
|
||||
// TODO: Build a tree repository options from this
|
||||
export interface RepositoryTransformOptions {}
|
||||
|
||||
|
||||
Reference in new issue
Block a user