sdlc-agent-4-enterprise-server 1.12.0 → 1.13.0
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 +2 -1
- package/documents/GRAPH-EMAIL/BRD.md +488 -0
- package/documents/GRAPH-EMAIL/FSD.md +558 -0
- package/documents/GRAPH-EMAIL/STATUS.json +25 -0
- package/documents/GRAPH-EMAIL/TDD.md +531 -0
- package/electron/app/ipc/api_handlers.ts +164 -0
- package/electron/app/ipc/export_handlers.ts +583 -0
- package/electron/app/ipc/footer_handlers.ts +32 -0
- package/electron/app/ipc/index.ts +21 -0
- package/electron/app/ipc/log_handler.ts +50 -0
- package/electron/app/ipc/read_file.ts +14 -0
- package/electron/app/ipc/slide_metadata.ts +378 -0
- package/electron/app/ipc/theme_handlers.ts +32 -0
- package/electron/app/ipc/upload_image.ts +28 -0
- package/electron/app/ipc/user_config_handlers.ts +16 -0
- package/electron/app/main.ts +630 -0
- package/electron/app/preloads/index.ts +34 -0
- package/electron/app/preloads/pptx-export.ts +13 -0
- package/electron/app/preloads/sentry.ts +77 -0
- package/electron/app/sentry/main.ts +169 -0
- package/electron/app/services/settings-store.ts +84 -0
- package/electron/app/types/index.d.ts +173 -0
- package/electron/app/utils/chromium-cache-recovery.ts +235 -0
- package/electron/app/utils/constants.ts +337 -0
- package/electron/app/utils/dialog.ts +43 -0
- package/electron/app/utils/export-chromium.ts +471 -0
- package/electron/app/utils/export-msix-runtime.ts +233 -0
- package/electron/app/utils/imagemagick-runtime.ts +208 -0
- package/electron/app/utils/index.ts +93 -0
- package/electron/app/utils/lifecycle.ts +147 -0
- package/electron/app/utils/liteparse-check.ts +6 -0
- package/electron/app/utils/memory.ts +38 -0
- package/electron/app/utils/open-target.ts +116 -0
- package/electron/app/utils/readable-file-access.ts +93 -0
- package/electron/app/utils/safe-console.ts +100 -0
- package/electron/app/utils/servers.ts +393 -0
- package/electron/app/utils/update-checker.ts +390 -0
- package/electron/app/utils/user-config-store.ts +232 -0
- package/electron/build.js +536 -0
- package/electron/resources/ui/homepage/script.js +46 -0
- package/electron/scripts/rebuild_notice_all.py +334 -0
- package/package.json +1 -1
- package/scripts/rebuild_notice_all.py +333 -0
- package/servers/fastapi/alembic/env.py +94 -0
- package/servers/fastapi/alembic/versions/00b3c27a13bc_init.py +135 -0
- package/servers/fastapi/alembic/versions/82abdbc476a7_add_theme_column_to_presentations.py +31 -0
- package/servers/fastapi/alembic/versions/95b5127e93cd_template_create_info.py +46 -0
- package/servers/fastapi/alembic/versions/c7b70d0f31b1_added_chat_history_messages_table.py +106 -0
- package/servers/fastapi/alembic/versions/f42ad4074449_add_theme_column_to_presentations.py +40 -0
- package/servers/fastapi/api/__init__.py +0 -0
- package/servers/fastapi/api/lifespan.py +103 -0
- package/servers/fastapi/api/main.py +105 -0
- package/servers/fastapi/api/middlewares.py +82 -0
- package/servers/fastapi/api/v1/auth/router.py +107 -0
- package/servers/fastapi/api/v1/mock/router.py +36 -0
- package/servers/fastapi/api/v1/ppt/endpoints/__init__.py +0 -0
- package/servers/fastapi/api/v1/ppt/endpoints/anthropic.py +16 -0
- package/servers/fastapi/api/v1/ppt/endpoints/chat.py +129 -0
- package/servers/fastapi/api/v1/ppt/endpoints/codex_auth.py +336 -0
- package/servers/fastapi/api/v1/ppt/endpoints/files.py +90 -0
- package/servers/fastapi/api/v1/ppt/endpoints/fonts.py +335 -0
- package/servers/fastapi/api/v1/ppt/endpoints/google.py +14 -0
- package/servers/fastapi/api/v1/ppt/endpoints/icons.py +20 -0
- package/servers/fastapi/api/v1/ppt/endpoints/images.py +194 -0
- package/servers/fastapi/api/v1/ppt/endpoints/layouts.py +26 -0
- package/servers/fastapi/api/v1/ppt/endpoints/ollama.py +35 -0
- package/servers/fastapi/api/v1/ppt/endpoints/openai.py +17 -0
- package/servers/fastapi/api/v1/ppt/endpoints/outlines.py +208 -0
- package/servers/fastapi/api/v1/ppt/endpoints/pdf_slides.py +118 -0
- package/servers/fastapi/api/v1/ppt/endpoints/pptx_slides.py +500 -0
- package/servers/fastapi/api/v1/ppt/endpoints/presentation.py +1212 -0
- package/servers/fastapi/api/v1/ppt/endpoints/prompts.py +241 -0
- package/servers/fastapi/api/v1/ppt/endpoints/slide.py +135 -0
- package/servers/fastapi/api/v1/ppt/endpoints/slide_to_html.py +394 -0
- package/servers/fastapi/api/v1/ppt/endpoints/theme.py +190 -0
- package/servers/fastapi/api/v1/ppt/endpoints/theme_generate.py +75 -0
- package/servers/fastapi/api/v1/ppt/router.py +46 -0
- package/servers/fastapi/api/v1/webhook/router.py +53 -0
- package/servers/fastapi/constants/__init__.py +0 -0
- package/servers/fastapi/constants/documents.py +88 -0
- package/servers/fastapi/constants/llm.py +23 -0
- package/servers/fastapi/constants/presentation.py +51 -0
- package/servers/fastapi/constants/supported_ollama_models.py +354 -0
- package/servers/fastapi/enums/__init__.py +0 -0
- package/servers/fastapi/enums/image_provider.py +13 -0
- package/servers/fastapi/enums/llm_call_type.py +8 -0
- package/servers/fastapi/enums/llm_provider.py +20 -0
- package/servers/fastapi/enums/tone.py +11 -0
- package/servers/fastapi/enums/verbosity.py +8 -0
- package/servers/fastapi/enums/web_search_provider.py +11 -0
- package/servers/fastapi/enums/webhook_event.py +6 -0
- package/servers/fastapi/mcp_server.py +146 -0
- package/servers/fastapi/migrations.py +164 -0
- package/servers/fastapi/models/__init__.py +0 -0
- package/servers/fastapi/models/api_error_model.py +13 -0
- package/servers/fastapi/models/chat.py +44 -0
- package/servers/fastapi/models/decomposed_file_info.py +6 -0
- package/servers/fastapi/models/document_chunk.py +13 -0
- package/servers/fastapi/models/generate_presentation_request.py +46 -0
- package/servers/fastapi/models/image_prompt.py +10 -0
- package/servers/fastapi/models/json_path_guide.py +14 -0
- package/servers/fastapi/models/ollama_model_metadata.py +8 -0
- package/servers/fastapi/models/ollama_model_status.py +12 -0
- package/servers/fastapi/models/presentation_and_path.py +11 -0
- package/servers/fastapi/models/presentation_from_template.py +14 -0
- package/servers/fastapi/models/presentation_layout.py +5 -0
- package/servers/fastapi/models/presentation_outline_model.py +17 -0
- package/servers/fastapi/models/presentation_structure_model.py +6 -0
- package/servers/fastapi/models/presentation_with_slides.py +22 -0
- package/servers/fastapi/models/slide_layout_index.py +5 -0
- package/servers/fastapi/models/sql/async_presentation_generation_status.py +22 -0
- package/servers/fastapi/models/sql/chat_history_message.py +31 -0
- package/servers/fastapi/models/sql/image_asset.py +20 -0
- package/servers/fastapi/models/sql/key_value.py +8 -0
- package/servers/fastapi/models/sql/ollama_pull_status.py +9 -0
- package/servers/fastapi/models/sql/presentation.py +81 -0
- package/servers/fastapi/models/sql/presentation_layout_code.py +38 -0
- package/servers/fastapi/models/sql/slide.py +32 -0
- package/servers/fastapi/models/sql/template.py +27 -0
- package/servers/fastapi/models/sql/template_create_info.py +25 -0
- package/servers/fastapi/models/sql/webhook_subscription.py +22 -0
- package/servers/fastapi/models/sse_response.py +49 -0
- package/servers/fastapi/models/theme_data.py +41 -0
- package/servers/fastapi/models/user_config.py +134 -0
- package/servers/fastapi/scripts/warm_fastembed_cache.py +49 -0
- package/servers/fastapi/server.py +27 -0
- package/servers/fastapi/services/__init__.py +0 -0
- package/servers/fastapi/services/chat/__init__.py +8 -0
- package/servers/fastapi/services/chat/chat_memory_store.py +350 -0
- package/servers/fastapi/services/chat/conversation_store.py +80 -0
- package/servers/fastapi/services/chat/llm_tools.py +9 -0
- package/servers/fastapi/services/chat/memory_layer.py +1345 -0
- package/servers/fastapi/services/chat/presentation_context_store.py +5 -0
- package/servers/fastapi/services/chat/prompts.py +87 -0
- package/servers/fastapi/services/chat/schemas.py +202 -0
- package/servers/fastapi/services/chat/service.py +590 -0
- package/servers/fastapi/services/chat/sql_chat_history.py +212 -0
- package/servers/fastapi/services/chat/tools.py +419 -0
- package/servers/fastapi/services/concurrent_service.py +40 -0
- package/servers/fastapi/services/database.py +76 -0
- package/servers/fastapi/services/document_conversion_service.py +89 -0
- package/servers/fastapi/services/documents_loader.py +357 -0
- package/servers/fastapi/services/export_task_service.py +571 -0
- package/servers/fastapi/services/icon_finder_service.py +179 -0
- package/servers/fastapi/services/image_generation_service.py +879 -0
- package/servers/fastapi/services/liteparse_service.py +469 -0
- package/servers/fastapi/services/mem0_oss_memory.py +201 -0
- package/servers/fastapi/services/mem0_presentation_memory_service.py +241 -0
- package/servers/fastapi/services/office_document_service.py +171 -0
- package/servers/fastapi/services/score_based_chunker.py +163 -0
- package/servers/fastapi/services/temp_file_service.py +176 -0
- package/servers/fastapi/services/webhook_service.py +55 -0
- package/servers/fastapi/templates/__init__.py +1 -0
- package/servers/fastapi/templates/custom_layout_from_db.py +140 -0
- package/servers/fastapi/templates/example.py +104 -0
- package/servers/fastapi/templates/font_utils.py +167 -0
- package/servers/fastapi/templates/fonts_and_slides_preview.py +1203 -0
- package/servers/fastapi/templates/get_layout_by_name.py +231 -0
- package/servers/fastapi/templates/handler.py +785 -0
- package/servers/fastapi/templates/pptx_font_utils.py +1730 -0
- package/servers/fastapi/templates/presentation_layout.py +59 -0
- package/servers/fastapi/templates/preview.py +46 -0
- package/servers/fastapi/templates/prompts.py +221 -0
- package/servers/fastapi/templates/providers.py +203 -0
- package/servers/fastapi/templates/router.py +79 -0
- package/servers/fastapi/templates/slide_layout_jobs.py +111 -0
- package/servers/fastapi/tests/__init__.py +0 -0
- package/servers/fastapi/tests/conftest.py +67 -0
- package/servers/fastapi/tests/edge_cases/test_generation_edge_cases.py +91 -0
- package/servers/fastapi/tests/integration/test_auth_endpoints.py +32 -0
- package/servers/fastapi/tests/integration/test_images_endpoints.py +106 -0
- package/servers/fastapi/tests/integration/test_presentation_generation_flow.py +227 -0
- package/servers/fastapi/tests/mocks/__init__.py +1 -0
- package/servers/fastapi/tests/mocks/llm.py +26 -0
- package/servers/fastapi/tests/mocks/normalizers.py +19 -0
- package/servers/fastapi/tests/regression/test_outline_generation_snapshots.py +52 -0
- package/servers/fastapi/tests/test_chat_conversation_store.py +137 -0
- package/servers/fastapi/tests/test_chat_memory_store.py +249 -0
- package/servers/fastapi/tests/test_documents_loader_unwrap.py +60 -0
- package/servers/fastapi/tests/test_image_generation_comfyui.py +169 -0
- package/servers/fastapi/tests/test_image_generation_openai_compatible.py +267 -0
- package/servers/fastapi/tests/test_liteparse_service.py +108 -0
- package/servers/fastapi/tests/test_mem0_presentation_memory_service.py +223 -0
- package/servers/fastapi/tests/test_pptx_font_utils.py +1254 -0
- package/servers/fastapi/tests/test_presentation_generation_api.py +117 -0
- package/servers/fastapi/tests/unit/test_available_models.py +42 -0
- package/servers/fastapi/tests/unit/test_chat_llm_tools.py +73 -0
- package/servers/fastapi/tests/unit/test_chat_prompts.py +26 -0
- package/servers/fastapi/tests/unit/test_codex_models.py +19 -0
- package/servers/fastapi/tests/unit/test_dict_utils.py +108 -0
- package/servers/fastapi/tests/unit/test_documents_loader.py +165 -0
- package/servers/fastapi/tests/unit/test_filename_utils.py +32 -0
- package/servers/fastapi/tests/unit/test_generate_presentation_outlines.py +377 -0
- package/servers/fastapi/tests/unit/test_generate_web_search_query.py +47 -0
- package/servers/fastapi/tests/unit/test_icon_weights.py +91 -0
- package/servers/fastapi/tests/unit/test_image_generation_errors.py +118 -0
- package/servers/fastapi/tests/unit/test_internal_auth_headers.py +32 -0
- package/servers/fastapi/tests/unit/test_llm_config_web_search.py +72 -0
- package/servers/fastapi/tests/unit/test_llm_utils_and_schema.py +47 -0
- package/servers/fastapi/tests/unit/test_mcp_openapi_templates.py +40 -0
- package/servers/fastapi/tests/unit/test_mcp_server_auth.py +128 -0
- package/servers/fastapi/tests/unit/test_migrations.py +180 -0
- package/servers/fastapi/tests/unit/test_mime_types.py +42 -0
- package/servers/fastapi/tests/unit/test_model_availability.py +98 -0
- package/servers/fastapi/tests/unit/test_office_document_service.py +53 -0
- package/servers/fastapi/tests/unit/test_ollama.py +42 -0
- package/servers/fastapi/tests/unit/test_ollama_models.py +39 -0
- package/servers/fastapi/tests/unit/test_outline_utils.py +95 -0
- package/servers/fastapi/tests/unit/test_runtime_limits.py +176 -0
- package/servers/fastapi/tests/unit/test_small_surfaces_coverage.py +635 -0
- package/servers/fastapi/tests/unit/test_temp_file_service_security.py +86 -0
- package/servers/fastapi/tests/unit/test_template_handler.py +50 -0
- package/servers/fastapi/tests/unit/test_template_providers.py +373 -0
- package/servers/fastapi/tests/unit/test_user_config_store.py +49 -0
- package/servers/fastapi/tests/unit/test_web_search.py +263 -0
- package/servers/fastapi/utils/__init__.py +0 -0
- package/servers/fastapi/utils/asset_directory_utils.py +156 -0
- package/servers/fastapi/utils/async_iterator.py +16 -0
- package/servers/fastapi/utils/available_models.py +98 -0
- package/servers/fastapi/utils/datetime_utils.py +5 -0
- package/servers/fastapi/utils/db_utils.py +126 -0
- package/servers/fastapi/utils/dict_utils.py +89 -0
- package/servers/fastapi/utils/download_helpers.py +80 -0
- package/servers/fastapi/utils/dummy_functions.py +2 -0
- package/servers/fastapi/utils/error_handling.py +1 -0
- package/servers/fastapi/utils/export_utils.py +75 -0
- package/servers/fastapi/utils/file_utils.py +44 -0
- package/servers/fastapi/utils/filename_utils.py +18 -0
- package/servers/fastapi/utils/get_dynamic_models.py +36 -0
- package/servers/fastapi/utils/get_env.py +400 -0
- package/servers/fastapi/utils/get_layout_by_name.py +5 -0
- package/servers/fastapi/utils/icon_weights.py +28 -0
- package/servers/fastapi/utils/image_generation_error.py +69 -0
- package/servers/fastapi/utils/image_provider.py +58 -0
- package/servers/fastapi/utils/internal_http.py +16 -0
- package/servers/fastapi/utils/llm_calls/edit_slide.py +167 -0
- package/servers/fastapi/utils/llm_calls/edit_slide_html.py +95 -0
- package/servers/fastapi/utils/llm_calls/generate_presentation_outlines.py +358 -0
- package/servers/fastapi/utils/llm_calls/generate_presentation_structure.py +184 -0
- package/servers/fastapi/utils/llm_calls/generate_slide_content.py +215 -0
- package/servers/fastapi/utils/llm_calls/generate_web_search_query.py +72 -0
- package/servers/fastapi/utils/llm_calls/select_slide_type_on_edit.py +92 -0
- package/servers/fastapi/utils/llm_client_error_handler.py +23 -0
- package/servers/fastapi/utils/llm_config.py +372 -0
- package/servers/fastapi/utils/llm_provider.py +193 -0
- package/servers/fastapi/utils/llm_utils.py +249 -0
- package/servers/fastapi/utils/mime_types.py +40 -0
- package/servers/fastapi/utils/model_availability.py +302 -0
- package/servers/fastapi/utils/oauth/__init__.py +0 -0
- package/servers/fastapi/utils/oauth/openai_codex.py +614 -0
- package/servers/fastapi/utils/oauth/pkce.py +23 -0
- package/servers/fastapi/utils/ocr_language.py +126 -0
- package/servers/fastapi/utils/ollama.py +173 -0
- package/servers/fastapi/utils/outline_utils.py +205 -0
- package/servers/fastapi/utils/parsers.py +4 -0
- package/servers/fastapi/utils/path_helpers.py +29 -0
- package/servers/fastapi/utils/ppt_utils.py +82 -0
- package/servers/fastapi/utils/process_slides.py +258 -0
- package/servers/fastapi/utils/runtime_limits.py +65 -0
- package/servers/fastapi/utils/schema_utils.py +428 -0
- package/servers/fastapi/utils/set_env.py +339 -0
- package/servers/fastapi/utils/simple_auth.py +344 -0
- package/servers/fastapi/utils/template_vision_errors.py +106 -0
- package/servers/fastapi/utils/theme_utils.py +357 -0
- package/servers/fastapi/utils/user_config.py +503 -0
- package/servers/fastapi/utils/user_config_store.py +195 -0
- package/servers/fastapi/utils/validators.py +48 -0
- package/servers/fastapi/utils/web_search.py +329 -0
- package/servers/nextjs/app/(export)/layout.tsx +10 -0
- package/servers/nextjs/app/(export)/pdf-maker/PdfMakerPage.tsx +293 -0
- package/servers/nextjs/app/(export)/pdf-maker/page.tsx +26 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/Components/DashboardNav.tsx +64 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/Components/DashboardSidebar.tsx +139 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/Components/MarketOpportunitySlide.tsx +133 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/dashboard/components/DashboardPage.tsx +168 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/dashboard/components/EmptyState.tsx +22 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/dashboard/components/Header.tsx +74 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/dashboard/components/PresentationCard.tsx +222 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/dashboard/components/PresentationGrid.tsx +84 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/dashboard/components/PresentationListItem.tsx +44 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/dashboard/loading.tsx +71 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/dashboard/page.tsx +10 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/dashboard/types.ts +16 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/layout.tsx +16 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/ImageProvider.tsx +458 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/PrivacySettings.tsx +100 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/SettingCodex.tsx +447 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/SettingPage.tsx +421 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/SettingSideBar.tsx +68 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/TextProvider.tsx +970 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/WebSearchProvider.tsx +241 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/loading.tsx +104 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/page.tsx +15 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/templates/components/CreateCustomTemplate.tsx +42 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/templates/components/TemplatePanel.tsx +226 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/templates/loading.tsx +59 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/templates/page.tsx +10 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/theme/components/ThemePanel/ColorPickerComponent.tsx +66 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/theme/components/ThemePanel/CustomTabEmpty.tsx +41 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/theme/components/ThemePanel/FontCard.tsx +44 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/theme/components/ThemePanel/StepIndicator.tsx +33 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/theme/components/ThemePanel/ThemeCard.tsx +185 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/theme/components/ThemePanel/constants.ts +205 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/theme/components/ThemePanel/index.tsx +1198 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/theme/components/ThemePanel/types.ts +20 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/theme/components/ThemePanel/utils.ts +10 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/theme/loading.tsx +54 -0
- package/servers/nextjs/app/(presentation-generator)/(dashboard)/theme/page.tsx +9 -0
- package/servers/nextjs/app/(presentation-generator)/components/EditableLayoutWrapper.tsx +472 -0
- package/servers/nextjs/app/(presentation-generator)/components/HeaderNab.tsx +48 -0
- package/servers/nextjs/app/(presentation-generator)/components/IconsEditor.tsx +478 -0
- package/servers/nextjs/app/(presentation-generator)/components/ImageEditor.tsx +760 -0
- package/servers/nextjs/app/(presentation-generator)/components/MarkdownEditor.tsx +42 -0
- package/servers/nextjs/app/(presentation-generator)/components/MarkdownInlineText.tsx +56 -0
- package/servers/nextjs/app/(presentation-generator)/components/NewSlide.tsx +239 -0
- package/servers/nextjs/app/(presentation-generator)/components/PresentationMode.tsx +248 -0
- package/servers/nextjs/app/(presentation-generator)/components/PresentationRender.tsx +120 -0
- package/servers/nextjs/app/(presentation-generator)/components/SlideErrorBoundary.tsx +63 -0
- package/servers/nextjs/app/(presentation-generator)/components/TemplatePreviewComponents.tsx +125 -0
- package/servers/nextjs/app/(presentation-generator)/components/TiptapText.tsx +148 -0
- package/servers/nextjs/app/(presentation-generator)/components/TiptapTextReplacer.tsx +398 -0
- package/servers/nextjs/app/(presentation-generator)/components/V1ContentRender.tsx +148 -0
- package/servers/nextjs/app/(presentation-generator)/components/V1SelectEdit.tsx +781 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/CustomTemplatePage.tsx +272 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/EachSlide/NewEachSlide.tsx +490 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/EachSlide/SlideContentDisplay.tsx +122 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/FileUploadSection.tsx +222 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/FontManager.tsx +255 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/LoadingSpinner.tsx +21 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/SaveLayoutButton.tsx +45 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/SaveLayoutModal.tsx +142 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/SchemaEditor.tsx +1178 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/SchemaEditorPanel.tsx +39 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/SchemaElementHighlighter.tsx +307 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/SchemaHighlightContext.tsx +129 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/SlideContent.tsx +65 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/SlidePreviewSection.tsx +111 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/TemplateCreationProgress.tsx +160 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/TemplateStudioHeader.tsx +17 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/Timer.tsx +101 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/steps/SlidesList.tsx +63 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/steps/Step2FontManagement.tsx +40 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/steps/Step3SlidePreview.tsx +31 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/components/steps/Step4TemplateCreation.tsx +81 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/constants/index.ts +94 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/hooks/index.ts +12 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/hooks/useCompiledLayout.ts +19 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/hooks/useFileUpload.ts +41 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/hooks/useLayoutSaving.ts +127 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/hooks/useSlideEdit.ts +96 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/hooks/useSlideUndoRedo.ts +200 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/hooks/useTemplateCreation.ts +512 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/page.tsx +16 -0
- package/servers/nextjs/app/(presentation-generator)/custom-template/types/index.ts +156 -0
- package/servers/nextjs/app/(presentation-generator)/documents-preview/components/DocumentPreviewPage.tsx +307 -0
- package/servers/nextjs/app/(presentation-generator)/documents-preview/components/MarkdownRenderer.tsx +36 -0
- package/servers/nextjs/app/(presentation-generator)/documents-preview/loading.tsx +16 -0
- package/servers/nextjs/app/(presentation-generator)/documents-preview/page.tsx +12 -0
- package/servers/nextjs/app/(presentation-generator)/hooks/use-keyboard-shortcut.ts +33 -0
- package/servers/nextjs/app/(presentation-generator)/hooks/useFontLoad.tsx +36 -0
- package/servers/nextjs/app/(presentation-generator)/hooks/useFontLoader.tsx +16 -0
- package/servers/nextjs/app/(presentation-generator)/layout.tsx +13 -0
- package/servers/nextjs/app/(presentation-generator)/outline/components/CustomTemplateCard.tsx +50 -0
- package/servers/nextjs/app/(presentation-generator)/outline/components/EmptyStateView.tsx +55 -0
- package/servers/nextjs/app/(presentation-generator)/outline/components/GenerateButton.tsx +48 -0
- package/servers/nextjs/app/(presentation-generator)/outline/components/OutlineContent.tsx +139 -0
- package/servers/nextjs/app/(presentation-generator)/outline/components/OutlineItem.tsx +323 -0
- package/servers/nextjs/app/(presentation-generator)/outline/components/OutlinePage.tsx +124 -0
- package/servers/nextjs/app/(presentation-generator)/outline/components/TemplateSelection.tsx +162 -0
- package/servers/nextjs/app/(presentation-generator)/outline/hooks/useOutlineManagement.ts +34 -0
- package/servers/nextjs/app/(presentation-generator)/outline/hooks/useOutlineStreaming.ts +237 -0
- package/servers/nextjs/app/(presentation-generator)/outline/hooks/usePresentationGeneration.ts +209 -0
- package/servers/nextjs/app/(presentation-generator)/outline/loading.tsx +28 -0
- package/servers/nextjs/app/(presentation-generator)/outline/page.tsx +33 -0
- package/servers/nextjs/app/(presentation-generator)/outline/types/index.ts +24 -0
- package/servers/nextjs/app/(presentation-generator)/outline/types.ts +42 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/Chat.tsx +1475 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/LoadingState.tsx +78 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/Modal.tsx +45 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/NewSlide.tsx +252 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/PresentationHeader.tsx +633 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/PresentationMode.tsx +377 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/PresentationPage.tsx +372 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/SidePanel.tsx +226 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/SlideContent.tsx +395 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/SlideThumbnailCard.tsx +54 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/SortableListItem.tsx +63 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/SortableSlide.tsx +57 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/components/ThemeSelector.tsx +91 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/hooks/PresentationUndoRedo.ts +100 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/hooks/index.ts +4 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/hooks/useAutoSave.tsx +89 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/hooks/usePresentationData.ts +50 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/hooks/usePresentationNavigation.ts +84 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/hooks/usePresentationStreaming.ts +337 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/loading.tsx +19 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/page.tsx +27 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/types/index.ts +16 -0
- package/servers/nextjs/app/(presentation-generator)/presentation/utils/applyPresentationThemeDom.ts +70 -0
- package/servers/nextjs/app/(presentation-generator)/services/api/api-error-handler.ts +160 -0
- package/servers/nextjs/app/(presentation-generator)/services/api/chat.ts +334 -0
- package/servers/nextjs/app/(presentation-generator)/services/api/dashboard.ts +86 -0
- package/servers/nextjs/app/(presentation-generator)/services/api/header.ts +17 -0
- package/servers/nextjs/app/(presentation-generator)/services/api/images.ts +89 -0
- package/servers/nextjs/app/(presentation-generator)/services/api/params.ts +32 -0
- package/servers/nextjs/app/(presentation-generator)/services/api/presentation-generation.ts +241 -0
- package/servers/nextjs/app/(presentation-generator)/services/api/template.ts +78 -0
- package/servers/nextjs/app/(presentation-generator)/services/api/theme.ts +121 -0
- package/servers/nextjs/app/(presentation-generator)/services/api/types.ts +70 -0
- package/servers/nextjs/app/(presentation-generator)/template-preview/components/LoadingStates.tsx +173 -0
- package/servers/nextjs/app/(presentation-generator)/template-preview/components/TemplatePreviewClient.tsx +272 -0
- package/servers/nextjs/app/(presentation-generator)/template-preview/page.tsx +15 -0
- package/servers/nextjs/app/(presentation-generator)/template-preview/types/index.ts +48 -0
- package/servers/nextjs/app/(presentation-generator)/types/slide.ts +38 -0
- package/servers/nextjs/app/(presentation-generator)/upload/components/AdvanceSettings.tsx +242 -0
- package/servers/nextjs/app/(presentation-generator)/upload/components/ConfigurationSelects.tsx +249 -0
- package/servers/nextjs/app/(presentation-generator)/upload/components/CurrentConfig.tsx +68 -0
- package/servers/nextjs/app/(presentation-generator)/upload/components/LanguageSelector.tsx +69 -0
- package/servers/nextjs/app/(presentation-generator)/upload/components/NumberOfSlide.tsx +90 -0
- package/servers/nextjs/app/(presentation-generator)/upload/components/PromptInput.tsx +42 -0
- package/servers/nextjs/app/(presentation-generator)/upload/components/SupportingDoc.tsx +260 -0
- package/servers/nextjs/app/(presentation-generator)/upload/components/UploadPage.cy.tsx +302 -0
- package/servers/nextjs/app/(presentation-generator)/upload/components/UploadPage.tsx +437 -0
- package/servers/nextjs/app/(presentation-generator)/upload/loading.tsx +19 -0
- package/servers/nextjs/app/(presentation-generator)/upload/page.tsx +71 -0
- package/servers/nextjs/app/(presentation-generator)/upload/type.ts +148 -0
- package/servers/nextjs/app/(presentation-generator)/utils/others.ts +117 -0
- package/servers/nextjs/app/(presentation-generator)/utils/prism-languages.ts +14 -0
- package/servers/nextjs/app/ConfigurationInitializer.tsx +230 -0
- package/servers/nextjs/app/MixpanelInitializer.tsx +24 -0
- package/servers/nextjs/app/api/can-change-keys/route.ts +9 -0
- package/servers/nextjs/app/api/export-presentation/file/route.ts +82 -0
- package/servers/nextjs/app/api/export-presentation/route.ts +77 -0
- package/servers/nextjs/app/api/export-presentation-data/[id]/route.ts +62 -0
- package/servers/nextjs/app/api/has-required-key/route.ts +22 -0
- package/servers/nextjs/app/api/read-file/route.ts +26 -0
- package/servers/nextjs/app/api/save-layout/route.ts +70 -0
- package/servers/nextjs/app/api/telemetry-status/route.ts +29 -0
- package/servers/nextjs/app/api/template/custom/route.ts +59 -0
- package/servers/nextjs/app/api/template/route.ts +53 -0
- package/servers/nextjs/app/api/templates/route.ts +78 -0
- package/servers/nextjs/app/api/upload-image/route.ts +54 -0
- package/servers/nextjs/app/api/user-config/route.ts +126 -0
- package/servers/nextjs/app/global-error.tsx +26 -0
- package/servers/nextjs/app/hooks/compileLayout.ts +287 -0
- package/servers/nextjs/app/hooks/useCustomTemplates.ts +461 -0
- package/servers/nextjs/app/hooks/useRemoteSvgIcon.tsx +241 -0
- package/servers/nextjs/app/layout.tsx +97 -0
- package/servers/nextjs/app/loading.tsx +73 -0
- package/servers/nextjs/app/not-found.tsx +51 -0
- package/servers/nextjs/app/page.tsx +28 -0
- package/servers/nextjs/app/presentation-templates/Code/APIRequestResponseSlide.tsx +230 -0
- package/servers/nextjs/app/presentation-templates/Code/CardsGridSlide.tsx +156 -0
- package/servers/nextjs/app/presentation-templates/Code/CodeBlockPanel.tsx +110 -0
- package/servers/nextjs/app/presentation-templates/Code/CodeDiffComparisonSlide.tsx +182 -0
- package/servers/nextjs/app/presentation-templates/Code/CodeExplanationSplitSlide.tsx +232 -0
- package/servers/nextjs/app/presentation-templates/Code/CodeOutputSlide.tsx +177 -0
- package/servers/nextjs/app/presentation-templates/Code/CoverSlide.tsx +52 -0
- package/servers/nextjs/app/presentation-templates/Code/DescriptionAndMetricsSlide.tsx +98 -0
- package/servers/nextjs/app/presentation-templates/Code/DescriptionTextSlide.tsx +53 -0
- package/servers/nextjs/app/presentation-templates/Code/FileTreeStructureSlide.tsx +159 -0
- package/servers/nextjs/app/presentation-templates/Code/FullCodeBlockSlide.tsx +83 -0
- package/servers/nextjs/app/presentation-templates/Code/MetricsGridSlide.tsx +83 -0
- package/servers/nextjs/app/presentation-templates/Code/TableOfContentSlide.tsx +96 -0
- package/servers/nextjs/app/presentation-templates/Code/TableSlide.tsx +187 -0
- package/servers/nextjs/app/presentation-templates/Code/TerminalCommandSlide.tsx +100 -0
- package/servers/nextjs/app/presentation-templates/Code/TwoColumnBulletListSlide.tsx +89 -0
- package/servers/nextjs/app/presentation-templates/Code/WorkflowSlide.tsx +148 -0
- package/servers/nextjs/app/presentation-templates/Code/codeBlockFitting.ts +910 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationAboutSlide.tsx +132 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationAssessmentRubricSlide.tsx +204 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationChartPrimitives.tsx +960 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationContentSplitSlide.tsx +96 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationCoverSlide.tsx +73 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationCurriculumStructureSlide.tsx +164 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationImageGallerySlide.tsx +89 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationLearningOutcomesSlide.tsx +164 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationLessonPlanSlide.tsx +200 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationQAContactSlide.tsx +239 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationReportChartSlide.tsx +241 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationServicesSplitSlide.tsx +183 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationStatisticsGridSlide.tsx +150 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationTableOfContentsSlide.tsx +143 -0
- package/servers/nextjs/app/presentation-templates/Education/EducationTimelineSlide.tsx +274 -0
- package/servers/nextjs/app/presentation-templates/ExampleSlideLayout.tsx +100 -0
- package/servers/nextjs/app/presentation-templates/ExampleSlideLayoutTemplate.tsx +32 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/BusinessChallengesCardsSlide.tsx +156 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/BusinessChallengesGridSlide.tsx +98 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/ComparisonChartSlide.tsx +349 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/ComparisonTableWithTextSlide.tsx +235 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/CoverSlide.tsx +92 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/FeatureHighlightsSlide.tsx +217 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/ImageGallerySlide.tsx +150 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/IntroductionSlide.tsx +115 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/KpiCardsSlide.tsx +147 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/MeetTeamSlide.tsx +173 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/MissionVisionSlide.tsx +118 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/NextStepsSlide.tsx +214 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/OurServicesSlide.tsx +154 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/PricingPlanSlide.tsx +182 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/ProblemSolutionSlide.tsx +253 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/ProcessSlide.tsx +202 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/ProductRoadmapSlide.tsx +193 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/ReportSnapshotSlide.tsx +1081 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/TableOfContentSlide.tsx +116 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/TargetAudienceSlide.tsx +201 -0
- package/servers/nextjs/app/presentation-templates/ProductOverview/UseCasesSlide.tsx +178 -0
- package/servers/nextjs/app/presentation-templates/Report/ActionPlanSlide.tsx +137 -0
- package/servers/nextjs/app/presentation-templates/Report/AppendixNotesSlide.tsx +127 -0
- package/servers/nextjs/app/presentation-templates/Report/BarChartWithBulletListWithTitleDescriptionIconSlide.tsx +167 -0
- package/servers/nextjs/app/presentation-templates/Report/BulletListWithIconTitleDescriptionSlide.tsx +125 -0
- package/servers/nextjs/app/presentation-templates/Report/ClosingContactSlide.tsx +136 -0
- package/servers/nextjs/app/presentation-templates/Report/DataAnalysisDashboardSlide.tsx +272 -0
- package/servers/nextjs/app/presentation-templates/Report/ExecutiveSummarySlide.tsx +177 -0
- package/servers/nextjs/app/presentation-templates/Report/HorizontalHeightSpanningImagesWithTitleSlide.tsx +129 -0
- package/servers/nextjs/app/presentation-templates/Report/IntroCoverSlide.tsx +72 -0
- package/servers/nextjs/app/presentation-templates/Report/KeyFindingsSlide.tsx +136 -0
- package/servers/nextjs/app/presentation-templates/Report/MethodologySourcesSlide.tsx +202 -0
- package/servers/nextjs/app/presentation-templates/Report/MetricsSlide.tsx +192 -0
- package/servers/nextjs/app/presentation-templates/Report/MilestoneSlide.tsx +141 -0
- package/servers/nextjs/app/presentation-templates/Report/RecommendationsSlide.tsx +145 -0
- package/servers/nextjs/app/presentation-templates/Report/ReportSectionIndexSlide.tsx +106 -0
- package/servers/nextjs/app/presentation-templates/Report/RiskLimitationsSlide.tsx +168 -0
- package/servers/nextjs/app/presentation-templates/Report/TitleChartWithMetricsCardsSlide.tsx +203 -0
- package/servers/nextjs/app/presentation-templates/Report/TitleDescriptionChartSlide.tsx +147 -0
- package/servers/nextjs/app/presentation-templates/Report/TitleDescriptionImageSlide.tsx +110 -0
- package/servers/nextjs/app/presentation-templates/Report/TitleImageBulletCardsSlide.tsx +160 -0
- package/servers/nextjs/app/presentation-templates/Report/TitleMetricsSlide.tsx +161 -0
- package/servers/nextjs/app/presentation-templates/Report/TitleWorkflowWithTitleDescriptionSlide.tsx +239 -0
- package/servers/nextjs/app/presentation-templates/Report/flexibleReportChart.tsx +1006 -0
- package/servers/nextjs/app/presentation-templates/defaultSchemes.ts +19 -0
- package/servers/nextjs/app/presentation-templates/general/BasicInfoSlideLayout.tsx +107 -0
- package/servers/nextjs/app/presentation-templates/general/BulletIconsOnlySlideLayout.tsx +209 -0
- package/servers/nextjs/app/presentation-templates/general/BulletWithIconsSlideLayout.tsx +180 -0
- package/servers/nextjs/app/presentation-templates/general/ChartWithBulletsSlideLayout.tsx +205 -0
- package/servers/nextjs/app/presentation-templates/general/GeneralChartPrimitives.tsx +315 -0
- package/servers/nextjs/app/presentation-templates/general/IntroSlideLayout.tsx +135 -0
- package/servers/nextjs/app/presentation-templates/general/MetricsSlideLayout.tsx +171 -0
- package/servers/nextjs/app/presentation-templates/general/MetricsWithImageSlideLayout.tsx +141 -0
- package/servers/nextjs/app/presentation-templates/general/NumberedBulletsSlideLayout.tsx +161 -0
- package/servers/nextjs/app/presentation-templates/general/QuoteSlideLayout.tsx +135 -0
- package/servers/nextjs/app/presentation-templates/general/TableInfoSlideLayout.tsx +261 -0
- package/servers/nextjs/app/presentation-templates/general/TableOfContentsSlideLayout.tsx +158 -0
- package/servers/nextjs/app/presentation-templates/general/TeamSlideLayout.tsx +182 -0
- package/servers/nextjs/app/presentation-templates/index.tsx +3551 -0
- package/servers/nextjs/app/presentation-templates/modern/BulletWithIconsSlideLayout.tsx +192 -0
- package/servers/nextjs/app/presentation-templates/modern/BulletsWithIconsDescriptionGrid.tsx +225 -0
- package/servers/nextjs/app/presentation-templates/modern/ChartOrTableWithDescription.tsx +212 -0
- package/servers/nextjs/app/presentation-templates/modern/ChartOrTableWithMetricsDescription.tsx +275 -0
- package/servers/nextjs/app/presentation-templates/modern/ImageAndDescriptionLayout.tsx +152 -0
- package/servers/nextjs/app/presentation-templates/modern/ImageListWithDescriptionSlideLayout.tsx +193 -0
- package/servers/nextjs/app/presentation-templates/modern/ImagesWithDescriptionLayout.tsx +201 -0
- package/servers/nextjs/app/presentation-templates/modern/IntroSlideLayout.tsx +141 -0
- package/servers/nextjs/app/presentation-templates/modern/MetricsWithDescription.tsx +168 -0
- package/servers/nextjs/app/presentation-templates/modern/ModernChartPrimitives.tsx +389 -0
- package/servers/nextjs/app/presentation-templates/modern/TableOfContentsLayout.tsx +112 -0
- package/servers/nextjs/app/presentation-templates/neo-general/BulletIconsOnlySlideLayout.tsx +212 -0
- package/servers/nextjs/app/presentation-templates/neo-general/BulletWithIconsSlideLayout.tsx +182 -0
- package/servers/nextjs/app/presentation-templates/neo-general/ChallengeAndOutcomeWithOneStat.tsx +202 -0
- package/servers/nextjs/app/presentation-templates/neo-general/ChartWithBulletsSlideLayout.tsx +582 -0
- package/servers/nextjs/app/presentation-templates/neo-general/GridBasedEightMetricsSnapshots.tsx +176 -0
- package/servers/nextjs/app/presentation-templates/neo-general/HeadlineDescriptionWithDoubleImage.tsx +128 -0
- package/servers/nextjs/app/presentation-templates/neo-general/HeadlineDescriptionWithImage.tsx +104 -0
- package/servers/nextjs/app/presentation-templates/neo-general/HeadlineTextWithBulletsAndStats.tsx +144 -0
- package/servers/nextjs/app/presentation-templates/neo-general/IndexedThreeColumnList.tsx +163 -0
- package/servers/nextjs/app/presentation-templates/neo-general/LayoutTextBlockWithMetricCards.tsx +324 -0
- package/servers/nextjs/app/presentation-templates/neo-general/LeftAlignQuote.tsx +118 -0
- package/servers/nextjs/app/presentation-templates/neo-general/MetricsWithImageSlideLayout.tsx +144 -0
- package/servers/nextjs/app/presentation-templates/neo-general/MultiChartGridSlideLayout.tsx +672 -0
- package/servers/nextjs/app/presentation-templates/neo-general/NeoChartPrimitives.tsx +854 -0
- package/servers/nextjs/app/presentation-templates/neo-general/NumberedBulletsSlideLayout.tsx +163 -0
- package/servers/nextjs/app/presentation-templates/neo-general/QuoteSlideLayout.tsx +139 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TableOfContentWithoutPageNumber.tsx +163 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TeamSlideLayout.tsx +184 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TextSplitWithEmphasisBlock.tsx +119 -0
- package/servers/nextjs/app/presentation-templates/neo-general/ThankYouContactInfoFooterImageSlide.tsx +120 -0
- package/servers/nextjs/app/presentation-templates/neo-general/Timeline.tsx +179 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TitleDescriptionMultiChartGridWithBullets.tsx +674 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TitleDescriptionMultiChartGridWithMetrics.tsx +700 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TitleDescriptionWithTable.tsx +238 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TitleMetricValueMetricLabelFunnelStages.tsx +133 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TitleMetricsWithChart.tsx +861 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TitleThreeColumnRiskConstraints.tsx +124 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TitleTopDescriptionFourTeamMembersGrid.tsx +156 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TitleWithFullWidthChart.tsx +836 -0
- package/servers/nextjs/app/presentation-templates/neo-general/TitleWithGridBasedHeadingAndDescription.tsx +129 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/NeoChartPrimitives.tsx +854 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDescriptionBulletList.tsx +92 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDescriptionContactList.tsx +153 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDescriptionDualMetricsGrid.tsx +129 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDescriptionIconTimeline.tsx +134 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDescriptionImageRight.tsx +84 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDescriptionMetricsChart.tsx +982 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDescriptionMetricsImage.tsx +131 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDescriptionMultiChartGrid.tsx +539 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDescriptionMultiChartGridWithBullets.tsx +560 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDescriptionMultiChartGridWithMetrics.tsx +563 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDescriptionTable.tsx +198 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDualComparisonCards.tsx +109 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleDualComparisonCharts.tsx +1096 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleHorizontalAlternatingTimeline.tsx +151 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleKpiSnapshotGrid.tsx +109 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleSubtitlesChart.tsx +996 -0
- package/servers/nextjs/app/presentation-templates/neo-modern/TitleTwoColumnNumberedList.tsx +135 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/NeoChartPrimitives.tsx +854 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleBadgeChart.tsx +1030 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDescriptionBulletList.tsx +90 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDescriptionContactCards.tsx +111 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDescriptionIconList.tsx +137 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDescriptionImageRight.tsx +112 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDescriptionMultiChartGrid.tsx +540 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDescriptionMultiChartGridWithBullets.tsx +561 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDescriptionMultiChartGridWithMetrics.tsx +564 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDescriptionRadialCards.tsx +162 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDescriptionTable.tsx +176 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDescriptionTimeline.tsx +141 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDualChartsComparison.tsx +982 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleDualComparisonCards.tsx +139 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleKpiGrid.tsx +111 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleMetricsChart.tsx +1000 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitleMetricsImage.tsx +122 -0
- package/servers/nextjs/app/presentation-templates/neo-standard/TitlePointsDonutGrid.tsx +163 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/NeoChartPrimitives.tsx +854 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleCenteredChart.tsx +463 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleChartMetricsSidebar.tsx +1034 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleDescriptionBulletList.tsx +106 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleDescriptionDataTable.tsx +200 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleDescriptionFourChartsSixBullets.tsx +545 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleDescriptionImageRight.tsx +101 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleDescriptionMetricsGrid.tsx +109 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleDescriptionMetricsGridImage.tsx +177 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleDescriptionSixChartsFourMetrics.tsx +540 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleDescriptionSixChartsGrid.tsx +516 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleDualComparisonBlocks.tsx +137 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleLabelDescriptionStatCards.tsx +154 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleSubtitleTeamMemberCards.tsx +165 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleTaglineDescriptionNumberedSteps.tsx +144 -0
- package/servers/nextjs/app/presentation-templates/neo-swift/TitleThreeByThreeMetricsGrid.tsx +162 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/AdaptiveMediaCardGrid.tsx +198 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/AdaptiveValueCardGrid.tsx +262 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/BusinessModelSlide.tsx +123 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/CardsWithChartSplit.tsx +240 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/CenteredCoverWithFooterMeta.tsx +96 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/ClosingContactSlide.tsx +93 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/CompetitivePositioningSlide.tsx +134 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/DefensibilitySlide.tsx +127 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/FinancialProjectionSlide.tsx +139 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/FullWidthStatement.tsx +65 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/FundingAskSlide.tsx +119 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/GoToMarketSlide.tsx +120 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/HeadlineWithDetailColumns.tsx +152 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/HorizontalTimeline.tsx +317 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/MarketSizeSlide.tsx +90 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/MediaAndTextSplit.tsx +147 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/NumberedMultiColumnOverview.tsx +140 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/OverlappingCircleCards.tsx +221 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/PanelListWithMedia.tsx +269 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/PitchDeckChart.tsx +727 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/ProblemEvidenceSlide.tsx +188 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/ProductWorkflowSlide.tsx +166 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/TeamCredentialsSlide.tsx +118 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/TextAndChartSplit.tsx +145 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/TractionMetricsSlide.tsx +107 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/ValuePropositionSlide.tsx +143 -0
- package/servers/nextjs/app/presentation-templates/pitch-deck/pitchDeckSchemas.ts +132 -0
- package/servers/nextjs/app/presentation-templates/standard/ChartLeftTextRightLayout.tsx +386 -0
- package/servers/nextjs/app/presentation-templates/standard/ContactLayout.tsx +209 -0
- package/servers/nextjs/app/presentation-templates/standard/HeadingBulletImageDescriptionLayout.tsx +139 -0
- package/servers/nextjs/app/presentation-templates/standard/IconBulletDescriptionLayout.tsx +172 -0
- package/servers/nextjs/app/presentation-templates/standard/IconImageDescriptionLayout.tsx +185 -0
- package/servers/nextjs/app/presentation-templates/standard/ImageListWithDescriptionLayout.tsx +150 -0
- package/servers/nextjs/app/presentation-templates/standard/IntroSlideLayout.tsx +163 -0
- package/servers/nextjs/app/presentation-templates/standard/MetricsDescriptionLayout.tsx +180 -0
- package/servers/nextjs/app/presentation-templates/standard/NumberedBulletSingleImageLayout.tsx +177 -0
- package/servers/nextjs/app/presentation-templates/standard/TableOfContentsLayout.tsx +178 -0
- package/servers/nextjs/app/presentation-templates/standard/VisualMetricsSlideLayout.tsx +191 -0
- package/servers/nextjs/app/presentation-templates/swift/BulletsWithIconsTitleDescription.tsx +245 -0
- package/servers/nextjs/app/presentation-templates/swift/IconBulletListDescription.tsx +204 -0
- package/servers/nextjs/app/presentation-templates/swift/ImageListDescription.tsx +170 -0
- package/servers/nextjs/app/presentation-templates/swift/IntroSlideLayout.tsx +176 -0
- package/servers/nextjs/app/presentation-templates/swift/MetricsNumbers.tsx +182 -0
- package/servers/nextjs/app/presentation-templates/swift/SimpleBulletPointsLayout.tsx +133 -0
- package/servers/nextjs/app/presentation-templates/swift/TableOfContents.tsx +148 -0
- package/servers/nextjs/app/presentation-templates/swift/TableorChart.tsx +491 -0
- package/servers/nextjs/app/presentation-templates/swift/Timeline.tsx +177 -0
- package/servers/nextjs/app/presentation-templates/utils.ts +92 -0
- package/servers/nextjs/app/providers.tsx +10 -0
- package/servers/nextjs/app/schema/layout.tsx +11 -0
- package/servers/nextjs/app/schema/page.tsx +94 -0
- package/servers/nextjs/components/Announcement.tsx +11 -0
- package/servers/nextjs/components/AnthropicConfig.tsx +256 -0
- package/servers/nextjs/components/Auth/AuthGate.tsx +345 -0
- package/servers/nextjs/components/Auth/LogoutButton.tsx +53 -0
- package/servers/nextjs/components/BackBtn.tsx +15 -0
- package/servers/nextjs/components/BedrockManualFields.tsx +163 -0
- package/servers/nextjs/components/CodexConfig.tsx +424 -0
- package/servers/nextjs/components/CustomConfig.tsx +249 -0
- package/servers/nextjs/components/GoogleConfig.tsx +243 -0
- package/servers/nextjs/components/Header.tsx +32 -0
- package/servers/nextjs/components/Home.tsx +41 -0
- package/servers/nextjs/components/ImageSelectionConfig.tsx +428 -0
- package/servers/nextjs/components/LLMSelection.tsx +415 -0
- package/servers/nextjs/components/MarkDownRender.tsx +38 -0
- package/servers/nextjs/components/OllamaConfig.tsx +613 -0
- package/servers/nextjs/components/OnBoarding/FinalStep.tsx +116 -0
- package/servers/nextjs/components/OnBoarding/OnBoardingHeader.tsx +56 -0
- package/servers/nextjs/components/OnBoarding/OnBoardingSlidebar.tsx +19 -0
- package/servers/nextjs/components/OnBoarding/PresentonMode.tsx +1756 -0
- package/servers/nextjs/components/OpenAICompatibleImageFields.tsx +359 -0
- package/servers/nextjs/components/OpenAIConfig.tsx +277 -0
- package/servers/nextjs/components/ToolTip.tsx +23 -0
- package/servers/nextjs/components/VertexAzureManualFields.tsx +195 -0
- package/servers/nextjs/components/Wrapper.tsx +11 -0
- package/servers/nextjs/components/ui/accordion.tsx +57 -0
- package/servers/nextjs/components/ui/button.tsx +57 -0
- package/servers/nextjs/components/ui/card.tsx +76 -0
- package/servers/nextjs/components/ui/chart.tsx +365 -0
- package/servers/nextjs/components/ui/collapsible.tsx +11 -0
- package/servers/nextjs/components/ui/command.tsx +152 -0
- package/servers/nextjs/components/ui/dialog.tsx +121 -0
- package/servers/nextjs/components/ui/input.tsx +25 -0
- package/servers/nextjs/components/ui/label.tsx +26 -0
- package/servers/nextjs/components/ui/loader.tsx +17 -0
- package/servers/nextjs/components/ui/overlay-loader.tsx +171 -0
- package/servers/nextjs/components/ui/popover.tsx +33 -0
- package/servers/nextjs/components/ui/progress-bar.tsx +80 -0
- package/servers/nextjs/components/ui/progress.tsx +28 -0
- package/servers/nextjs/components/ui/radio-group.tsx +43 -0
- package/servers/nextjs/components/ui/scroll-area.tsx +48 -0
- package/servers/nextjs/components/ui/select.tsx +164 -0
- package/servers/nextjs/components/ui/separator.tsx +31 -0
- package/servers/nextjs/components/ui/sheet.tsx +140 -0
- package/servers/nextjs/components/ui/skeleton.tsx +15 -0
- package/servers/nextjs/components/ui/slider.tsx +28 -0
- package/servers/nextjs/components/ui/sonner.tsx +275 -0
- package/servers/nextjs/components/ui/switch.tsx +29 -0
- package/servers/nextjs/components/ui/table.tsx +120 -0
- package/servers/nextjs/components/ui/tabs.tsx +55 -0
- package/servers/nextjs/components/ui/textarea.tsx +24 -0
- package/servers/nextjs/components/ui/toggle.tsx +45 -0
- package/servers/nextjs/components/ui/tooltip.tsx +32 -0
- package/servers/nextjs/cypress/support/commands.ts +37 -0
- package/servers/nextjs/cypress/support/component.ts +36 -0
- package/servers/nextjs/cypress.config.ts +10 -0
- package/servers/nextjs/lib/compile-template-schema.ts +432 -0
- package/servers/nextjs/lib/fastapi-internal.ts +51 -0
- package/servers/nextjs/lib/readable-local-file.ts +69 -0
- package/servers/nextjs/lib/run-bundled-presentation-export.ts +284 -0
- package/servers/nextjs/lib/runtime-limits.ts +34 -0
- package/servers/nextjs/lib/server-template-layouts.ts +217 -0
- package/servers/nextjs/lib/user-config-store.ts +232 -0
- package/servers/nextjs/lib/utils.ts +6 -0
- package/servers/nextjs/models/errors.ts +7 -0
- package/servers/nextjs/next-env.d.ts +6 -0
- package/servers/nextjs/proxy.ts +118 -0
- package/servers/nextjs/store/slices/presentationGenUpload.ts +34 -0
- package/servers/nextjs/store/slices/presentationGeneration.ts +430 -0
- package/servers/nextjs/store/slices/undoRedoSlice.ts +142 -0
- package/servers/nextjs/store/slices/userConfig.ts +32 -0
- package/servers/nextjs/store/store.ts +18 -0
- package/servers/nextjs/tailwind.config.ts +96 -0
- package/servers/nextjs/types/global.d.ts +62 -0
- package/servers/nextjs/types/llm_config.ts +135 -0
- package/servers/nextjs/types/presentation.ts +21 -0
- package/servers/nextjs/utils/api.ts +271 -0
- package/servers/nextjs/utils/auth.ts +20 -0
- package/servers/nextjs/utils/authErrors.ts +22 -0
- package/servers/nextjs/utils/codexModels.ts +19 -0
- package/servers/nextjs/utils/constant.ts +0 -0
- package/servers/nextjs/utils/error_helpers.ts +12 -0
- package/servers/nextjs/utils/image-url-converter.ts +52 -0
- package/servers/nextjs/utils/mixpanel.ts +273 -0
- package/servers/nextjs/utils/providerConstants.ts +330 -0
- package/servers/nextjs/utils/providerUtils.ts +363 -0
- package/servers/nextjs/utils/serverAuth.ts +98 -0
- package/servers/nextjs/utils/storeHelpers.ts +372 -0
- package/start.js +641 -0
- package/test_server.py +78 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
<img src="https://img.shields.io/badge/version-1.
|
|
9
|
+
<img src="https://img.shields.io/badge/version-1.13.0-blue?style=for-the-badge" alt="Version">
|
|
10
10
|
<img src="https://img.shields.io/badge/tools-66+-teal?style=for-the-badge" alt="Tools">
|
|
11
11
|
<img src="https://img.shields.io/badge/node-%3E%3D18-green?style=for-the-badge" alt="Node">
|
|
12
12
|
</p>
|
|
@@ -233,6 +233,7 @@ The embedding model is expected at `.code-intel/models/model.onnx`. Download it:
|
|
|
233
233
|
|
|
234
234
|
| Version | Date | Ticket | Changes |
|
|
235
235
|
|---------|------|--------|---------|
|
|
236
|
+
| 1.13.0 | 2026-07-19 | — | Presentation servers (FastAPI + Next.js), Electron desktop app, architecture diagrams, utility scripts |
|
|
236
237
|
| 1.12.0 | 2026-07-19 | — | Version bump + README sync across all packages |
|
|
237
238
|
| 1.11.0 | 2026-07-18 | SA4E-42/47 | DatabaseAdapter refactoring (engine, memory, graph, indexer) + LLM Context Chain for document indexing (analyzer, prompts, TaskWorker, structured_map, full content extraction). 66 files, 570 tests pass. |
|
|
238
239
|
| 1.10.1 | 2026-07-16 | — | Bump version + update README |
|
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
# Business Requirements Document (BRD)
|
|
2
|
+
|
|
3
|
+
## Microsoft Graph API Email Integration — GRAPH-EMAIL
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Document Information
|
|
8
|
+
|
|
9
|
+
| Field | Value |
|
|
10
|
+
|-------|-------|
|
|
11
|
+
| Ticket | GRAPH-EMAIL |
|
|
12
|
+
| Title | Microsoft Graph API Email Integration for Salesforce |
|
|
13
|
+
| Author | BA Agent |
|
|
14
|
+
| Version | 1.0 |
|
|
15
|
+
| Date | 2025-01-27 |
|
|
16
|
+
| Status | Draft |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Revision History
|
|
21
|
+
|
|
22
|
+
| Version | Date | Author | Changes |
|
|
23
|
+
|---------|------|--------|---------|
|
|
24
|
+
| 1.0 | 2025-01-27 | BA Agent | Initiate document — generated from source code analysis |
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 1. Introduction
|
|
29
|
+
|
|
30
|
+
### 1.1 Scope
|
|
31
|
+
|
|
32
|
+
This project implements a comprehensive email sending solution for Salesforce that integrates with Microsoft Graph API as an alternative to the native Salesforce email service. The system provides:
|
|
33
|
+
|
|
34
|
+
- Dual email sender support (Salesforce native and Microsoft Graph API)
|
|
35
|
+
- Full Messaging.SingleEmailMessage compatibility (template rendering, merge fields, attachments, CC/BCC, OrgWideEmailAddress)
|
|
36
|
+
- Large attachment handling via upload sessions (>3MB) and async Queueable chains (>8MB)
|
|
37
|
+
- Batch sending via Graph API $batch endpoint (up to 20 per batch)
|
|
38
|
+
- Activity tracking (EmailMessage + Task records for saveAsActivity)
|
|
39
|
+
- Orphaned resource cleanup (scheduled jobs for draft messages and ContentVersion records)
|
|
40
|
+
- Inbound email processing (Email Service handler)
|
|
41
|
+
- Configurable sender selection via Custom Metadata Type
|
|
42
|
+
|
|
43
|
+
### 1.2 Out of Scope
|
|
44
|
+
|
|
45
|
+
- Calendar integration via Microsoft Graph API
|
|
46
|
+
- Teams messaging integration
|
|
47
|
+
- OneDrive/SharePoint file management
|
|
48
|
+
- Real-time push notifications from Graph API (webhooks/subscriptions)
|
|
49
|
+
- Multi-tenant isolation (single org, single Graph API app registration)
|
|
50
|
+
|
|
51
|
+
### 1.3 Preliminary Requirement
|
|
52
|
+
|
|
53
|
+
- Microsoft Entra ID (Azure AD) App Registration with Mail.Send permission (Application type)
|
|
54
|
+
- Salesforce Platform Cache partition named "MsGraphGateway" with at least 1KB Org Cache
|
|
55
|
+
- Custom Metadata Type Graph_API_Config__mdt with record "Default" configured
|
|
56
|
+
- Custom Metadata Type Email_Sender_Config__mdt for sender type selection
|
|
57
|
+
- Remote Site Settings for graph.microsoft.com and login.microsoftonline.com
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 2. Business Requirements
|
|
62
|
+
|
|
63
|
+
### 2.1 High Level Process Map
|
|
64
|
+
|
|
65
|
+

|
|
66
|
+
|
|
67
|
+
The system replaces or supplements Salesforce native email sending with Microsoft Graph API, allowing organizations to:
|
|
68
|
+
1. Send emails from a shared mailbox via Graph API (bypassing Salesforce daily email limits)
|
|
69
|
+
2. Maintain full compatibility with existing Apex code using Messaging.SingleEmailMessage
|
|
70
|
+
3. Seamlessly switch between Salesforce and Graph API senders via configuration
|
|
71
|
+
4. Handle large file attachments that exceed Salesforce standard email limits
|
|
72
|
+
5. Automatically clean up orphaned resources (draft messages, temporary ContentVersions)
|
|
73
|
+
|
|
74
|
+
### 2.2 List of User Stories / Use Cases
|
|
75
|
+
|
|
76
|
+

|
|
77
|
+
|
|
78
|
+
| # | Story / Use Case | Priority | Source |
|
|
79
|
+
|---|------------------|----------|--------|
|
|
80
|
+
| 1 | As a Salesforce Admin, I want to configure which email sender (Salesforce or GraphAPI) is used by default, so that I can control email routing without code changes | MUST HAVE | EmailSenderFactory |
|
|
81
|
+
| 2 | As a Developer, I want to send emails via a unified API (EmailSenderUtil) that works identically regardless of the underlying sender | MUST HAVE | EmailSenderUtil |
|
|
82
|
+
| 3 | As a Developer, I want Graph API sends to fully support Messaging.SingleEmailMessage features (templates, merge fields, CC/BCC, OrgWideEmailAddress) | MUST HAVE | EmailSenderGraphApi |
|
|
83
|
+
| 4 | As a System, I want to send emails in batch (up to 20 per request) via Graph API $batch endpoint to minimize API callouts | MUST HAVE | MsGraphEmailGateway |
|
|
84
|
+
| 5 | As a System, I want to handle large file attachments (>3MB) via upload sessions and >8MB via async Queueable chains | MUST HAVE | MsGraphLargeAttachmentSender |
|
|
85
|
+
| 6 | As a System, I want to track all sent emails as EmailMessage + Task records when saveAsActivity=true | SHOULD HAVE | EmailSenderGraphApi |
|
|
86
|
+
| 7 | As a System, I want to automatically clean up orphaned draft messages on Graph API after failed async sends | SHOULD HAVE | MsGraphOrphanedDraftCleanupService |
|
|
87
|
+
| 8 | As a System, I want to automatically clean up orphaned ContentVersion records from failed Queueable chains | SHOULD HAVE | OrphanedCVCleanup |
|
|
88
|
+
| 9 | As a System, I want to log all Graph API errors and cleanup operations to Graph_API_Log__c | SHOULD HAVE | GraphAPILogger |
|
|
89
|
+
| 10 | As a Developer, I want to process inbound emails via an Email Service handler that creates Tasks | COULD HAVE | EmailInboundHandler |
|
|
90
|
+
| 11 | As a System, I want to respect opt-out policies (EXCLUDE/REJECT/SEND) for Contacts and Leads | MUST HAVE | EmailSenderGraphApi |
|
|
91
|
+
| 12 | As a System, I want allOrNone semantics for batch sends | MUST HAVE | EmailSenderGraphApi |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
### 2.3 Details of User Stories
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
#### Business Flow
|
|
100
|
+
|
|
101
|
+
**Outbound Email Flow (Graph API Path):**
|
|
102
|
+
|
|
103
|
+
**Step 1:** Business code calls EmailSenderUtil.send(mails) or convenience methods (sendText, sendHtml)
|
|
104
|
+
|
|
105
|
+
**Step 2:** EmailSenderUtil reads Email_Sender_Config__mdt to determine current sender type
|
|
106
|
+
|
|
107
|
+
**Step 3:** EmailSenderFactory returns the appropriate IEmailSender implementation
|
|
108
|
+
|
|
109
|
+
**Step 4:** EmailSenderGraphApi prepares each email — queries bulk data (targets, OWA, signature), resolves templates, merges dynamic fields, resolves fromAddress, splits attachments by size, builds Graph API JSON payload
|
|
110
|
+
|
|
111
|
+
**Step 5:** Emails sent via MsGraphEmailGateway — small attachments via $batch, medium (3-8MB) via upload session, large (>8MB) via Queueable chain
|
|
112
|
+
|
|
113
|
+
**Step 6:** Results mapped back to Messaging.SendEmailResult format
|
|
114
|
+
|
|
115
|
+
**Step 7:** If saveAsActivity=true, bulk insert EmailMessage + Task + EmailMessageRelation + ContentVersion
|
|
116
|
+
|
|
117
|
+
**Step 8:** If allOrNone=true and any failure, mark failed emails as ALL_OR_NONE (QUEUED emails unchanged)
|
|
118
|
+
|
|
119
|
+
> Note: All HTTP callouts complete BEFORE any DML operations (Salesforce governor limit compliance)
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
#### STORY 1: Configurable Email Sender Selection
|
|
124
|
+
|
|
125
|
+
> As a Salesforce Admin, I want to configure which email sender is used by default, so that I can control email routing without code changes.
|
|
126
|
+
|
|
127
|
+
**Requirement Details:**
|
|
128
|
+
|
|
129
|
+
1. System reads sender type from Email_Sender_Config__mdt (field: Sender_Type__c)
|
|
130
|
+
2. Supported types: "Salesforce" (native) and "GraphAPI" (Microsoft Graph)
|
|
131
|
+
3. If CMT record not found or query fails, default to "Salesforce"
|
|
132
|
+
4. Sender instances are cached per-transaction (lazy initialization)
|
|
133
|
+
5. EmailSenderFactory.register(type, sender) allows runtime extension
|
|
134
|
+
|
|
135
|
+
**Acceptance Criteria:**
|
|
136
|
+
|
|
137
|
+
1. When Email_Sender_Config__mdt.Default.Sender_Type__c = 'GraphAPI', all emails route through Graph API
|
|
138
|
+
2. When CMT record missing, emails fall back to Salesforce native
|
|
139
|
+
3. Changing CMT value takes effect on next transaction without deploy
|
|
140
|
+
4. EmailSenderFactory.getAvailableTypes() returns all registered sender types
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
#### STORY 2: Unified Email Sending API
|
|
145
|
+
|
|
146
|
+
> As a Developer, I want to send emails via a unified API that works identically regardless of the underlying sender.
|
|
147
|
+
|
|
148
|
+
**Requirement Details:**
|
|
149
|
+
|
|
150
|
+
1. EmailSenderUtil serves as the single Facade for all email operations
|
|
151
|
+
2. Provides convenience builders: newText(), newHtml(), newWithTemplate()
|
|
152
|
+
3. Provides convenience senders: sendText(), sendHtml(), sendToContact()
|
|
153
|
+
4. Supports explicit sender type override: send(mails, 'GraphAPI')
|
|
154
|
+
5. Helper methods: createResult(), isQueued(), normalizeStatusCode()
|
|
155
|
+
|
|
156
|
+
**Acceptance Criteria:**
|
|
157
|
+
|
|
158
|
+
1. Existing code using EmailSenderUtil.send(mails) works without modification
|
|
159
|
+
2. EmailSenderUtil.sendText('a@b.com', 'Sub', 'Body') returns a single SendEmailResult
|
|
160
|
+
3. EmailSenderUtil.isQueued(result) correctly identifies async-queued emails
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
#### STORY 3: Full Messaging.SingleEmailMessage Compatibility via Graph API
|
|
165
|
+
|
|
166
|
+
> As a Developer, I want Graph API sends to support all Messaging.SingleEmailMessage features.
|
|
167
|
+
|
|
168
|
+
**Requirement Details:**
|
|
169
|
+
|
|
170
|
+
1. Template rendering — targetObjectId + templateId + whatId via Messaging.renderStoredEmailTemplate()
|
|
171
|
+
2. treatTargetObjectAsRecipient — auto-add target email to To addresses
|
|
172
|
+
3. orgWideEmailAddressId — resolve from OrgWideEmailAddress record
|
|
173
|
+
4. saveAsActivity — insert EmailMessage + Task + EmailMessageRelation (bulk, partial-success)
|
|
174
|
+
5. useSignature — append user Email_Signature__c field
|
|
175
|
+
6. bccSender — auto-add sender to BCC list
|
|
176
|
+
7. optOutPolicy — EXCLUDE (skip), REJECT (throw), SEND (ignore opt-out)
|
|
177
|
+
8. treatBodiesAsTemplate — dynamic SOQL merge fields {!Contact.FirstName}
|
|
178
|
+
9. File attachments — inline base64 (3MB or less), upload session (3-8MB), Queueable (>8MB)
|
|
179
|
+
10. allOrNone — ALL_OR_NONE for failures, QUEUED for async
|
|
180
|
+
|
|
181
|
+
**Data Fields:**
|
|
182
|
+
|
|
183
|
+
| Field | Type | Required | Description |
|
|
184
|
+
|-------|------|----------|-------------|
|
|
185
|
+
| toAddresses | List of String | Yes (or targetObjectId) | Recipient email addresses |
|
|
186
|
+
| ccAddresses | List of String | No | CC recipients |
|
|
187
|
+
| bccAddresses | List of String | No | BCC recipients |
|
|
188
|
+
| subject | String | Yes | Email subject (supports merge fields) |
|
|
189
|
+
| htmlBody | String | No | HTML email content |
|
|
190
|
+
| plainTextBody | String | No | Plain text email content |
|
|
191
|
+
| targetObjectId | Id | No | Contact/Lead/User for merge and activity |
|
|
192
|
+
| whatId | Id | No | Related record (Account, Case) |
|
|
193
|
+
| templateId | Id | No | Email template for rendering |
|
|
194
|
+
| orgWideEmailAddressId | Id | No | Sender address override |
|
|
195
|
+
| fileAttachments | List of EmailFileAttachment | No | File attachments |
|
|
196
|
+
| saveAsActivity | Boolean | No | Track in Activity Timeline |
|
|
197
|
+
| treatBodiesAsTemplate | Boolean | No | Enable merge fields |
|
|
198
|
+
| treatTargetObjectAsRecipient | Boolean | No | Add target email to To list |
|
|
199
|
+
| optOutPolicy | String | No | SEND/EXCLUDE/REJECT |
|
|
200
|
+
| bccSender | Boolean | No | Auto-BCC the sender |
|
|
201
|
+
| useSignature | Boolean | No | Append user signature |
|
|
202
|
+
| allOrNone | Boolean | No | Transactional semantics |
|
|
203
|
+
|
|
204
|
+
**Acceptance Criteria:**
|
|
205
|
+
|
|
206
|
+
1. Template rendering resolves all merge fields to actual values
|
|
207
|
+
2. treatBodiesAsTemplate=true replaces {!Contact.FirstName} with actual value
|
|
208
|
+
3. Opt-out EXCLUDE returns failure result without sending
|
|
209
|
+
4. Large files (>3MB) sent via upload session without error
|
|
210
|
+
5. Files >8MB queued asynchronously with QUEUED status
|
|
211
|
+
6. allOrNone=true marks failures as ALL_OR_NONE status code
|
|
212
|
+
7. saveAsActivity creates EmailMessage with correct fields
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
#### STORY 4: Batch Email Sending via $batch Endpoint
|
|
217
|
+
|
|
218
|
+
> As a System, I want to send emails in batch to minimize API callouts.
|
|
219
|
+
|
|
220
|
+
**Requirement Details:**
|
|
221
|
+
|
|
222
|
+
1. Graph API $batch endpoint allows up to 20 requests per batch
|
|
223
|
+
2. System groups emails into batches of 20 and sends sequentially
|
|
224
|
+
3. OAuth2 token obtained once and reused across all batches
|
|
225
|
+
4. Token cached in Platform Cache with TTL = expires_in - 60 seconds
|
|
226
|
+
5. HTTP timeout: 120 seconds per batch call
|
|
227
|
+
|
|
228
|
+
**Acceptance Criteria:**
|
|
229
|
+
|
|
230
|
+
1. 50 emails sent in 3 batch calls (20 + 20 + 10)
|
|
231
|
+
2. Individual failures correctly reported per-index
|
|
232
|
+
3. Token cache prevents redundant OAuth2 calls
|
|
233
|
+
4. Expired token triggers automatic refresh
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
#### STORY 5: Large Attachment Handling
|
|
238
|
+
|
|
239
|
+
> As a System, I want to handle large file attachments without hitting Salesforce limits.
|
|
240
|
+
|
|
241
|
+
**Requirement Details:**
|
|
242
|
+
|
|
243
|
+
1. Threshold classification: inline (3MB or less), upload session (3-8MB), Queueable (>8MB)
|
|
244
|
+
2. Upload session chunking: 2MB per chunk with Content-Range header
|
|
245
|
+
3. Heap safety check before upload (fileSize + chunkSize + 512KB margin vs heap limit)
|
|
246
|
+
4. Async path: store in ContentVersion with [GRAPH_ASYNC] prefix, create draft, create upload sessions, enqueue Queueable
|
|
247
|
+
5. Cleanup on failure: delete draft, log orphan marker, delete CV
|
|
248
|
+
|
|
249
|
+
**Acceptance Criteria:**
|
|
250
|
+
|
|
251
|
+
1. 5MB attachment sends successfully via upload session
|
|
252
|
+
2. 10MB attachment returns QUEUED and processed by Queueable
|
|
253
|
+
3. Failed Queueable logs orphan draft for cleanup
|
|
254
|
+
4. Async CVs deleted after successful send
|
|
255
|
+
5. Heap guard prevents System.LimitException
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
#### STORY 6: Activity Tracking
|
|
260
|
+
|
|
261
|
+
> As a System, I want to track sent emails in Activity Timeline.
|
|
262
|
+
|
|
263
|
+
**Requirement Details:**
|
|
264
|
+
|
|
265
|
+
1. When saveAsActivity=true and email succeeds: insert EmailMessage + Task + EmailMessageRelation + ContentVersion
|
|
266
|
+
2. Uses Database.insert(records, false) for partial success
|
|
267
|
+
3. All DML is bulk (max 4 statements, no DML in loops)
|
|
268
|
+
4. Activity NOT saved for failed emails or when saveAsActivity=false
|
|
269
|
+
|
|
270
|
+
**Acceptance Criteria:**
|
|
271
|
+
|
|
272
|
+
1. Successful email creates EmailMessage + Task + attachment CVs
|
|
273
|
+
2. EmailMessage.RelatedToId = whatId, WhoId = targetObjectId
|
|
274
|
+
3. Failed email creates no activity records
|
|
275
|
+
4. Partial DML failure does not prevent other activities from saving
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
#### STORY 7: Orphaned Draft Cleanup
|
|
280
|
+
|
|
281
|
+
> As a System, I want to automatically clean up orphaned draft messages.
|
|
282
|
+
|
|
283
|
+
**Requirement Details:**
|
|
284
|
+
|
|
285
|
+
1. Identified by Graph_API_Log__c: Type=ORPHANED, Message matches ORPHAN_DRAFT:{draftId}:{userId}, older than 1 hour
|
|
286
|
+
2. Process: query up to 50 logs, get token, DELETE each draft, bulk delete logs
|
|
287
|
+
3. Scheduled daily at 3:00 AM via MsGraphOrphanedDraftCleanupScheduler
|
|
288
|
+
4. All callouts before DML
|
|
289
|
+
|
|
290
|
+
**Acceptance Criteria:**
|
|
291
|
+
|
|
292
|
+
1. Drafts older than 1 hour deleted from Graph API
|
|
293
|
+
2. Cleaned logs removed from Graph_API_Log__c
|
|
294
|
+
3. Failed cleanups logged as ERROR
|
|
295
|
+
4. Maximum 50 per execution
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
#### STORY 8: Orphaned ContentVersion Cleanup
|
|
300
|
+
|
|
301
|
+
> As a System, I want to clean up orphaned ContentVersion records.
|
|
302
|
+
|
|
303
|
+
**Requirement Details:**
|
|
304
|
+
|
|
305
|
+
1. CVs with [GRAPH_ASYNC] prefix, FirstPublishLocationId = null, older than 24 hours
|
|
306
|
+
2. Each deletion logged to Graph_API_Log__c (Type=CLEANUP)
|
|
307
|
+
3. Recommended schedule: daily at 2:00 AM
|
|
308
|
+
|
|
309
|
+
**Acceptance Criteria:**
|
|
310
|
+
|
|
311
|
+
1. Orphaned CVs deleted after 24 hours
|
|
312
|
+
2. Deletions logged for audit
|
|
313
|
+
3. No-orphan run creates single INFO log
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
#### STORY 9: Centralized Logging
|
|
318
|
+
|
|
319
|
+
> As a System, I want to log all Graph API operations.
|
|
320
|
+
|
|
321
|
+
**Requirement Details:**
|
|
322
|
+
|
|
323
|
+
1. Custom object Graph_API_Log__c: Type__c (ERROR/CLEANUP/ORPHANED/INFO), Source__c, Message__c, Details__c
|
|
324
|
+
2. AutoNumber name: LOG-{0000}
|
|
325
|
+
3. Logger never throws — wraps insert in try-catch
|
|
326
|
+
4. Supports optional details parameter
|
|
327
|
+
|
|
328
|
+
**Acceptance Criteria:**
|
|
329
|
+
|
|
330
|
+
1. All errors logged with Type=ERROR
|
|
331
|
+
2. Orphan detection creates ORPHANED entries
|
|
332
|
+
3. Cleanup creates CLEANUP entries
|
|
333
|
+
4. Logger failure caught silently
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
#### STORY 10: Inbound Email Processing
|
|
338
|
+
|
|
339
|
+
> As a Developer, I want to process inbound emails.
|
|
340
|
+
|
|
341
|
+
**Requirement Details:**
|
|
342
|
+
|
|
343
|
+
1. Implements Messaging.InboundEmailHandler
|
|
344
|
+
2. Creates Task: Subject = [Email] + subject (max 255), Description = sender + body
|
|
345
|
+
3. Handles text and binary attachments (debug logged)
|
|
346
|
+
4. Returns success/failure result
|
|
347
|
+
|
|
348
|
+
**Acceptance Criteria:**
|
|
349
|
+
|
|
350
|
+
1. Incoming email creates Task with correct fields
|
|
351
|
+
2. Long subjects truncated to 255 chars
|
|
352
|
+
3. Null subject defaults to "Khong co tieu de"
|
|
353
|
+
4. Exceptions caught with success=false
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
#### STORY 11: Opt-Out Policy Enforcement
|
|
358
|
+
|
|
359
|
+
> As a System, I want to respect opt-out policies.
|
|
360
|
+
|
|
361
|
+
**Requirement Details:**
|
|
362
|
+
|
|
363
|
+
1. Check HasOptedOutOfEmail on Contact/Lead
|
|
364
|
+
2. SEND: ignore opt-out; EXCLUDE: skip silently; REJECT: throw exception
|
|
365
|
+
3. Only applies to Contact and Lead (not User)
|
|
366
|
+
4. Only when targetObjectId is set
|
|
367
|
+
|
|
368
|
+
**Acceptance Criteria:**
|
|
369
|
+
|
|
370
|
+
1. EXCLUDE with opted-out contact returns failure without API call
|
|
371
|
+
2. REJECT with opted-out lead throws exception
|
|
372
|
+
3. Non-opted-out contacts send normally
|
|
373
|
+
4. User targets always send
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
#### STORY 12: AllOrNone Transaction Semantics
|
|
378
|
+
|
|
379
|
+
> As a System, I want allOrNone semantics for batch sends.
|
|
380
|
+
|
|
381
|
+
**Requirement Details:**
|
|
382
|
+
|
|
383
|
+
1. allOrNone=true with failure: successful sync remain SUCCESS, failed get ALL_OR_NONE, QUEUED remain QUEUED
|
|
384
|
+
2. allOrNone=false: independent statuses
|
|
385
|
+
3. QUEUED distinguishable via EmailSenderUtil.isQueued(result)
|
|
386
|
+
|
|
387
|
+
**Acceptance Criteria:**
|
|
388
|
+
|
|
389
|
+
1. allOrNone=true with 1 failure: failed gets ALL_OR_NONE
|
|
390
|
+
2. allOrNone=true all success: all report SUCCESS
|
|
391
|
+
3. allOrNone=false mixed: independent statuses
|
|
392
|
+
4. QUEUED never overwritten to ALL_OR_NONE
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## 3. Dependencies
|
|
397
|
+
|
|
398
|
+
| Dependency | Type | Description |
|
|
399
|
+
|------------|------|-------------|
|
|
400
|
+
| Microsoft Graph API v1.0 | External API | /users/{id}/sendMail, $batch, upload sessions |
|
|
401
|
+
| Azure AD / Entra ID | External Auth | OAuth2 client_credentials token |
|
|
402
|
+
| Salesforce Platform Cache | Infrastructure | Token caching (MsGraphGateway partition) |
|
|
403
|
+
| Graph_API_Config__mdt | Configuration | Graph API credentials |
|
|
404
|
+
| Email_Sender_Config__mdt | Configuration | Sender type selection |
|
|
405
|
+
| Remote Site Settings | Configuration | graph.microsoft.com, login.microsoftonline.com |
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## 4. Stakeholders
|
|
410
|
+
|
|
411
|
+
| Role | Name / Team | Responsibility |
|
|
412
|
+
|------|-------------|----------------|
|
|
413
|
+
| Salesforce Admin | Org Admin | Configure CMT, schedule jobs, monitor logs |
|
|
414
|
+
| Developer | Apex Dev Team | Use EmailSenderUtil API |
|
|
415
|
+
| Azure Admin | IT Infrastructure | Manage App Registration and permissions |
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## 5. Risks and Assumptions
|
|
420
|
+
|
|
421
|
+
### 5.1 Risks
|
|
422
|
+
|
|
423
|
+
| Risk | Impact | Likelihood | Mitigation |
|
|
424
|
+
|------|--------|------------|------------|
|
|
425
|
+
| Graph API rate limiting | High | Medium | Batch endpoint + backoff |
|
|
426
|
+
| Token expiry during batch | Medium | Low | Cache with TTL margin |
|
|
427
|
+
| Queueable chain breaks | Medium | Medium | Orphan cleanup jobs |
|
|
428
|
+
| Governor limits (100 callouts) | High | Medium | Batch max 20/request |
|
|
429
|
+
| Platform Cache unavailable | Medium | Low | Token re-fetched (degraded perf) |
|
|
430
|
+
|
|
431
|
+
### 5.2 Assumptions
|
|
432
|
+
|
|
433
|
+
- Graph API v1.0 remains stable
|
|
434
|
+
- Single shared mailbox (one userId) for outbound emails
|
|
435
|
+
- Org has sufficient API callout limits
|
|
436
|
+
- Platform Cache partition pre-created
|
|
437
|
+
- Email volume within Graph API throttling limits
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## 6. Non-Functional Requirements
|
|
442
|
+
|
|
443
|
+
| Category | Requirement | Details |
|
|
444
|
+
|----------|-------------|---------|
|
|
445
|
+
| Performance | Batch send <=5s for 20 emails | Graph API response time |
|
|
446
|
+
| Performance | Token acquisition <=2s | OAuth2 latency |
|
|
447
|
+
| Scalability | Up to 10,000 emails/day | Via batch jobs |
|
|
448
|
+
| Security | OAuth2 client_credentials | Application permissions |
|
|
449
|
+
| Security | Credentials in CMT (encrypted) | Not in code |
|
|
450
|
+
| Monitoring | All errors in Graph_API_Log__c | Queryable/reportable |
|
|
451
|
+
| Compliance | Respect HasOptedOutOfEmail | CAN-SPAM/GDPR |
|
|
452
|
+
| Storage | Orphans cleaned within 24 hours | Scheduled jobs |
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
## 7. Appendix
|
|
457
|
+
|
|
458
|
+
### Glossary
|
|
459
|
+
|
|
460
|
+
| Term | Definition |
|
|
461
|
+
|------|------------|
|
|
462
|
+
| Graph API | Microsoft Graph REST API v1.0 for Microsoft 365 services |
|
|
463
|
+
| Upload Session | Graph API mechanism for uploading large files in 2MB chunks |
|
|
464
|
+
| Queueable | Salesforce async processing interface |
|
|
465
|
+
| Platform Cache | Salesforce Org Cache for cross-transaction data |
|
|
466
|
+
| CMT | Custom Metadata Type — deployable configuration records |
|
|
467
|
+
| OrgWideEmailAddress | Shared sender email address record in Salesforce |
|
|
468
|
+
| Draft Message | Graph API message created but not yet sent |
|
|
469
|
+
| $batch | Graph API endpoint processing multiple requests in one HTTP call |
|
|
470
|
+
| Orphaned Draft | Draft on Graph API never sent/deleted due to failure |
|
|
471
|
+
| allOrNone | Transactional semantics for batch operations |
|
|
472
|
+
|
|
473
|
+
### Design Patterns
|
|
474
|
+
|
|
475
|
+
| Pattern | Class | Purpose |
|
|
476
|
+
|---------|-------|---------|
|
|
477
|
+
| Strategy | IEmailSender | Abstraction for email transport implementations |
|
|
478
|
+
| Factory | EmailSenderFactory | Create/register email sender instances |
|
|
479
|
+
| Facade | EmailSenderUtil | Single entry point for all email operations |
|
|
480
|
+
| Gateway | MsGraphEmailGateway | HTTP transport isolation (no DML, no SOQL) |
|
|
481
|
+
| Queueable Chain | MsGraphLargeAttachmentSender | Async large file processing |
|
|
482
|
+
|
|
483
|
+
### Diagram Index
|
|
484
|
+
|
|
485
|
+
| # | Diagram | Image | Source (editable) |
|
|
486
|
+
|---|---------|-------|-------------------|
|
|
487
|
+
| 1 | Business Flow |  | [business-flow.drawio](diagrams/business-flow.drawio) |
|
|
488
|
+
| 2 | Use Case |  | [use-case.drawio](diagrams/use-case.drawio) |
|