Appearance
Interface: WebhooksApi
The methods of Talkline.webhooks.
Methods
create()
ts
create(body): Promise<WebhookEndpointWithSecret>;POST /v1/webhooks: the answer carries the signing secret, which nothing shows again.
Parameters
| Parameter | Type |
|---|---|
body | CreateWebhookRequest |
Returns
Promise<WebhookEndpointWithSecret>
deliveries()
ts
deliveries(id, query?): Promise<Page<Delivery>>;GET /v1/webhooks/{id}/deliveries, one page.
Parameters
| Parameter | Type |
|---|---|
id | string |
query? | ListDeliveriesQuery |
Returns
get()
ts
get(id): Promise<WebhookEndpoint>;Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<WebhookEndpoint>
iterate()
ts
iterate(query?): AsyncIterable<WebhookEndpoint>;GET /v1/webhooks, every page in turn.
Parameters
| Parameter | Type |
|---|---|
query? | Pageless<PageQuery> |
Returns
AsyncIterable<WebhookEndpoint>
iterateDeliveries()
ts
iterateDeliveries(id, query?): AsyncIterable<Delivery>;GET /v1/webhooks/{id}/deliveries, every page in turn.
Parameters
| Parameter | Type |
|---|---|
id | string |
query? | Pageless<ListDeliveriesQuery> |
Returns
AsyncIterable<Delivery>
list()
ts
list(query?): Promise<Page<WebhookEndpoint>>;GET /v1/webhooks, one page.
Parameters
| Parameter | Type |
|---|---|
query? | PageQuery |
Returns
Promise<Page<WebhookEndpoint>>
remove()
ts
remove(id): Promise<void>;Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<void>
rotateSecret()
ts
rotateSecret(id): Promise<WebhookEndpointWithSecret>;POST /v1/webhooks/{id}/secret: every attempt from now on is signed with the new secret, retries included. The answer carries it, and nothing shows it again.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<WebhookEndpointWithSecret>
update()
ts
update(id, body): Promise<WebhookEndpoint>;PATCH /v1/webhooks/{id}: status: 'active' resumes a paused or failing endpoint, and sends what it held.
Parameters
| Parameter | Type |
|---|---|
id | string |
body | UpdateWebhookRequest |
Returns
Promise<WebhookEndpoint>