@insforge/dashboard 0.0.0-dev.1
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 +14 -0
- package/dist/app/DashboardAppShell.d.ts +7 -0
- package/dist/app/DashboardProviders.d.ts +9 -0
- package/dist/app/InsforgeDashboard.d.ts +2 -0
- package/dist/app/createDashboardQueryClient.d.ts +2 -0
- package/dist/components/CodeEditor.d.ts +12 -0
- package/dist/components/ConnectCTA.d.ts +6 -0
- package/dist/components/DataGridEmptyState.d.ts +9 -0
- package/dist/components/DeleteActionButton.d.ts +8 -0
- package/dist/components/EmptyState.d.ts +14 -0
- package/dist/components/ErrorState.d.ts +8 -0
- package/dist/components/FeatureSidebar.d.ts +47 -0
- package/dist/components/JsonHighlight.d.ts +7 -0
- package/dist/components/LoadingState.d.ts +6 -0
- package/dist/components/PaginationControls.d.ts +11 -0
- package/dist/components/PromptDialog.d.ts +10 -0
- package/dist/components/SelectionClearButton.d.ts +7 -0
- package/dist/components/Stepper.d.ts +22 -0
- package/dist/components/TableHeader.d.ts +20 -0
- package/dist/components/ThemeSelect.d.ts +1 -0
- package/dist/components/TypeBadge.d.ts +6 -0
- package/dist/components/ZoomedVideo.d.ts +7 -0
- package/dist/components/datagrid/DataGrid.d.ts +51 -0
- package/dist/components/datagrid/DefaultCellRenderer.d.ts +12 -0
- package/dist/components/datagrid/IdCell.d.ts +4 -0
- package/dist/components/datagrid/SortableHeader.d.ts +9 -0
- package/dist/components/datagrid/cell-editors/BooleanCellEditor.d.ts +2 -0
- package/dist/components/datagrid/cell-editors/DateCellEditor.d.ts +2 -0
- package/dist/components/datagrid/cell-editors/JsonCellEditor.d.ts +2 -0
- package/dist/components/datagrid/cell-editors/TextCellEditor.d.ts +2 -0
- package/dist/components/datagrid/cell-editors/index.d.ts +5 -0
- package/dist/components/datagrid/cell-editors/types.d.ts +39 -0
- package/dist/components/datagrid/datagridTypes.d.ts +61 -0
- package/dist/components/datagrid/index.d.ts +8 -0
- package/dist/components/index.d.ts +20 -0
- package/dist/components/layout/AppHeader.d.ts +1 -0
- package/dist/components/layout/AppSidebar.d.ts +6 -0
- package/dist/components/layout/Layout.d.ts +6 -0
- package/dist/components/layout/index.d.ts +3 -0
- package/dist/components/radix/Alert.d.ts +8 -0
- package/dist/components/radix/Avatar.d.ts +6 -0
- package/dist/components/radix/Card.d.ts +8 -0
- package/dist/components/radix/Form.d.ts +23 -0
- package/dist/components/radix/Label.d.ts +5 -0
- package/dist/components/radix/Popover.d.ts +6 -0
- package/dist/components/radix/ScrollArea.d.ts +5 -0
- package/dist/components/radix/Separator.d.ts +4 -0
- package/dist/components/radix/Skeleton.d.ts +2 -0
- package/dist/components/radix/Textarea.d.ts +3 -0
- package/dist/components/radix/index.d.ts +10 -0
- package/dist/features/ai/components/AILayout.d.ts +1 -0
- package/dist/features/ai/components/GatewayConfigDialog.d.ts +6 -0
- package/dist/features/ai/components/ModelRow.d.ts +9 -0
- package/dist/features/ai/components/index.d.ts +2 -0
- package/dist/features/ai/helpers.d.ts +36 -0
- package/dist/features/ai/hooks/useAIConfigs.d.ts +43 -0
- package/dist/features/ai/hooks/useAIGatewayConfig.d.ts +15 -0
- package/dist/features/ai/hooks/useAIUsage.d.ts +63 -0
- package/dist/features/ai/pages/AIPage.d.ts +1 -0
- package/dist/features/ai/services/ai.service.d.ts +44 -0
- package/dist/features/auth/components/AuthSettingsMenuDialog.d.ts +6 -0
- package/dist/features/auth/components/AuthenticationLayout.d.ts +1 -0
- package/dist/features/auth/components/AuthenticationSidebar.d.ts +1 -0
- package/dist/features/auth/components/CustomOAuthConfigDialog.d.ts +9 -0
- package/dist/features/auth/components/OAuthConfigDialog.d.ts +9 -0
- package/dist/features/auth/components/OAuthEmptyState.d.ts +1 -0
- package/dist/features/auth/components/SecretInput.d.ts +8 -0
- package/dist/features/auth/components/UserFormDialog.d.ts +13 -0
- package/dist/features/auth/components/UsersDataGrid.d.ts +9 -0
- package/dist/features/auth/components/index.d.ts +6 -0
- package/dist/features/auth/helpers.d.ts +15 -0
- package/dist/features/auth/hooks/useAnonToken.d.ts +14 -0
- package/dist/features/auth/hooks/useAuthConfig.d.ts +57 -0
- package/dist/features/auth/hooks/useCustomOAuthConfig.d.ts +72 -0
- package/dist/features/auth/hooks/useOAuthConfig.d.ts +94 -0
- package/dist/features/auth/hooks/useUsers.d.ts +92 -0
- package/dist/features/auth/index.d.ts +5 -0
- package/dist/features/auth/pages/AuthMethodsPage.d.ts +1 -0
- package/dist/features/auth/pages/UsersPage.d.ts +1 -0
- package/dist/features/auth/services/anonToken.service.d.ts +7 -0
- package/dist/features/auth/services/config.service.d.ts +6 -0
- package/dist/features/auth/services/custom-oauth-config.service.d.ts +14 -0
- package/dist/features/auth/services/oauth-config.service.d.ts +14 -0
- package/dist/features/auth/services/user.service.d.ts +21 -0
- package/dist/features/dashboard/components/ConnectionSuccessBanner.d.ts +1 -0
- package/dist/features/dashboard/components/DashboardLayout.d.ts +1 -0
- package/dist/features/dashboard/components/ProjectSettingsMenuDialog.d.ts +1 -0
- package/dist/features/dashboard/components/PromptCard.d.ts +6 -0
- package/dist/features/dashboard/components/PromptDialog.d.ts +8 -0
- package/dist/features/dashboard/components/StatsCard.d.ts +11 -0
- package/dist/features/dashboard/components/connect/APIKeysSection.d.ts +9 -0
- package/dist/features/dashboard/components/connect/CLISection.d.ts +5 -0
- package/dist/features/dashboard/components/connect/ConnectDialog.d.ts +1 -0
- package/dist/features/dashboard/components/connect/ConnectionStringSection.d.ts +5 -0
- package/dist/features/dashboard/components/connect/MCPSection.d.ts +10 -0
- package/dist/features/dashboard/components/connect/ShowPasswordButton.d.ts +7 -0
- package/dist/features/dashboard/components/connect/VideoDemoModal.d.ts +5 -0
- package/dist/features/dashboard/components/connect/constants.d.ts +2 -0
- package/dist/features/dashboard/components/connect/index.d.ts +8 -0
- package/dist/features/dashboard/components/connect/mcp/CursorDeeplinkGenerator.d.ts +7 -0
- package/dist/features/dashboard/components/connect/mcp/QoderDeeplinkGenerator.d.ts +7 -0
- package/dist/features/dashboard/components/connect/mcp/helpers.d.ts +32 -0
- package/dist/features/dashboard/components/connect/mcp/index.d.ts +4 -0
- package/dist/features/dashboard/components/index.d.ts +5 -0
- package/dist/features/dashboard/pages/DashboardPage.d.ts +2 -0
- package/dist/features/dashboard/prompts/ai-chatbot.d.ts +6 -0
- package/dist/features/dashboard/prompts/crm-system.d.ts +6 -0
- package/dist/features/dashboard/prompts/ecommerce-platform.d.ts +6 -0
- package/dist/features/dashboard/prompts/index.d.ts +14 -0
- package/dist/features/dashboard/prompts/instagram-clone.d.ts +6 -0
- package/dist/features/dashboard/prompts/notion-clone.d.ts +6 -0
- package/dist/features/dashboard/prompts/reddit-clone.d.ts +6 -0
- package/dist/features/database/components/ColumnTypeSelect.d.ts +10 -0
- package/dist/features/database/components/DatabaseDataGrid.d.ts +12 -0
- package/dist/features/database/components/DatabaseLayout.d.ts +1 -0
- package/dist/features/database/components/DatabaseSidebar.d.ts +16 -0
- package/dist/features/database/components/ForeignKeyCell.d.ts +10 -0
- package/dist/features/database/components/ForeignKeyPopover.d.ts +13 -0
- package/dist/features/database/components/LinkRecordDialog.d.ts +10 -0
- package/dist/features/database/components/RecordFormDialog.d.ts +10 -0
- package/dist/features/database/components/RecordFormField.d.ts +10 -0
- package/dist/features/database/components/SQLEditorLayout.d.ts +1 -0
- package/dist/features/database/components/SQLModal.d.ts +13 -0
- package/dist/features/database/components/TableForm.d.ts +11 -0
- package/dist/features/database/components/TableFormColumn.d.ts +13 -0
- package/dist/features/database/components/TablesEmptyState.d.ts +8 -0
- package/dist/features/database/components/TemplateCard.d.ts +8 -0
- package/dist/features/database/components/TemplatePreview.d.ts +7 -0
- package/dist/features/database/constants.d.ts +15 -0
- package/dist/features/database/contexts/SQLEditorContext.d.ts +22 -0
- package/dist/features/database/helpers.d.ts +9 -0
- package/dist/features/database/hooks/useCSVImport.d.ts +19 -0
- package/dist/features/database/hooks/useDatabase.d.ts +90 -0
- package/dist/features/database/hooks/useRawSQL.d.ts +43 -0
- package/dist/features/database/hooks/useRecords.d.ts +39 -0
- package/dist/features/database/hooks/useTableColumnWidthsPreference.d.ts +5 -0
- package/dist/features/database/hooks/useTables.d.ts +72 -0
- package/dist/features/database/index.d.ts +2 -0
- package/dist/features/database/pages/FunctionsPage.d.ts +1 -0
- package/dist/features/database/pages/IndexesPage.d.ts +1 -0
- package/dist/features/database/pages/PoliciesPage.d.ts +1 -0
- package/dist/features/database/pages/SQLEditorPage.d.ts +1 -0
- package/dist/features/database/pages/TablesPage.d.ts +1 -0
- package/dist/features/database/pages/TemplatesPage.d.ts +1 -0
- package/dist/features/database/pages/TriggersPage.d.ts +1 -0
- package/dist/features/database/schema.d.ts +185 -0
- package/dist/features/database/services/advance.service.d.ts +13 -0
- package/dist/features/database/services/database.service.d.ts +24 -0
- package/dist/features/database/services/record.service.d.ts +57 -0
- package/dist/features/database/services/table.service.d.ts +9 -0
- package/dist/features/database/templates/ai-chatbot.d.ts +2 -0
- package/dist/features/database/templates/crm-system.d.ts +2 -0
- package/dist/features/database/templates/ecommerce-platform.d.ts +2 -0
- package/dist/features/database/templates/index.d.ts +17 -0
- package/dist/features/database/templates/instagram-clone.d.ts +2 -0
- package/dist/features/database/templates/notion-clone.d.ts +2 -0
- package/dist/features/database/templates/reddit-clone.d.ts +2 -0
- package/dist/features/deployments/components/DeploymentMetaDataDialog.d.ts +7 -0
- package/dist/features/deployments/components/DeploymentsEmptyState.d.ts +1 -0
- package/dist/features/deployments/components/DeploymentsLayout.d.ts +1 -0
- package/dist/features/deployments/components/DeploymentsSidebar.d.ts +1 -0
- package/dist/features/deployments/components/EnvVarDialog.d.ts +14 -0
- package/dist/features/deployments/components/EnvVarRow.d.ts +9 -0
- package/dist/features/deployments/components/EnvVarsEmptyState.d.ts +1 -0
- package/dist/features/deployments/helpers.d.ts +14 -0
- package/dist/features/deployments/hooks/useCustomDomains.d.ts +68 -0
- package/dist/features/deployments/hooks/useDeploymentEnvVars.d.ts +32 -0
- package/dist/features/deployments/hooks/useDeploymentMetadata.d.ts +13 -0
- package/dist/features/deployments/hooks/useDeploymentSlug.d.ts +9 -0
- package/dist/features/deployments/hooks/useDeployments.d.ts +85 -0
- package/dist/features/deployments/pages/DeploymentDomainsPage.d.ts +6 -0
- package/dist/features/deployments/pages/DeploymentEnvVarsPage.d.ts +1 -0
- package/dist/features/deployments/pages/DeploymentLogsPage.d.ts +1 -0
- package/dist/features/deployments/pages/DeploymentOverviewPage.d.ts +1 -0
- package/dist/features/deployments/services/deployments.service.d.ts +36 -0
- package/dist/features/functions/components/FunctionEmptyState.d.ts +1 -0
- package/dist/features/functions/components/FunctionRow.d.ts +9 -0
- package/dist/features/functions/components/FunctionsLayout.d.ts +1 -0
- package/dist/features/functions/components/FunctionsSidebar.d.ts +1 -0
- package/dist/features/functions/components/ScheduleEmptyState.d.ts +1 -0
- package/dist/features/functions/components/ScheduleFormDialog.d.ts +11 -0
- package/dist/features/functions/components/ScheduleLogs.d.ts +5 -0
- package/dist/features/functions/components/ScheduleRow.d.ts +12 -0
- package/dist/features/functions/components/SecretEmptyState.d.ts +5 -0
- package/dist/features/functions/components/SecretRow.d.ts +8 -0
- package/dist/features/functions/helpers.d.ts +5 -0
- package/dist/features/functions/hooks/useFunctions.d.ts +75 -0
- package/dist/features/functions/hooks/useSchedules.d.ts +90 -0
- package/dist/features/functions/hooks/useSecrets.d.ts +62 -0
- package/dist/features/functions/pages/FunctionsPage.d.ts +1 -0
- package/dist/features/functions/pages/SchedulesPage.d.ts +1 -0
- package/dist/features/functions/pages/SecretsPage.d.ts +1 -0
- package/dist/features/functions/services/function.service.d.ts +8 -0
- package/dist/features/functions/services/schedule.service.d.ts +10 -0
- package/dist/features/functions/services/secret.service.d.ts +8 -0
- package/dist/features/functions/types.d.ts +2 -0
- package/dist/features/login/pages/CloudLoginPage.d.ts +1 -0
- package/dist/features/login/pages/LoginPage.d.ts +1 -0
- package/dist/features/login/services/login.service.d.ts +16 -0
- package/dist/features/login/services/partnership.service.d.ts +18 -0
- package/dist/features/logs/components/BuildLogsView.d.ts +5 -0
- package/dist/features/logs/components/FunctionLogsTabs.d.ts +12 -0
- package/dist/features/logs/components/LogDetailPanel.d.ts +7 -0
- package/dist/features/logs/components/LogsDataGrid.d.ts +21 -0
- package/dist/features/logs/components/LogsLayout.d.ts +1 -0
- package/dist/features/logs/components/LogsSidebar.d.ts +1 -0
- package/dist/features/logs/components/SeverityBadge.d.ts +6 -0
- package/dist/features/logs/components/SeverityFilterDropdown.d.ts +6 -0
- package/dist/features/logs/components/index.d.ts +7 -0
- package/dist/features/logs/helpers.d.ts +38 -0
- package/dist/features/logs/hooks/useAuditLogs.d.ts +38 -0
- package/dist/features/logs/hooks/useLogSources.d.ts +41 -0
- package/dist/features/logs/hooks/useLogs.d.ts +51 -0
- package/dist/features/logs/hooks/useMcpUsage.d.ts +35 -0
- package/dist/features/logs/pages/AuditsPage.d.ts +1 -0
- package/dist/features/logs/pages/FunctionLogsPage.d.ts +1 -0
- package/dist/features/logs/pages/LogsPage.d.ts +1 -0
- package/dist/features/logs/pages/MCPLogsPage.d.ts +1 -0
- package/dist/features/logs/services/audit.service.d.ts +7 -0
- package/dist/features/logs/services/log.service.d.ts +22 -0
- package/dist/features/logs/services/usage.service.d.ts +16 -0
- package/dist/features/realtime/components/ChannelFormDialog.d.ts +13 -0
- package/dist/features/realtime/components/ChannelRow.d.ts +12 -0
- package/dist/features/realtime/components/MessageRow.d.ts +7 -0
- package/dist/features/realtime/components/RealtimeEmptyState.d.ts +6 -0
- package/dist/features/realtime/components/RealtimeLayout.d.ts +1 -0
- package/dist/features/realtime/components/RealtimeSettingsMenuDialog.d.ts +6 -0
- package/dist/features/realtime/components/RealtimeSidebar.d.ts +1 -0
- package/dist/features/realtime/hooks/useRealtimeChannels.d.ts +66 -0
- package/dist/features/realtime/hooks/useRealtimeConfig.d.ts +14 -0
- package/dist/features/realtime/hooks/useRealtimeMessages.d.ts +64 -0
- package/dist/features/realtime/hooks/useRealtimePermissions.d.ts +48 -0
- package/dist/features/realtime/pages/RealtimeChannelsPage.d.ts +1 -0
- package/dist/features/realtime/pages/RealtimeMessagesPage.d.ts +1 -0
- package/dist/features/realtime/pages/RealtimePermissionsPage.d.ts +1 -0
- package/dist/features/realtime/services/realtime.service.d.ts +15 -0
- package/dist/features/storage/components/BucketFormDialog.d.ts +10 -0
- package/dist/features/storage/components/FilePreviewDialog.d.ts +9 -0
- package/dist/features/storage/components/StorageDataGrid.d.ts +14 -0
- package/dist/features/storage/components/StorageLayout.d.ts +1 -0
- package/dist/features/storage/components/StorageSettingsMenuDialog.d.ts +8 -0
- package/dist/features/storage/components/StorageSidebar.d.ts +13 -0
- package/dist/features/storage/components/UploadToast.d.ts +9 -0
- package/dist/features/storage/hooks/useStorage.d.ts +77 -0
- package/dist/features/storage/hooks/useStorageConfig.d.ts +29 -0
- package/dist/features/storage/pages/BucketsPage.d.ts +1 -0
- package/dist/features/storage/services/storage-config.service.d.ts +9 -0
- package/dist/features/storage/services/storage.service.d.ts +26 -0
- package/dist/features/visualizer/components/AuthNode.d.ts +11 -0
- package/dist/features/visualizer/components/BucketNode.d.ts +8 -0
- package/dist/features/visualizer/components/SchemaVisualizer.d.ts +18 -0
- package/dist/features/visualizer/components/TableNode.d.ts +10 -0
- package/dist/features/visualizer/components/VisualizerLayout.d.ts +1 -0
- package/dist/features/visualizer/components/VisualizerSkeleton.d.ts +1 -0
- package/dist/features/visualizer/components/index.d.ts +5 -0
- package/dist/features/visualizer/pages/VisualizerPage.d.ts +2 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +83413 -0
- package/dist/layout/DashboardFrame.d.ts +15 -0
- package/dist/layout/DashboardOutletLayout.d.ts +1 -0
- package/dist/layout/DashboardSectionLayout.d.ts +7 -0
- package/dist/lib/analytics/posthog.d.ts +5 -0
- package/dist/lib/api/client.d.ts +20 -0
- package/dist/lib/config/DashboardHostContext.d.ts +3 -0
- package/dist/lib/config/runtime.d.ts +3 -0
- package/dist/lib/contexts/AuthContext.d.ts +18 -0
- package/dist/lib/contexts/ModalContext.d.ts +2 -0
- package/dist/lib/contexts/SocketContext.d.ts +42 -0
- package/dist/lib/contexts/ThemeContext.d.ts +17 -0
- package/dist/lib/hooks/useCloudProjectInfo.d.ts +19 -0
- package/dist/lib/hooks/useConfirm.d.ts +21 -0
- package/dist/lib/hooks/useHealth.d.ts +13 -0
- package/dist/lib/hooks/useInterval.d.ts +1 -0
- package/dist/lib/hooks/useMediaQuery.d.ts +6 -0
- package/dist/lib/hooks/useMetadata.d.ts +239 -0
- package/dist/lib/hooks/useModal.d.ts +1 -0
- package/dist/lib/hooks/usePageSize.d.ts +5 -0
- package/dist/lib/hooks/useTimeout.d.ts +1 -0
- package/dist/lib/hooks/useToast.d.ts +20 -0
- package/dist/lib/routing/AppRoutes.d.ts +1 -0
- package/dist/lib/routing/RequireAuth.d.ts +6 -0
- package/dist/lib/services/health.service.d.ts +8 -0
- package/dist/lib/services/metadata.service.d.ts +16 -0
- package/dist/lib/utils/__tests__/utils.test.d.ts +1 -0
- package/dist/lib/utils/cloudMessaging.d.ts +13 -0
- package/dist/lib/utils/constants.d.ts +17 -0
- package/dist/lib/utils/local-storage.d.ts +5 -0
- package/dist/lib/utils/menuItems.d.ts +22 -0
- package/dist/lib/utils/schemaValidations.d.ts +21 -0
- package/dist/lib/utils/utils.d.ts +46 -0
- package/dist/modals/DashboardModalContext.d.ts +16 -0
- package/dist/navigation/menuItems.d.ts +13 -0
- package/dist/router/DashboardHostRoutes.d.ts +7 -0
- package/dist/router/DashboardProtectedBoundary.d.ts +9 -0
- package/dist/router/DashboardRouter.d.ts +1 -0
- package/dist/router/index.d.ts +3 -0
- package/dist/router/paths.d.ts +5 -0
- package/dist/styles.css +1 -0
- package/dist/types/index.d.ts +80 -0
- package/package.json +78 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './Alert';
|
|
2
|
+
export * from './Avatar';
|
|
3
|
+
export * from './Card';
|
|
4
|
+
export * from './Form';
|
|
5
|
+
export * from './Label';
|
|
6
|
+
export * from './Popover';
|
|
7
|
+
export * from './ScrollArea';
|
|
8
|
+
export * from './Separator';
|
|
9
|
+
export * from './Skeleton';
|
|
10
|
+
export * from './Textarea';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AILayout(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ModelOption } from '../helpers';
|
|
2
|
+
interface ModelRowProps {
|
|
3
|
+
model: ModelOption;
|
|
4
|
+
isEnabled: boolean;
|
|
5
|
+
requests: number;
|
|
6
|
+
onToggle: (modelId: string, isEnabled: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function ModelRow({ model, isEnabled, requests, onToggle }: ModelRowProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ModalitySchema, AIModelSchema, AIConfigurationWithUsageSchema } from '@insforge/shared-schemas';
|
|
2
|
+
export interface ModelOption {
|
|
3
|
+
id: string;
|
|
4
|
+
modelId: string;
|
|
5
|
+
modelName: string;
|
|
6
|
+
providerName: string;
|
|
7
|
+
logo: React.ComponentType<React.SVGProps<SVGSVGElement>> | undefined;
|
|
8
|
+
inputModality: ModalitySchema[];
|
|
9
|
+
outputModality: ModalitySchema[];
|
|
10
|
+
inputPrice?: number;
|
|
11
|
+
outputPrice?: number;
|
|
12
|
+
usageStats?: {
|
|
13
|
+
totalRequests: number;
|
|
14
|
+
};
|
|
15
|
+
systemPrompt?: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface ProviderTab {
|
|
18
|
+
id: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
logo: React.FunctionComponent<React.SVGProps<SVGSVGElement>> | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare const getProviderIdFromModelId: (modelId: string) => string;
|
|
23
|
+
export declare const getProviderDisplayName: (providerId: string) => string;
|
|
24
|
+
export declare const getProviderLogo: (providerId: string) => React.FunctionComponent<React.SVGProps<SVGSVGElement>> | undefined;
|
|
25
|
+
export declare const filterModelsByProvider: (models: AIModelSchema[], providerId: string) => AIModelSchema[];
|
|
26
|
+
export declare const generateProviderTabs: (models: AIModelSchema[]) => ProviderTab[];
|
|
27
|
+
export declare const formatTokenCount: (count: number) => string;
|
|
28
|
+
export declare const filterModelsByModalities: (models: AIModelSchema[], selectedInputModalities: ModalitySchema[], selectedOutputModalities: ModalitySchema[]) => AIModelSchema[];
|
|
29
|
+
export declare const getFriendlyModelName: (rawModelName: string) => string;
|
|
30
|
+
export declare function toModelOption(model: AIModelSchema | AIConfigurationWithUsageSchema): ModelOption;
|
|
31
|
+
export declare const sortModelsByConfigurationStatus: (models: ModelOption[], configuredModelIds: string[]) => ModelOption[];
|
|
32
|
+
export type SortField = 'inputPrice' | 'outputPrice' | 'requests';
|
|
33
|
+
export type SortDirection = 'asc' | 'desc';
|
|
34
|
+
export declare const formatCredits: (remaining: number) => string;
|
|
35
|
+
export declare const formatPrice: (price?: number) => string;
|
|
36
|
+
export declare const formatModality: (modality: string) => string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { UpdateAIConfigurationRequest, ModalitySchema } from '@insforge/shared-schemas';
|
|
2
|
+
import { type ModelOption } from '../helpers';
|
|
3
|
+
interface UseAIConfigsOptions {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function useAIConfigs(options?: UseAIConfigsOptions): {
|
|
7
|
+
isLoadingModels: boolean;
|
|
8
|
+
modelsError: Error | null;
|
|
9
|
+
allAvailableModels: {
|
|
10
|
+
inputModality: ("text" | "image" | "audio")[];
|
|
11
|
+
outputModality: ("text" | "image" | "audio")[];
|
|
12
|
+
provider: string;
|
|
13
|
+
modelId: string;
|
|
14
|
+
id: string;
|
|
15
|
+
inputPrice?: number | undefined;
|
|
16
|
+
outputPrice?: number | undefined;
|
|
17
|
+
}[];
|
|
18
|
+
isLoadingConfigurations: boolean;
|
|
19
|
+
configurationsError: Error | null;
|
|
20
|
+
createConfiguration: import("@tanstack/react-query").UseMutateFunction<{
|
|
21
|
+
id: string;
|
|
22
|
+
message: string;
|
|
23
|
+
}, Error, {
|
|
24
|
+
inputModality: ("text" | "image" | "audio")[];
|
|
25
|
+
outputModality: ("text" | "image" | "audio")[];
|
|
26
|
+
provider: string;
|
|
27
|
+
modelId: string;
|
|
28
|
+
systemPrompt?: string | undefined;
|
|
29
|
+
}, unknown>;
|
|
30
|
+
updateConfiguration: import("@tanstack/react-query").UseMutateFunction<{
|
|
31
|
+
message: string;
|
|
32
|
+
}, Error, {
|
|
33
|
+
id: string;
|
|
34
|
+
data: UpdateAIConfigurationRequest;
|
|
35
|
+
}, unknown>;
|
|
36
|
+
deleteConfiguration: import("@tanstack/react-query").UseMutateFunction<{
|
|
37
|
+
message: string;
|
|
38
|
+
}, Error, string, unknown>;
|
|
39
|
+
getFilteredModels: (inputModality: ModalitySchema[], outputModality: ModalitySchema[]) => ModelOption[];
|
|
40
|
+
configurationOptions: ModelOption[];
|
|
41
|
+
configuredModelIds: string[];
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare function useAIGatewayConfig(): {
|
|
2
|
+
gatewayConfig: {
|
|
3
|
+
keySource: "byok" | "cloud" | "env" | "unconfigured";
|
|
4
|
+
hasByokKey: boolean;
|
|
5
|
+
maskedKey?: string | undefined;
|
|
6
|
+
} | undefined;
|
|
7
|
+
isLoadingGatewayConfig: boolean;
|
|
8
|
+
gatewayConfigError: Error | null;
|
|
9
|
+
setBYOKKey: import("@tanstack/react-query").UseMutationResult<{
|
|
10
|
+
message: string;
|
|
11
|
+
}, Error, string, unknown>;
|
|
12
|
+
removeBYOKKey: import("@tanstack/react-query").UseMutationResult<{
|
|
13
|
+
message: string;
|
|
14
|
+
}, Error, void, unknown>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
interface UseAIUsageSummaryOptions {
|
|
2
|
+
configId?: string;
|
|
3
|
+
startDate?: string;
|
|
4
|
+
endDate?: string;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function useAIUsageSummary(options?: UseAIUsageSummaryOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
8
|
+
totalInputTokens: number;
|
|
9
|
+
totalOutputTokens: number;
|
|
10
|
+
totalTokens: number;
|
|
11
|
+
totalImageCount: number;
|
|
12
|
+
totalRequests: number;
|
|
13
|
+
}, Error>;
|
|
14
|
+
interface UseAIUsageRecordsOptions {
|
|
15
|
+
startDate?: string;
|
|
16
|
+
endDate?: string;
|
|
17
|
+
limit?: string;
|
|
18
|
+
offset?: string;
|
|
19
|
+
enabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function useAIUsageRecords(options?: UseAIUsageRecordsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
22
|
+
records: {
|
|
23
|
+
inputModality: ("text" | "image" | "audio")[] | null;
|
|
24
|
+
outputModality: ("text" | "image" | "audio")[] | null;
|
|
25
|
+
provider: string | null;
|
|
26
|
+
id: string;
|
|
27
|
+
configId: string;
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
model: string | null;
|
|
30
|
+
modelId?: string | null | undefined;
|
|
31
|
+
inputTokens?: number | undefined;
|
|
32
|
+
outputTokens?: number | undefined;
|
|
33
|
+
imageCount?: number | undefined;
|
|
34
|
+
imageResolution?: string | undefined;
|
|
35
|
+
}[];
|
|
36
|
+
total: number;
|
|
37
|
+
}, Error>;
|
|
38
|
+
interface UseAIConfigUsageOptions {
|
|
39
|
+
configId: string;
|
|
40
|
+
startDate?: string;
|
|
41
|
+
endDate?: string;
|
|
42
|
+
enabled?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare function useAIConfigUsage(options: UseAIConfigUsageOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
45
|
+
inputModality: ("text" | "image" | "audio")[] | null;
|
|
46
|
+
outputModality: ("text" | "image" | "audio")[] | null;
|
|
47
|
+
provider: string | null;
|
|
48
|
+
id: string;
|
|
49
|
+
configId: string;
|
|
50
|
+
createdAt: Date;
|
|
51
|
+
model: string | null;
|
|
52
|
+
modelId?: string | null | undefined;
|
|
53
|
+
inputTokens?: number | undefined;
|
|
54
|
+
outputTokens?: number | undefined;
|
|
55
|
+
imageCount?: number | undefined;
|
|
56
|
+
imageResolution?: string | undefined;
|
|
57
|
+
}[], Error>;
|
|
58
|
+
export declare function useAIRemainingCredits(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
|
|
59
|
+
usage: number;
|
|
60
|
+
limit: number | null;
|
|
61
|
+
remaining: number | null;
|
|
62
|
+
}, Error>;
|
|
63
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AIPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AIModelSchema, AIConfigurationSchema, CreateAIConfigurationRequest, UpdateAIConfigurationRequest, AIUsageSummarySchema, AIUsageRecordSchema, ListAIUsageResponse, AIConfigurationWithUsageSchema, GatewayConfigResponse } from '@insforge/shared-schemas';
|
|
2
|
+
export declare class AIService {
|
|
3
|
+
getModels(): Promise<AIModelSchema[]>;
|
|
4
|
+
createConfiguration(data: CreateAIConfigurationRequest): Promise<{
|
|
5
|
+
id: string;
|
|
6
|
+
message: string;
|
|
7
|
+
}>;
|
|
8
|
+
listConfigurations(): Promise<AIConfigurationWithUsageSchema[]>;
|
|
9
|
+
getConfiguration(id: string): Promise<AIConfigurationSchema>;
|
|
10
|
+
updateConfiguration(id: string, data: UpdateAIConfigurationRequest): Promise<{
|
|
11
|
+
message: string;
|
|
12
|
+
}>;
|
|
13
|
+
deleteConfiguration(id: string): Promise<{
|
|
14
|
+
message: string;
|
|
15
|
+
}>;
|
|
16
|
+
getUsageSummary(params?: {
|
|
17
|
+
configId?: string;
|
|
18
|
+
startDate?: string;
|
|
19
|
+
endDate?: string;
|
|
20
|
+
}): Promise<AIUsageSummarySchema>;
|
|
21
|
+
getUsageRecords(params?: {
|
|
22
|
+
startDate?: string;
|
|
23
|
+
endDate?: string;
|
|
24
|
+
limit?: string;
|
|
25
|
+
offset?: string;
|
|
26
|
+
}): Promise<ListAIUsageResponse>;
|
|
27
|
+
getConfigUsageRecords(configId: string, params?: {
|
|
28
|
+
startDate?: string;
|
|
29
|
+
endDate?: string;
|
|
30
|
+
}): Promise<AIUsageRecordSchema[]>;
|
|
31
|
+
getRemainingCredits(): Promise<{
|
|
32
|
+
usage: number;
|
|
33
|
+
limit: number | null;
|
|
34
|
+
remaining: number | null;
|
|
35
|
+
}>;
|
|
36
|
+
getGatewayConfig(): Promise<GatewayConfigResponse>;
|
|
37
|
+
setGatewayBYOKKey(apiKey: string): Promise<{
|
|
38
|
+
message: string;
|
|
39
|
+
}>;
|
|
40
|
+
removeGatewayBYOKKey(): Promise<{
|
|
41
|
+
message: string;
|
|
42
|
+
}>;
|
|
43
|
+
}
|
|
44
|
+
export declare const aiService: AIService;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AuthenticationLayout(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AuthenticationSidebar(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CustomOAuthConfigSchema } from '@insforge/shared-schemas';
|
|
2
|
+
interface CustomOAuthConfigDialogProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
selectedConfig?: CustomOAuthConfigSchema;
|
|
6
|
+
onSuccess?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function CustomOAuthConfigDialog({ isOpen, onClose, selectedConfig, onSuccess, }: CustomOAuthConfigDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type OAuthProviderInfo } from '../helpers';
|
|
2
|
+
interface OAuthConfigDialogProps {
|
|
3
|
+
provider?: OAuthProviderInfo;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSuccess?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function OAuthConfigDialog({ provider, isOpen, onClose, onSuccess, }: OAuthConfigDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function OAuthEmptyState(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { Input } from '@insforge/ui';
|
|
3
|
+
interface SecretInputProps extends ComponentProps<typeof Input> {
|
|
4
|
+
isVisible: boolean;
|
|
5
|
+
onToggleVisibility: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function SecretInput({ isVisible, onToggleVisibility, className, value, ...props }: SecretInputProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface User {
|
|
2
|
+
id?: string;
|
|
3
|
+
email: string;
|
|
4
|
+
password?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
}
|
|
7
|
+
interface UserFormDialogProps {
|
|
8
|
+
open: boolean;
|
|
9
|
+
onOpenChange: (open: boolean) => void;
|
|
10
|
+
user?: User | null;
|
|
11
|
+
}
|
|
12
|
+
export declare function UserFormDialog({ open, onOpenChange, user }: UserFormDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default UserFormDialog;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type DataGridColumn, type DataGridProps } from '../../../components';
|
|
2
|
+
import type { UserSchema } from '@insforge/shared-schemas';
|
|
3
|
+
type UserDataGridRow = UserSchema & {
|
|
4
|
+
[key: string]: string | number | boolean | null | string[] | Record<string, unknown>;
|
|
5
|
+
};
|
|
6
|
+
export declare function createUsersColumns(customProviderLabels?: Record<string, string>): DataGridColumn<UserDataGridRow>[];
|
|
7
|
+
export type UsersDataGridProps = Omit<DataGridProps<UserDataGridRow>, 'columns' | 'selectionColumnWidth' | 'renderSelectionCell' | 'selectionHeaderLabel'>;
|
|
8
|
+
export declare function UsersDataGrid(props: UsersDataGridProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { OAuthConfigDialog } from './OAuthConfigDialog';
|
|
2
|
+
export { CustomOAuthConfigDialog } from './CustomOAuthConfigDialog';
|
|
3
|
+
export { AuthSettingsMenuDialog } from './AuthSettingsMenuDialog';
|
|
4
|
+
export { OAuthEmptyState } from './OAuthEmptyState';
|
|
5
|
+
export { default as UserFormDialog } from './UserFormDialog';
|
|
6
|
+
export { createUsersColumns, UsersDataGrid, type UsersDataGridProps } from './UsersDataGrid';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import type { OAuthProvidersSchema } from '@insforge/shared-schemas';
|
|
3
|
+
export declare enum AuthTab {
|
|
4
|
+
USERS = "users",
|
|
5
|
+
AUTH_METHODS = "auth-methods",
|
|
6
|
+
CONFIGURATION = "configuration"
|
|
7
|
+
}
|
|
8
|
+
export interface OAuthProviderInfo {
|
|
9
|
+
id: OAuthProvidersSchema;
|
|
10
|
+
name: string;
|
|
11
|
+
icon: ReactElement;
|
|
12
|
+
description: string;
|
|
13
|
+
setupUrl: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const oauthProviders: OAuthProviderInfo[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface UseAnonTokenOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useAnonToken(options?: UseAnonTokenOptions): {
|
|
5
|
+
accessToken: string | undefined;
|
|
6
|
+
message: string | undefined;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
error: Error | null;
|
|
9
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
10
|
+
accessToken: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}, Error>>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare function useAuthConfig(): {
|
|
2
|
+
config: {
|
|
3
|
+
id: string;
|
|
4
|
+
createdAt: string;
|
|
5
|
+
updatedAt: string;
|
|
6
|
+
requireEmailVerification: boolean;
|
|
7
|
+
passwordMinLength: number;
|
|
8
|
+
requireNumber: boolean;
|
|
9
|
+
requireLowercase: boolean;
|
|
10
|
+
requireUppercase: boolean;
|
|
11
|
+
requireSpecialChar: boolean;
|
|
12
|
+
verifyEmailMethod: "code" | "link";
|
|
13
|
+
resetPasswordMethod: "code" | "link";
|
|
14
|
+
allowedRedirectUrls?: string[] | null | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
isLoading: boolean;
|
|
17
|
+
isUpdating: boolean;
|
|
18
|
+
error: Error | null;
|
|
19
|
+
updateConfig: import("@tanstack/react-query").UseMutateFunction<{
|
|
20
|
+
id: string;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
requireEmailVerification: boolean;
|
|
24
|
+
passwordMinLength: number;
|
|
25
|
+
requireNumber: boolean;
|
|
26
|
+
requireLowercase: boolean;
|
|
27
|
+
requireUppercase: boolean;
|
|
28
|
+
requireSpecialChar: boolean;
|
|
29
|
+
verifyEmailMethod: "code" | "link";
|
|
30
|
+
resetPasswordMethod: "code" | "link";
|
|
31
|
+
allowedRedirectUrls?: string[] | null | undefined;
|
|
32
|
+
}, Error, {
|
|
33
|
+
requireEmailVerification?: boolean | undefined;
|
|
34
|
+
passwordMinLength?: number | undefined;
|
|
35
|
+
requireNumber?: boolean | undefined;
|
|
36
|
+
requireLowercase?: boolean | undefined;
|
|
37
|
+
requireUppercase?: boolean | undefined;
|
|
38
|
+
requireSpecialChar?: boolean | undefined;
|
|
39
|
+
verifyEmailMethod?: "code" | "link" | undefined;
|
|
40
|
+
resetPasswordMethod?: "code" | "link" | undefined;
|
|
41
|
+
allowedRedirectUrls?: string[] | null | undefined;
|
|
42
|
+
}, unknown>;
|
|
43
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
44
|
+
id: string;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
requireEmailVerification: boolean;
|
|
48
|
+
passwordMinLength: number;
|
|
49
|
+
requireNumber: boolean;
|
|
50
|
+
requireLowercase: boolean;
|
|
51
|
+
requireUppercase: boolean;
|
|
52
|
+
requireSpecialChar: boolean;
|
|
53
|
+
verifyEmailMethod: "code" | "link";
|
|
54
|
+
resetPasswordMethod: "code" | "link";
|
|
55
|
+
allowedRedirectUrls?: string[] | null | undefined;
|
|
56
|
+
}, Error>>;
|
|
57
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { UpdateCustomOAuthConfigRequest } from '@insforge/shared-schemas';
|
|
2
|
+
export declare function useCustomOAuthConfig(selectedKey?: string | null): {
|
|
3
|
+
configs: {
|
|
4
|
+
id: string;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
name: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
clientId: string;
|
|
9
|
+
key: string;
|
|
10
|
+
discoveryEndpoint: string;
|
|
11
|
+
}[];
|
|
12
|
+
configsCount: number;
|
|
13
|
+
isLoadingConfigs: boolean;
|
|
14
|
+
selectedConfig: ({
|
|
15
|
+
id: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
name: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
clientId: string;
|
|
20
|
+
key: string;
|
|
21
|
+
discoveryEndpoint: string;
|
|
22
|
+
} & {
|
|
23
|
+
clientSecret?: string;
|
|
24
|
+
}) | undefined;
|
|
25
|
+
isLoadingSelectedConfig: boolean;
|
|
26
|
+
createConfig: import("@tanstack/react-query").UseMutateFunction<{
|
|
27
|
+
id: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
name: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
clientId: string;
|
|
32
|
+
key: string;
|
|
33
|
+
discoveryEndpoint: string;
|
|
34
|
+
}, Error, {
|
|
35
|
+
name: string;
|
|
36
|
+
clientId: string;
|
|
37
|
+
key: string;
|
|
38
|
+
discoveryEndpoint: string;
|
|
39
|
+
clientSecret: string;
|
|
40
|
+
}, unknown>;
|
|
41
|
+
updateConfig: import("@tanstack/react-query").UseMutateFunction<{
|
|
42
|
+
id: string;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
name: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
clientId: string;
|
|
47
|
+
key: string;
|
|
48
|
+
discoveryEndpoint: string;
|
|
49
|
+
}, Error, {
|
|
50
|
+
key: string;
|
|
51
|
+
config: UpdateCustomOAuthConfigRequest;
|
|
52
|
+
}, unknown>;
|
|
53
|
+
deleteConfig: import("@tanstack/react-query").UseMutateFunction<{
|
|
54
|
+
success: boolean;
|
|
55
|
+
message: string;
|
|
56
|
+
}, Error, string, unknown>;
|
|
57
|
+
isCreating: boolean;
|
|
58
|
+
isUpdating: boolean;
|
|
59
|
+
isDeleting: boolean;
|
|
60
|
+
refetchConfigs: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
61
|
+
data: {
|
|
62
|
+
id: string;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
name: string;
|
|
65
|
+
updatedAt: string;
|
|
66
|
+
clientId: string;
|
|
67
|
+
key: string;
|
|
68
|
+
discoveryEndpoint: string;
|
|
69
|
+
}[];
|
|
70
|
+
count: number;
|
|
71
|
+
}, Error>>;
|
|
72
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { OAuthConfigSchema, UpdateOAuthConfigRequest, OAuthProvidersSchema } from '@insforge/shared-schemas';
|
|
2
|
+
export declare function useOAuthConfig(selectedProvider?: OAuthProvidersSchema | null): {
|
|
3
|
+
configs: {
|
|
4
|
+
provider: "google" | "github" | "discord" | "linkedin" | "facebook" | "instagram" | "tiktok" | "apple" | "x" | "spotify" | "microsoft";
|
|
5
|
+
id: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
useSharedKey: boolean;
|
|
9
|
+
redirectUri?: string | undefined;
|
|
10
|
+
clientId?: string | undefined;
|
|
11
|
+
scopes?: string[] | undefined;
|
|
12
|
+
}[];
|
|
13
|
+
configsCount: number;
|
|
14
|
+
providerConfig: ({
|
|
15
|
+
provider: "google" | "github" | "discord" | "linkedin" | "facebook" | "instagram" | "tiktok" | "apple" | "x" | "spotify" | "microsoft";
|
|
16
|
+
id: string;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
useSharedKey: boolean;
|
|
20
|
+
redirectUri?: string | undefined;
|
|
21
|
+
clientId?: string | undefined;
|
|
22
|
+
scopes?: string[] | undefined;
|
|
23
|
+
} & {
|
|
24
|
+
clientSecret?: string;
|
|
25
|
+
}) | undefined;
|
|
26
|
+
isLoadingConfigs: boolean;
|
|
27
|
+
isLoadingProvider: boolean;
|
|
28
|
+
isCreating: boolean;
|
|
29
|
+
isUpdating: boolean;
|
|
30
|
+
isDeleting: boolean;
|
|
31
|
+
configsError: Error | null;
|
|
32
|
+
providerError: Error | null;
|
|
33
|
+
createConfig: import("@tanstack/react-query").UseMutateFunction<{
|
|
34
|
+
provider: "google" | "github" | "discord" | "linkedin" | "facebook" | "instagram" | "tiktok" | "apple" | "x" | "spotify" | "microsoft";
|
|
35
|
+
id: string;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
useSharedKey: boolean;
|
|
39
|
+
redirectUri?: string | undefined;
|
|
40
|
+
clientId?: string | undefined;
|
|
41
|
+
scopes?: string[] | undefined;
|
|
42
|
+
}, Error, {
|
|
43
|
+
provider: "google" | "github" | "discord" | "linkedin" | "facebook" | "instagram" | "tiktok" | "apple" | "x" | "spotify" | "microsoft";
|
|
44
|
+
useSharedKey: boolean;
|
|
45
|
+
redirectUri?: string | undefined;
|
|
46
|
+
clientId?: string | undefined;
|
|
47
|
+
scopes?: string[] | undefined;
|
|
48
|
+
clientSecret?: string | undefined;
|
|
49
|
+
}, unknown>;
|
|
50
|
+
updateConfig: import("@tanstack/react-query").UseMutateFunction<{
|
|
51
|
+
provider: "google" | "github" | "discord" | "linkedin" | "facebook" | "instagram" | "tiktok" | "apple" | "x" | "spotify" | "microsoft";
|
|
52
|
+
id: string;
|
|
53
|
+
createdAt: string;
|
|
54
|
+
updatedAt: string;
|
|
55
|
+
useSharedKey: boolean;
|
|
56
|
+
redirectUri?: string | undefined;
|
|
57
|
+
clientId?: string | undefined;
|
|
58
|
+
scopes?: string[] | undefined;
|
|
59
|
+
}, Error, {
|
|
60
|
+
provider: string;
|
|
61
|
+
config: UpdateOAuthConfigRequest;
|
|
62
|
+
}, unknown>;
|
|
63
|
+
deleteConfig: import("@tanstack/react-query").UseMutateFunction<{
|
|
64
|
+
success: boolean;
|
|
65
|
+
message: string;
|
|
66
|
+
}, Error, string, unknown>;
|
|
67
|
+
refetchConfigs: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
68
|
+
data: {
|
|
69
|
+
provider: "google" | "github" | "discord" | "linkedin" | "facebook" | "instagram" | "tiktok" | "apple" | "x" | "spotify" | "microsoft";
|
|
70
|
+
id: string;
|
|
71
|
+
createdAt: string;
|
|
72
|
+
updatedAt: string;
|
|
73
|
+
useSharedKey: boolean;
|
|
74
|
+
redirectUri?: string | undefined;
|
|
75
|
+
clientId?: string | undefined;
|
|
76
|
+
scopes?: string[] | undefined;
|
|
77
|
+
}[];
|
|
78
|
+
count: number;
|
|
79
|
+
}, Error>>;
|
|
80
|
+
refetchProvider: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
81
|
+
provider: "google" | "github" | "discord" | "linkedin" | "facebook" | "instagram" | "tiktok" | "apple" | "x" | "spotify" | "microsoft";
|
|
82
|
+
id: string;
|
|
83
|
+
createdAt: string;
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
useSharedKey: boolean;
|
|
86
|
+
redirectUri?: string | undefined;
|
|
87
|
+
clientId?: string | undefined;
|
|
88
|
+
scopes?: string[] | undefined;
|
|
89
|
+
} & {
|
|
90
|
+
clientSecret?: string;
|
|
91
|
+
}, Error>>;
|
|
92
|
+
isProviderConfigured: (provider: OAuthProvidersSchema) => boolean;
|
|
93
|
+
getProviderConfig: (provider: OAuthProvidersSchema) => OAuthConfigSchema | undefined;
|
|
94
|
+
};
|