platform-webhooks.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // @ts-nocheck
  2. import { RegistryDefinations } from '../types'
  3. /**
  4. * Shortcuts scoped to the Platform Webhooks pages (org and project level).
  5. *
  6. * List-page actions (focus search, create new endpoint) reuse the shared
  7. * `list-page` IDs directly — only webhook-specific actions live here.
  8. */
  9. export const PLATFORM_WEBHOOKS_SHORTCUT_IDS = {
  10. PLATFORM_WEBHOOKS_EDIT_ENDPOINT: 'platform-webhooks.edit-endpoint',
  11. PLATFORM_WEBHOOKS_COPY_ENDPOINT_URL: 'platform-webhooks.copy-endpoint-url',
  12. PLATFORM_WEBHOOKS_RETRY_DELIVERY: 'platform-webhooks.retry-delivery',
  13. PLATFORM_WEBHOOKS_COPY_PAYLOAD: 'platform-webhooks.copy-payload',
  14. }
  15. export type PlatformWebhooksShortcutId =
  16. (typeof PLATFORM_WEBHOOKS_SHORTCUT_IDS)[keyof typeof PLATFORM_WEBHOOKS_SHORTCUT_IDS]
  17. export const platformWebhooksRegistry: RegistryDefinations<PlatformWebhooksShortcutId> = {
  18. [PLATFORM_WEBHOOKS_SHORTCUT_IDS.PLATFORM_WEBHOOKS_EDIT_ENDPOINT]: {
  19. id: PLATFORM_WEBHOOKS_SHORTCUT_IDS.PLATFORM_WEBHOOKS_EDIT_ENDPOINT,
  20. label: 'Edit endpoint',
  21. sequence: ['Shift+E'],
  22. showInSettings: false,
  23. options: { ignoreInputs: true, registerInCommandMenu: true },
  24. },
  25. [PLATFORM_WEBHOOKS_SHORTCUT_IDS.PLATFORM_WEBHOOKS_COPY_ENDPOINT_URL]: {
  26. id: PLATFORM_WEBHOOKS_SHORTCUT_IDS.PLATFORM_WEBHOOKS_COPY_ENDPOINT_URL,
  27. label: 'Copy endpoint URL',
  28. sequence: ['Shift+U'],
  29. showInSettings: false,
  30. options: { ignoreInputs: true, registerInCommandMenu: true },
  31. },
  32. [PLATFORM_WEBHOOKS_SHORTCUT_IDS.PLATFORM_WEBHOOKS_RETRY_DELIVERY]: {
  33. id: PLATFORM_WEBHOOKS_SHORTCUT_IDS.PLATFORM_WEBHOOKS_RETRY_DELIVERY,
  34. label: 'Retry delivery',
  35. sequence: ['Shift+R'],
  36. showInSettings: false,
  37. options: { ignoreInputs: true, registerInCommandMenu: true },
  38. },
  39. [PLATFORM_WEBHOOKS_SHORTCUT_IDS.PLATFORM_WEBHOOKS_COPY_PAYLOAD]: {
  40. id: PLATFORM_WEBHOOKS_SHORTCUT_IDS.PLATFORM_WEBHOOKS_COPY_PAYLOAD,
  41. label: 'Copy payload',
  42. sequence: ['Shift+C'],
  43. showInSettings: false,
  44. options: { ignoreInputs: true, registerInCommandMenu: true },
  45. },
  46. }