Skip to main content

Type Alias: CustomEndpoint

CustomEndpoint = object

Defined in: index.ts:20

Custom endpoint configuration for sending notifications to any platform.

Properties

formatBody

formatBody: (params) => Record<string, unknown>

Defined in: index.ts:34

Function to format the notification message for this specific endpoint. Receives the notification and project name, returns a plain object to be JSON serialized as the request body. Must return a value of type Record<string, unknown>.

Parameters

ParameterType
params{ notification: NotificationMessage; project: string; }
params.notificationNotificationMessage
params.projectstring

Returns

Record<string, unknown>


headers?

optional headers?: Record<string, string>

Defined in: index.ts:42

Optional custom headers for the request. Defaults to { 'Content-Type': 'application/json' }


method?

optional method?: "POST" | "PUT" | "PATCH"

Defined in: index.ts:46

HTTP method to use. Defaults to 'POST'.


name?

optional name?: string

Defined in: index.ts:28

Optional name to identify this endpoint (useful for debugging).


url

url: string

Defined in: index.ts:24

The URL of the endpoint to send notifications to.