feat(medusa,product,types): product type & tag store missing endpoints (#11057)
* wip: tag endpoints * feat: types, product types * feat: tests * fix: update product type schema
This commit is contained in:
1 parent
1d7eeb53ae
commit
d4cbc6218c
22 files changed
+507
-3
No files matched your search
@@ -4,6 +4,9 @@ import {
|
||||
} from "../common"
|
||||
|
||||
export interface StoreProductCategoryListParams
|
||||
extends Omit<BaseProductCategoryListParams, "is_internal" | "is_active" | "deleted_at"> {}
|
||||
extends Omit<
|
||||
BaseProductCategoryListParams,
|
||||
"is_internal" | "is_active" | "deleted_at"
|
||||
> {}
|
||||
|
||||
export interface StoreProductCategoryParams extends BaseProductCategoryParams {}
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from "./entities"
|
||||
export * from "./queries"
|
||||
export * from "./responses"
|
||||
@@ -0,0 +1,17 @@
|
||||
import { PaginatedResponse } from "../../common"
|
||||
import { StoreProductTag } from "./entities"
|
||||
|
||||
export interface StoreProductTagResponse {
|
||||
/**
|
||||
* The tag's details.
|
||||
*/
|
||||
product_tag: StoreProductTag
|
||||
}
|
||||
|
||||
export interface StoreProductTagListResponse
|
||||
extends PaginatedResponse<{
|
||||
/**
|
||||
* The paginated list of tags.
|
||||
*/
|
||||
product_tags: StoreProductTag[]
|
||||
}> {}
|
||||
@@ -1,3 +1,6 @@
|
||||
import { OperatorMap } from "../../dal"
|
||||
import { FindParams } from "../common"
|
||||
|
||||
export interface BaseProductType {
|
||||
/**
|
||||
* The product type's ID.
|
||||
@@ -24,3 +27,26 @@ export interface BaseProductType {
|
||||
*/
|
||||
metadata?: Record<string, unknown> | null
|
||||
}
|
||||
|
||||
export interface BaseProductTypeListParams extends FindParams {
|
||||
/**
|
||||
* Query or keyword to apply on the type's searchable fields.
|
||||
*/
|
||||
q?: string
|
||||
/**
|
||||
* Filter by type ID(s).
|
||||
*/
|
||||
id?: string | string[]
|
||||
/**
|
||||
* Filter by value(s).
|
||||
*/
|
||||
value?: string | string[]
|
||||
/**
|
||||
* Apply filters on the creation date.
|
||||
*/
|
||||
created_at?: OperatorMap<string>
|
||||
/**
|
||||
* Apply filters on the update date.
|
||||
*/
|
||||
updated_at?: OperatorMap<string>
|
||||
}
|
||||
@@ -1 +1,3 @@
|
||||
export * from "./entities"
|
||||
export * from "./queries"
|
||||
export * from "./responses"
|
||||
@@ -0,0 +1,9 @@
|
||||
import { BaseFilterable } from "../../../dal"
|
||||
import { SelectParams } from "../../common"
|
||||
import { BaseProductTypeListParams } from "../common"
|
||||
|
||||
export interface StoreProductTypeListParams
|
||||
extends BaseProductTypeListParams,
|
||||
BaseFilterable<StoreProductTypeListParams> {}
|
||||
|
||||
export interface StoreProductTypeParams extends SelectParams {}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { PaginatedResponse } from "../../common"
|
||||
import { StoreProductType } from "./entities"
|
||||
|
||||
export interface StoreProductTypeResponse {
|
||||
/**
|
||||
* The type's details.
|
||||
*/
|
||||
product_type: StoreProductType
|
||||
}
|
||||
|
||||
export interface StoreProductTypeListResponse
|
||||
extends PaginatedResponse<{
|
||||
/**
|
||||
* The paginated list of types.
|
||||
*/
|
||||
product_types: StoreProductType[]
|
||||
}> {}
|
||||
Reference in new issue
Block a user