[AAE-5021] Add listPeople method to PeopleContentService (#6947)

* [AAE-5021] Add listPeople method to PeopleContentService

* lint

* Replace Person with EcmUserModel

* Update imports to @alfresco/adf-core

* Change to const + lint
This commit is contained in:
Thomas Hunter
2021-04-28 17:50:53 +02:00
committed by GitHub
parent 42c81e46bb
commit 9cbae9abd8
11 changed files with 124 additions and 46 deletions

View File

@@ -17,13 +17,16 @@ Gets information about a Content Services user.
Gets information about the user who is currently logged in.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - User information
- **getPerson**(personId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets information about a user identified by their username.
Gets information about a user identified by their ID.
- _personId:_ `string` - ID of the target user
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - User information
- **createPerson**(newPerson: [PersonBodyCreate](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/PersonBodyCreate.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>`<br/>
- **listPeople**(options: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`[]>`<br/> Gets information on a list of users
- _options:_ `any` - Optional parameters supported by JS-API
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`[]>`
- **createPerson**(newPerson: [`PersonBodyCreate`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/PersonBodyCreate.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>`<br/>
Creates new person.
- _newPerson:_ `<`[PersonBodyCreate](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/PersonBodyCreate.md)`>` - Object containing the new person details
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html) `<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`[]>` - Created new person.
- _newPerson:_ `<`[`PersonBodyCreate`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/PersonBodyCreate.md)`>` - Object containing the new person details
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>` - Created new person.
## Details
@@ -33,12 +36,10 @@ in the [Ecm User model docs](../models/ecm-user.model.md). The `avatarId` passed
returned for a particular person.
See the
[getPerson](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/PeopleApi.md#getPerson)
method in the Alfresco JS API for more information about the REST calls used by this service.
See the
[getPerson](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/PeopleApi.md#getPerson),
[listPeople](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/PeopleApi.md#listPeople) and
[createPerson](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/PeopleApi.md#createPerson)
method in the Alfresco JS API for more information about the REST calls used by this service.
methods in the Alfresco JS API for more information about the REST calls used by this service.
## See also