urembo-hub-api
Preparing search index...
product-categories/product-categories.service
ProductCategoriesService
Class ProductCategoriesService
Index
Constructors
constructor
Methods
create
Product
Category
delete
Product
Category
get
Active
Product
Categories
get
All
Product
Categories
get
Child
Categories
get
Product
Categories
By
Level
get
Product
Category
By
Id
get
Product
Category
Stats
get
Root
Categories
update
Product
Category
Constructors
constructor
new
ProductCategoriesService
(
prisma
:
PrismaService
)
:
ProductCategoriesService
Parameters
prisma
:
PrismaService
Returns
ProductCategoriesService
Methods
create
Product
Category
createProductCategory
(
createProductCategoryDto
:
CreateProductCategoryDto
,
)
:
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
}
&
{
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
,
>
Parameters
createProductCategoryDto
:
CreateProductCategoryDto
Returns
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
}
&
{
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
,
>
delete
Product
Category
deleteProductCategory
(
id
:
string
,
)
:
Promise
<
{
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
,
>
Parameters
id
:
string
Returns
Promise
<
{
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
,
>
get
Active
Product
Categories
getActiveProductCategories
()
:
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
[]
,
>
Returns
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
[]
,
>
get
All
Product
Categories
getAllProductCategories
()
:
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
[]
,
>
Returns
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
[]
,
>
get
Child
Categories
getChildCategories
(
parentId
:
string
,
)
:
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
[]
,
>
Parameters
parentId
:
string
Returns
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
[]
,
>
get
Product
Categories
By
Level
getProductCategoriesByLevel
(
level
:
number
,
)
:
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
[]
,
>
Parameters
level
:
number
Returns
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
[]
,
>
get
Product
Category
By
Id
getProductCategoryById
(
id
:
string
,
)
:
Promise
<
{
children
:
{
description
:
string
;
id
:
string
;
imageUrl
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
description
:
string
;
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
products
:
{
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
name
:
string
;
price
:
Decimal
;
}
[]
;
slug
:
string
;
updatedAt
:
Date
;
}
,
>
Parameters
id
:
string
Returns
Promise
<
{
children
:
{
description
:
string
;
id
:
string
;
imageUrl
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
description
:
string
;
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
products
:
{
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
name
:
string
;
price
:
Decimal
;
}
[]
;
slug
:
string
;
updatedAt
:
Date
;
}
,
>
get
Product
Category
Stats
getProductCategoryStats
()
:
Promise
<
{
active
:
number
;
inactive
:
number
;
level1
:
number
;
level2
:
number
;
total
:
number
;
}
,
>
Returns
Promise
<
{
active
:
number
;
inactive
:
number
;
level1
:
number
;
level2
:
number
;
total
:
number
;
}
,
>
get
Root
Categories
getRootCategories
()
:
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
[]
,
>
Returns
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
[]
,
>
update
Product
Category
updateProductCategory
(
id
:
string
,
updateProductCategoryDto
:
UpdateProductCategoryDto
,
)
:
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
}
&
{
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
,
>
Parameters
id
:
string
updateProductCategoryDto
:
UpdateProductCategoryDto
Returns
Promise
<
{
children
:
{
id
:
string
;
level
:
number
;
name
:
string
;
position
:
number
;
slug
:
string
;
}
[]
;
parent
:
{
id
:
string
;
name
:
string
;
slug
:
string
}
;
}
&
{
createdAt
:
Date
;
description
:
string
;
id
:
string
;
imageUrl
:
string
;
isActive
:
boolean
;
level
:
number
;
name
:
string
;
parentId
:
string
;
position
:
number
;
slug
:
string
;
updatedAt
:
Date
;
}
,
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
create
Product
Category
delete
Product
Category
get
Active
Product
Categories
get
All
Product
Categories
get
Child
Categories
get
Product
Categories
By
Level
get
Product
Category
By
Id
get
Product
Category
Stats
get
Root
Categories
update
Product
Category
urembo-hub-api
Loading...