WebhookApiClient
Contains all the endpoints needed to manage webhooks.
Constructors
Constructor
new WebhookApiClient():
WebhookApiClient
Returns
WebhookApiClient
Methods
createWebhookEndpoint()
staticcreateWebhookEndpoint(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()
staticdeleteWebhookEndpoint(id,config?):Promise<any>
This endpoint deletes a Webhook Endpoint.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise<any>
expireWebhookSigningSecret()
staticexpireWebhookSigningSecret(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()
staticgetAllWebhookEndpointAttempts(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()
staticgetAllWebhookEndpoints(config?):Promise<SCPaginatedResponse<SCWebhookEndpointType>>
This endpoint retrieves all webhook endpoints
Parameters
| Parameter | Type | Description |
|---|---|---|
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCWebhookEndpointType>>
getAllWebhookEvents()
staticgetAllWebhookEvents(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()
staticgetASpecificWebhookEndpoint(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()
staticresendMultipleWebhookEndpointEvent(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()
staticresendWebhookEndpointEvent(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()
staticrevealWebhookSigningSecret(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()
staticupdateASingleWebhookEndpointField(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()
staticupdateASpecificWebhookEndpoint(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>