Nikita Maliarchuk 0089f188a4
[ACS-4117] Added possibility to create multiple categories (#8382)
* [ACS-4117] added possibility to create multiple subcategories

* [ACS-4117] renamed api function to follow updated code

* [ACS-4117] js-api update

* [ACS-4117] package-lock

* [ACS-4117] rebase

* [ACS-4117] empty commit
2023-03-24 10:38:06 +01:00

6.1 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Category service v6.0.0.0 Active 2023-01-25

Category service

Manages categories in Content Services.

Class members

Methods

  • getSubcategories(parentCategoryId: string, skipCount?: number, maxItems?: number): Observable<CategoryPaging>
    Gets subcategories of a given parent category.
    • parentCategoryId: string - Identifier of a parent category
    • skipCount: number - Number of top categories to skip
    • maxItems: number - Maximum number of subcategories returned from Observable
    • Returns Observable<CategoryPaging> - CategoryPaging object (defined in JS-API) with category paging list
  • createSubcategories(parentCategoryId: string, payload: CategoryBody[]): Observable<CategoryPaging | CategoryEntry>
    Creates subcategories under category with provided categoryId.
  • updateCategory(categoryId: string, payload: CategoryBody): Observable<CategoryEntry>
    Updates category.
    • categoryId: string - Identifier of a category
    • payload: CategoryBody - Created category body
    • Returns Observable<CategoryEntry> - CategoryEntry object (defined in JS-API) containing the category
  • deleteCategory(categoryId: string): Observable<void>
    Deletes category
  • getSubcategories(parentCategoryId: string, skipCount?: number, maxItems?: number): Observable<CategoryPaging>
    Get subcategories of a given parent category
    • parentCategoryId: string - The identifier of a parent category.
    • skipCount: number - (Optional) Number of top categories to skip.
    • maxItems: number - (Optional) Maximum number of subcategories returned from Observable.
    • Returns Observable<CategoryPaging> - Observable<CategoryPaging>
  • searchCategories(name: string, skipCount: number = 0, maxItems?: number): Observable<ResultSetPaging>
    Searches categories by their name.
    • name: string - Value for name which should be used during searching categories.
    • skipCount: number - Specify how many first results should be skipped. Default 0.
    • maxItems: number - (Optional) Specify max number of returned categories. Default is specified by UserPreferencesService.
    • Returns Observable<ResultSetPaging> - Observable<ResultSetPaging> Found categories which name contains searched name.
  • updateCategory(categoryId: string, payload: CategoryBody): Observable<CategoryEntry>
    Updates category
    • categoryId: string - The identifier of a category.
    • payload: CategoryBody - Updated category body
    • Returns Observable<CategoryEntry> - Observable<CategoryEntry>

Details

See the Categories API in the Alfresco JS API for more information about the types returned by Category service methods and for the implementation of the REST API the service is based on.