@fayz-ai/saas 0.1.6
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/dist/app/AdminShell.d.ts +31 -0
- package/dist/app/AdminShell.d.ts.map +1 -0
- package/dist/app/LoginPage.d.ts +17 -0
- package/dist/app/LoginPage.d.ts.map +1 -0
- package/dist/app/config.d.ts +83 -0
- package/dist/app/config.d.ts.map +1 -0
- package/dist/app/createFayzApp.d.ts +11 -0
- package/dist/app/createFayzApp.d.ts.map +1 -0
- package/dist/app/routing.d.ts +10 -0
- package/dist/app/routing.d.ts.map +1 -0
- package/dist/app/scaffold.d.ts +17 -0
- package/dist/app/scaffold.d.ts.map +1 -0
- package/dist/archetype-lookup.d.ts +30 -0
- package/dist/archetype-lookup.d.ts.map +1 -0
- package/dist/billing/index.cjs +12 -0
- package/dist/billing/index.cjs.map +1 -0
- package/dist/billing/index.d.ts +3 -0
- package/dist/billing/index.d.ts.map +1 -0
- package/dist/billing/index.js +3 -0
- package/dist/billing/index.js.map +1 -0
- package/dist/billing/store.d.ts +35 -0
- package/dist/billing/store.d.ts.map +1 -0
- package/dist/chunk-4XTQ4V5L.cjs +124 -0
- package/dist/chunk-4XTQ4V5L.cjs.map +1 -0
- package/dist/chunk-5GYQK5IW.js +21 -0
- package/dist/chunk-5GYQK5IW.js.map +1 -0
- package/dist/chunk-DJW67TCY.js +781 -0
- package/dist/chunk-DJW67TCY.js.map +1 -0
- package/dist/chunk-KYID2MR6.cjs +23 -0
- package/dist/chunk-KYID2MR6.cjs.map +1 -0
- package/dist/chunk-QGMDVLLW.cjs +816 -0
- package/dist/chunk-QGMDVLLW.cjs.map +1 -0
- package/dist/chunk-XNWCGJYH.js +97 -0
- package/dist/chunk-XNWCGJYH.js.map +1 -0
- package/dist/components/shared/PersonLink.d.ts +18 -0
- package/dist/components/shared/PersonLink.d.ts.map +1 -0
- package/dist/crud/CrudCardGrid.d.ts +13 -0
- package/dist/crud/CrudCardGrid.d.ts.map +1 -0
- package/dist/crud/CrudDetailPage.d.ts +18 -0
- package/dist/crud/CrudDetailPage.d.ts.map +1 -0
- package/dist/crud/CrudFormPage.d.ts +18 -0
- package/dist/crud/CrudFormPage.d.ts.map +1 -0
- package/dist/crud/CrudListView.d.ts +51 -0
- package/dist/crud/CrudListView.d.ts.map +1 -0
- package/dist/crud/CrudPage.d.ts +20 -0
- package/dist/crud/CrudPage.d.ts.map +1 -0
- package/dist/crud/DeleteConfirmDialog.d.ts +11 -0
- package/dist/crud/DeleteConfirmDialog.d.ts.map +1 -0
- package/dist/crud/EntityOverview.d.ts +14 -0
- package/dist/crud/EntityOverview.d.ts.map +1 -0
- package/dist/crud/ImportWizard.d.ts +18 -0
- package/dist/crud/ImportWizard.d.ts.map +1 -0
- package/dist/crud/archetypes/ActiveToggle.d.ts +8 -0
- package/dist/crud/archetypes/ActiveToggle.d.ts.map +1 -0
- package/dist/crud/archetypes/ArchetypeStatusBar.d.ts +11 -0
- package/dist/crud/archetypes/ArchetypeStatusBar.d.ts.map +1 -0
- package/dist/crud/archetypes/BlockSettingsPopover.d.ts +15 -0
- package/dist/crud/archetypes/BlockSettingsPopover.d.ts.map +1 -0
- package/dist/crud/archetypes/EntityLink.d.ts +32 -0
- package/dist/crud/archetypes/EntityLink.d.ts.map +1 -0
- package/dist/crud/archetypes/LocationDetailTabs.d.ts +11 -0
- package/dist/crud/archetypes/LocationDetailTabs.d.ts.map +1 -0
- package/dist/crud/archetypes/LocationFormLayout.d.ts +12 -0
- package/dist/crud/archetypes/LocationFormLayout.d.ts.map +1 -0
- package/dist/crud/archetypes/PersonDetailTabs.d.ts +22 -0
- package/dist/crud/archetypes/PersonDetailTabs.d.ts.map +1 -0
- package/dist/crud/archetypes/PersonFormLayout.d.ts +13 -0
- package/dist/crud/archetypes/PersonFormLayout.d.ts.map +1 -0
- package/dist/crud/archetypes/PersonPicker.d.ts +23 -0
- package/dist/crud/archetypes/PersonPicker.d.ts.map +1 -0
- package/dist/crud/archetypes/ProductDetailTabs.d.ts +11 -0
- package/dist/crud/archetypes/ProductDetailTabs.d.ts.map +1 -0
- package/dist/crud/archetypes/ProductFormLayout.d.ts +12 -0
- package/dist/crud/archetypes/ProductFormLayout.d.ts.map +1 -0
- package/dist/crud/archetypes/ScheduleEditor.d.ts +7 -0
- package/dist/crud/archetypes/ScheduleEditor.d.ts.map +1 -0
- package/dist/crud/archetypes/ServiceDetailTabs.d.ts +10 -0
- package/dist/crud/archetypes/ServiceDetailTabs.d.ts.map +1 -0
- package/dist/crud/archetypes/ServiceFormLayout.d.ts +12 -0
- package/dist/crud/archetypes/ServiceFormLayout.d.ts.map +1 -0
- package/dist/crud/archetypes/SubjectDetailTabs.d.ts +12 -0
- package/dist/crud/archetypes/SubjectDetailTabs.d.ts.map +1 -0
- package/dist/crud/archetypes/SubjectFormLayout.d.ts +14 -0
- package/dist/crud/archetypes/SubjectFormLayout.d.ts.map +1 -0
- package/dist/crud/createCrudPage.d.ts +20 -0
- package/dist/crud/createCrudPage.d.ts.map +1 -0
- package/dist/crud/csv-export.d.ts +3 -0
- package/dist/crud/csv-export.d.ts.map +1 -0
- package/dist/crud/fieldToColumn.d.ts +14 -0
- package/dist/crud/fieldToColumn.d.ts.map +1 -0
- package/dist/crud/index.d.ts +12 -0
- package/dist/crud/index.d.ts.map +1 -0
- package/dist/hooks/useFieldRules.d.ts +5 -0
- package/dist/hooks/useFieldRules.d.ts.map +1 -0
- package/dist/hooks/useModuleNavigation.d.ts +25 -0
- package/dist/hooks/useModuleNavigation.d.ts.map +1 -0
- package/dist/hooks/usePluginPrefs.d.ts +23 -0
- package/dist/hooks/usePluginPrefs.d.ts.map +1 -0
- package/dist/index.cjs +13880 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13730 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/currency.d.ts +13 -0
- package/dist/lib/currency.d.ts.map +1 -0
- package/dist/lib/entity-routes.d.ts +24 -0
- package/dist/lib/entity-routes.d.ts.map +1 -0
- package/dist/lib/schedule-config.d.ts +32 -0
- package/dist/lib/schedule-config.d.ts.map +1 -0
- package/dist/lib/schedule-service.d.ts +76 -0
- package/dist/lib/schedule-service.d.ts.map +1 -0
- package/dist/org/adapters/mock.d.ts +4 -0
- package/dist/org/adapters/mock.d.ts.map +1 -0
- package/dist/org/adapters/supabase.d.ts +7 -0
- package/dist/org/adapters/supabase.d.ts.map +1 -0
- package/dist/org/context.d.ts +29 -0
- package/dist/org/context.d.ts.map +1 -0
- package/dist/org/index.cjs +44 -0
- package/dist/org/index.cjs.map +1 -0
- package/dist/org/index.d.ts +8 -0
- package/dist/org/index.d.ts.map +1 -0
- package/dist/org/index.js +3 -0
- package/dist/org/index.js.map +1 -0
- package/dist/org/store.d.ts +16 -0
- package/dist/org/store.d.ts.map +1 -0
- package/dist/permissions/PermissionGate.d.ts +12 -0
- package/dist/permissions/PermissionGate.d.ts.map +1 -0
- package/dist/permissions/context.d.ts +37 -0
- package/dist/permissions/context.d.ts.map +1 -0
- package/dist/permissions/index.cjs +32 -0
- package/dist/permissions/index.cjs.map +1 -0
- package/dist/permissions/index.d.ts +5 -0
- package/dist/permissions/index.d.ts.map +1 -0
- package/dist/permissions/index.js +3 -0
- package/dist/permissions/index.js.map +1 -0
- package/dist/permissions/store.d.ts +21 -0
- package/dist/permissions/store.d.ts.map +1 -0
- package/dist/placeholder.d.ts +7 -0
- package/dist/placeholder.d.ts.map +1 -0
- package/dist/plugins/ModuleActionBar.d.ts +27 -0
- package/dist/plugins/ModuleActionBar.d.ts.map +1 -0
- package/dist/plugins/PluginRegistryManager.d.ts +13 -0
- package/dist/plugins/PluginRegistryManager.d.ts.map +1 -0
- package/dist/plugins/QuickActionsButton.d.ts +12 -0
- package/dist/plugins/QuickActionsButton.d.ts.map +1 -0
- package/dist/plugins/SettingsGroup.d.ts +25 -0
- package/dist/plugins/SettingsGroup.d.ts.map +1 -0
- package/dist/plugins/WidgetSlot.d.ts +8 -0
- package/dist/plugins/WidgetSlot.d.ts.map +1 -0
- package/dist/plugins/createPluginContext.d.ts +28 -0
- package/dist/plugins/createPluginContext.d.ts.map +1 -0
- package/dist/plugins/createViewRouter.d.ts +38 -0
- package/dist/plugins/createViewRouter.d.ts.map +1 -0
- package/dist/shell/components/auth/CenteredLogin.d.ts +13 -0
- package/dist/shell/components/auth/CenteredLogin.d.ts.map +1 -0
- package/dist/shell/components/auth/LoginForm.d.ts +12 -0
- package/dist/shell/components/auth/LoginForm.d.ts.map +1 -0
- package/dist/shell/components/auth/LoginPage.d.ts +15 -0
- package/dist/shell/components/auth/LoginPage.d.ts.map +1 -0
- package/dist/shell/components/auth/OAuthButtons.d.ts +10 -0
- package/dist/shell/components/auth/OAuthButtons.d.ts.map +1 -0
- package/dist/shell/components/auth/ProtectedRoute.d.ts +11 -0
- package/dist/shell/components/auth/ProtectedRoute.d.ts.map +1 -0
- package/dist/shell/components/auth/RecoveryForm.d.ts +9 -0
- package/dist/shell/components/auth/RecoveryForm.d.ts.map +1 -0
- package/dist/shell/components/auth/SignupForm.d.ts +10 -0
- package/dist/shell/components/auth/SignupForm.d.ts.map +1 -0
- package/dist/shell/components/auth/SplitLogin.d.ts +14 -0
- package/dist/shell/components/auth/SplitLogin.d.ts.map +1 -0
- package/dist/shell/components/auth/index.d.ts +7 -0
- package/dist/shell/components/auth/index.d.ts.map +1 -0
- package/dist/shell/components/billing/BillingPage.d.ts +7 -0
- package/dist/shell/components/billing/BillingPage.d.ts.map +1 -0
- package/dist/shell/components/billing/InvoiceList.d.ts +9 -0
- package/dist/shell/components/billing/InvoiceList.d.ts.map +1 -0
- package/dist/shell/components/billing/PaywallGate.d.ts +11 -0
- package/dist/shell/components/billing/PaywallGate.d.ts.map +1 -0
- package/dist/shell/components/billing/PlanSelector.d.ts +13 -0
- package/dist/shell/components/billing/PlanSelector.d.ts.map +1 -0
- package/dist/shell/components/billing/SubscriptionCard.d.ts +12 -0
- package/dist/shell/components/billing/SubscriptionCard.d.ts.map +1 -0
- package/dist/shell/components/billing/index.d.ts +6 -0
- package/dist/shell/components/billing/index.d.ts.map +1 -0
- package/dist/shell/components/chat/ChatFab.d.ts +9 -0
- package/dist/shell/components/chat/ChatFab.d.ts.map +1 -0
- package/dist/shell/components/chat/ChatPanel.d.ts +10 -0
- package/dist/shell/components/chat/ChatPanel.d.ts.map +1 -0
- package/dist/shell/components/chat/ChatSuggestions.d.ts +14 -0
- package/dist/shell/components/chat/ChatSuggestions.d.ts.map +1 -0
- package/dist/shell/components/chat/index.d.ts +3 -0
- package/dist/shell/components/chat/index.d.ts.map +1 -0
- package/dist/shell/components/crud/archetypes/ClientOrdersTab.d.ts +16 -0
- package/dist/shell/components/crud/archetypes/ClientOrdersTab.d.ts.map +1 -0
- package/dist/shell/components/layout/BottomNav.d.ts +24 -0
- package/dist/shell/components/layout/BottomNav.d.ts.map +1 -0
- package/dist/shell/components/layout/CommandPalette.d.ts +29 -0
- package/dist/shell/components/layout/CommandPalette.d.ts.map +1 -0
- package/dist/shell/components/layout/LocationSwitchOverlay.d.ts +3 -0
- package/dist/shell/components/layout/LocationSwitchOverlay.d.ts.map +1 -0
- package/dist/shell/components/layout/MockModeBanner.d.ts +3 -0
- package/dist/shell/components/layout/MockModeBanner.d.ts.map +1 -0
- package/dist/shell/components/layout/PrintChrome.d.ts +10 -0
- package/dist/shell/components/layout/PrintChrome.d.ts.map +1 -0
- package/dist/shell/components/layout/index.d.ts +6 -0
- package/dist/shell/components/layout/index.d.ts.map +1 -0
- package/dist/shell/components/notifications/ChangelogFeed.d.ts +8 -0
- package/dist/shell/components/notifications/ChangelogFeed.d.ts.map +1 -0
- package/dist/shell/components/notifications/NotificationBell.d.ts +9 -0
- package/dist/shell/components/notifications/NotificationBell.d.ts.map +1 -0
- package/dist/shell/components/notifications/NotificationInbox.d.ts +13 -0
- package/dist/shell/components/notifications/NotificationInbox.d.ts.map +1 -0
- package/dist/shell/components/notifications/ToastProvider.d.ts +2 -0
- package/dist/shell/components/notifications/ToastProvider.d.ts.map +1 -0
- package/dist/shell/components/notifications/index.d.ts +5 -0
- package/dist/shell/components/notifications/index.d.ts.map +1 -0
- package/dist/shell/components/organization/ImpersonationBanner.d.ts +3 -0
- package/dist/shell/components/organization/ImpersonationBanner.d.ts.map +1 -0
- package/dist/shell/components/organization/InviteMemberDialog.d.ts +10 -0
- package/dist/shell/components/organization/InviteMemberDialog.d.ts.map +1 -0
- package/dist/shell/components/organization/OrgInitializer.d.ts +7 -0
- package/dist/shell/components/organization/OrgInitializer.d.ts.map +1 -0
- package/dist/shell/components/organization/OrgSwitcher.d.ts +7 -0
- package/dist/shell/components/organization/OrgSwitcher.d.ts.map +1 -0
- package/dist/shell/components/organization/PermissionGate.d.ts +11 -0
- package/dist/shell/components/organization/PermissionGate.d.ts.map +1 -0
- package/dist/shell/components/organization/PermissionMatrixEditor.d.ts +17 -0
- package/dist/shell/components/organization/PermissionMatrixEditor.d.ts.map +1 -0
- package/dist/shell/components/organization/PermissionProfilesTab.d.ts +3 -0
- package/dist/shell/components/organization/PermissionProfilesTab.d.ts.map +1 -0
- package/dist/shell/components/organization/TeamTab.d.ts +3 -0
- package/dist/shell/components/organization/TeamTab.d.ts.map +1 -0
- package/dist/shell/components/organization/TenantOnboarding.d.ts +9 -0
- package/dist/shell/components/organization/TenantOnboarding.d.ts.map +1 -0
- package/dist/shell/components/organization/index.d.ts +8 -0
- package/dist/shell/components/organization/index.d.ts.map +1 -0
- package/dist/shell/components/plugins/PluginSettingsPanel.d.ts +23 -0
- package/dist/shell/components/plugins/PluginSettingsPanel.d.ts.map +1 -0
- package/dist/shell/components/settings/BrandingSettings.d.ts +12 -0
- package/dist/shell/components/settings/BrandingSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/CompanySettings.d.ts +13 -0
- package/dist/shell/components/settings/CompanySettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedBrandingSettings.d.ts +2 -0
- package/dist/shell/components/settings/ConnectedBrandingSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedCompanySettings.d.ts +2 -0
- package/dist/shell/components/settings/ConnectedCompanySettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedFieldRulesSettings.d.ts +2 -0
- package/dist/shell/components/settings/ConnectedFieldRulesSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedHolidaysSettings.d.ts +3 -0
- package/dist/shell/components/settings/ConnectedHolidaysSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedLocationsOverview.d.ts +3 -0
- package/dist/shell/components/settings/ConnectedLocationsOverview.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedSecuritySettings.d.ts +2 -0
- package/dist/shell/components/settings/ConnectedSecuritySettings.d.ts.map +1 -0
- package/dist/shell/components/settings/ConnectedUserProfile.d.ts +2 -0
- package/dist/shell/components/settings/ConnectedUserProfile.d.ts.map +1 -0
- package/dist/shell/components/settings/FieldRulesSettings.d.ts +11 -0
- package/dist/shell/components/settings/FieldRulesSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/HolidaysSettings.d.ts +21 -0
- package/dist/shell/components/settings/HolidaysSettings.d.ts.map +1 -0
- package/dist/shell/components/settings/LocationsCrudPage.d.ts +6 -0
- package/dist/shell/components/settings/LocationsCrudPage.d.ts.map +1 -0
- package/dist/shell/components/settings/LocationsOverview.d.ts +19 -0
- package/dist/shell/components/settings/LocationsOverview.d.ts.map +1 -0
- package/dist/shell/components/settings/SecuritySettings.d.ts +17 -0
- package/dist/shell/components/settings/SecuritySettings.d.ts.map +1 -0
- package/dist/shell/components/settings/SettingsPage.d.ts +18 -0
- package/dist/shell/components/settings/SettingsPage.d.ts.map +1 -0
- package/dist/shell/components/settings/UserProfile.d.ts +12 -0
- package/dist/shell/components/settings/UserProfile.d.ts.map +1 -0
- package/dist/shell/components/settings/index.d.ts +11 -0
- package/dist/shell/components/settings/index.d.ts.map +1 -0
- package/dist/shell/config/index.d.ts +7 -0
- package/dist/shell/config/index.d.ts.map +1 -0
- package/dist/shell/config/permissions.d.ts +7 -0
- package/dist/shell/config/permissions.d.ts.map +1 -0
- package/dist/shell/config/tailwind-preset.d.ts +4 -0
- package/dist/shell/config/tailwind-preset.d.ts.map +1 -0
- package/dist/shell/config/theme/dark.d.ts +3 -0
- package/dist/shell/config/theme/dark.d.ts.map +1 -0
- package/dist/shell/config/theme/index.d.ts +6 -0
- package/dist/shell/config/theme/index.d.ts.map +1 -0
- package/dist/shell/config/theme/light.d.ts +3 -0
- package/dist/shell/config/theme/light.d.ts.map +1 -0
- package/dist/shell/config/theme/tokens.d.ts +97 -0
- package/dist/shell/config/theme/tokens.d.ts.map +1 -0
- package/dist/shell/config/theme/utils.d.ts +23 -0
- package/dist/shell/config/theme/utils.d.ts.map +1 -0
- package/dist/shell/createSaasApp.d.ts +145 -0
- package/dist/shell/createSaasApp.d.ts.map +1 -0
- package/dist/shell/hooks/index.d.ts +19 -0
- package/dist/shell/hooks/index.d.ts.map +1 -0
- package/dist/shell/hooks/useAITools.d.ts +21 -0
- package/dist/shell/hooks/useAITools.d.ts.map +1 -0
- package/dist/shell/hooks/useAuth.d.ts +16 -0
- package/dist/shell/hooks/useAuth.d.ts.map +1 -0
- package/dist/shell/hooks/useBilling.d.ts +14 -0
- package/dist/shell/hooks/useBilling.d.ts.map +1 -0
- package/dist/shell/hooks/useChat.d.ts +16 -0
- package/dist/shell/hooks/useChat.d.ts.map +1 -0
- package/dist/shell/hooks/useFieldRules.d.ts +6 -0
- package/dist/shell/hooks/useFieldRules.d.ts.map +1 -0
- package/dist/shell/hooks/useFormatters.d.ts +7 -0
- package/dist/shell/hooks/useFormatters.d.ts.map +1 -0
- package/dist/shell/hooks/useLayout.d.ts +16 -0
- package/dist/shell/hooks/useLayout.d.ts.map +1 -0
- package/dist/shell/hooks/useModuleNavigation.d.ts +25 -0
- package/dist/shell/hooks/useModuleNavigation.d.ts.map +1 -0
- package/dist/shell/hooks/useNotifications.d.ts +11 -0
- package/dist/shell/hooks/useNotifications.d.ts.map +1 -0
- package/dist/shell/hooks/usePermission.d.ts +16 -0
- package/dist/shell/hooks/usePermission.d.ts.map +1 -0
- package/dist/shell/hooks/usePluginPrefs.d.ts +23 -0
- package/dist/shell/hooks/usePluginPrefs.d.ts.map +1 -0
- package/dist/shell/hooks/usePlugins.d.ts +5 -0
- package/dist/shell/hooks/usePlugins.d.ts.map +1 -0
- package/dist/shell/hooks/useTenant.d.ts +23 -0
- package/dist/shell/hooks/useTenant.d.ts.map +1 -0
- package/dist/shell/hooks/useTenantPlugins.d.ts +10 -0
- package/dist/shell/hooks/useTenantPlugins.d.ts.map +1 -0
- package/dist/shell/hooks/useTranslation.d.ts +5 -0
- package/dist/shell/hooks/useTranslation.d.ts.map +1 -0
- package/dist/shell/lib/api.d.ts +28 -0
- package/dist/shell/lib/api.d.ts.map +1 -0
- package/dist/shell/lib/apply-field-rules.d.ts +4 -0
- package/dist/shell/lib/apply-field-rules.d.ts.map +1 -0
- package/dist/shell/lib/auth-adapters/mock.d.ts +3 -0
- package/dist/shell/lib/auth-adapters/mock.d.ts.map +1 -0
- package/dist/shell/lib/auth-adapters/supabase.d.ts +3 -0
- package/dist/shell/lib/auth-adapters/supabase.d.ts.map +1 -0
- package/dist/shell/lib/auth-context.d.ts +5 -0
- package/dist/shell/lib/auth-context.d.ts.map +1 -0
- package/dist/shell/lib/cache.d.ts +18 -0
- package/dist/shell/lib/cache.d.ts.map +1 -0
- package/dist/shell/lib/cn.d.ts +2 -0
- package/dist/shell/lib/cn.d.ts.map +1 -0
- package/dist/shell/lib/core-ai-tools.d.ts +15 -0
- package/dist/shell/lib/core-ai-tools.d.ts.map +1 -0
- package/dist/shell/lib/create-client-orders-provider.d.ts +3 -0
- package/dist/shell/lib/create-client-orders-provider.d.ts.map +1 -0
- package/dist/shell/lib/csv.d.ts +14 -0
- package/dist/shell/lib/csv.d.ts.map +1 -0
- package/dist/shell/lib/dedup.d.ts +2 -0
- package/dist/shell/lib/dedup.d.ts.map +1 -0
- package/dist/shell/lib/entity-registry.d.ts +19 -0
- package/dist/shell/lib/entity-registry.d.ts.map +1 -0
- package/dist/shell/lib/entity-routes.d.ts +24 -0
- package/dist/shell/lib/entity-routes.d.ts.map +1 -0
- package/dist/shell/lib/format.d.ts +7 -0
- package/dist/shell/lib/format.d.ts.map +1 -0
- package/dist/shell/lib/i18n.d.ts +4 -0
- package/dist/shell/lib/i18n.d.ts.map +1 -0
- package/dist/shell/lib/locale-config.d.ts +8 -0
- package/dist/shell/lib/locale-config.d.ts.map +1 -0
- package/dist/shell/lib/org-adapters/mock.d.ts +4 -0
- package/dist/shell/lib/org-adapters/mock.d.ts.map +1 -0
- package/dist/shell/lib/org-adapters/supabase.d.ts +3 -0
- package/dist/shell/lib/org-adapters/supabase.d.ts.map +1 -0
- package/dist/shell/lib/org-context.d.ts +5 -0
- package/dist/shell/lib/org-context.d.ts.map +1 -0
- package/dist/shell/lib/plugins.d.ts +2 -0
- package/dist/shell/lib/plugins.d.ts.map +1 -0
- package/dist/shell/lib/router.d.ts +15 -0
- package/dist/shell/lib/router.d.ts.map +1 -0
- package/dist/shell/lib/schedule-config.d.ts +32 -0
- package/dist/shell/lib/schedule-config.d.ts.map +1 -0
- package/dist/shell/lib/schedule-service.d.ts +76 -0
- package/dist/shell/lib/schedule-service.d.ts.map +1 -0
- package/dist/shell/lib/supabase.d.ts +9 -0
- package/dist/shell/lib/supabase.d.ts.map +1 -0
- package/dist/shell/stores/auth.store.d.ts +12 -0
- package/dist/shell/stores/auth.store.d.ts.map +1 -0
- package/dist/shell/stores/billing.store.d.ts +2 -0
- package/dist/shell/stores/billing.store.d.ts.map +1 -0
- package/dist/shell/stores/chat.store.d.ts +20 -0
- package/dist/shell/stores/chat.store.d.ts.map +1 -0
- package/dist/shell/stores/index.d.ts +13 -0
- package/dist/shell/stores/index.d.ts.map +1 -0
- package/dist/shell/stores/invite.store.d.ts +11 -0
- package/dist/shell/stores/invite.store.d.ts.map +1 -0
- package/dist/shell/stores/layout.store.d.ts +2 -0
- package/dist/shell/stores/layout.store.d.ts.map +1 -0
- package/dist/shell/stores/locale.store.d.ts +7 -0
- package/dist/shell/stores/locale.store.d.ts.map +1 -0
- package/dist/shell/stores/location.store.d.ts +20 -0
- package/dist/shell/stores/location.store.d.ts.map +1 -0
- package/dist/shell/stores/notifications.store.d.ts +12 -0
- package/dist/shell/stores/notifications.store.d.ts.map +1 -0
- package/dist/shell/stores/organization.store.d.ts +2 -0
- package/dist/shell/stores/organization.store.d.ts.map +1 -0
- package/dist/shell/stores/permissions.store.d.ts +2 -0
- package/dist/shell/stores/permissions.store.d.ts.map +1 -0
- package/dist/shell/stores/plugin.store.d.ts +24 -0
- package/dist/shell/stores/plugin.store.d.ts.map +1 -0
- package/dist/shell/stores/tenant.store.d.ts +11 -0
- package/dist/shell/stores/tenant.store.d.ts.map +1 -0
- package/dist/shell/stores/theme.store.d.ts +17 -0
- package/dist/shell/stores/theme.store.d.ts.map +1 -0
- package/dist/shell/test-setup.d.ts +2 -0
- package/dist/shell/test-setup.d.ts.map +1 -0
- package/dist/shell/types/auth-adapter.d.ts +14 -0
- package/dist/shell/types/auth-adapter.d.ts.map +1 -0
- package/dist/shell/types/auth.d.ts +34 -0
- package/dist/shell/types/auth.d.ts.map +1 -0
- package/dist/shell/types/billing.d.ts +74 -0
- package/dist/shell/types/billing.d.ts.map +1 -0
- package/dist/shell/types/client-orders.d.ts +43 -0
- package/dist/shell/types/client-orders.d.ts.map +1 -0
- package/dist/shell/types/crud.d.ts +122 -0
- package/dist/shell/types/crud.d.ts.map +1 -0
- package/dist/shell/types/entities.d.ts +150 -0
- package/dist/shell/types/entities.d.ts.map +1 -0
- package/dist/shell/types/entity-lookup.d.ts +18 -0
- package/dist/shell/types/entity-lookup.d.ts.map +1 -0
- package/dist/shell/types/index.d.ts +17 -0
- package/dist/shell/types/index.d.ts.map +1 -0
- package/dist/shell/types/integrations.d.ts +48 -0
- package/dist/shell/types/integrations.d.ts.map +1 -0
- package/dist/shell/types/invite.d.ts +23 -0
- package/dist/shell/types/invite.d.ts.map +1 -0
- package/dist/shell/types/layout.d.ts +26 -0
- package/dist/shell/types/layout.d.ts.map +1 -0
- package/dist/shell/types/notifications.d.ts +31 -0
- package/dist/shell/types/notifications.d.ts.map +1 -0
- package/dist/shell/types/org-adapter.d.ts +72 -0
- package/dist/shell/types/org-adapter.d.ts.map +1 -0
- package/dist/shell/types/permissions.d.ts +39 -0
- package/dist/shell/types/permissions.d.ts.map +1 -0
- package/dist/shell/types/platform.d.ts +25 -0
- package/dist/shell/types/platform.d.ts.map +1 -0
- package/dist/shell/types/plugins.d.ts +308 -0
- package/dist/shell/types/plugins.d.ts.map +1 -0
- package/dist/shell/types/tenant.d.ts +74 -0
- package/dist/shell/types/tenant.d.ts.map +1 -0
- package/dist/stores/createCrudStore.d.ts +32 -0
- package/dist/stores/createCrudStore.d.ts.map +1 -0
- package/dist/supabase/client.d.ts +18 -0
- package/dist/supabase/client.d.ts.map +1 -0
- package/package.json +72 -0
- package/src/app/AdminShell.tsx +449 -0
- package/src/app/LoginPage.tsx +264 -0
- package/src/app/config.ts +146 -0
- package/src/app/createFayzApp.tsx +254 -0
- package/src/app/routing.tsx +65 -0
- package/src/app/scaffold.tsx +175 -0
- package/src/archetype-lookup.ts +160 -0
- package/src/billing/index.ts +7 -0
- package/src/billing/store.ts +62 -0
- package/src/components/shared/PersonLink.tsx +199 -0
- package/src/crud/CrudCardGrid.tsx +92 -0
- package/src/crud/CrudDetailPage.tsx +366 -0
- package/src/crud/CrudFormPage.tsx +467 -0
- package/src/crud/CrudListView.tsx +223 -0
- package/src/crud/CrudPage.tsx +491 -0
- package/src/crud/DeleteConfirmDialog.tsx +41 -0
- package/src/crud/EntityOverview.tsx +230 -0
- package/src/crud/ImportWizard.tsx +690 -0
- package/src/crud/archetypes/ActiveToggle.tsx +23 -0
- package/src/crud/archetypes/ArchetypeStatusBar.tsx +58 -0
- package/src/crud/archetypes/BlockSettingsPopover.tsx +322 -0
- package/src/crud/archetypes/EntityLink.tsx +74 -0
- package/src/crud/archetypes/LocationDetailTabs.tsx +72 -0
- package/src/crud/archetypes/LocationFormLayout.tsx +173 -0
- package/src/crud/archetypes/PersonDetailTabs.tsx +87 -0
- package/src/crud/archetypes/PersonFormLayout.tsx +184 -0
- package/src/crud/archetypes/PersonPicker.tsx +299 -0
- package/src/crud/archetypes/ProductDetailTabs.tsx +72 -0
- package/src/crud/archetypes/ProductFormLayout.tsx +197 -0
- package/src/crud/archetypes/ScheduleEditor.tsx +796 -0
- package/src/crud/archetypes/ServiceDetailTabs.tsx +60 -0
- package/src/crud/archetypes/ServiceFormLayout.tsx +155 -0
- package/src/crud/archetypes/SubjectDetailTabs.tsx +142 -0
- package/src/crud/archetypes/SubjectFormLayout.tsx +164 -0
- package/src/crud/createCrudPage.tsx +65 -0
- package/src/crud/csv-export.ts +17 -0
- package/src/crud/fieldToColumn.tsx +109 -0
- package/src/crud/index.ts +11 -0
- package/src/hooks/useFieldRules.ts +10 -0
- package/src/hooks/useModuleNavigation.ts +124 -0
- package/src/hooks/usePluginPrefs.ts +113 -0
- package/src/index.ts +168 -0
- package/src/lib/currency.ts +19 -0
- package/src/lib/entity-routes.ts +53 -0
- package/src/lib/schedule-config.ts +42 -0
- package/src/lib/schedule-service.ts +307 -0
- package/src/org/adapters/mock.ts +353 -0
- package/src/org/adapters/supabase.ts +509 -0
- package/src/org/context.tsx +174 -0
- package/src/org/index.ts +19 -0
- package/src/org/store.ts +70 -0
- package/src/permissions/PermissionGate.tsx +17 -0
- package/src/permissions/context.tsx +126 -0
- package/src/permissions/index.ts +13 -0
- package/src/permissions/store.ts +68 -0
- package/src/placeholder.ts +32 -0
- package/src/plugins/ModuleActionBar.tsx +57 -0
- package/src/plugins/PluginRegistryManager.tsx +110 -0
- package/src/plugins/QuickActionsButton.tsx +73 -0
- package/src/plugins/SettingsGroup.tsx +100 -0
- package/src/plugins/WidgetSlot.tsx +38 -0
- package/src/plugins/createPluginContext.tsx +68 -0
- package/src/plugins/createViewRouter.tsx +45 -0
- package/src/shell/components/auth/CenteredLogin.tsx +86 -0
- package/src/shell/components/auth/LoginForm.tsx +129 -0
- package/src/shell/components/auth/LoginPage.tsx +22 -0
- package/src/shell/components/auth/OAuthButtons.tsx +66 -0
- package/src/shell/components/auth/ProtectedRoute.tsx +52 -0
- package/src/shell/components/auth/RecoveryForm.tsx +110 -0
- package/src/shell/components/auth/SignupForm.tsx +170 -0
- package/src/shell/components/auth/SplitLogin.tsx +124 -0
- package/src/shell/components/auth/index.ts +6 -0
- package/src/shell/components/billing/BillingPage.tsx +56 -0
- package/src/shell/components/billing/InvoiceList.tsx +123 -0
- package/src/shell/components/billing/PaywallGate.tsx +80 -0
- package/src/shell/components/billing/PlanSelector.tsx +125 -0
- package/src/shell/components/billing/SubscriptionCard.tsx +108 -0
- package/src/shell/components/billing/index.ts +5 -0
- package/src/shell/components/chat/ChatFab.tsx +195 -0
- package/src/shell/components/chat/ChatPanel.tsx +170 -0
- package/src/shell/components/chat/ChatSuggestions.tsx +102 -0
- package/src/shell/components/chat/index.ts +2 -0
- package/src/shell/components/crud/archetypes/ClientOrdersTab.tsx +212 -0
- package/src/shell/components/layout/BottomNav.tsx +131 -0
- package/src/shell/components/layout/CommandPalette.tsx +257 -0
- package/src/shell/components/layout/LocationSwitchOverlay.tsx +64 -0
- package/src/shell/components/layout/MockModeBanner.tsx +17 -0
- package/src/shell/components/layout/PrintChrome.tsx +200 -0
- package/src/shell/components/layout/index.ts +5 -0
- package/src/shell/components/notifications/ChangelogFeed.tsx +85 -0
- package/src/shell/components/notifications/NotificationBell.tsx +44 -0
- package/src/shell/components/notifications/NotificationInbox.tsx +175 -0
- package/src/shell/components/notifications/ToastProvider.tsx +2 -0
- package/src/shell/components/notifications/index.ts +4 -0
- package/src/shell/components/organization/ImpersonationBanner.tsx +29 -0
- package/src/shell/components/organization/InviteMemberDialog.tsx +161 -0
- package/src/shell/components/organization/OrgInitializer.tsx +179 -0
- package/src/shell/components/organization/OrgSwitcher.tsx +177 -0
- package/src/shell/components/organization/PermissionGate.tsx +16 -0
- package/src/shell/components/organization/PermissionMatrixEditor.tsx +206 -0
- package/src/shell/components/organization/PermissionProfilesTab.tsx +148 -0
- package/src/shell/components/organization/TeamTab.tsx +243 -0
- package/src/shell/components/organization/TenantOnboarding.tsx +179 -0
- package/src/shell/components/organization/index.ts +7 -0
- package/src/shell/components/plugins/PluginSettingsPanel.tsx +189 -0
- package/src/shell/components/settings/BrandingSettings.tsx +255 -0
- package/src/shell/components/settings/CompanySettings.tsx +188 -0
- package/src/shell/components/settings/ConnectedBrandingSettings.tsx +82 -0
- package/src/shell/components/settings/ConnectedCompanySettings.tsx +63 -0
- package/src/shell/components/settings/ConnectedFieldRulesSettings.tsx +47 -0
- package/src/shell/components/settings/ConnectedHolidaysSettings.tsx +99 -0
- package/src/shell/components/settings/ConnectedLocationsOverview.tsx +57 -0
- package/src/shell/components/settings/ConnectedSecuritySettings.tsx +59 -0
- package/src/shell/components/settings/ConnectedUserProfile.tsx +59 -0
- package/src/shell/components/settings/FieldRulesSettings.tsx +511 -0
- package/src/shell/components/settings/HolidaysSettings.tsx +141 -0
- package/src/shell/components/settings/LocationsCrudPage.ts +36 -0
- package/src/shell/components/settings/LocationsOverview.tsx +171 -0
- package/src/shell/components/settings/SecuritySettings.tsx +208 -0
- package/src/shell/components/settings/SettingsPage.tsx +162 -0
- package/src/shell/components/settings/UserProfile.tsx +151 -0
- package/src/shell/components/settings/index.ts +10 -0
- package/src/shell/config/index.ts +6 -0
- package/src/shell/config/permissions.ts +31 -0
- package/src/shell/config/tailwind-preset.ts +164 -0
- package/src/shell/config/theme/dark.ts +63 -0
- package/src/shell/config/theme/index.ts +5 -0
- package/src/shell/config/theme/light.ts +63 -0
- package/src/shell/config/theme/tokens.ts +105 -0
- package/src/shell/config/theme/utils.ts +249 -0
- package/src/shell/createSaasApp.tsx +922 -0
- package/src/shell/hooks/index.ts +18 -0
- package/src/shell/hooks/useAITools.ts +139 -0
- package/src/shell/hooks/useAuth.ts +109 -0
- package/src/shell/hooks/useBilling.ts +151 -0
- package/src/shell/hooks/useChat.ts +84 -0
- package/src/shell/hooks/useFieldRules.ts +19 -0
- package/src/shell/hooks/useFormatters.ts +56 -0
- package/src/shell/hooks/useLayout.ts +76 -0
- package/src/shell/hooks/useModuleNavigation.ts +124 -0
- package/src/shell/hooks/useNotifications.ts +114 -0
- package/src/shell/hooks/usePermission.ts +101 -0
- package/src/shell/hooks/usePluginPrefs.ts +113 -0
- package/src/shell/hooks/usePlugins.ts +18 -0
- package/src/shell/hooks/useTenant.ts +106 -0
- package/src/shell/hooks/useTenantPlugins.ts +103 -0
- package/src/shell/hooks/useTranslation.ts +10 -0
- package/src/shell/lib/api.ts +67 -0
- package/src/shell/lib/apply-field-rules.ts +14 -0
- package/src/shell/lib/auth-adapters/mock.ts +97 -0
- package/src/shell/lib/auth-adapters/supabase.ts +96 -0
- package/src/shell/lib/auth-context.ts +18 -0
- package/src/shell/lib/cache.ts +124 -0
- package/src/shell/lib/cn.ts +1 -0
- package/src/shell/lib/core-ai-tools.ts +90 -0
- package/src/shell/lib/create-client-orders-provider.ts +105 -0
- package/src/shell/lib/csv.ts +54 -0
- package/src/shell/lib/dedup.ts +17 -0
- package/src/shell/lib/entity-registry.ts +39 -0
- package/src/shell/lib/entity-routes.ts +53 -0
- package/src/shell/lib/format.ts +58 -0
- package/src/shell/lib/i18n.ts +3723 -0
- package/src/shell/lib/locale-config.ts +14 -0
- package/src/shell/lib/org-adapters/mock.ts +318 -0
- package/src/shell/lib/org-adapters/supabase.ts +533 -0
- package/src/shell/lib/org-context.ts +18 -0
- package/src/shell/lib/plugins.ts +11 -0
- package/src/shell/lib/router.ts +86 -0
- package/src/shell/lib/schedule-config.ts +42 -0
- package/src/shell/lib/schedule-service.ts +307 -0
- package/src/shell/lib/supabase.ts +19 -0
- package/src/shell/stores/auth.store.ts +29 -0
- package/src/shell/stores/billing.store.ts +1 -0
- package/src/shell/stores/chat.store.ts +45 -0
- package/src/shell/stores/index.ts +12 -0
- package/src/shell/stores/invite.store.ts +18 -0
- package/src/shell/stores/layout.store.ts +1 -0
- package/src/shell/stores/locale.store.ts +24 -0
- package/src/shell/stores/location.store.ts +89 -0
- package/src/shell/stores/notifications.store.ts +48 -0
- package/src/shell/stores/organization.store.ts +3 -0
- package/src/shell/stores/permissions.store.ts +1 -0
- package/src/shell/stores/plugin.store.ts +50 -0
- package/src/shell/stores/tenant.store.ts +26 -0
- package/src/shell/stores/theme.store.ts +162 -0
- package/src/shell/styles.css +433 -0
- package/src/shell/test-setup.ts +1 -0
- package/src/shell/types/auth-adapter.ts +11 -0
- package/src/shell/types/auth.ts +38 -0
- package/src/shell/types/billing.ts +90 -0
- package/src/shell/types/client-orders.ts +58 -0
- package/src/shell/types/crud.ts +134 -0
- package/src/shell/types/entities.ts +169 -0
- package/src/shell/types/entity-lookup.ts +25 -0
- package/src/shell/types/index.ts +16 -0
- package/src/shell/types/integrations.ts +51 -0
- package/src/shell/types/invite.ts +23 -0
- package/src/shell/types/layout.ts +29 -0
- package/src/shell/types/notifications.ts +33 -0
- package/src/shell/types/org-adapter.ts +72 -0
- package/src/shell/types/permissions.ts +64 -0
- package/src/shell/types/platform.ts +25 -0
- package/src/shell/types/plugins.ts +359 -0
- package/src/shell/types/tenant.ts +79 -0
- package/src/stores/createCrudStore.ts +138 -0
- package/src/supabase/client.ts +54 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { PermissionProfile } from './permissions';
|
|
2
|
+
import type { Invite } from './invite';
|
|
3
|
+
import type { Location } from './tenant';
|
|
4
|
+
export interface Organization {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
slug: string;
|
|
8
|
+
logoUrl?: string;
|
|
9
|
+
verticalId?: string;
|
|
10
|
+
plan?: string;
|
|
11
|
+
settings?: Record<string, unknown>;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CreateOrgOptions {
|
|
16
|
+
verticalId?: string;
|
|
17
|
+
timezone?: string;
|
|
18
|
+
currency?: string;
|
|
19
|
+
locale?: string;
|
|
20
|
+
teamSize?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface OrgMember {
|
|
23
|
+
id: string;
|
|
24
|
+
userId: string;
|
|
25
|
+
orgId: string;
|
|
26
|
+
profileId: string;
|
|
27
|
+
profileName: string;
|
|
28
|
+
user: {
|
|
29
|
+
id: string;
|
|
30
|
+
email: string;
|
|
31
|
+
fullName: string;
|
|
32
|
+
avatarUrl?: string;
|
|
33
|
+
};
|
|
34
|
+
joinedAt: string;
|
|
35
|
+
}
|
|
36
|
+
export interface OrgMembership {
|
|
37
|
+
orgId: string;
|
|
38
|
+
orgName: string;
|
|
39
|
+
orgSlug: string;
|
|
40
|
+
orgLogoUrl?: string;
|
|
41
|
+
profileId: string;
|
|
42
|
+
profileName: string;
|
|
43
|
+
}
|
|
44
|
+
export interface OrgAdapter {
|
|
45
|
+
listUserOrgs(userId: string): Promise<OrgMembership[]>;
|
|
46
|
+
getOrg(orgId: string): Promise<Organization>;
|
|
47
|
+
createOrg(name: string, userId: string, options?: CreateOrgOptions): Promise<Organization>;
|
|
48
|
+
updateOrg(orgId: string, data: Partial<Organization>): Promise<Organization>;
|
|
49
|
+
listMembers(orgId: string): Promise<OrgMember[]>;
|
|
50
|
+
updateMemberProfile(orgId: string, memberId: string, profileId: string): Promise<void>;
|
|
51
|
+
removeMember(orgId: string, memberId: string): Promise<void>;
|
|
52
|
+
listProfiles(orgId: string): Promise<PermissionProfile[]>;
|
|
53
|
+
createProfile(orgId: string, profile: Omit<PermissionProfile, 'id' | 'isSystem'>): Promise<PermissionProfile>;
|
|
54
|
+
updateProfile(orgId: string, profileId: string, data: Partial<PermissionProfile>): Promise<PermissionProfile>;
|
|
55
|
+
deleteProfile(orgId: string, profileId: string): Promise<void>;
|
|
56
|
+
listInvites(orgId: string): Promise<Invite[]>;
|
|
57
|
+
createInvite(orgId: string, email: string, profileId: string, invitedBy: string): Promise<Invite>;
|
|
58
|
+
bulkInvite(orgId: string, emails: string[], profileId: string, invitedBy: string): Promise<Invite[]>;
|
|
59
|
+
revokeInvite(orgId: string, inviteId: string): Promise<void>;
|
|
60
|
+
resendInvite(orgId: string, inviteId: string): Promise<Invite>;
|
|
61
|
+
listLocations(orgId: string): Promise<Location[]>;
|
|
62
|
+
createLocation(orgId: string, data: {
|
|
63
|
+
name: string;
|
|
64
|
+
address?: string;
|
|
65
|
+
city?: string;
|
|
66
|
+
state?: string;
|
|
67
|
+
country?: string;
|
|
68
|
+
phone?: string;
|
|
69
|
+
isHeadquarters?: boolean;
|
|
70
|
+
}): Promise<Location>;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=org-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org-adapter.d.ts","sourceRoot":"","sources":["../../../src/shell/types/org-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,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,CAAC,CAAA;IAE9D,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;IACjD,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;CACtL"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type PermissionAction = 'read' | 'create' | 'edit' | 'delete' | 'write' | 'manage' | (string & {});
|
|
2
|
+
export type SystemPermission = 'manage_team' | 'manage_billing' | 'manage_settings' | 'manage_permissions';
|
|
3
|
+
export type PermissionCategory = 'tenant' | 'team' | 'locations' | 'billing' | 'plugins' | 'settings' | 'audit' | 'api' | 'integrations' | 'webhooks' | 'general';
|
|
4
|
+
export interface PermissionEntry {
|
|
5
|
+
id: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
category: PermissionCategory;
|
|
8
|
+
pluginId?: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
}
|
|
11
|
+
export interface RolePermission {
|
|
12
|
+
role: string;
|
|
13
|
+
permissionId: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TenantRoleOverride {
|
|
16
|
+
id: string;
|
|
17
|
+
tenantId: string;
|
|
18
|
+
role: string;
|
|
19
|
+
permissionId: string;
|
|
20
|
+
granted: boolean;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
}
|
|
23
|
+
export interface FeatureFlag {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
defaultEnabled: boolean;
|
|
28
|
+
minPlanTier?: number;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
}
|
|
31
|
+
export interface TenantFeatureOverride {
|
|
32
|
+
id: string;
|
|
33
|
+
tenantId: string;
|
|
34
|
+
featureId: string;
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
}
|
|
38
|
+
export type { FeatureDeclaration, PermissionProfile, PermissionsConfig } from '@fayz-ai/core';
|
|
39
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../src/shell/types/permissions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEzG,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,oBAAoB,CAAA;AAExB,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,MAAM,GACN,WAAW,GACX,SAAS,GACT,SAAS,GACT,UAAU,GACV,OAAO,GACP,KAAK,GACL,cAAc,GACd,UAAU,GACV,SAAS,CAAA;AAIb,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAGD,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface AuditLog {
|
|
2
|
+
id: string;
|
|
3
|
+
tenantId: string;
|
|
4
|
+
actorId?: string;
|
|
5
|
+
action: string;
|
|
6
|
+
resourceType?: string;
|
|
7
|
+
resourceId?: string;
|
|
8
|
+
locationId?: string;
|
|
9
|
+
metadata: Record<string, unknown>;
|
|
10
|
+
ipAddress?: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ApiKey {
|
|
14
|
+
id: string;
|
|
15
|
+
tenantId: string;
|
|
16
|
+
name: string;
|
|
17
|
+
keyPrefix: string;
|
|
18
|
+
scopes: string[];
|
|
19
|
+
createdBy: string;
|
|
20
|
+
lastUsedAt?: string;
|
|
21
|
+
expiresAt?: string;
|
|
22
|
+
revokedAt?: string;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/shell/types/platform.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB"}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { LayoutVariant } from './layout';
|
|
3
|
+
import type { PermissionAction, FeatureDeclaration } from './permissions';
|
|
4
|
+
export type VerticalId = 'beauty' | 'food' | 'health' | 'services' | 'retail' | 'education' | (string & {});
|
|
5
|
+
export interface Vertical {
|
|
6
|
+
id: VerticalId;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
defaultPlugins: string[];
|
|
11
|
+
createdAt: string;
|
|
12
|
+
}
|
|
13
|
+
export type PluginScope = 'core' | 'vertical' | 'universal' | 'addon' | 'tenant';
|
|
14
|
+
export type PluginStatus = 'pending_setup' | 'active' | 'disabled' | 'removed';
|
|
15
|
+
export interface PluginRegistryEntry {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
descriptionNl?: string;
|
|
20
|
+
icon?: string;
|
|
21
|
+
version: string;
|
|
22
|
+
scope: PluginScope;
|
|
23
|
+
verticalId?: VerticalId;
|
|
24
|
+
tenantId?: string;
|
|
25
|
+
minPlan: string;
|
|
26
|
+
isDefault: boolean;
|
|
27
|
+
manifest: Record<string, unknown>;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
}
|
|
31
|
+
export interface TenantPlugin {
|
|
32
|
+
id: string;
|
|
33
|
+
tenantId: string;
|
|
34
|
+
pluginId: string;
|
|
35
|
+
status: PluginStatus;
|
|
36
|
+
config: Record<string, unknown>;
|
|
37
|
+
enabledBy?: string;
|
|
38
|
+
enabledAt?: string;
|
|
39
|
+
disabledAt?: string;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
}
|
|
43
|
+
export interface PluginDependency {
|
|
44
|
+
id: string;
|
|
45
|
+
pluginId: string;
|
|
46
|
+
dependsOn: string;
|
|
47
|
+
isOptional: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface PluginPermissionRequirement {
|
|
50
|
+
feature: string;
|
|
51
|
+
action: PermissionAction;
|
|
52
|
+
}
|
|
53
|
+
export interface PluginNavigationEntry {
|
|
54
|
+
id?: string;
|
|
55
|
+
section: 'main' | 'secondary' | 'settings';
|
|
56
|
+
position: number;
|
|
57
|
+
label: string;
|
|
58
|
+
route: string;
|
|
59
|
+
icon?: string;
|
|
60
|
+
badge?: string | number;
|
|
61
|
+
permission?: PluginPermissionRequirement;
|
|
62
|
+
}
|
|
63
|
+
export interface PluginSettingsTab {
|
|
64
|
+
id: string;
|
|
65
|
+
label: string;
|
|
66
|
+
icon?: string;
|
|
67
|
+
component: React.ComponentType<any>;
|
|
68
|
+
pluginId?: string;
|
|
69
|
+
order?: number;
|
|
70
|
+
permission?: PluginPermissionRequirement;
|
|
71
|
+
}
|
|
72
|
+
export interface LegacyPluginSettingsTab {
|
|
73
|
+
tab: string;
|
|
74
|
+
component: React.ComponentType<any>;
|
|
75
|
+
}
|
|
76
|
+
export interface PluginRouteDefinition {
|
|
77
|
+
path: string;
|
|
78
|
+
component: React.ComponentType<any>;
|
|
79
|
+
guard?: 'authenticated' | 'role';
|
|
80
|
+
roles?: string[];
|
|
81
|
+
permission?: PluginPermissionRequirement;
|
|
82
|
+
}
|
|
83
|
+
export type PluginWidgetZone = 'shell.sidebar.before-nav' | 'shell.sidebar.footer' | 'shell.topbar.start' | 'shell.topbar.end' | 'page.before' | 'page.after' | 'settings.before' | 'settings.after' | 'shell.floating' | (string & {});
|
|
84
|
+
export interface PluginRuntimeTenant {
|
|
85
|
+
id?: string;
|
|
86
|
+
slug?: string;
|
|
87
|
+
verticalId?: string;
|
|
88
|
+
plan?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface PluginRuntimeUser {
|
|
91
|
+
id?: string;
|
|
92
|
+
role?: string;
|
|
93
|
+
}
|
|
94
|
+
export interface PluginRuntimeContext {
|
|
95
|
+
tenant: PluginRuntimeTenant | null;
|
|
96
|
+
user: PluginRuntimeUser | null;
|
|
97
|
+
currentPath: string;
|
|
98
|
+
matchedPath?: string;
|
|
99
|
+
layout: LayoutVariant;
|
|
100
|
+
hasPermission?: (requirement: PluginPermissionRequirement) => boolean;
|
|
101
|
+
}
|
|
102
|
+
export interface PluginWidgetVisibility {
|
|
103
|
+
routes?: string[];
|
|
104
|
+
excludeRoutes?: string[];
|
|
105
|
+
layouts?: LayoutVariant[];
|
|
106
|
+
roles?: string[];
|
|
107
|
+
plans?: string[];
|
|
108
|
+
permissions?: PluginPermissionRequirement[];
|
|
109
|
+
when?: (context: PluginRuntimeContext) => boolean;
|
|
110
|
+
}
|
|
111
|
+
export interface PluginCapability {
|
|
112
|
+
id: string;
|
|
113
|
+
label: string;
|
|
114
|
+
description?: string;
|
|
115
|
+
kind?: 'page' | 'widget' | 'data' | 'integration';
|
|
116
|
+
}
|
|
117
|
+
export interface PluginWidgetComponentProps<TConfig extends Record<string, unknown> = Record<string, unknown>> {
|
|
118
|
+
config: TConfig;
|
|
119
|
+
runtime: PluginRuntimeContext;
|
|
120
|
+
plugin: ResolvedPluginManifest;
|
|
121
|
+
widget: ResolvedPluginWidget<TConfig>;
|
|
122
|
+
}
|
|
123
|
+
export interface PluginWidgetDefinition<TConfig extends Record<string, unknown> = Record<string, unknown>> {
|
|
124
|
+
id: string;
|
|
125
|
+
zone: PluginWidgetZone;
|
|
126
|
+
component: React.ComponentType<any>;
|
|
127
|
+
title?: string;
|
|
128
|
+
order?: number;
|
|
129
|
+
permission?: PluginPermissionRequirement;
|
|
130
|
+
visibility?: PluginWidgetVisibility;
|
|
131
|
+
props?: TConfig;
|
|
132
|
+
}
|
|
133
|
+
export interface TenantPluginBinding {
|
|
134
|
+
pluginId: string;
|
|
135
|
+
status: PluginStatus;
|
|
136
|
+
tenantId?: string;
|
|
137
|
+
config?: Record<string, unknown>;
|
|
138
|
+
}
|
|
139
|
+
export interface PluginRuntimeIssue {
|
|
140
|
+
type: 'duplicate_plugin' | 'missing_dependency' | 'circular_dependency' | 'vertical_mismatch';
|
|
141
|
+
pluginId: string;
|
|
142
|
+
dependencyId?: string;
|
|
143
|
+
message: string;
|
|
144
|
+
}
|
|
145
|
+
export type AIToolMode = 'read' | 'persist';
|
|
146
|
+
export interface AIToolParameterProperty {
|
|
147
|
+
type: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
148
|
+
description?: string;
|
|
149
|
+
enum?: string[];
|
|
150
|
+
items?: AIToolParameterProperty;
|
|
151
|
+
default?: unknown;
|
|
152
|
+
}
|
|
153
|
+
export interface AIToolParameters {
|
|
154
|
+
type: 'object';
|
|
155
|
+
properties: Record<string, AIToolParameterProperty>;
|
|
156
|
+
required?: string[];
|
|
157
|
+
}
|
|
158
|
+
export interface AIToolSuggestion {
|
|
159
|
+
/** Human-friendly prompt shown as a chip, e.g. "How many customers today?" */
|
|
160
|
+
label: string;
|
|
161
|
+
/** Actual message sent to the LLM when clicked (defaults to label) */
|
|
162
|
+
prompt?: string;
|
|
163
|
+
/** Lucide icon name override */
|
|
164
|
+
icon?: string;
|
|
165
|
+
/** Only show this suggestion for a specific vertical */
|
|
166
|
+
verticalId?: VerticalId;
|
|
167
|
+
}
|
|
168
|
+
export interface PluginAITool {
|
|
169
|
+
/** Unique tool ID, namespaced by plugin: e.g. 'financial.daily-revenue' */
|
|
170
|
+
id: string;
|
|
171
|
+
/** Function-style name shown as tool signature: e.g. 'getRevenue' */
|
|
172
|
+
name: string;
|
|
173
|
+
/** Description for the LLM — tells it when/how to use this tool */
|
|
174
|
+
description: string;
|
|
175
|
+
/** Lucide icon name */
|
|
176
|
+
icon?: string;
|
|
177
|
+
/** Read-only query or state-mutating action */
|
|
178
|
+
mode: AIToolMode;
|
|
179
|
+
/** JSON Schema for parameters — maps 1:1 to Claude tool_use input_schema */
|
|
180
|
+
parameters?: AIToolParameters;
|
|
181
|
+
/** Permission required to see/use this tool */
|
|
182
|
+
permission?: PluginPermissionRequirement;
|
|
183
|
+
/** User-facing suggestion chips for the empty chat state */
|
|
184
|
+
suggestions?: AIToolSuggestion[];
|
|
185
|
+
/** Category for grouping in the UI: e.g. 'Finance', 'Sales' */
|
|
186
|
+
category?: string;
|
|
187
|
+
/** Tags for filtering/search */
|
|
188
|
+
tags?: string[];
|
|
189
|
+
}
|
|
190
|
+
export interface PluginRegistryDef {
|
|
191
|
+
/** Unique ID within the plugin, e.g. 'payment-methods' */
|
|
192
|
+
id: string;
|
|
193
|
+
/** EntityDef for the CRUD page */
|
|
194
|
+
entity: import('./crud').EntityDef;
|
|
195
|
+
/** Lucide icon name */
|
|
196
|
+
icon?: string;
|
|
197
|
+
/** Short description */
|
|
198
|
+
description?: string;
|
|
199
|
+
/** How to render the list view */
|
|
200
|
+
display?: 'table' | 'cards' | 'tree';
|
|
201
|
+
/** Initial records to seed on first setup */
|
|
202
|
+
seedData?: Record<string, unknown>[];
|
|
203
|
+
/** Demo data for mock provider */
|
|
204
|
+
mockData?: Record<string, unknown>[];
|
|
205
|
+
/** If true, records cannot be created, edited, or deleted (seed-only / system data) */
|
|
206
|
+
readOnly?: boolean;
|
|
207
|
+
}
|
|
208
|
+
export interface PluginMigration {
|
|
209
|
+
/** Unique ID, e.g. 'financial-001-base-tables' */
|
|
210
|
+
id: string;
|
|
211
|
+
/** Semver for ordering migrations */
|
|
212
|
+
version: string;
|
|
213
|
+
/** Raw SQL migration */
|
|
214
|
+
sql: string;
|
|
215
|
+
/** Description of what this migration does */
|
|
216
|
+
description?: string;
|
|
217
|
+
}
|
|
218
|
+
export interface PluginQuickAction {
|
|
219
|
+
id: string;
|
|
220
|
+
label: string;
|
|
221
|
+
icon?: string;
|
|
222
|
+
description?: string;
|
|
223
|
+
/** Action handler — typically navigates to a view */
|
|
224
|
+
action: () => void;
|
|
225
|
+
}
|
|
226
|
+
export interface PluginOnboarding {
|
|
227
|
+
/** Wizard component — receives onComplete callback */
|
|
228
|
+
component: React.ComponentType<{
|
|
229
|
+
onComplete: () => void;
|
|
230
|
+
}>;
|
|
231
|
+
/** Wizard title */
|
|
232
|
+
title?: string;
|
|
233
|
+
/** Wizard description */
|
|
234
|
+
description?: string;
|
|
235
|
+
}
|
|
236
|
+
export interface PluginManifest {
|
|
237
|
+
id: string;
|
|
238
|
+
name: string;
|
|
239
|
+
icon: string;
|
|
240
|
+
version: string;
|
|
241
|
+
scope?: PluginScope;
|
|
242
|
+
verticalId?: VerticalId;
|
|
243
|
+
tenantId?: string;
|
|
244
|
+
defaultEnabled?: boolean;
|
|
245
|
+
descriptionNl?: string;
|
|
246
|
+
schema?: string;
|
|
247
|
+
dependencies?: string[];
|
|
248
|
+
navigation: PluginNavigationEntry[];
|
|
249
|
+
settings?: Array<PluginSettingsTab | LegacyPluginSettingsTab>;
|
|
250
|
+
routes: PluginRouteDefinition[];
|
|
251
|
+
widgets?: PluginWidgetDefinition[];
|
|
252
|
+
floatingUI?: {
|
|
253
|
+
component: React.ComponentType;
|
|
254
|
+
position: 'bottom-right' | 'bottom-left';
|
|
255
|
+
}[];
|
|
256
|
+
capabilities?: PluginCapability[];
|
|
257
|
+
/** AI tools this plugin exposes to the chat assistant */
|
|
258
|
+
aiTools?: PluginAITool[];
|
|
259
|
+
entities?: string[];
|
|
260
|
+
permissions?: string[];
|
|
261
|
+
/** Permission features this plugin introduces to the permission matrix */
|
|
262
|
+
declaredFeatures?: FeatureDeclaration[];
|
|
263
|
+
/** Registry entities the plugin brings (CRUD pages managed within the plugin) */
|
|
264
|
+
registries?: PluginRegistryDef[];
|
|
265
|
+
/** SQL migrations to create the plugin's tables */
|
|
266
|
+
migrations?: PluginMigration[];
|
|
267
|
+
/** First-time setup wizard */
|
|
268
|
+
onboarding?: PluginOnboarding;
|
|
269
|
+
/** i18n translations keyed by locale code (e.g. { en: { 'agenda.title': 'Agenda' }, 'pt-BR': { ... } }) */
|
|
270
|
+
locales?: Record<string, Record<string, string>>;
|
|
271
|
+
}
|
|
272
|
+
export interface ResolvedPluginManifest extends PluginManifest {
|
|
273
|
+
status: PluginStatus;
|
|
274
|
+
isActive: boolean;
|
|
275
|
+
activationReason: 'default' | 'tenant' | 'dependency' | 'inactive';
|
|
276
|
+
config: Record<string, unknown>;
|
|
277
|
+
missingDependencies: string[];
|
|
278
|
+
settingsTabs: PluginSettingsTab[];
|
|
279
|
+
widgets: PluginWidgetDefinition[];
|
|
280
|
+
resolvedRegistries: PluginRegistryDef[];
|
|
281
|
+
resolvedAITools: PluginAITool[];
|
|
282
|
+
}
|
|
283
|
+
export interface ResolvedPluginWidget<TConfig extends Record<string, unknown> = Record<string, unknown>> extends PluginWidgetDefinition<TConfig> {
|
|
284
|
+
order: number;
|
|
285
|
+
config: TConfig;
|
|
286
|
+
plugin: ResolvedPluginManifest;
|
|
287
|
+
}
|
|
288
|
+
export interface PluginRuntimeRoute extends PluginRouteDefinition {
|
|
289
|
+
plugin: ResolvedPluginManifest;
|
|
290
|
+
}
|
|
291
|
+
export interface PluginRuntime {
|
|
292
|
+
context: PluginRuntimeContext;
|
|
293
|
+
plugins: ResolvedPluginManifest[];
|
|
294
|
+
activePlugins: ResolvedPluginManifest[];
|
|
295
|
+
routes: PluginRuntimeRoute[];
|
|
296
|
+
navigation: PluginNavigationEntry[];
|
|
297
|
+
settingsTabs: PluginSettingsTab[];
|
|
298
|
+
widgets: ResolvedPluginWidget[];
|
|
299
|
+
capabilities: PluginCapability[];
|
|
300
|
+
/** AI tools from active plugins for the chat assistant */
|
|
301
|
+
aiTools: PluginAITool[];
|
|
302
|
+
issues: PluginRuntimeIssue[];
|
|
303
|
+
/** All registries from active plugins, keyed by pluginId */
|
|
304
|
+
registries: Map<string, PluginRegistryDef[]>;
|
|
305
|
+
/** Permission features declared by active plugins */
|
|
306
|
+
pluginFeatures: FeatureDeclaration[];
|
|
307
|
+
}
|
|
308
|
+
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/shell/types/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAIzE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAE3G,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,UAAU,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,EA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@@ -0,0 +1,74 @@
|
|
|
1
|
+
export interface Tenant {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
logoUrl?: string;
|
|
6
|
+
settings: TenantSettings;
|
|
7
|
+
plan: string;
|
|
8
|
+
verticalId?: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
updatedAt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface Location {
|
|
13
|
+
id: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
kind: string;
|
|
16
|
+
name: string;
|
|
17
|
+
email?: string;
|
|
18
|
+
phone?: string;
|
|
19
|
+
address?: string;
|
|
20
|
+
city?: string;
|
|
21
|
+
state?: string;
|
|
22
|
+
country: string;
|
|
23
|
+
postalCode?: string;
|
|
24
|
+
isHeadquarters: boolean;
|
|
25
|
+
isActive: boolean;
|
|
26
|
+
tags: string[];
|
|
27
|
+
notes?: string;
|
|
28
|
+
metadata: Record<string, unknown>;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
}
|
|
32
|
+
export interface LocationMember {
|
|
33
|
+
id: string;
|
|
34
|
+
locationId: string;
|
|
35
|
+
userId: string;
|
|
36
|
+
role: string;
|
|
37
|
+
isPrimary: boolean;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
}
|
|
40
|
+
export interface TenantSettings {
|
|
41
|
+
timezone: string;
|
|
42
|
+
currency: string;
|
|
43
|
+
locale: string;
|
|
44
|
+
branding: {
|
|
45
|
+
primaryColor?: string;
|
|
46
|
+
accentColor?: string;
|
|
47
|
+
logoUrl?: string;
|
|
48
|
+
faviconUrl?: string;
|
|
49
|
+
};
|
|
50
|
+
fieldRules?: import('./crud').TenantFieldRules;
|
|
51
|
+
}
|
|
52
|
+
export type MemberRole = 'owner' | 'admin' | 'manager' | 'staff' | 'viewer';
|
|
53
|
+
export interface TenantMember {
|
|
54
|
+
id: string;
|
|
55
|
+
userId: string;
|
|
56
|
+
tenantId: string;
|
|
57
|
+
role: MemberRole;
|
|
58
|
+
profileId?: string;
|
|
59
|
+
profileName?: string;
|
|
60
|
+
user: {
|
|
61
|
+
id: string;
|
|
62
|
+
email: string;
|
|
63
|
+
fullName: string;
|
|
64
|
+
avatarUrl?: string;
|
|
65
|
+
};
|
|
66
|
+
joinedAt: string;
|
|
67
|
+
}
|
|
68
|
+
export interface TenantState {
|
|
69
|
+
tenant: Tenant | null;
|
|
70
|
+
members: TenantMember[];
|
|
71
|
+
currentRole: MemberRole | null;
|
|
72
|
+
loading: boolean;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=tenant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant.d.ts","sourceRoot":"","sources":["../../../src/shell/types/tenant.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,cAAc,CAAA;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,OAAO,CA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,MAAM,CAAA;KACnB,CAAA;IACD,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,WAAW,EAAE,UAAU,GAAG,IAAI,CAAA;IAC9B,OAAO,EAAE,OAAO,CAAA;CACjB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { DataProvider, CrudQuery } from '@fayz-ai/core';
|
|
2
|
+
export interface CrudState<T> {
|
|
3
|
+
items: T[] | null;
|
|
4
|
+
total: number;
|
|
5
|
+
loading: boolean;
|
|
6
|
+
query: CrudQuery;
|
|
7
|
+
}
|
|
8
|
+
export interface ImportBatchResult<T> {
|
|
9
|
+
item?: T;
|
|
10
|
+
error?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CrudActions<T> {
|
|
13
|
+
fetch: () => Promise<void>;
|
|
14
|
+
create: (data: any) => Promise<T>;
|
|
15
|
+
/** Batch create without per-item list refetch. Calls onProgress after each batch. Single fetch at the end. */
|
|
16
|
+
createMany: (rows: any[], options?: {
|
|
17
|
+
batchSize?: number;
|
|
18
|
+
onProgress?: (processed: number, total: number) => void;
|
|
19
|
+
}) => Promise<{
|
|
20
|
+
success: number;
|
|
21
|
+
results: ImportBatchResult<T>[];
|
|
22
|
+
}>;
|
|
23
|
+
update: (id: string, data: Partial<T>) => Promise<T>;
|
|
24
|
+
remove: (id: string) => Promise<void>;
|
|
25
|
+
setQuery: (query: Partial<CrudQuery>) => void;
|
|
26
|
+
getById: (id: string) => T | undefined;
|
|
27
|
+
}
|
|
28
|
+
export type CrudStore<T> = CrudState<T> & CrudActions<T>;
|
|
29
|
+
export declare function createCrudStore<T extends {
|
|
30
|
+
id: string;
|
|
31
|
+
}>(dataProvider: DataProvider<T>): import("zustand").UseBoundStore<import("zustand").StoreApi<CrudStore<T>>>;
|
|
32
|
+
//# sourceMappingURL=createCrudStore.d.ts.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,SAAS,CAAC,KAAK,IAAI,CAAA;IAC7C,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,CAAC,GAAG,SAAS,CAAA;CACvC;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;AAExD,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EACtD,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,6EAyG9B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type SupabaseClient } from '@supabase/supabase-js';
|
|
2
|
+
/** Schema name for core platform tables */
|
|
3
|
+
export declare const CORE_SCHEMA = "saas_core";
|
|
4
|
+
/**
|
|
5
|
+
* Create (and cache) the Supabase client for the Fayz app.
|
|
6
|
+
* Also registers it as the global client in @fayz-ai/core so data providers
|
|
7
|
+
* can resolve it without prop-drilling.
|
|
8
|
+
*
|
|
9
|
+
* Idempotent — subsequent calls with the same URL return the cached client.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createFayzSupabaseClient(url: string, anonKey: string): SupabaseClient;
|
|
12
|
+
/** Get the cached client — throws if not initialised */
|
|
13
|
+
export declare function getFayzSupabaseClient(): SupabaseClient;
|
|
14
|
+
/** Safe getter — returns null if not initialised (mock/offline mode) */
|
|
15
|
+
export declare function getFayzSupabaseClientOptional(): SupabaseClient | null;
|
|
16
|
+
/** Get a client scoped to the core platform schema */
|
|
17
|
+
export declare function getCoreSchemaClient(): ReturnType<SupabaseClient['schema']>;
|
|
18
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/supabase/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAGzE,2CAA2C;AAC3C,eAAO,MAAM,WAAW,cAAc,CAAA;AAItC;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,CAkBrF;AAED,wDAAwD;AACxD,wBAAgB,qBAAqB,IAAI,cAAc,CAOtD;AAED,wEAAwE;AACxE,wBAAgB,6BAA6B,IAAI,cAAc,GAAG,IAAI,CAErE;AAED,sDAAsD;AACtD,wBAAgB,mBAAmB,IAAI,UAAU,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAE1E"}
|