Skip to main content

Class: WebhookApiClient

services/webhook.WebhookApiClient

Contains all the endpoints needed to manage webhooks.

Constructors

constructor

new WebhookApiClient(): WebhookApiClient

Returns

WebhookApiClient

Methods

createWebhookEndpoint

createWebhookEndpoint(data, config?): Promise<SCWebhookEndpointType>

This endpoint creates a webhook endpoint and connects it to the given webhook events.

Parameters

NameType
dataWebhookParamType
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointType>

Defined in

services/webhook/index.ts:48


deleteWebhookEndpoint

deleteWebhookEndpoint(id, config?): Promise<any>

This endpoint deletes a Webhook Endpoint.

Parameters

NameType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/webhook/index.ts:90


expireWebhookSigningSecret

expireWebhookSigningSecret(id, config?): Promise<SCWebhookEndpointType>

This endpoint expires the secret associated with this endpoint.

Parameters

NameType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointType>

Defined in

services/webhook/index.ts:108


getASpecificWebhookEndpoint

getASpecificWebhookEndpoint(id, config?): Promise<SCWebhookEndpointType>

This endpoint retrieves a specific webhook endpoint using ID.

Parameters

NameType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointType>

Defined in

services/webhook/index.ts:57


getAllWebhookEndpointAttempts

getAllWebhookEndpointAttempts(id, config?): Promise<SCPaginatedResponse<SCWebhookEndpointAttemptType>>

This endpoint retrieves the attempts related to this endpoint.

Parameters

NameType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCWebhookEndpointAttemptType>>

Defined in

services/webhook/index.ts:99


getAllWebhookEndpoints

getAllWebhookEndpoints(config?): Promise<SCPaginatedResponse<SCWebhookEndpointType>>

This endpoint retrieves all webhook endpoints

Parameters

NameType
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCWebhookEndpointType>>

Defined in

services/webhook/index.ts:31


getAllWebhookEvents

getAllWebhookEvents(config?): Promise<string[]>

This endpoint retrieves webhook events that can be enabled in the endpoint.

Parameters

NameType
config?AxiosRequestConfig<any>

Returns

Promise<string[]>

Defined in

services/webhook/index.ts:39


resendMultipleWebhookEndpointEvent

resendMultipleWebhookEndpointEvent(id, event, config?): Promise<any>

This endpoint resends the events specified as parameters to the endpoint specified by the id parameter.

Parameters

NameType
idstring | number
eventnumber[]
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/webhook/index.ts:142


resendWebhookEndpointEvent

resendWebhookEndpointEvent(id, event, config?): Promise<any>

This endpoint resends the event specified as parameter to the endpoint specified by the id parameter.

Parameters

NameType
idstring | number
eventnumber
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/webhook/index.ts:127


revealWebhookSigningSecret

revealWebhookSigningSecret(id, config?): Promise<SCWebhookEndpointSecretType>

This endpoint reveals the secret associated with this endpoint.

Parameters

NameType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointSecretType>

Defined in

services/webhook/index.ts:117


updateASingleWebhookEndpointField

updateASingleWebhookEndpointField(id, params, config?): Promise<SCWebhookEndpointType>

This endpoint updates a specific field for a specific webhook endpoint.

Parameters

NameType
idstring | number
paramsWebhookParamType
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointType>

Defined in

services/webhook/index.ts:77


updateASpecificWebhookEndpoint

updateASpecificWebhookEndpoint(id, params, config?): Promise<SCWebhookEndpointType>

This endpoint updates a specific webhook endpoint.

Parameters

NameType
idstring | number
paramsWebhookParamType
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointType>

Defined in

services/webhook/index.ts:67