diff --git a/docs/content-services/services/category.service.md b/docs/content-services/services/category.service.md index 34deabfb7e..1cca9f836b 100644 --- a/docs/content-services/services/category.service.md +++ b/docs/content-services/services/category.service.md @@ -13,11 +13,22 @@ Manages categories in Content Services. ### Methods -- **createSubcategory**(parentCategoryId: `string`, payload: `CategoryBody`): [`Observable`](http://reactivex.io/documentation/observable.html)``
- Creates subcategory under category with provided categoryId - - _parentCategoryId:_ `string` - The identifier of a parent category. - - _payload:_ `CategoryBody` - Created category body - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`` - [`Observable`](http://reactivex.io/documentation/observable.html)<CategoryEntry> +- **getSubcategories**(parentCategoryId: `string`, skipCount?: `number`, maxItems?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CategoryPaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryPaging.md)`>`
+ 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`](http://reactivex.io/documentation/observable.html)`<`[`CategoryPaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryPaging.md)`>` - CategoryPaging object (defined in JS-API) with category paging list +- **createSubcategories**(parentCategoryId: `string`, payload: [`CategoryBody[]`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryBody.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CategoryPaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryPaging.md) | [`CategoryEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryEntry.md)`>`
+ Creates subcategories under category with provided categoryId. + - _parentCategoryId:_ `string` - Identifier of a parent category + - _payload:_ [`CategoryBody[]`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryBody.md) - List of categories to be created + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CategoryPaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryPaging.md) | [`CategoryEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryEntry.md)`>` - CategoryEntry object (defined in JS-API) containing the category +- **updateCategory**(categoryId: `string`, payload: [`CategoryBody`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryBody.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CategoryEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryEntry.md)`>`
+ Updates category. + - _categoryId:_ `string` - Identifier of a category + - _payload:_ [`CategoryBody`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryBody.md) - Created category body + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CategoryEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryEntry.md)`>` - CategoryEntry object (defined in JS-API) containing the category - **deleteCategory**(categoryId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)``
Deletes category - _categoryId:_ `string` - The identifier of a category. diff --git a/lib/cli/package-lock.json b/lib/cli/package-lock.json index 9cf2af82f2..28ee3895b7 100644 --- a/lib/cli/package-lock.json +++ b/lib/cli/package-lock.json @@ -5,7 +5,7 @@ "requires": true, "dependencies": { "@alfresco/js-api": { - "version": "5.5.0-741", + "version": "5.5.0-754", "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-5.5.0-741.tgz", "integrity": "sha512-ABqr6zYO2jsh4pei7HEQkxVKSkGcMXEQScrdevX0/QoybVTuAyBQ+HvKf/cs36aECjHEkNqY3wN0Cjtqu/nOag==", "requires": { diff --git a/lib/cli/package.json b/lib/cli/package.json index 7be14d5337..fdfbd86f8b 100644 --- a/lib/cli/package.json +++ b/lib/cli/package.json @@ -20,7 +20,7 @@ "dist": "rm -rf ../../dist/libs/cli && npm run build && cp -R ./bin ../../dist/libs/cli && cp -R ./resources ../../dist/libs/cli && cp -R ./templates ../../dist/libs/cli && cp ./package.json ../../dist/libs/cli" }, "dependencies": { - "@alfresco/js-api": "5.5.0-741", + "@alfresco/js-api": "5.5.0-754", "commander": "6.2.1", "ejs": "^2.6.1", "license-checker": "^25.0.1", diff --git a/lib/content-services/package.json b/lib/content-services/package.json index e1c455c730..d022e1674a 100644 --- a/lib/content-services/package.json +++ b/lib/content-services/package.json @@ -22,7 +22,7 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": "5.5.0-741", + "@alfresco/js-api": "5.5.0-754", "@ngx-translate/core": ">=14.0.0", "moment": ">=2.22.2", "@alfresco/adf-core": "6.0.0-A.3" diff --git a/lib/content-services/src/lib/category/services/category.service.spec.ts b/lib/content-services/src/lib/category/services/category.service.spec.ts index 12f66313f9..a3d3631151 100644 --- a/lib/content-services/src/lib/category/services/category.service.spec.ts +++ b/lib/content-services/src/lib/category/services/category.service.spec.ts @@ -62,8 +62,8 @@ describe('CategoryService', () => { })); it('should create subcategory', fakeAsync(() => { - const createSpy = spyOn(categoryService.categoriesApi, 'createSubcategory').and.returnValue(Promise.resolve(fakeCategoryEntry)); - categoryService.createSubcategory(fakeParentCategoryId, fakeCategoryEntry.entry).subscribe(() => { + const createSpy = spyOn(categoryService.categoriesApi, 'createSubcategories').and.returnValue(Promise.resolve(fakeCategoryEntry)); + categoryService.createSubcategories(fakeParentCategoryId, [fakeCategoryEntry.entry]).subscribe(() => { expect(createSpy).toHaveBeenCalledOnceWith(fakeParentCategoryId, [fakeCategoryEntry.entry], {}); }); })); diff --git a/lib/content-services/src/lib/category/services/category.service.ts b/lib/content-services/src/lib/category/services/category.service.ts index bfb772d939..1a4ffc7cd0 100644 --- a/lib/content-services/src/lib/category/services/category.service.ts +++ b/lib/content-services/src/lib/category/services/category.service.ts @@ -58,14 +58,14 @@ export class CategoryService { } /** - * Creates subcategory under category with provided categoryId + * Creates subcategories under category with provided categoryId * * @param parentCategoryId The identifier of a parent category. - * @param payload Created category body - * @return Observable + * @param payload List of categories to be created. + * @return Observable */ - createSubcategory(parentCategoryId: string, payload: CategoryBody): Observable { - return from(this.categoriesApi.createSubcategory(parentCategoryId, [payload], {})); + createSubcategories(parentCategoryId: string, payload: CategoryBody[]): Observable { + return from(this.categoriesApi.createSubcategories(parentCategoryId, payload, {})); } /** diff --git a/lib/core/package.json b/lib/core/package.json index 938de9e83a..f0a36e2d26 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -44,7 +44,7 @@ "@angular/router": ">=14.1.3", "@mat-datetimepicker/core": "^9.0.68", "@mat-datetimepicker/moment": "^9.0.68", - "@alfresco/js-api": "5.5.0-741", + "@alfresco/js-api": "5.5.0-754", "@alfresco/adf-extensions": "6.0.0-A.3", "@ngx-translate/core": ">=14.0.0", "minimatch-browser": ">=1.0.0", diff --git a/lib/extensions/package.json b/lib/extensions/package.json index ef46bfff7e..ab254d44d7 100644 --- a/lib/extensions/package.json +++ b/lib/extensions/package.json @@ -14,7 +14,7 @@ "peerDependencies": { "@angular/common": ">=14.1.3", "@angular/core": ">=14.1.3", - "@alfresco/js-api": "5.5.0-741" + "@alfresco/js-api": "5.5.0-754" }, "keywords": [ "extensions", diff --git a/lib/process-services-cloud/package.json b/lib/process-services-cloud/package.json index 7281ca84bf..1d8cbe2e1a 100644 --- a/lib/process-services-cloud/package.json +++ b/lib/process-services-cloud/package.json @@ -23,7 +23,7 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": "5.5.0-741", + "@alfresco/js-api": "5.5.0-754", "@alfresco/adf-core": "6.0.0-A.3", "@alfresco/adf-content-services": "6.0.0-A.3", "@apollo/client": "^3.7.2", diff --git a/lib/process-services/package.json b/lib/process-services/package.json index 4689a6fd75..b4994bf7c6 100644 --- a/lib/process-services/package.json +++ b/lib/process-services/package.json @@ -22,7 +22,7 @@ "@angular/platform-browser": ">=14.1.3", "@angular/platform-browser-dynamic": ">=14.1.3", "@angular/router": ">=14.1.3", - "@alfresco/js-api": "5.5.0-741", + "@alfresco/js-api": "5.5.0-754", "@alfresco/adf-core": "6.0.0-A.3", "@alfresco/adf-content-services": "6.0.0-A.3", "@ngx-translate/core": ">=14.0.0", diff --git a/lib/testing/package.json b/lib/testing/package.json index 353a3cb544..e7e44890fc 100644 --- a/lib/testing/package.json +++ b/lib/testing/package.json @@ -11,7 +11,7 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "peerDependencies": { - "@alfresco/js-api": "5.5.0-741" + "@alfresco/js-api": "5.5.0-754" }, "keywords": [ "testing", diff --git a/package-lock.json b/package-lock.json index ddf4038230..73eff071ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@alfresco/js-api": { - "version": "5.5.0-741", - "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-5.5.0-741.tgz", - "integrity": "sha512-ABqr6zYO2jsh4pei7HEQkxVKSkGcMXEQScrdevX0/QoybVTuAyBQ+HvKf/cs36aECjHEkNqY3wN0Cjtqu/nOag==", + "version": "5.5.0-754", + "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-5.5.0-754.tgz", + "integrity": "sha512-XhczCemqdB62+zztv09ZXPHWCNeprDcFN7Wo/98271Yqse7YiY4kYlt1Oifq3xBu4JiJ30QWdKjWwiNDtCXuzg==", "requires": { "event-emitter": "^0.3.5", "superagent": "^6.0.0", diff --git a/package.json b/package.json index cfa2e6a8e0..81c67bf7a5 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "process services-cloud" ], "dependencies": { - "@alfresco/js-api": "5.5.0-741", + "@alfresco/js-api": "5.5.0-754", "@angular/animations": "14.1.3", "@angular/cdk": "14.1.2", "@angular/common": "14.1.3",