@jmruthers/pace-core 0.5.116 → 0.5.117

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 (114) hide show
  1. package/dist/{chunk-KMPWND3F.js → chunk-IZXS7RZK.js} +2 -2
  2. package/dist/{chunk-LZYHAL7Y.js → chunk-XN2LYHDI.js} +39 -3
  3. package/dist/chunk-XN2LYHDI.js.map +1 -0
  4. package/dist/hooks.js +1 -1
  5. package/dist/index.js +2 -2
  6. package/dist/rbac/index.js +2 -2
  7. package/docs/api/classes/ColumnFactory.md +1 -1
  8. package/docs/api/classes/ErrorBoundary.md +1 -1
  9. package/docs/api/classes/InvalidScopeError.md +1 -1
  10. package/docs/api/classes/MissingUserContextError.md +1 -1
  11. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  12. package/docs/api/classes/PermissionDeniedError.md +1 -1
  13. package/docs/api/classes/PublicErrorBoundary.md +1 -1
  14. package/docs/api/classes/RBACAuditManager.md +1 -1
  15. package/docs/api/classes/RBACCache.md +1 -1
  16. package/docs/api/classes/RBACEngine.md +1 -1
  17. package/docs/api/classes/RBACError.md +1 -1
  18. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  19. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  20. package/docs/api/classes/StorageUtils.md +1 -1
  21. package/docs/api/enums/FileCategory.md +1 -1
  22. package/docs/api/interfaces/AggregateConfig.md +1 -1
  23. package/docs/api/interfaces/ButtonProps.md +1 -1
  24. package/docs/api/interfaces/CardProps.md +1 -1
  25. package/docs/api/interfaces/ColorPalette.md +1 -1
  26. package/docs/api/interfaces/ColorShade.md +1 -1
  27. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  28. package/docs/api/interfaces/DataRecord.md +1 -1
  29. package/docs/api/interfaces/DataTableAction.md +1 -1
  30. package/docs/api/interfaces/DataTableColumn.md +1 -1
  31. package/docs/api/interfaces/DataTableProps.md +1 -1
  32. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  33. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  34. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  35. package/docs/api/interfaces/EventAppRoleData.md +1 -1
  36. package/docs/api/interfaces/FileDisplayProps.md +1 -1
  37. package/docs/api/interfaces/FileMetadata.md +1 -1
  38. package/docs/api/interfaces/FileReference.md +1 -1
  39. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  40. package/docs/api/interfaces/FileUploadOptions.md +1 -1
  41. package/docs/api/interfaces/FileUploadProps.md +1 -1
  42. package/docs/api/interfaces/FooterProps.md +1 -1
  43. package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
  44. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  45. package/docs/api/interfaces/InputProps.md +1 -1
  46. package/docs/api/interfaces/LabelProps.md +1 -1
  47. package/docs/api/interfaces/LoginFormProps.md +1 -1
  48. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  49. package/docs/api/interfaces/NavigationContextType.md +1 -1
  50. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  51. package/docs/api/interfaces/NavigationItem.md +1 -1
  52. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  53. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  54. package/docs/api/interfaces/Organisation.md +1 -1
  55. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  56. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  57. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  58. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  59. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  60. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  61. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  62. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  63. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  64. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  65. package/docs/api/interfaces/PaletteData.md +1 -1
  66. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  67. package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
  68. package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
  69. package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
  70. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
  71. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  72. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  73. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  74. package/docs/api/interfaces/RBACConfig.md +1 -1
  75. package/docs/api/interfaces/RBACLogger.md +1 -1
  76. package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
  77. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  78. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  79. package/docs/api/interfaces/RoleManagementResult.md +1 -1
  80. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  81. package/docs/api/interfaces/RouteConfig.md +1 -1
  82. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  83. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  84. package/docs/api/interfaces/StorageConfig.md +1 -1
  85. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  86. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  87. package/docs/api/interfaces/StorageListOptions.md +1 -1
  88. package/docs/api/interfaces/StorageListResult.md +1 -1
  89. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  90. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  91. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  92. package/docs/api/interfaces/StyleImport.md +1 -1
  93. package/docs/api/interfaces/SwitchProps.md +1 -1
  94. package/docs/api/interfaces/ToastActionElement.md +1 -1
  95. package/docs/api/interfaces/ToastProps.md +1 -1
  96. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  97. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  98. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  99. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  100. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  101. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  102. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
  103. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  104. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  105. package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
  106. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  107. package/docs/api/interfaces/UserEventAccess.md +1 -1
  108. package/docs/api/interfaces/UserMenuProps.md +1 -1
  109. package/docs/api/interfaces/UserProfile.md +1 -1
  110. package/docs/api/modules.md +2 -2
  111. package/package.json +1 -1
  112. package/src/hooks/useSecureDataAccess.ts +45 -2
  113. package/dist/chunk-LZYHAL7Y.js.map +0 -1
  114. /package/dist/{chunk-KMPWND3F.js.map → chunk-IZXS7RZK.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PageAccessRecord
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PageAccessRecord
2
2
 
3
3
  # Interface: PageAccessRecord
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PagePermissionContextType
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PagePermissionContextType
2
2
 
3
3
  # Interface: PagePermissionContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PagePermissionGuardProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PagePermissionGuardProps
2
2
 
3
3
  # Interface: PagePermissionGuardProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PagePermissionProviderProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PagePermissionProviderProps
2
2
 
3
3
  # Interface: PagePermissionProviderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PaletteData
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PaletteData
2
2
 
3
3
  # Interface: PaletteData
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PermissionEnforcerProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PermissionEnforcerProps
2
2
 
3
3
  # Interface: PermissionEnforcerProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / ProtectedRouteProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / ProtectedRouteProps
2
2
 
3
3
  # Interface: ProtectedRouteProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PublicErrorBoundaryProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PublicErrorBoundaryProps
2
2
 
3
3
  # Interface: PublicErrorBoundaryProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PublicErrorBoundaryState
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PublicErrorBoundaryState
2
2
 
3
3
  # Interface: PublicErrorBoundaryState
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PublicLoadingSpinnerProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PublicLoadingSpinnerProps
2
2
 
3
3
  # Interface: PublicLoadingSpinnerProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PublicPageFooterProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PublicPageFooterProps
2
2
 
3
3
  # Interface: PublicPageFooterProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PublicPageHeaderProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PublicPageHeaderProps
2
2
 
3
3
  # Interface: PublicPageHeaderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / PublicPageLayoutProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / PublicPageLayoutProps
2
2
 
3
3
  # Interface: PublicPageLayoutProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / RBACConfig
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / RBACConfig
2
2
 
3
3
  # Interface: RBACConfig
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / RBACLogger
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / RBACLogger
2
2
 
3
3
  # Interface: RBACLogger
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / RevokeEventAppRoleParams
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / RevokeEventAppRoleParams
2
2
 
3
3
  # Interface: RevokeEventAppRoleParams
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / RoleBasedRouterContextType
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / RoleBasedRouterContextType
2
2
 
3
3
  # Interface: RoleBasedRouterContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / RoleBasedRouterProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / RoleBasedRouterProps
2
2
 
3
3
  # Interface: RoleBasedRouterProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / RoleManagementResult
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / RoleManagementResult
2
2
 
3
3
  # Interface: RoleManagementResult
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / RouteAccessRecord
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / RouteAccessRecord
2
2
 
3
3
  # Interface: RouteAccessRecord
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / RouteConfig
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / RouteConfig
2
2
 
3
3
  # Interface: RouteConfig
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / SecureDataContextType
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / SecureDataContextType
2
2
 
3
3
  # Interface: SecureDataContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / SecureDataProviderProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / SecureDataProviderProps
2
2
 
3
3
  # Interface: SecureDataProviderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / StorageConfig
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / StorageConfig
2
2
 
3
3
  # Interface: StorageConfig
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / StorageFileInfo
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / StorageFileInfo
2
2
 
3
3
  # Interface: StorageFileInfo
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / StorageFileMetadata
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / StorageFileMetadata
2
2
 
3
3
  # Interface: StorageFileMetadata
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / StorageListOptions
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / StorageListOptions
2
2
 
3
3
  # Interface: StorageListOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / StorageListResult
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / StorageListResult
2
2
 
3
3
  # Interface: StorageListResult
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / StorageUploadOptions
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / StorageUploadOptions
2
2
 
3
3
  # Interface: StorageUploadOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / StorageUploadResult
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / StorageUploadResult
2
2
 
3
3
  # Interface: StorageUploadResult
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / StorageUrlOptions
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / StorageUrlOptions
2
2
 
3
3
  # Interface: StorageUrlOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / StyleImport
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / StyleImport
2
2
 
3
3
  # Interface: StyleImport
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / SwitchProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / SwitchProps
2
2
 
3
3
  # Interface: SwitchProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / ToastActionElement
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / ToastActionElement
2
2
 
3
3
  # Interface: ToastActionElement
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / ToastProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / ToastProps
2
2
 
3
3
  # Interface: ToastProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UnifiedAuthContextType
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UnifiedAuthContextType
2
2
 
3
3
  # Interface: UnifiedAuthContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UnifiedAuthProviderProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UnifiedAuthProviderProps
2
2
 
3
3
  # Interface: UnifiedAuthProviderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UseInactivityTrackerOptions
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UseInactivityTrackerOptions
2
2
 
3
3
  # Interface: UseInactivityTrackerOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UseInactivityTrackerReturn
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UseInactivityTrackerReturn
2
2
 
3
3
  # Interface: UseInactivityTrackerReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UsePublicEventOptions
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UsePublicEventOptions
2
2
 
3
3
  # Interface: UsePublicEventOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UsePublicEventReturn
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UsePublicEventReturn
2
2
 
3
3
  # Interface: UsePublicEventReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UsePublicFileDisplayOptions
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UsePublicFileDisplayOptions
2
2
 
3
3
  # Interface: UsePublicFileDisplayOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UsePublicFileDisplayReturn
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UsePublicFileDisplayReturn
2
2
 
3
3
  # Interface: UsePublicFileDisplayReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UsePublicRouteParamsReturn
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UsePublicRouteParamsReturn
2
2
 
3
3
  # Interface: UsePublicRouteParamsReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UseResolvedScopeOptions
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UseResolvedScopeOptions
2
2
 
3
3
  # Interface: UseResolvedScopeOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UseResolvedScopeReturn
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UseResolvedScopeReturn
2
2
 
3
3
  # Interface: UseResolvedScopeReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UserEventAccess
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UserEventAccess
2
2
 
3
3
  # Interface: UserEventAccess
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UserMenuProps
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UserMenuProps
2
2
 
3
3
  # Interface: UserMenuProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.116](../README.md) / [Exports](../modules.md) / UserProfile
1
+ [@jmruthers/pace-core - v0.5.117](../README.md) / [Exports](../modules.md) / UserProfile
2
2
 
3
3
  # Interface: UserProfile
4
4
 
@@ -1,6 +1,6 @@
1
- [@jmruthers/pace-core - v0.5.116](README.md) / Exports
1
+ [@jmruthers/pace-core - v0.5.117](README.md) / Exports
2
2
 
3
- # @jmruthers/pace-core - v0.5.116
3
+ # @jmruthers/pace-core - v0.5.117
4
4
 
5
5
  **`File`**
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jmruthers/pace-core",
3
- "version": "0.5.116",
3
+ "version": "0.5.117",
4
4
  "description": "Clean, modern React component library with Tailwind v4 styling and native utilities",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -51,9 +51,10 @@
51
51
  * - Type-safe database operations
52
52
  */
53
53
 
54
- import { useCallback, useState } from 'react';
54
+ import { useCallback, useState, useContext } from 'react';
55
55
  import { useUnifiedAuth } from '../providers';
56
56
  import { useOrganisations } from './useOrganisations';
57
+ import { EventServiceContext } from '../providers/services/EventServiceProvider';
57
58
  import { setOrganisationContext } from '../utils/organisationContext';
58
59
  import type { Permission } from '../rbac/types';
59
60
  import type { OrganisationSecurityError } from '../types/organisation';
@@ -149,6 +150,11 @@ export interface DataAccessRecord {
149
150
  export function useSecureDataAccess(): SecureDataAccessReturn {
150
151
  const { supabase, user, session } = useUnifiedAuth();
151
152
  const { ensureOrganisationContext } = useOrganisations();
153
+
154
+ // Get selected event for event-scoped RPC calls
155
+ // Use useContext directly to safely check if EventServiceProvider is available
156
+ const eventServiceContext = useContext(EventServiceContext);
157
+ const selectedEvent = eventServiceContext?.eventService?.getSelectedEvent() || null;
152
158
 
153
159
  const validateContext = useCallback((): void => {
154
160
  if (!supabase) {
@@ -469,10 +475,47 @@ export function useSecureDataAccess(): SecureDataAccessReturn {
469
475
  ? 'p_organisation_id'
470
476
  : 'organisation_id';
471
477
 
478
+ // Functions that need p_event_id for event-app role permission checks
479
+ // Note: Even org-scoped functions (like items, packages, suppliers) need event_id
480
+ // for permission checks when users have event-app roles
481
+ const functionsNeedingEventId = [
482
+ 'data_cake_items_list',
483
+ 'data_cake_packages_list',
484
+ 'data_cake_suppliers_list',
485
+ 'data_cake_diettypes_list',
486
+ 'data_cake_mealtypes_list',
487
+ 'data_cake_diners_list',
488
+ 'data_cake_mealplans_list',
489
+ 'data_cake_dishes_list',
490
+ 'data_cake_recipes_list',
491
+ 'data_cake_meals_list',
492
+ 'data_cake_units_list',
493
+ 'data_cake_orders_list',
494
+ 'app_cake_item_create',
495
+ 'app_cake_item_update',
496
+ 'app_cake_package_create',
497
+ 'app_cake_package_update',
498
+ 'app_cake_supplier_create',
499
+ 'app_cake_supplier_update',
500
+ 'app_cake_supplier_delete',
501
+ 'app_cake_meal_create',
502
+ 'app_cake_meal_update',
503
+ 'app_cake_meal_delete',
504
+ 'app_cake_unit_create',
505
+ 'app_cake_unit_update',
506
+ 'app_cake_unit_delete',
507
+ 'app_cake_delivery_upsert'
508
+ ];
509
+
472
510
  const secureParams = {
473
511
  ...params,
474
512
  [paramName]: organisationId
475
513
  };
514
+
515
+ // Add p_event_id if function needs it and event is selected
516
+ if (functionsNeedingEventId.includes(functionName) && selectedEvent?.event_id) {
517
+ secureParams.p_event_id = selectedEvent.event_id;
518
+ }
476
519
 
477
520
  const { data, error } = await supabase!.rpc(functionName, secureParams);
478
521
 
@@ -486,7 +529,7 @@ export function useSecureDataAccess(): SecureDataAccessReturn {
486
529
  });
487
530
 
488
531
  return data as T;
489
- }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);
532
+ }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase, selectedEvent?.event_id]);
490
533
 
491
534
  // NEW: Phase 1 - Enhanced Security Features
492
535
  const [dataAccessHistory, setDataAccessHistory] = useState<DataAccessRecord[]>([]);
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/hooks/useSecureDataAccess.ts"],"sourcesContent":["/**\n * @file useSecureDataAccess Hook\n * @package @jmruthers/pace-core\n * @module Hooks/useSecureDataAccess\n * @since 0.4.0\n *\n * Hook for secure database operations with mandatory organisation context.\n * Ensures all data access is properly scoped to the user's current organisation.\n *\n * @example\n * ```tsx\n * function DataComponent() {\n * const { secureQuery, secureInsert, secureUpdate, secureDelete } = useSecureDataAccess();\n * \n * const loadData = async () => {\n * try {\n * // Automatically includes organisation_id filter\n * const events = await secureQuery('event', '*', { is_visible: true });\n * console.log('Organisation events:', events);\n * } catch (error) {\n * console.error('Failed to load data:', error);\n * }\n * };\n * \n * const createEvent = async (eventData) => {\n * try {\n * // Automatically sets organisation_id\n * const newEvent = await secureInsert('event', eventData);\n * console.log('Created event:', newEvent);\n * } catch (error) {\n * console.error('Failed to create event:', error);\n * }\n * };\n * \n * return (\n * <div>\n * <button onClick={loadData}>Load Data</button>\n * <button onClick={() => createEvent({ event_name: 'New Event' })}>\n * Create Event\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * @security\n * - All queries automatically include organisation_id filter\n * - Validates organisation context before any operation\n * - Prevents data leaks between organisations\n * - Error handling for security violations\n * - Type-safe database operations\n */\n\nimport { useCallback, useState } from 'react';\nimport { useUnifiedAuth } from '../providers';\nimport { useOrganisations } from './useOrganisations';\nimport { setOrganisationContext } from '../utils/organisationContext';\nimport type { Permission } from '../rbac/types';\nimport type { OrganisationSecurityError } from '../types/organisation';\n\nexport interface SecureDataAccessReturn {\n /** Execute a secure query with organisation filtering */\n secureQuery: <T = any>(\n table: string,\n columns: string,\n filters?: Record<string, any>,\n options?: {\n orderBy?: string;\n ascending?: boolean;\n limit?: number;\n offset?: number;\n }\n ) => Promise<T[]>;\n \n /** Execute a secure insert with organisation context */\n secureInsert: <T = any>(\n table: string,\n data: Record<string, any>\n ) => Promise<T>;\n \n /** Execute a secure update with organisation filtering */\n secureUpdate: <T = any>(\n table: string,\n data: Record<string, any>,\n filters: Record<string, any>\n ) => Promise<T[]>;\n \n /** Execute a secure delete with organisation filtering */\n secureDelete: (\n table: string,\n filters: Record<string, any>\n ) => Promise<void>;\n \n /** Execute a secure RPC call with organisation context */\n secureRpc: <T = any>(\n functionName: string,\n params?: Record<string, any>\n ) => Promise<T>;\n \n /** Get current organisation ID */\n getCurrentOrganisationId: () => string;\n \n /** Validate organisation context */\n validateContext: () => void;\n \n // NEW: Phase 1 - Enhanced Security Features\n /** Check if data access is allowed for a table and operation */\n isDataAccessAllowed: (table: string, operation: string) => boolean;\n \n /** Get all data access permissions for current user */\n getDataAccessPermissions: () => Record<string, string[]>;\n \n /** Check if strict mode is enabled */\n isStrictMode: boolean;\n \n /** Check if audit logging is enabled */\n isAuditLogEnabled: boolean;\n \n /** Get data access history */\n getDataAccessHistory: () => DataAccessRecord[];\n \n /** Clear data access history */\n clearDataAccessHistory: () => void;\n \n /** Validate data access attempt */\n validateDataAccess: (table: string, operation: string) => boolean;\n}\n\nexport interface DataAccessRecord {\n table: string;\n operation: string;\n userId: string;\n organisationId: string;\n allowed: boolean;\n timestamp: string;\n query?: string;\n filters?: Record<string, any>;\n}\n\n/**\n * Hook for secure data access with automatic organisation filtering\n * \n * All database operations automatically include organisation context:\n * - Queries filter by organisation_id\n * - Inserts include organisation_id\n * - Updates/deletes are scoped to organisation\n * - RPC calls include organisation_id parameter\n */\nexport function useSecureDataAccess(): SecureDataAccessReturn {\n const { supabase, user, session } = useUnifiedAuth();\n const { ensureOrganisationContext } = useOrganisations();\n\n const validateContext = useCallback((): void => {\n if (!supabase) {\n throw new Error('No Supabase client available') as OrganisationSecurityError;\n }\n if (!user || !session) {\n throw new Error('User must be authenticated with valid session') as OrganisationSecurityError;\n }\n \n try {\n ensureOrganisationContext();\n } catch (error) {\n throw new Error('Organisation context is required for data access') as OrganisationSecurityError;\n }\n }, [supabase, user, session, ensureOrganisationContext]);\n\n const getCurrentOrganisationId = useCallback((): string => {\n validateContext();\n const currentOrg = ensureOrganisationContext();\n return currentOrg.id;\n }, [validateContext, ensureOrganisationContext]);\n\n // Set organisation context in database session\n const setOrganisationContextInSession = useCallback(async (organisationId: string): Promise<void> => {\n if (!supabase) {\n throw new Error('No Supabase client available') as OrganisationSecurityError;\n }\n\n await setOrganisationContext(supabase, organisationId);\n }, [supabase]);\n\n const secureQuery = useCallback(async <T = any>(\n table: string,\n columns: string,\n filters: Record<string, any> = {},\n options: {\n orderBy?: string;\n ascending?: boolean;\n limit?: number;\n offset?: number;\n } = {}\n ): Promise<T[]> => {\n validateContext();\n const organisationId = getCurrentOrganisationId();\n \n console.log('[useSecureDataAccess] Executing secure query:', {\n table,\n organisationId,\n filters\n });\n\n // Set organisation context in database session\n await setOrganisationContextInSession(organisationId);\n\n // Build query with organisation filter\n let query = supabase!\n .from(table)\n .select(columns);\n\n // Add organisation filter only if table has organisation_id column\n const tablesWithOrganisation = [\n 'event', 'organisation_settings',\n 'rbac_event_app_roles', 'rbac_organisation_roles',\n // SECURITY: Phase 2 additions - complete organisation table mapping\n 'organisation_audit_log', 'organisation_invitations', 'organisation_app_access',\n // SECURITY: Emergency additions for Phase 1 fixes\n 'cake_meal', 'cake_mealtype', 'pace_person', 'pace_member',\n // SECURITY: Phase 3A additions - medical and personal data\n 'medi_profile', 'medi_condition', 'medi_diet', 'medi_action_plan', 'medi_profile_versions',\n 'pace_consent', 'pace_contact', 'pace_id_documents', 'pace_qualifications',\n 'form_responses', 'form_response_values', 'forms',\n // SECURITY: Phase 3B additions - remaining critical tables\n 'invoice', 'line_item', 'credit_balance', 'payment_method',\n 'form_contexts', 'form_field_config', 'form_fields',\n 'cake_delivery', 'cake_diettype', 'cake_diner', 'cake_dish', 'cake_item', \n 'cake_logistics', 'cake_mealplan', 'cake_package', 'cake_recipe', 'cake_supplier', \n 'cake_supply', 'cake_unit', 'event_app_access', 'base_application', 'base_questions'\n ];\n \n if (tablesWithOrganisation.includes(table)) {\n query = query.eq('organisation_id', organisationId);\n }\n\n // Apply additional filters\n Object.entries(filters).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n // Handle qualified column names (e.g., 'users.role')\n const columnName = key.includes('.') ? key.split('.').pop()! : key;\n query = query.eq(columnName, value);\n }\n });\n\n // Apply options\n if (options.orderBy) {\n // Only use the column name, not a qualified name\n const orderByColumn = options.orderBy.split('.').pop();\n if (orderByColumn) {\n query = query.order(orderByColumn, { ascending: options.ascending ?? true });\n }\n }\n \n if (options.limit) {\n query = query.limit(options.limit);\n }\n \n if (options.offset) {\n query = query.range(options.offset, options.offset + (options.limit || 100) - 1);\n }\n\n const { data, error } = await query;\n \n if (error) {\n console.error('[useSecureDataAccess] Query failed:', error);\n // NEW: Phase 1 - Record failed data access attempt\n recordDataAccess(table, 'read', false, `SELECT ${columns} FROM ${table}`, filters);\n throw error;\n }\n\n console.log('[useSecureDataAccess] Query successful:', {\n table,\n resultCount: data?.length || 0\n });\n\n // NEW: Phase 1 - Record successful data access attempt\n recordDataAccess(table, 'read', true, `SELECT ${columns} FROM ${table}`, filters);\n\n return (data as T[]) || [];\n }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);\n\n const secureInsert = useCallback(async <T = any>(\n table: string,\n data: Record<string, any>\n ): Promise<T> => {\n validateContext();\n const organisationId = getCurrentOrganisationId();\n \n console.log('[useSecureDataAccess] Executing secure insert:', {\n table,\n organisationId\n });\n\n // Set organisation context in database session\n await setOrganisationContextInSession(organisationId);\n\n // Ensure organisation_id is set\n const secureData = {\n ...data,\n organisation_id: organisationId\n };\n\n const { data: insertData, error } = await supabase!\n .from(table)\n .insert(secureData)\n .select()\n .single();\n\n if (error) {\n console.error('[useSecureDataAccess] Insert failed:', error);\n throw error;\n }\n\n console.log('[useSecureDataAccess] Insert successful:', {\n table,\n id: insertData?.id\n });\n\n return insertData as T;\n }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);\n\n const secureUpdate = useCallback(async <T = any>(\n table: string,\n data: Record<string, any>,\n filters: Record<string, any>\n ): Promise<T[]> => {\n validateContext();\n const organisationId = getCurrentOrganisationId();\n \n console.log('[useSecureDataAccess] Executing secure update:', {\n table,\n organisationId,\n filters\n });\n\n // Set organisation context in database session\n await setOrganisationContextInSession(organisationId);\n\n // Filter out organisation_id from data to prevent manipulation\n const { organisation_id, ...secureData } = data;\n \n // Build update query with organisation filter\n let query = supabase!\n .from(table)\n .update(secureData);\n\n // Add organisation filter only if table has organisation_id column\n const tablesWithOrganisation = [\n 'event', 'organisation_settings',\n 'rbac_event_app_roles', 'rbac_organisation_roles',\n // SECURITY: Phase 2 additions - complete organisation table mapping\n 'organisation_audit_log', 'organisation_invitations', 'organisation_app_access',\n // SECURITY: Emergency additions for Phase 1 fixes\n 'cake_meal', 'cake_mealtype', 'pace_person', 'pace_member'\n ];\n \n if (tablesWithOrganisation.includes(table)) {\n query = query.eq('organisation_id', organisationId);\n }\n\n // Apply filters\n Object.entries(filters).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n query = query.eq(key, value);\n }\n });\n\n const { data: updateData, error } = await query.select();\n\n if (error) {\n console.error('[useSecureDataAccess] Update failed:', error);\n throw error;\n }\n\n console.log('[useSecureDataAccess] Update successful:', {\n table,\n updatedCount: updateData?.length || 0\n });\n\n return (updateData as T[]) || [];\n }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);\n\n const secureDelete = useCallback(async (\n table: string,\n filters: Record<string, any>\n ): Promise<void> => {\n validateContext();\n const organisationId = getCurrentOrganisationId();\n \n console.log('[useSecureDataAccess] Executing secure delete:', {\n table,\n organisationId,\n filters\n });\n\n // Set organisation context in database session\n await setOrganisationContextInSession(organisationId);\n\n // Build delete query with organisation filter\n let query = supabase!\n .from(table)\n .delete();\n\n // Add organisation filter only if table has organisation_id column\n const tablesWithOrganisation = [\n 'event', 'organisation_settings',\n 'rbac_event_app_roles', 'rbac_organisation_roles',\n // SECURITY: Phase 2 additions - complete organisation table mapping\n 'organisation_audit_log', 'organisation_invitations', 'organisation_app_access',\n // SECURITY: Emergency additions for Phase 1 fixes\n 'cake_meal', 'cake_mealtype', 'pace_person', 'pace_member',\n // SECURITY: Phase 3A additions - medical and personal data\n 'medi_profile', 'medi_condition', 'medi_diet', 'medi_action_plan', 'medi_profile_versions',\n 'pace_consent', 'pace_contact', 'pace_id_documents', 'pace_qualifications',\n 'form_responses', 'form_response_values', 'forms',\n // SECURITY: Phase 3B additions - remaining critical tables\n 'invoice', 'line_item', 'credit_balance', 'payment_method',\n 'form_contexts', 'form_field_config', 'form_fields',\n 'cake_delivery', 'cake_diettype', 'cake_diner', 'cake_dish', 'cake_item', \n 'cake_logistics', 'cake_mealplan', 'cake_package', 'cake_recipe', 'cake_supplier', \n 'cake_supply', 'cake_unit', 'event_app_access', 'base_application', 'base_questions'\n ];\n \n if (tablesWithOrganisation.includes(table)) {\n query = query.eq('organisation_id', organisationId);\n }\n\n // Apply filters\n Object.entries(filters).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n query = query.eq(key, value);\n }\n });\n\n const { error } = await query;\n\n if (error) {\n console.error('[useSecureDataAccess] Delete failed:', error);\n throw error;\n }\n\n console.log('[useSecureDataAccess] Delete successful:', {\n table\n });\n }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);\n\n const secureRpc = useCallback(async <T = any>(\n functionName: string,\n params: Record<string, any> = {}\n ): Promise<T> => {\n validateContext();\n const organisationId = getCurrentOrganisationId();\n \n console.log('[useSecureDataAccess] Executing secure RPC:', {\n functionName,\n organisationId\n });\n\n // Set organisation context in database session\n await setOrganisationContextInSession(organisationId);\n\n // Include organisation_id in RPC parameters\n // Some functions use p_organisation_id instead of organisation_id (to avoid conflicts with RETURNS TABLE columns)\n const functionsWithPOrganisationId = [\n 'data_cake_diners_list',\n 'data_cake_mealplans_list'\n ];\n \n const paramName = functionsWithPOrganisationId.includes(functionName) \n ? 'p_organisation_id' \n : 'organisation_id';\n \n const secureParams = {\n ...params,\n [paramName]: organisationId\n };\n\n const { data, error } = await supabase!.rpc(functionName, secureParams);\n\n if (error) {\n console.error('[useSecureDataAccess] RPC failed:', error);\n throw error;\n }\n\n console.log('[useSecureDataAccess] RPC successful:', {\n functionName\n });\n\n return data as T;\n }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);\n\n // NEW: Phase 1 - Enhanced Security Features\n const [dataAccessHistory, setDataAccessHistory] = useState<DataAccessRecord[]>([]);\n const [isStrictMode] = useState(true); // Always enabled in Phase 1\n const [isAuditLogEnabled] = useState(true); // Always enabled in Phase 1\n\n // Check if data access is allowed for a table and operation\n const isDataAccessAllowed = useCallback((table: string, operation: string): boolean => {\n if (!user?.id) return false;\n \n // Use the existing RBAC system to check data access permissions\n // This is a synchronous check for the context - actual permission checking\n // happens in the secure data operations using the RBAC engine\n const permission = `${operation}:data.${table}` as Permission;\n \n // For now, we'll return true and let the secure data operations\n // handle the actual permission checking asynchronously\n // This context is mainly for tracking and audit purposes\n return true;\n }, [user?.id]);\n\n // Get all data access permissions for current user\n const getDataAccessPermissions = useCallback((): Record<string, string[]> => {\n if (!user?.id) return {};\n \n // For now, return empty object - this will be enhanced with actual permission checking\n // when we integrate with the existing RBAC system\n return {};\n }, [user?.id]);\n\n // Get data access history\n const getDataAccessHistory = useCallback((): DataAccessRecord[] => {\n return [...dataAccessHistory];\n }, [dataAccessHistory]);\n\n // Clear data access history\n const clearDataAccessHistory = useCallback(() => {\n setDataAccessHistory([]);\n }, []);\n\n // Validate data access attempt\n const validateDataAccess = useCallback((table: string, operation: string): boolean => {\n if (!user?.id) return false;\n \n // Validate organisation context\n try {\n validateContext();\n } catch (error) {\n console.error(`[useSecureDataAccess] Organisation context validation failed:`, error);\n return false;\n }\n \n return isDataAccessAllowed(table, operation);\n }, [user?.id, validateContext, isDataAccessAllowed]);\n\n // Record data access attempt\n const recordDataAccess = useCallback((\n table: string,\n operation: string,\n allowed: boolean,\n query?: string,\n filters?: Record<string, any>\n ) => {\n if (!isAuditLogEnabled || !user?.id) return;\n \n const record: DataAccessRecord = {\n table,\n operation,\n userId: user.id,\n organisationId: getCurrentOrganisationId(),\n allowed,\n timestamp: new Date().toISOString(),\n query,\n filters\n };\n \n setDataAccessHistory(prev => {\n const newHistory = [record, ...prev];\n return newHistory.slice(0, 1000); // Keep last 1000 records\n });\n \n if (isStrictMode && !allowed) {\n console.error(`[useSecureDataAccess] STRICT MODE VIOLATION: User attempted data access without permission`, {\n table,\n operation,\n userId: user.id,\n organisationId: getCurrentOrganisationId(),\n timestamp: new Date().toISOString()\n });\n }\n }, [isAuditLogEnabled, isStrictMode, user?.id, getCurrentOrganisationId]);\n\n return {\n secureQuery,\n secureInsert,\n secureUpdate,\n secureDelete,\n secureRpc,\n getCurrentOrganisationId,\n validateContext,\n // NEW: Phase 1 - Enhanced Security Features\n isDataAccessAllowed,\n getDataAccessPermissions,\n isStrictMode,\n isAuditLogEnabled,\n getDataAccessHistory,\n clearDataAccessHistory,\n validateDataAccess\n };\n} "],"mappings":";;;;;;;;;;;;;AAqDA,SAAS,aAAa,gBAAgB;AAEtC;AACA;AA4FO,SAAS,sBAA8C;AAC5D,QAAM,EAAE,UAAU,MAAM,QAAQ,IAAI,eAAe;AACnD,QAAM,EAAE,0BAA0B,IAAI,iBAAiB;AAEvD,QAAM,kBAAkB,YAAY,MAAY;AAC9C,QAAI,CAAC,UAAU;AACb,YAAM,IAAI,MAAM,8BAA8B;AAAA,IAChD;AACA,QAAI,CAAC,QAAQ,CAAC,SAAS;AACrB,YAAM,IAAI,MAAM,+CAA+C;AAAA,IACjE;AAEA,QAAI;AACF,gCAA0B;AAAA,IAC5B,SAAS,OAAO;AACd,YAAM,IAAI,MAAM,kDAAkD;AAAA,IACpE;AAAA,EACF,GAAG,CAAC,UAAU,MAAM,SAAS,yBAAyB,CAAC;AAEvD,QAAM,2BAA2B,YAAY,MAAc;AACzD,oBAAgB;AAChB,UAAM,aAAa,0BAA0B;AAC7C,WAAO,WAAW;AAAA,EACpB,GAAG,CAAC,iBAAiB,yBAAyB,CAAC;AAG/C,QAAM,kCAAkC,YAAY,OAAO,mBAA0C;AACnG,QAAI,CAAC,UAAU;AACb,YAAM,IAAI,MAAM,8BAA8B;AAAA,IAChD;AAEA,UAAM,uBAAuB,UAAU,cAAc;AAAA,EACvD,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,cAAc,YAAY,OAC9B,OACA,SACA,UAA+B,CAAC,GAChC,UAKI,CAAC,MACY;AACjB,oBAAgB;AAChB,UAAM,iBAAiB,yBAAyB;AAEhD,YAAQ,IAAI,iDAAiD;AAAA,MAC3D;AAA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