Classes
Methods
# async create(webhook) → {Promise.<Webhook>}
Creates a new webhook. The receiver type is inferred from the URI. All unknown receivers are treated as 'custom'.
Parameters:
Name | Type | Description |
---|---|---|
webhook |
WebhookCreateModel
|
The model to create a webhook. |
Promise.<Webhook>
# async delete(webhookId) → {Promise.<void>}
Deletes the webhook with the specified id.
Parameters:
Name | Type | Description |
---|---|---|
webhookId |
String
|
The id of the webhook. |
Promise.<void>
# async eventTypes() → {Promise.<Array.<String>>}
Returns all available event types for generic webhooks in Awork.
Promise.<Array.<String>>
# async get(webhookId) → {Promise.<WebHook>}
Returns the webhook with the specified id.
Parameters:
Name | Type | Description |
---|---|---|
webhookId |
String
|
The id of the webhook. |
Promise.<WebHook>
# async list(optionsopt) → {Promise.<Array.<Webhook>>}
Returns all configured webhooks of the workspace.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
ListOptions
|
<optional> |
Pagination and filtering options. |
Promise.<Array.<Webhook>>
# async logs(webhookId) → {Promise.<Array.<String>>}
Returns all logs of the webhook with the specified id.
Parameters:
Name | Type | Description |
---|---|---|
webhookId |
String
|
The id of the webhook. |
Promise.<Array.<String>>
# async slackEventTypes() → {Promise.<Array.<String>>}
Returns all available event types for Slack webhooks in Awork.
Promise.<Array.<String>>