Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit 2ebce87

Browse files
authored
[ACS-4114] Add categories api (#1477)
* [ACS-4114] Add categories api * [ACS-4114] Spelling fix * [ACS-4114] Change any to void in delete calls
1 parent e1e45be commit 2ebce87

14 files changed

+739
-0
lines changed

src/api/content-rest-api/api/categories.api.ts

Lines changed: 496 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# CategoriesApi
2+
3+
All URIs are relative to *https://localhost/alfresco/api/-default-/public/alfresco/versions/1*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**getSubcategories**](CategoriesApi.md#getSubcategories) | **GET** /categories/{categoryId}/subcategories | List of subcategories within category
8+
[**getCategory**](CategoriesApi.md#getCategory) | **GET** /category/{categoryId} | Get a category
9+
[**getCategoryLinksForNode**](CategoriesApi.md#getCategoryLinksForNode) | **GET** /nodes/{nodeId}/category-links | List of categories that node is assigned to
10+
[**deleteCategory**](CategoriesApi.md#deleteCategory) | **DELETE** /category/{categoryId} | Deletes the category
11+
[**unlinkNodeFromCategory**](CategoriesApi.md#unlinkNodeFromCategory) | **DELETE** /nodes/{nodeId}/category-links/{categoryId} | Unassign a node from category
12+
[**updateCategory**](CategoriesApi.md#updateCategory) | **PUT** /category/{categoryId} | Update a category
13+
[**createSubcategory**](CategoriesApi.md#createSubcategory) | **POST** /categories/{categoryId}/subcategories | Creates a category
14+
[**linkNodeToCategory**](CategoriesApi.md#linkNodeToCategory) | **POST** /nodes/{nodeId}/category-links | Assign a node to a category
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Category
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **string** | | [default to null]
7+
**name** | **string** | | [default to null]
8+
**parentId** | **string** | | [optional] [default to null]
9+
**hasChildren** | **boolean** | | [optional] [default to null]
10+
**count** | **number** | | [optional] [default to null]
11+
12+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# CategoryBody
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**name** | **string** | | [default to null]
7+
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# CategoryEntry
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**entry** | [**Category**](Category.md) | | [default to null]
7+
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# CategoryLinkBody
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **string** | | [default to null]
7+
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# CategoryPaging
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**list** | [**CategoryPagingList**](CategoryPagingList.md) | | [optional] [default to null]
7+
8+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# CategoryPagingList
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**pagination** | [**Pagination**](Pagination.md) | | [default to null]
7+
**entries** | [**CategoryEntry[]**](CategoryEntry.md) | | [default to null]
8+
9+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*!
2+
* @license
3+
* Copyright 2022 Alfresco Software, Ltd.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
export class CategoryLinkBody {
19+
id: string;
20+
21+
constructor(input?: any) {
22+
if (input) {
23+
Object.assign(this, input);
24+
}
25+
}
26+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*!
2+
* @license
3+
* Copyright 2022 Alfresco Software, Ltd.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
export class Category {
19+
id: string;
20+
name: string;
21+
parentId?: string;
22+
hasChildren?: boolean;
23+
count?: number;
24+
25+
constructor(input?: any) {
26+
if (input) {
27+
Object.assign(this, input);
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)