diff --git a/surfsense_backend/app/agents/researcher/nodes.py b/surfsense_backend/app/agents/researcher/nodes.py index f036b1d8c..41e47a75d 100644 --- a/surfsense_backend/app/agents/researcher/nodes.py +++ b/surfsense_backend/app/agents/researcher/nodes.py @@ -421,13 +421,14 @@ async def fetch_documents_by_ids( start_time = metadata.get("start_time", "") location_name = metadata.get("location_name", "") meeting_url = metadata.get("meeting_url", "") - + title = f"Luma: {event_name}" if start_time: # Format the start time for display try: if "T" in start_time: from datetime import datetime + start_dt = datetime.fromisoformat( start_time.replace("Z", "+00:00") ) @@ -435,7 +436,7 @@ async def fetch_documents_by_ids( title += f" ({formatted_time})" except Exception: pass - + description = ( doc.content[:100] + "..." if len(doc.content) > 100 @@ -444,8 +445,8 @@ async def fetch_documents_by_ids( if location_name: description += f" | Venue: {location_name}" elif meeting_url: - description += f" | Online Event" - + description += " | Online Event" + url = event_url if event_url else "" elif doc_type == "EXTENSION": diff --git a/surfsense_backend/app/connectors/luma_connector.py b/surfsense_backend/app/connectors/luma_connector.py index 8583bc8a8..62fe3f586 100644 --- a/surfsense_backend/app/connectors/luma_connector.py +++ b/surfsense_backend/app/connectors/luma_connector.py @@ -82,7 +82,9 @@ class LumaConnector: elif response.status_code == 401: raise Exception("Unauthorized: Invalid Luma API key") elif response.status_code == 403: - raise Exception("Forbidden: Access denied or Luma Plus subscription required") + raise Exception( + "Forbidden: Access denied or Luma Plus subscription required" + ) elif response.status_code == 429: raise Exception("Rate limit exceeded: Too many requests") else: @@ -106,7 +108,9 @@ class LumaConnector: except Exception as e: return None, f"Error fetching user info: {e!s}" - def get_all_events(self, limit: int = 100) -> tuple[list[dict[str, Any]], str | None]: + def get_all_events( + self, limit: int = 100 + ) -> tuple[list[dict[str, Any]], str | None]: """ Fetch all events for the authenticated user. @@ -119,32 +123,34 @@ class LumaConnector: try: all_events = [] cursor = None - + while True: params = {"limit": limit} if cursor: params["cursor"] = cursor response = self.make_request("calendar/list-events", params) - + if "entries" not in response: break - + events = response["entries"] all_events.extend(events) - + # Check for pagination - if "next_cursor" in response and response["next_cursor"]: + if response.get("next_cursor"): cursor = response["next_cursor"] else: break - + return all_events, None except Exception as e: return [], f"Error fetching events: {e!s}" - def get_event_details(self, event_id: str) -> tuple[dict[str, Any] | None, str | None]: + def get_event_details( + self, event_id: str + ) -> tuple[dict[str, Any] | None, str | None]: """ Fetch detailed information about a specific event. @@ -160,7 +166,9 @@ class LumaConnector: except Exception as e: return None, f"Error fetching event details for {event_id}: {e!s}" - def get_event_guests(self, event_id: str, limit: int = 100) -> tuple[list[dict[str, Any]], str | None]: + def get_event_guests( + self, event_id: str, limit: int = 100 + ) -> tuple[list[dict[str, Any]], str | None]: """ Fetch guests for a specific event. @@ -174,26 +182,26 @@ class LumaConnector: try: all_guests = [] cursor = None - + while True: params = {"limit": limit} if cursor: params["cursor"] = cursor response = self.make_request(f"events/{event_id}/guests", params) - + if "entries" not in response: break - + guests = response["entries"] all_guests.extend(guests) - + # Check for pagination - if "next_cursor" in response and response["next_cursor"]: + if response.get("next_cursor"): cursor = response["next_cursor"] else: break - + return all_guests, None except Exception as e: @@ -217,7 +225,7 @@ class LumaConnector: # Convert date strings to ISO format for comparison start_dt = datetime.strptime(start_date, "%Y-%m-%d") end_dt = datetime.strptime(end_date, "%Y-%m-%d") - + # Get all events first all_events, error = self.get_all_events() if error: @@ -230,19 +238,23 @@ class LumaConnector: if event_start_time: try: # Parse the event start time (assuming ISO format) - event_dt = datetime.fromisoformat(event_start_time.replace("Z", "+00:00")) + event_dt = datetime.fromisoformat( + event_start_time.replace("Z", "+00:00") + ) event_date = event_dt.date() - + # Check if event falls within the date range if start_dt.date() <= event_date <= end_dt.date(): # Add guest information if requested if include_guests: event_id = event.get("api_id") if event_id: - guests, guest_error = self.get_event_guests(event_id) + guests, guest_error = self.get_event_guests( + event_id + ) if not guest_error: event["guests"] = guests - + filtered_events.append(event) except (ValueError, AttributeError): # Skip events with invalid dates @@ -270,45 +282,45 @@ class LumaConnector: """ # Extract event details event_data = event.get("event", {}) - + title = event_data.get("name", "Untitled Event") description = event_data.get("description", "") event_id = event.get("api_id", "") - + # Extract timing information start_at = event_data.get("start_at", "") end_at = event_data.get("end_at", "") timezone = event_data.get("timezone", "") - + # Format dates start_formatted = self.format_date(start_at) if start_at else "Unknown" end_formatted = self.format_date(end_at) if end_at else "Unknown" - + # Extract location information geo_info = event_data.get("geo_info", {}) location_name = geo_info.get("name", "") address = geo_info.get("address", "") - + # Extract other details url = event_data.get("url", "") visibility = event_data.get("visibility", "") meeting_url = event_data.get("meeting_url", "") - + # Build markdown content markdown_content = f"# {title}\n\n" - + if event_id: markdown_content += f"**Event ID:** {event_id}\n" - + # Add timing information markdown_content += f"**Start:** {start_formatted}\n" markdown_content += f"**End:** {end_formatted}\n" - + if timezone: markdown_content += f"**Timezone:** {timezone}\n" - + markdown_content += "\n" - + # Add location information if location_name or address: markdown_content += "## Location\n\n" @@ -317,45 +329,45 @@ class LumaConnector: if address: markdown_content += f"**Address:** {address}\n" markdown_content += "\n" - + # Add online meeting info if meeting_url: markdown_content += f"**Meeting URL:** {meeting_url}\n\n" - + # Add description if available if description: markdown_content += f"## Description\n\n{description}\n\n" - + # Add event details markdown_content += "## Event Details\n\n" - + if url: markdown_content += f"- **Event URL:** {url}\n" - + if visibility: markdown_content += f"- **Visibility:** {visibility}\n" - + # Add guest information if available if "guests" in event: guests = event["guests"] markdown_content += f"\n## Guests ({len(guests)})\n\n" - + for guest in guests[:10]: # Show first 10 guests guest_data = guest.get("guest", {}) name = guest_data.get("name", "Unknown") email = guest_data.get("email", "") status = guest.get("registration_status", "unknown") - + markdown_content += f"- **{name}**" if email: markdown_content += f" ({email})" markdown_content += f" - Status: {status}\n" - + if len(guests) > 10: markdown_content += f"- ... and {len(guests) - 10} more guests\n" - + markdown_content += "\n" - + return markdown_content @staticmethod diff --git a/surfsense_backend/app/routes/__init__.py b/surfsense_backend/app/routes/__init__.py index d2e160400..1c7e3505f 100644 --- a/surfsense_backend/app/routes/__init__.py +++ b/surfsense_backend/app/routes/__init__.py @@ -4,7 +4,6 @@ from .airtable_add_connector_route import ( router as airtable_add_connector_router, ) from .chats_routes import router as chats_router -from .luma_add_connector_route import router as luma_add_connector_router from .documents_routes import router as documents_router from .google_calendar_add_connector_route import ( router as google_calendar_add_connector_router, @@ -14,6 +13,7 @@ from .google_gmail_add_connector_route import ( ) from .llm_config_routes import router as llm_config_router from .logs_routes import router as logs_router +from .luma_add_connector_route import router as luma_add_connector_router from .podcasts_routes import router as podcasts_router from .search_source_connectors_routes import router as search_source_connectors_router from .search_spaces_routes import router as search_spaces_router diff --git a/surfsense_backend/app/routes/luma_add_connector_route.py b/surfsense_backend/app/routes/luma_add_connector_route.py index 39cc95fc6..37fd0c3df 100644 --- a/surfsense_backend/app/routes/luma_add_connector_route.py +++ b/surfsense_backend/app/routes/luma_add_connector_route.py @@ -1,5 +1,4 @@ import logging -from uuid import UUID from fastapi import APIRouter, Depends, HTTPException from pydantic import BaseModel, Field @@ -22,7 +21,7 @@ router = APIRouter() class AddLumaConnectorRequest(BaseModel): """Request model for adding a Luma connector.""" - + api_key: str = Field(..., description="Luma API key") space_id: int = Field(..., description="Search space ID") @@ -35,15 +34,15 @@ async def add_luma_connector( ): """ Add a new Luma connector for the authenticated user. - + Args: request: The request containing Luma API key and space_id user: Current authenticated user session: Database session - + Returns: Success message and connector details - + Raises: HTTPException: If connector already exists or validation fails """ @@ -52,26 +51,27 @@ async def add_luma_connector( result = await session.execute( select(SearchSourceConnector).filter( SearchSourceConnector.user_id == user.id, - SearchSourceConnector.connector_type == SearchSourceConnectorType.LUMA_CONNECTOR, + SearchSourceConnector.connector_type + == SearchSourceConnectorType.LUMA_CONNECTOR, ) ) existing_connector = result.scalars().first() - + if existing_connector: # Update existing connector with new API key existing_connector.config = {"api_key": request.api_key} existing_connector.is_indexable = True await session.commit() await session.refresh(existing_connector) - + logger.info(f"Updated existing Luma connector for user {user.id}") - + return { "message": "Luma connector updated successfully", "connector_id": existing_connector.id, "connector_type": "LUMA_CONNECTOR", } - + # Create new Luma connector db_connector = SearchSourceConnector( name="Luma Event Connector", @@ -80,21 +80,21 @@ async def add_luma_connector( user_id=user.id, is_indexable=True, ) - + session.add(db_connector) await session.commit() await session.refresh(db_connector) - + logger.info( f"Successfully created Luma connector for user {user.id} with ID {db_connector.id}" ) - + return { "message": "Luma connector added successfully", "connector_id": db_connector.id, "connector_type": "LUMA_CONNECTOR", } - + except IntegrityError as e: await session.rollback() logger.error(f"Database integrity error: {e!s}") @@ -118,14 +118,14 @@ async def delete_luma_connector( ): """ Delete the Luma connector for the authenticated user. - + Args: user: Current authenticated user session: Database session - + Returns: Success message - + Raises: HTTPException: If connector doesn't exist """ @@ -133,24 +133,25 @@ async def delete_luma_connector( result = await session.execute( select(SearchSourceConnector).filter( SearchSourceConnector.user_id == user.id, - SearchSourceConnector.connector_type == SearchSourceConnectorType.LUMA_CONNECTOR, + SearchSourceConnector.connector_type + == SearchSourceConnectorType.LUMA_CONNECTOR, ) ) connector = result.scalars().first() - + if not connector: raise HTTPException( status_code=404, detail="Luma connector not found for this user.", ) - + await session.delete(connector) await session.commit() - + logger.info(f"Successfully deleted Luma connector for user {user.id}") - + return {"message": "Luma connector deleted successfully"} - + except HTTPException: raise except Exception as e: @@ -169,14 +170,14 @@ async def test_luma_connector( ): """ Test the Luma connector for the authenticated user. - + Args: user: Current authenticated user session: Database session - + Returns: Test results including user info and event count - + Raises: HTTPException: If connector doesn't exist or test fails """ @@ -185,20 +186,21 @@ async def test_luma_connector( result = await session.execute( select(SearchSourceConnector).filter( SearchSourceConnector.user_id == user.id, - SearchSourceConnector.connector_type == SearchSourceConnectorType.LUMA_CONNECTOR, + SearchSourceConnector.connector_type + == SearchSourceConnectorType.LUMA_CONNECTOR, ) ) connector = result.scalars().first() - + if not connector: raise HTTPException( status_code=404, detail="Luma connector not found. Please add a connector first.", ) - + # Import LumaConnector from app.connectors.luma_connector import LumaConnector - + # Initialize the connector api_key = connector.config.get("api_key") if not api_key: @@ -206,9 +208,9 @@ async def test_luma_connector( status_code=400, detail="Invalid connector configuration: API key missing.", ) - + luma = LumaConnector(api_key=api_key) - + # Test the connection by fetching user info user_info, error = luma.get_user_info() if error: @@ -216,10 +218,10 @@ async def test_luma_connector( status_code=400, detail=f"Failed to connect to Luma: {error}", ) - + # Try to fetch events events, events_error = luma.get_all_events(limit=10) - + return { "message": "Luma connector is working correctly", "user_info": { @@ -229,7 +231,7 @@ async def test_luma_connector( "event_count": len(events) if not events_error else 0, "events_error": events_error, } - + except HTTPException: raise except Exception as e: diff --git a/surfsense_backend/app/routes/search_source_connectors_routes.py b/surfsense_backend/app/routes/search_source_connectors_routes.py index 19ee43edc..6250e0c07 100644 --- a/surfsense_backend/app/routes/search_source_connectors_routes.py +++ b/surfsense_backend/app/routes/search_source_connectors_routes.py @@ -45,9 +45,9 @@ from app.tasks.connector_indexers import ( index_google_gmail_messages, index_jira_issues, index_linear_issues, + index_luma_events, index_notion_pages, index_slack_messages, - index_luma_events ) from app.users import current_active_user from app.utils.check_ownership import check_ownership @@ -1280,6 +1280,7 @@ async def run_google_gmail_indexing( ) # Optionally update status in DB to indicate failure + # Add new helper functions for luma indexing async def run_luma_indexing_with_new_session( connector_id: int, @@ -1297,6 +1298,7 @@ async def run_luma_indexing_with_new_session( session, connector_id, search_space_id, user_id, start_date, end_date ) + async def run_luma_indexing( session: AsyncSession, connector_id: int, @@ -1338,4 +1340,4 @@ async def run_luma_indexing( f"Luma indexing failed or no documents processed: {error_or_warning}" ) except Exception as e: - logger.error(f"Error in background Luma indexing task: {e!s}") \ No newline at end of file + logger.error(f"Error in background Luma indexing task: {e!s}") diff --git a/surfsense_backend/app/services/connector_service.py b/surfsense_backend/app/services/connector_service.py index de73cc2f5..938500a67 100644 --- a/surfsense_backend/app/services/connector_service.py +++ b/surfsense_backend/app/services/connector_service.py @@ -1951,14 +1951,15 @@ class ConnectorService: info_parts.append(f"Venue: {location_name}") elif location_address: info_parts.append(f"Location: {location_address}") - + if meeting_url: info_parts.append("Online Event") - + if end_time: try: if "T" in end_time: from datetime import datetime + end_dt = datetime.fromisoformat( end_time.replace("Z", "+00:00") ) @@ -1968,10 +1969,10 @@ class ConnectorService: info_parts.append(f"Ends: {end_time}") except Exception: info_parts.append(f"Ends: {end_time}") - + if timezone: info_parts.append(f"TZ: {timezone}") - + if visibility: info_parts.append(f"Visibility: {visibility.title()}") diff --git a/surfsense_backend/app/tasks/connector_indexers/__init__.py b/surfsense_backend/app/tasks/connector_indexers/__init__.py index 92686a31b..fb7936126 100644 --- a/surfsense_backend/app/tasks/connector_indexers/__init__.py +++ b/surfsense_backend/app/tasks/connector_indexers/__init__.py @@ -31,10 +31,10 @@ from .github_indexer import index_github_repos from .google_calendar_indexer import index_google_calendar_events from .google_gmail_indexer import index_google_gmail_messages from .jira_indexer import index_jira_issues -from .luma_indexer import index_luma_events # Issue tracking and project management from .linear_indexer import index_linear_issues +from .luma_indexer import index_luma_events # Documentation and knowledge management from .notion_indexer import index_notion_pages diff --git a/surfsense_backend/app/tasks/connector_indexers/luma_indexer.py b/surfsense_backend/app/tasks/connector_indexers/luma_indexer.py index c53a5f6a0..d7b6d3058 100644 --- a/surfsense_backend/app/tasks/connector_indexers/luma_indexer.py +++ b/surfsense_backend/app/tasks/connector_indexers/luma_indexer.py @@ -84,11 +84,14 @@ async def index_luma_events( "Connector not found", {"error_type": "ConnectorNotFound"}, ) - return 0, f"Connector with ID {connector_id} not found or is not a Luma connector" + return ( + 0, + f"Connector with ID {connector_id} not found or is not a Luma connector", + ) # Get the Luma API key from the connector config api_key = connector.config.get("LUMA_API_KEY") - + if not api_key: await task_logger.log_task_failure( log_entry, @@ -97,7 +100,7 @@ async def index_luma_events( {"error_type": "MissingCredentials"}, ) return 0, "Luma API key not found in connector config" - + logger.info(f"Starting Luma indexing for connector {connector_id}") # Initialize Luma client @@ -107,9 +110,7 @@ async def index_luma_events( {"stage": "client_initialization"}, ) - luma_client = LumaConnector( - api_key=api_key - ) + luma_client = LumaConnector(api_key=api_key) # Calculate date range if start_date is None or end_date is None: @@ -167,9 +168,7 @@ async def index_luma_events( # Get events within date range from Luma try: events, error = luma_client.get_events_by_date_range( - start_date_str, - end_date_str, - include_guests=False + start_date_str, end_date_str, include_guests=False ) if error: @@ -221,7 +220,7 @@ async def index_luma_events( event_id = event.get("api_id") or event_data.get("id") event_name = event_data.get("name", "No Title") event_url = event_data.get("url", "") - + if not event_id: logger.warning(f"Skipping event with missing ID: {event_name}") skipped_events.append(f"{event_name} (missing ID)") @@ -240,19 +239,21 @@ async def index_luma_events( start_at = event_data.get("start_at", "") end_at = event_data.get("end_at", "") timezone = event_data.get("timezone", "") - + # Location info from geo_info geo_info = event_data.get("geo_info", {}) location = geo_info.get("address", "") city = geo_info.get("city", "") - + # Host info hosts = event_data.get("hosts", []) - host_names = ", ".join([host.get("name", "") for host in hosts if host.get("name")]) - + host_names = ", ".join( + [host.get("name", "") for host in hosts if host.get("name")] + ) + description = event_data.get("description", "") cover_url = event_data.get("cover_url", "") - + content_hash = generate_content_hash(event_markdown, search_space_id) # Duplicate check via simple query using helper in base @@ -311,11 +312,11 @@ async def index_luma_events( if len(description) > 300: desc_preview += "..." summary_content += f"Description: {desc_preview}\n" - + summary_embedding = config.embedding_model_instance.embed( summary_content ) - + chunks = await create_document_chunks(event_markdown) document = Document( @@ -397,4 +398,4 @@ async def index_luma_events( {"error_type": type(e).__name__}, ) logger.error(f"Failed to index Luma events: {e!s}", exc_info=True) - return 0, f"Failed to index Luma events: {e!s}" \ No newline at end of file + return 0, f"Failed to index Luma events: {e!s}" diff --git a/surfsense_web/app/dashboard/[search_space_id]/connectors/[connector_id]/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/connectors/[connector_id]/page.tsx index 422908d2e..4152ff786 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/connectors/[connector_id]/page.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/connectors/[connector_id]/page.tsx @@ -53,7 +53,7 @@ const getConnectorTypeDisplay = (type: string): string => { GOOGLE_CALENDAR_CONNECTOR: "Google Calendar Connector", GOOGLE_GMAIL_CONNECTOR: "Google Gmail Connector", AIRTABLE_CONNECTOR: "Airtable Connector", - LUMA_CONNECTOR: "Luma Connector" + LUMA_CONNECTOR: "Luma Connector", // Add other connector types here as needed }; return typeMap[type] || type; @@ -72,7 +72,7 @@ const getApiKeyFieldName = (connectorType: string): string => { GITHUB_CONNECTOR: "GITHUB_PAT", DISCORD_CONNECTOR: "DISCORD_BOT_TOKEN", LINKUP_API: "LINKUP_API_KEY", - LUMA_CONNECTOR: "LUMA_API_KEY" + LUMA_CONNECTOR: "LUMA_API_KEY", }; return fieldMap[connectorType] || ""; }; diff --git a/surfsense_web/app/dashboard/[search_space_id]/connectors/add/luma-connector/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/connectors/add/luma-connector/page.tsx index f3c185f6b..cc5bde60b 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/connectors/add/luma-connector/page.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/connectors/add/luma-connector/page.tsx @@ -54,7 +54,7 @@ export default function LumaConnectorPage() { const searchSpaceId = params.search_space_id as string; const [isSubmitting, setIsSubmitting] = useState(false); const [doesConnectorExist, setDoesConnectorExist] = useState(false); - + const { fetchConnectors, createConnector } = useSearchSourceConnectors(); // Initialize the form @@ -69,8 +69,7 @@ export default function LumaConnectorPage() { useEffect(() => { fetchConnectors().then((data) => { const connector = data.find( - (c: SearchSourceConnector) => - c.connector_type === EnumConnectorName.LUMA_CONNECTOR + (c: SearchSourceConnector) => c.connector_type === EnumConnectorName.LUMA_CONNECTOR ); if (connector) { setDoesConnectorExist(true); @@ -86,14 +85,14 @@ export default function LumaConnectorPage() { name: values.name, connector_type: EnumConnectorName.LUMA_CONNECTOR, config: { - LUMA_API_KEY: values.api_key + LUMA_API_KEY: values.api_key, }, is_indexable: true, last_indexed_at: null, }); toast.success("Luma connector created successfully!"); - + // Navigate back to connectors page router.push(`/dashboard/${searchSpaceId}/connectors`); } catch (error) { @@ -126,9 +125,7 @@ export default function LumaConnectorPage() {

Connect Luma

-

- Connect your Luma account to search events. -

+

Connect your Luma account to search events.

@@ -170,11 +167,7 @@ export default function LumaConnectorPage() { API Key - + Your API key will be encrypted and stored securely. diff --git a/surfsense_web/app/dashboard/[search_space_id]/connectors/add/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/connectors/add/page.tsx index 9887fccb5..d3cee106e 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/connectors/add/page.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/connectors/add/page.tsx @@ -146,7 +146,7 @@ const connectorCategories: ConnectorCategory[] = [ description: "Connect to Luma to search events", icon: getConnectorIcon(EnumConnectorName.LUMA_CONNECTOR, "h-6 w-6"), status: "available", - } + }, ], }, { diff --git a/surfsense_web/components/editConnector/types.ts b/surfsense_web/components/editConnector/types.ts index 5cbf15907..4e91ef305 100644 --- a/surfsense_web/components/editConnector/types.ts +++ b/surfsense_web/components/editConnector/types.ts @@ -43,6 +43,6 @@ export const editConnectorSchema = z.object({ GOOGLE_CALENDAR_CLIENT_SECRET: z.string().optional(), GOOGLE_CALENDAR_REFRESH_TOKEN: z.string().optional(), GOOGLE_CALENDAR_CALENDAR_IDS: z.string().optional(), - LUMA_API_KEY: z.string().optional() + LUMA_API_KEY: z.string().optional(), }); export type EditConnectorFormValues = z.infer; diff --git a/surfsense_web/contracts/enums/connector.ts b/surfsense_web/contracts/enums/connector.ts index bd1277be4..a49314e2e 100644 --- a/surfsense_web/contracts/enums/connector.ts +++ b/surfsense_web/contracts/enums/connector.ts @@ -13,5 +13,5 @@ export enum EnumConnectorName { GOOGLE_CALENDAR_CONNECTOR = "GOOGLE_CALENDAR_CONNECTOR", GOOGLE_GMAIL_CONNECTOR = "GOOGLE_GMAIL_CONNECTOR", AIRTABLE_CONNECTOR = "AIRTABLE_CONNECTOR", - LUMA_CONNECTOR = "LUMA_CONNECTOR" + LUMA_CONNECTOR = "LUMA_CONNECTOR", } diff --git a/surfsense_web/contracts/enums/connectorIcons.tsx b/surfsense_web/contracts/enums/connectorIcons.tsx index c1571c011..f34a10398 100644 --- a/surfsense_web/contracts/enums/connectorIcons.tsx +++ b/surfsense_web/contracts/enums/connectorIcons.tsx @@ -10,10 +10,10 @@ import { IconLayoutKanban, IconLinkPlus, IconMail, + IconSparkles, IconTable, IconTicket, IconWorldWww, - IconSparkles, } from "@tabler/icons-react"; import { File, Globe, Link, Microscope, Search, Sparkles, Telescope, Webhook } from "lucide-react"; import { EnumConnectorName } from "./connector"; diff --git a/surfsense_web/hooks/useConnectorEditPage.ts b/surfsense_web/hooks/useConnectorEditPage.ts index 419666151..ece71dd8f 100644 --- a/surfsense_web/hooks/useConnectorEditPage.ts +++ b/surfsense_web/hooks/useConnectorEditPage.ts @@ -52,7 +52,7 @@ export function useConnectorEditPage(connectorId: number, searchSpaceId: string) JIRA_BASE_URL: "", JIRA_EMAIL: "", JIRA_API_TOKEN: "", - LUMA_API_KEY: "" + LUMA_API_KEY: "", }, }); @@ -79,7 +79,7 @@ export function useConnectorEditPage(connectorId: number, searchSpaceId: string) JIRA_BASE_URL: config.JIRA_BASE_URL || "", JIRA_EMAIL: config.JIRA_EMAIL || "", JIRA_API_TOKEN: config.JIRA_API_TOKEN || "", - LUMA_API_KEY: config.LUMA_API_KEY || "" + LUMA_API_KEY: config.LUMA_API_KEY || "", }); if (currentConnector.connector_type === "GITHUB_CONNECTOR") { const savedRepos = config.repo_full_names || []; @@ -312,7 +312,7 @@ export function useConnectorEditPage(connectorId: number, searchSpaceId: string) setIsSaving(false); return; } - newConfig = { LUMA_API_KEY: formData.LUMA_API_KEY}; + newConfig = { LUMA_API_KEY: formData.LUMA_API_KEY }; } break; } diff --git a/surfsense_web/lib/connectors/utils.ts b/surfsense_web/lib/connectors/utils.ts index 64f4b997b..798204d94 100644 --- a/surfsense_web/lib/connectors/utils.ts +++ b/surfsense_web/lib/connectors/utils.ts @@ -15,7 +15,7 @@ export const getConnectorTypeDisplay = (type: string): string => { GOOGLE_CALENDAR_CONNECTOR: "Google Calendar", GOOGLE_GMAIL_CONNECTOR: "Google Gmail", AIRTABLE_CONNECTOR: "Airtable", - LUMA_CONNECTOR: "Luma" + LUMA_CONNECTOR: "Luma", }; return typeMap[type] || type; };