Skip to main content
Version: 0.13.0 (Previous)

🚀 Category features

Category features are SDK composers, not Express middleware; categoryService mounts the Category features with the required stores and drivers.

Inventory

FeatureComposed schema(s)Composed route(s)Purpose
createCategoryFeaturecreateCategorySchemacreateCategoryRouteCreate a category.
getCategoryFeaturesgetCategorySchemagetCategoryRouteRead one category.
findCategoriesFeaturesfindCategoriesSchemafindCategoriesRouteList categories.
editCategoryFeaturesupdateCategorySchemaupdateCategoryRouteUpdate a category.
enableCategoryStatusFeaturesenableCategorySchemaenableCategoryRouteSet status to active.
disableCategoryStatusFeaturesdisableCategorySchemadisableCategoryRouteSet status to inactive.
editCategoryStatusFeaturesVia enableCategoryStatusFeatures and disableCategoryStatusFeaturesenableCategoryRoute, disableCategoryRouteCombine both status features.
deleteCategoryFeaturesdeleteCategorySchemadeleteCategoryRouteDelete a category.

Details

Each feature is mounted by categoryService. The source definitions below show the exact schema-to-route composition.

createCategoryFeature

Implementation

This feature composes the schema and route linked in its inventory row; it is mounted by categoryService or a compatible custom service context.

View complete source
export const createCategoryFeature = compose(
createCategorySchema,
createCategoryRoute
);

getCategoryFeatures

Implementation

This feature composes the schema and route linked in its inventory row; it is mounted by categoryService or a compatible custom service context.

View complete source
export const getCategoryFeatures = compose(getCategorySchema, getCategoryRoute);

findCategoriesFeatures

Implementation

This feature composes the schema and route linked in its inventory row; it is mounted by categoryService or a compatible custom service context.

View complete source
export const findCategoriesFeatures = compose(
findCategoriesSchema,
findCategoriesRoute
);

editCategoryFeatures

Implementation

This feature composes the schema and route linked in its inventory row; it is mounted by categoryService or a compatible custom service context.

Status is deliberately absent from this body schema; use the status features.

View complete source
export const editCategoryFeatures = compose(
updateCategorySchema,
updateCategoryRoute
);

enableCategoryStatusFeatures

Implementation

This feature composes the schema and route linked in its inventory row; it is mounted by categoryService or a compatible custom service context.

categoryService mounts it through editCategoryStatusFeatures; custom services may mount it directly.

View complete source
export const enableCategoryStatusFeatures = compose(
enableCategorySchema,
enableCategoryRoute
);

disableCategoryStatusFeatures

Implementation

This feature composes the schema and route linked in its inventory row; it is mounted by categoryService or a compatible custom service context.

categoryService mounts it through editCategoryStatusFeatures; custom services may mount it directly.

View complete source
export const disableCategoryStatusFeatures = compose(
disableCategorySchema,
disableCategoryRoute
);

editCategoryStatusFeatures

Implementation

This feature composes the schema and route linked in its inventory row; it is mounted by categoryService or a compatible custom service context.

Composes enableCategoryStatusFeatures and disableCategoryStatusFeatures, rather than schemas or routes directly.

View complete source
export const editCategoryStatusFeatures = compose(
enableCategoryStatusFeatures,
disableCategoryStatusFeatures
);

deleteCategoryFeatures

Implementation

This feature composes the schema and route linked in its inventory row; it is mounted by categoryService or a compatible custom service context.

View complete source
export const deleteCategoryFeatures = compose(
deleteCategorySchema,
deleteCategoryRoute
);