Hooks.constants.ts 929 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { BASE_PATH, IS_PLATFORM } from '@/lib/constants'
  2. export const HOOK_EVENTS = [
  3. {
  4. label: 'Insert',
  5. value: 'INSERT',
  6. description: 'Any insert operation on the table',
  7. },
  8. {
  9. label: 'Update',
  10. value: 'UPDATE',
  11. description: 'Any update operation, of any column in the table',
  12. },
  13. {
  14. label: 'Delete',
  15. value: 'DELETE',
  16. description: 'Any deletion of a record',
  17. },
  18. ]
  19. export const AVAILABLE_WEBHOOK_TYPES = [
  20. {
  21. value: 'http_request',
  22. icon: `${BASE_PATH}/img/function-providers/http-request.png`,
  23. label: 'HTTP Request',
  24. description: 'Send an HTTP request to any URL.',
  25. },
  26. ...(IS_PLATFORM
  27. ? [
  28. {
  29. value: 'briven_function',
  30. icon: `${BASE_PATH}/img/function-providers/briven-severless-function.png`,
  31. label: 'Briven Edge Functions',
  32. description: 'Choose a Briven edge function to run.',
  33. },
  34. ]
  35. : []),
  36. ]