π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix: recover script / widget / dashboard and move to shared composable
mertmit9cd30940c8a4
diff --git a/packages/nocodb-sdk/src/lib/index.ts b/packages/nocodb-sdk/src/lib/index.tsindex 414bcbb3b9..c02f4ecdcf 100644--- a/packages/nocodb-sdk/src/lib/index.ts+++ b/packages/nocodb-sdk/src/lib/index.ts@@ -10,7 +10,6 @@ export * from '~/lib/formulaHelpers';export * from '~/lib/regex';export * from '~/lib/payment';export * from '~/lib/permission';-export * from '~/lib/realtime';export {default as UITypes,UITypesName,diff --git a/packages/nocodb-sdk/src/lib/realtime/index.ts b/packages/nocodb-sdk/src/lib/realtime/index.tsdeleted file mode 100644index 6f39b040c3..0000000000--- a/packages/nocodb-sdk/src/lib/realtime/index.ts+++ /dev/null@@ -1,109 +0,0 @@-import { ScriptType, TableType, UserType, ViewType } from '~/lib/Api';-import { DashboardType, WidgetType } from '~/lib';--export enum EventType {- HANDSHAKE = 'handshake',- CONNECTION_WELCOME = 'connection-welcome',- CONNECTION_ERROR = 'connection-error',- NOTIFICATION = 'notification',- DATA_EVENT = 'event-data',- META_EVENT = 'event-meta',- DASHBOARD_EVENT = 'event-dashboard',- WIDGET_EVENT = 'event-widget',- SCRIPT_EVENT = 'event-script',-}--// Base payload interface for all socket events-export interface BaseSocketPayload {- timestamp: number;- socketId?: string;- eventType?: EventType;-}--// Connection event payloads-export interface ConnectionWelcomePayload extends BaseSocketPayload {- message: string;- serverInfo: {- version: string;- environment: string;- };- user?: UserType;-}--export interface ConnectionErrorPayload extends BaseSocketPayload {- error: {- code: string;- message: string;- details?: any;- };-}--export interface DataPayload extends BaseSocketPayload {- id: string;- action: 'add' | 'update' | 'delete' | 'reorder';- payload: Record<string, any>;- before?: string;-}--export interface MetaPayload extends BaseSocketPayload {- action:- | 'table_create'- | 'table_update'- | 'table_delete'- | 'column_add'- | 'column_update'- | 'column_delete'- | 'view_create'- | 'view_update'- | 'view_delete'- | 'base_create'- | 'base_update'- | 'base_delete'- | 'workspace_create'- | 'workspace_update'- | 'workspace_delete';- payload: Partial<TableType | ViewType>;-}--export interface DashboardPayload extends BaseSocketPayload {- id: string;- action: 'create' | 'update' | 'delete';- payload: DashboardType;-}--export interface WidgetPayload extends BaseSocketPayload {- id: string;- dashboardId: string;- action: 'create' | 'update' | 'delete';- payload: WidgetType;-}--export interface ScriptPayload extends BaseSocketPayload {- id: string;- action: 'create' | 'update' | 'delete';- payload: ScriptType;-}--// Union type for all socket event payloads-export type SocketEventPayload =- | ConnectionWelcomePayload- | ConnectionErrorPayload- | DataPayload- | MetaPayload- | DashboardPayload- | WidgetPayload;--// Type mapping for event types to their corresponding payloads-export type SocketEventPayloadMap = {- [EventType.CONNECTION_WELCOME]: ConnectionWelcomePayload;- [EventType.CONNECTION_ERROR]: ConnectionErrorPayload;- [EventType.DATA_EVENT]: DataPayload;- [EventType.META_EVENT]: MetaPayload;- [EventType.DASHBOARD_EVENT]: DashboardPayload;- [EventType.WIDGET_EVENT]: WidgetPayload;- [EventType.SCRIPT_EVENT]: ScriptPayload;- [key: string]: BaseSocketPayload;-};--// Helper type to get payload type for a specific event-export type PayloadForEvent<T extends EventType> = SocketEventPayloadMap[T];