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()
static
ackLegalPage(id
,accept?
,config?
):Promise
<SCLegalPageAckType
>
Parameters
Parameter | Type |
---|---|
id | string | number |
accept? | string | number |
config? | AxiosRequestConfig |
Returns
Promise
<SCLegalPageAckType
>
getAllLastRevisionsOfLegalPages()
static
getAllLastRevisionsOfLegalPages(config?
):Promise
<SCLegalPageType
[]>
Parameters
Parameter | Type |
---|---|
config? | AxiosRequestConfig |
Returns
Promise
<SCLegalPageType
[]>
getAllRevisionsOfLegalPage()
static
getAllRevisionsOfLegalPage(policy
,config?
):Promise
<SCPaginatedResponse
<SCLegalPageType
>>
Parameters
Parameter | Type |
---|---|
policy | string |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCLegalPageType
>>
getLastRevisionOfLegalPage()
static
getLastRevisionOfLegalPage(policy
,config?
):Promise
<SCLegalPageType
>
Parameters
Parameter | Type |
---|---|
policy | string |
config? | AxiosRequestConfig |
Returns
Promise
<SCLegalPageType
>
getLegalPages()
static
getLegalPages(params?
,config?
):Promise
<SCPaginatedResponse
<SCLegalPageType
>>
Parameters
Parameter | Type |
---|---|
params? | LegalPageFilterParams |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCLegalPageType
>>
getSpecificLegalPage()
static
getSpecificLegalPage(id
,config?
):Promise
<SCLegalPageType
>
Parameters
Parameter | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig |
Returns
Promise
<SCLegalPageType
>
getSpecificUserAck()
static
getSpecificUserAck(id
,config?
):Promise
<SCLegalPageAckType
>
Parameters
Parameter | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig |
Returns
Promise
<SCLegalPageAckType
>
searchLegalPages()
static
searchLegalPages(params?
,config?
):Promise
<SCPaginatedResponse
<SCLegalPageType
>>
Parameters
Parameter | Type |
---|---|
params? | LegalPageFilterParams |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCLegalPageType
>>
userAckList()
static
userAckList(config?
):Promise
<SCLegalPageAckType
[]>
Parameters
Parameter | Type |
---|---|
config? | AxiosRequestConfig |
Returns
Promise
<SCLegalPageAckType
[]>