@burdenoff/microfe-security 2026.510.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/README.md +223 -0
  2. package/dist/dev/main.d.ts +2 -0
  3. package/dist/dev/main.d.ts.map +1 -0
  4. package/dist/generated/global-operations.d.ts +2 -0
  5. package/dist/generated/global-operations.d.ts.map +1 -0
  6. package/dist/generated/global-types.d.ts +21069 -0
  7. package/dist/generated/global-types.d.ts.map +1 -0
  8. package/dist/generated/wspace-operations.d.ts +1461 -0
  9. package/dist/generated/wspace-operations.d.ts.map +1 -0
  10. package/dist/generated/wspace-operations.js +695 -0
  11. package/dist/generated/wspace-operations.js.map +1 -0
  12. package/dist/generated/wspace-types.d.ts +55148 -0
  13. package/dist/generated/wspace-types.d.ts.map +1 -0
  14. package/dist/generated/wspace-types.js +8 -0
  15. package/dist/generated/wspace-types.js.map +1 -0
  16. package/dist/index.d.ts +6 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +7 -0
  19. package/dist/node_modules/clsx/dist/clsx.js +18 -0
  20. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  21. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
  22. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  23. package/dist/security/SecurityAdminRoot.d.ts +19 -0
  24. package/dist/security/SecurityAdminRoot.d.ts.map +1 -0
  25. package/dist/security/SecurityAdminRoot.js +14 -0
  26. package/dist/security/SecurityAdminRoot.js.map +1 -0
  27. package/dist/security/SecurityRoot.d.ts +18 -0
  28. package/dist/security/SecurityRoot.d.ts.map +1 -0
  29. package/dist/security/SecurityRoot.js +14 -0
  30. package/dist/security/SecurityRoot.js.map +1 -0
  31. package/dist/security/SecurityRootBase.d.ts +19 -0
  32. package/dist/security/SecurityRootBase.d.ts.map +1 -0
  33. package/dist/security/SecurityRootBase.js +56 -0
  34. package/dist/security/SecurityRootBase.js.map +1 -0
  35. package/dist/security/SecurityUserRoot.d.ts +18 -0
  36. package/dist/security/SecurityUserRoot.d.ts.map +1 -0
  37. package/dist/security/SecurityUserRoot.js +14 -0
  38. package/dist/security/SecurityUserRoot.js.map +1 -0
  39. package/dist/security/components/ActivityTimeline.d.ts +12 -0
  40. package/dist/security/components/ActivityTimeline.d.ts.map +1 -0
  41. package/dist/security/components/ActivityTimeline.js +109 -0
  42. package/dist/security/components/ActivityTimeline.js.map +1 -0
  43. package/dist/security/components/AuditLogTable.d.ts +12 -0
  44. package/dist/security/components/AuditLogTable.d.ts.map +1 -0
  45. package/dist/security/components/BulkActionBar.d.ts +9 -0
  46. package/dist/security/components/BulkActionBar.d.ts.map +1 -0
  47. package/dist/security/components/BulkActionBar.js +94 -0
  48. package/dist/security/components/BulkActionBar.js.map +1 -0
  49. package/dist/security/components/ConfirmDialog.d.ts +19 -0
  50. package/dist/security/components/ConfirmDialog.d.ts.map +1 -0
  51. package/dist/security/components/ConfirmDialog.js +45 -0
  52. package/dist/security/components/ConfirmDialog.js.map +1 -0
  53. package/dist/security/components/CopyButton.d.ts +20 -0
  54. package/dist/security/components/CopyButton.d.ts.map +1 -0
  55. package/dist/security/components/CopyButton.js +48 -0
  56. package/dist/security/components/CopyButton.js.map +1 -0
  57. package/dist/security/components/ExportDialog.d.ts +7 -0
  58. package/dist/security/components/ExportDialog.d.ts.map +1 -0
  59. package/dist/security/components/ExportDialog.js +146 -0
  60. package/dist/security/components/ExportDialog.js.map +1 -0
  61. package/dist/security/components/ImportWizard.d.ts +7 -0
  62. package/dist/security/components/ImportWizard.d.ts.map +1 -0
  63. package/dist/security/components/ImportWizard.js +276 -0
  64. package/dist/security/components/ImportWizard.js.map +1 -0
  65. package/dist/security/components/PageLayout.d.ts +23 -0
  66. package/dist/security/components/PageLayout.d.ts.map +1 -0
  67. package/dist/security/components/PageLayout.js +26 -0
  68. package/dist/security/components/PageLayout.js.map +1 -0
  69. package/dist/security/components/PasswordGenerator.d.ts +17 -0
  70. package/dist/security/components/PasswordGenerator.d.ts.map +1 -0
  71. package/dist/security/components/PasswordGenerator.js +128 -0
  72. package/dist/security/components/PasswordGenerator.js.map +1 -0
  73. package/dist/security/components/ProviderSetupWizard.d.ts +13 -0
  74. package/dist/security/components/ProviderSetupWizard.d.ts.map +1 -0
  75. package/dist/security/components/RotationStatusBadge.d.ts +13 -0
  76. package/dist/security/components/RotationStatusBadge.d.ts.map +1 -0
  77. package/dist/security/components/RotationStatusBadge.js +32 -0
  78. package/dist/security/components/RotationStatusBadge.js.map +1 -0
  79. package/dist/security/components/SecretFormFields.d.ts +23 -0
  80. package/dist/security/components/SecretFormFields.d.ts.map +1 -0
  81. package/dist/security/components/SecretFormFields.js +156 -0
  82. package/dist/security/components/SecretFormFields.js.map +1 -0
  83. package/dist/security/components/SecretRow.d.ts +13 -0
  84. package/dist/security/components/SecretRow.d.ts.map +1 -0
  85. package/dist/security/components/SecretRow.js +88 -0
  86. package/dist/security/components/SecretRow.js.map +1 -0
  87. package/dist/security/components/SecretTypeBadge.d.ts +13 -0
  88. package/dist/security/components/SecretTypeBadge.d.ts.map +1 -0
  89. package/dist/security/components/SecretTypeBadge.js +19 -0
  90. package/dist/security/components/SecretTypeBadge.js.map +1 -0
  91. package/dist/security/components/SecretTypeIcon.d.ts +14 -0
  92. package/dist/security/components/SecretTypeIcon.d.ts.map +1 -0
  93. package/dist/security/components/SecretTypeIcon.js +28 -0
  94. package/dist/security/components/SecretTypeIcon.js.map +1 -0
  95. package/dist/security/components/SecretValueDisplay.d.ts +26 -0
  96. package/dist/security/components/SecretValueDisplay.d.ts.map +1 -0
  97. package/dist/security/components/SecretValueDisplay.js +66 -0
  98. package/dist/security/components/SecretValueDisplay.js.map +1 -0
  99. package/dist/security/components/SecurityPermissionGuard.d.ts +16 -0
  100. package/dist/security/components/SecurityPermissionGuard.d.ts.map +1 -0
  101. package/dist/security/components/SecurityPermissionGuard.js +21 -0
  102. package/dist/security/components/SecurityPermissionGuard.js.map +1 -0
  103. package/dist/security/components/SecurityScoreCard.d.ts +12 -0
  104. package/dist/security/components/SecurityScoreCard.d.ts.map +1 -0
  105. package/dist/security/components/SecurityScoreCard.js +82 -0
  106. package/dist/security/components/SecurityScoreCard.js.map +1 -0
  107. package/dist/security/components/VaultCard.d.ts +13 -0
  108. package/dist/security/components/VaultCard.d.ts.map +1 -0
  109. package/dist/security/components/VaultCard.js +94 -0
  110. package/dist/security/components/VaultCard.js.map +1 -0
  111. package/dist/security/components/VaultFormFields.d.ts +17 -0
  112. package/dist/security/components/VaultFormFields.d.ts.map +1 -0
  113. package/dist/security/components/VaultFormFields.js +110 -0
  114. package/dist/security/components/VaultFormFields.js.map +1 -0
  115. package/dist/security/components/VaultShareDialog.d.ts +16 -0
  116. package/dist/security/components/VaultShareDialog.d.ts.map +1 -0
  117. package/dist/security/components/VaultShareDialog.js +84 -0
  118. package/dist/security/components/VaultShareDialog.js.map +1 -0
  119. package/dist/security/components/ui.d.ts +55 -0
  120. package/dist/security/components/ui.d.ts.map +1 -0
  121. package/dist/security/components/ui.js +87 -0
  122. package/dist/security/components/ui.js.map +1 -0
  123. package/dist/security/config/navigation.d.ts +10 -0
  124. package/dist/security/config/navigation.d.ts.map +1 -0
  125. package/dist/security/config/navigation.js +97 -0
  126. package/dist/security/config/navigation.js.map +1 -0
  127. package/dist/security/constants/featureFlags.d.ts +36 -0
  128. package/dist/security/constants/featureFlags.d.ts.map +1 -0
  129. package/dist/security/constants/featureFlags.js +18 -0
  130. package/dist/security/constants/featureFlags.js.map +1 -0
  131. package/dist/security/constants/permissions.d.ts +11 -0
  132. package/dist/security/constants/permissions.d.ts.map +1 -0
  133. package/dist/security/constants/permissions.js +72 -0
  134. package/dist/security/constants/permissions.js.map +1 -0
  135. package/dist/security/constants/providers.d.ts +12 -0
  136. package/dist/security/constants/providers.d.ts.map +1 -0
  137. package/dist/security/constants/providers.js +45 -0
  138. package/dist/security/constants/providers.js.map +1 -0
  139. package/dist/security/constants/secretTypes.d.ts +16 -0
  140. package/dist/security/constants/secretTypes.d.ts.map +1 -0
  141. package/dist/security/constants/secretTypes.js +66 -0
  142. package/dist/security/constants/secretTypes.js.map +1 -0
  143. package/dist/security/hooks/useAuditLog.d.ts +4 -0
  144. package/dist/security/hooks/useAuditLog.d.ts.map +1 -0
  145. package/dist/security/hooks/useAuditLog.js +20 -0
  146. package/dist/security/hooks/useAuditLog.js.map +1 -0
  147. package/dist/security/hooks/useBulkSecretOperations.d.ts +7 -0
  148. package/dist/security/hooks/useBulkSecretOperations.d.ts.map +1 -0
  149. package/dist/security/hooks/useBulkSecretOperations.js +22 -0
  150. package/dist/security/hooks/useBulkSecretOperations.js.map +1 -0
  151. package/dist/security/hooks/useClipboardAutoClear.d.ts +10 -0
  152. package/dist/security/hooks/useClipboardAutoClear.d.ts.map +1 -0
  153. package/dist/security/hooks/useImportExport.d.ts +55 -0
  154. package/dist/security/hooks/useImportExport.d.ts.map +1 -0
  155. package/dist/security/hooks/useImportExport.js +201 -0
  156. package/dist/security/hooks/useImportExport.js.map +1 -0
  157. package/dist/security/hooks/usePasswordGenerator.d.ts +18 -0
  158. package/dist/security/hooks/usePasswordGenerator.d.ts.map +1 -0
  159. package/dist/security/hooks/useProviderQueries.d.ts +8 -0
  160. package/dist/security/hooks/useProviderQueries.d.ts.map +1 -0
  161. package/dist/security/hooks/useProviderQueries.js +30 -0
  162. package/dist/security/hooks/useProviderQueries.js.map +1 -0
  163. package/dist/security/hooks/useSecretQueries.d.ts +10 -0
  164. package/dist/security/hooks/useSecretQueries.d.ts.map +1 -0
  165. package/dist/security/hooks/useSecretQueries.js +36 -0
  166. package/dist/security/hooks/useSecretQueries.js.map +1 -0
  167. package/dist/security/hooks/useSecretValue.d.ts +12 -0
  168. package/dist/security/hooks/useSecretValue.d.ts.map +1 -0
  169. package/dist/security/hooks/useSecretValue.js +29 -0
  170. package/dist/security/hooks/useSecretValue.js.map +1 -0
  171. package/dist/security/hooks/useSecurityCacheInvalidation.d.ts +2 -0
  172. package/dist/security/hooks/useSecurityCacheInvalidation.d.ts.map +1 -0
  173. package/dist/security/hooks/useSecurityCacheInvalidation.js +52 -0
  174. package/dist/security/hooks/useSecurityCacheInvalidation.js.map +1 -0
  175. package/dist/security/hooks/useSecurityDashboard.d.ts +21 -0
  176. package/dist/security/hooks/useSecurityDashboard.d.ts.map +1 -0
  177. package/dist/security/hooks/useSecurityDashboard.js +34 -0
  178. package/dist/security/hooks/useSecurityDashboard.js.map +1 -0
  179. package/dist/security/hooks/useSecurityEventEmitter.d.ts +14 -0
  180. package/dist/security/hooks/useSecurityEventEmitter.d.ts.map +1 -0
  181. package/dist/security/hooks/useSecurityEventEmitter.js +14 -0
  182. package/dist/security/hooks/useSecurityEventEmitter.js.map +1 -0
  183. package/dist/security/hooks/useSecuritySubscriptions.d.ts +21 -0
  184. package/dist/security/hooks/useSecuritySubscriptions.d.ts.map +1 -0
  185. package/dist/security/hooks/useSecuritySubscriptions.js +44 -0
  186. package/dist/security/hooks/useSecuritySubscriptions.js.map +1 -0
  187. package/dist/security/hooks/useVaultQueries.d.ts +14 -0
  188. package/dist/security/hooks/useVaultQueries.d.ts.map +1 -0
  189. package/dist/security/hooks/useVaultQueries.js +57 -0
  190. package/dist/security/hooks/useVaultQueries.js.map +1 -0
  191. package/dist/security/index.d.ts +31 -0
  192. package/dist/security/index.d.ts.map +1 -0
  193. package/dist/security/index.js +5 -0
  194. package/dist/security/pages/AccessReviewPage.d.ts +2 -0
  195. package/dist/security/pages/AccessReviewPage.d.ts.map +1 -0
  196. package/dist/security/pages/AccessReviewPage.js +154 -0
  197. package/dist/security/pages/AccessReviewPage.js.map +1 -0
  198. package/dist/security/pages/AuditLogPage.d.ts +2 -0
  199. package/dist/security/pages/AuditLogPage.d.ts.map +1 -0
  200. package/dist/security/pages/AuditLogPage.js +186 -0
  201. package/dist/security/pages/AuditLogPage.js.map +1 -0
  202. package/dist/security/pages/ImportExportPage.d.ts +2 -0
  203. package/dist/security/pages/ImportExportPage.d.ts.map +1 -0
  204. package/dist/security/pages/ImportExportPage.js +47 -0
  205. package/dist/security/pages/ImportExportPage.js.map +1 -0
  206. package/dist/security/pages/ProviderDetailPage.d.ts +2 -0
  207. package/dist/security/pages/ProviderDetailPage.d.ts.map +1 -0
  208. package/dist/security/pages/ProviderDetailPage.js +314 -0
  209. package/dist/security/pages/ProviderDetailPage.js.map +1 -0
  210. package/dist/security/pages/ProvidersPage.d.ts +2 -0
  211. package/dist/security/pages/ProvidersPage.d.ts.map +1 -0
  212. package/dist/security/pages/ProvidersPage.js +162 -0
  213. package/dist/security/pages/ProvidersPage.js.map +1 -0
  214. package/dist/security/pages/SecretCreatePage.d.ts +2 -0
  215. package/dist/security/pages/SecretCreatePage.d.ts.map +1 -0
  216. package/dist/security/pages/SecretCreatePage.js +144 -0
  217. package/dist/security/pages/SecretCreatePage.js.map +1 -0
  218. package/dist/security/pages/SecretDetailPage.d.ts +2 -0
  219. package/dist/security/pages/SecretDetailPage.d.ts.map +1 -0
  220. package/dist/security/pages/SecretDetailPage.js +479 -0
  221. package/dist/security/pages/SecretDetailPage.js.map +1 -0
  222. package/dist/security/pages/SecurityDashboardPage.d.ts +2 -0
  223. package/dist/security/pages/SecurityDashboardPage.d.ts.map +1 -0
  224. package/dist/security/pages/SecurityDashboardPage.js +145 -0
  225. package/dist/security/pages/SecurityDashboardPage.js.map +1 -0
  226. package/dist/security/pages/VaultCreatePage.d.ts +2 -0
  227. package/dist/security/pages/VaultCreatePage.d.ts.map +1 -0
  228. package/dist/security/pages/VaultCreatePage.js +87 -0
  229. package/dist/security/pages/VaultCreatePage.js.map +1 -0
  230. package/dist/security/pages/VaultDetailPage.d.ts +2 -0
  231. package/dist/security/pages/VaultDetailPage.d.ts.map +1 -0
  232. package/dist/security/pages/VaultDetailPage.js +292 -0
  233. package/dist/security/pages/VaultDetailPage.js.map +1 -0
  234. package/dist/security/pages/VaultLandingPage.d.ts +10 -0
  235. package/dist/security/pages/VaultLandingPage.d.ts.map +1 -0
  236. package/dist/security/pages/VaultLandingPage.js +81 -0
  237. package/dist/security/pages/VaultLandingPage.js.map +1 -0
  238. package/dist/security/pages/VaultSettingsPage.d.ts +2 -0
  239. package/dist/security/pages/VaultSettingsPage.d.ts.map +1 -0
  240. package/dist/security/pages/VaultSettingsPage.js +366 -0
  241. package/dist/security/pages/VaultSettingsPage.js.map +1 -0
  242. package/dist/security/pages/VaultsDashboardPage.d.ts +2 -0
  243. package/dist/security/pages/VaultsDashboardPage.d.ts.map +1 -0
  244. package/dist/security/pages/VaultsDashboardPage.js +280 -0
  245. package/dist/security/pages/VaultsDashboardPage.js.map +1 -0
  246. package/dist/security/providers/SecurityProvider.d.ts +13 -0
  247. package/dist/security/providers/SecurityProvider.d.ts.map +1 -0
  248. package/dist/security/providers/SecurityProvider.js +103 -0
  249. package/dist/security/providers/SecurityProvider.js.map +1 -0
  250. package/dist/security/routes/SecurityAdminRoutes.d.ts +7 -0
  251. package/dist/security/routes/SecurityAdminRoutes.d.ts.map +1 -0
  252. package/dist/security/routes/SecurityAdminRoutes.js +91 -0
  253. package/dist/security/routes/SecurityAdminRoutes.js.map +1 -0
  254. package/dist/security/routes/SecurityRoutes.d.ts +19 -0
  255. package/dist/security/routes/SecurityRoutes.d.ts.map +1 -0
  256. package/dist/security/routes/SecurityRoutes.js +91 -0
  257. package/dist/security/routes/SecurityRoutes.js.map +1 -0
  258. package/dist/security/routes/SecurityUserRoutes.d.ts +11 -0
  259. package/dist/security/routes/SecurityUserRoutes.d.ts.map +1 -0
  260. package/dist/security/routes/SecurityUserRoutes.js +53 -0
  261. package/dist/security/routes/SecurityUserRoutes.js.map +1 -0
  262. package/dist/security/routes/routeUtils.d.ts +28 -0
  263. package/dist/security/routes/routeUtils.d.ts.map +1 -0
  264. package/dist/security/routes/routeUtils.js +60 -0
  265. package/dist/security/routes/routeUtils.js.map +1 -0
  266. package/dist/security/store/securityStore.d.ts +35 -0
  267. package/dist/security/store/securityStore.d.ts.map +1 -0
  268. package/dist/security/store/securityStore.js +62 -0
  269. package/dist/security/store/securityStore.js.map +1 -0
  270. package/dist/security/types/index.d.ts +283 -0
  271. package/dist/security/types/index.d.ts.map +1 -0
  272. package/dist/security/utils/clipboard.d.ts +20 -0
  273. package/dist/security/utils/clipboard.d.ts.map +1 -0
  274. package/dist/security/utils/clipboard.js +23 -0
  275. package/dist/security/utils/clipboard.js.map +1 -0
  276. package/dist/security/utils/cn.d.ts +7 -0
  277. package/dist/security/utils/cn.d.ts.map +1 -0
  278. package/dist/security/utils/cn.js +10 -0
  279. package/dist/security/utils/cn.js.map +1 -0
  280. package/dist/security/utils/fileParser.d.ts +18 -0
  281. package/dist/security/utils/fileParser.d.ts.map +1 -0
  282. package/dist/security/utils/fileParser.js +108 -0
  283. package/dist/security/utils/fileParser.js.map +1 -0
  284. package/dist/security/utils/i18n.d.ts +5 -0
  285. package/dist/security/utils/i18n.d.ts.map +1 -0
  286. package/dist/security/utils/i18n.js +9 -0
  287. package/dist/security/utils/i18n.js.map +1 -0
  288. package/dist/security/utils/importParsers.d.ts +30 -0
  289. package/dist/security/utils/importParsers.d.ts.map +1 -0
  290. package/dist/security/utils/mappers.d.ts +35 -0
  291. package/dist/security/utils/mappers.d.ts.map +1 -0
  292. package/dist/security/utils/passwordGenerator.d.ts +22 -0
  293. package/dist/security/utils/passwordGenerator.d.ts.map +1 -0
  294. package/dist/security/utils/passwordGenerator.js +61 -0
  295. package/dist/security/utils/passwordGenerator.js.map +1 -0
  296. package/dist/utils/nativeBridge.d.ts +3 -0
  297. package/dist/utils/nativeBridge.d.ts.map +1 -0
  298. package/dist/utils/nativeBridge.js +2 -0
  299. package/package.json +106 -0
@@ -0,0 +1,283 @@
1
+ /**
2
+ * Navigation item for shell integration
3
+ */
4
+ export interface NavItem {
5
+ id: string;
6
+ label: string;
7
+ path: string;
8
+ icon?: React.ReactNode;
9
+ badge?: number;
10
+ order?: number;
11
+ group?: string;
12
+ visible?: boolean;
13
+ /** Nested children items for dropdown menus */
14
+ children?: NavItem[];
15
+ }
16
+ /**
17
+ * Footer item for shell integration
18
+ */
19
+ export interface FooterItem {
20
+ id: string;
21
+ label: string;
22
+ type: 'status' | 'action';
23
+ order?: number;
24
+ section: 'left' | 'center' | 'right';
25
+ }
26
+ /**
27
+ * Base microfrontend root props
28
+ */
29
+ export interface MicrofrontendRootProps {
30
+ }
31
+ /**
32
+ * Props for the SecurityRoot component
33
+ */
34
+ export interface SecurityRootProps extends MicrofrontendRootProps {
35
+ /** Base path for the security microfrontend */
36
+ basePath?: string;
37
+ /** Workspace ID for scoping operations */
38
+ workspaceId?: string;
39
+ /** API Gateway URL for GraphQL requests */
40
+ apiGatewayUrl?: string;
41
+ /** Authentication token for API requests (platform identity JWT) */
42
+ authToken?: string;
43
+ /**
44
+ * Workspace token for workspace-scoped API requests (workspace access JWT).
45
+ * The gateway requires both authToken (Authorization) and workspaceToken
46
+ * (X-Workspace-Authorization) for workspace operations.
47
+ */
48
+ workspaceToken?: string;
49
+ /** Navigation function provided by the shell */
50
+ navigate?: (path: string) => void;
51
+ /** Optional shell callback for auth/session failures */
52
+ onAuthError?: () => void | Promise<void>;
53
+ /** Optional shell callback to lazily obtain a workspace token */
54
+ getWorkspaceToken?: () => Promise<string | null>;
55
+ /** Current user information */
56
+ currentUser?: {
57
+ id: string;
58
+ email: string;
59
+ firstName?: string;
60
+ lastName?: string;
61
+ avatarUrl?: string;
62
+ };
63
+ /** Optional function to register navigation items with the shell */
64
+ registerNavItems?: (items: NavItem | NavItem[]) => () => void;
65
+ /** Optional function to register footer items with the shell */
66
+ registerFooterItems?: (items: FooterItem | FooterItem[]) => () => void;
67
+ }
68
+ /**
69
+ * Vault entity - a container for secrets
70
+ */
71
+ export interface Vault {
72
+ id: string;
73
+ name: string;
74
+ slug: string;
75
+ description?: string;
76
+ icon?: string;
77
+ status: VaultStatus;
78
+ secretCount: number;
79
+ memberCount: number;
80
+ lastActivityAt?: string;
81
+ createdBy: {
82
+ id: string;
83
+ name: string;
84
+ };
85
+ createdAt: string;
86
+ updatedAt: string;
87
+ }
88
+ export interface SecretLabel {
89
+ id: string;
90
+ label: string;
91
+ color?: string;
92
+ createdAt: string;
93
+ }
94
+ /**
95
+ * Secret entity stored within a vault
96
+ */
97
+ export interface Secret {
98
+ id: string;
99
+ vaultId: string;
100
+ name: string;
101
+ key: string;
102
+ description?: string;
103
+ type: SecretType;
104
+ tags: string[];
105
+ labels: SecretLabel[];
106
+ metadata?: Record<string, unknown>;
107
+ expiresAt?: string;
108
+ lastRotatedAt?: string;
109
+ lastAccessedAt?: string;
110
+ version: number;
111
+ versionCount: number;
112
+ status: SecretStatus;
113
+ createdBy: string;
114
+ createdAt: string;
115
+ updatedAt: string;
116
+ }
117
+ /**
118
+ * Decrypted secret value (ephemeral, never persisted in client state)
119
+ */
120
+ export interface SecretValue {
121
+ secretId: string;
122
+ value: string;
123
+ version: number;
124
+ }
125
+ /**
126
+ * Secret version for history tracking
127
+ */
128
+ export interface SecretVersion {
129
+ id: string;
130
+ secretId: string;
131
+ version: number;
132
+ createdBy: {
133
+ id: string;
134
+ name: string;
135
+ };
136
+ createdAt: string;
137
+ comment?: string;
138
+ }
139
+ /**
140
+ * Vault member with access role
141
+ */
142
+ export interface VaultMember {
143
+ id: string;
144
+ vaultId: string;
145
+ actorId: string;
146
+ actorName: string;
147
+ actorEmail: string;
148
+ avatarUrl?: string;
149
+ role: VaultRole;
150
+ addedBy: {
151
+ id: string;
152
+ name: string;
153
+ };
154
+ addedAt: string;
155
+ }
156
+ /**
157
+ * Audit log entry
158
+ */
159
+ export interface AuditLogEntry {
160
+ id: string;
161
+ vaultId?: string;
162
+ secretId?: string;
163
+ action: AuditAction;
164
+ actorId: string;
165
+ actorName: string;
166
+ actorEmail?: string;
167
+ resourceType: 'vault' | 'secret' | 'member' | 'provider';
168
+ resourceId: string;
169
+ resourceName?: string;
170
+ details?: Record<string, unknown>;
171
+ ipAddress?: string;
172
+ timestamp: string;
173
+ }
174
+ /**
175
+ * External provider connection (e.g., HashiCorp Vault, AWS Secrets Manager)
176
+ */
177
+ export interface ProviderConnection {
178
+ id: string;
179
+ name: string;
180
+ type: ProviderType;
181
+ status: ProviderStatus;
182
+ config: Record<string, unknown>;
183
+ lastSyncAt?: string;
184
+ syncedSecretCount: number;
185
+ createdAt: string;
186
+ updatedAt: string;
187
+ }
188
+ /**
189
+ * Security dashboard summary
190
+ */
191
+ export interface SecurityDashboard {
192
+ totalVaults: number;
193
+ totalSecrets: number;
194
+ healthScore: number;
195
+ weakSecrets: Secret[];
196
+ expiringSecrets: Secret[];
197
+ unusedSecrets: Secret[];
198
+ overdueRotations: Secret[];
199
+ recentActivity: AuditLogEntry[];
200
+ }
201
+ /**
202
+ * Rotation policy configuration
203
+ */
204
+ export interface RotationPolicy {
205
+ enabled: boolean;
206
+ intervalDays: number;
207
+ notifyBeforeDays: number;
208
+ autoRotate: boolean;
209
+ }
210
+ /**
211
+ * Import result
212
+ */
213
+ export interface ImportResult {
214
+ total: number;
215
+ imported: number;
216
+ skipped: number;
217
+ errors: Array<{
218
+ name: string;
219
+ reason: string;
220
+ }>;
221
+ }
222
+ /**
223
+ * Vault filter options
224
+ */
225
+ export interface VaultFilter {
226
+ search: string;
227
+ status: VaultStatus | 'all';
228
+ sortBy: 'name' | 'createdAt' | 'updatedAt' | 'secretCount';
229
+ sortOrder: 'asc' | 'desc';
230
+ }
231
+ /**
232
+ * Secret filter options
233
+ */
234
+ export interface SecretFilter {
235
+ search: string;
236
+ type: SecretType | 'all';
237
+ labels: string[];
238
+ sortBy: 'name' | 'createdAt' | 'updatedAt' | 'lastAccessedAt' | 'type';
239
+ sortOrder: 'asc' | 'desc';
240
+ }
241
+ /**
242
+ * Audit log filter options
243
+ */
244
+ export interface AuditFilter {
245
+ action: AuditAction | 'all';
246
+ actorId?: string;
247
+ dateRange?: {
248
+ start: string;
249
+ end: string;
250
+ };
251
+ }
252
+ export type VaultStatus = 'ACTIVE' | 'LOCKED' | 'ARCHIVED' | 'SUSPENDED' | 'DELETED' | string;
253
+ export type SecretType = 'API_KEY' | 'CERTIFICATE' | 'CREDENTIAL' | 'FILE' | 'PRIVATE_KEY' | 'STRUCTURED_DATA' | 'TEXT' | 'TOKEN';
254
+ export type SecretStatus = 'ACTIVE' | 'ARCHIVED' | 'EXPIRED' | 'REVOKED' | 'ROTATED' | string;
255
+ export type VaultRole = 'owner' | 'admin' | 'editor' | 'viewer';
256
+ export type RotationStatus = 'healthy' | 'due' | 'overdue';
257
+ export type AuditAction = 'vault.created' | 'vault.updated' | 'vault.deleted' | 'vault.locked' | 'vault.unlocked' | 'secret.created' | 'secret.updated' | 'secret.deleted' | 'secret.accessed' | 'secret.rotated' | 'secret.rollback' | 'member.added' | 'member.removed' | 'member.role_changed' | 'provider.connected' | 'provider.disconnected' | 'provider.synced' | 'import.completed' | 'export.completed';
258
+ export type ProviderType = 'hashicorp_vault' | 'aws_secrets_manager' | 'azure_key_vault' | 'gcp_secret_manager' | 'custom';
259
+ export type ProviderStatus = 'connected' | 'disconnected' | 'error' | 'syncing';
260
+ export type SecretListView = 'list' | 'grid';
261
+ export type VaultListView = 'list' | 'grid';
262
+ /**
263
+ * Mode for navigation and route filtering.
264
+ * - 'user': vault/secret operational pages only (for product app shells)
265
+ * - 'admin': governance pages + vault management (for admin-app)
266
+ * - 'all': everything (backward compat)
267
+ */
268
+ export type SecurityMode = 'user' | 'admin' | 'all';
269
+ /**
270
+ * Props for the SecurityUserRoot component (user-facing app shells).
271
+ * Identical to SecurityRootProps today; kept as a separate alias so
272
+ * user-specific props (e.g., vault-scoped defaults) can be added later
273
+ * without breaking admin consumers.
274
+ */
275
+ export type SecurityUserRootProps = SecurityRootProps;
276
+ /**
277
+ * Props for the SecurityAdminRoot component (admin-app).
278
+ * Identical to SecurityRootProps today; kept as a separate alias so
279
+ * admin-specific props (e.g., tenantScope, adminPermissions) can be
280
+ * added later without breaking user consumers.
281
+ */
282
+ export type SecurityAdminRootProps = SecurityRootProps;
283
+ //# sourceMappingURL=index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M,MAAM,sBAAsB,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copy text to clipboard and optionally auto-clear after a delay.
3
+ *
4
+ * @param text - The text to copy
5
+ * @param autoClearMs - Milliseconds after which to clear clipboard (0 = no auto-clear)
6
+ * @returns A cleanup function to cancel the auto-clear timer
7
+ */
8
+ export declare function copyToClipboard(text: string, autoClearMs?: number): {
9
+ promise: Promise<void>;
10
+ cancel: () => void;
11
+ };
12
+ /**
13
+ * Clear the clipboard by writing an empty string.
14
+ */
15
+ export declare function clearClipboard(): Promise<void>;
16
+ /**
17
+ * Format remaining time for auto-clear countdown display.
18
+ */
19
+ export declare function formatCountdown(remainingMs: number): string;
20
+ //# sourceMappingURL=clipboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../src/security/utils/clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,MAAc,GAC1B;IAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,CAmBhD;AAED;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAMpD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAO3D"}
@@ -0,0 +1,23 @@
1
+ //#region src/security/utils/clipboard.ts
2
+ function e(e, n = 3e4) {
3
+ let r = null;
4
+ return {
5
+ promise: navigator.clipboard.writeText(e).then(() => {
6
+ n > 0 && (r = setTimeout(() => {
7
+ t();
8
+ }, n));
9
+ }),
10
+ cancel: () => {
11
+ r !== null && (clearTimeout(r), r = null);
12
+ }
13
+ };
14
+ }
15
+ async function t() {
16
+ try {
17
+ await navigator.clipboard.writeText("");
18
+ } catch {}
19
+ }
20
+ //#endregion
21
+ export { e as copyToClipboard };
22
+
23
+ //# sourceMappingURL=clipboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.js","names":[],"sources":["../../../src/security/utils/clipboard.ts"],"sourcesContent":["/**\n * Copy text to clipboard and optionally auto-clear after a delay.\n *\n * @param text - The text to copy\n * @param autoClearMs - Milliseconds after which to clear clipboard (0 = no auto-clear)\n * @returns A cleanup function to cancel the auto-clear timer\n */\nexport function copyToClipboard(\n text: string,\n autoClearMs: number = 30000\n): { promise: Promise<void>; cancel: () => void } {\n let timerId: ReturnType<typeof setTimeout> | null = null;\n\n const promise = navigator.clipboard.writeText(text).then(() => {\n if (autoClearMs > 0) {\n timerId = setTimeout(() => {\n clearClipboard();\n }, autoClearMs);\n }\n });\n\n const cancel = () => {\n if (timerId !== null) {\n clearTimeout(timerId);\n timerId = null;\n }\n };\n\n return { promise, cancel };\n}\n\n/**\n * Clear the clipboard by writing an empty string.\n */\nexport async function clearClipboard(): Promise<void> {\n try {\n await navigator.clipboard.writeText('');\n } catch {\n // Clipboard API may not be available in all contexts\n }\n}\n\n/**\n * Format remaining time for auto-clear countdown display.\n */\nexport function formatCountdown(remainingMs: number): string {\n const seconds = Math.ceil(remainingMs / 1000);\n if (seconds <= 0) return 'Cleared';\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n const secs = seconds % 60;\n return `${minutes}m ${secs}s`;\n}\n"],"mappings":";AAOA,SAAgB,EACd,GACA,IAAsB,KAC0B;CAChD,IAAI,IAAgD;AAiBpD,QAAO;EAAE,SAfO,UAAU,UAAU,UAAU,EAAK,CAAC,WAAW;AAC7D,GAAI,IAAc,MAChB,IAAU,iBAAiB;AACzB,OAAgB;MACf,EAAY;IAEjB;EASgB,cAPG;AACnB,GAAI,MAAY,SACd,aAAa,EAAQ,EACrB,IAAU;;EAIY;;AAM5B,eAAsB,IAAgC;AACpD,KAAI;AACF,QAAM,UAAU,UAAU,UAAU,GAAG;SACjC"}
@@ -0,0 +1,7 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ /**
4
+ * Merge Tailwind CSS classes with clsx
5
+ */
6
+ export declare function cn(...inputs: ClassValue[]): string;
7
+ //# sourceMappingURL=cn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/security/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C;;GAEG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -0,0 +1,10 @@
1
+ import e from "../../node_modules/clsx/dist/clsx.js";
2
+ import { twMerge as t } from "../../node_modules/tailwind-merge/dist/bundle-mjs.js";
3
+ //#region src/security/utils/cn.ts
4
+ function n(...n) {
5
+ return t(e(n));
6
+ }
7
+ //#endregion
8
+ export { n as cn };
9
+
10
+ //# sourceMappingURL=cn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.js","names":[],"sources":["../../../src/security/utils/cn.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Merge Tailwind CSS classes with clsx\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AAMA,SAAgB,EAAG,GAAG,GAAsB;AAC1C,QAAO,EAAQ,EAAK,EAAO,CAAC"}
@@ -0,0 +1,18 @@
1
+ export interface ParsedSecret {
2
+ name: string;
3
+ key: string;
4
+ value: string;
5
+ type: string;
6
+ description?: string;
7
+ }
8
+ export interface ParsedPlainImportFile {
9
+ kind: 'plain';
10
+ secrets: ParsedSecret[];
11
+ }
12
+ export interface ParsedBackupImportFile {
13
+ kind: 'backup';
14
+ encodedBackup: string;
15
+ }
16
+ export type ParsedImportFile = ParsedPlainImportFile | ParsedBackupImportFile;
17
+ export declare function parseImportFile(file: File): Promise<ParsedImportFile>;
18
+ //# sourceMappingURL=fileParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileParser.d.ts","sourceRoot":"","sources":["../../../src/security/utils/fileParser.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,QAAQ,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,sBAAsB,CAAC;AA+J9E,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAwB3E"}
@@ -0,0 +1,108 @@
1
+ //#region src/security/utils/fileParser.ts
2
+ function e(e) {
3
+ return e.trim().replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
4
+ }
5
+ function t(t) {
6
+ return {
7
+ name: t.name.trim(),
8
+ key: t.key?.trim() || e(t.name),
9
+ value: t.value,
10
+ type: t.type?.trim() || "TEXT",
11
+ description: t.description?.trim() || void 0
12
+ };
13
+ }
14
+ function n(e) {
15
+ let t = [], n = "", r = !1;
16
+ for (let i = 0; i < e.length; i += 1) {
17
+ let a = e[i];
18
+ if (a === "\"") {
19
+ r = !r;
20
+ continue;
21
+ }
22
+ if (a === "," && !r) {
23
+ t.push(n), n = "";
24
+ continue;
25
+ }
26
+ n += a;
27
+ }
28
+ return t.push(n), t;
29
+ }
30
+ function r(e, r) {
31
+ let i = e.toLowerCase();
32
+ if (i.endsWith(".csv")) {
33
+ let e = r.split("\n").map((e) => e.trim()).filter(Boolean);
34
+ if (e.length < 2) throw Error("CSV must contain a header row and at least one data row");
35
+ let i = n(e[0]).map((e) => e.trim().toLowerCase()), a = i.indexOf("name"), o = i.indexOf("key"), s = i.indexOf("value"), c = i.indexOf("type"), l = i.indexOf("description");
36
+ if (a === -1 || s === -1) throw Error("CSV must contain name and value columns");
37
+ return e.slice(1).flatMap((e) => {
38
+ let r = n(e), i = r[a]?.trim(), u = r[s]?.trim();
39
+ return !i || !u ? [] : [t({
40
+ name: i,
41
+ key: o >= 0 ? r[o] : void 0,
42
+ value: u,
43
+ type: c >= 0 ? r[c] : void 0,
44
+ description: l >= 0 ? r[l] : void 0
45
+ })];
46
+ });
47
+ }
48
+ if (i.endsWith(".env") || i.startsWith(".env")) return r.split("\n").map((e) => e.trim()).filter((e) => e && !e.startsWith("#") && !e.startsWith("//")).flatMap((e) => {
49
+ let n = e.startsWith("export ") ? e.slice(7).trim() : e, r = n.indexOf("=");
50
+ if (r === -1) return [];
51
+ let i = n.slice(0, r).trim(), a = n.slice(r + 1).trim();
52
+ return i ? ((a.startsWith("\"") && a.endsWith("\"") || a.startsWith("'") && a.endsWith("'")) && (a = a.slice(1, -1)), [t({
53
+ name: i,
54
+ key: i,
55
+ value: a,
56
+ type: "TEXT"
57
+ })]) : [];
58
+ });
59
+ let a = JSON.parse(r);
60
+ if (Array.isArray(a)) return a.flatMap((e) => {
61
+ let n = typeof e.name == "string" ? e.name : "", r = e.value == null ? "" : String(e.value);
62
+ return !n || !r ? [] : [t({
63
+ ...e,
64
+ name: n,
65
+ value: r
66
+ })];
67
+ });
68
+ if (a && typeof a == "object" && Array.isArray(a.secrets)) return a.secrets.flatMap((e) => {
69
+ let n = typeof e.name == "string" ? e.name : "", r = e.value == null ? "" : String(e.value);
70
+ return !n || !r ? [] : [t({
71
+ ...e,
72
+ name: n,
73
+ value: r
74
+ })];
75
+ });
76
+ if (a && typeof a == "object") return Object.entries(a).flatMap(([e, n]) => n == null ? [] : [t({
77
+ name: e,
78
+ key: e,
79
+ value: String(n),
80
+ type: "TEXT"
81
+ })]);
82
+ throw Error("Unsupported JSON format");
83
+ }
84
+ function i(e) {
85
+ let t = e.toLowerCase();
86
+ return t.endsWith(".zip.enc") || t.endsWith(".boffbackup") || t.endsWith(".backup.enc");
87
+ }
88
+ async function a(e) {
89
+ if (i(e.name)) {
90
+ let t = await e.arrayBuffer(), n = new Uint8Array(t), r = "";
91
+ return n.forEach((e) => {
92
+ r += String.fromCharCode(e);
93
+ }), {
94
+ kind: "backup",
95
+ encodedBackup: btoa(r)
96
+ };
97
+ }
98
+ let t = await e.text(), n = r(e.name, t);
99
+ if (n.length === 0) throw Error("No secrets found in the selected file");
100
+ return {
101
+ kind: "plain",
102
+ secrets: n
103
+ };
104
+ }
105
+ //#endregion
106
+ export { a as parseImportFile };
107
+
108
+ //# sourceMappingURL=fileParser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileParser.js","names":[],"sources":["../../../src/security/utils/fileParser.ts"],"sourcesContent":["export interface ParsedSecret {\n name: string;\n key: string;\n value: string;\n type: string;\n description?: string;\n}\n\nexport interface ParsedPlainImportFile {\n kind: 'plain';\n secrets: ParsedSecret[];\n}\n\nexport interface ParsedBackupImportFile {\n kind: 'backup';\n encodedBackup: string;\n}\n\nexport type ParsedImportFile = ParsedPlainImportFile | ParsedBackupImportFile;\n\nfunction toSecretKey(name: string): string {\n return name\n .trim()\n .replace(/[^a-zA-Z0-9]+/g, '_')\n .replace(/^_+|_+$/g, '')\n .toUpperCase();\n}\n\nfunction normalizeSecret(\n input: Partial<ParsedSecret> & { name: string; value: string }\n): ParsedSecret {\n return {\n name: input.name.trim(),\n key: input.key?.trim() || toSecretKey(input.name),\n value: input.value,\n type: input.type?.trim() || 'TEXT',\n description: input.description?.trim() || undefined,\n };\n}\n\nfunction parseCsvLine(line: string): string[] {\n const result: string[] = [];\n let current = '';\n let inQuotes = false;\n\n for (let index = 0; index < line.length; index += 1) {\n const character = line[index];\n if (character === '\"') {\n inQuotes = !inQuotes;\n continue;\n }\n if (character === ',' && !inQuotes) {\n result.push(current);\n current = '';\n continue;\n }\n current += character;\n }\n\n result.push(current);\n return result;\n}\n\nfunction parsePlainSecrets(fileName: string, text: string): ParsedSecret[] {\n const lowerName = fileName.toLowerCase();\n\n if (lowerName.endsWith('.csv')) {\n const lines = text\n .split('\\n')\n .map((line) => line.trim())\n .filter(Boolean);\n if (lines.length < 2) {\n throw new Error('CSV must contain a header row and at least one data row');\n }\n\n const headers = parseCsvLine(lines[0]).map((header) => header.trim().toLowerCase());\n const nameIndex = headers.indexOf('name');\n const keyIndex = headers.indexOf('key');\n const valueIndex = headers.indexOf('value');\n const typeIndex = headers.indexOf('type');\n const descriptionIndex = headers.indexOf('description');\n\n if (nameIndex === -1 || valueIndex === -1) {\n throw new Error('CSV must contain name and value columns');\n }\n\n return lines.slice(1).flatMap((line) => {\n const values = parseCsvLine(line);\n const name = values[nameIndex]?.trim();\n const value = values[valueIndex]?.trim();\n if (!name || !value) return [];\n\n return [\n normalizeSecret({\n name,\n key: keyIndex >= 0 ? values[keyIndex] : undefined,\n value,\n type: typeIndex >= 0 ? values[typeIndex] : undefined,\n description: descriptionIndex >= 0 ? values[descriptionIndex] : undefined,\n }),\n ];\n });\n }\n\n if (lowerName.endsWith('.env') || lowerName.startsWith('.env')) {\n return text\n .split('\\n')\n .map((line) => line.trim())\n .filter((line) => line && !line.startsWith('#') && !line.startsWith('//'))\n .flatMap((line) => {\n const normalizedLine = line.startsWith('export ') ? line.slice(7).trim() : line;\n const separatorIndex = normalizedLine.indexOf('=');\n if (separatorIndex === -1) return [];\n\n const name = normalizedLine.slice(0, separatorIndex).trim();\n let value = normalizedLine.slice(separatorIndex + 1).trim();\n if (!name) return [];\n\n if (\n (value.startsWith('\"') && value.endsWith('\"')) ||\n (value.startsWith(\"'\") && value.endsWith(\"'\"))\n ) {\n value = value.slice(1, -1);\n }\n\n return [normalizeSecret({ name, key: name, value, type: 'TEXT' })];\n });\n }\n\n const parsed = JSON.parse(text) as\n | Array<Partial<ParsedSecret> & { name?: string; value?: string }>\n | Record<string, unknown>\n | { secrets?: Array<Partial<ParsedSecret> & { name?: string; value?: string }> };\n\n if (Array.isArray(parsed)) {\n return parsed.flatMap((entry) => {\n const name = typeof entry.name === 'string' ? entry.name : '';\n const value = entry.value == null ? '' : String(entry.value);\n if (!name || !value) return [];\n return [normalizeSecret({ ...entry, name, value })];\n });\n }\n\n if (\n parsed &&\n typeof parsed === 'object' &&\n Array.isArray((parsed as { secrets?: unknown[] }).secrets)\n ) {\n return (\n parsed as { secrets: Array<Partial<ParsedSecret> & { name?: string; value?: string }> }\n ).secrets.flatMap((entry) => {\n const name = typeof entry.name === 'string' ? entry.name : '';\n const value = entry.value == null ? '' : String(entry.value);\n if (!name || !value) return [];\n return [normalizeSecret({ ...entry, name, value })];\n });\n }\n\n if (parsed && typeof parsed === 'object') {\n return Object.entries(parsed).flatMap(([name, rawValue]) => {\n if (rawValue == null) return [];\n return [normalizeSecret({ name, key: name, value: String(rawValue), type: 'TEXT' })];\n });\n }\n\n throw new Error('Unsupported JSON format');\n}\n\nfunction isEncryptedBackup(fileName: string): boolean {\n const lowerName = fileName.toLowerCase();\n return (\n lowerName.endsWith('.zip.enc') ||\n lowerName.endsWith('.boffbackup') ||\n lowerName.endsWith('.backup.enc')\n );\n}\n\nexport async function parseImportFile(file: File): Promise<ParsedImportFile> {\n if (isEncryptedBackup(file.name)) {\n const buffer = await file.arrayBuffer();\n const bytes = new Uint8Array(buffer);\n let binary = '';\n bytes.forEach((byte) => {\n binary += String.fromCharCode(byte);\n });\n return {\n kind: 'backup',\n encodedBackup: btoa(binary),\n };\n }\n\n const text = await file.text();\n const secrets = parsePlainSecrets(file.name, text);\n if (secrets.length === 0) {\n throw new Error('No secrets found in the selected file');\n }\n\n return {\n kind: 'plain',\n secrets,\n };\n}\n"],"mappings":";AAoBA,SAAS,EAAY,GAAsB;AACzC,QAAO,EACJ,MAAM,CACN,QAAQ,kBAAkB,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 -0,0 +1,5 @@
1
+ type TranslationParams = Record<string, string | number>;
2
+ type TranslateFn = (key: string, params?: TranslationParams) => string;
3
+ export declare function translateWithFallback(t: TranslateFn, key: string, fallback: string, params?: TranslationParams): string;
4
+ export {};
5
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/security/utils/i18n.ts"],"names":[],"mappings":"AAAA,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAEzD,KAAK,WAAW,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,KAAK,MAAM,CAAC;AAEvE,wBAAgB,qBAAqB,CACnC,CAAC,EAAE,WAAW,EACd,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,iBAAiB,UAkB3B"}
@@ -0,0 +1,9 @@
1
+ //#region src/security/utils/i18n.ts
2
+ function e(e, t, n, r) {
3
+ let i = e(t, r);
4
+ return i === t ? r ? Object.entries(r).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)).replace(`{${t}}`, String(n)), n) : n : i;
5
+ }
6
+ //#endregion
7
+ export { e as translateWithFallback };
8
+
9
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.js","names":[],"sources":["../../../src/security/utils/i18n.ts"],"sourcesContent":["type TranslationParams = Record<string, string | number>;\n\ntype TranslateFn = (key: string, params?: TranslationParams) => string;\n\nexport function translateWithFallback(\n t: TranslateFn,\n key: string,\n fallback: string,\n params?: TranslationParams\n) {\n const translated = t(key, params);\n if (translated !== key) {\n return translated;\n }\n\n if (!params) {\n return fallback;\n }\n\n return Object.entries(params).reduce(\n (value, [paramKey, paramValue]) =>\n value\n .replace(`{{${paramKey}}}`, String(paramValue))\n .replace(`{${paramKey}}`, String(paramValue)),\n fallback\n );\n}\n"],"mappings":";AAIA,SAAgB,EACd,GACA,GACA,GACA,GACA;CACA,IAAM,IAAa,EAAE,GAAK,EAAO;AASjC,QARI,MAAe,IAId,IAIE,OAAO,QAAQ,EAAO,CAAC,QAC3B,GAAO,CAAC,GAAU,OACjB,EACG,QAAQ,KAAK,EAAS,KAAK,OAAO,EAAW,CAAC,CAC9C,QAAQ,IAAI,EAAS,IAAI,OAAO,EAAW,CAAC,EACjD,EACD,GATQ,IAJA"}
@@ -0,0 +1,30 @@
1
+ import { SecretType } from '../types';
2
+
3
+ export interface ParsedSecret {
4
+ name: string;
5
+ value: string;
6
+ type: SecretType;
7
+ description?: string;
8
+ labels?: string[];
9
+ }
10
+ /**
11
+ * Parse a JSON file containing secrets.
12
+ * Expected format: array of { name, value, type?, description?, labels? }
13
+ * or object where keys are secret names and values are secret values.
14
+ */
15
+ export declare function parseJsonSecrets(content: string): ParsedSecret[];
16
+ /**
17
+ * Parse a CSV file containing secrets.
18
+ * Expected format: name,value,type,description (first row is header)
19
+ */
20
+ export declare function parseCsvSecrets(content: string): ParsedSecret[];
21
+ /**
22
+ * Parse a .env file containing environment variables.
23
+ * Supports KEY=VALUE format, comments (#), and quoted values.
24
+ */
25
+ export declare function parseEnvSecrets(content: string): ParsedSecret[];
26
+ /**
27
+ * Detect file format from file name and parse accordingly.
28
+ */
29
+ export declare function parseSecretsFile(fileName: string, content: string): ParsedSecret[];
30
+ //# sourceMappingURL=importParsers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"importParsers.d.ts","sourceRoot":"","sources":["../../../src/security/utils/importParsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,CAsBhE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,CAgC/D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,CAqC/D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,CAiBlF"}
@@ -0,0 +1,35 @@
1
+ import { Vault, Secret, SecretValue, SecretVersion, VaultMember, AuditLogEntry, ProviderConnection, SecurityDashboard } from '../types';
2
+
3
+ /**
4
+ * Map a GraphQL Vault response to the domain Vault type
5
+ */
6
+ export declare function mapVault(raw: Record<string, unknown>): Vault;
7
+ /**
8
+ * Map a GraphQL Secret response to the domain Secret type
9
+ */
10
+ export declare function mapSecret(raw: Record<string, unknown>): Secret;
11
+ /**
12
+ * Map a GraphQL SecretValue response to the domain SecretValue type
13
+ */
14
+ export declare function mapSecretValue(raw: Record<string, unknown>): SecretValue;
15
+ /**
16
+ * Map a GraphQL SecretVersion response to the domain SecretVersion type
17
+ */
18
+ export declare function mapSecretVersion(raw: Record<string, unknown>): SecretVersion;
19
+ /**
20
+ * Map a GraphQL VaultMember response to the domain VaultMember type
21
+ */
22
+ export declare function mapVaultMember(raw: Record<string, unknown>): VaultMember;
23
+ /**
24
+ * Map a GraphQL AuditLogEntry response to the domain AuditLogEntry type
25
+ */
26
+ export declare function mapAuditLogEntry(raw: Record<string, unknown>): AuditLogEntry;
27
+ /**
28
+ * Map a GraphQL ProviderConnection response to the domain ProviderConnection type
29
+ */
30
+ export declare function mapProviderConnection(raw: Record<string, unknown>): ProviderConnection;
31
+ /**
32
+ * Map a GraphQL SecurityDashboard response to the domain SecurityDashboard type
33
+ */
34
+ export declare function mapSecurityDashboard(raw: Record<string, unknown>): SecurityDashboard;
35
+ //# sourceMappingURL=mappers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../src/security/utils/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK,CAe5D;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAqB9D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW,CAMxE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,aAAa,CAS5E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW,CAYxE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,aAAa,CAgB5E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,kBAAkB,CAYtF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,iBAAiB,CAWpF"}
@@ -0,0 +1,22 @@
1
+ export interface PasswordOptions {
2
+ length: number;
3
+ uppercase: boolean;
4
+ lowercase: boolean;
5
+ numbers: boolean;
6
+ symbols: boolean;
7
+ excludeAmbiguous: boolean;
8
+ }
9
+ export declare const DEFAULT_PASSWORD_OPTIONS: PasswordOptions;
10
+ /**
11
+ * Generate a cryptographically secure random password using crypto.getRandomValues.
12
+ */
13
+ export declare function generatePassword(options?: PasswordOptions): string;
14
+ /**
15
+ * Calculate password strength score (0-100)
16
+ */
17
+ export declare function calculatePasswordStrength(password: string): {
18
+ score: number;
19
+ label: 'weak' | 'fair' | 'good' | 'strong' | 'excellent';
20
+ color: string;
21
+ };
22
+ //# sourceMappingURL=passwordGenerator.d.ts.map