Skip to main content

account_hook.proto

path mgmt/v1alpha1/account_hook.proto

package mgmt.v1alpha1


Messages

AccountHook

NameTypeDescription
idstringThe unique identifier of this hook.
namestringName of the hook for display/reference.
descriptionstringDescription of what this hook does.
account_idstringThe unique identifier of the account this hook belongs to.
eventsrepeated AccountHookEventThe events that will trigger this hook.
configAccountHookConfigHook-type specific configuration.
created_by_user_idstringThe user that created this hook.
created_atgoogle.protobuf.TimestampThe time this hook was created.
updated_by_user_idstringThe user that last updated this hook.
updated_atgoogle.protobuf.TimestampThe last time this hook was updated.
enabledboolWhether or not the hook is enabled.

AccountHookConfig

Hook-specific configuration

NameTypeDescription
webhookAccountHookConfig.WebHookWebhook-based hooks
slackAccountHookConfig.SlackHookSlack-based hooks Future: Discord, Teams, etc.

AccountHookConfig.SlackHook

Slack hook configuration

NameTypeDescription
channel_idstringThe Slack channel id to post messages to.

AccountHookConfig.WebHook

Webhook-specific configuration

NameTypeDescription
urlstringThe webhook URL to send the event to.
secretstringThe secret to use for the webhook.
disable_ssl_verificationboolWhether to disable SSL verification for the webhook.

CreateAccountHookRequest

NameTypeDescription
account_idstringThe account ID to create the hook for.
hookNewAccountHookThe new account hook configuration.

CreateAccountHookResponse

NameTypeDescription
hookAccountHookThe newly created account hook.

DeleteAccountHookRequest

NameTypeDescription
idstringThe ID of the hook to delete.

DeleteAccountHookResponse

NameTypeDescription
hookAccountHookThe deleted account hook.

GetAccountHookRequest

NameTypeDescription
idstringThe ID of the hook to retrieve.

GetAccountHookResponse

NameTypeDescription
hookAccountHookThe account hook.

GetAccountHooksRequest

NameTypeDescription
account_idstringThe account ID to retrieve hooks for.

GetAccountHooksResponse

NameTypeDescription
hooksrepeated AccountHookThe list of account hooks.

GetActiveAccountHooksByEventRequest

NameTypeDescription
account_idstringThe account ID to retrieve hooks for.
eventAccountHookEventThe 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

NameTypeDescription
hooksrepeated AccountHookThe list of active account hooks.

GetSlackConnectionUrlRequest

NameTypeDescription
account_idstringThe account ID to retrieve the Slack connection URL for.

GetSlackConnectionUrlResponse

NameTypeDescription
urlstringThe Slack connection URL.

HandleSlackOAuthCallbackRequest

NameTypeDescription
statestringThe Slack state.
codestringThe Slack code.

HandleSlackOAuthCallbackResponse

NameTypeDescription

IsAccountHookNameAvailableRequest

NameTypeDescription
account_idstringThe account ID to check the name for.
namestringThe name to check.

IsAccountHookNameAvailableResponse

NameTypeDescription
is_availableboolWhether the name is available.

NewAccountHook

NameTypeDescription
namestringName of the hook for display/reference.
descriptionstringDescription of what this hook does.
eventsrepeated AccountHookEventThe events that will trigger this hook.
configAccountHookConfigHook-type specific configuration.
enabledboolWhether or not the hook is enabled.

SendSlackMessageRequest

NameTypeDescription
account_hook_idstringThe account hook ID to send the Slack message to.
eventbytesThe marshaled event that was emitted by the worker.

SendSlackMessageResponse

NameTypeDescription

SetAccountHookEnabledRequest

NameTypeDescription
idstringThe ID of the hook to enable/disable.
enabledboolWhether to enable or disable the hook.

SetAccountHookEnabledResponse

NameTypeDescription
hookAccountHookThe updated account hook.

TestSlackConnectionRequest

NameTypeDescription
account_idstringThe account ID to test the Slack connection for.

TestSlackConnectionResponse

NameTypeDescription
has_configurationboolWhether there is an existing Slack configuration.
test_responseoptional TestSlackConnectionResponse.ResponseThe response from the Slack API.
erroroptional stringThe error message if the connection failed.

TestSlackConnectionResponse.Response

NameTypeDescription
urlstringThe URL of the Slack that is connected.
teamstringThe team name of the Slack that is connected.

UpdateAccountHookRequest

NameTypeDescription
idstringThe ID of the hook to update.
namestringName of the hook for display/reference.
descriptionstringDescription of what this hook does.
eventsrepeated AccountHookEventThe events that will trigger this hook.
configAccountHookConfigHook-type specific configuration.
enabledboolWhether or not the hook is enabled.

UpdateAccountHookResponse

NameTypeDescription
hookAccountHookThe updated account hook.

Enums

AccountHookEvent

Enum of all possible events that can trigger an account hook.

NameNumberDescription
ACCOUNT_HOOK_EVENT_UNSPECIFIED0If unspecified, hook will be triggered for all events.
ACCOUNT_HOOK_EVENT_JOB_RUN_CREATED1Triggered when a job run is created.
ACCOUNT_HOOK_EVENT_JOB_RUN_FAILED2Triggered when a job run fails.
ACCOUNT_HOOK_EVENT_JOB_RUN_SUCCEEDED3Triggered when a job run succeeds.

Services

AccountHookService

GetAccountHooks

MethodGetAccountHooks
RequestGetAccountHooksRequest
ResponseGetAccountHooksResponse
DescriptionRetrieves all account hooks.

GetAccountHook

MethodGetAccountHook
RequestGetAccountHookRequest
ResponseGetAccountHookResponse
DescriptionRetrieves a specific account hook.

CreateAccountHook

MethodCreateAccountHook
RequestCreateAccountHookRequest
ResponseCreateAccountHookResponse
DescriptionCreates a new account hook.

UpdateAccountHook

MethodUpdateAccountHook
RequestUpdateAccountHookRequest
ResponseUpdateAccountHookResponse
DescriptionUpdates an existing account hook.

DeleteAccountHook

MethodDeleteAccountHook
RequestDeleteAccountHookRequest
ResponseDeleteAccountHookResponse
DescriptionDeletes an account hook.

IsAccountHookNameAvailable

MethodIsAccountHookNameAvailable
RequestIsAccountHookNameAvailableRequest
ResponseIsAccountHookNameAvailableResponse
DescriptionChecks if an account hook name is available.

SetAccountHookEnabled

MethodSetAccountHookEnabled
RequestSetAccountHookEnabledRequest
ResponseSetAccountHookEnabledResponse
DescriptionEnables or disables an account hook.

GetActiveAccountHooksByEvent

MethodGetActiveAccountHooksByEvent
RequestGetActiveAccountHooksByEventRequest
ResponseGetActiveAccountHooksByEventResponse
DescriptionRetrieves all active account hooks for a specific event.

GetSlackConnectionUrl

MethodGetSlackConnectionUrl
RequestGetSlackConnectionUrlRequest
ResponseGetSlackConnectionUrlResponse
DescriptionRetrieves the Slack connection url that allows a user to connect their Slack workspace to Neosync.

HandleSlackOAuthCallback

MethodHandleSlackOAuthCallback
RequestHandleSlackOAuthCallbackRequest
ResponseHandleSlackOAuthCallbackResponse
DescriptionHandles the Slack OAuth callback.

TestSlackConnection

MethodTestSlackConnection
RequestTestSlackConnectionRequest
ResponseTestSlackConnectionResponse
DescriptionTests the Slack connection by using the stored access token to initiate an auth test api call to slack.

SendSlackMessage

MethodSendSlackMessage
RequestSendSlackMessageRequest
ResponseSendSlackMessageResponse
DescriptionFor sending slack messages from the worker.