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