Skip to main content

LegalPageService

LegalPage service can be used in the following way:
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

new LegalPageService()

new LegalPageService(): LegalPageService

Returns

LegalPageService

Methods

ackLegalPage()

static ackLegalPage(id, accept?, config?): Promise<SCLegalPageAckType>

Parameters

ParameterType
idstring | number
accept?string | number
config?AxiosRequestConfig<any>

Returns

Promise<SCLegalPageAckType>

Source

services/legal_page/index.ts:164


getAllLastRevisionsOfLegalPages()

static getAllLastRevisionsOfLegalPages(config?): Promise<SCLegalPageType[]>

Parameters

ParameterType
config?AxiosRequestConfig<any>

Returns

Promise<SCLegalPageType[]>

Source

services/legal_page/index.ts:152


getAllRevisionsOfLegalPage()

static getAllRevisionsOfLegalPage(policy, config?): Promise <SCPaginatedResponse<SCLegalPageType>>

Parameters

ParameterType
policystring
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCLegalPageType>>

Source

services/legal_page/index.ts:148


getLastRevisionOfLegalPage()

static getLastRevisionOfLegalPage(policy, config?): Promise<SCLegalPageType>

Parameters

ParameterType
policystring
config?AxiosRequestConfig<any>

Returns

Promise<SCLegalPageType>

Source

services/legal_page/index.ts:156


getLegalPages()

static getLegalPages(params?, config?): Promise <SCPaginatedResponse<SCLegalPageType>>

Parameters

ParameterType
params?LegalPageFilterParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCLegalPageType>>

Source

services/legal_page/index.ts:140


getSpecificLegalPage()

static getSpecificLegalPage(id, config?): Promise<SCLegalPageType>

Parameters

ParameterType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCLegalPageType>

Source

services/legal_page/index.ts:144


getSpecificUserAck()

static getSpecificUserAck(id, config?): Promise<SCLegalPageAckType>

Parameters

ParameterType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCLegalPageAckType>

Source

services/legal_page/index.ts:168


searchLegalPages()

static searchLegalPages(params?, config?): Promise <SCPaginatedResponse<SCLegalPageType>>

Parameters

ParameterType
params?LegalPageFilterParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCLegalPageType>>

Source

services/legal_page/index.ts:160


userAckList()

static userAckList(config?): Promise<SCLegalPageAckType[]>

Parameters

ParameterType
config?AxiosRequestConfig<any>

Returns

Promise<SCLegalPageAckType[]>

Source

services/legal_page/index.ts:172