account_hook.proto
path mgmt/v1alpha1/account_hook.proto
package mgmt.v1alpha1
Messages
AccountHook
Name | Type | Description |
---|---|---|
id | string | The unique identifier of this hook. |
name | string | Name of the hook for display/reference. |
description | string | Description of what this hook does. |
account_id | string | The unique identifier of the account this hook belongs to. |
events | repeated AccountHookEvent | The events that will trigger this hook. |
config | AccountHookConfig | Hook-type specific configuration. |
created_by_user_id | string | The user that created this hook. |
created_at | google.protobuf.Timestamp | The time this hook was created. |
updated_by_user_id | string | The user that last updated this hook. |
updated_at | google.protobuf.Timestamp | The last time this hook was updated. |
enabled | bool | Whether or not the hook is enabled. |
AccountHookConfig
Hook-specific configuration
Name | Type | Description |
---|---|---|
webhook | AccountHookConfig.WebHook | Webhook-based hooks |
slack | AccountHookConfig.SlackHook | Slack-based hooks Future: Discord, Teams, etc. |
AccountHookConfig.SlackHook
Slack hook configuration
Name | Type | Description |
---|---|---|
channel_id | string | The Slack channel id to post messages to. |
AccountHookConfig.WebHook
Webhook-specific configuration
Name | Type | Description |
---|---|---|
url | string | The webhook URL to send the event to. |
secret | string | The secret to use for the webhook. |
disable_ssl_verification | bool | Whether to disable SSL verification for the webhook. |
CreateAccountHookRequest
Name | Type | Description |
---|---|---|
account_id | string | The account ID to create the hook for. |
hook | NewAccountHook | The new account hook configuration. |
CreateAccountHookResponse
Name | Type | Description |
---|---|---|
hook | AccountHook | The newly created account hook. |
DeleteAccountHookRequest
Name | Type | Description |
---|---|---|
id | string | The ID of the hook to delete. |
DeleteAccountHookResponse
Name | Type | Description |
---|---|---|
hook | AccountHook | The deleted account hook. |
GetAccountHookRequest
Name | Type | Description |
---|---|---|
id | string | The ID of the hook to retrieve. |
GetAccountHookResponse
Name | Type | Description |
---|---|---|
hook | AccountHook | The account hook. |
GetAccountHooksRequest
Name | Type | Description |
---|---|---|
account_id | string | The account ID to retrieve hooks for. |
GetAccountHooksResponse
Name | Type | Description |
---|---|---|
hooks | repeated AccountHook | The list of account hooks. |
GetActiveAccountHooksByEventRequest
Name | Type | Description |
---|---|---|
account_id | string | The account ID to retrieve hooks for. |
event | AccountHookEvent | The event to retrieve hooks for. A specific event will return hooks that are listening to that specific event as well as wildcard hooks. If you want to retrieve only wildcard hooks, use ACCOUNT_HOOK_EVENT_UNSPECIFIED. |
GetActiveAccountHooksByEventResponse
Name | Type | Description |
---|---|---|
hooks | repeated AccountHook | The list of active account hooks. |
GetSlackConnectionUrlRequest
Name | Type | Description |
---|---|---|
account_id | string | The account ID to retrieve the Slack connection URL for. |
GetSlackConnectionUrlResponse
Name | Type | Description |
---|---|---|
url | string | The Slack connection URL. |
HandleSlackOAuthCallbackRequest
Name | Type | Description |
---|---|---|
state | string | The Slack state. |
code | string | The Slack code. |
HandleSlackOAuthCallbackResponse
Name | Type | Description |
---|
IsAccountHookNameAvailableRequest
Name | Type | Description |
---|---|---|
account_id | string | The account ID to check the name for. |
name | string | The name to check. |
IsAccountHookNameAvailableResponse
Name | Type | Description |
---|---|---|
is_available | bool | Whether the name is available. |
NewAccountHook
Name | Type | Description |
---|---|---|
name | string | Name of the hook for display/reference. |
description | string | Description of what this hook does. |
events | repeated AccountHookEvent | The events that will trigger this hook. |
config | AccountHookConfig | Hook-type specific configuration. |
enabled | bool | Whether or not the hook is enabled. |
SendSlackMessageRequest
Name | Type | Description |
---|---|---|
account_hook_id | string | The account hook ID to send the Slack message to. |
event | bytes | The marshaled event that was emitted by the worker. |
SendSlackMessageResponse
Name | Type | Description |
---|
SetAccountHookEnabledRequest
Name | Type | Description |
---|---|---|
id | string | The ID of the hook to enable/disable. |
enabled | bool | Whether to enable or disable the hook. |
SetAccountHookEnabledResponse
Name | Type | Description |
---|---|---|
hook | AccountHook | The updated account hook. |
TestSlackConnectionRequest
Name | Type | Description |
---|---|---|
account_id | string | The account ID to test the Slack connection for. |
TestSlackConnectionResponse
Name | Type | Description |
---|---|---|
has_configuration | bool | Whether there is an existing Slack configuration. |
test_response | optional TestSlackConnectionResponse.Response | The response from the Slack API. |
error | optional string | The error message if the connection failed. |
TestSlackConnectionResponse.Response
Name | Type | Description |
---|---|---|
url | string | The URL of the Slack that is connected. |
team | string | The team name of the Slack that is connected. |
UpdateAccountHookRequest
Name | Type | Description |
---|---|---|
id | string | The ID of the hook to update. |
name | string | Name of the hook for display/reference. |
description | string | Description of what this hook does. |
events | repeated AccountHookEvent | The events that will trigger this hook. |
config | AccountHookConfig | Hook-type specific configuration. |
enabled | bool | Whether or not the hook is enabled. |
UpdateAccountHookResponse
Name | Type | Description |
---|---|---|
hook | AccountHook | The updated account hook. |
Enums
AccountHookEvent
Enum of all possible events that can trigger an account hook.
Name | Number | Description |
---|---|---|
ACCOUNT_HOOK_EVENT_UNSPECIFIED | 0 | If unspecified, hook will be triggered for all events. |
ACCOUNT_HOOK_EVENT_JOB_RUN_CREATED | 1 | Triggered when a job run is created. |
ACCOUNT_HOOK_EVENT_JOB_RUN_FAILED | 2 | Triggered when a job run fails. |
ACCOUNT_HOOK_EVENT_JOB_RUN_SUCCEEDED | 3 | Triggered when a job run succeeds. |
Services
AccountHookService
GetAccountHooks
Method | GetAccountHooks |
---|---|
Request | GetAccountHooksRequest |
Response | GetAccountHooksResponse |
Description | Retrieves all account hooks. |
GetAccountHook
Method | GetAccountHook |
---|---|
Request | GetAccountHookRequest |
Response | GetAccountHookResponse |
Description | Retrieves a specific account hook. |
CreateAccountHook
Method | CreateAccountHook |
---|---|
Request | CreateAccountHookRequest |
Response | CreateAccountHookResponse |
Description | Creates a new account hook. |
UpdateAccountHook
Method | UpdateAccountHook |
---|---|
Request | UpdateAccountHookRequest |
Response | UpdateAccountHookResponse |
Description | Updates an existing account hook. |
DeleteAccountHook
Method | DeleteAccountHook |
---|---|
Request | DeleteAccountHookRequest |
Response | DeleteAccountHookResponse |
Description | Deletes an account hook. |
IsAccountHookNameAvailable
Method | IsAccountHookNameAvailable |
---|---|
Request | IsAccountHookNameAvailableRequest |
Response | IsAccountHookNameAvailableResponse |
Description | Checks if an account hook name is available. |
SetAccountHookEnabled
Method | SetAccountHookEnabled |
---|---|
Request | SetAccountHookEnabledRequest |
Response | SetAccountHookEnabledResponse |
Description | Enables or disables an account hook. |
GetActiveAccountHooksByEvent
Method | GetActiveAccountHooksByEvent |
---|---|
Request | GetActiveAccountHooksByEventRequest |
Response | GetActiveAccountHooksByEventResponse |
Description | Retrieves all active account hooks for a specific event. |
GetSlackConnectionUrl
Method | GetSlackConnectionUrl |
---|---|
Request | GetSlackConnectionUrlRequest |
Response | GetSlackConnectionUrlResponse |
Description | Retrieves the Slack connection url that allows a user to connect their Slack workspace to Neosync. |
HandleSlackOAuthCallback
Method | HandleSlackOAuthCallback |
---|---|
Request | HandleSlackOAuthCallbackRequest |
Response | HandleSlackOAuthCallbackResponse |
Description | Handles the Slack OAuth callback. |
TestSlackConnection
Method | TestSlackConnection |
---|---|
Request | TestSlackConnectionRequest |
Response | TestSlackConnectionResponse |
Description | Tests the Slack connection by using the stored access token to initiate an auth test api call to slack. |
SendSlackMessage
Method | SendSlackMessage |
---|---|
Request | SendSlackMessageRequest |
Response | SendSlackMessageResponse |
Description | For sending slack messages from the worker. |