Skip to main content

Class: HealthCheckBase

Constructors

constructor

new HealthCheckBase()

Properties

endpoint

Abstract endpoint: string

Defined in

packages/decoupled-kit-health-check/src/classes/HealthCheckBase.ts:9


envVar

Abstract envVar: string

Defined in

packages/decoupled-kit-health-check/src/classes/HealthCheckBase.ts:10


log

Abstract log: Object

Type declaration

NameType
success(message: string) => void
suggest(message: string) => void
warn(message: string) => void

Defined in

packages/decoupled-kit-health-check/src/classes/HealthCheckBase.ts:11

Methods

checkFor200

Abstract checkFor200(url): Promise<boolean>

Check the url for a 200 response

Parameters

NameTypeDescription
urlURLa URL with defined pathname and/or search params

Returns

Promise<boolean>

Defined in

packages/decoupled-kit-health-check/src/classes/HealthCheckBase.ts:24


getURL

Abstract getURL(): URL

Uses this.endpoint to return a new URL

Returns

URL

Defined in

packages/decoupled-kit-health-check/src/classes/HealthCheckBase.ts:19


validateAuth

Abstract validateAuth(): Promise<HealthCheckBase>

Validate the provided credentials

Returns

Promise<HealthCheckBase>

Defined in

packages/decoupled-kit-health-check/src/classes/HealthCheckBase.ts:32


validateEndpoint

Abstract validateEndpoint(): Promise<InvalidCMSEndpointError | HealthCheckBase>

Validate the set endpoint

Returns

Promise<InvalidCMSEndpointError | HealthCheckBase>

Defined in

packages/decoupled-kit-health-check/src/classes/HealthCheckBase.ts:15


validateMenu

Abstract validateMenu(): Promise<DecoupledMenuError | HealthCheckBase>

Validate the menu query or endpoint

Returns

Promise<DecoupledMenuError | HealthCheckBase>

Defined in

packages/decoupled-kit-health-check/src/classes/HealthCheckBase.ts:28


validatePreview

Abstract validatePreview(): Promise<HealthCheckBase>

Validate the preview secret is set and preview is configured at the endpoint by fetching preview content. Should be skipped if credentials are not validated in this.validateAuth().

Returns

Promise<HealthCheckBase>

Defined in

packages/decoupled-kit-health-check/src/classes/HealthCheckBase.ts:37