@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.
Files changed (300) hide show
  1. package/README.md +14 -0
  2. package/dist/app/DashboardAppShell.d.ts +7 -0
  3. package/dist/app/DashboardProviders.d.ts +9 -0
  4. package/dist/app/InsforgeDashboard.d.ts +2 -0
  5. package/dist/app/createDashboardQueryClient.d.ts +2 -0
  6. package/dist/components/CodeEditor.d.ts +12 -0
  7. package/dist/components/ConnectCTA.d.ts +6 -0
  8. package/dist/components/DataGridEmptyState.d.ts +9 -0
  9. package/dist/components/DeleteActionButton.d.ts +8 -0
  10. package/dist/components/EmptyState.d.ts +14 -0
  11. package/dist/components/ErrorState.d.ts +8 -0
  12. package/dist/components/FeatureSidebar.d.ts +47 -0
  13. package/dist/components/JsonHighlight.d.ts +7 -0
  14. package/dist/components/LoadingState.d.ts +6 -0
  15. package/dist/components/PaginationControls.d.ts +11 -0
  16. package/dist/components/PromptDialog.d.ts +10 -0
  17. package/dist/components/SelectionClearButton.d.ts +7 -0
  18. package/dist/components/Stepper.d.ts +22 -0
  19. package/dist/components/TableHeader.d.ts +20 -0
  20. package/dist/components/ThemeSelect.d.ts +1 -0
  21. package/dist/components/TypeBadge.d.ts +6 -0
  22. package/dist/components/ZoomedVideo.d.ts +7 -0
  23. package/dist/components/datagrid/DataGrid.d.ts +51 -0
  24. package/dist/components/datagrid/DefaultCellRenderer.d.ts +12 -0
  25. package/dist/components/datagrid/IdCell.d.ts +4 -0
  26. package/dist/components/datagrid/SortableHeader.d.ts +9 -0
  27. package/dist/components/datagrid/cell-editors/BooleanCellEditor.d.ts +2 -0
  28. package/dist/components/datagrid/cell-editors/DateCellEditor.d.ts +2 -0
  29. package/dist/components/datagrid/cell-editors/JsonCellEditor.d.ts +2 -0
  30. package/dist/components/datagrid/cell-editors/TextCellEditor.d.ts +2 -0
  31. package/dist/components/datagrid/cell-editors/index.d.ts +5 -0
  32. package/dist/components/datagrid/cell-editors/types.d.ts +39 -0
  33. package/dist/components/datagrid/datagridTypes.d.ts +61 -0
  34. package/dist/components/datagrid/index.d.ts +8 -0
  35. package/dist/components/index.d.ts +20 -0
  36. package/dist/components/layout/AppHeader.d.ts +1 -0
  37. package/dist/components/layout/AppSidebar.d.ts +6 -0
  38. package/dist/components/layout/Layout.d.ts +6 -0
  39. package/dist/components/layout/index.d.ts +3 -0
  40. package/dist/components/radix/Alert.d.ts +8 -0
  41. package/dist/components/radix/Avatar.d.ts +6 -0
  42. package/dist/components/radix/Card.d.ts +8 -0
  43. package/dist/components/radix/Form.d.ts +23 -0
  44. package/dist/components/radix/Label.d.ts +5 -0
  45. package/dist/components/radix/Popover.d.ts +6 -0
  46. package/dist/components/radix/ScrollArea.d.ts +5 -0
  47. package/dist/components/radix/Separator.d.ts +4 -0
  48. package/dist/components/radix/Skeleton.d.ts +2 -0
  49. package/dist/components/radix/Textarea.d.ts +3 -0
  50. package/dist/components/radix/index.d.ts +10 -0
  51. package/dist/features/ai/components/AILayout.d.ts +1 -0
  52. package/dist/features/ai/components/GatewayConfigDialog.d.ts +6 -0
  53. package/dist/features/ai/components/ModelRow.d.ts +9 -0
  54. package/dist/features/ai/components/index.d.ts +2 -0
  55. package/dist/features/ai/helpers.d.ts +36 -0
  56. package/dist/features/ai/hooks/useAIConfigs.d.ts +43 -0
  57. package/dist/features/ai/hooks/useAIGatewayConfig.d.ts +15 -0
  58. package/dist/features/ai/hooks/useAIUsage.d.ts +63 -0
  59. package/dist/features/ai/pages/AIPage.d.ts +1 -0
  60. package/dist/features/ai/services/ai.service.d.ts +44 -0
  61. package/dist/features/auth/components/AuthSettingsMenuDialog.d.ts +6 -0
  62. package/dist/features/auth/components/AuthenticationLayout.d.ts +1 -0
  63. package/dist/features/auth/components/AuthenticationSidebar.d.ts +1 -0
  64. package/dist/features/auth/components/CustomOAuthConfigDialog.d.ts +9 -0
  65. package/dist/features/auth/components/OAuthConfigDialog.d.ts +9 -0
  66. package/dist/features/auth/components/OAuthEmptyState.d.ts +1 -0
  67. package/dist/features/auth/components/SecretInput.d.ts +8 -0
  68. package/dist/features/auth/components/UserFormDialog.d.ts +13 -0
  69. package/dist/features/auth/components/UsersDataGrid.d.ts +9 -0
  70. package/dist/features/auth/components/index.d.ts +6 -0
  71. package/dist/features/auth/helpers.d.ts +15 -0
  72. package/dist/features/auth/hooks/useAnonToken.d.ts +14 -0
  73. package/dist/features/auth/hooks/useAuthConfig.d.ts +57 -0
  74. package/dist/features/auth/hooks/useCustomOAuthConfig.d.ts +72 -0
  75. package/dist/features/auth/hooks/useOAuthConfig.d.ts +94 -0
  76. package/dist/features/auth/hooks/useUsers.d.ts +92 -0
  77. package/dist/features/auth/index.d.ts +5 -0
  78. package/dist/features/auth/pages/AuthMethodsPage.d.ts +1 -0
  79. package/dist/features/auth/pages/UsersPage.d.ts +1 -0
  80. package/dist/features/auth/services/anonToken.service.d.ts +7 -0
  81. package/dist/features/auth/services/config.service.d.ts +6 -0
  82. package/dist/features/auth/services/custom-oauth-config.service.d.ts +14 -0
  83. package/dist/features/auth/services/oauth-config.service.d.ts +14 -0
  84. package/dist/features/auth/services/user.service.d.ts +21 -0
  85. package/dist/features/dashboard/components/ConnectionSuccessBanner.d.ts +1 -0
  86. package/dist/features/dashboard/components/DashboardLayout.d.ts +1 -0
  87. package/dist/features/dashboard/components/ProjectSettingsMenuDialog.d.ts +1 -0
  88. package/dist/features/dashboard/components/PromptCard.d.ts +6 -0
  89. package/dist/features/dashboard/components/PromptDialog.d.ts +8 -0
  90. package/dist/features/dashboard/components/StatsCard.d.ts +11 -0
  91. package/dist/features/dashboard/components/connect/APIKeysSection.d.ts +9 -0
  92. package/dist/features/dashboard/components/connect/CLISection.d.ts +5 -0
  93. package/dist/features/dashboard/components/connect/ConnectDialog.d.ts +1 -0
  94. package/dist/features/dashboard/components/connect/ConnectionStringSection.d.ts +5 -0
  95. package/dist/features/dashboard/components/connect/MCPSection.d.ts +10 -0
  96. package/dist/features/dashboard/components/connect/ShowPasswordButton.d.ts +7 -0
  97. package/dist/features/dashboard/components/connect/VideoDemoModal.d.ts +5 -0
  98. package/dist/features/dashboard/components/connect/constants.d.ts +2 -0
  99. package/dist/features/dashboard/components/connect/index.d.ts +8 -0
  100. package/dist/features/dashboard/components/connect/mcp/CursorDeeplinkGenerator.d.ts +7 -0
  101. package/dist/features/dashboard/components/connect/mcp/QoderDeeplinkGenerator.d.ts +7 -0
  102. package/dist/features/dashboard/components/connect/mcp/helpers.d.ts +32 -0
  103. package/dist/features/dashboard/components/connect/mcp/index.d.ts +4 -0
  104. package/dist/features/dashboard/components/index.d.ts +5 -0
  105. package/dist/features/dashboard/pages/DashboardPage.d.ts +2 -0
  106. package/dist/features/dashboard/prompts/ai-chatbot.d.ts +6 -0
  107. package/dist/features/dashboard/prompts/crm-system.d.ts +6 -0
  108. package/dist/features/dashboard/prompts/ecommerce-platform.d.ts +6 -0
  109. package/dist/features/dashboard/prompts/index.d.ts +14 -0
  110. package/dist/features/dashboard/prompts/instagram-clone.d.ts +6 -0
  111. package/dist/features/dashboard/prompts/notion-clone.d.ts +6 -0
  112. package/dist/features/dashboard/prompts/reddit-clone.d.ts +6 -0
  113. package/dist/features/database/components/ColumnTypeSelect.d.ts +10 -0
  114. package/dist/features/database/components/DatabaseDataGrid.d.ts +12 -0
  115. package/dist/features/database/components/DatabaseLayout.d.ts +1 -0
  116. package/dist/features/database/components/DatabaseSidebar.d.ts +16 -0
  117. package/dist/features/database/components/ForeignKeyCell.d.ts +10 -0
  118. package/dist/features/database/components/ForeignKeyPopover.d.ts +13 -0
  119. package/dist/features/database/components/LinkRecordDialog.d.ts +10 -0
  120. package/dist/features/database/components/RecordFormDialog.d.ts +10 -0
  121. package/dist/features/database/components/RecordFormField.d.ts +10 -0
  122. package/dist/features/database/components/SQLEditorLayout.d.ts +1 -0
  123. package/dist/features/database/components/SQLModal.d.ts +13 -0
  124. package/dist/features/database/components/TableForm.d.ts +11 -0
  125. package/dist/features/database/components/TableFormColumn.d.ts +13 -0
  126. package/dist/features/database/components/TablesEmptyState.d.ts +8 -0
  127. package/dist/features/database/components/TemplateCard.d.ts +8 -0
  128. package/dist/features/database/components/TemplatePreview.d.ts +7 -0
  129. package/dist/features/database/constants.d.ts +15 -0
  130. package/dist/features/database/contexts/SQLEditorContext.d.ts +22 -0
  131. package/dist/features/database/helpers.d.ts +9 -0
  132. package/dist/features/database/hooks/useCSVImport.d.ts +19 -0
  133. package/dist/features/database/hooks/useDatabase.d.ts +90 -0
  134. package/dist/features/database/hooks/useRawSQL.d.ts +43 -0
  135. package/dist/features/database/hooks/useRecords.d.ts +39 -0
  136. package/dist/features/database/hooks/useTableColumnWidthsPreference.d.ts +5 -0
  137. package/dist/features/database/hooks/useTables.d.ts +72 -0
  138. package/dist/features/database/index.d.ts +2 -0
  139. package/dist/features/database/pages/FunctionsPage.d.ts +1 -0
  140. package/dist/features/database/pages/IndexesPage.d.ts +1 -0
  141. package/dist/features/database/pages/PoliciesPage.d.ts +1 -0
  142. package/dist/features/database/pages/SQLEditorPage.d.ts +1 -0
  143. package/dist/features/database/pages/TablesPage.d.ts +1 -0
  144. package/dist/features/database/pages/TemplatesPage.d.ts +1 -0
  145. package/dist/features/database/pages/TriggersPage.d.ts +1 -0
  146. package/dist/features/database/schema.d.ts +185 -0
  147. package/dist/features/database/services/advance.service.d.ts +13 -0
  148. package/dist/features/database/services/database.service.d.ts +24 -0
  149. package/dist/features/database/services/record.service.d.ts +57 -0
  150. package/dist/features/database/services/table.service.d.ts +9 -0
  151. package/dist/features/database/templates/ai-chatbot.d.ts +2 -0
  152. package/dist/features/database/templates/crm-system.d.ts +2 -0
  153. package/dist/features/database/templates/ecommerce-platform.d.ts +2 -0
  154. package/dist/features/database/templates/index.d.ts +17 -0
  155. package/dist/features/database/templates/instagram-clone.d.ts +2 -0
  156. package/dist/features/database/templates/notion-clone.d.ts +2 -0
  157. package/dist/features/database/templates/reddit-clone.d.ts +2 -0
  158. package/dist/features/deployments/components/DeploymentMetaDataDialog.d.ts +7 -0
  159. package/dist/features/deployments/components/DeploymentsEmptyState.d.ts +1 -0
  160. package/dist/features/deployments/components/DeploymentsLayout.d.ts +1 -0
  161. package/dist/features/deployments/components/DeploymentsSidebar.d.ts +1 -0
  162. package/dist/features/deployments/components/EnvVarDialog.d.ts +14 -0
  163. package/dist/features/deployments/components/EnvVarRow.d.ts +9 -0
  164. package/dist/features/deployments/components/EnvVarsEmptyState.d.ts +1 -0
  165. package/dist/features/deployments/helpers.d.ts +14 -0
  166. package/dist/features/deployments/hooks/useCustomDomains.d.ts +68 -0
  167. package/dist/features/deployments/hooks/useDeploymentEnvVars.d.ts +32 -0
  168. package/dist/features/deployments/hooks/useDeploymentMetadata.d.ts +13 -0
  169. package/dist/features/deployments/hooks/useDeploymentSlug.d.ts +9 -0
  170. package/dist/features/deployments/hooks/useDeployments.d.ts +85 -0
  171. package/dist/features/deployments/pages/DeploymentDomainsPage.d.ts +6 -0
  172. package/dist/features/deployments/pages/DeploymentEnvVarsPage.d.ts +1 -0
  173. package/dist/features/deployments/pages/DeploymentLogsPage.d.ts +1 -0
  174. package/dist/features/deployments/pages/DeploymentOverviewPage.d.ts +1 -0
  175. package/dist/features/deployments/services/deployments.service.d.ts +36 -0
  176. package/dist/features/functions/components/FunctionEmptyState.d.ts +1 -0
  177. package/dist/features/functions/components/FunctionRow.d.ts +9 -0
  178. package/dist/features/functions/components/FunctionsLayout.d.ts +1 -0
  179. package/dist/features/functions/components/FunctionsSidebar.d.ts +1 -0
  180. package/dist/features/functions/components/ScheduleEmptyState.d.ts +1 -0
  181. package/dist/features/functions/components/ScheduleFormDialog.d.ts +11 -0
  182. package/dist/features/functions/components/ScheduleLogs.d.ts +5 -0
  183. package/dist/features/functions/components/ScheduleRow.d.ts +12 -0
  184. package/dist/features/functions/components/SecretEmptyState.d.ts +5 -0
  185. package/dist/features/functions/components/SecretRow.d.ts +8 -0
  186. package/dist/features/functions/helpers.d.ts +5 -0
  187. package/dist/features/functions/hooks/useFunctions.d.ts +75 -0
  188. package/dist/features/functions/hooks/useSchedules.d.ts +90 -0
  189. package/dist/features/functions/hooks/useSecrets.d.ts +62 -0
  190. package/dist/features/functions/pages/FunctionsPage.d.ts +1 -0
  191. package/dist/features/functions/pages/SchedulesPage.d.ts +1 -0
  192. package/dist/features/functions/pages/SecretsPage.d.ts +1 -0
  193. package/dist/features/functions/services/function.service.d.ts +8 -0
  194. package/dist/features/functions/services/schedule.service.d.ts +10 -0
  195. package/dist/features/functions/services/secret.service.d.ts +8 -0
  196. package/dist/features/functions/types.d.ts +2 -0
  197. package/dist/features/login/pages/CloudLoginPage.d.ts +1 -0
  198. package/dist/features/login/pages/LoginPage.d.ts +1 -0
  199. package/dist/features/login/services/login.service.d.ts +16 -0
  200. package/dist/features/login/services/partnership.service.d.ts +18 -0
  201. package/dist/features/logs/components/BuildLogsView.d.ts +5 -0
  202. package/dist/features/logs/components/FunctionLogsTabs.d.ts +12 -0
  203. package/dist/features/logs/components/LogDetailPanel.d.ts +7 -0
  204. package/dist/features/logs/components/LogsDataGrid.d.ts +21 -0
  205. package/dist/features/logs/components/LogsLayout.d.ts +1 -0
  206. package/dist/features/logs/components/LogsSidebar.d.ts +1 -0
  207. package/dist/features/logs/components/SeverityBadge.d.ts +6 -0
  208. package/dist/features/logs/components/SeverityFilterDropdown.d.ts +6 -0
  209. package/dist/features/logs/components/index.d.ts +7 -0
  210. package/dist/features/logs/helpers.d.ts +38 -0
  211. package/dist/features/logs/hooks/useAuditLogs.d.ts +38 -0
  212. package/dist/features/logs/hooks/useLogSources.d.ts +41 -0
  213. package/dist/features/logs/hooks/useLogs.d.ts +51 -0
  214. package/dist/features/logs/hooks/useMcpUsage.d.ts +35 -0
  215. package/dist/features/logs/pages/AuditsPage.d.ts +1 -0
  216. package/dist/features/logs/pages/FunctionLogsPage.d.ts +1 -0
  217. package/dist/features/logs/pages/LogsPage.d.ts +1 -0
  218. package/dist/features/logs/pages/MCPLogsPage.d.ts +1 -0
  219. package/dist/features/logs/services/audit.service.d.ts +7 -0
  220. package/dist/features/logs/services/log.service.d.ts +22 -0
  221. package/dist/features/logs/services/usage.service.d.ts +16 -0
  222. package/dist/features/realtime/components/ChannelFormDialog.d.ts +13 -0
  223. package/dist/features/realtime/components/ChannelRow.d.ts +12 -0
  224. package/dist/features/realtime/components/MessageRow.d.ts +7 -0
  225. package/dist/features/realtime/components/RealtimeEmptyState.d.ts +6 -0
  226. package/dist/features/realtime/components/RealtimeLayout.d.ts +1 -0
  227. package/dist/features/realtime/components/RealtimeSettingsMenuDialog.d.ts +6 -0
  228. package/dist/features/realtime/components/RealtimeSidebar.d.ts +1 -0
  229. package/dist/features/realtime/hooks/useRealtimeChannels.d.ts +66 -0
  230. package/dist/features/realtime/hooks/useRealtimeConfig.d.ts +14 -0
  231. package/dist/features/realtime/hooks/useRealtimeMessages.d.ts +64 -0
  232. package/dist/features/realtime/hooks/useRealtimePermissions.d.ts +48 -0
  233. package/dist/features/realtime/pages/RealtimeChannelsPage.d.ts +1 -0
  234. package/dist/features/realtime/pages/RealtimeMessagesPage.d.ts +1 -0
  235. package/dist/features/realtime/pages/RealtimePermissionsPage.d.ts +1 -0
  236. package/dist/features/realtime/services/realtime.service.d.ts +15 -0
  237. package/dist/features/storage/components/BucketFormDialog.d.ts +10 -0
  238. package/dist/features/storage/components/FilePreviewDialog.d.ts +9 -0
  239. package/dist/features/storage/components/StorageDataGrid.d.ts +14 -0
  240. package/dist/features/storage/components/StorageLayout.d.ts +1 -0
  241. package/dist/features/storage/components/StorageSettingsMenuDialog.d.ts +8 -0
  242. package/dist/features/storage/components/StorageSidebar.d.ts +13 -0
  243. package/dist/features/storage/components/UploadToast.d.ts +9 -0
  244. package/dist/features/storage/hooks/useStorage.d.ts +77 -0
  245. package/dist/features/storage/hooks/useStorageConfig.d.ts +29 -0
  246. package/dist/features/storage/pages/BucketsPage.d.ts +1 -0
  247. package/dist/features/storage/services/storage-config.service.d.ts +9 -0
  248. package/dist/features/storage/services/storage.service.d.ts +26 -0
  249. package/dist/features/visualizer/components/AuthNode.d.ts +11 -0
  250. package/dist/features/visualizer/components/BucketNode.d.ts +8 -0
  251. package/dist/features/visualizer/components/SchemaVisualizer.d.ts +18 -0
  252. package/dist/features/visualizer/components/TableNode.d.ts +10 -0
  253. package/dist/features/visualizer/components/VisualizerLayout.d.ts +1 -0
  254. package/dist/features/visualizer/components/VisualizerSkeleton.d.ts +1 -0
  255. package/dist/features/visualizer/components/index.d.ts +5 -0
  256. package/dist/features/visualizer/pages/VisualizerPage.d.ts +2 -0
  257. package/dist/index.d.ts +19 -0
  258. package/dist/index.js +83413 -0
  259. package/dist/layout/DashboardFrame.d.ts +15 -0
  260. package/dist/layout/DashboardOutletLayout.d.ts +1 -0
  261. package/dist/layout/DashboardSectionLayout.d.ts +7 -0
  262. package/dist/lib/analytics/posthog.d.ts +5 -0
  263. package/dist/lib/api/client.d.ts +20 -0
  264. package/dist/lib/config/DashboardHostContext.d.ts +3 -0
  265. package/dist/lib/config/runtime.d.ts +3 -0
  266. package/dist/lib/contexts/AuthContext.d.ts +18 -0
  267. package/dist/lib/contexts/ModalContext.d.ts +2 -0
  268. package/dist/lib/contexts/SocketContext.d.ts +42 -0
  269. package/dist/lib/contexts/ThemeContext.d.ts +17 -0
  270. package/dist/lib/hooks/useCloudProjectInfo.d.ts +19 -0
  271. package/dist/lib/hooks/useConfirm.d.ts +21 -0
  272. package/dist/lib/hooks/useHealth.d.ts +13 -0
  273. package/dist/lib/hooks/useInterval.d.ts +1 -0
  274. package/dist/lib/hooks/useMediaQuery.d.ts +6 -0
  275. package/dist/lib/hooks/useMetadata.d.ts +239 -0
  276. package/dist/lib/hooks/useModal.d.ts +1 -0
  277. package/dist/lib/hooks/usePageSize.d.ts +5 -0
  278. package/dist/lib/hooks/useTimeout.d.ts +1 -0
  279. package/dist/lib/hooks/useToast.d.ts +20 -0
  280. package/dist/lib/routing/AppRoutes.d.ts +1 -0
  281. package/dist/lib/routing/RequireAuth.d.ts +6 -0
  282. package/dist/lib/services/health.service.d.ts +8 -0
  283. package/dist/lib/services/metadata.service.d.ts +16 -0
  284. package/dist/lib/utils/__tests__/utils.test.d.ts +1 -0
  285. package/dist/lib/utils/cloudMessaging.d.ts +13 -0
  286. package/dist/lib/utils/constants.d.ts +17 -0
  287. package/dist/lib/utils/local-storage.d.ts +5 -0
  288. package/dist/lib/utils/menuItems.d.ts +22 -0
  289. package/dist/lib/utils/schemaValidations.d.ts +21 -0
  290. package/dist/lib/utils/utils.d.ts +46 -0
  291. package/dist/modals/DashboardModalContext.d.ts +16 -0
  292. package/dist/navigation/menuItems.d.ts +13 -0
  293. package/dist/router/DashboardHostRoutes.d.ts +7 -0
  294. package/dist/router/DashboardProtectedBoundary.d.ts +9 -0
  295. package/dist/router/DashboardRouter.d.ts +1 -0
  296. package/dist/router/index.d.ts +3 -0
  297. package/dist/router/paths.d.ts +5 -0
  298. package/dist/styles.css +1 -0
  299. package/dist/types/index.d.ts +80 -0
  300. package/package.json +78 -0
@@ -0,0 +1,22 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SQLTab {
3
+ id: string;
4
+ name: string;
5
+ query: string;
6
+ }
7
+ interface SQLEditorContextType {
8
+ tabs: SQLTab[];
9
+ activeTabId: string;
10
+ activeTab: SQLTab | undefined;
11
+ addTab: (initialQuery?: string, initialName?: string) => void;
12
+ removeTab: (tabId: string) => void;
13
+ setActiveTab: (tabId: string) => void;
14
+ updateTabQuery: (tabId: string, query: string) => void;
15
+ updateTabName: (tabId: string, name: string) => void;
16
+ }
17
+ interface SQLEditorProviderProps {
18
+ children: ReactNode;
19
+ }
20
+ export declare function SQLEditorProvider({ children }: SQLEditorProviderProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function useSQLEditorContext(): SQLEditorContextType;
22
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ColumnSchema } from '@insforge/shared-schemas';
2
+ import { z } from 'zod';
3
+ export declare const SYSTEM_FIELDS: string[];
4
+ export declare function buildDynamicSchema(columns: ColumnSchema[]): z.ZodObject<Record<string, z.ZodTypeAny>, "strip", z.ZodTypeAny, {
5
+ [x: string]: any;
6
+ }, {
7
+ [x: string]: any;
8
+ }>;
9
+ export declare function getInitialValues(columns: ColumnSchema[]): Record<string, unknown>;
@@ -0,0 +1,19 @@
1
+ import { BulkUpsertResponse } from '@insforge/shared-schemas';
2
+ interface UseCSVImportOptions {
3
+ onSuccess?: (data: BulkUpsertResponse) => void;
4
+ onError?: (error: Error) => void;
5
+ }
6
+ export declare function useCSVImport(tableName: string, options?: UseCSVImportOptions): {
7
+ mutate: import("@tanstack/react-query").UseMutateFunction<{
8
+ message: string;
9
+ filename: string;
10
+ success: boolean;
11
+ table: string;
12
+ rowsAffected: number;
13
+ totalRecords: number;
14
+ }, Error, File, unknown>;
15
+ reset: () => void;
16
+ isPending: boolean;
17
+ error: Error | null;
18
+ };
19
+ export {};
@@ -0,0 +1,90 @@
1
+ export declare function useFunctions(enabled?: boolean): {
2
+ data: {
3
+ functions: {
4
+ functionName: string;
5
+ functionDef: string;
6
+ kind: string;
7
+ }[];
8
+ } | undefined;
9
+ isLoading: boolean;
10
+ error: Error | null;
11
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
12
+ functions: {
13
+ functionName: string;
14
+ functionDef: string;
15
+ kind: string;
16
+ }[];
17
+ }, Error>>;
18
+ };
19
+ export declare function useIndexes(enabled?: boolean): {
20
+ data: {
21
+ indexes: {
22
+ isUnique: boolean | null;
23
+ tableName: string;
24
+ indexName: string;
25
+ indexDef: string;
26
+ isPrimary: boolean | null;
27
+ }[];
28
+ } | undefined;
29
+ isLoading: boolean;
30
+ error: Error | null;
31
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
32
+ indexes: {
33
+ isUnique: boolean | null;
34
+ tableName: string;
35
+ indexName: string;
36
+ indexDef: string;
37
+ isPrimary: boolean | null;
38
+ }[];
39
+ }, Error>>;
40
+ };
41
+ export declare function usePolicies(enabled?: boolean): {
42
+ data: {
43
+ policies: {
44
+ tableName: string;
45
+ policyName: string;
46
+ cmd: string;
47
+ roles: string[];
48
+ qual: string | null;
49
+ withCheck: string | null;
50
+ }[];
51
+ } | undefined;
52
+ isLoading: boolean;
53
+ error: Error | null;
54
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
55
+ policies: {
56
+ tableName: string;
57
+ policyName: string;
58
+ cmd: string;
59
+ roles: string[];
60
+ qual: string | null;
61
+ withCheck: string | null;
62
+ }[];
63
+ }, Error>>;
64
+ };
65
+ export declare function useTriggers(enabled?: boolean): {
66
+ data: {
67
+ triggers: {
68
+ tableName: string;
69
+ triggerName: string;
70
+ actionTiming: string;
71
+ eventManipulation: string;
72
+ actionOrientation: string;
73
+ actionCondition: string | null;
74
+ actionStatement: string;
75
+ }[];
76
+ } | undefined;
77
+ isLoading: boolean;
78
+ error: Error | null;
79
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
80
+ triggers: {
81
+ tableName: string;
82
+ triggerName: string;
83
+ actionTiming: string;
84
+ eventManipulation: string;
85
+ actionOrientation: string;
86
+ actionCondition: string | null;
87
+ actionStatement: string;
88
+ }[];
89
+ }, Error>>;
90
+ };
@@ -0,0 +1,43 @@
1
+ import { RawSQLResponse } from '@insforge/shared-schemas';
2
+ interface UseRawSQLOptions {
3
+ onSuccess?: (data: RawSQLResponse) => void;
4
+ onError?: (error: Error) => void;
5
+ showSuccessToast?: boolean;
6
+ showErrorToast?: boolean;
7
+ }
8
+ interface RawSQLParams {
9
+ query: string;
10
+ params?: unknown[];
11
+ }
12
+ export declare function useRawSQL(options?: UseRawSQLOptions): {
13
+ executeSQL: import("@tanstack/react-query").UseMutateFunction<{
14
+ rows: Record<string, unknown>[];
15
+ rowCount: number | null;
16
+ fields?: {
17
+ name: string;
18
+ dataTypeID: number;
19
+ }[] | undefined;
20
+ }, Error, RawSQLParams, unknown>;
21
+ executeSQLAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
22
+ rows: Record<string, unknown>[];
23
+ rowCount: number | null;
24
+ fields?: {
25
+ name: string;
26
+ dataTypeID: number;
27
+ }[] | undefined;
28
+ }, Error, RawSQLParams, unknown>;
29
+ reset: () => void;
30
+ isPending: boolean;
31
+ isSuccess: boolean;
32
+ isError: boolean;
33
+ error: Error | null;
34
+ data: {
35
+ rows: Record<string, unknown>[];
36
+ rowCount: number | null;
37
+ fields?: {
38
+ name: string;
39
+ dataTypeID: number;
40
+ }[] | undefined;
41
+ } | undefined;
42
+ };
43
+ export {};
@@ -0,0 +1,39 @@
1
+ import { ConvertedValue } from '../../../components/datagrid/datagridTypes';
2
+ export declare function useRecords(tableName: string): {
3
+ useTableRecords: (limit?: number, offset?: number, searchQuery?: string, sortColumns?: {
4
+ columnKey: string;
5
+ direction: string;
6
+ }[], enabled?: boolean) => import("@tanstack/react-query").UseQueryResult<{
7
+ records: {
8
+ [key: string]: ConvertedValue;
9
+ }[];
10
+ pagination: {
11
+ offset: number;
12
+ limit: number;
13
+ total: number;
14
+ };
15
+ }, Error>;
16
+ useRecordsWithQuery: (queryParams?: string, enabled?: boolean) => import("@tanstack/react-query").UseQueryResult<{
17
+ records: any;
18
+ total: any;
19
+ }, Error>;
20
+ useRecordByForeignKey: (columnName: string, value: string, enabled?: boolean) => import("@tanstack/react-query").UseQueryResult<any, Error>;
21
+ isCreating: boolean;
22
+ isCreatingMultiple: boolean;
23
+ isUpdating: boolean;
24
+ isDeleting: boolean;
25
+ createRecord: import("@tanstack/react-query").UseMutateAsyncFunction<any, Error, {
26
+ [key: string]: ConvertedValue;
27
+ }, unknown>;
28
+ updateRecord: import("@tanstack/react-query").UseMutateAsyncFunction<any, Error, {
29
+ pkColumn: string;
30
+ pkValue: string;
31
+ data: {
32
+ [key: string]: ConvertedValue;
33
+ };
34
+ }, unknown>;
35
+ deleteRecords: import("@tanstack/react-query").UseMutateAsyncFunction<any, Error, {
36
+ pkColumn: string;
37
+ pkValues: string[];
38
+ }, unknown>;
39
+ };
@@ -0,0 +1,5 @@
1
+ export type TableColumnWidths = Record<string, number>;
2
+ export declare function useTableColumnWidthsPreference(tableName: string | null, availableColumns?: string[]): {
3
+ columnWidths: TableColumnWidths;
4
+ setColumnWidth: (columnKey: string, width: number) => void;
5
+ };
@@ -0,0 +1,72 @@
1
+ import { ColumnSchema, UpdateTableSchemaRequest } from '@insforge/shared-schemas';
2
+ export declare function useTables(): {
3
+ tables: string[];
4
+ tablesCount: number;
5
+ isLoadingTables: boolean;
6
+ isCreating: boolean;
7
+ isDeleting: boolean;
8
+ isUpdating: boolean;
9
+ tablesError: Error | null;
10
+ createTable: import("@tanstack/react-query").UseMutateFunction<any, Error, {
11
+ tableName: string;
12
+ columns: ColumnSchema[];
13
+ }, unknown>;
14
+ deleteTable: import("@tanstack/react-query").UseMutateFunction<any, Error, string, unknown>;
15
+ updateTableSchema: import("@tanstack/react-query").UseMutateFunction<void | {
16
+ message: string;
17
+ tableName: string;
18
+ operations: string[];
19
+ }, Error, {
20
+ tableName: string;
21
+ operations: UpdateTableSchemaRequest;
22
+ }, unknown>;
23
+ refetchTables: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<string[], Error>>;
24
+ useTableSchema: (tableName: string, enabled?: boolean) => import("@tanstack/react-query").UseQueryResult<{
25
+ tableName: string;
26
+ columns: {
27
+ type: string;
28
+ columnName: string;
29
+ isNullable: boolean;
30
+ isUnique: boolean;
31
+ defaultValue?: string | undefined;
32
+ isPrimaryKey?: boolean | undefined;
33
+ foreignKey?: {
34
+ referenceTable: string;
35
+ referenceColumn: string;
36
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
37
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
38
+ } | undefined;
39
+ }[];
40
+ createdAt?: string | undefined;
41
+ updatedAt?: string | undefined;
42
+ recordCount?: number | undefined;
43
+ }, Error>;
44
+ };
45
+ /**
46
+ * Hook to fetch all table schemas on demand.
47
+ * Use this only when you need ALL schemas (e.g., for visualizations).
48
+ * For individual tables, use useTables().useTableSchema() instead.
49
+ */
50
+ export declare function useAllTableSchemas(enabled?: boolean): {
51
+ allSchemas: {
52
+ tableName: string;
53
+ columns: {
54
+ type: string;
55
+ columnName: string;
56
+ isNullable: boolean;
57
+ isUnique: boolean;
58
+ defaultValue?: string | undefined;
59
+ isPrimaryKey?: boolean | undefined;
60
+ foreignKey?: {
61
+ referenceTable: string;
62
+ referenceColumn: string;
63
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
64
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
65
+ } | undefined;
66
+ }[];
67
+ createdAt?: string | undefined;
68
+ updatedAt?: string | undefined;
69
+ recordCount?: number | undefined;
70
+ }[];
71
+ isLoading: boolean;
72
+ };
@@ -0,0 +1,2 @@
1
+ export { SQLModal, SQLCellButton } from './components/SQLModal';
2
+ export { buildDynamicSchema, getInitialValues } from './helpers';
@@ -0,0 +1 @@
1
+ export default function FunctionsPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function IndexesPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function PoliciesPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function SQLEditorPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function TablesPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function TemplatesPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function TriggersPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,185 @@
1
+ import { z } from 'zod';
2
+ export declare const tableFormForeignKeySchema: z.ZodObject<{
3
+ referenceTable: z.ZodString;
4
+ referenceColumn: z.ZodString;
5
+ onDelete: z.ZodEnum<["CASCADE", "SET NULL", "SET DEFAULT", "RESTRICT", "NO ACTION"]>;
6
+ onUpdate: z.ZodEnum<["CASCADE", "RESTRICT", "NO ACTION"]>;
7
+ } & {
8
+ columnName: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
11
+ referenceTable: string;
12
+ referenceColumn: string;
13
+ columnName: string;
14
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
15
+ }, {
16
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
17
+ referenceTable: string;
18
+ referenceColumn: string;
19
+ columnName: string;
20
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
21
+ }>;
22
+ export declare const tableFormColumnSchema: z.ZodObject<{
23
+ columnName: z.ZodString;
24
+ type: z.ZodUnion<[z.ZodEnum<[import("@insforge/shared-schemas").ColumnType.STRING, import("@insforge/shared-schemas").ColumnType.DATE, import("@insforge/shared-schemas").ColumnType.DATETIME, import("@insforge/shared-schemas").ColumnType.INTEGER, import("@insforge/shared-schemas").ColumnType.FLOAT, import("@insforge/shared-schemas").ColumnType.BOOLEAN, import("@insforge/shared-schemas").ColumnType.UUID, import("@insforge/shared-schemas").ColumnType.JSON]>, z.ZodString]>;
25
+ defaultValue: z.ZodOptional<z.ZodString>;
26
+ isPrimaryKey: z.ZodOptional<z.ZodBoolean>;
27
+ isNullable: z.ZodBoolean;
28
+ isUnique: z.ZodBoolean;
29
+ foreignKey: z.ZodOptional<z.ZodObject<{
30
+ referenceTable: z.ZodString;
31
+ referenceColumn: z.ZodString;
32
+ onDelete: z.ZodEnum<["CASCADE", "SET NULL", "SET DEFAULT", "RESTRICT", "NO ACTION"]>;
33
+ onUpdate: z.ZodEnum<["CASCADE", "RESTRICT", "NO ACTION"]>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ referenceTable: string;
36
+ referenceColumn: string;
37
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
38
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
39
+ }, {
40
+ referenceTable: string;
41
+ referenceColumn: string;
42
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
43
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
44
+ }>>;
45
+ } & {
46
+ originalName: z.ZodOptional<z.ZodString>;
47
+ isSystemColumn: z.ZodBoolean;
48
+ isNewColumn: z.ZodBoolean;
49
+ }, "strip", z.ZodTypeAny, {
50
+ type: string;
51
+ columnName: string;
52
+ isSystemColumn: boolean;
53
+ isNewColumn: boolean;
54
+ isNullable: boolean;
55
+ isUnique: boolean;
56
+ defaultValue?: string | undefined;
57
+ foreignKey?: {
58
+ referenceTable: string;
59
+ referenceColumn: string;
60
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
61
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
62
+ } | undefined;
63
+ originalName?: string | undefined;
64
+ isPrimaryKey?: boolean | undefined;
65
+ }, {
66
+ type: string;
67
+ columnName: string;
68
+ isSystemColumn: boolean;
69
+ isNewColumn: boolean;
70
+ isNullable: boolean;
71
+ isUnique: boolean;
72
+ defaultValue?: string | undefined;
73
+ foreignKey?: {
74
+ referenceTable: string;
75
+ referenceColumn: string;
76
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
77
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
78
+ } | undefined;
79
+ originalName?: string | undefined;
80
+ isPrimaryKey?: boolean | undefined;
81
+ }>;
82
+ export declare const tableFormSchema: z.ZodObject<{
83
+ tableName: z.ZodString;
84
+ columns: z.ZodArray<z.ZodObject<{
85
+ columnName: z.ZodString;
86
+ type: z.ZodUnion<[z.ZodEnum<[import("@insforge/shared-schemas").ColumnType.STRING, import("@insforge/shared-schemas").ColumnType.DATE, import("@insforge/shared-schemas").ColumnType.DATETIME, import("@insforge/shared-schemas").ColumnType.INTEGER, import("@insforge/shared-schemas").ColumnType.FLOAT, import("@insforge/shared-schemas").ColumnType.BOOLEAN, import("@insforge/shared-schemas").ColumnType.UUID, import("@insforge/shared-schemas").ColumnType.JSON]>, z.ZodString]>;
87
+ defaultValue: z.ZodOptional<z.ZodString>;
88
+ isPrimaryKey: z.ZodOptional<z.ZodBoolean>;
89
+ isNullable: z.ZodBoolean;
90
+ isUnique: z.ZodBoolean;
91
+ foreignKey: z.ZodOptional<z.ZodObject<{
92
+ referenceTable: z.ZodString;
93
+ referenceColumn: z.ZodString;
94
+ onDelete: z.ZodEnum<["CASCADE", "SET NULL", "SET DEFAULT", "RESTRICT", "NO ACTION"]>;
95
+ onUpdate: z.ZodEnum<["CASCADE", "RESTRICT", "NO ACTION"]>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ referenceTable: string;
98
+ referenceColumn: string;
99
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
100
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
101
+ }, {
102
+ referenceTable: string;
103
+ referenceColumn: string;
104
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
105
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
106
+ }>>;
107
+ } & {
108
+ originalName: z.ZodOptional<z.ZodString>;
109
+ isSystemColumn: z.ZodBoolean;
110
+ isNewColumn: z.ZodBoolean;
111
+ }, "strip", z.ZodTypeAny, {
112
+ type: string;
113
+ columnName: string;
114
+ isSystemColumn: boolean;
115
+ isNewColumn: boolean;
116
+ isNullable: boolean;
117
+ isUnique: boolean;
118
+ defaultValue?: string | undefined;
119
+ foreignKey?: {
120
+ referenceTable: string;
121
+ referenceColumn: string;
122
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
123
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
124
+ } | undefined;
125
+ originalName?: string | undefined;
126
+ isPrimaryKey?: boolean | undefined;
127
+ }, {
128
+ type: string;
129
+ columnName: string;
130
+ isSystemColumn: boolean;
131
+ isNewColumn: boolean;
132
+ isNullable: boolean;
133
+ isUnique: boolean;
134
+ defaultValue?: string | undefined;
135
+ foreignKey?: {
136
+ referenceTable: string;
137
+ referenceColumn: string;
138
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
139
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
140
+ } | undefined;
141
+ originalName?: string | undefined;
142
+ isPrimaryKey?: boolean | undefined;
143
+ }>, "many">;
144
+ }, "strip", z.ZodTypeAny, {
145
+ columns: {
146
+ type: string;
147
+ columnName: string;
148
+ isSystemColumn: boolean;
149
+ isNewColumn: boolean;
150
+ isNullable: boolean;
151
+ isUnique: boolean;
152
+ defaultValue?: string | undefined;
153
+ foreignKey?: {
154
+ referenceTable: string;
155
+ referenceColumn: string;
156
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
157
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
158
+ } | undefined;
159
+ originalName?: string | undefined;
160
+ isPrimaryKey?: boolean | undefined;
161
+ }[];
162
+ tableName: string;
163
+ }, {
164
+ columns: {
165
+ type: string;
166
+ columnName: string;
167
+ isSystemColumn: boolean;
168
+ isNewColumn: boolean;
169
+ isNullable: boolean;
170
+ isUnique: boolean;
171
+ defaultValue?: string | undefined;
172
+ foreignKey?: {
173
+ referenceTable: string;
174
+ referenceColumn: string;
175
+ onDelete: "CASCADE" | "RESTRICT" | "NO ACTION" | "SET NULL" | "SET DEFAULT";
176
+ onUpdate: "CASCADE" | "RESTRICT" | "NO ACTION";
177
+ } | undefined;
178
+ originalName?: string | undefined;
179
+ isPrimaryKey?: boolean | undefined;
180
+ }[];
181
+ tableName: string;
182
+ }>;
183
+ export type TableFormForeignKeySchema = z.infer<typeof tableFormForeignKeySchema>;
184
+ export type TableFormColumnSchema = z.infer<typeof tableFormColumnSchema>;
185
+ export type TableFormSchema = z.infer<typeof tableFormSchema>;
@@ -0,0 +1,13 @@
1
+ import { RawSQLResponse } from '@insforge/shared-schemas';
2
+ export declare class AdvanceService {
3
+ /**
4
+ * Execute raw SQL query with strict sanitization.
5
+ * Requires admin privileges.
6
+ *
7
+ * @param query - SQL query to execute
8
+ * @param params - Optional query parameters
9
+ * @returns Response with query results
10
+ */
11
+ runRawSQL(query: string, params?: unknown[]): Promise<RawSQLResponse>;
12
+ }
13
+ export declare const advanceService: AdvanceService;
@@ -0,0 +1,24 @@
1
+ import type { DatabaseFunctionsResponse, DatabaseIndexesResponse, DatabasePoliciesResponse, DatabaseTriggersResponse } from '@insforge/shared-schemas';
2
+ export declare class DatabaseService {
3
+ /**
4
+ * Get all database functions.
5
+ * Requires admin privileges.
6
+ */
7
+ getFunctions(): Promise<DatabaseFunctionsResponse>;
8
+ /**
9
+ * Get all database indexes.
10
+ * Requires admin privileges.
11
+ */
12
+ getIndexes(): Promise<DatabaseIndexesResponse>;
13
+ /**
14
+ * Get all RLS policies.
15
+ * Requires admin privileges.
16
+ */
17
+ getPolicies(): Promise<DatabasePoliciesResponse>;
18
+ /**
19
+ * Get all database triggers.
20
+ * Requires admin privileges.
21
+ */
22
+ getTriggers(): Promise<DatabaseTriggersResponse>;
23
+ }
24
+ export declare const databaseService: DatabaseService;
@@ -0,0 +1,57 @@
1
+ import { ConvertedValue } from '../../../components/datagrid/datagridTypes';
2
+ import { BulkUpsertResponse } from '@insforge/shared-schemas';
3
+ export declare class RecordService {
4
+ /**
5
+ * Data fetching method with built-in search, sorting, and pagination for UI components.
6
+ *
7
+ * @param tableName - Name of the table
8
+ * @param limit - Number of records to fetch
9
+ * @param offset - Number of records to skip
10
+ * @param searchQuery - Search term to filter text columns
11
+ * @param sortColumns - Sorting configuration
12
+ * @returns Structured response with records and pagination info
13
+ */
14
+ getTableRecords(tableName: string, limit?: number, offset?: number, searchQuery?: string, sortColumns?: {
15
+ columnKey: string;
16
+ direction: string;
17
+ }[]): Promise<{
18
+ records: {
19
+ [key: string]: ConvertedValue;
20
+ }[];
21
+ pagination: {
22
+ offset: number;
23
+ limit: number;
24
+ total: number;
25
+ };
26
+ }>;
27
+ /**
28
+ * Get a single record by foreign key value.
29
+ * Specifically designed for foreign key lookups.
30
+ *
31
+ * @param tableName - Name of the table to search in
32
+ * @param columnName - Name of the column to filter by
33
+ * @param value - Value to match
34
+ * @returns Single record or null if not found
35
+ */
36
+ getRecordByForeignKeyValue(tableName: string, columnName: string, value: string): Promise<any>;
37
+ getRecords(tableName: string, queryParams?: string): Promise<{
38
+ records: any;
39
+ total: any;
40
+ }>;
41
+ createRecords(table: string, records: {
42
+ [key: string]: ConvertedValue;
43
+ }[]): Promise<any>;
44
+ createRecord(table: string, data: {
45
+ [key: string]: ConvertedValue;
46
+ }): Promise<any>;
47
+ updateRecord(table: string, pkColumn: string, pkValue: string, data: {
48
+ [key: string]: ConvertedValue;
49
+ }): Promise<any>;
50
+ deleteRecords(table: string, pkColumn: string, pkValues: string[]): Promise<any>;
51
+ validateCSVFile(file: File): {
52
+ valid: boolean;
53
+ error?: string;
54
+ };
55
+ importCSV(tableName: string, file: File): Promise<BulkUpsertResponse>;
56
+ }
57
+ export declare const recordService: RecordService;
@@ -0,0 +1,9 @@
1
+ import { ColumnSchema, GetTableSchemaResponse, UpdateTableSchemaResponse, UpdateTableSchemaRequest } from '@insforge/shared-schemas';
2
+ export declare class TableService {
3
+ listTables(): Promise<string[]>;
4
+ getTableSchema(tableName: string): Promise<GetTableSchemaResponse>;
5
+ createTable(tableName: string, columns: ColumnSchema[]): Promise<any>;
6
+ deleteTable(tableName: string): Promise<any>;
7
+ updateTableSchema(tableName: string, operations: UpdateTableSchemaRequest): Promise<UpdateTableSchemaResponse | void>;
8
+ }
9
+ export declare const tableService: TableService;
@@ -0,0 +1,2 @@
1
+ import { DatabaseTemplate } from './index';
2
+ export declare const aiChatbotTemplate: DatabaseTemplate;
@@ -0,0 +1,2 @@
1
+ import { DatabaseTemplate } from './index';
2
+ export declare const crmSystemTemplate: DatabaseTemplate;
@@ -0,0 +1,2 @@
1
+ import { DatabaseTemplate } from './index';
2
+ export declare const ecommercePlatformTemplate: DatabaseTemplate;
@@ -0,0 +1,17 @@
1
+ import { GetTableSchemaResponse } from '@insforge/shared-schemas';
2
+ import { crmSystemTemplate } from './crm-system';
3
+ import { aiChatbotTemplate } from './ai-chatbot';
4
+ import { ecommercePlatformTemplate } from './ecommerce-platform';
5
+ import { redditCloneTemplate } from './reddit-clone';
6
+ import { instagramCloneTemplate } from './instagram-clone';
7
+ import { notionCloneTemplate } from './notion-clone';
8
+ export interface DatabaseTemplate {
9
+ id: string;
10
+ title: string;
11
+ description: string;
12
+ tableCount: number;
13
+ sql: string;
14
+ visualizerSchema: GetTableSchemaResponse[];
15
+ }
16
+ export { crmSystemTemplate, aiChatbotTemplate, ecommercePlatformTemplate, redditCloneTemplate, instagramCloneTemplate, notionCloneTemplate, };
17
+ export declare const DATABASE_TEMPLATES: DatabaseTemplate[];
@@ -0,0 +1,2 @@
1
+ import { DatabaseTemplate } from './index';
2
+ export declare const instagramCloneTemplate: DatabaseTemplate;