@jmruthers/pace-core 0.5.53 → 0.5.55

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 (398) hide show
  1. package/README.md +0 -4
  2. package/dist/{DataTable-7FMFXA7A.js → DataTable-4T627QFJ.js} +11 -11
  3. package/dist/{PublicLoadingSpinner-Bq_-BeK-.d.ts → PublicLoadingSpinner-SL8WaQN7.d.ts} +2 -21
  4. package/dist/{api-H5A3H4IR.js → api-LUNF5O6M.js} +3 -3
  5. package/dist/{appConfig-BVGyuvI7.d.ts → appConfig-DjpeG6P-.d.ts} +9 -1
  6. package/dist/{appNameResolver-7GHF5ED2.js → appNameResolver-UURKN7NF.js} +2 -2
  7. package/dist/{audit-BUW3LMJB.js → audit-6TOCAMKO.js} +2 -2
  8. package/dist/{chunk-MZBUOP4P.js → chunk-5BSLGBYI.js} +4 -3
  9. package/dist/chunk-5BSLGBYI.js.map +1 -0
  10. package/dist/{chunk-I5Z3QH5X.js → chunk-66C4BSAY.js} +2 -2
  11. package/dist/{chunk-I5Z3QH5X.js.map → chunk-66C4BSAY.js.map} +1 -1
  12. package/dist/{chunk-MYP2EGHX.js → chunk-AJ2KMES7.js} +21 -14
  13. package/dist/chunk-AJ2KMES7.js.map +1 -0
  14. package/dist/{chunk-EL2O4IUX.js → chunk-AQFRLC7K.js} +16 -24
  15. package/dist/{chunk-EL2O4IUX.js.map → chunk-AQFRLC7K.js.map} +1 -1
  16. package/dist/{chunk-7BNPOCLL.js → chunk-B2WTCLCV.js} +6 -2
  17. package/dist/chunk-B2WTCLCV.js.map +1 -0
  18. package/dist/{chunk-WJARTBCT.js → chunk-D7ARGIA3.js} +16 -7
  19. package/dist/chunk-D7ARGIA3.js.map +1 -0
  20. package/dist/{chunk-NRK4AIHQ.js → chunk-KBRACSJI.js} +3 -3
  21. package/dist/{chunk-NYUJ4FJR.js → chunk-KJDPSM64.js} +7 -7
  22. package/dist/chunk-KJDPSM64.js.map +1 -0
  23. package/dist/{chunk-GWSBHC4J.js → chunk-KLPVOPRI.js} +261 -38
  24. package/dist/chunk-KLPVOPRI.js.map +1 -0
  25. package/dist/{chunk-TRIZ7IB7.js → chunk-MPQDF75X.js} +148 -288
  26. package/dist/chunk-MPQDF75X.js.map +1 -0
  27. package/dist/{chunk-MSFACPQQ.js → chunk-PAEM3OWN.js} +11 -11
  28. package/dist/{chunk-MSFACPQQ.js.map → chunk-PAEM3OWN.js.map} +1 -1
  29. package/dist/{chunk-GIO7BFE7.js → chunk-RQD3D2CO.js} +66 -169
  30. package/dist/{chunk-GIO7BFE7.js.map → chunk-RQD3D2CO.js.map} +1 -1
  31. package/dist/{chunk-YDJW5XTN.js → chunk-STT7INZR.js} +25 -1
  32. package/dist/chunk-STT7INZR.js.map +1 -0
  33. package/dist/{chunk-6MTY77WU.js → chunk-TNMXZLDR.js} +3 -3
  34. package/dist/{chunk-BC3S53OZ.js → chunk-UQE2Y64H.js} +30 -14
  35. package/dist/chunk-UQE2Y64H.js.map +1 -0
  36. package/dist/{chunk-22KLBHPS.js → chunk-W66AZIOH.js} +2 -2
  37. package/dist/chunk-W66AZIOH.js.map +1 -0
  38. package/dist/{chunk-SS3E6QLB.js → chunk-YNUBMSMV.js} +2 -2
  39. package/dist/chunk-YNUBMSMV.js.map +1 -0
  40. package/dist/{chunk-NZ655MWE.js → chunk-ZOD2ZY6X.js} +5 -4
  41. package/dist/chunk-ZOD2ZY6X.js.map +1 -0
  42. package/dist/{chunk-74C6SNEC.js → chunk-ZPK5656W.js} +3 -3
  43. package/dist/{chunk-74C6SNEC.js.map → chunk-ZPK5656W.js.map} +1 -1
  44. package/dist/components.d.ts +22 -899
  45. package/dist/components.js +436 -3118
  46. package/dist/components.js.map +1 -1
  47. package/dist/file-reference-9xUOnwyt.d.ts +70 -0
  48. package/dist/hooks.d.ts +2 -2
  49. package/dist/hooks.js +10 -10
  50. package/dist/hooks.js.map +1 -1
  51. package/dist/index.d.ts +49 -9
  52. package/dist/index.js +190 -25
  53. package/dist/index.js.map +1 -1
  54. package/dist/{organisation-CO3Sh3_D.d.ts → organisation-t-vvQC3g.d.ts} +1 -8
  55. package/dist/providers.d.ts +2 -2
  56. package/dist/providers.js +5 -5
  57. package/dist/rbac/index.d.ts +65 -46
  58. package/dist/rbac/index.js +10 -12
  59. package/dist/styles/core.css +0 -125
  60. package/dist/types.d.ts +2 -1
  61. package/dist/types.js +3 -1
  62. package/dist/types.js.map +1 -1
  63. package/dist/{usePublicRouteParams-B2OcAsur.d.ts → usePublicRouteParams-CdoFxnJK.d.ts} +1 -1
  64. package/dist/utils.d.ts +3 -4
  65. package/dist/utils.js +44 -13
  66. package/dist/utils.js.map +1 -1
  67. package/docs/FILE_REFERENCE_SYSTEM.md +440 -0
  68. package/docs/INDEX.md +7 -5
  69. package/docs/README.md +0 -1
  70. package/docs/api/README.md +0 -4
  71. package/docs/api/classes/ErrorBoundary.md +1 -1
  72. package/docs/api/classes/InvalidScopeError.md +1 -1
  73. package/docs/api/classes/MissingUserContextError.md +1 -1
  74. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  75. package/docs/api/classes/PermissionDeniedError.md +2 -2
  76. package/docs/api/classes/PublicErrorBoundary.md +1 -1
  77. package/docs/api/classes/RBACAuditManager.md +12 -12
  78. package/docs/api/classes/RBACCache.md +1 -1
  79. package/docs/api/classes/RBACEngine.md +6 -6
  80. package/docs/api/classes/RBACError.md +1 -1
  81. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  82. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  83. package/docs/api/classes/StorageUtils.md +281 -0
  84. package/docs/api/interfaces/AggregateConfig.md +1 -1
  85. package/docs/api/interfaces/ButtonProps.md +1 -1
  86. package/docs/api/interfaces/CardProps.md +1 -1
  87. package/docs/api/interfaces/ColorPalette.md +1 -1
  88. package/docs/api/interfaces/ColorShade.md +1 -1
  89. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  90. package/docs/api/interfaces/DataTableAction.md +1 -1
  91. package/docs/api/interfaces/DataTableColumn.md +1 -1
  92. package/docs/api/interfaces/DataTableProps.md +1 -1
  93. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  94. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  95. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  96. package/docs/api/interfaces/EventContextType.md +1 -1
  97. package/docs/api/interfaces/EventLogoProps.md +1 -1
  98. package/docs/api/interfaces/EventProviderProps.md +1 -1
  99. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  100. package/docs/api/interfaces/FileUploadProps.md +1 -1
  101. package/docs/api/interfaces/FooterProps.md +1 -1
  102. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  103. package/docs/api/interfaces/InputProps.md +1 -1
  104. package/docs/api/interfaces/LabelProps.md +1 -1
  105. package/docs/api/interfaces/LoginFormProps.md +1 -1
  106. package/docs/api/interfaces/NavigationAccessRecord.md +2 -2
  107. package/docs/api/interfaces/NavigationContextType.md +1 -1
  108. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  109. package/docs/api/interfaces/NavigationItem.md +1 -1
  110. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  111. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  112. package/docs/api/interfaces/Organisation.md +1 -1
  113. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  114. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  115. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  116. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  117. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  118. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  119. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  120. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  121. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  122. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  123. package/docs/api/interfaces/PaletteData.md +1 -1
  124. package/docs/api/interfaces/PermissionEnforcerProps.md +4 -4
  125. package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
  126. package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
  127. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
  128. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  129. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  130. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  131. package/docs/api/interfaces/RBACConfig.md +1 -1
  132. package/docs/api/interfaces/RBACContextType.md +1 -1
  133. package/docs/api/interfaces/RBACLogger.md +1 -1
  134. package/docs/api/interfaces/RBACProviderProps.md +1 -1
  135. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  136. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  137. package/docs/api/interfaces/RouteAccessRecord.md +2 -2
  138. package/docs/api/interfaces/RouteConfig.md +2 -2
  139. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  140. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  141. package/docs/api/interfaces/StorageConfig.md +1 -1
  142. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  143. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  144. package/docs/api/interfaces/StorageListOptions.md +1 -1
  145. package/docs/api/interfaces/StorageListResult.md +1 -1
  146. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  147. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  148. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  149. package/docs/api/interfaces/StyleImport.md +1 -1
  150. package/docs/api/interfaces/ToastActionElement.md +1 -1
  151. package/docs/api/interfaces/ToastProps.md +1 -1
  152. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  153. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  154. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  155. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  156. package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
  157. package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
  158. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  159. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  160. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  161. package/docs/api/interfaces/UserEventAccess.md +1 -1
  162. package/docs/api/interfaces/UserMenuProps.md +1 -1
  163. package/docs/api/interfaces/UserProfile.md +1 -1
  164. package/docs/api/modules.md +204 -200
  165. package/docs/api-reference/components.md +141 -163
  166. package/docs/api-reference/hooks.md +347 -0
  167. package/docs/core-concepts/rbac-system.md +69 -16
  168. package/docs/getting-started/examples/basic-auth-app.md +0 -1
  169. package/docs/implementation-guides/datatable-rbac-usage.md +12 -11
  170. package/docs/implementation-guides/file-upload-storage.md +733 -0
  171. package/docs/implementation-guides/inactivity-tracking.md +779 -0
  172. package/docs/implementation-guides/organisation-security.md +748 -0
  173. package/docs/implementation-guides/public-pages-advanced.md +1022 -0
  174. package/docs/migration/MIGRATION_GUIDE.md +684 -0
  175. package/docs/migration/README.md +13 -2
  176. package/docs/migration/rbac-migration.md +73 -0
  177. package/docs/rbac/examples/rbac-rls-integration-example.md +11 -13
  178. package/docs/style-guide.md +269 -1
  179. package/package.json +1 -1
  180. package/src/__tests__/TESTING_GUIDELINES.md +331 -18
  181. package/src/__tests__/helpers/supabaseMock.ts +99 -0
  182. package/src/__tests__/rbac/PagePermissionGuard.test.tsx +10 -7
  183. package/src/__tests__/shared.ts +6 -0
  184. package/src/components/DataTable/components/ActionButtons.tsx +2 -2
  185. package/src/components/DataTable/components/DataTableCore.tsx +2 -2
  186. package/src/components/DataTable/components/UnifiedTableBody.tsx +1 -1
  187. package/src/components/DataTable/utils/debugTools.ts +2 -2
  188. package/src/components/Dialog/Dialog.test.tsx +12 -2
  189. package/src/components/ErrorBoundary/ErrorBoundary.test.tsx +6 -6
  190. package/src/components/ErrorBoundary/ErrorBoundary.tsx +2 -2
  191. package/src/components/FileDisplay.tsx +233 -0
  192. package/src/components/FileUpload.tsx +176 -0
  193. package/src/components/Footer/Footer.test.tsx +7 -7
  194. package/src/components/NavigationMenu/NavigationMenu.test.tsx +13 -6
  195. package/src/components/OrganisationSelector/OrganisationSelector.test.tsx +30 -3
  196. package/src/components/OrganisationSelector/OrganisationSelector.tsx +1 -1
  197. package/src/components/PaceAppLayout/__tests__/PaceAppLayout.rbac.test.tsx +558 -0
  198. package/src/components/PublicLayout/PublicErrorBoundary.tsx +1 -1
  199. package/src/components/PublicLayout/PublicPageDebugger.tsx +2 -2
  200. package/src/components/PublicLayout/PublicPageDiagnostic.tsx +2 -2
  201. package/src/components/PublicLayout/PublicPageProvider.tsx +2 -2
  202. package/src/components/Select/Select.test.tsx +50 -15
  203. package/src/components/SuperAdminGuard.tsx +2 -2
  204. package/src/components/__tests__/SuperAdminGuard.test.tsx +559 -0
  205. package/src/components/index.ts +0 -183
  206. package/src/hooks/__tests__/useOrganisationPermissions.unit.test.tsx +2 -2
  207. package/src/hooks/__tests__/usePermissionCache.unit.test.ts +1 -1
  208. package/src/hooks/__tests__/useRBAC.unit.test.ts +191 -138
  209. package/src/hooks/public/usePublicEvent.ts +2 -2
  210. package/src/hooks/useAppConfig.ts +3 -3
  211. package/src/hooks/useComponentPerformance.ts +1 -1
  212. package/src/hooks/useDataTablePerformance.ts +1 -1
  213. package/src/hooks/useFileReference.ts +232 -0
  214. package/src/hooks/useOrganisationPermissions.test.ts +254 -344
  215. package/src/hooks/useOrganisationPermissions.ts +15 -7
  216. package/src/hooks/useOrganisationSecurity.test.ts +390 -402
  217. package/src/hooks/usePerformanceMonitor.ts +1 -1
  218. package/src/hooks/usePermissionCache.test.ts +264 -395
  219. package/src/hooks/usePermissionCache.ts +34 -4
  220. package/src/hooks/useSecureDataAccess.test.ts +486 -0
  221. package/src/hooks/useSecureDataAccess.ts +4 -1
  222. package/src/providers/InactivityProvider.tsx +2 -2
  223. package/src/providers/OrganisationProvider.test.simple.tsx +168 -0
  224. package/src/providers/OrganisationProvider.test.tsx +168 -0
  225. package/src/providers/OrganisationProvider.tsx +18 -31
  226. package/src/providers/UnifiedAuthProvider.test.simple.tsx +205 -0
  227. package/src/providers/UnifiedAuthProvider.test.tsx +128 -0
  228. package/src/providers/__tests__/InactivityProvider.test.tsx +3 -4
  229. package/src/providers/__tests__/OrganisationProvider.test.tsx +19 -14
  230. package/src/rbac/__tests__/integration.authflow.test.tsx +123 -0
  231. package/src/rbac/__tests__/integration.navigation.test.tsx +72 -0
  232. package/src/rbac/__tests__/integration.securedata.test.tsx +92 -0
  233. package/src/rbac/__tests__/integration.smoke.test.tsx +73 -0
  234. package/src/rbac/__tests__/rbac-core.test.tsx +26 -22
  235. package/src/rbac/__tests__/rbac-engine-core-logic.test.ts +411 -0
  236. package/src/rbac/__tests__/rbac-engine-simplified.test.ts +285 -0
  237. package/src/rbac/__tests__/rbac-functions.test.ts +655 -0
  238. package/src/rbac/__tests__/rbac-integration.test.ts +532 -0
  239. package/src/rbac/__tests__/scenarios.user-role.test.tsx +196 -0
  240. package/src/rbac/api.test.ts +6 -6
  241. package/src/rbac/api.ts +2 -2
  242. package/src/rbac/audit.test.ts +485 -0
  243. package/src/rbac/audit.ts +7 -1
  244. package/src/rbac/cache-invalidation.ts +318 -0
  245. package/src/rbac/cache.test.ts +286 -0
  246. package/src/rbac/components/EnhancedNavigationMenu.test.tsx +559 -0
  247. package/src/rbac/components/EnhancedNavigationMenu.tsx +29 -23
  248. package/src/rbac/components/NavigationProvider.test.tsx +449 -0
  249. package/src/rbac/components/PagePermissionGuard.tsx +4 -4
  250. package/src/rbac/components/PagePermissionProvider.test.tsx +479 -0
  251. package/src/rbac/components/SecureDataProvider.test.tsx +511 -0
  252. package/src/rbac/components/__tests__/PagePermissionGuard.race-condition.test.tsx +159 -430
  253. package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +4 -5
  254. package/src/rbac/components/__tests__/PagePermissionGuard.verification.test.tsx +112 -118
  255. package/src/rbac/config.test.ts +410 -0
  256. package/src/rbac/engine.test.simple.ts +237 -0
  257. package/src/rbac/engine.test.ts +233 -0
  258. package/src/rbac/engine.ts +37 -41
  259. package/src/rbac/examples/CompleteRBACExample.tsx +3 -3
  260. package/src/rbac/examples/EventBasedApp.tsx +4 -4
  261. package/src/rbac/hooks/useRBAC.simple.test.ts +16 -0
  262. package/src/rbac/hooks/useRBAC.test.ts +207 -455
  263. package/src/rbac/hooks/useRBAC.ts +30 -22
  264. package/src/rbac/permissions.test.ts +128 -0
  265. package/src/rbac/permissions.ts +56 -141
  266. package/src/rbac/providers/RBACProvider.tsx +1 -1
  267. package/src/rbac/secureClient.test.ts +444 -0
  268. package/src/rbac/security.test.ts +390 -0
  269. package/src/rbac/security.ts +1 -1
  270. package/src/rbac/types.test.ts +382 -0
  271. package/src/rbac/types.ts +2 -2
  272. package/src/styles/base.css +208 -0
  273. package/src/styles/core.css +0 -125
  274. package/src/styles/semantic.css +24 -0
  275. package/src/types/file-reference.ts +77 -0
  276. package/src/types/rbac-functions.ts +290 -0
  277. package/src/types/supabase.ts +10 -28
  278. package/src/types/unified.ts +4 -1
  279. package/src/utils/__tests__/bundleAnalysis.unit.test.ts +81 -55
  280. package/src/utils/__tests__/lazyLoad.unit.test.tsx +21 -12
  281. package/src/utils/__tests__/organisationContext.unit.test.ts +13 -7
  282. package/src/utils/__tests__/performanceBudgets.unit.test.ts +3 -3
  283. package/src/utils/__tests__/sessionTracking.unit.test.ts +32 -12
  284. package/src/utils/appConfig.ts +1 -1
  285. package/src/utils/appIdResolver.test.ts +503 -0
  286. package/src/utils/appIdResolver.ts +1 -1
  287. package/src/utils/appNameResolver.test.ts +494 -0
  288. package/src/utils/appNameResolver.ts +3 -2
  289. package/src/utils/bundleAnalysis.ts +3 -3
  290. package/src/utils/debugLogger.ts +1 -1
  291. package/src/utils/file-reference.ts +263 -0
  292. package/src/utils/formatDate.test.ts +2 -2
  293. package/src/utils/organisationContext.test.ts +340 -0
  294. package/src/utils/organisationContext.ts +19 -6
  295. package/src/utils/performanceBudgets.ts +2 -2
  296. package/src/utils/permissionUtils.test.ts +393 -0
  297. package/src/utils/permissionUtils.ts +5 -2
  298. package/src/utils/secureDataAccess.test.ts +715 -0
  299. package/src/utils/secureDataAccess.ts +21 -5
  300. package/src/utils/sessionTracking.ts +34 -4
  301. package/src/utils/storage/__tests__/helpers.unit.test.ts +328 -0
  302. package/src/utils/storage/__tests__/index.unit.test.ts +16 -0
  303. package/src/utils/storage/helpers.ts +20 -25
  304. package/src/utils/storage/index.ts +29 -1
  305. package/src/vite-env.d.ts +17 -0
  306. package/dist/chunk-22KLBHPS.js.map +0 -1
  307. package/dist/chunk-7BNPOCLL.js.map +0 -1
  308. package/dist/chunk-BC3S53OZ.js.map +0 -1
  309. package/dist/chunk-GWSBHC4J.js.map +0 -1
  310. package/dist/chunk-MYP2EGHX.js.map +0 -1
  311. package/dist/chunk-MZBUOP4P.js.map +0 -1
  312. package/dist/chunk-NYUJ4FJR.js.map +0 -1
  313. package/dist/chunk-NZ655MWE.js.map +0 -1
  314. package/dist/chunk-SS3E6QLB.js.map +0 -1
  315. package/dist/chunk-TRIZ7IB7.js.map +0 -1
  316. package/dist/chunk-WJARTBCT.js.map +0 -1
  317. package/dist/chunk-YDJW5XTN.js.map +0 -1
  318. package/docs/print-components/README.md +0 -258
  319. package/docs/print-components/api-reference.md +0 -636
  320. package/docs/print-components/examples/README.md +0 -204
  321. package/docs/print-components/examples/basic-report.tsx +0 -92
  322. package/docs/print-components/examples/card-catalog.tsx +0 -149
  323. package/docs/print-components/examples/cover-page-report.tsx +0 -163
  324. package/docs/print-components/quick-start.md +0 -363
  325. package/src/components/PrintButton/PrintButton.tsx +0 -321
  326. package/src/components/PrintButton/PrintButtonGroup.tsx +0 -84
  327. package/src/components/PrintButton/PrintToolbar.tsx +0 -94
  328. package/src/components/PrintButton/__tests__/PrintButton.test.tsx +0 -271
  329. package/src/components/PrintButton/examples/PrintButtonShowcase.tsx +0 -438
  330. package/src/components/PrintButton/index.ts +0 -33
  331. package/src/components/PrintButton/types.ts +0 -173
  332. package/src/components/PrintCard/PrintCard.tsx +0 -154
  333. package/src/components/PrintCard/PrintCardContent.tsx +0 -57
  334. package/src/components/PrintCard/PrintCardFooter.tsx +0 -60
  335. package/src/components/PrintCard/PrintCardGrid.tsx +0 -91
  336. package/src/components/PrintCard/PrintCardHeader.tsx +0 -78
  337. package/src/components/PrintCard/PrintCardImage.tsx +0 -81
  338. package/src/components/PrintCard/examples/PrintCardShowcase.tsx +0 -239
  339. package/src/components/PrintCard/index.ts +0 -34
  340. package/src/components/PrintCard/types.ts +0 -171
  341. package/src/components/PrintDataTable/PrintDataTable.tsx +0 -215
  342. package/src/components/PrintDataTable/PrintTableGroup.tsx +0 -90
  343. package/src/components/PrintDataTable/PrintTableRow.tsx +0 -76
  344. package/src/components/PrintDataTable/index.ts +0 -25
  345. package/src/components/PrintDataTable/types.ts +0 -67
  346. package/src/components/PrintFooter/PrintFooter.tsx +0 -183
  347. package/src/components/PrintFooter/PrintFooterContent.tsx +0 -71
  348. package/src/components/PrintFooter/PrintFooterInfo.tsx +0 -86
  349. package/src/components/PrintFooter/PrintPageNumber.tsx +0 -90
  350. package/src/components/PrintFooter/examples/PrintFooterShowcase.tsx +0 -390
  351. package/src/components/PrintFooter/index.ts +0 -30
  352. package/src/components/PrintFooter/types.ts +0 -149
  353. package/src/components/PrintGrid/PrintGrid.tsx +0 -180
  354. package/src/components/PrintGrid/PrintGridBreakpoint.tsx +0 -109
  355. package/src/components/PrintGrid/PrintGridContainer.tsx +0 -128
  356. package/src/components/PrintGrid/PrintGridItem.tsx +0 -220
  357. package/src/components/PrintGrid/examples/PrintGridShowcase.tsx +0 -359
  358. package/src/components/PrintGrid/index.ts +0 -31
  359. package/src/components/PrintGrid/types.ts +0 -159
  360. package/src/components/PrintHeader/PrintCoverHeader.tsx +0 -230
  361. package/src/components/PrintHeader/PrintHeader.tsx +0 -150
  362. package/src/components/PrintHeader/index.ts +0 -17
  363. package/src/components/PrintHeader/types.ts +0 -42
  364. package/src/components/PrintLayout/PrintLayout.tsx +0 -122
  365. package/src/components/PrintLayout/PrintLayoutContext.tsx +0 -66
  366. package/src/components/PrintLayout/PrintPageBreak.tsx +0 -52
  367. package/src/components/PrintLayout/examples/PrintShowcase.tsx +0 -230
  368. package/src/components/PrintLayout/index.ts +0 -19
  369. package/src/components/PrintLayout/types.ts +0 -37
  370. package/src/components/PrintPageBreak/PrintPageBreak.tsx +0 -120
  371. package/src/components/PrintPageBreak/PrintPageBreakGroup.tsx +0 -90
  372. package/src/components/PrintPageBreak/PrintPageBreakIndicator.tsx +0 -112
  373. package/src/components/PrintPageBreak/examples/PrintPageBreakShowcase.tsx +0 -279
  374. package/src/components/PrintPageBreak/index.ts +0 -23
  375. package/src/components/PrintPageBreak/types.ts +0 -94
  376. package/src/components/PrintSection/PrintColumn.tsx +0 -104
  377. package/src/components/PrintSection/PrintDivider.tsx +0 -101
  378. package/src/components/PrintSection/PrintSection.tsx +0 -129
  379. package/src/components/PrintSection/PrintSectionContent.tsx +0 -75
  380. package/src/components/PrintSection/PrintSectionHeader.tsx +0 -97
  381. package/src/components/PrintSection/examples/PrintSectionShowcase.tsx +0 -258
  382. package/src/components/PrintSection/index.ts +0 -33
  383. package/src/components/PrintSection/types.ts +0 -155
  384. package/src/components/PrintText/PrintText.tsx +0 -116
  385. package/src/components/PrintText/index.ts +0 -16
  386. package/src/components/PrintText/types.ts +0 -24
  387. package/src/rbac/__tests__/integration.test.tsx +0 -218
  388. package/src/utils/print/PrintDataProcessor.ts +0 -390
  389. package/src/utils/print/examples/PrintUtilitiesShowcase.tsx +0 -397
  390. package/src/utils/print/index.ts +0 -29
  391. package/src/utils/print/types.ts +0 -196
  392. package/src/utils/print/usePrintOptimization.ts +0 -272
  393. /package/dist/{DataTable-7FMFXA7A.js.map → DataTable-4T627QFJ.js.map} +0 -0
  394. /package/dist/{api-H5A3H4IR.js.map → api-LUNF5O6M.js.map} +0 -0
  395. /package/dist/{appNameResolver-7GHF5ED2.js.map → appNameResolver-UURKN7NF.js.map} +0 -0
  396. /package/dist/{audit-BUW3LMJB.js.map → audit-6TOCAMKO.js.map} +0 -0
  397. /package/dist/{chunk-NRK4AIHQ.js.map → chunk-KBRACSJI.js.map} +0 -0
  398. /package/dist/{chunk-6MTY77WU.js.map → chunk-TNMXZLDR.js.map} +0 -0
@@ -33,23 +33,6 @@
33
33
  --color-card: var(--color-main-50);
34
34
  --color-card-foreground: var(--color-main-950);
35
35
 
36
- /* Print-specific variables */
37
- --print-margin: 0.5in;
38
- --print-font-size: 12pt;
39
- --print-line-height: 1.4;
40
- --print-color: #000;
41
- --print-bg: #fff;
42
- --print-first-page-margin: 1in;
43
- --print-cover-logo-size: 120px;
44
- --print-cover-title-size: 2.5rem;
45
- --print-page-width: 8.27in;
46
- /* A4 width */
47
- --print-page-height: 11.69in;
48
- /* A4 height */
49
- --print-landscape-width: 11.69in;
50
- /* A4 landscape width */
51
- --print-landscape-height: 8.27in;
52
- /* A4 landscape height */
53
36
  }
54
37
 
55
38
  @layer base {
@@ -256,112 +239,4 @@
256
239
 
257
240
  @layer utilities {
258
241
 
259
- /* Print-specific utilities */
260
- .print-break-avoid {
261
- page-break-inside: avoid;
262
- }
263
-
264
- .print-break-before {
265
- page-break-before: always;
266
- }
267
-
268
- .print-break-after {
269
- page-break-after: always;
270
- }
271
-
272
- /* Print page size controls */
273
- .print-a4-portrait {
274
- @media print {
275
- @page {
276
- size: A4 portrait;
277
- margin: var(--print-margin);
278
- }
279
- }
280
- }
281
-
282
- .print-a4-landscape {
283
- @media print {
284
- @page {
285
- size: A4 landscape;
286
- margin: var(--print-margin);
287
- }
288
- }
289
- }
290
-
291
- /* First page header styles */
292
- .print-first-page-header {
293
- @media print {
294
- @page :first {
295
- margin-top: var(--print-first-page-margin);
296
- }
297
- }
298
- }
299
-
300
- .print-cover-header {
301
- @media print {
302
- @page :first {
303
- margin-top: var(--print-first-page-margin);
304
- }
305
- }
306
- }
307
-
308
- .print-subsequent-header {
309
- @media print {
310
- @page :not(:first) {
311
- margin-top: var(--print-margin);
312
- }
313
- }
314
- }
315
-
316
- /* Print-specific layouts */
317
- @media print {
318
- .print-hidden {
319
- display: none !important;
320
- }
321
-
322
- .print-visible {
323
- display: block !important;
324
- }
325
-
326
- .print-first-page-only {
327
- display: block;
328
- }
329
-
330
- .print-subsequent-pages-only {
331
- display: none;
332
- }
333
- }
334
-
335
- @media print {
336
- @page :not(:first) {
337
- .print-first-page-only {
338
- display: none !important;
339
- }
340
-
341
- .print-subsequent-pages-only {
342
- display: block !important;
343
- }
344
- }
345
- }
346
-
347
- /* Print typography */
348
- .print-text {
349
- @media print {
350
- font-size: var(--print-font-size);
351
- line-height: var(--print-line-height);
352
- color: var(--print-color);
353
- }
354
- }
355
-
356
- /* Print layout container */
357
- .print-layout {
358
- @media print {
359
- width: 100%;
360
- max-width: none;
361
- margin: 0;
362
- padding: 0;
363
- background: var(--print-bg);
364
- color: var(--print-color);
365
- }
366
- }
367
242
  }
@@ -0,0 +1,24 @@
1
+ @import "tailwindcss";
2
+
3
+ @theme inline {
4
+ /* Semantic token mapping */
5
+ --color-border: var(--color-app-main-500);
6
+ --color-input: var(--color-app-sec-200);
7
+ --color-ring: var(--color-app-main-950);
8
+ --color-background: var(--color-app-main-50);
9
+ --color-foreground: var(--color-app-main-950);
10
+ --color-primary: var(--color-app-main-600);
11
+ --color-primary-foreground: var(--color-app-main-50);
12
+ --color-secondary: var(--color-app-sec-400);
13
+ --color-secondary-foreground: var(--color-app-main-950);
14
+ --color-destructive: var(--color-app-acc-700);
15
+ --color-destructive-foreground: var(--color-app-main-50);
16
+ --color-muted: var(--color-app-sec-100);
17
+ --color-muted-foreground: var(--color-app-main-700);
18
+ --color-accent: var(--color-app-acc-400);
19
+ --color-accent-foreground: var(--color-app-main-950);
20
+ --color-popover: var(--color-app-main-50);
21
+ --color-popover-foreground: var(--color-app-main-950);
22
+ --color-card: var(--color-app-main-50);
23
+ --color-card-foreground: var(--color-app-main-950);
24
+ }
@@ -0,0 +1,77 @@
1
+ // File Reference System Types
2
+ // These types define the structure for the centralized file reference system
3
+
4
+ export interface FileReference {
5
+ id: string;
6
+ table_name: string;
7
+ record_id: string;
8
+ file_path: string;
9
+ file_metadata: FileMetadata;
10
+ organisation_id: string;
11
+ app_id: string;
12
+ is_public: boolean;
13
+ created_at: string;
14
+ updated_at: string;
15
+ }
16
+
17
+ export interface FileMetadata {
18
+ fileName: string;
19
+ fileType: string;
20
+ fileSize?: number;
21
+ width?: number;
22
+ height?: number;
23
+ category: FileCategory;
24
+ hash?: string;
25
+ uploadedBy?: string;
26
+ uploadedAt?: string;
27
+ tags?: string[];
28
+ customMetadata?: Record<string, any>;
29
+ }
30
+
31
+ export enum FileCategory {
32
+ PROFILE_PHOTOS = 'profile_photos',
33
+ ID_DOCUMENTS = 'id_documents',
34
+ QUALIFICATIONS = 'qualifications',
35
+ MEDICAL_DOCUMENTS = 'medical_documents',
36
+ DISH_IMAGES = 'dish_images',
37
+ EVENT_LOGOS = 'event_logos',
38
+ GENERAL_DOCUMENTS = 'general_documents',
39
+ IMAGES = 'images',
40
+ AUDIO = 'audio',
41
+ VIDEO = 'video',
42
+ ARCHIVES = 'archives'
43
+ }
44
+
45
+ export interface FileUploadOptions {
46
+ table_name: string;
47
+ record_id: string;
48
+ organisation_id: string;
49
+ app_id: string;
50
+ category: FileCategory;
51
+ is_public?: boolean;
52
+ custom_metadata?: Record<string, any>;
53
+ }
54
+
55
+ export interface FileReferenceService {
56
+ createFileReference(options: FileUploadOptions, file: File): Promise<FileReference>;
57
+ getFileReference(table_name: string, record_id: string, organisation_id: string): Promise<FileReference | null>;
58
+ getFileUrl(table_name: string, record_id: string, organisation_id: string): Promise<string | null>;
59
+ getSignedUrl(table_name: string, record_id: string, organisation_id: string, expires_in?: number): Promise<string | null>;
60
+ updateFileReference(id: string, updates: Partial<FileReference>): Promise<FileReference>;
61
+ deleteFileReference(table_name: string, record_id: string, organisation_id: string, delete_file?: boolean): Promise<boolean>;
62
+ listFileReferences(table_name: string, record_id: string, organisation_id: string): Promise<FileReference[]>;
63
+ getFileCount(table_name: string, record_id: string, organisation_id: string): Promise<number>;
64
+ }
65
+
66
+ export interface StorageUploadOptions {
67
+ orgId: string;
68
+ category: FileCategory;
69
+ isPublic?: boolean;
70
+ customPath?: string;
71
+ }
72
+
73
+ export interface FileUploadResult {
74
+ file_reference: FileReference;
75
+ file_url: string;
76
+ signed_url?: string;
77
+ }
@@ -0,0 +1,290 @@
1
+ /**
2
+ * @file RBAC Function Types
3
+ * @package @jmruthers/pace-core
4
+ * @module RBAC/Types
5
+ * @since 1.0.0
6
+ *
7
+ * TypeScript types for standardized RBAC functions.
8
+ */
9
+
10
+ import { UUID } from '../rbac/types';
11
+
12
+ // ============================================================================
13
+ // PERMISSION CHECKING FUNCTION TYPES
14
+ // ============================================================================
15
+
16
+ export interface RBACPermissionCheckParams {
17
+ p_operation: string;
18
+ p_page_name: string;
19
+ p_user_id?: UUID;
20
+ p_organisation_id?: UUID;
21
+ p_event_id?: string;
22
+ p_app_id?: UUID;
23
+ }
24
+
25
+ export interface RBACPermissionCheckResult {
26
+ has_permission: boolean;
27
+ role_name: string | null;
28
+ permission_source: 'global' | 'organisation' | 'event_app' | 'default' | 'none';
29
+ granted_at: string | null;
30
+ }
31
+
32
+ export interface RBACPermissionsGetParams {
33
+ p_user_id?: UUID;
34
+ p_organisation_id?: UUID;
35
+ p_event_id?: string;
36
+ p_app_id?: UUID;
37
+ }
38
+
39
+ export interface RBACPermissionsGetResult {
40
+ permission_type: string;
41
+ role_name: string;
42
+ has_permission: boolean;
43
+ granted_at: string;
44
+ context_id: string;
45
+ }
46
+
47
+ export interface RBACAccessValidateParams {
48
+ p_resource_type: 'organisation' | 'event';
49
+ p_resource_id: string;
50
+ p_user_id?: UUID;
51
+ p_operation?: string;
52
+ }
53
+
54
+ export interface RBACAccessValidateResult {
55
+ has_access: boolean;
56
+ access_level: 'super_admin' | 'organisation' | 'event' | 'none';
57
+ context_id: string | null;
58
+ }
59
+
60
+ export interface RBACPageAccessCheckParams {
61
+ p_app_id: UUID;
62
+ p_page_id: string;
63
+ p_operation: string;
64
+ p_user_id?: UUID;
65
+ p_event_id?: string;
66
+ p_organisation_id?: UUID;
67
+ }
68
+
69
+ // ============================================================================
70
+ // ROLE MANAGEMENT FUNCTION TYPES
71
+ // ============================================================================
72
+
73
+ export interface RBACRoleGrantParams {
74
+ p_user_id: UUID;
75
+ p_role_type: 'global' | 'organisation' | 'event_app';
76
+ p_role_name: string;
77
+ p_context_id?: string;
78
+ p_granted_by?: UUID;
79
+ }
80
+
81
+ export interface RBACRoleGrantResult {
82
+ success: boolean;
83
+ message: string;
84
+ role_id: UUID | null;
85
+ error_code: string | null;
86
+ }
87
+
88
+ export interface RBACRoleRevokeParams {
89
+ p_user_id: UUID;
90
+ p_role_type: 'global' | 'organisation' | 'event_app';
91
+ p_role_name: string;
92
+ p_context_id?: string;
93
+ p_revoked_by?: UUID;
94
+ }
95
+
96
+ export interface RBACRoleRevokeResult {
97
+ success: boolean;
98
+ message: string;
99
+ revoked_count: number;
100
+ error_code: string | null;
101
+ }
102
+
103
+ export interface RBACRolesListParams {
104
+ p_user_id?: UUID;
105
+ p_organisation_id?: UUID;
106
+ p_event_id?: string;
107
+ p_app_id?: UUID;
108
+ }
109
+
110
+ export interface RBACRolesListResult {
111
+ role_type: 'global' | 'organisation' | 'event_app';
112
+ role_name: string;
113
+ context_id: string;
114
+ granted_at: string;
115
+ status: 'active' | 'inactive' | 'expired';
116
+ granted_by: UUID | null;
117
+ }
118
+
119
+ export interface RBACRoleValidateParams {
120
+ p_user_id: UUID;
121
+ p_role_type: 'global' | 'organisation' | 'event_app';
122
+ p_role_name: string;
123
+ p_context_id?: string;
124
+ }
125
+
126
+ export interface RBACRoleValidateResult {
127
+ is_valid: boolean;
128
+ role_id: UUID | null;
129
+ granted_at: string | null;
130
+ expires_at: string | null;
131
+ status: string;
132
+ }
133
+
134
+ // ============================================================================
135
+ // SESSION & AUDIT FUNCTION TYPES
136
+ // ============================================================================
137
+
138
+ export interface RBACSessionTrackParams {
139
+ p_user_id?: UUID;
140
+ p_session_type?: 'web' | 'mobile' | 'api' | 'admin';
141
+ p_event_id?: string;
142
+ p_app_id?: UUID;
143
+ p_ip_address?: string;
144
+ p_user_agent?: string;
145
+ }
146
+
147
+ export interface RBACSessionTrackResult {
148
+ success: boolean;
149
+ session_id: UUID | null;
150
+ message: string;
151
+ error_code: string | null;
152
+ }
153
+
154
+ export interface RBACAuditLogParams {
155
+ p_event_type: 'role_granted' | 'role_revoked' | 'permission_checked' | 'access_granted' | 'access_denied' | 'session_started' | 'session_ended' | 'login' | 'logout' | 'organisation_switched' | 'event_switched' | 'app_switched';
156
+ p_user_id?: UUID;
157
+ p_organisation_id?: UUID;
158
+ p_permission?: string;
159
+ p_metadata?: Record<string, any>;
160
+ p_ip_address?: string;
161
+ p_user_agent?: string;
162
+ }
163
+
164
+ export interface RBACAuditLogResult {
165
+ success: boolean;
166
+ audit_id: UUID | null;
167
+ message: string;
168
+ error_code: string | null;
169
+ }
170
+
171
+ // ============================================================================
172
+ // RPC FUNCTION NAMES
173
+ // ============================================================================
174
+
175
+ export enum RPCFunction {
176
+ // Permission Checking Functions
177
+ RBAC_PERMISSION_CHECK = 'rbac_permission_check',
178
+ RBAC_PERMISSIONS_GET = 'rbac_permissions_get',
179
+ RBAC_ACCESS_VALIDATE = 'rbac_access_validate',
180
+ RBAC_PAGE_ACCESS_CHECK = 'rbac_page_access_check',
181
+
182
+ // Role Management Functions
183
+ RBAC_ROLE_GRANT = 'rbac_role_grant',
184
+ RBAC_ROLE_REVOKE = 'rbac_role_revoke',
185
+ RBAC_ROLES_LIST = 'rbac_roles_list',
186
+ RBAC_ROLE_VALIDATE = 'rbac_role_validate',
187
+
188
+ // Session & Audit Functions
189
+ RBAC_SESSION_TRACK = 'rbac_session_track',
190
+ RBAC_AUDIT_LOG = 'rbac_audit_log',
191
+ }
192
+
193
+ // ============================================================================
194
+ // ERROR CODES
195
+ // ============================================================================
196
+
197
+ export enum RBACErrorCode {
198
+ USER_NOT_FOUND = 'USER_NOT_FOUND',
199
+ INVALID_ROLE_TYPE = 'INVALID_ROLE_TYPE',
200
+ INVALID_ROLE_NAME = 'INVALID_ROLE_NAME',
201
+ MISSING_ORGANISATION_ID = 'MISSING_ORGANISATION_ID',
202
+ MISSING_EVENT_APP_CONTEXT = 'MISSING_EVENT_APP_CONTEXT',
203
+ ORGANISATION_NOT_FOUND = 'ORGANISATION_NOT_FOUND',
204
+ EVENT_NOT_FOUND = 'EVENT_NOT_FOUND',
205
+ APP_NOT_FOUND = 'APP_NOT_FOUND',
206
+ INVALID_SESSION_TYPE = 'INVALID_SESSION_TYPE',
207
+ INVALID_EVENT_TYPE = 'INVALID_EVENT_TYPE',
208
+ DATABASE_ERROR = 'DATABASE_ERROR',
209
+ ROLE_NOT_FOUND = 'ROLE_NOT_FOUND',
210
+ USER_NOT_AUTHENTICATED = 'USER_NOT_AUTHENTICATED',
211
+ INVALID_GLOBAL_ROLE = 'INVALID_GLOBAL_ROLE',
212
+ INVALID_ORGANISATION_ROLE = 'INVALID_ORGANISATION_ROLE',
213
+ INVALID_EVENT_APP_ROLE = 'INVALID_EVENT_APP_ROLE',
214
+ INVALID_EVENT_APP_FORMAT = 'INVALID_EVENT_APP_FORMAT',
215
+ MISSING_CONTEXT = 'MISSING_CONTEXT',
216
+ INVALID_CONTEXT = 'INVALID_CONTEXT',
217
+ GRANTED_BY_NOT_FOUND = 'GRANTED_BY_NOT_FOUND',
218
+ }
219
+
220
+ // ============================================================================
221
+ // ROLE TYPES
222
+ // ============================================================================
223
+
224
+ export type GlobalRole = 'super_admin';
225
+ export type OrganisationRole = 'supporter' | 'member' | 'leader' | 'org_admin';
226
+ export type EventAppRole = 'viewer' | 'participant' | 'planner' | 'event_admin';
227
+
228
+ export type RBACRole = GlobalRole | OrganisationRole | EventAppRole;
229
+
230
+ // ============================================================================
231
+ // PERMISSION TYPES
232
+ // ============================================================================
233
+
234
+ export type PermissionOperation = 'read' | 'create' | 'update' | 'delete';
235
+ export type PermissionSource = 'global' | 'organisation' | 'event_app' | 'default' | 'none';
236
+ export type AccessLevel = 'super_admin' | 'organisation' | 'event' | 'none';
237
+
238
+ // ============================================================================
239
+ // SESSION TYPES
240
+ // ============================================================================
241
+
242
+ export type SessionType = 'web' | 'mobile' | 'api' | 'admin';
243
+
244
+ // ============================================================================
245
+ // AUDIT EVENT TYPES
246
+ // ============================================================================
247
+
248
+ export type AuditEventType =
249
+ | 'role_granted'
250
+ | 'role_revoked'
251
+ | 'permission_checked'
252
+ | 'access_granted'
253
+ | 'access_denied'
254
+ | 'session_started'
255
+ | 'session_ended'
256
+ | 'login'
257
+ | 'logout'
258
+ | 'organisation_switched'
259
+ | 'event_switched'
260
+ | 'app_switched';
261
+
262
+ // ============================================================================
263
+ // UTILITY TYPES
264
+ // ============================================================================
265
+
266
+ export interface RBACContext {
267
+ user_id: UUID;
268
+ organisation_id?: UUID;
269
+ event_id?: string;
270
+ app_id?: UUID;
271
+ }
272
+
273
+ export interface RBACResult<T = any> {
274
+ success: boolean;
275
+ data?: T;
276
+ error?: string;
277
+ error_code?: RBACErrorCode;
278
+ }
279
+
280
+ // ============================================================================
281
+ // FUNCTION RESPONSE TYPES
282
+ // ============================================================================
283
+
284
+ export type RBACFunctionResponse<T> = {
285
+ data: T | null;
286
+ error: any | null;
287
+ count?: number | null;
288
+ status: number;
289
+ statusText: string;
290
+ };
@@ -117,34 +117,16 @@ export type TableName =
117
117
  * Supabase RPC function names
118
118
  */
119
119
  export type RPCFunction =
120
- | 'get_rbac_permissions'
121
- | 'get_user_app_permissions'
122
- | 'get_user_current_roles'
123
- | 'get_user_event_access'
124
- | 'get_user_events'
125
- | 'get_user_organisations'
126
- | 'get_user_organisation_ids'
127
- | 'get_user_effective_organisations'
128
- | 'get_app_config'
129
- | 'get_organisation_apps'
130
- | 'get_organisation_hierarchy'
131
- | 'grant_user_role'
132
- | 'revoke_user_role'
133
- | 'grant_direct_app_access'
134
- | 'revoke_direct_app_access'
135
- | 'check_page_permission'
136
- | 'has_organisation_permission'
137
- | 'has_organisation_role'
138
- | 'user_has_role_in_org'
139
- | 'user_has_min_role_in_org'
140
- | 'can_access_event'
141
- | 'can_access_organisation'
142
- | 'is_super_admin'
143
- | 'is_admin'
144
- | 'track_user_session'
145
- | 'record_user_login'
146
- | 'log_organisation_access'
147
- | 'log_medi_access'
120
+ | 'rbac_permission_check'
121
+ | 'rbac_permissions_get'
122
+ | 'rbac_access_validate'
123
+ | 'rbac_page_access_check'
124
+ | 'rbac_role_grant'
125
+ | 'rbac_role_revoke'
126
+ | 'rbac_roles_list'
127
+ | 'rbac_role_validate'
128
+ | 'rbac_session_track'
129
+ | 'rbac_audit_log'
148
130
  | 'get_pace_user_events';
149
131
 
150
132
  /**
@@ -151,7 +151,7 @@ export interface Event {
151
151
  is_visible?: boolean;
152
152
 
153
153
  // Visual branding
154
- event_logo?: string;
154
+ event_logo?: string; // DEPRECATED: Use file_references table instead
155
155
  event_colours?: Record<string, unknown> | null; // JSONB field for theme colors
156
156
  event_col_d1?: string;
157
157
  event_col_d2?: string;
@@ -260,3 +260,6 @@ export interface DataTableColumn<T = unknown> {
260
260
  enableGrouping?: boolean;
261
261
  enableHiding?: boolean;
262
262
  }
263
+
264
+ // Re-export file reference types
265
+ export * from './file-reference';