Logotipo Hedhog

Get Hedhog updates in your inbox

New releases, fresh recipes, and breaking changes — no spam.

category Submodule

categories

Localized hierarchical category management with root/child traversal, status filters, and basic module statistics.

Source path: libraries/category/src

Module file: category.module.ts

Introduction

The Category module manages reusable hierarchical category trees. Categories support parent/child nesting, active or inactive status, and localized display names through locale-aware lookups.

Beyond standard CRUD, the API exposes root-category and children-of-parent views to support tree pickers in admin UIs, plus a small stats endpoint for overview dashboards. This package is typically used as a shared taxonomy dependency by other domain modules rather than as an end-user feature on its own.

HTTP Endpoints

8 endpoints

List active root categories for a locale.

Query
locale

Return category totals and status counts.

Get one category with localized data.

Params
id (int)
Query
locale

List child categories of a parent category.

Params
categoryId (int)
Query
locale

Paginated category listing with hierarchy-aware filters.

Query
page, pageSize, search, status, parentId, locale

Create a category with localized labels and optional parent.

Update a category and its localized fields.

Params
id (int)

Delete a category.

Params
id (int)