WebhookApiClient
Contains all the endpoints needed to manage webhooks.
Constructors
Constructor
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
Parameter | Type | Description |
---|---|---|
data | WebhookParamType | |
config? | AxiosRequestConfig |
Returns
Promise
<SCWebhookEndpointType
>
deleteWebhookEndpoint()
static
deleteWebhookEndpoint(id
,config?
):Promise
<any
>
This endpoint deletes a Webhook Endpoint.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
expireWebhookSigningSecret()
static
expireWebhookSigningSecret(id
,config?
):Promise
<SCWebhookEndpointType
>
This endpoint expires the secret associated with this endpoint.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCWebhookEndpointType
>
getAllWebhookEndpointAttempts()
static
getAllWebhookEndpointAttempts(id
,config?
):Promise
<SCPaginatedResponse
<SCWebhookEndpointAttemptType
>>
This endpoint retrieves the attempts related to this endpoint.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCWebhookEndpointAttemptType
>>
getAllWebhookEndpoints()
static
getAllWebhookEndpoints(config?
):Promise
<SCPaginatedResponse
<SCWebhookEndpointType
>>
This endpoint retrieves all webhook endpoints
Parameters
Parameter | Type | Description |
---|---|---|
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCWebhookEndpointType
>>
getAllWebhookEvents()
static
getAllWebhookEvents(config?
):Promise
<string
[]>
This endpoint retrieves webhook events that can be enabled in the endpoint.
Parameters
Parameter | Type | Description |
---|---|---|
config? | AxiosRequestConfig |
Returns
Promise
<string
[]>
getASpecificWebhookEndpoint()
static
getASpecificWebhookEndpoint(id
,config?
):Promise
<SCWebhookEndpointType
>
This endpoint retrieves a specific webhook endpoint using ID.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCWebhookEndpointType
>
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
Parameter | Type | Description |
---|---|---|
id | string | number | |
event | number [] | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
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
Parameter | Type | Description |
---|---|---|
id | string | number | |
event | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
revealWebhookSigningSecret()
static
revealWebhookSigningSecret(id
,config?
):Promise
<SCWebhookEndpointSecretType
>
This endpoint reveals the secret associated with this endpoint.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCWebhookEndpointSecretType
>
updateASingleWebhookEndpointField()
static
updateASingleWebhookEndpointField(id
,params
,config?
):Promise
<SCWebhookEndpointType
>
This endpoint updates a specific field for a specific webhook endpoint.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params | WebhookParamType | |
config? | AxiosRequestConfig |
Returns
Promise
<SCWebhookEndpointType
>
updateASpecificWebhookEndpoint()
static
updateASpecificWebhookEndpoint(id
,params
,config?
):Promise
<SCWebhookEndpointType
>
This endpoint updates a specific webhook endpoint.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params | WebhookParamType | |
config? | AxiosRequestConfig |
Returns
Promise
<SCWebhookEndpointType
>