@jmruthers/pace-core 0.5.189 → 0.5.191

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 (438) hide show
  1. package/core-usage-manifest.json +0 -4
  2. package/dist/{AuthService-B-cd2MA4.d.ts → AuthService-CbP_utw2.d.ts} +7 -3
  3. package/dist/{DataTable-IVYljGJ6.d.ts → DataTable-Be6dH_dR.d.ts} +1 -1
  4. package/dist/{DataTable-GUFUNZ3N.js → DataTable-WKRZD47S.js} +8 -8
  5. package/dist/{PublicPageProvider-B8HaLe69.d.ts → PublicPageProvider-ULXC_u6U.d.ts} +84 -25
  6. package/dist/{UnifiedAuthProvider-BG0AL5eE.d.ts → UnifiedAuthProvider-BYA9qB-o.d.ts} +4 -3
  7. package/dist/{UnifiedAuthProvider-643PUAIM.js → UnifiedAuthProvider-FTSG5XH7.js} +4 -2
  8. package/dist/{api-YP7XD5L6.js → api-IHKALJZD.js} +4 -2
  9. package/dist/{chunk-VGZZXKBR.js → chunk-6LTQQAT6.js} +351 -157
  10. package/dist/chunk-6LTQQAT6.js.map +1 -0
  11. package/dist/{chunk-MX64ZF6I.js → chunk-6TQDD426.js} +15 -15
  12. package/dist/chunk-6TQDD426.js.map +1 -0
  13. package/dist/{chunk-YHCN776L.js → chunk-G37KK66H.js} +2 -75
  14. package/dist/chunk-G37KK66H.js.map +1 -0
  15. package/dist/{chunk-THRPYOFK.js → chunk-HW3OVDUF.js} +5 -5
  16. package/dist/chunk-HW3OVDUF.js.map +1 -0
  17. package/dist/{chunk-F2IMUDXZ.js → chunk-I7PSE6JW.js} +75 -2
  18. package/dist/chunk-I7PSE6JW.js.map +1 -0
  19. package/dist/{chunk-IM4QE42D.js → chunk-LOMZXPSN.js} +141 -326
  20. package/dist/chunk-LOMZXPSN.js.map +1 -0
  21. package/dist/chunk-OETXORNB.js +614 -0
  22. package/dist/chunk-OETXORNB.js.map +1 -0
  23. package/dist/{chunk-HESYZWZW.js → chunk-QWWZ5CAQ.js} +2 -2
  24. package/dist/{chunk-HEHYGYOX.js → chunk-ROXMHMY2.js} +403 -46
  25. package/dist/chunk-ROXMHMY2.js.map +1 -0
  26. package/dist/{chunk-2UUZZJFT.js → chunk-ULHIJK66.js} +228 -177
  27. package/dist/{chunk-2UUZZJFT.js.map → chunk-ULHIJK66.js.map} +1 -1
  28. package/dist/{chunk-YGPFYGA6.js → chunk-VKB2CO4Z.js} +838 -503
  29. package/dist/chunk-VKB2CO4Z.js.map +1 -0
  30. package/dist/{chunk-3GOZZZYH.js → chunk-VRGWKHDB.js} +238 -301
  31. package/dist/chunk-VRGWKHDB.js.map +1 -0
  32. package/dist/{chunk-UCQSRW7Z.js → chunk-XNYQOL3Z.js} +431 -384
  33. package/dist/chunk-XNYQOL3Z.js.map +1 -0
  34. package/dist/{chunk-DDM4CCYT.js → chunk-XYXSXPUK.js} +79 -59
  35. package/dist/chunk-XYXSXPUK.js.map +1 -0
  36. package/dist/{chunk-SAUPYVLF.js → chunk-ZSAAAMVR.js} +1 -1
  37. package/dist/chunk-ZSAAAMVR.js.map +1 -0
  38. package/dist/components.d.ts +5 -6
  39. package/dist/components.js +19 -19
  40. package/dist/components.js.map +1 -1
  41. package/dist/{database.generated-DI89OQeI.d.ts → database.generated-CzIvgcPu.d.ts} +165 -201
  42. package/dist/eslint-rules/pace-core-compliance.cjs +0 -2
  43. package/dist/{file-reference-D037xOFK.d.ts → file-reference-BavO2eQj.d.ts} +13 -10
  44. package/dist/hooks.d.ts +20 -15
  45. package/dist/hooks.js +14 -8
  46. package/dist/hooks.js.map +1 -1
  47. package/dist/index.d.ts +17 -15
  48. package/dist/index.js +86 -81
  49. package/dist/index.js.map +1 -1
  50. package/dist/providers.d.ts +3 -3
  51. package/dist/providers.js +3 -1
  52. package/dist/rbac/index.d.ts +77 -13
  53. package/dist/rbac/index.js +12 -9
  54. package/dist/{types-Bwgl--Xo.d.ts → types-CEpcvwwF.d.ts} +1 -1
  55. package/dist/types.d.ts +3 -3
  56. package/dist/types.js +1 -1
  57. package/dist/{usePublicRouteParams-CTDELQ7H.d.ts → usePublicRouteParams-TZe0gy-4.d.ts} +17 -10
  58. package/dist/utils.d.ts +8 -8
  59. package/dist/utils.js +16 -16
  60. package/docs/README.md +2 -2
  61. package/docs/api/classes/ColumnFactory.md +1 -1
  62. package/docs/api/classes/ErrorBoundary.md +1 -1
  63. package/docs/api/classes/InvalidScopeError.md +2 -2
  64. package/docs/api/classes/Logger.md +1 -1
  65. package/docs/api/classes/MissingUserContextError.md +2 -2
  66. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  67. package/docs/api/classes/PermissionDeniedError.md +1 -1
  68. package/docs/api/classes/RBACAuditManager.md +2 -2
  69. package/docs/api/classes/RBACCache.md +1 -1
  70. package/docs/api/classes/RBACEngine.md +5 -5
  71. package/docs/api/classes/RBACError.md +1 -1
  72. package/docs/api/classes/RBACNotInitializedError.md +2 -2
  73. package/docs/api/classes/SecureSupabaseClient.md +25 -20
  74. package/docs/api/classes/StorageUtils.md +7 -4
  75. package/docs/api/enums/FileCategory.md +1 -1
  76. package/docs/api/enums/LogLevel.md +1 -1
  77. package/docs/api/enums/RBACErrorCode.md +1 -1
  78. package/docs/api/enums/RPCFunction.md +1 -1
  79. package/docs/api/interfaces/AddressFieldProps.md +1 -1
  80. package/docs/api/interfaces/AddressFieldRef.md +1 -1
  81. package/docs/api/interfaces/AggregateConfig.md +1 -1
  82. package/docs/api/interfaces/AutocompleteOptions.md +1 -1
  83. package/docs/api/interfaces/AvatarProps.md +1 -1
  84. package/docs/api/interfaces/BadgeProps.md +1 -1
  85. package/docs/api/interfaces/ButtonProps.md +1 -1
  86. package/docs/api/interfaces/CalendarProps.md +20 -6
  87. package/docs/api/interfaces/CardProps.md +1 -1
  88. package/docs/api/interfaces/ColorPalette.md +1 -1
  89. package/docs/api/interfaces/ColorShade.md +1 -1
  90. package/docs/api/interfaces/ComplianceResult.md +1 -1
  91. package/docs/api/interfaces/DataAccessRecord.md +9 -9
  92. package/docs/api/interfaces/DataRecord.md +1 -1
  93. package/docs/api/interfaces/DataTableAction.md +1 -1
  94. package/docs/api/interfaces/DataTableColumn.md +1 -1
  95. package/docs/api/interfaces/DataTableProps.md +1 -1
  96. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  97. package/docs/api/interfaces/DatabaseComplianceResult.md +1 -1
  98. package/docs/api/interfaces/DatabaseIssue.md +1 -1
  99. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  100. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  101. package/docs/api/interfaces/EventAppRoleData.md +1 -1
  102. package/docs/api/interfaces/ExportColumn.md +1 -1
  103. package/docs/api/interfaces/ExportOptions.md +1 -1
  104. package/docs/api/interfaces/FileDisplayProps.md +62 -16
  105. package/docs/api/interfaces/FileMetadata.md +1 -1
  106. package/docs/api/interfaces/FileReference.md +2 -2
  107. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  108. package/docs/api/interfaces/FileUploadOptions.md +26 -12
  109. package/docs/api/interfaces/FileUploadProps.md +30 -19
  110. package/docs/api/interfaces/FooterProps.md +1 -1
  111. package/docs/api/interfaces/FormFieldProps.md +1 -1
  112. package/docs/api/interfaces/FormProps.md +1 -1
  113. package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
  114. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  115. package/docs/api/interfaces/InputProps.md +1 -1
  116. package/docs/api/interfaces/LabelProps.md +1 -1
  117. package/docs/api/interfaces/LoggerConfig.md +1 -1
  118. package/docs/api/interfaces/LoginFormProps.md +1 -1
  119. package/docs/api/interfaces/NavigationAccessRecord.md +10 -10
  120. package/docs/api/interfaces/NavigationContextType.md +9 -9
  121. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  122. package/docs/api/interfaces/NavigationItem.md +1 -1
  123. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  124. package/docs/api/interfaces/NavigationProviderProps.md +7 -7
  125. package/docs/api/interfaces/Organisation.md +1 -1
  126. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  127. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  128. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  129. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  130. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  131. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  132. package/docs/api/interfaces/PageAccessRecord.md +8 -8
  133. package/docs/api/interfaces/PagePermissionContextType.md +8 -8
  134. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  135. package/docs/api/interfaces/PagePermissionProviderProps.md +7 -7
  136. package/docs/api/interfaces/PaletteData.md +1 -1
  137. package/docs/api/interfaces/ParsedAddress.md +2 -2
  138. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  139. package/docs/api/interfaces/ProgressProps.md +3 -11
  140. package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
  141. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  142. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  143. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  144. package/docs/api/interfaces/QuickFix.md +1 -1
  145. package/docs/api/interfaces/RBACAccessValidateParams.md +1 -1
  146. package/docs/api/interfaces/RBACAccessValidateResult.md +1 -1
  147. package/docs/api/interfaces/RBACAuditLogParams.md +1 -1
  148. package/docs/api/interfaces/RBACAuditLogResult.md +1 -1
  149. package/docs/api/interfaces/RBACConfig.md +2 -2
  150. package/docs/api/interfaces/RBACContext.md +1 -1
  151. package/docs/api/interfaces/RBACLogger.md +1 -1
  152. package/docs/api/interfaces/RBACPageAccessCheckParams.md +1 -1
  153. package/docs/api/interfaces/RBACPerformanceMetrics.md +1 -1
  154. package/docs/api/interfaces/RBACPermissionCheckParams.md +1 -1
  155. package/docs/api/interfaces/RBACPermissionCheckResult.md +1 -1
  156. package/docs/api/interfaces/RBACPermissionsGetParams.md +1 -1
  157. package/docs/api/interfaces/RBACPermissionsGetResult.md +1 -1
  158. package/docs/api/interfaces/RBACResult.md +1 -1
  159. package/docs/api/interfaces/RBACRoleGrantParams.md +1 -1
  160. package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
  161. package/docs/api/interfaces/RBACRoleRevokeParams.md +1 -1
  162. package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
  163. package/docs/api/interfaces/RBACRoleValidateParams.md +1 -1
  164. package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
  165. package/docs/api/interfaces/RBACRolesListParams.md +1 -1
  166. package/docs/api/interfaces/RBACRolesListResult.md +1 -1
  167. package/docs/api/interfaces/RBACSessionTrackParams.md +1 -1
  168. package/docs/api/interfaces/RBACSessionTrackResult.md +1 -1
  169. package/docs/api/interfaces/ResourcePermissions.md +1 -1
  170. package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
  171. package/docs/api/interfaces/RoleBasedRouterContextType.md +8 -8
  172. package/docs/api/interfaces/RoleBasedRouterProps.md +10 -10
  173. package/docs/api/interfaces/RoleManagementResult.md +1 -1
  174. package/docs/api/interfaces/RouteAccessRecord.md +10 -10
  175. package/docs/api/interfaces/RouteConfig.md +10 -10
  176. package/docs/api/interfaces/RuntimeComplianceResult.md +1 -1
  177. package/docs/api/interfaces/SecureDataContextType.md +9 -9
  178. package/docs/api/interfaces/SecureDataProviderProps.md +8 -8
  179. package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
  180. package/docs/api/interfaces/SetupIssue.md +1 -1
  181. package/docs/api/interfaces/StorageConfig.md +4 -4
  182. package/docs/api/interfaces/StorageFileInfo.md +7 -7
  183. package/docs/api/interfaces/StorageFileMetadata.md +25 -14
  184. package/docs/api/interfaces/StorageListOptions.md +22 -9
  185. package/docs/api/interfaces/StorageListResult.md +4 -4
  186. package/docs/api/interfaces/StorageUploadOptions.md +21 -8
  187. package/docs/api/interfaces/StorageUploadResult.md +6 -6
  188. package/docs/api/interfaces/StorageUrlOptions.md +19 -6
  189. package/docs/api/interfaces/StyleImport.md +1 -1
  190. package/docs/api/interfaces/SwitchProps.md +1 -1
  191. package/docs/api/interfaces/TabsContentProps.md +1 -1
  192. package/docs/api/interfaces/TabsListProps.md +1 -1
  193. package/docs/api/interfaces/TabsProps.md +1 -1
  194. package/docs/api/interfaces/TabsTriggerProps.md +1 -1
  195. package/docs/api/interfaces/TextareaProps.md +1 -1
  196. package/docs/api/interfaces/ToastActionElement.md +1 -1
  197. package/docs/api/interfaces/ToastProps.md +1 -1
  198. package/docs/api/interfaces/UnifiedAuthContextType.md +53 -53
  199. package/docs/api/interfaces/UnifiedAuthProviderProps.md +13 -13
  200. package/docs/api/interfaces/UseFormDialogOptions.md +1 -1
  201. package/docs/api/interfaces/UseFormDialogReturn.md +1 -1
  202. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  203. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  204. package/docs/api/interfaces/UsePublicEventLogoOptions.md +2 -2
  205. package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
  206. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  207. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  208. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +2 -2
  209. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  210. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  211. package/docs/api/interfaces/UseResolvedScopeOptions.md +5 -5
  212. package/docs/api/interfaces/UseResolvedScopeReturn.md +4 -4
  213. package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
  214. package/docs/api/interfaces/UserEventAccess.md +11 -11
  215. package/docs/api/interfaces/UserMenuProps.md +1 -1
  216. package/docs/api/interfaces/UserProfile.md +1 -1
  217. package/docs/api/modules.md +165 -106
  218. package/docs/api-reference/components.md +15 -7
  219. package/docs/api-reference/providers.md +2 -2
  220. package/docs/api-reference/rpc-functions.md +1 -0
  221. package/docs/best-practices/README.md +1 -1
  222. package/docs/best-practices/deployment.md +8 -8
  223. package/docs/getting-started/examples/README.md +2 -2
  224. package/docs/getting-started/installation-guide.md +4 -4
  225. package/docs/getting-started/quick-start.md +3 -3
  226. package/docs/migration/MIGRATION_GUIDE.md +3 -3
  227. package/docs/migration/README.md +18 -0
  228. package/docs/migration/database-changes-december-2025.md +767 -0
  229. package/docs/migration/person-scoped-profiles-migration-guide.md +472 -0
  230. package/docs/rbac/compliance/compliance-guide.md +2 -2
  231. package/docs/rbac/event-based-apps.md +2 -2
  232. package/docs/rbac/getting-started.md +2 -2
  233. package/docs/rbac/quick-start.md +2 -2
  234. package/docs/security/README.md +4 -4
  235. package/docs/standards/07-rbac-and-rls-standard.md +430 -7
  236. package/docs/troubleshooting/README.md +2 -2
  237. package/docs/troubleshooting/migration.md +3 -3
  238. package/package.json +1 -3
  239. package/scripts/check-pace-core-compliance.cjs +1 -1
  240. package/scripts/check-pace-core-compliance.js +1 -1
  241. package/src/__tests__/fixtures/supabase.ts +301 -0
  242. package/src/__tests__/public-recipe-view.test.ts +19 -19
  243. package/src/__tests__/rls-policies.test.ts +210 -74
  244. package/src/components/AddressField/AddressField.test.tsx +42 -0
  245. package/src/components/AddressField/AddressField.tsx +71 -60
  246. package/src/components/AddressField/README.md +7 -6
  247. package/src/components/Alert/Alert.test.tsx +50 -10
  248. package/src/components/Alert/Alert.tsx +5 -3
  249. package/src/components/Avatar/Avatar.test.tsx +95 -43
  250. package/src/components/Avatar/Avatar.tsx +16 -16
  251. package/src/components/Button/Button.test.tsx +2 -1
  252. package/src/components/Button/Button.tsx +3 -3
  253. package/src/components/Calendar/Calendar.test.tsx +53 -37
  254. package/src/components/Calendar/Calendar.tsx +409 -82
  255. package/src/components/Card/Card.test.tsx +7 -4
  256. package/src/components/Card/Card.tsx +3 -6
  257. package/src/components/Checkbox/Checkbox.tsx +2 -2
  258. package/src/components/DataTable/components/ActionButtons.tsx +5 -5
  259. package/src/components/DataTable/components/BulkOperationsDropdown.tsx +2 -2
  260. package/src/components/DataTable/components/ColumnFilter.tsx +1 -1
  261. package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +3 -3
  262. package/src/components/DataTable/components/DataTableBody.tsx +12 -12
  263. package/src/components/DataTable/components/DataTableCore.tsx +3 -3
  264. package/src/components/DataTable/components/DataTableToolbar.tsx +5 -5
  265. package/src/components/DataTable/components/DraggableColumnHeader.tsx +3 -3
  266. package/src/components/DataTable/components/EditableRow.tsx +2 -2
  267. package/src/components/DataTable/components/EmptyState.tsx +3 -3
  268. package/src/components/DataTable/components/GroupHeader.tsx +2 -2
  269. package/src/components/DataTable/components/GroupingDropdown.tsx +1 -1
  270. package/src/components/DataTable/components/ImportModal.tsx +4 -4
  271. package/src/components/DataTable/components/LoadingState.tsx +1 -1
  272. package/src/components/DataTable/components/PaginationControls.tsx +11 -11
  273. package/src/components/DataTable/components/UnifiedTableBody.tsx +9 -9
  274. package/src/components/DataTable/components/ViewRowModal.tsx +2 -2
  275. package/src/components/DataTable/components/__tests__/AccessDeniedPage.test.tsx +11 -37
  276. package/src/components/DataTable/components/__tests__/DataTableToolbar.test.tsx +157 -0
  277. package/src/components/DataTable/components/__tests__/LoadingState.test.tsx +2 -1
  278. package/src/components/DataTable/components/__tests__/VirtualizedDataTable.test.tsx +128 -0
  279. package/src/components/DataTable/core/__tests__/ActionManager.test.ts +19 -0
  280. package/src/components/DataTable/core/__tests__/ColumnFactory.test.ts +51 -0
  281. package/src/components/DataTable/core/__tests__/ColumnManager.test.ts +84 -0
  282. package/src/components/DataTable/core/__tests__/DataManager.test.ts +14 -0
  283. package/src/components/DataTable/core/__tests__/DataTableContext.test.tsx +136 -0
  284. package/src/components/DataTable/core/__tests__/LocalDataAdapter.test.ts +16 -0
  285. package/src/components/DataTable/core/__tests__/PluginRegistry.test.ts +18 -0
  286. package/src/components/DataTable/hooks/useDataTablePermissions.ts +28 -7
  287. package/src/components/DataTable/utils/__tests__/hierarchicalUtils.test.ts +30 -1
  288. package/src/components/DataTable/utils/hierarchicalUtils.ts +38 -10
  289. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +8 -3
  290. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.tsx +4 -4
  291. package/src/components/Dialog/Dialog.tsx +2 -2
  292. package/src/components/EventSelector/EventSelector.tsx +7 -7
  293. package/src/components/FileDisplay/FileDisplay.tsx +291 -179
  294. package/src/components/FileUpload/FileUpload.tsx +7 -4
  295. package/src/components/Header/Header.test.tsx +28 -0
  296. package/src/components/Header/Header.tsx +22 -9
  297. package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +2 -2
  298. package/src/components/LoadingSpinner/LoadingSpinner.test.tsx +19 -14
  299. package/src/components/LoadingSpinner/LoadingSpinner.tsx +5 -5
  300. package/src/components/NavigationMenu/NavigationMenu.test.tsx +127 -1
  301. package/src/components/OrganisationSelector/OrganisationSelector.tsx +42 -22
  302. package/src/components/PaceAppLayout/PaceAppLayout.integration.test.tsx +4 -0
  303. package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +3 -0
  304. package/src/components/PaceAppLayout/PaceAppLayout.security.test.tsx +3 -0
  305. package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +16 -6
  306. package/src/components/PaceAppLayout/PaceAppLayout.tsx +37 -3
  307. package/src/components/PaceAppLayout/test-setup.tsx +1 -0
  308. package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +66 -45
  309. package/src/components/PaceLoginPage/PaceLoginPage.tsx +6 -4
  310. package/src/components/Progress/Progress.test.tsx +18 -19
  311. package/src/components/Progress/Progress.tsx +31 -32
  312. package/src/components/PublicLayout/PublicLayout.test.tsx +6 -6
  313. package/src/components/PublicLayout/PublicPageProvider.tsx +5 -3
  314. package/src/components/Select/Select.test.tsx +4 -1
  315. package/src/components/Select/Select.tsx +65 -20
  316. package/src/components/Switch/Switch.test.tsx +2 -1
  317. package/src/components/Switch/Switch.tsx +1 -1
  318. package/src/components/Toast/Toast.tsx +1 -1
  319. package/src/components/Tooltip/Tooltip.test.tsx +8 -2
  320. package/src/components/UserMenu/UserMenu.tsx +3 -3
  321. package/src/eslint-rules/pace-core-compliance.cjs +0 -2
  322. package/src/eslint-rules/pace-core-compliance.js +0 -2
  323. package/src/hooks/__tests__/hooks.integration.test.tsx +4 -1
  324. package/src/hooks/__tests__/useAppConfig.unit.test.ts +76 -5
  325. package/src/hooks/__tests__/useDataTableState.test.ts +76 -0
  326. package/src/hooks/__tests__/useFileUrl.unit.test.ts +25 -69
  327. package/src/hooks/__tests__/useFileUrlCache.test.ts +129 -0
  328. package/src/hooks/__tests__/usePreventTabReload.test.ts +88 -0
  329. package/src/hooks/__tests__/usePublicEvent.simple.test.ts +1 -1
  330. package/src/hooks/__tests__/usePublicEvent.test.ts +608 -0
  331. package/src/hooks/__tests__/useQueryCache.test.ts +144 -0
  332. package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +67 -24
  333. package/src/hooks/index.ts +1 -1
  334. package/src/hooks/public/usePublicEvent.ts +10 -10
  335. package/src/hooks/public/usePublicFileDisplay.ts +173 -87
  336. package/src/hooks/useAppConfig.ts +24 -5
  337. package/src/hooks/useFileDisplay.ts +298 -36
  338. package/src/hooks/useFileReference.ts +56 -11
  339. package/src/hooks/useFileUrl.ts +1 -1
  340. package/src/hooks/useInactivityTracker.ts +16 -7
  341. package/src/hooks/usePermissionCache.test.ts +85 -8
  342. package/src/hooks/useQueryCache.ts +27 -6
  343. package/src/hooks/useSecureDataAccess.test.ts +87 -42
  344. package/src/hooks/useSecureDataAccess.ts +95 -48
  345. package/src/providers/__tests__/OrganisationProvider.test.tsx +27 -21
  346. package/src/providers/services/EventServiceProvider.tsx +37 -17
  347. package/src/providers/services/InactivityServiceProvider.tsx +4 -4
  348. package/src/providers/services/OrganisationServiceProvider.tsx +8 -1
  349. package/src/providers/services/UnifiedAuthProvider.tsx +115 -29
  350. package/src/rbac/__tests__/auth-rbac.e2e.test.tsx +451 -0
  351. package/src/rbac/__tests__/engine.comprehensive.test.ts +12 -0
  352. package/src/rbac/__tests__/rbac-engine-core-logic.test.ts +8 -0
  353. package/src/rbac/__tests__/rbac-engine-simplified.test.ts +4 -0
  354. package/src/rbac/api.ts +240 -36
  355. package/src/rbac/cache-invalidation.ts +21 -7
  356. package/src/rbac/compliance/quick-fix-suggestions.ts +1 -1
  357. package/src/rbac/components/NavigationGuard.tsx +23 -63
  358. package/src/rbac/components/NavigationProvider.test.tsx +52 -23
  359. package/src/rbac/components/NavigationProvider.tsx +13 -11
  360. package/src/rbac/components/PagePermissionGuard.tsx +77 -203
  361. package/src/rbac/components/PagePermissionProvider.tsx +13 -11
  362. package/src/rbac/components/PermissionEnforcer.tsx +24 -62
  363. package/src/rbac/components/RoleBasedRouter.tsx +14 -12
  364. package/src/rbac/components/SecureDataProvider.tsx +13 -11
  365. package/src/rbac/components/__tests__/NavigationGuard.test.tsx +104 -41
  366. package/src/rbac/components/__tests__/NavigationProvider.test.tsx +49 -12
  367. package/src/rbac/components/__tests__/PagePermissionGuard.race-condition.test.tsx +22 -1
  368. package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +161 -82
  369. package/src/rbac/components/__tests__/PagePermissionGuard.verification.test.tsx +22 -1
  370. package/src/rbac/components/__tests__/PermissionEnforcer.test.tsx +77 -30
  371. package/src/rbac/components/__tests__/RoleBasedRouter.test.tsx +39 -5
  372. package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +47 -4
  373. package/src/rbac/engine.ts +4 -2
  374. package/src/rbac/hooks/__tests__/useSecureSupabase.test.ts +144 -52
  375. package/src/rbac/hooks/index.ts +3 -0
  376. package/src/rbac/hooks/useCan.test.ts +101 -53
  377. package/src/rbac/hooks/usePermissions.ts +108 -41
  378. package/src/rbac/hooks/useRBAC.test.ts +11 -3
  379. package/src/rbac/hooks/useRBAC.ts +83 -40
  380. package/src/rbac/hooks/useResolvedScope.test.ts +189 -63
  381. package/src/rbac/hooks/useResolvedScope.ts +128 -70
  382. package/src/rbac/hooks/useSecureSupabase.ts +36 -19
  383. package/src/rbac/hooks/useSuperAdminBypass.ts +126 -0
  384. package/src/rbac/request-deduplication.ts +1 -1
  385. package/src/rbac/secureClient.ts +72 -12
  386. package/src/rbac/security.ts +29 -23
  387. package/src/rbac/types.ts +10 -0
  388. package/src/rbac/utils/__tests__/contextValidator.test.ts +150 -0
  389. package/src/rbac/utils/__tests__/deep-equal.test.ts +53 -0
  390. package/src/rbac/utils/__tests__/eventContext.test.ts +8 -3
  391. package/src/rbac/utils/__tests__/eventContext.unit.test.ts +74 -12
  392. package/src/rbac/utils/contextValidator.ts +288 -0
  393. package/src/rbac/utils/eventContext.ts +52 -3
  394. package/src/services/AuthService.ts +37 -8
  395. package/src/services/EventService.ts +165 -21
  396. package/src/services/OrganisationService.ts +125 -137
  397. package/src/services/__tests__/EventService.test.ts +26 -21
  398. package/src/services/__tests__/OrganisationService.pagination.test.ts +34 -8
  399. package/src/services/__tests__/OrganisationService.test.ts +218 -86
  400. package/src/types/database.generated.ts +166 -201
  401. package/src/types/file-reference.ts +13 -10
  402. package/src/types/supabase.ts +2 -2
  403. package/src/utils/__tests__/secureDataAccess.unit.test.ts +3 -2
  404. package/src/utils/app/appNameResolver.test.ts +346 -73
  405. package/src/utils/context/superAdminOverride.ts +58 -0
  406. package/src/utils/file-reference/index.ts +65 -37
  407. package/src/utils/google-places/googlePlacesUtils.test.ts +98 -0
  408. package/src/utils/google-places/googlePlacesUtils.ts +1 -1
  409. package/src/utils/google-places/loadGoogleMapsScript.test.ts +83 -0
  410. package/src/utils/google-places/types.ts +1 -1
  411. package/src/utils/request-deduplication.ts +4 -4
  412. package/src/utils/security/secureDataAccess.test.ts +1 -1
  413. package/src/utils/security/secureDataAccess.ts +7 -4
  414. package/src/utils/storage/README.md +1 -1
  415. package/src/utils/storage/helpers.test.ts +1 -1
  416. package/src/utils/storage/helpers.ts +38 -19
  417. package/src/utils/storage/types.ts +15 -8
  418. package/src/utils/validation/__tests__/csrf.test.ts +105 -0
  419. package/src/utils/validation/__tests__/sqlInjectionProtection.test.ts +92 -0
  420. package/src/vite-env.d.ts +2 -2
  421. package/dist/chunk-3GOZZZYH.js.map +0 -1
  422. package/dist/chunk-DDM4CCYT.js.map +0 -1
  423. package/dist/chunk-E7UAOUMY.js +0 -75
  424. package/dist/chunk-E7UAOUMY.js.map +0 -1
  425. package/dist/chunk-F2IMUDXZ.js.map +0 -1
  426. package/dist/chunk-HEHYGYOX.js.map +0 -1
  427. package/dist/chunk-IM4QE42D.js.map +0 -1
  428. package/dist/chunk-MX64ZF6I.js.map +0 -1
  429. package/dist/chunk-SAUPYVLF.js.map +0 -1
  430. package/dist/chunk-THRPYOFK.js.map +0 -1
  431. package/dist/chunk-UCQSRW7Z.js.map +0 -1
  432. package/dist/chunk-VGZZXKBR.js.map +0 -1
  433. package/dist/chunk-YGPFYGA6.js.map +0 -1
  434. package/dist/chunk-YHCN776L.js.map +0 -1
  435. /package/dist/{DataTable-GUFUNZ3N.js.map → DataTable-WKRZD47S.js.map} +0 -0
  436. /package/dist/{UnifiedAuthProvider-643PUAIM.js.map → UnifiedAuthProvider-FTSG5XH7.js.map} +0 -0
  437. /package/dist/{api-YP7XD5L6.js.map → api-IHKALJZD.js.map} +0 -0
  438. /package/dist/{chunk-HESYZWZW.js.map → chunk-QWWZ5CAQ.js.map} +0 -0
@@ -58,7 +58,7 @@ type Database = {
58
58
  foreignKeyName: "addresses_organisation_id_fkey";
59
59
  columns: ["organisation_id"];
60
60
  isOneToOne: false;
61
- referencedRelation: "organisations";
61
+ referencedRelation: "core_organisations";
62
62
  referencedColumns: ["id"];
63
63
  }
64
64
  ];
@@ -111,21 +111,21 @@ type Database = {
111
111
  foreignKeyName: "base_application_event_id_fkey";
112
112
  columns: ["event_id"];
113
113
  isOneToOne: false;
114
- referencedRelation: "event";
114
+ referencedRelation: "core_events";
115
115
  referencedColumns: ["event_id"];
116
116
  },
117
117
  {
118
118
  foreignKeyName: "base_application_organisation_id_fkey";
119
119
  columns: ["organisation_id"];
120
120
  isOneToOne: false;
121
- referencedRelation: "organisations";
121
+ referencedRelation: "core_organisations";
122
122
  referencedColumns: ["id"];
123
123
  },
124
124
  {
125
125
  foreignKeyName: "base_application_person_id_fkey";
126
126
  columns: ["person_id"];
127
127
  isOneToOne: false;
128
- referencedRelation: "pace_person";
128
+ referencedRelation: "core_person";
129
129
  referencedColumns: ["id"];
130
130
  }
131
131
  ];
@@ -196,7 +196,7 @@ type Database = {
196
196
  foreignKeyName: "base_questions_organisation_id_fkey";
197
197
  columns: ["organisation_id"];
198
198
  isOneToOne: false;
199
- referencedRelation: "organisations";
199
+ referencedRelation: "core_organisations";
200
200
  referencedColumns: ["id"];
201
201
  }
202
202
  ];
@@ -249,14 +249,14 @@ type Database = {
249
249
  foreignKeyName: "cake_delivery_organisation_id_fkey";
250
250
  columns: ["organisation_id"];
251
251
  isOneToOne: false;
252
- referencedRelation: "organisations";
252
+ referencedRelation: "core_organisations";
253
253
  referencedColumns: ["id"];
254
254
  },
255
255
  {
256
256
  foreignKeyName: "delivery_delivery_event_id_fkey";
257
257
  columns: ["delivery_event_id"];
258
258
  isOneToOne: false;
259
- referencedRelation: "event";
259
+ referencedRelation: "core_events";
260
260
  referencedColumns: ["event_id"];
261
261
  },
262
262
  {
@@ -310,7 +310,7 @@ type Database = {
310
310
  foreignKeyName: "cake_diettype_organisation_id_fkey";
311
311
  columns: ["organisation_id"];
312
312
  isOneToOne: false;
313
- referencedRelation: "organisations";
313
+ referencedRelation: "core_organisations";
314
314
  referencedColumns: ["id"];
315
315
  }
316
316
  ];
@@ -357,7 +357,7 @@ type Database = {
357
357
  foreignKeyName: "cake_diner_organisation_id_fkey";
358
358
  columns: ["organisation_id"];
359
359
  isOneToOne: false;
360
- referencedRelation: "organisations";
360
+ referencedRelation: "core_organisations";
361
361
  referencedColumns: ["id"];
362
362
  },
363
363
  {
@@ -445,14 +445,14 @@ type Database = {
445
445
  foreignKeyName: "cake_dish_organisation_id_fkey";
446
446
  columns: ["organisation_id"];
447
447
  isOneToOne: false;
448
- referencedRelation: "organisations";
448
+ referencedRelation: "core_organisations";
449
449
  referencedColumns: ["id"];
450
450
  },
451
451
  {
452
452
  foreignKeyName: "dish_dish_event_id_fkey";
453
453
  columns: ["dish_event_id"];
454
454
  isOneToOne: false;
455
- referencedRelation: "event";
455
+ referencedRelation: "core_events";
456
456
  referencedColumns: ["event_id"];
457
457
  },
458
458
  {
@@ -554,7 +554,7 @@ type Database = {
554
554
  foreignKeyName: "cake_item_organisation_id_fkey";
555
555
  columns: ["organisation_id"];
556
556
  isOneToOne: false;
557
- referencedRelation: "organisations";
557
+ referencedRelation: "core_organisations";
558
558
  referencedColumns: ["id"];
559
559
  },
560
560
  {
@@ -602,7 +602,7 @@ type Database = {
602
602
  foreignKeyName: "cake_logistics_organisation_id_fkey";
603
603
  columns: ["organisation_id"];
604
604
  isOneToOne: false;
605
- referencedRelation: "organisations";
605
+ referencedRelation: "core_organisations";
606
606
  referencedColumns: ["id"];
607
607
  }
608
608
  ];
@@ -652,14 +652,14 @@ type Database = {
652
652
  foreignKeyName: "cake_meal_organisation_id_fkey";
653
653
  columns: ["organisation_id"];
654
654
  isOneToOne: false;
655
- referencedRelation: "organisations";
655
+ referencedRelation: "core_organisations";
656
656
  referencedColumns: ["id"];
657
657
  },
658
658
  {
659
659
  foreignKeyName: "meal_meal_event_id_fkey";
660
660
  columns: ["meal_event_id"];
661
661
  isOneToOne: false;
662
- referencedRelation: "event";
662
+ referencedRelation: "core_events";
663
663
  referencedColumns: ["event_id"];
664
664
  },
665
665
  {
@@ -713,7 +713,7 @@ type Database = {
713
713
  foreignKeyName: "cake_mealplan_organisation_id_fkey";
714
714
  columns: ["organisation_id"];
715
715
  isOneToOne: false;
716
- referencedRelation: "organisations";
716
+ referencedRelation: "core_organisations";
717
717
  referencedColumns: ["id"];
718
718
  },
719
719
  {
@@ -772,7 +772,7 @@ type Database = {
772
772
  foreignKeyName: "cake_mealtype_organisation_id_fkey";
773
773
  columns: ["organisation_id"];
774
774
  isOneToOne: false;
775
- referencedRelation: "organisations";
775
+ referencedRelation: "core_organisations";
776
776
  referencedColumns: ["id"];
777
777
  }
778
778
  ];
@@ -822,7 +822,7 @@ type Database = {
822
822
  foreignKeyName: "cake_package_organisation_id_fkey";
823
823
  columns: ["organisation_id"];
824
824
  isOneToOne: false;
825
- referencedRelation: "organisations";
825
+ referencedRelation: "core_organisations";
826
826
  referencedColumns: ["id"];
827
827
  },
828
828
  {
@@ -879,7 +879,7 @@ type Database = {
879
879
  foreignKeyName: "cake_recipe_organisation_id_fkey";
880
880
  columns: ["organisation_id"];
881
881
  isOneToOne: false;
882
- referencedRelation: "organisations";
882
+ referencedRelation: "core_organisations";
883
883
  referencedColumns: ["id"];
884
884
  },
885
885
  {
@@ -947,7 +947,7 @@ type Database = {
947
947
  foreignKeyName: "cake_supplier_organisation_id_fkey";
948
948
  columns: ["organisation_id"];
949
949
  isOneToOne: false;
950
- referencedRelation: "organisations";
950
+ referencedRelation: "core_organisations";
951
951
  referencedColumns: ["id"];
952
952
  }
953
953
  ];
@@ -997,14 +997,14 @@ type Database = {
997
997
  foreignKeyName: "cake_supply_organisation_id_fkey";
998
998
  columns: ["organisation_id"];
999
999
  isOneToOne: false;
1000
- referencedRelation: "organisations";
1000
+ referencedRelation: "core_organisations";
1001
1001
  referencedColumns: ["id"];
1002
1002
  },
1003
1003
  {
1004
1004
  foreignKeyName: "supply_supply_event_id_fkey";
1005
1005
  columns: ["supply_event_id"];
1006
1006
  isOneToOne: false;
1007
- referencedRelation: "event";
1007
+ referencedRelation: "core_events";
1008
1008
  referencedColumns: ["event_id"];
1009
1009
  },
1010
1010
  {
@@ -1068,19 +1068,19 @@ type Database = {
1068
1068
  foreignKeyName: "cake_unit_organisation_id_fkey";
1069
1069
  columns: ["organisation_id"];
1070
1070
  isOneToOne: false;
1071
- referencedRelation: "organisations";
1071
+ referencedRelation: "core_organisations";
1072
1072
  referencedColumns: ["id"];
1073
1073
  },
1074
1074
  {
1075
1075
  foreignKeyName: "unit_unit_event_id_fkey";
1076
1076
  columns: ["unit_event_id"];
1077
1077
  isOneToOne: false;
1078
- referencedRelation: "event";
1078
+ referencedRelation: "core_events";
1079
1079
  referencedColumns: ["event_id"];
1080
1080
  }
1081
1081
  ];
1082
1082
  };
1083
- event: {
1083
+ core_events: {
1084
1084
  Row: {
1085
1085
  created_at: string | null;
1086
1086
  created_by: string | null;
@@ -1155,12 +1155,12 @@ type Database = {
1155
1155
  foreignKeyName: "event_organisation_id_fkey";
1156
1156
  columns: ["organisation_id"];
1157
1157
  isOneToOne: false;
1158
- referencedRelation: "organisations";
1158
+ referencedRelation: "core_organisations";
1159
1159
  referencedColumns: ["id"];
1160
1160
  }
1161
1161
  ];
1162
1162
  };
1163
- event_app_access: {
1163
+ core_event_app_access: {
1164
1164
  Row: {
1165
1165
  app_id: string;
1166
1166
  created_at: string;
@@ -1196,14 +1196,14 @@ type Database = {
1196
1196
  foreignKeyName: "event_app_access_event_id_fkey";
1197
1197
  columns: ["event_id"];
1198
1198
  isOneToOne: false;
1199
- referencedRelation: "event";
1199
+ referencedRelation: "core_events";
1200
1200
  referencedColumns: ["event_id"];
1201
1201
  },
1202
1202
  {
1203
1203
  foreignKeyName: "event_app_access_organisation_id_fkey";
1204
1204
  columns: ["organisation_id"];
1205
1205
  isOneToOne: false;
1206
- referencedRelation: "organisations";
1206
+ referencedRelation: "core_organisations";
1207
1207
  referencedColumns: ["id"];
1208
1208
  },
1209
1209
  {
@@ -1217,12 +1217,12 @@ type Database = {
1217
1217
  foreignKeyName: "fk_event_app_access_event_id";
1218
1218
  columns: ["event_id"];
1219
1219
  isOneToOne: false;
1220
- referencedRelation: "event";
1220
+ referencedRelation: "core_events";
1221
1221
  referencedColumns: ["event_id"];
1222
1222
  }
1223
1223
  ];
1224
1224
  };
1225
- file_references: {
1225
+ core_file_references: {
1226
1226
  Row: {
1227
1227
  app_id: string;
1228
1228
  created_at: string | null;
@@ -1271,12 +1271,12 @@ type Database = {
1271
1271
  foreignKeyName: "file_references_organisation_id_fkey";
1272
1272
  columns: ["organisation_id"];
1273
1273
  isOneToOne: false;
1274
- referencedRelation: "organisations";
1274
+ referencedRelation: "core_organisations";
1275
1275
  referencedColumns: ["id"];
1276
1276
  }
1277
1277
  ];
1278
1278
  };
1279
- form_contexts: {
1279
+ core_form_context_types: {
1280
1280
  Row: {
1281
1281
  created_at: string | null;
1282
1282
  created_by: string | null;
@@ -1318,12 +1318,12 @@ type Database = {
1318
1318
  foreignKeyName: "form_contexts_organisation_id_fkey";
1319
1319
  columns: ["organisation_id"];
1320
1320
  isOneToOne: false;
1321
- referencedRelation: "organisations";
1321
+ referencedRelation: "core_organisations";
1322
1322
  referencedColumns: ["id"];
1323
1323
  }
1324
1324
  ];
1325
1325
  };
1326
- form_field_config: {
1326
+ core_form_field_config: {
1327
1327
  Row: {
1328
1328
  admin_notes: string | null;
1329
1329
  category: string | null;
@@ -1374,12 +1374,12 @@ type Database = {
1374
1374
  foreignKeyName: "form_field_config_organisation_id_fkey";
1375
1375
  columns: ["organisation_id"];
1376
1376
  isOneToOne: false;
1377
- referencedRelation: "organisations";
1377
+ referencedRelation: "core_organisations";
1378
1378
  referencedColumns: ["id"];
1379
1379
  }
1380
1380
  ];
1381
1381
  };
1382
- form_fields: {
1382
+ core_form_fields: {
1383
1383
  Row: {
1384
1384
  column_name: string;
1385
1385
  created_at: string | null;
@@ -1439,19 +1439,19 @@ type Database = {
1439
1439
  foreignKeyName: "form_fields_form_id_fkey";
1440
1440
  columns: ["form_id"];
1441
1441
  isOneToOne: false;
1442
- referencedRelation: "forms";
1442
+ referencedRelation: "core_forms";
1443
1443
  referencedColumns: ["id"];
1444
1444
  },
1445
1445
  {
1446
1446
  foreignKeyName: "form_fields_organisation_id_fkey";
1447
1447
  columns: ["organisation_id"];
1448
1448
  isOneToOne: false;
1449
- referencedRelation: "organisations";
1449
+ referencedRelation: "core_organisations";
1450
1450
  referencedColumns: ["id"];
1451
1451
  }
1452
1452
  ];
1453
1453
  };
1454
- form_response_values: {
1454
+ core_form_response_values: {
1455
1455
  Row: {
1456
1456
  column_name: string;
1457
1457
  created_at: string | null;
@@ -1493,26 +1493,26 @@ type Database = {
1493
1493
  foreignKeyName: "fk_form_response_values_organisation_id";
1494
1494
  columns: ["organisation_id"];
1495
1495
  isOneToOne: false;
1496
- referencedRelation: "organisations";
1496
+ referencedRelation: "core_organisations";
1497
1497
  referencedColumns: ["id"];
1498
1498
  },
1499
1499
  {
1500
1500
  foreignKeyName: "form_response_values_form_field_id_fkey";
1501
1501
  columns: ["form_field_id"];
1502
1502
  isOneToOne: false;
1503
- referencedRelation: "form_fields";
1503
+ referencedRelation: "core_form_fields";
1504
1504
  referencedColumns: ["id"];
1505
1505
  },
1506
1506
  {
1507
1507
  foreignKeyName: "form_response_values_response_id_fkey";
1508
1508
  columns: ["response_id"];
1509
1509
  isOneToOne: false;
1510
- referencedRelation: "form_responses";
1510
+ referencedRelation: "core_form_responses";
1511
1511
  referencedColumns: ["id"];
1512
1512
  }
1513
1513
  ];
1514
1514
  };
1515
- form_responses: {
1515
+ core_form_responses: {
1516
1516
  Row: {
1517
1517
  created_at: string | null;
1518
1518
  created_by: string | null;
@@ -1563,19 +1563,19 @@ type Database = {
1563
1563
  foreignKeyName: "fk_form_responses_organisation_id";
1564
1564
  columns: ["organisation_id"];
1565
1565
  isOneToOne: false;
1566
- referencedRelation: "organisations";
1566
+ referencedRelation: "core_organisations";
1567
1567
  referencedColumns: ["id"];
1568
1568
  },
1569
1569
  {
1570
1570
  foreignKeyName: "form_responses_form_id_fkey";
1571
1571
  columns: ["form_id"];
1572
1572
  isOneToOne: false;
1573
- referencedRelation: "forms";
1573
+ referencedRelation: "core_forms";
1574
1574
  referencedColumns: ["id"];
1575
1575
  }
1576
1576
  ];
1577
1577
  };
1578
- forms: {
1578
+ core_forms: {
1579
1579
  Row: {
1580
1580
  allow_multiple_submissions: boolean | null;
1581
1581
  closes_at: string | null;
@@ -1641,14 +1641,14 @@ type Database = {
1641
1641
  foreignKeyName: "fk_forms_organisation_id";
1642
1642
  columns: ["organisation_id"];
1643
1643
  isOneToOne: false;
1644
- referencedRelation: "organisations";
1644
+ referencedRelation: "core_organisations";
1645
1645
  referencedColumns: ["id"];
1646
1646
  },
1647
1647
  {
1648
1648
  foreignKeyName: "forms_context_id_fkey";
1649
1649
  columns: ["context_id"];
1650
1650
  isOneToOne: false;
1651
- referencedRelation: "form_contexts";
1651
+ referencedRelation: "core_form_context_types";
1652
1652
  referencedColumns: ["id"];
1653
1653
  }
1654
1654
  ];
@@ -1698,7 +1698,7 @@ type Database = {
1698
1698
  foreignKeyName: "fk_medi_access_log_organisation_id";
1699
1699
  columns: ["organisation_id"];
1700
1700
  isOneToOne: false;
1701
- referencedRelation: "organisations";
1701
+ referencedRelation: "core_organisations";
1702
1702
  referencedColumns: ["id"];
1703
1703
  },
1704
1704
  {
@@ -1764,7 +1764,7 @@ type Database = {
1764
1764
  foreignKeyName: "fk_medi_action_plan_organisation_id";
1765
1765
  columns: ["organisation_id"];
1766
1766
  isOneToOne: false;
1767
- referencedRelation: "organisations";
1767
+ referencedRelation: "core_organisations";
1768
1768
  referencedColumns: ["id"];
1769
1769
  },
1770
1770
  {
@@ -1866,7 +1866,7 @@ type Database = {
1866
1866
  foreignKeyName: "fk_medi_condition_organisation_id";
1867
1867
  columns: ["organisation_id"];
1868
1868
  isOneToOne: false;
1869
- referencedRelation: "organisations";
1869
+ referencedRelation: "core_organisations";
1870
1870
  referencedColumns: ["id"];
1871
1871
  },
1872
1872
  {
@@ -1924,7 +1924,7 @@ type Database = {
1924
1924
  foreignKeyName: "medi_condition_type_organisation_id_fkey";
1925
1925
  columns: ["organisation_id"];
1926
1926
  isOneToOne: false;
1927
- referencedRelation: "organisations";
1927
+ referencedRelation: "core_organisations";
1928
1928
  referencedColumns: ["id"];
1929
1929
  },
1930
1930
  {
@@ -1981,7 +1981,7 @@ type Database = {
1981
1981
  foreignKeyName: "fk_medi_diet_organisation_id";
1982
1982
  columns: ["organisation_id"];
1983
1983
  isOneToOne: false;
1984
- referencedRelation: "organisations";
1984
+ referencedRelation: "core_organisations";
1985
1985
  referencedColumns: ["id"];
1986
1986
  },
1987
1987
  {
@@ -2105,14 +2105,14 @@ type Database = {
2105
2105
  foreignKeyName: "fk_medi_profile_organisation_id";
2106
2106
  columns: ["organisation_id"];
2107
2107
  isOneToOne: false;
2108
- referencedRelation: "organisations";
2108
+ referencedRelation: "core_organisations";
2109
2109
  referencedColumns: ["id"];
2110
2110
  },
2111
2111
  {
2112
2112
  foreignKeyName: "medi_profile_member_id_fkey";
2113
2113
  columns: ["member_id"];
2114
2114
  isOneToOne: true;
2115
- referencedRelation: "pace_member";
2115
+ referencedRelation: "core_member";
2116
2116
  referencedColumns: ["id"];
2117
2117
  }
2118
2118
  ];
@@ -2153,7 +2153,7 @@ type Database = {
2153
2153
  foreignKeyName: "fk_medi_profile_versions_organisation_id";
2154
2154
  columns: ["organisation_id"];
2155
2155
  isOneToOne: false;
2156
- referencedRelation: "organisations";
2156
+ referencedRelation: "core_organisations";
2157
2157
  referencedColumns: ["id"];
2158
2158
  },
2159
2159
  {
@@ -2303,7 +2303,7 @@ type Database = {
2303
2303
  foreignKeyName: "credit_balance_organisation_id_fkey";
2304
2304
  columns: ["organisation_id"];
2305
2305
  isOneToOne: false;
2306
- referencedRelation: "organisations";
2306
+ referencedRelation: "core_organisations";
2307
2307
  referencedColumns: ["id"];
2308
2308
  }
2309
2309
  ];
@@ -2421,7 +2421,7 @@ type Database = {
2421
2421
  foreignKeyName: "invoice_organisation_id_fkey";
2422
2422
  columns: ["organisation_id"];
2423
2423
  isOneToOne: false;
2424
- referencedRelation: "organisations";
2424
+ referencedRelation: "core_organisations";
2425
2425
  referencedColumns: ["id"];
2426
2426
  }
2427
2427
  ];
@@ -2490,7 +2490,7 @@ type Database = {
2490
2490
  foreignKeyName: "line_item_organisation_id_fkey";
2491
2491
  columns: ["organisation_id"];
2492
2492
  isOneToOne: false;
2493
- referencedRelation: "organisations";
2493
+ referencedRelation: "core_organisations";
2494
2494
  referencedColumns: ["id"];
2495
2495
  }
2496
2496
  ];
@@ -2635,7 +2635,7 @@ type Database = {
2635
2635
  foreignKeyName: "payment_method_organisation_id_fkey";
2636
2636
  columns: ["organisation_id"];
2637
2637
  isOneToOne: false;
2638
- referencedRelation: "organisations";
2638
+ referencedRelation: "core_organisations";
2639
2639
  referencedColumns: ["id"];
2640
2640
  }
2641
2641
  ];
@@ -2727,7 +2727,7 @@ type Database = {
2727
2727
  foreignKeyName: "webhook_log_organisation_id_fkey";
2728
2728
  columns: ["organisation_id"];
2729
2729
  isOneToOne: false;
2730
- referencedRelation: "organisations";
2730
+ referencedRelation: "core_organisations";
2731
2731
  referencedColumns: ["id"];
2732
2732
  }
2733
2733
  ];
@@ -2769,12 +2769,12 @@ type Database = {
2769
2769
  foreignKeyName: "note_attachments_organisation_id_fkey";
2770
2770
  columns: ["organisation_id"];
2771
2771
  isOneToOne: false;
2772
- referencedRelation: "organisations";
2772
+ referencedRelation: "core_organisations";
2773
2773
  referencedColumns: ["id"];
2774
2774
  }
2775
2775
  ];
2776
2776
  };
2777
- organisation_app_access: {
2777
+ core_organisation_app_access: {
2778
2778
  Row: {
2779
2779
  app_id: string;
2780
2780
  created_at: string | null;
@@ -2820,12 +2820,12 @@ type Database = {
2820
2820
  foreignKeyName: "organisation_app_access_organisation_id_fkey";
2821
2821
  columns: ["organisation_id"];
2822
2822
  isOneToOne: false;
2823
- referencedRelation: "organisations";
2823
+ referencedRelation: "core_organisations";
2824
2824
  referencedColumns: ["id"];
2825
2825
  }
2826
2826
  ];
2827
2827
  };
2828
- organisation_audit_log: {
2828
+ core_organisation_audit_log: {
2829
2829
  Row: {
2830
2830
  action: string;
2831
2831
  created_at: string;
@@ -2870,7 +2870,7 @@ type Database = {
2870
2870
  foreignKeyName: "organisation_audit_log_organisation_id_fkey";
2871
2871
  columns: ["organisation_id"];
2872
2872
  isOneToOne: false;
2873
- referencedRelation: "organisations";
2873
+ referencedRelation: "core_organisations";
2874
2874
  referencedColumns: ["id"];
2875
2875
  }
2876
2876
  ];
@@ -2914,7 +2914,7 @@ type Database = {
2914
2914
  foreignKeyName: "organisation_invitations_organisation_id_fkey";
2915
2915
  columns: ["organisation_id"];
2916
2916
  isOneToOne: false;
2917
- referencedRelation: "organisations";
2917
+ referencedRelation: "core_organisations";
2918
2918
  referencedColumns: ["id"];
2919
2919
  }
2920
2920
  ];
@@ -2988,12 +2988,12 @@ type Database = {
2988
2988
  foreignKeyName: "organisation_settings_organisation_id_fkey";
2989
2989
  columns: ["organisation_id"];
2990
2990
  isOneToOne: true;
2991
- referencedRelation: "organisations";
2991
+ referencedRelation: "core_organisations";
2992
2992
  referencedColumns: ["id"];
2993
2993
  }
2994
2994
  ];
2995
2995
  };
2996
- organisations: {
2996
+ core_organisations: {
2997
2997
  Row: {
2998
2998
  created_at: string | null;
2999
2999
  created_by: string | null;
@@ -3041,12 +3041,12 @@ type Database = {
3041
3041
  foreignKeyName: "organisations_parent_id_fkey";
3042
3042
  columns: ["parent_id"];
3043
3043
  isOneToOne: false;
3044
- referencedRelation: "organisations";
3044
+ referencedRelation: "core_organisations";
3045
3045
  referencedColumns: ["id"];
3046
3046
  }
3047
3047
  ];
3048
3048
  };
3049
- pace_consent: {
3049
+ core_consent: {
3050
3050
  Row: {
3051
3051
  consent_type_id: number;
3052
3052
  created_at: string | null;
@@ -3091,26 +3091,26 @@ type Database = {
3091
3091
  foreignKeyName: "consents_consent_type_id_fkey";
3092
3092
  columns: ["consent_type_id"];
3093
3093
  isOneToOne: false;
3094
- referencedRelation: "pace_consent_type";
3094
+ referencedRelation: "core_consent_type";
3095
3095
  referencedColumns: ["id"];
3096
3096
  },
3097
3097
  {
3098
3098
  foreignKeyName: "consents_member_id_fkey1";
3099
3099
  columns: ["member_id"];
3100
3100
  isOneToOne: false;
3101
- referencedRelation: "pace_member";
3101
+ referencedRelation: "core_member";
3102
3102
  referencedColumns: ["id"];
3103
3103
  },
3104
3104
  {
3105
3105
  foreignKeyName: "fk_pace_consent_organisation_id";
3106
3106
  columns: ["organisation_id"];
3107
3107
  isOneToOne: false;
3108
- referencedRelation: "organisations";
3108
+ referencedRelation: "core_organisations";
3109
3109
  referencedColumns: ["id"];
3110
3110
  }
3111
3111
  ];
3112
3112
  };
3113
- pace_consent_type: {
3113
+ core_consent_type: {
3114
3114
  Row: {
3115
3115
  active: boolean | null;
3116
3116
  category: string | null;
@@ -3149,12 +3149,12 @@ type Database = {
3149
3149
  foreignKeyName: "pace_consent_type_organisation_id_fkey";
3150
3150
  columns: ["organisation_id"];
3151
3151
  isOneToOne: false;
3152
- referencedRelation: "organisations";
3152
+ referencedRelation: "core_organisations";
3153
3153
  referencedColumns: ["id"];
3154
3154
  }
3155
3155
  ];
3156
3156
  };
3157
- pace_contact: {
3157
+ core_contact: {
3158
3158
  Row: {
3159
3159
  contact_person_id: string | null;
3160
3160
  contact_type_id: number | null;
@@ -3202,33 +3202,33 @@ type Database = {
3202
3202
  foreignKeyName: "fk_pace_contact_organisation_id";
3203
3203
  columns: ["organisation_id"];
3204
3204
  isOneToOne: false;
3205
- referencedRelation: "organisations";
3205
+ referencedRelation: "core_organisations";
3206
3206
  referencedColumns: ["id"];
3207
3207
  },
3208
3208
  {
3209
3209
  foreignKeyName: "pace_contact_related_person_id_fkey";
3210
3210
  columns: ["contact_person_id"];
3211
3211
  isOneToOne: false;
3212
- referencedRelation: "pace_person";
3212
+ referencedRelation: "core_person";
3213
3213
  referencedColumns: ["id"];
3214
3214
  },
3215
3215
  {
3216
3216
  foreignKeyName: "pace_contact_relationship_type_id_fkey";
3217
3217
  columns: ["contact_type_id"];
3218
3218
  isOneToOne: false;
3219
- referencedRelation: "pace_contact_type";
3219
+ referencedRelation: "core_contact_type";
3220
3220
  referencedColumns: ["id"];
3221
3221
  },
3222
3222
  {
3223
3223
  foreignKeyName: "pace_member_permissions_member_id_fkey";
3224
3224
  columns: ["member_id"];
3225
3225
  isOneToOne: false;
3226
- referencedRelation: "pace_member";
3226
+ referencedRelation: "core_member";
3227
3227
  referencedColumns: ["id"];
3228
3228
  }
3229
3229
  ];
3230
3230
  };
3231
- pace_contact_type: {
3231
+ core_contact_type: {
3232
3232
  Row: {
3233
3233
  created_at: string | null;
3234
3234
  created_by: string | null;
@@ -3264,12 +3264,12 @@ type Database = {
3264
3264
  foreignKeyName: "pace_contact_type_organisation_id_fkey";
3265
3265
  columns: ["organisation_id"];
3266
3266
  isOneToOne: false;
3267
- referencedRelation: "organisations";
3267
+ referencedRelation: "core_organisations";
3268
3268
  referencedColumns: ["id"];
3269
3269
  }
3270
3270
  ];
3271
3271
  };
3272
- pace_gender_type: {
3272
+ core_gender_type: {
3273
3273
  Row: {
3274
3274
  created_at: string | null;
3275
3275
  created_by: string | null;
@@ -3302,12 +3302,12 @@ type Database = {
3302
3302
  foreignKeyName: "pace_gender_type_organisation_id_fkey";
3303
3303
  columns: ["organisation_id"];
3304
3304
  isOneToOne: false;
3305
- referencedRelation: "organisations";
3305
+ referencedRelation: "core_organisations";
3306
3306
  referencedColumns: ["id"];
3307
3307
  }
3308
3308
  ];
3309
3309
  };
3310
- pace_identification: {
3310
+ core_identification: {
3311
3311
  Row: {
3312
3312
  created_at: string | null;
3313
3313
  document_number: string | null;
@@ -3358,26 +3358,26 @@ type Database = {
3358
3358
  foreignKeyName: "fk_pace_identification_organisation_id";
3359
3359
  columns: ["organisation_id"];
3360
3360
  isOneToOne: false;
3361
- referencedRelation: "organisations";
3361
+ referencedRelation: "core_organisations";
3362
3362
  referencedColumns: ["id"];
3363
3363
  },
3364
3364
  {
3365
3365
  foreignKeyName: "fk_pace_identification_type_id";
3366
3366
  columns: ["identification_type_id"];
3367
3367
  isOneToOne: false;
3368
- referencedRelation: "pace_identification_type";
3368
+ referencedRelation: "core_identification_type";
3369
3369
  referencedColumns: ["id"];
3370
3370
  },
3371
3371
  {
3372
3372
  foreignKeyName: "pace_identification_member_id_fkey";
3373
3373
  columns: ["member_id"];
3374
3374
  isOneToOne: false;
3375
- referencedRelation: "pace_member";
3375
+ referencedRelation: "core_member";
3376
3376
  referencedColumns: ["id"];
3377
3377
  }
3378
3378
  ];
3379
3379
  };
3380
- pace_identification_type: {
3380
+ core_identification_type: {
3381
3381
  Row: {
3382
3382
  created_at: string | null;
3383
3383
  created_by: string | null;
@@ -3419,12 +3419,12 @@ type Database = {
3419
3419
  foreignKeyName: "pace_identification_type_organisation_id_fkey";
3420
3420
  columns: ["organisation_id"];
3421
3421
  isOneToOne: false;
3422
- referencedRelation: "organisations";
3422
+ referencedRelation: "core_organisations";
3423
3423
  referencedColumns: ["id"];
3424
3424
  }
3425
3425
  ];
3426
3426
  };
3427
- pace_member: {
3427
+ core_member: {
3428
3428
  Row: {
3429
3429
  address_id: string | null;
3430
3430
  created_at: string | null;
@@ -3487,40 +3487,40 @@ type Database = {
3487
3487
  foreignKeyName: "pace_member_organisation_id_fkey";
3488
3488
  columns: ["organisation_id"];
3489
3489
  isOneToOne: false;
3490
- referencedRelation: "organisations";
3490
+ referencedRelation: "core_organisations";
3491
3491
  referencedColumns: ["id"];
3492
3492
  },
3493
3493
  {
3494
3494
  foreignKeyName: "pace_member_person_id_fkey";
3495
3495
  columns: ["person_id"];
3496
3496
  isOneToOne: true;
3497
- referencedRelation: "pace_person";
3497
+ referencedRelation: "core_person";
3498
3498
  referencedColumns: ["id"];
3499
3499
  },
3500
3500
  {
3501
3501
  foreignKeyName: "pace_members_gender_id_fkey";
3502
3502
  columns: ["gender_id"];
3503
3503
  isOneToOne: false;
3504
- referencedRelation: "pace_gender_type";
3504
+ referencedRelation: "core_gender_type";
3505
3505
  referencedColumns: ["id"];
3506
3506
  },
3507
3507
  {
3508
3508
  foreignKeyName: "pace_members_membership_type_id_fkey";
3509
3509
  columns: ["membership_type_id"];
3510
3510
  isOneToOne: false;
3511
- referencedRelation: "pace_membership_type";
3511
+ referencedRelation: "core_membership_type";
3512
3512
  referencedColumns: ["id"];
3513
3513
  },
3514
3514
  {
3515
3515
  foreignKeyName: "pace_members_pronoun_id_fkey";
3516
3516
  columns: ["pronoun_id"];
3517
3517
  isOneToOne: false;
3518
- referencedRelation: "pace_pronoun_type";
3518
+ referencedRelation: "core_pronoun_type";
3519
3519
  referencedColumns: ["id"];
3520
3520
  }
3521
3521
  ];
3522
3522
  };
3523
- pace_member_role: {
3523
+ core_member_role: {
3524
3524
  Row: {
3525
3525
  created_at: string | null;
3526
3526
  created_by: string | null;
@@ -3568,21 +3568,21 @@ type Database = {
3568
3568
  foreignKeyName: "pace_member_role_organisation_id_fkey";
3569
3569
  columns: ["organisation_id"];
3570
3570
  isOneToOne: false;
3571
- referencedRelation: "organisations";
3571
+ referencedRelation: "core_organisations";
3572
3572
  referencedColumns: ["id"];
3573
3573
  },
3574
3574
  {
3575
3575
  foreignKeyName: "pace_member_roles_member_id_fkey";
3576
3576
  columns: ["member_id"];
3577
3577
  isOneToOne: false;
3578
- referencedRelation: "pace_member";
3578
+ referencedRelation: "core_member";
3579
3579
  referencedColumns: ["id"];
3580
3580
  },
3581
3581
  {
3582
3582
  foreignKeyName: "pace_member_roles_role_id_fkey";
3583
3583
  columns: ["role_id"];
3584
3584
  isOneToOne: false;
3585
- referencedRelation: "pace_role_type";
3585
+ referencedRelation: "core_role_type";
3586
3586
  referencedColumns: ["id"];
3587
3587
  },
3588
3588
  {
@@ -3594,7 +3594,7 @@ type Database = {
3594
3594
  }
3595
3595
  ];
3596
3596
  };
3597
- pace_membership_type: {
3597
+ core_membership_type: {
3598
3598
  Row: {
3599
3599
  created_at: string | null;
3600
3600
  created_by: string | null;
@@ -3636,12 +3636,12 @@ type Database = {
3636
3636
  foreignKeyName: "pace_membership_type_organisation_id_fkey";
3637
3637
  columns: ["organisation_id"];
3638
3638
  isOneToOne: false;
3639
- referencedRelation: "organisations";
3639
+ referencedRelation: "core_organisations";
3640
3640
  referencedColumns: ["id"];
3641
3641
  }
3642
3642
  ];
3643
3643
  };
3644
- pace_merchandise: {
3644
+ core_merchandise: {
3645
3645
  Row: {
3646
3646
  category: string | null;
3647
3647
  color: string | null;
@@ -3692,26 +3692,26 @@ type Database = {
3692
3692
  foreignKeyName: "pace_merchandise_event_id_fkey";
3693
3693
  columns: ["event_id"];
3694
3694
  isOneToOne: false;
3695
- referencedRelation: "event";
3695
+ referencedRelation: "core_events";
3696
3696
  referencedColumns: ["event_id"];
3697
3697
  },
3698
3698
  {
3699
3699
  foreignKeyName: "pace_merchandise_organisation_id_fkey";
3700
3700
  columns: ["organisation_id"];
3701
3701
  isOneToOne: false;
3702
- referencedRelation: "organisations";
3702
+ referencedRelation: "core_organisations";
3703
3703
  referencedColumns: ["id"];
3704
3704
  },
3705
3705
  {
3706
3706
  foreignKeyName: "pace_merchandise_person_id_fkey";
3707
3707
  columns: ["person_id"];
3708
3708
  isOneToOne: false;
3709
- referencedRelation: "pace_person";
3709
+ referencedRelation: "core_person";
3710
3710
  referencedColumns: ["id"];
3711
3711
  }
3712
3712
  ];
3713
3713
  };
3714
- pace_person: {
3714
+ core_person: {
3715
3715
  Row: {
3716
3716
  created_at: string | null;
3717
3717
  created_by: string | null;
@@ -3756,7 +3756,7 @@ type Database = {
3756
3756
  };
3757
3757
  Relationships: [];
3758
3758
  };
3759
- pace_phone: {
3759
+ core_phone: {
3760
3760
  Row: {
3761
3761
  created_at: string | null;
3762
3762
  created_by: string | null;
@@ -3798,26 +3798,26 @@ type Database = {
3798
3798
  foreignKeyName: "fk_pace_phone_organisation_id";
3799
3799
  columns: ["organisation_id"];
3800
3800
  isOneToOne: false;
3801
- referencedRelation: "organisations";
3801
+ referencedRelation: "core_organisations";
3802
3802
  referencedColumns: ["id"];
3803
3803
  },
3804
3804
  {
3805
3805
  foreignKeyName: "team_phones_contact_id_fkey";
3806
3806
  columns: ["person_id"];
3807
3807
  isOneToOne: false;
3808
- referencedRelation: "pace_person";
3808
+ referencedRelation: "core_person";
3809
3809
  referencedColumns: ["id"];
3810
3810
  },
3811
3811
  {
3812
3812
  foreignKeyName: "team_phones_phone_type_id_fkey";
3813
3813
  columns: ["phone_type_id"];
3814
3814
  isOneToOne: false;
3815
- referencedRelation: "pace_phone_type";
3815
+ referencedRelation: "core_phone_type";
3816
3816
  referencedColumns: ["id"];
3817
3817
  }
3818
3818
  ];
3819
3819
  };
3820
- pace_phone_type: {
3820
+ core_phone_type: {
3821
3821
  Row: {
3822
3822
  created_at: string | null;
3823
3823
  created_by: string | null;
@@ -3850,12 +3850,12 @@ type Database = {
3850
3850
  foreignKeyName: "pace_phone_type_organisation_id_fkey";
3851
3851
  columns: ["organisation_id"];
3852
3852
  isOneToOne: false;
3853
- referencedRelation: "organisations";
3853
+ referencedRelation: "core_organisations";
3854
3854
  referencedColumns: ["id"];
3855
3855
  }
3856
3856
  ];
3857
3857
  };
3858
- pace_pronoun_type: {
3858
+ core_pronoun_type: {
3859
3859
  Row: {
3860
3860
  created_at: string | null;
3861
3861
  created_by: string | null;
@@ -3888,12 +3888,12 @@ type Database = {
3888
3888
  foreignKeyName: "pace_pronoun_type_organisation_id_fkey";
3889
3889
  columns: ["organisation_id"];
3890
3890
  isOneToOne: false;
3891
- referencedRelation: "organisations";
3891
+ referencedRelation: "core_organisations";
3892
3892
  referencedColumns: ["id"];
3893
3893
  }
3894
3894
  ];
3895
3895
  };
3896
- pace_qualification: {
3896
+ core_qualification: {
3897
3897
  Row: {
3898
3898
  created_at: string | null;
3899
3899
  credential_id: string | null;
@@ -3938,19 +3938,19 @@ type Database = {
3938
3938
  foreignKeyName: "fk_pace_qualification_organisation_id";
3939
3939
  columns: ["organisation_id"];
3940
3940
  isOneToOne: false;
3941
- referencedRelation: "organisations";
3941
+ referencedRelation: "core_organisations";
3942
3942
  referencedColumns: ["id"];
3943
3943
  },
3944
3944
  {
3945
3945
  foreignKeyName: "pace_qualification_member_id_fkey";
3946
3946
  columns: ["member_id"];
3947
3947
  isOneToOne: false;
3948
- referencedRelation: "pace_member";
3948
+ referencedRelation: "core_member";
3949
3949
  referencedColumns: ["id"];
3950
3950
  }
3951
3951
  ];
3952
3952
  };
3953
- pace_role_type: {
3953
+ core_role_type: {
3954
3954
  Row: {
3955
3955
  created_at: string | null;
3956
3956
  created_by: string | null;
@@ -3983,7 +3983,7 @@ type Database = {
3983
3983
  foreignKeyName: "pace_role_type_organisation_id_fkey";
3984
3984
  columns: ["organisation_id"];
3985
3985
  isOneToOne: false;
3986
- referencedRelation: "organisations";
3986
+ referencedRelation: "core_organisations";
3987
3987
  referencedColumns: ["id"];
3988
3988
  }
3989
3989
  ];
@@ -4298,7 +4298,7 @@ type Database = {
4298
4298
  foreignKeyName: "rbac_apps_organisation_id_fkey";
4299
4299
  columns: ["organisation_id"];
4300
4300
  isOneToOne: false;
4301
- referencedRelation: "organisations";
4301
+ referencedRelation: "core_organisations";
4302
4302
  referencedColumns: ["id"];
4303
4303
  }
4304
4304
  ];
@@ -4357,7 +4357,7 @@ type Database = {
4357
4357
  foreignKeyName: "rbac_audit_events_organisation_id_fkey";
4358
4358
  columns: ["organisation_id"];
4359
4359
  isOneToOne: false;
4360
- referencedRelation: "organisations";
4360
+ referencedRelation: "core_organisations";
4361
4361
  referencedColumns: ["id"];
4362
4362
  }
4363
4363
  ];
@@ -4395,7 +4395,7 @@ type Database = {
4395
4395
  foreignKeyName: "rbac_auth_attempts_organisation_id_fkey";
4396
4396
  columns: ["organisation_id"];
4397
4397
  isOneToOne: false;
4398
- referencedRelation: "organisations";
4398
+ referencedRelation: "core_organisations";
4399
4399
  referencedColumns: ["id"];
4400
4400
  }
4401
4401
  ];
@@ -4452,14 +4452,14 @@ type Database = {
4452
4452
  foreignKeyName: "rbac_event_app_roles_event_id_fkey";
4453
4453
  columns: ["event_id"];
4454
4454
  isOneToOne: false;
4455
- referencedRelation: "event";
4455
+ referencedRelation: "core_events";
4456
4456
  referencedColumns: ["event_id"];
4457
4457
  },
4458
4458
  {
4459
4459
  foreignKeyName: "rbac_event_app_roles_organisation_id_fkey";
4460
4460
  columns: ["organisation_id"];
4461
4461
  isOneToOne: false;
4462
- referencedRelation: "organisations";
4462
+ referencedRelation: "core_organisations";
4463
4463
  referencedColumns: ["id"];
4464
4464
  }
4465
4465
  ];
@@ -4524,7 +4524,7 @@ type Database = {
4524
4524
  foreignKeyName: "rbac_global_roles_organisation_id_fkey";
4525
4525
  columns: ["organisation_id"];
4526
4526
  isOneToOne: false;
4527
- referencedRelation: "organisations";
4527
+ referencedRelation: "core_organisations";
4528
4528
  referencedColumns: ["id"];
4529
4529
  }
4530
4530
  ];
@@ -4583,7 +4583,7 @@ type Database = {
4583
4583
  foreignKeyName: "rbac_organisation_roles_new_organisation_id_fkey";
4584
4584
  columns: ["organisation_id"];
4585
4585
  isOneToOne: false;
4586
- referencedRelation: "organisations";
4586
+ referencedRelation: "core_organisations";
4587
4587
  referencedColumns: ["id"];
4588
4588
  },
4589
4589
  {
@@ -4659,7 +4659,7 @@ type Database = {
4659
4659
  foreignKeyName: "rbac_page_permissions_organisation_id_fkey";
4660
4660
  columns: ["organisation_id"];
4661
4661
  isOneToOne: false;
4662
- referencedRelation: "organisations";
4662
+ referencedRelation: "core_organisations";
4663
4663
  referencedColumns: ["id"];
4664
4664
  }
4665
4665
  ];
@@ -4793,7 +4793,7 @@ type Database = {
4793
4793
  foreignKeyName: "fk_user_login_history_event";
4794
4794
  columns: ["event_id"];
4795
4795
  isOneToOne: false;
4796
- referencedRelation: "event";
4796
+ referencedRelation: "core_events";
4797
4797
  referencedColumns: ["event_id"];
4798
4798
  },
4799
4799
  {
@@ -4828,14 +4828,14 @@ type Database = {
4828
4828
  foreignKeyName: "rbac_user_login_history_organisation_id_fkey";
4829
4829
  columns: ["organisation_id"];
4830
4830
  isOneToOne: false;
4831
- referencedRelation: "organisations";
4831
+ referencedRelation: "core_organisations";
4832
4832
  referencedColumns: ["id"];
4833
4833
  },
4834
4834
  {
4835
4835
  foreignKeyName: "user_login_history_event_id_fkey";
4836
4836
  columns: ["event_id"];
4837
4837
  isOneToOne: false;
4838
- referencedRelation: "event";
4838
+ referencedRelation: "core_events";
4839
4839
  referencedColumns: ["event_id"];
4840
4840
  }
4841
4841
  ];
@@ -4870,7 +4870,7 @@ type Database = {
4870
4870
  foreignKeyName: "rbac_user_profiles_organisation_id_fkey";
4871
4871
  columns: ["organisation_id"];
4872
4872
  isOneToOne: false;
4873
- referencedRelation: "organisations";
4873
+ referencedRelation: "core_organisations";
4874
4874
  referencedColumns: ["id"];
4875
4875
  }
4876
4876
  ];
@@ -4933,14 +4933,14 @@ type Database = {
4933
4933
  foreignKeyName: "rbac_user_sessions_event_id_fkey";
4934
4934
  columns: ["event_id"];
4935
4935
  isOneToOne: false;
4936
- referencedRelation: "event";
4936
+ referencedRelation: "core_events";
4937
4937
  referencedColumns: ["event_id"];
4938
4938
  },
4939
4939
  {
4940
4940
  foreignKeyName: "rbac_user_sessions_organisation_id_fkey";
4941
4941
  columns: ["organisation_id"];
4942
4942
  isOneToOne: false;
4943
- referencedRelation: "organisations";
4943
+ referencedRelation: "core_organisations";
4944
4944
  referencedColumns: ["id"];
4945
4945
  }
4946
4946
  ];
@@ -4987,14 +4987,14 @@ type Database = {
4987
4987
  foreignKeyName: "internal_notes_member_id_fkey";
4988
4988
  columns: ["member_id"];
4989
4989
  isOneToOne: false;
4990
- referencedRelation: "pace_member";
4990
+ referencedRelation: "core_member";
4991
4991
  referencedColumns: ["id"];
4992
4992
  },
4993
4993
  {
4994
4994
  foreignKeyName: "team_internal_notes_organisation_id_fkey";
4995
4995
  columns: ["organisation_id"];
4996
4996
  isOneToOne: false;
4997
- referencedRelation: "organisations";
4997
+ referencedRelation: "core_organisations";
4998
4998
  referencedColumns: ["id"];
4999
4999
  }
5000
5000
  ];
@@ -5048,7 +5048,7 @@ type Database = {
5048
5048
  foreignKeyName: "team_unit_organisation_id_fkey";
5049
5049
  columns: ["organisation_id"];
5050
5050
  isOneToOne: false;
5051
- referencedRelation: "organisations";
5051
+ referencedRelation: "core_organisations";
5052
5052
  referencedColumns: ["id"];
5053
5053
  }
5054
5054
  ];
@@ -5128,14 +5128,14 @@ type Database = {
5128
5128
  foreignKeyName: "fk_trac_accommodation_event_id";
5129
5129
  columns: ["event_id"];
5130
5130
  isOneToOne: false;
5131
- referencedRelation: "event";
5131
+ referencedRelation: "core_events";
5132
5132
  referencedColumns: ["event_id"];
5133
5133
  },
5134
5134
  {
5135
5135
  foreignKeyName: "trac_accommodation_organisation_id_fkey";
5136
5136
  columns: ["organisation_id"];
5137
5137
  isOneToOne: false;
5138
- referencedRelation: "organisations";
5138
+ referencedRelation: "core_organisations";
5139
5139
  referencedColumns: ["id"];
5140
5140
  }
5141
5141
  ];
@@ -5230,21 +5230,21 @@ type Database = {
5230
5230
  foreignKeyName: "fk_trac_activity_event_id";
5231
5231
  columns: ["event_id"];
5232
5232
  isOneToOne: false;
5233
- referencedRelation: "event";
5233
+ referencedRelation: "core_events";
5234
5234
  referencedColumns: ["event_id"];
5235
5235
  },
5236
5236
  {
5237
5237
  foreignKeyName: "trac_activity_event_id_fkey";
5238
5238
  columns: ["event_id"];
5239
5239
  isOneToOne: false;
5240
- referencedRelation: "event";
5240
+ referencedRelation: "core_events";
5241
5241
  referencedColumns: ["event_id"];
5242
5242
  },
5243
5243
  {
5244
5244
  foreignKeyName: "trac_activity_organisation_id_fkey";
5245
5245
  columns: ["organisation_id"];
5246
5246
  isOneToOne: false;
5247
- referencedRelation: "organisations";
5247
+ referencedRelation: "core_organisations";
5248
5248
  referencedColumns: ["id"];
5249
5249
  }
5250
5250
  ];
@@ -5288,7 +5288,7 @@ type Database = {
5288
5288
  foreignKeyName: "trac_attachments_organisation_id_fkey";
5289
5289
  columns: ["organisation_id"];
5290
5290
  isOneToOne: false;
5291
- referencedRelation: "organisations";
5291
+ referencedRelation: "core_organisations";
5292
5292
  referencedColumns: ["id"];
5293
5293
  }
5294
5294
  ];
@@ -5341,14 +5341,14 @@ type Database = {
5341
5341
  foreignKeyName: "fk_trac_contacts_event_id";
5342
5342
  columns: ["event_id"];
5343
5343
  isOneToOne: false;
5344
- referencedRelation: "event";
5344
+ referencedRelation: "core_events";
5345
5345
  referencedColumns: ["event_id"];
5346
5346
  },
5347
5347
  {
5348
5348
  foreignKeyName: "trac_contacts_organisation_id_fkey";
5349
5349
  columns: ["organisation_id"];
5350
5350
  isOneToOne: false;
5351
- referencedRelation: "organisations";
5351
+ referencedRelation: "core_organisations";
5352
5352
  referencedColumns: ["id"];
5353
5353
  }
5354
5354
  ];
@@ -5392,21 +5392,21 @@ type Database = {
5392
5392
  foreignKeyName: "fk_trac_currency_rates_event_id";
5393
5393
  columns: ["event_id"];
5394
5394
  isOneToOne: false;
5395
- referencedRelation: "event";
5395
+ referencedRelation: "core_events";
5396
5396
  referencedColumns: ["event_id"];
5397
5397
  },
5398
5398
  {
5399
5399
  foreignKeyName: "trac_currency_rates_event_id_fkey";
5400
5400
  columns: ["event_id"];
5401
5401
  isOneToOne: false;
5402
- referencedRelation: "event";
5402
+ referencedRelation: "core_events";
5403
5403
  referencedColumns: ["event_id"];
5404
5404
  },
5405
5405
  {
5406
5406
  foreignKeyName: "trac_currency_rates_organisation_id_fkey";
5407
5407
  columns: ["organisation_id"];
5408
5408
  isOneToOne: false;
5409
- referencedRelation: "organisations";
5409
+ referencedRelation: "core_organisations";
5410
5410
  referencedColumns: ["id"];
5411
5411
  }
5412
5412
  ];
@@ -5486,7 +5486,7 @@ type Database = {
5486
5486
  foreignKeyName: "trac_journal_images_organisation_id_fkey";
5487
5487
  columns: ["organisation_id"];
5488
5488
  isOneToOne: false;
5489
- referencedRelation: "organisations";
5489
+ referencedRelation: "core_organisations";
5490
5490
  referencedColumns: ["id"];
5491
5491
  },
5492
5492
  {
@@ -5561,7 +5561,7 @@ type Database = {
5561
5561
  foreignKeyName: "fk_trac_journal_posts_event_id";
5562
5562
  columns: ["event_id"];
5563
5563
  isOneToOne: false;
5564
- referencedRelation: "event";
5564
+ referencedRelation: "core_events";
5565
5565
  referencedColumns: ["event_id"];
5566
5566
  },
5567
5567
  {
@@ -5589,7 +5589,7 @@ type Database = {
5589
5589
  foreignKeyName: "trac_journal_posts_organisation_id_fkey";
5590
5590
  columns: ["organisation_id"];
5591
5591
  isOneToOne: false;
5592
- referencedRelation: "organisations";
5592
+ referencedRelation: "core_organisations";
5593
5593
  referencedColumns: ["id"];
5594
5594
  }
5595
5595
  ];
@@ -5636,7 +5636,7 @@ type Database = {
5636
5636
  foreignKeyName: "trac_location_cache_organisation_id_fkey";
5637
5637
  columns: ["organisation_id"];
5638
5638
  isOneToOne: false;
5639
- referencedRelation: "organisations";
5639
+ referencedRelation: "core_organisations";
5640
5640
  referencedColumns: ["id"];
5641
5641
  }
5642
5642
  ];
@@ -5716,14 +5716,14 @@ type Database = {
5716
5716
  foreignKeyName: "fk_trac_risks_event_id";
5717
5717
  columns: ["event_id"];
5718
5718
  isOneToOne: false;
5719
- referencedRelation: "event";
5719
+ referencedRelation: "core_events";
5720
5720
  referencedColumns: ["event_id"];
5721
5721
  },
5722
5722
  {
5723
5723
  foreignKeyName: "trac_risks_organisation_id_fkey";
5724
5724
  columns: ["organisation_id"];
5725
5725
  isOneToOne: false;
5726
- referencedRelation: "organisations";
5726
+ referencedRelation: "core_organisations";
5727
5727
  referencedColumns: ["id"];
5728
5728
  },
5729
5729
  {
@@ -5828,21 +5828,21 @@ type Database = {
5828
5828
  foreignKeyName: "fk_trac_transport_event_id";
5829
5829
  columns: ["event_id"];
5830
5830
  isOneToOne: false;
5831
- referencedRelation: "event";
5831
+ referencedRelation: "core_events";
5832
5832
  referencedColumns: ["event_id"];
5833
5833
  },
5834
5834
  {
5835
5835
  foreignKeyName: "trac_transport_event_id_fkey";
5836
5836
  columns: ["event_id"];
5837
5837
  isOneToOne: false;
5838
- referencedRelation: "event";
5838
+ referencedRelation: "core_events";
5839
5839
  referencedColumns: ["event_id"];
5840
5840
  },
5841
5841
  {
5842
5842
  foreignKeyName: "trac_transport_organisation_id_fkey";
5843
5843
  columns: ["organisation_id"];
5844
5844
  isOneToOne: false;
5845
- referencedRelation: "organisations";
5845
+ referencedRelation: "core_organisations";
5846
5846
  referencedColumns: ["id"];
5847
5847
  }
5848
5848
  ];
@@ -5859,7 +5859,7 @@ type Database = {
5859
5859
  };
5860
5860
  Relationships: [];
5861
5861
  };
5862
- organisation_memberships: {
5862
+ core_organisation_memberships: {
5863
5863
  Row: {
5864
5864
  created_at: string | null;
5865
5865
  created_by: string | null;
@@ -5901,7 +5901,7 @@ type Database = {
5901
5901
  foreignKeyName: "rbac_organisation_roles_new_organisation_id_fkey";
5902
5902
  columns: ["organisation_id"];
5903
5903
  isOneToOne: false;
5904
- referencedRelation: "organisations";
5904
+ referencedRelation: "core_organisations";
5905
5905
  referencedColumns: ["id"];
5906
5906
  },
5907
5907
  {
@@ -5927,7 +5927,7 @@ type Database = {
5927
5927
  }
5928
5928
  ];
5929
5929
  };
5930
- pace_field_list: {
5930
+ core_field_list: {
5931
5931
  Row: {
5932
5932
  field_name: unknown;
5933
5933
  field_type: string | null;
@@ -5986,14 +5986,14 @@ type Database = {
5986
5986
  foreignKeyName: "rbac_event_app_roles_event_id_fkey";
5987
5987
  columns: ["event_id"];
5988
5988
  isOneToOne: false;
5989
- referencedRelation: "event";
5989
+ referencedRelation: "core_events";
5990
5990
  referencedColumns: ["event_id"];
5991
5991
  },
5992
5992
  {
5993
5993
  foreignKeyName: "rbac_event_app_roles_organisation_id_fkey";
5994
5994
  columns: ["organisation_id"];
5995
5995
  isOneToOne: false;
5996
- referencedRelation: "organisations";
5996
+ referencedRelation: "core_organisations";
5997
5997
  referencedColumns: ["id"];
5998
5998
  }
5999
5999
  ];
@@ -6052,43 +6052,7 @@ type Database = {
6052
6052
  foreignKeyName: "rbac_organisation_roles_new_organisation_id_fkey";
6053
6053
  columns: ["organisation_id"];
6054
6054
  isOneToOne: false;
6055
- referencedRelation: "organisations";
6056
- referencedColumns: ["id"];
6057
- },
6058
- {
6059
- foreignKeyName: "rbac_organisation_roles_user_profiles_fkey";
6060
- columns: ["user_id"];
6061
- isOneToOne: false;
6062
- referencedRelation: "rbac_user_profiles";
6063
- referencedColumns: ["id"];
6064
- },
6065
- {
6066
- foreignKeyName: "rbac_organisation_roles_user_profiles_fkey";
6067
- columns: ["user_id"];
6068
- isOneToOne: false;
6069
- referencedRelation: "user_profiles";
6070
- referencedColumns: ["id"];
6071
- },
6072
- {
6073
- foreignKeyName: "rbac_organisation_roles_user_profiles_fkey";
6074
- columns: ["user_id"];
6075
- isOneToOne: false;
6076
- referencedRelation: "user_profiles";
6077
- referencedColumns: ["user_id"];
6078
- }
6079
- ];
6080
- };
6081
- user_organisation_memberships: {
6082
- Row: {
6083
- organisation_id: string | null;
6084
- user_id: string | null;
6085
- };
6086
- Relationships: [
6087
- {
6088
- foreignKeyName: "rbac_organisation_roles_new_organisation_id_fkey";
6089
- columns: ["organisation_id"];
6090
- isOneToOne: false;
6091
- referencedRelation: "organisations";
6055
+ referencedRelation: "core_organisations";
6092
6056
  referencedColumns: ["id"];
6093
6057
  },
6094
6058
  {