LegalPageService
1. Import the service from our library:
import {LegalPageService} from "@selfcommunity/api-services";
2. Create a function and put the service inside it!
The async function `getLegalPages` will return the paginated list of legal pages.
async getLegalPages() {
         return await LegalPageService.getLegalPages();
       }
In case of required `params`, just add them inside the brackets.
async getSpecificLegalPage(legalPageId) {
         return await LegalPageService.getSpecificLegalPage(legalPageId);
       }
If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).
1. Declare it(or declare them, it is possible to add multiple params)
const headers = headers: {Authorization: `Bearer ${yourToken}`}
2. Add it inside the brackets and pass it to the function, as shown in the previous example!
Constructors
Constructor
new LegalPageService():
LegalPageService
Returns
LegalPageService
Methods
ackLegalPage()
staticackLegalPage(id,accept?,config?):Promise<SCLegalPageAckType>
Parameters
| Parameter | Type | 
|---|---|
| id | string|number | 
| accept? | string|number | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCLegalPageAckType>
getAllLastRevisionsOfLegalPages()
staticgetAllLastRevisionsOfLegalPages(config?):Promise<SCLegalPageType[]>
Parameters
| Parameter | Type | 
|---|---|
| config? | AxiosRequestConfig | 
Returns
Promise<SCLegalPageType[]>
getAllRevisionsOfLegalPage()
staticgetAllRevisionsOfLegalPage(policy,config?):Promise<SCPaginatedResponse<SCLegalPageType>>
Parameters
| Parameter | Type | 
|---|---|
| policy | string | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCLegalPageType>>
getLastRevisionOfLegalPage()
staticgetLastRevisionOfLegalPage(policy,config?):Promise<SCLegalPageType>
Parameters
| Parameter | Type | 
|---|---|
| policy | string | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCLegalPageType>
getLegalPages()
staticgetLegalPages(params?,config?):Promise<SCPaginatedResponse<SCLegalPageType>>
Parameters
| Parameter | Type | 
|---|---|
| params? | LegalPageFilterParams | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCLegalPageType>>
getSpecificLegalPage()
staticgetSpecificLegalPage(id,config?):Promise<SCLegalPageType>
Parameters
| Parameter | Type | 
|---|---|
| id | string|number | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCLegalPageType>
getSpecificUserAck()
staticgetSpecificUserAck(id,config?):Promise<SCLegalPageAckType>
Parameters
| Parameter | Type | 
|---|---|
| id | string|number | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCLegalPageAckType>
searchLegalPages()
staticsearchLegalPages(params?,config?):Promise<SCPaginatedResponse<SCLegalPageType>>
Parameters
| Parameter | Type | 
|---|---|
| params? | LegalPageFilterParams | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCLegalPageType>>
userAckList()
staticuserAckList(config?):Promise<SCLegalPageAckType[]>
Parameters
| Parameter | Type | 
|---|---|
| config? | AxiosRequestConfig | 
Returns
Promise<SCLegalPageAckType[]>