@rebasepro/studio 0.4.0 → 0.6.0
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.
- package/README.md +73 -140
- package/dist/ApiExplorer-CdIwR9Ga.js +963 -0
- package/dist/ApiExplorer-CdIwR9Ga.js.map +1 -0
- package/dist/AuthSimulationSelector-iEZ-Or_1.js +56 -0
- package/dist/AuthSimulationSelector-iEZ-Or_1.js.map +1 -0
- package/dist/BranchesView-DncIRcZt.js +461 -0
- package/dist/BranchesView-DncIRcZt.js.map +1 -0
- package/dist/CronJobsView-4gdtJvoe.js +500 -0
- package/dist/CronJobsView-4gdtJvoe.js.map +1 -0
- package/dist/JSEditor-BhAbEjCP.js +1573 -0
- package/dist/JSEditor-BhAbEjCP.js.map +1 -0
- package/dist/LogsExplorer-CqtKILj8.js +240 -0
- package/dist/LogsExplorer-CqtKILj8.js.map +1 -0
- package/dist/MonacoEditor-COZqrIJ1.js +246 -0
- package/dist/MonacoEditor-COZqrIJ1.js.map +1 -0
- package/dist/RLSEditor-CTxYbBdW.js +1362 -0
- package/dist/RLSEditor-CTxYbBdW.js.map +1 -0
- package/dist/SQLEditor-BLuq_zDM.js +1964 -0
- package/dist/SQLEditor-BLuq_zDM.js.map +1 -0
- package/dist/SchemaVisualizer-BJK2u3C0.js +1068 -0
- package/dist/SchemaVisualizer-BJK2u3C0.js.map +1 -0
- package/dist/StorageView-nDaC2foF.js +1382 -0
- package/dist/StorageView-nDaC2foF.js.map +1 -0
- package/dist/{studio/src/components → components}/ApiExplorer/ApiExplorer.d.ts +2 -1
- package/dist/{studio/src/components → components}/ApiExplorer/EndpointDetail.d.ts +2 -1
- package/dist/{studio/src/components → components}/ApiExplorer/TryItPanel.d.ts +2 -1
- package/dist/{studio/src/components → components}/AuthSimulationSelector.d.ts +2 -1
- package/dist/components/Branches/BranchesView.d.ts +2 -0
- package/dist/components/CronJobs/CronJobsView.d.ts +2 -0
- package/dist/components/JSEditor/JSEditor.d.ts +2 -0
- package/dist/{studio/src/components → components}/JSEditor/JSEditorSidebar.d.ts +2 -1
- package/dist/{studio/src/components → components}/JSEditor/JSMonacoEditor.d.ts +2 -1
- package/dist/components/LogsExplorer/LogsExplorer.d.ts +2 -0
- package/dist/{studio/src/components → components}/RLSEditor/PolicyEditor.d.ts +2 -1
- package/dist/{studio/src/components → components}/RLSEditor/RLSEditor.d.ts +2 -7
- package/dist/{studio/src/components → components}/SQLEditor/MonacoEditor.d.ts +2 -1
- package/dist/{studio/src/components → components}/SQLEditor/SQLEditor.d.ts +2 -1
- package/dist/{studio/src/components → components}/SQLEditor/SQLEditorSidebar.d.ts +2 -1
- package/dist/{studio/src/components → components}/SQLEditor/SchemaBrowser.d.ts +2 -1
- package/dist/{studio/src/components → components}/SchemaVisualizer/RelationEdge.d.ts +1 -1
- package/dist/components/SchemaVisualizer/SchemaVisualizer.d.ts +3 -0
- package/dist/{studio/src/components → components}/SchemaVisualizer/TableNode.d.ts +1 -1
- package/dist/{studio/src/components → components}/SchemaVisualizer/schema-visualizer.utils.d.ts +0 -8
- package/dist/components/StorageView/StorageView.d.ts +2 -0
- package/dist/{studio/src/components → components}/StudioHomePage.d.ts +1 -1
- package/dist/index.es.js +688 -746
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10303 -9572
- package/dist/index.umd.js.map +1 -1
- package/dist/{studio/src/utils → utils}/pgColumnToProperty.d.ts +1 -1
- package/package.json +22 -22
- package/src/components/ApiExplorer/TryItPanel.tsx +15 -18
- package/src/components/CronJobs/CronJobsView.tsx +1 -1
- package/src/components/JSEditor/JSEditor.tsx +10 -15
- package/src/components/LogsExplorer/LogsExplorer.tsx +6 -3
- package/src/components/RLSEditor/PolicyEditor.tsx +0 -1
- package/src/components/RLSEditor/RLSEditor.tsx +1 -1
- package/src/components/SQLEditor/SQLEditor.tsx +40 -30
- package/src/components/SchemaVisualizer/schema-visualizer.utils.ts +3 -3
- package/src/components/SchemaVisualizer/useSchemaGraph.ts +2 -2
- package/src/components/StorageView/StorageView.tsx +22 -11
- package/src/components/StudioHomePage.tsx +51 -15
- package/src/utils/parseSpec.test.ts +41 -20
- package/src/utils/pgColumnToProperty.ts +23 -20
- package/src/utils/sql_utils.ts +1 -1
- package/dist/ApiExplorer-CGHEF1uL.js +0 -1052
- package/dist/ApiExplorer-CGHEF1uL.js.map +0 -1
- package/dist/AuthSimulationSelector-DGoXkWSg.js +0 -105
- package/dist/AuthSimulationSelector-DGoXkWSg.js.map +0 -1
- package/dist/BranchesView-BiTEwIhd.js +0 -291
- package/dist/BranchesView-BiTEwIhd.js.map +0 -1
- package/dist/CronJobsView-3PM_qR8v.js +0 -472
- package/dist/CronJobsView-3PM_qR8v.js.map +0 -1
- package/dist/JSEditor-BCSoElPg.js +0 -1297
- package/dist/JSEditor-BCSoElPg.js.map +0 -1
- package/dist/LogsExplorer-_4sZadKn.js +0 -162
- package/dist/LogsExplorer-_4sZadKn.js.map +0 -1
- package/dist/MonacoEditor-CMYEjiRf.js +0 -161
- package/dist/MonacoEditor-CMYEjiRf.js.map +0 -1
- package/dist/RLSEditor-CHEExeSB.js +0 -1871
- package/dist/RLSEditor-CHEExeSB.js.map +0 -1
- package/dist/SQLEditor-BC0IOUQu.js +0 -1797
- package/dist/SQLEditor-BC0IOUQu.js.map +0 -1
- package/dist/SchemaVisualizer-BGpmzyXT.js +0 -1069
- package/dist/SchemaVisualizer-BGpmzyXT.js.map +0 -1
- package/dist/StorageView-B7AsN2qX.js +0 -869
- package/dist/StorageView-B7AsN2qX.js.map +0 -1
- package/dist/common/src/collections/CollectionRegistry.d.ts +0 -56
- package/dist/common/src/collections/default-collections.d.ts +0 -9
- package/dist/common/src/collections/index.d.ts +0 -2
- package/dist/common/src/data/buildRebaseData.d.ts +0 -14
- package/dist/common/src/data/query_builder.d.ts +0 -55
- package/dist/common/src/index.d.ts +0 -4
- package/dist/common/src/util/builders.d.ts +0 -57
- package/dist/common/src/util/callbacks.d.ts +0 -6
- package/dist/common/src/util/collections.d.ts +0 -11
- package/dist/common/src/util/common.d.ts +0 -2
- package/dist/common/src/util/conditions.d.ts +0 -26
- package/dist/common/src/util/entities.d.ts +0 -58
- package/dist/common/src/util/enums.d.ts +0 -3
- package/dist/common/src/util/index.d.ts +0 -16
- package/dist/common/src/util/navigation_from_path.d.ts +0 -34
- package/dist/common/src/util/navigation_utils.d.ts +0 -20
- package/dist/common/src/util/parent_references_from_path.d.ts +0 -6
- package/dist/common/src/util/paths.d.ts +0 -14
- package/dist/common/src/util/permissions.d.ts +0 -6
- package/dist/common/src/util/references.d.ts +0 -2
- package/dist/common/src/util/relations.d.ts +0 -22
- package/dist/common/src/util/resolutions.d.ts +0 -72
- package/dist/common/src/util/storage.d.ts +0 -24
- package/dist/core/src/components/AIIcon.d.ts +0 -16
- package/dist/core/src/components/BootstrapAdminBanner.d.ts +0 -4
- package/dist/core/src/components/ConfirmationDialog.d.ts +0 -9
- package/dist/core/src/components/Debug/UIReferenceView.d.ts +0 -1
- package/dist/core/src/components/Debug/UIStyleGuide.d.ts +0 -1
- package/dist/core/src/components/ErrorTooltip.d.ts +0 -2
- package/dist/core/src/components/ErrorView.d.ts +0 -21
- package/dist/core/src/components/LanguageToggle.d.ts +0 -1
- package/dist/core/src/components/LoginView/LoginView.d.ts +0 -109
- package/dist/core/src/components/LoginView/index.d.ts +0 -2
- package/dist/core/src/components/NotFoundPage.d.ts +0 -1
- package/dist/core/src/components/RebaseAuth.d.ts +0 -10
- package/dist/core/src/components/RebaseLogo.d.ts +0 -7
- package/dist/core/src/components/UnsavedChangesDialog.d.ts +0 -9
- package/dist/core/src/components/UserDisplay.d.ts +0 -7
- package/dist/core/src/components/UserSelectPopover.d.ts +0 -62
- package/dist/core/src/components/UserSettingsView.d.ts +0 -1
- package/dist/core/src/components/common/index.d.ts +0 -6
- package/dist/core/src/components/common/table_height.d.ts +0 -5
- package/dist/core/src/components/common/types.d.ts +0 -66
- package/dist/core/src/components/common/useColumnsIds.d.ts +0 -9
- package/dist/core/src/components/common/useDataTableController.d.ts +0 -45
- package/dist/core/src/components/common/useDebouncedData.d.ts +0 -9
- package/dist/core/src/components/common/useScrollRestoration.d.ts +0 -14
- package/dist/core/src/components/index.d.ts +0 -17
- package/dist/core/src/contexts/AdminModeController.d.ts +0 -4
- package/dist/core/src/contexts/AnalyticsContext.d.ts +0 -3
- package/dist/core/src/contexts/AuthControllerContext.d.ts +0 -3
- package/dist/core/src/contexts/CustomizationControllerContext.d.ts +0 -3
- package/dist/core/src/contexts/DataDriverContext.d.ts +0 -3
- package/dist/core/src/contexts/DatabaseAdminContext.d.ts +0 -3
- package/dist/core/src/contexts/DialogsProvider.d.ts +0 -4
- package/dist/core/src/contexts/EffectiveRoleController.d.ts +0 -4
- package/dist/core/src/contexts/InternalUserManagementContext.d.ts +0 -3
- package/dist/core/src/contexts/ModeController.d.ts +0 -4
- package/dist/core/src/contexts/RebaseClientInstanceContext.d.ts +0 -6
- package/dist/core/src/contexts/RebaseDataContext.d.ts +0 -3
- package/dist/core/src/contexts/SnackbarProvider.d.ts +0 -2
- package/dist/core/src/contexts/StorageSourceContext.d.ts +0 -3
- package/dist/core/src/contexts/UserConfigurationPersistenceContext.d.ts +0 -3
- package/dist/core/src/contexts/index.d.ts +0 -13
- package/dist/core/src/core/PluginLifecycleManager.d.ts +0 -17
- package/dist/core/src/core/PluginProviderStack.d.ts +0 -21
- package/dist/core/src/core/Rebase.d.ts +0 -14
- package/dist/core/src/core/RebaseProps.d.ts +0 -147
- package/dist/core/src/core/RebaseRouter.d.ts +0 -4
- package/dist/core/src/core/RebaseRoutes.d.ts +0 -17
- package/dist/core/src/core/index.d.ts +0 -4
- package/dist/core/src/hooks/ApiConfigContext.d.ts +0 -24
- package/dist/core/src/hooks/data/delete.d.ts +0 -31
- package/dist/core/src/hooks/data/save.d.ts +0 -34
- package/dist/core/src/hooks/data/useCollectionFetch.d.ts +0 -62
- package/dist/core/src/hooks/data/useData.d.ts +0 -13
- package/dist/core/src/hooks/data/useDataOrder.d.ts +0 -12
- package/dist/core/src/hooks/data/useEntityFetch.d.ts +0 -43
- package/dist/core/src/hooks/data/useRelationSelector.d.ts +0 -52
- package/dist/core/src/hooks/data/useUserSelector.d.ts +0 -31
- package/dist/core/src/hooks/index.d.ts +0 -37
- package/dist/core/src/hooks/useAdminModeController.d.ts +0 -19
- package/dist/core/src/hooks/useAnalyticsController.d.ts +0 -5
- package/dist/core/src/hooks/useAuthController.d.ts +0 -11
- package/dist/core/src/hooks/useAuthSubscription.d.ts +0 -2
- package/dist/core/src/hooks/useBackendStorageSource.d.ts +0 -30
- package/dist/core/src/hooks/useBridgeRegistration.d.ts +0 -18
- package/dist/core/src/hooks/useBrowserTitleAndIcon.d.ts +0 -6
- package/dist/core/src/hooks/useBuildAdminModeController.d.ts +0 -6
- package/dist/core/src/hooks/useBuildEffectiveRoleController.d.ts +0 -8
- package/dist/core/src/hooks/useBuildLocalConfigurationPersistence.d.ts +0 -2
- package/dist/core/src/hooks/useBuildModeController.d.ts +0 -6
- package/dist/core/src/hooks/useClipboard.d.ts +0 -57
- package/dist/core/src/hooks/useCollapsedGroups.d.ts +0 -27
- package/dist/core/src/hooks/useCustomizationController.d.ts +0 -11
- package/dist/core/src/hooks/useDialogsController.d.ts +0 -11
- package/dist/core/src/hooks/useEffectiveRoleController.d.ts +0 -7
- package/dist/core/src/hooks/useInternalUserManagementController.d.ts +0 -12
- package/dist/core/src/hooks/useLargeLayout.d.ts +0 -1
- package/dist/core/src/hooks/useModeController.d.ts +0 -19
- package/dist/core/src/hooks/usePermissions.d.ts +0 -12
- package/dist/core/src/hooks/useRebaseClient.d.ts +0 -5
- package/dist/core/src/hooks/useRebaseContext.d.ts +0 -11
- package/dist/core/src/hooks/useRebaseRegistry.d.ts +0 -34
- package/dist/core/src/hooks/useResolvedComponent.d.ts +0 -47
- package/dist/core/src/hooks/useSlot.d.ts +0 -18
- package/dist/core/src/hooks/useSnackbarController.d.ts +0 -20
- package/dist/core/src/hooks/useStorageSource.d.ts +0 -7
- package/dist/core/src/hooks/useStudioBridge.d.ts +0 -91
- package/dist/core/src/hooks/useTranslation.d.ts +0 -17
- package/dist/core/src/hooks/useUnsavedChangesDialog.d.ts +0 -12
- package/dist/core/src/hooks/useUserConfigurationPersistence.d.ts +0 -8
- package/dist/core/src/i18n/RebaseI18nProvider.d.ts +0 -33
- package/dist/core/src/index.d.ts +0 -15
- package/dist/core/src/internal/common.d.ts +0 -3
- package/dist/core/src/internal/useRestoreScroll.d.ts +0 -6
- package/dist/core/src/locales/de.d.ts +0 -2
- package/dist/core/src/locales/en.d.ts +0 -10
- package/dist/core/src/locales/es.d.ts +0 -10
- package/dist/core/src/locales/fr.d.ts +0 -2
- package/dist/core/src/locales/hi.d.ts +0 -2
- package/dist/core/src/locales/it.d.ts +0 -2
- package/dist/core/src/locales/pt.d.ts +0 -7
- package/dist/core/src/util/constants.d.ts +0 -1
- package/dist/core/src/util/createFormexStub.d.ts +0 -2
- package/dist/core/src/util/entity_cache.d.ts +0 -22
- package/dist/core/src/util/enums.d.ts +0 -5
- package/dist/core/src/util/icon_list.d.ts +0 -5
- package/dist/core/src/util/icons.d.ts +0 -20
- package/dist/core/src/util/index.d.ts +0 -8
- package/dist/core/src/util/previews.d.ts +0 -4
- package/dist/core/src/util/useStorageUploadController.d.ts +0 -38
- package/dist/formex/src/Field.d.ts +0 -52
- package/dist/formex/src/Formex.d.ts +0 -7
- package/dist/formex/src/index.d.ts +0 -5
- package/dist/formex/src/types.d.ts +0 -40
- package/dist/formex/src/useCreateFormex.d.ts +0 -14
- package/dist/formex/src/utils.d.ts +0 -16
- package/dist/studio/src/components/Branches/BranchesView.d.ts +0 -1
- package/dist/studio/src/components/CronJobs/CronJobsView.d.ts +0 -1
- package/dist/studio/src/components/JSEditor/JSEditor.d.ts +0 -1
- package/dist/studio/src/components/LogsExplorer/LogsExplorer.d.ts +0 -1
- package/dist/studio/src/components/SchemaVisualizer/SchemaVisualizer.d.ts +0 -2
- package/dist/studio/src/components/SchemaVisualizer/index.d.ts +0 -5
- package/dist/studio/src/components/StorageView/StorageView.d.ts +0 -1
- package/dist/studio/src/utils/entities.d.ts +0 -0
- package/dist/types/src/controllers/analytics_controller.d.ts +0 -7
- package/dist/types/src/controllers/auth.d.ts +0 -104
- package/dist/types/src/controllers/client.d.ts +0 -168
- package/dist/types/src/controllers/collection_registry.d.ts +0 -46
- package/dist/types/src/controllers/customization_controller.d.ts +0 -60
- package/dist/types/src/controllers/data.d.ts +0 -207
- package/dist/types/src/controllers/data_driver.d.ts +0 -218
- package/dist/types/src/controllers/database_admin.d.ts +0 -11
- package/dist/types/src/controllers/dialogs_controller.d.ts +0 -36
- package/dist/types/src/controllers/effective_role.d.ts +0 -4
- package/dist/types/src/controllers/email.d.ts +0 -36
- package/dist/types/src/controllers/index.d.ts +0 -18
- package/dist/types/src/controllers/local_config_persistence.d.ts +0 -20
- package/dist/types/src/controllers/navigation.d.ts +0 -225
- package/dist/types/src/controllers/registry.d.ts +0 -63
- package/dist/types/src/controllers/side_dialogs_controller.d.ts +0 -67
- package/dist/types/src/controllers/side_entity_controller.d.ts +0 -97
- package/dist/types/src/controllers/snackbar.d.ts +0 -24
- package/dist/types/src/controllers/storage.d.ts +0 -171
- package/dist/types/src/index.d.ts +0 -4
- package/dist/types/src/rebase_context.d.ts +0 -122
- package/dist/types/src/types/auth_adapter.d.ts +0 -301
- package/dist/types/src/types/backend.d.ts +0 -536
- package/dist/types/src/types/backend_hooks.d.ts +0 -172
- package/dist/types/src/types/builders.d.ts +0 -15
- package/dist/types/src/types/chips.d.ts +0 -5
- package/dist/types/src/types/collections.d.ts +0 -941
- package/dist/types/src/types/component_ref.d.ts +0 -47
- package/dist/types/src/types/cron.d.ts +0 -102
- package/dist/types/src/types/data_source.d.ts +0 -64
- package/dist/types/src/types/database_adapter.d.ts +0 -94
- package/dist/types/src/types/entities.d.ts +0 -145
- package/dist/types/src/types/entity_actions.d.ts +0 -104
- package/dist/types/src/types/entity_callbacks.d.ts +0 -173
- package/dist/types/src/types/entity_link_builder.d.ts +0 -7
- package/dist/types/src/types/entity_overrides.d.ts +0 -10
- package/dist/types/src/types/entity_views.d.ts +0 -87
- package/dist/types/src/types/export_import.d.ts +0 -21
- package/dist/types/src/types/formex.d.ts +0 -40
- package/dist/types/src/types/index.d.ts +0 -28
- package/dist/types/src/types/locales.d.ts +0 -4
- package/dist/types/src/types/modify_collections.d.ts +0 -5
- package/dist/types/src/types/plugins.d.ts +0 -282
- package/dist/types/src/types/properties.d.ts +0 -1181
- package/dist/types/src/types/property_config.d.ts +0 -74
- package/dist/types/src/types/relations.d.ts +0 -336
- package/dist/types/src/types/slots.d.ts +0 -262
- package/dist/types/src/types/translations.d.ts +0 -900
- package/dist/types/src/types/user_management_delegate.d.ts +0 -86
- package/dist/types/src/types/websockets.d.ts +0 -78
- package/dist/types/src/users/index.d.ts +0 -1
- package/dist/types/src/users/user.d.ts +0 -50
- package/dist/ui/src/components/Alert.d.ts +0 -12
- package/dist/ui/src/components/Autocomplete.d.ts +0 -21
- package/dist/ui/src/components/Avatar.d.ts +0 -11
- package/dist/ui/src/components/Badge.d.ts +0 -8
- package/dist/ui/src/components/BooleanSwitch.d.ts +0 -14
- package/dist/ui/src/components/BooleanSwitchWithLabel.d.ts +0 -17
- package/dist/ui/src/components/Button.d.ts +0 -14
- package/dist/ui/src/components/Card.d.ts +0 -8
- package/dist/ui/src/components/CenteredView.d.ts +0 -9
- package/dist/ui/src/components/Checkbox.d.ts +0 -13
- package/dist/ui/src/components/Chip.d.ts +0 -26
- package/dist/ui/src/components/CircularProgress.d.ts +0 -5
- package/dist/ui/src/components/CircularProgressCenter.d.ts +0 -11
- package/dist/ui/src/components/Collapse.d.ts +0 -9
- package/dist/ui/src/components/ColorPicker.d.ts +0 -30
- package/dist/ui/src/components/Container.d.ts +0 -8
- package/dist/ui/src/components/DateTimeField.d.ts +0 -24
- package/dist/ui/src/components/DebouncedTextField.d.ts +0 -2
- package/dist/ui/src/components/Dialog.d.ts +0 -39
- package/dist/ui/src/components/DialogActions.d.ts +0 -7
- package/dist/ui/src/components/DialogContent.d.ts +0 -7
- package/dist/ui/src/components/DialogTitle.d.ts +0 -10
- package/dist/ui/src/components/ErrorBoundary.d.ts +0 -33
- package/dist/ui/src/components/ExpandablePanel.d.ts +0 -12
- package/dist/ui/src/components/FileUpload.d.ts +0 -23
- package/dist/ui/src/components/FilterChip.d.ts +0 -34
- package/dist/ui/src/components/IconButton.d.ts +0 -12
- package/dist/ui/src/components/InfoLabel.d.ts +0 -5
- package/dist/ui/src/components/InputLabel.d.ts +0 -11
- package/dist/ui/src/components/Label.d.ts +0 -7
- package/dist/ui/src/components/LoadingButton.d.ts +0 -7
- package/dist/ui/src/components/Markdown.d.ts +0 -10
- package/dist/ui/src/components/Menu.d.ts +0 -23
- package/dist/ui/src/components/Menubar.d.ts +0 -80
- package/dist/ui/src/components/MultiSelect.d.ts +0 -48
- package/dist/ui/src/components/Paper.d.ts +0 -6
- package/dist/ui/src/components/Popover.d.ts +0 -24
- package/dist/ui/src/components/RadioGroup.d.ts +0 -28
- package/dist/ui/src/components/ResizablePanels.d.ts +0 -18
- package/dist/ui/src/components/SearchBar.d.ts +0 -26
- package/dist/ui/src/components/Select.d.ts +0 -43
- package/dist/ui/src/components/Separator.d.ts +0 -5
- package/dist/ui/src/components/Sheet.d.ts +0 -22
- package/dist/ui/src/components/Skeleton.d.ts +0 -6
- package/dist/ui/src/components/Slider.d.ts +0 -21
- package/dist/ui/src/components/Table.d.ts +0 -34
- package/dist/ui/src/components/Tabs.d.ts +0 -19
- package/dist/ui/src/components/TextField.d.ts +0 -58
- package/dist/ui/src/components/TextareaAutosize.d.ts +0 -43
- package/dist/ui/src/components/ToggleButtonGroup.d.ts +0 -30
- package/dist/ui/src/components/Tooltip.d.ts +0 -19
- package/dist/ui/src/components/Typography.d.ts +0 -36
- package/dist/ui/src/components/VirtualTable/VirtualTable.d.ts +0 -11
- package/dist/ui/src/components/VirtualTable/VirtualTableCell.d.ts +0 -21
- package/dist/ui/src/components/VirtualTable/VirtualTableHeader.d.ts +0 -29
- package/dist/ui/src/components/VirtualTable/VirtualTableHeaderRow.d.ts +0 -2
- package/dist/ui/src/components/VirtualTable/VirtualTableProps.d.ts +0 -249
- package/dist/ui/src/components/VirtualTable/VirtualTableRow.d.ts +0 -3
- package/dist/ui/src/components/VirtualTable/index.d.ts +0 -3
- package/dist/ui/src/components/VirtualTable/types.d.ts +0 -38
- package/dist/ui/src/components/common/SelectInputLabel.d.ts +0 -5
- package/dist/ui/src/components/index.d.ts +0 -58
- package/dist/ui/src/hooks/PortalContainerContext.d.ts +0 -31
- package/dist/ui/src/hooks/index.d.ts +0 -6
- package/dist/ui/src/hooks/useDebounceCallback.d.ts +0 -1
- package/dist/ui/src/hooks/useDebounceValue.d.ts +0 -1
- package/dist/ui/src/hooks/useDebouncedCallback.d.ts +0 -1
- package/dist/ui/src/hooks/useInjectStyles.d.ts +0 -7
- package/dist/ui/src/hooks/useOutsideAlerter.d.ts +0 -5
- package/dist/ui/src/icons/GitHubIcon.d.ts +0 -2
- package/dist/ui/src/icons/HandleIcon.d.ts +0 -1
- package/dist/ui/src/icons/Icon.d.ts +0 -20
- package/dist/ui/src/icons/cool_icon_keys.d.ts +0 -1
- package/dist/ui/src/icons/icon_keys.d.ts +0 -1
- package/dist/ui/src/icons/index.d.ts +0 -8
- package/dist/ui/src/index.d.ts +0 -5
- package/dist/ui/src/styles.d.ts +0 -12
- package/dist/ui/src/util/chip_colors.d.ts +0 -4
- package/dist/ui/src/util/cls.d.ts +0 -2
- package/dist/ui/src/util/debounce.d.ts +0 -10
- package/dist/ui/src/util/hash.d.ts +0 -1
- package/dist/ui/src/util/index.d.ts +0 -4
- package/dist/ui/src/util/key_to_icon_component.d.ts +0 -1
- package/src/components/SchemaVisualizer/index.ts +0 -5
- package/src/utils/entities.ts +0 -2
- /package/dist/{studio/src/components → components}/ApiExplorer/parseSpec.d.ts +0 -0
- /package/dist/{studio/src/components → components}/ApiExplorer/types.d.ts +0 -0
- /package/dist/{studio/src/components → components}/RLSEditor/index.d.ts +0 -0
- /package/dist/{studio/src/components → components}/RebaseStudio.d.ts +0 -0
- /package/dist/{studio/src/components → components}/SQLEditor/ExplainVisualizer.d.ts +0 -0
- /package/dist/{studio/src/components → components}/SchemaVisualizer/useSchemaGraph.d.ts +0 -0
- /package/dist/{studio/src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{studio/src/utils → utils}/sql_utils.d.ts +0 -0
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from "react";
|
|
2
|
-
import { RebaseTranslations } from "@rebasepro/types";
|
|
3
|
-
export declare const REBASE_LOCALE_STORAGE_KEY = "rebase_locale";
|
|
4
|
-
/** DeepPartial helper — allows partial overrides at any nesting level */
|
|
5
|
-
type DeepPartial<T> = T extends object ? {
|
|
6
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
7
|
-
} : T;
|
|
8
|
-
export interface RebaseI18nProviderProps {
|
|
9
|
-
/** BCP-47 locale tag, e.g. "en", "es", "fr". Defaults to "en". */
|
|
10
|
-
locale?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Override or extend any Rebase UI string, keyed by locale.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* translations={{
|
|
16
|
-
* en: { save: "Publish" },
|
|
17
|
-
* es: { save: "Publicar", discard: "Descartar" }
|
|
18
|
-
* }}
|
|
19
|
-
*/
|
|
20
|
-
translations?: {
|
|
21
|
-
[locale: string]: DeepPartial<RebaseTranslations>;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Initialises a dedicated i18next instance for Rebase's internal UI strings.
|
|
26
|
-
*
|
|
27
|
-
* This instance is isolated from any app-level i18next configuration the
|
|
28
|
-
* consumer may have. Mount this at the top of the Rebase component tree.
|
|
29
|
-
*
|
|
30
|
-
* @internal
|
|
31
|
-
*/
|
|
32
|
-
export declare function RebaseI18nProvider({ locale, translations, children }: PropsWithChildren<RebaseI18nProviderProps>): import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
-
export {};
|
package/dist/core/src/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from "./core";
|
|
2
|
-
export * from "./hooks";
|
|
3
|
-
export * from "./components";
|
|
4
|
-
export * from "./util";
|
|
5
|
-
export * from "./contexts";
|
|
6
|
-
export * from "./internal/common";
|
|
7
|
-
export * from "./internal/useRestoreScroll";
|
|
8
|
-
export { useUnsavedChangesDialog } from "./hooks/useUnsavedChangesDialog";
|
|
9
|
-
export type { UnsavedChangesDialogProps } from "./components/UnsavedChangesDialog";
|
|
10
|
-
export { UnsavedChangesDialog } from "./components/UnsavedChangesDialog";
|
|
11
|
-
export * from "./i18n/RebaseI18nProvider";
|
|
12
|
-
export * from "./locales/en";
|
|
13
|
-
export * from "./locales/es";
|
|
14
|
-
export * from "./hooks/useStudioBridge";
|
|
15
|
-
export { useBridgeRegistration } from "./hooks/useBridgeRegistration";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RebaseTranslations } from "@rebasepro/types";
|
|
2
|
-
/**
|
|
3
|
-
* English baseline translations for @rebasepro/core.
|
|
4
|
-
*
|
|
5
|
-
* This is the single source of truth for all default UI strings.
|
|
6
|
-
* Override any key via the `translations` prop on Rebase entry-point components.
|
|
7
|
-
*
|
|
8
|
-
* @group Core
|
|
9
|
-
*/
|
|
10
|
-
export declare const en: RebaseTranslations;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RebaseTranslations } from "@rebasepro/types";
|
|
2
|
-
/**
|
|
3
|
-
* Spanish baseline translations for @rebasepro/core.
|
|
4
|
-
*
|
|
5
|
-
* This is the single source of truth for all default UI strings in Spanish.
|
|
6
|
-
* Override any key via the `translations` prop on Rebase entry-point components.
|
|
7
|
-
*
|
|
8
|
-
* @group Core
|
|
9
|
-
*/
|
|
10
|
-
export declare const es: RebaseTranslations;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const STUDIO_NAVIGATION_GROUPS: string[];
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Saves data to the in-memory cache and persists it individually in `sessionStorage`.
|
|
3
|
-
* @param path - The unique path/key for the data.
|
|
4
|
-
* @param data - The data to cache and persist.
|
|
5
|
-
*/
|
|
6
|
-
export declare function saveEntityToCache(path: string, data: object): void;
|
|
7
|
-
export declare function removeEntityFromMemoryCache(path: string): void;
|
|
8
|
-
export declare function saveEntityToMemoryCache(path: string, data: object): void;
|
|
9
|
-
export declare function getEntityFromMemoryCache(path: string): object | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Retrieves an entity from the in-memory cache or `sessionStorage`.
|
|
12
|
-
* If the entity is not in the cache but exists in `sessionStorage`, it loads it into the cache.
|
|
13
|
-
* @param path - The unique path/key for the entity.
|
|
14
|
-
* @returns The cached entity or `undefined` if not found.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getEntityFromCache(path: string): object | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Removes an entity from both the in-memory cache and `sessionStorage`.
|
|
19
|
-
* @param path - The unique path/key for the entity to remove.
|
|
20
|
-
*/
|
|
21
|
-
export declare function removeEntityFromCache(path: string): void;
|
|
22
|
-
export declare function flattenKeys(obj: Record<string, unknown> | unknown[], prefix?: string, result?: string[]): string[];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { EnumValueConfig } from "@rebasepro/types";
|
|
2
|
-
import { ChipColorScheme } from "@rebasepro/ui";
|
|
3
|
-
export declare function getColorScheme(enumValues: EnumValueConfig[], key: string | number): ChipColorScheme | undefined;
|
|
4
|
-
export declare function isEnumValueDisabled(labelOrConfig?: string | EnumValueConfig): boolean | undefined;
|
|
5
|
-
export declare function buildEnumLabel(labelOrConfig?: string | EnumValueConfig): string | undefined;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IconColor } from "@rebasepro/ui";
|
|
3
|
-
/**
|
|
4
|
-
* Render an icon element from a string key or existing React element.
|
|
5
|
-
* This resolves the icon from the lucide-react icons map directly.
|
|
6
|
-
*/
|
|
7
|
-
export declare function getIcon(iconKey?: string | React.ReactNode, className?: string, color?: IconColor, size?: "smallest" | "small" | "medium" | "large" | number): React.ReactElement | undefined;
|
|
8
|
-
export type IconViewProps = {
|
|
9
|
-
slug: string;
|
|
10
|
-
name: string;
|
|
11
|
-
singularName?: string;
|
|
12
|
-
group?: string;
|
|
13
|
-
icon?: string | React.ReactNode;
|
|
14
|
-
};
|
|
15
|
-
export declare const IconForView: React.NamedExoticComponent<{
|
|
16
|
-
collectionOrView?: IconViewProps;
|
|
17
|
-
color?: IconColor;
|
|
18
|
-
className?: string;
|
|
19
|
-
size?: "smallest" | "small" | "medium" | "large" | number;
|
|
20
|
-
}>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { EntityCollection, PropertyConfig } from "@rebasepro/types";
|
|
2
|
-
import { AuthController } from "@rebasepro/types";
|
|
3
|
-
export declare function getEntityPreviewKeys(authController: AuthController, targetCollection: EntityCollection<any>, fields: Record<string, PropertyConfig>, previewProperties?: string[], limit?: number): string[];
|
|
4
|
-
export declare function getEntityTitlePropertyKey<M extends Record<string, any>>(collection: EntityCollection<M>, propertyConfigs: Record<string, PropertyConfig>): string | undefined;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { ArrayProperty, StringProperty } from "@rebasepro/types";
|
|
2
|
-
import { EntityValues, StorageConfig, StorageSource } from "@rebasepro/types";
|
|
3
|
-
export type StorageFieldSize = "smallest" | "small" | "medium" | "large" | number;
|
|
4
|
-
/**
|
|
5
|
-
* Internal representation of an item in the storage
|
|
6
|
-
* It can have two states, having a storagePathOrDownloadUrl set,
|
|
7
|
-
* which means the file has been uploaded, and it is rendered as a preview
|
|
8
|
-
* Or have a pending file being uploaded.
|
|
9
|
-
*/
|
|
10
|
-
export interface StorageFieldItem {
|
|
11
|
-
id: number;
|
|
12
|
-
storagePathOrDownloadUrl?: string;
|
|
13
|
-
file?: File;
|
|
14
|
-
fileName?: string;
|
|
15
|
-
metadata?: Record<string, unknown>;
|
|
16
|
-
size: StorageFieldSize;
|
|
17
|
-
}
|
|
18
|
-
export declare function useStorageUploadController<M extends Record<string, unknown>>({ entityId, entityValues, path, value, property, propertyKey, storageSource, disabled, onChange }: {
|
|
19
|
-
entityId?: string | number;
|
|
20
|
-
entityValues: EntityValues<M>;
|
|
21
|
-
value: string | string[] | null;
|
|
22
|
-
path?: string;
|
|
23
|
-
propertyKey: string;
|
|
24
|
-
property: StringProperty | ArrayProperty | StringProperty | ArrayProperty;
|
|
25
|
-
storageSource: StorageSource;
|
|
26
|
-
disabled: boolean;
|
|
27
|
-
onChange: (value: string | string[] | null) => void;
|
|
28
|
-
}): {
|
|
29
|
-
internalValue: StorageFieldItem[];
|
|
30
|
-
setInternalValue: import("react").Dispatch<import("react").SetStateAction<StorageFieldItem[]>>;
|
|
31
|
-
storage: StorageConfig;
|
|
32
|
-
fileNameBuilder: (file: File) => Promise<string>;
|
|
33
|
-
storagePathBuilder: (file: File) => string;
|
|
34
|
-
onFileUploadComplete: (uploadedPath: string, entry: StorageFieldItem, metadata?: Record<string, unknown>, uploadedUrl?: string) => Promise<void>;
|
|
35
|
-
onFileUploadError: (entry: StorageFieldItem) => void;
|
|
36
|
-
onFilesAdded: (acceptedFiles: File[]) => Promise<void>;
|
|
37
|
-
multipleFilesSupported: boolean;
|
|
38
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { FormexController } from "./types";
|
|
3
|
-
export interface FieldInputProps<Value> {
|
|
4
|
-
/** Value of the field */
|
|
5
|
-
value: Value;
|
|
6
|
-
/** Name of the field */
|
|
7
|
-
name: string;
|
|
8
|
-
/** Multiple select? */
|
|
9
|
-
multiple?: boolean;
|
|
10
|
-
/** Is the field checked? */
|
|
11
|
-
checked?: boolean;
|
|
12
|
-
/** Change event handler */
|
|
13
|
-
onChange: (event: React.SyntheticEvent) => void;
|
|
14
|
-
/** Blur event handler */
|
|
15
|
-
onBlur: (event: React.FocusEvent) => void;
|
|
16
|
-
}
|
|
17
|
-
export interface FormexFieldProps<Value = any, FormValues extends object = object> {
|
|
18
|
-
field: FieldInputProps<Value>;
|
|
19
|
-
form: FormexController<FormValues>;
|
|
20
|
-
}
|
|
21
|
-
export interface FieldConfig<Value, C extends React.ElementType | undefined = undefined> {
|
|
22
|
-
/**
|
|
23
|
-
* Component to render. Can either be a string e.g. 'select', 'input', or 'textarea', or a component.
|
|
24
|
-
*/
|
|
25
|
-
as?: C | string | React.ForwardRefExoticComponent<Record<string, unknown>>;
|
|
26
|
-
/**
|
|
27
|
-
* Children render function <Field name>{props => ...}</Field>)
|
|
28
|
-
*/
|
|
29
|
-
children?: ((props: FormexFieldProps<Value>) => React.ReactNode) | React.ReactNode;
|
|
30
|
-
/**
|
|
31
|
-
* Validate a single field value independently
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* Used for 'select' and related input types.
|
|
35
|
-
*/
|
|
36
|
-
multiple?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Field name
|
|
39
|
-
*/
|
|
40
|
-
name: string;
|
|
41
|
-
/** HTML input type */
|
|
42
|
-
type?: string;
|
|
43
|
-
/** Field value */
|
|
44
|
-
value?: unknown;
|
|
45
|
-
/** Inner ref */
|
|
46
|
-
innerRef?: (instance: unknown) => void;
|
|
47
|
-
}
|
|
48
|
-
export type FieldProps<T, C extends React.ElementType | undefined> = {
|
|
49
|
-
as?: C;
|
|
50
|
-
} & (C extends React.ElementType ? (React.ComponentProps<C> & FieldConfig<T, C>) : FieldConfig<T, C>);
|
|
51
|
-
export declare function Field<T, C extends React.ElementType | undefined = undefined>({ validate, name, children, as: is, // `as` is reserved in typescript lol
|
|
52
|
-
className, ...props }: FieldProps<T, C>): any;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FormexController } from "./types";
|
|
3
|
-
export declare const useFormex: <T = any>() => FormexController<T>;
|
|
4
|
-
export declare const Formex: <T = any>({ value, children }: {
|
|
5
|
-
value: FormexController<T>;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React, { FormEvent } from "react";
|
|
2
|
-
export type FormexController<T = any> = {
|
|
3
|
-
values: T;
|
|
4
|
-
initialValues: T;
|
|
5
|
-
setValues: (values: T) => void;
|
|
6
|
-
setFieldValue: (key: string, value: unknown, shouldValidate?: boolean) => void;
|
|
7
|
-
touched: Record<string, boolean>;
|
|
8
|
-
setFieldTouched: (key: string, touched: boolean, shouldValidate?: boolean) => void;
|
|
9
|
-
setTouched: (touched: Record<string, boolean>) => void;
|
|
10
|
-
dirty: boolean;
|
|
11
|
-
setDirty: (dirty: boolean) => void;
|
|
12
|
-
setSubmitCount: (submitCount: number) => void;
|
|
13
|
-
errors: Record<string, string>;
|
|
14
|
-
setFieldError: (key: string, error?: string) => void;
|
|
15
|
-
handleChange: (event: React.SyntheticEvent) => void;
|
|
16
|
-
handleBlur: (event: React.FocusEvent) => void;
|
|
17
|
-
handleSubmit: (event?: FormEvent<HTMLFormElement>) => void;
|
|
18
|
-
validate: () => void;
|
|
19
|
-
resetForm: (props?: FormexResetProps<T>) => void;
|
|
20
|
-
submitCount: number;
|
|
21
|
-
isSubmitting: boolean;
|
|
22
|
-
setSubmitting: (isSubmitting: boolean) => void;
|
|
23
|
-
isValidating: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* The version of the form. This is incremented every time the form is reset
|
|
26
|
-
* or the form is submitted.
|
|
27
|
-
*/
|
|
28
|
-
version: number;
|
|
29
|
-
debugId?: string;
|
|
30
|
-
undo: () => void;
|
|
31
|
-
redo: () => void;
|
|
32
|
-
canUndo: boolean;
|
|
33
|
-
canRedo: boolean;
|
|
34
|
-
};
|
|
35
|
-
export type FormexResetProps<T = any> = {
|
|
36
|
-
values?: T;
|
|
37
|
-
submitCount?: number;
|
|
38
|
-
errors?: Record<string, string>;
|
|
39
|
-
touched?: Record<string, boolean>;
|
|
40
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FormexController } from "./types";
|
|
2
|
-
export declare function useCreateFormex<T = any>({ initialValues, initialErrors, initialDirty, initialTouched, validation, validateOnChange, validateOnInitialRender, onSubmit, onReset, onValuesChangeDeferred, debugId }: {
|
|
3
|
-
initialValues: T;
|
|
4
|
-
initialErrors?: Record<string, string>;
|
|
5
|
-
initialDirty?: boolean;
|
|
6
|
-
initialTouched?: Record<string, boolean>;
|
|
7
|
-
validateOnChange?: boolean;
|
|
8
|
-
validateOnInitialRender?: boolean;
|
|
9
|
-
validation?: (values: T) => Record<string, string> | Promise<Record<string, string>> | undefined | void;
|
|
10
|
-
onValuesChangeDeferred?: (values: T, controller: FormexController<T>) => void;
|
|
11
|
-
onSubmit?: (values: T, controller: FormexController<T>) => void | Promise<void>;
|
|
12
|
-
onReset?: (controller: FormexController<T>) => void | Promise<void>;
|
|
13
|
-
debugId?: string;
|
|
14
|
-
}): FormexController<T>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** @private is the value an empty array? */
|
|
2
|
-
export declare const isEmptyArray: (value?: unknown) => boolean;
|
|
3
|
-
/** @private is the given object a Function? */
|
|
4
|
-
export declare const isFunction: (obj: unknown) => obj is Function;
|
|
5
|
-
/** @private is the given object an Object? */
|
|
6
|
-
export declare const isObject: (obj: unknown) => obj is Record<string, unknown>;
|
|
7
|
-
/** @private is the given object an integer? */
|
|
8
|
-
export declare const isInteger: (obj: unknown) => boolean;
|
|
9
|
-
/** @private is the given object a NaN? */
|
|
10
|
-
export declare const isNaN: (obj: unknown) => boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Deeply get a value from an object via its path.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getIn(obj: unknown, key: string | string[], def?: unknown, p?: number): unknown;
|
|
15
|
-
export declare function setIn(obj: unknown, path: string, value: unknown): unknown;
|
|
16
|
-
export declare function clone(value: unknown): unknown;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function BranchesView(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function CronJobsView(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function JSEditor(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function LogsExplorer(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const StorageView: () => import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type AnalyticsController = {
|
|
2
|
-
/**
|
|
3
|
-
* Callback used to get analytics events from the CMS
|
|
4
|
-
*/
|
|
5
|
-
onAnalyticsEvent?: (event: AnalyticsEvent, data?: object) => void;
|
|
6
|
-
};
|
|
7
|
-
export type AnalyticsEvent = "entity_click" | "entity_click_from_reference" | "reference_selection_clear" | "reference_selection_toggle" | "reference_selected_single" | "reference_selection_new_entity" | "edit_entity_clicked" | "entity_edited" | "new_entity_click" | "new_entity_saved" | "copy_entity_click" | "entity_copied" | "single_delete_dialog_open" | "multiple_delete_dialog_open" | "single_entity_deleted" | "multiple_entities_deleted" | "drawer_navigate_to_home" | "drawer_navigate_to_collection" | "drawer_navigate_to_view" | "home_navigate_to_collection" | "home_favorite_navigate_to_collection" | "home_navigate_to_view" | "home_navigate_to_admin_view" | "home_favorite_navigate_to_view" | "home_move_card" | "home_move_group" | "home_drop_new_group" | "collection_inline_editing" | "view_mode_changed" | "kanban_card_moved" | "kanban_column_reorder" | "kanban_property_changed" | "kanban_new_entity_in_column" | "kanban_backfill_order" | "card_view_entity_click" | "unmapped_event";
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import type { User } from "../users";
|
|
2
|
-
/**
|
|
3
|
-
* Capabilities advertised by an auth provider.
|
|
4
|
-
* UI components use this to show/hide features dynamically
|
|
5
|
-
* (e.g. password reset, registration, session management).
|
|
6
|
-
* @group Hooks and utilities
|
|
7
|
-
*/
|
|
8
|
-
export interface AuthCapabilities {
|
|
9
|
-
emailPasswordLogin?: boolean;
|
|
10
|
-
googleLogin?: boolean;
|
|
11
|
-
registration?: boolean;
|
|
12
|
-
passwordReset?: boolean;
|
|
13
|
-
sessionManagement?: boolean;
|
|
14
|
-
profileUpdate?: boolean;
|
|
15
|
-
emailVerification?: boolean;
|
|
16
|
-
/** List of enabled OAuth provider IDs (e.g. ["google", "github", "discord"]) */
|
|
17
|
-
enabledProviders?: string[];
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Controller for retrieving the logged user or performing auth related operations.
|
|
21
|
-
* Note that if you are implementing your AuthController, you probably will want
|
|
22
|
-
* to do it as the result of a hook.
|
|
23
|
-
* @group Hooks and utilities
|
|
24
|
-
*/
|
|
25
|
-
export type AuthController<USER extends User = User, ExtraData = unknown> = {
|
|
26
|
-
/**
|
|
27
|
-
* The user currently logged in
|
|
28
|
-
* The values can be: the user object, null if they skipped login
|
|
29
|
-
*/
|
|
30
|
-
user: USER | null;
|
|
31
|
-
/**
|
|
32
|
-
* Initial loading flag. It is used not to display the login screen
|
|
33
|
-
* when the app first loads, and it has not been checked whether the user
|
|
34
|
-
* is logged in or not.
|
|
35
|
-
*/
|
|
36
|
-
initialLoading?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Loading flag. It is used to display a loading screen when the user is
|
|
39
|
-
* logging in or out.
|
|
40
|
-
*/
|
|
41
|
-
authLoading: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Sign out
|
|
44
|
-
*/
|
|
45
|
-
signOut: () => Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Error initializing the authentication
|
|
48
|
-
*/
|
|
49
|
-
authError?: unknown;
|
|
50
|
-
/**
|
|
51
|
-
* Error dispatched by the auth provider
|
|
52
|
-
*/
|
|
53
|
-
authProviderError?: unknown;
|
|
54
|
-
/**
|
|
55
|
-
* You can use this method to retrieve the auth token for the current user.
|
|
56
|
-
*/
|
|
57
|
-
getAuthToken: () => Promise<string>;
|
|
58
|
-
/**
|
|
59
|
-
* Has the user skipped the login process
|
|
60
|
-
*/
|
|
61
|
-
loginSkipped: boolean;
|
|
62
|
-
extra: ExtraData;
|
|
63
|
-
setExtra: (extra: ExtraData) => void;
|
|
64
|
-
setUser?(user: USER | null): void;
|
|
65
|
-
setUserRoles?(roles: string[]): void;
|
|
66
|
-
/**
|
|
67
|
-
* Capabilities advertised by the auth provider.
|
|
68
|
-
* UI components use this to feature-detect what the backend supports.
|
|
69
|
-
*/
|
|
70
|
-
capabilities?: AuthCapabilities;
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Extended auth controller with common optional auth methods.
|
|
74
|
-
* Backend implementations (Rebase backend, Firebase, Supabase, etc.)
|
|
75
|
-
* extend this with their own backend-specific extras.
|
|
76
|
-
* @group Hooks and utilities
|
|
77
|
-
*/
|
|
78
|
-
export interface AuthControllerExtended<USER extends User = User, ExtraData = unknown> extends AuthController<USER, ExtraData> {
|
|
79
|
-
/** Login with email and password */
|
|
80
|
-
emailPasswordLogin?(email: string, password: string): Promise<void>;
|
|
81
|
-
/** Login with Google — accepts an ID token, access token, or authorization code payload */
|
|
82
|
-
googleLogin?: (payload: {
|
|
83
|
-
idToken: string;
|
|
84
|
-
} | {
|
|
85
|
-
accessToken: string;
|
|
86
|
-
} | {
|
|
87
|
-
code: string;
|
|
88
|
-
redirectUri: string;
|
|
89
|
-
}) => Promise<void>;
|
|
90
|
-
/** Generic OAuth login — works with any provider. Posts payload to /auth/{providerId}. */
|
|
91
|
-
oauthLogin?: (providerId: string, payload: Record<string, unknown>) => Promise<void>;
|
|
92
|
-
/** Register a new user */
|
|
93
|
-
register?(email: string, password: string, displayName?: string): Promise<void>;
|
|
94
|
-
/** Skip login (for anonymous access if enabled) */
|
|
95
|
-
skipLogin?(): void;
|
|
96
|
-
/** Request password reset email */
|
|
97
|
-
forgotPassword?(email: string): Promise<void>;
|
|
98
|
-
/** Reset password using a token */
|
|
99
|
-
resetPassword?(token: string, password: string): Promise<void>;
|
|
100
|
-
/** Change password for the authenticated user */
|
|
101
|
-
changePassword?(oldPassword: string, newPassword: string): Promise<void>;
|
|
102
|
-
/** Update user profile */
|
|
103
|
-
updateProfile?(displayName?: string, photoURL?: string): Promise<USER>;
|
|
104
|
-
}
|