Skip to content

Class: ClientEndpoint ​

Defined in: api/endpoints/client/ClientEndpoint.ts:15

Endpoints for interacting with clients.

Extends ​

Constructors ​

Constructor ​

new ClientEndpoint(config, tokenManager, log?, headerProvider?): ClientEndpoint

Defined in: api/endpoints/client/ClientEndpoint.ts:16

Parameters ​

config ​

DefaultApiConfig

tokenManager ​

TokenManager

log? ​

Logger

headerProvider? ​

HeaderProvider

Returns ​

ClientEndpoint

Overrides ​

ApiEndpoint.constructor

Properties ​

config ​

readonly config: DefaultApiConfig

Defined in: api/endpoints/ApiEndpoint.ts:10

Inherited from ​

ApiEndpoint.config


log? ​

protected readonly optional log: Logger

Defined in: api/endpoints/ApiEndpoint.ts:15

Inherited from ​

ApiEndpoint.log


tokenManager ​

readonly tokenManager: TokenManager

Defined in: api/endpoints/ApiEndpoint.ts:14

Inherited from ​

ApiEndpoint.tokenManager

Methods ​

deactivate() ​

deactivate(): Promise<ApiResponse<unknown>>

Defined in: api/endpoints/client/ClientEndpoint.ts:74

Deactivate the current client.

Returns ​

Promise<ApiResponse<unknown>>


deleteRequest() ​

protected deleteRequest(endpoint, queryParams?, noAuthentication?): Promise<ApiResponse<unknown>>

Defined in: api/endpoints/ApiEndpoint.ts:85

Parameters ​

endpoint ​

string

queryParams? ​
noAuthentication? ​

boolean

Returns ​

Promise<ApiResponse<unknown>>

Inherited from ​

ApiEndpoint.deleteRequest


endpoint() ​

protected endpoint(): string

Defined in: api/endpoints/client/ClientEndpoint.ts:20

Returns ​

string

Overrides ​

ApiEndpoint.endpoint


endpointUrl() ​

protected endpointUrl(): string

Defined in: api/endpoints/ApiEndpoint.ts:23

Returns ​

string

Inherited from ​

ApiEndpoint.endpointUrl


get() ​

get(): Promise<ApiResponse<Person>>

Defined in: api/endpoints/client/ClientEndpoint.ts:27

Gets the current client.

Returns ​

Promise<ApiResponse<Person>>


getBlockedStatus() ​

getBlockedStatus(): Promise<ApiResponse<BlockedStatus>>

Defined in: api/endpoints/client/ClientEndpoint.ts:46

Gets the blocklist status of the current client.

Returns ​

Promise<ApiResponse<BlockedStatus>>


getHistory() ​

getHistory(limit, paginationToken?): Promise<ApiResponse<PaginatedResponse<ClientHistory>>>

Defined in: api/endpoints/client/ClientEndpoint.ts:36

Gets the specified amount of emergencies the client has created.

Parameters ​

limit ​

number

The number of emergencies to get

paginationToken? ​

string

The number to use for pagination

Returns ​

Promise<ApiResponse<PaginatedResponse<ClientHistory>>>


getRequest() ​

protected getRequest<T>(endpoint, queryParams?, noAuthentication?): Promise<ApiResponse<T>>

Defined in: api/endpoints/ApiEndpoint.ts:53

Type Parameters ​

T ​

T = unknown

Parameters ​

endpoint ​

string

queryParams? ​
noAuthentication? ​

boolean

Returns ​

Promise<ApiResponse<T>>

Inherited from ​

ApiEndpoint.getRequest


linkClient() ​

linkClient(rsiHandle): Promise<ApiResponse<Person>>

Defined in: api/endpoints/client/ClientEndpoint.ts:57

Links the current user to a rsiHandle.

Parameters ​

rsiHandle ​

string

The RSI handle of the client

Returns ​

Promise<ApiResponse<Person>>

The updated Person object of the client


patchRequest() ​

protected patchRequest<T>(endpoint, data?, noAuthentication?): Promise<ApiResponse<T>>

Defined in: api/endpoints/ApiEndpoint.ts:77

Type Parameters ​

T ​

T = unknown

Parameters ​

endpoint ​

string

data? ​

unknown

noAuthentication? ​

boolean

Returns ​

Promise<ApiResponse<T>>

Inherited from ​

ApiEndpoint.patchRequest


postRequest() ​

protected postRequest<T>(endpoint, data?, noAuthentication?): Promise<ApiResponse<T>>

Defined in: api/endpoints/ApiEndpoint.ts:61

Type Parameters ​

T ​

T = unknown

Parameters ​

endpoint ​

string

data? ​

unknown

noAuthentication? ​

boolean

Returns ​

Promise<ApiResponse<T>>

Inherited from ​

ApiEndpoint.postRequest


putRequest() ​

protected putRequest<T>(endpoint, data?, noAuthentication?): Promise<ApiResponse<T>>

Defined in: api/endpoints/ApiEndpoint.ts:69

Type Parameters ​

T ​

T = unknown

Parameters ​

endpoint ​

string

data? ​

unknown

noAuthentication? ​

boolean

Returns ​

Promise<ApiResponse<T>>

Inherited from ​

ApiEndpoint.putRequest


setUserSettings() ​

setUserSettings(settings): Promise<ApiResponse<unknown>>

Defined in: api/endpoints/client/ClientEndpoint.ts:67

Updates the settings of the current user for the Client Portal.

Parameters ​

settings ​

string

The object settings to add or update

Returns ​

Promise<ApiResponse<unknown>>

Released under the GPL-3.0 License.