Class: WebhookApiClient
services/webhook.WebhookApiClient
Contains all the endpoints needed to manage webhooks.
Constructors
constructor
• new WebhookApiClient(): WebhookApiClient
Returns
Methods
createWebhookEndpoint
▸ createWebhookEndpoint(data
, config?
): Promise
<SCWebhookEndpointType
>
This endpoint creates a webhook endpoint and connects it to the given webhook events.
Parameters
Name | Type |
---|---|
data | WebhookParamType |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCWebhookEndpointType
>
Defined in
deleteWebhookEndpoint
▸ deleteWebhookEndpoint(id
, config?
): Promise
<any
>
This endpoint deletes a Webhook Endpoint.
Parameters
Name | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Defined in
expireWebhookSigningSecret
▸ expireWebhookSigningSecret(id
, config?
): Promise
<SCWebhookEndpointType
>
This endpoint expires the secret associated with this endpoint.
Parameters
Name | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCWebhookEndpointType
>
Defined in
getASpecificWebhookEndpoint
▸ getASpecificWebhookEndpoint(id
, config?
): Promise
<SCWebhookEndpointType
>
This endpoint retrieves a specific webhook endpoint using ID.
Parameters
Name | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCWebhookEndpointType
>
Defined in
getAllWebhookEndpointAttempts
▸ getAllWebhookEndpointAttempts(id
, config?
): Promise
<SCPaginatedResponse
<SCWebhookEndpointAttemptType
>>
This endpoint retrieves the attempts related to this endpoint.
Parameters
Name | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCWebhookEndpointAttemptType
>>
Defined in
getAllWebhookEndpoints
▸ getAllWebhookEndpoints(config?
): Promise
<SCPaginatedResponse
<SCWebhookEndpointType
>>
This endpoint retrieves all webhook endpoints
Parameters
Name | Type |
---|---|
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCWebhookEndpointType
>>
Defined in
getAllWebhookEvents
▸ getAllWebhookEvents(config?
): Promise
<string
[]>
This endpoint retrieves webhook events that can be enabled in the endpoint.
Parameters
Name | Type |
---|---|
config? | AxiosRequestConfig <any > |
Returns
Promise
<string
[]>
Defined in
resendMultipleWebhookEndpointEvent
▸ resendMultipleWebhookEndpointEvent(id
, event
, config?
): Promise
<any
>
This endpoint resends the events specified as parameters to the endpoint specified by the id parameter.
Parameters
Name | Type |
---|---|
id | string | number |
event | number [] |
config? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Defined in
resendWebhookEndpointEvent
▸ resendWebhookEndpointEvent(id
, event
, config?
): Promise
<any
>
This endpoint resends the event specified as parameter to the endpoint specified by the id parameter.
Parameters
Name | Type |
---|---|
id | string | number |
event | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Defined in
revealWebhookSigningSecret
▸ revealWebhookSigningSecret(id
, config?
): Promise
<SCWebhookEndpointSecretType
>
This endpoint reveals the secret associated with this endpoint.
Parameters
Name | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCWebhookEndpointSecretType
>
Defined in
updateASingleWebhookEndpointField
▸ updateASingleWebhookEndpointField(id
, params
, config?
): Promise
<SCWebhookEndpointType
>
This endpoint updates a specific field for a specific webhook endpoint.
Parameters
Name | Type |
---|---|
id | string | number |
params | WebhookParamType |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCWebhookEndpointType
>
Defined in
updateASpecificWebhookEndpoint
▸ updateASpecificWebhookEndpoint(id
, params
, config?
): Promise
<SCWebhookEndpointType
>
This endpoint updates a specific webhook endpoint.
Parameters
Name | Type |
---|---|
id | string | number |
params | WebhookParamType |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCWebhookEndpointType
>