feat: Categories retrieve + list API (#7009)
This commit is contained in:
@@ -2,9 +2,9 @@ import { RepositoryTransformOptions } from "../common"
|
||||
import { Context } from "../shared-context"
|
||||
import {
|
||||
BaseFilterable,
|
||||
FilterQuery as InternalFilterQuery,
|
||||
FilterQuery,
|
||||
FindOptions,
|
||||
FilterQuery as InternalFilterQuery,
|
||||
UpsertWithReplaceConfig,
|
||||
} from "./index"
|
||||
|
||||
|
||||
@@ -5,3 +5,4 @@ export * from "./pricing"
|
||||
export * from "./sales-channel"
|
||||
export * from "./stock-locations"
|
||||
export * from "./tax"
|
||||
export * from "./product-category"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./product-category"
|
||||
@@ -0,0 +1,34 @@
|
||||
import { PaginatedResponse } from "../../../common"
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
interface ProductCategoryResponse {
|
||||
id: string
|
||||
name: string
|
||||
description: string | null
|
||||
handle: string | null
|
||||
is_active: boolean
|
||||
is_internal: boolean
|
||||
rank: number | null
|
||||
parent_category_id: string | null
|
||||
created_at: string | Date
|
||||
updated_at: string | Date
|
||||
|
||||
parent_category: ProductCategoryResponse
|
||||
category_children: ProductCategoryResponse[]
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface AdminProductCategoryResponse {
|
||||
product_category: ProductCategoryResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface AdminProductCategoryListResponse extends PaginatedResponse {
|
||||
product_categories: ProductCategoryResponse[]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./admin"
|
||||
@@ -900,6 +900,10 @@ export interface FilterableProductCategoryProps
|
||||
* Whether to include parents of retrieved product categories.
|
||||
*/
|
||||
include_ancestors_tree?: boolean
|
||||
/**
|
||||
* Filter product categories based on searchable fields
|
||||
*/
|
||||
q?: string
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user