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