Skip to main content

WebhookApiClient

Contains all the endpoints needed to manage webhooks.

Constructors

new WebhookApiClient()

new WebhookApiClient(): WebhookApiClient

Returns

WebhookApiClient

Methods

createWebhookEndpoint()

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

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

Parameters

ParameterTypeDescription
dataWebhookParamType
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointType>

Source

services/webhook/index.ts:48


deleteWebhookEndpoint()

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

This endpoint deletes a Webhook Endpoint.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/webhook/index.ts:90


expireWebhookSigningSecret()

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

This endpoint expires the secret associated with this endpoint.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointType>

Source

services/webhook/index.ts:108


getASpecificWebhookEndpoint()

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

This endpoint retrieves a specific webhook endpoint using ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointType>

Source

services/webhook/index.ts:57


getAllWebhookEndpointAttempts()

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

This endpoint retrieves the attempts related to this endpoint.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCWebhookEndpointAttemptType>>

Source

services/webhook/index.ts:99


getAllWebhookEndpoints()

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

This endpoint retrieves all webhook endpoints

Parameters

ParameterTypeDescription
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCWebhookEndpointType>>

Source

services/webhook/index.ts:31


getAllWebhookEvents()

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

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

Parameters

ParameterTypeDescription
config?AxiosRequestConfig<any>

Returns

Promise<string[]>

Source

services/webhook/index.ts:39


resendMultipleWebhookEndpointEvent()

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

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

Parameters

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

Returns

Promise<any>

Source

services/webhook/index.ts:142


resendWebhookEndpointEvent()

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

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

Parameters

ParameterTypeDescription
idstring | number
eventnumber
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/webhook/index.ts:127


revealWebhookSigningSecret()

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

This endpoint reveals the secret associated with this endpoint.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointSecretType>

Source

services/webhook/index.ts:117


updateASingleWebhookEndpointField()

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

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

Parameters

ParameterTypeDescription
idstring | number
paramsWebhookParamType
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointType>

Source

services/webhook/index.ts:77


updateASpecificWebhookEndpoint()

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

This endpoint updates a specific webhook endpoint.

Parameters

ParameterTypeDescription
idstring | number
paramsWebhookParamType
config?AxiosRequestConfig<any>

Returns

Promise<SCWebhookEndpointType>

Source

services/webhook/index.ts:67