org-settings-nav.ts100 lines · main
1// @ts-nocheck
2import { SHORTCUT_REFERENCE_GROUPS } from '../referenceGroups'
3import { RegistryDefinations } from '../types'
4
5/**
6 * Contextual chords for jumping between Organization Settings sub-pages — `S + <letter>`.
7 *
8 * Active only while OrganizationSettingsLayout is mounted (i.e. the user is somewhere
9 * under `/org/<slug>/general|security|sso|apps|...`). Mirrors the project-settings
10 * pattern: `S` for Settings, scoped to the layout so it doesn't burn a global key.
11 */
12export const ORG_SETTINGS_NAV_SHORTCUT_IDS = {
13 NAV_ORG_SETTINGS_GENERAL: 'nav.org-settings-general',
14 NAV_ORG_SETTINGS_SECURITY: 'nav.org-settings-security',
15 NAV_ORG_SETTINGS_SSO: 'nav.org-settings-sso',
16 NAV_ORG_SETTINGS_APPS: 'nav.org-settings-apps',
17 NAV_ORG_SETTINGS_PRIVATE_APPS: 'nav.org-settings-private-apps',
18 NAV_ORG_SETTINGS_WEBHOOKS: 'nav.org-settings-webhooks',
19 NAV_ORG_SETTINGS_AUDIT: 'nav.org-settings-audit',
20 NAV_ORG_SETTINGS_AUDIT_LOG_DRAINS: 'nav.org-settings-audit-log-drains',
21 NAV_ORG_SETTINGS_DOCUMENTS: 'nav.org-settings-documents',
22} as const
23
24export type OrgSettingsNavShortcutId =
25 (typeof ORG_SETTINGS_NAV_SHORTCUT_IDS)[keyof typeof ORG_SETTINGS_NAV_SHORTCUT_IDS]
26
27export const orgSettingsNavRegistry: RegistryDefinations<OrgSettingsNavShortcutId> = {
28 [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_GENERAL]: {
29 id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_GENERAL,
30 label: 'Go to General',
31 sequence: ['S', 'G'],
32 showInSettings: false,
33 referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
34 options: { ignoreInputs: true },
35 },
36 [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_SECURITY]: {
37 id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_SECURITY,
38 label: 'Go to Security',
39 sequence: ['S', 'C'],
40 showInSettings: false,
41 referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
42 options: { ignoreInputs: true },
43 },
44 [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_SSO]: {
45 id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_SSO,
46 label: 'Go to SSO',
47 sequence: ['S', 'S'],
48 showInSettings: false,
49 referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
50 options: { ignoreInputs: true },
51 },
52 [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_APPS]: {
53 id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_APPS,
54 label: 'Go to OAuth apps',
55 sequence: ['S', 'A'],
56 showInSettings: false,
57 referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
58 options: { ignoreInputs: true },
59 },
60 [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_PRIVATE_APPS]: {
61 id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_PRIVATE_APPS,
62 label: 'Go to Private apps',
63 sequence: ['S', 'P'],
64 showInSettings: false,
65 referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
66 options: { ignoreInputs: true },
67 },
68 [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_WEBHOOKS]: {
69 id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_WEBHOOKS,
70 label: 'Go to Webhooks',
71 sequence: ['S', 'W'],
72 showInSettings: false,
73 referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
74 options: { ignoreInputs: true },
75 },
76 [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_AUDIT]: {
77 id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_AUDIT,
78 label: 'Go to Audit logs',
79 sequence: ['S', 'L'],
80 showInSettings: false,
81 referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
82 options: { ignoreInputs: true },
83 },
84 [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_AUDIT_LOG_DRAINS]: {
85 id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_AUDIT_LOG_DRAINS,
86 label: 'Go to Audit log drains',
87 sequence: ['S', 'N'],
88 showInSettings: false,
89 referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
90 options: { ignoreInputs: true },
91 },
92 [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_DOCUMENTS]: {
93 id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_DOCUMENTS,
94 label: 'Go to Legal documents',
95 sequence: ['S', 'D'],
96 showInSettings: false,
97 referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
98 options: { ignoreInputs: true },
99 },
100}