@agent-native/dispatch 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +220 -0
- package/dist/actions/approve-dispatch-change.d.ts +3 -0
- package/dist/actions/approve-dispatch-change.d.ts.map +1 -0
- package/dist/actions/approve-dispatch-change.js +11 -0
- package/dist/actions/approve-dispatch-change.js.map +1 -0
- package/dist/actions/approve-vault-request.d.ts +3 -0
- package/dist/actions/approve-vault-request.d.ts.map +1 -0
- package/dist/actions/approve-vault-request.js +16 -0
- package/dist/actions/approve-vault-request.js.map +1 -0
- package/dist/actions/create-link-token.d.ts +3 -0
- package/dist/actions/create-link-token.d.ts.map +1 -0
- package/dist/actions/create-link-token.js +11 -0
- package/dist/actions/create-link-token.js.map +1 -0
- package/dist/actions/create-vault-grant.d.ts +3 -0
- package/dist/actions/create-vault-grant.d.ts.map +1 -0
- package/dist/actions/create-vault-grant.js +14 -0
- package/dist/actions/create-vault-grant.js.map +1 -0
- package/dist/actions/create-vault-secret.d.ts +3 -0
- package/dist/actions/create-vault-secret.d.ts.map +1 -0
- package/dist/actions/create-vault-secret.js +20 -0
- package/dist/actions/create-vault-secret.js.map +1 -0
- package/dist/actions/create-workspace-resource-grant.d.ts +3 -0
- package/dist/actions/create-workspace-resource-grant.d.ts.map +1 -0
- package/dist/actions/create-workspace-resource-grant.js +14 -0
- package/dist/actions/create-workspace-resource-grant.js.map +1 -0
- package/dist/actions/create-workspace-resource.d.ts +3 -0
- package/dist/actions/create-workspace-resource.d.ts.map +1 -0
- package/dist/actions/create-workspace-resource.js +24 -0
- package/dist/actions/create-workspace-resource.js.map +1 -0
- package/dist/actions/delete-destination.d.ts +3 -0
- package/dist/actions/delete-destination.d.ts.map +1 -0
- package/dist/actions/delete-destination.js +11 -0
- package/dist/actions/delete-destination.js.map +1 -0
- package/dist/actions/delete-vault-secret.d.ts +3 -0
- package/dist/actions/delete-vault-secret.d.ts.map +1 -0
- package/dist/actions/delete-vault-secret.js +11 -0
- package/dist/actions/delete-vault-secret.js.map +1 -0
- package/dist/actions/delete-workspace-resource.d.ts +3 -0
- package/dist/actions/delete-workspace-resource.d.ts.map +1 -0
- package/dist/actions/delete-workspace-resource.js +11 -0
- package/dist/actions/delete-workspace-resource.js.map +1 -0
- package/dist/actions/deny-vault-request.d.ts +3 -0
- package/dist/actions/deny-vault-request.d.ts.map +1 -0
- package/dist/actions/deny-vault-request.js +12 -0
- package/dist/actions/deny-vault-request.js.map +1 -0
- package/dist/actions/get-app-creation-settings.d.ts +3 -0
- package/dist/actions/get-app-creation-settings.d.ts.map +1 -0
- package/dist/actions/get-app-creation-settings.js +10 -0
- package/dist/actions/get-app-creation-settings.js.map +1 -0
- package/dist/actions/get-dispatch-settings.d.ts +3 -0
- package/dist/actions/get-dispatch-settings.d.ts.map +1 -0
- package/dist/actions/get-dispatch-settings.js +10 -0
- package/dist/actions/get-dispatch-settings.js.map +1 -0
- package/dist/actions/get-workspace-info.d.ts +3 -0
- package/dist/actions/get-workspace-info.d.ts.map +1 -0
- package/dist/actions/get-workspace-info.js +10 -0
- package/dist/actions/get-workspace-info.js.map +1 -0
- package/dist/actions/grant-vault-secrets-to-app.d.ts +3 -0
- package/dist/actions/grant-vault-secrets-to-app.d.ts.map +1 -0
- package/dist/actions/grant-vault-secrets-to-app.js +19 -0
- package/dist/actions/grant-vault-secrets-to-app.js.map +1 -0
- package/dist/actions/index.d.ts +9 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +101 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/list-connected-agents.d.ts +3 -0
- package/dist/actions/list-connected-agents.d.ts.map +1 -0
- package/dist/actions/list-connected-agents.js +79 -0
- package/dist/actions/list-connected-agents.js.map +1 -0
- package/dist/actions/list-destinations.d.ts +3 -0
- package/dist/actions/list-destinations.d.ts.map +1 -0
- package/dist/actions/list-destinations.js +10 -0
- package/dist/actions/list-destinations.js.map +1 -0
- package/dist/actions/list-dispatch-approvals.d.ts +3 -0
- package/dist/actions/list-dispatch-approvals.d.ts.map +1 -0
- package/dist/actions/list-dispatch-approvals.js +10 -0
- package/dist/actions/list-dispatch-approvals.js.map +1 -0
- package/dist/actions/list-dispatch-audit.d.ts +3 -0
- package/dist/actions/list-dispatch-audit.d.ts.map +1 -0
- package/dist/actions/list-dispatch-audit.js +12 -0
- package/dist/actions/list-dispatch-audit.js.map +1 -0
- package/dist/actions/list-dispatch-overview.d.ts +3 -0
- package/dist/actions/list-dispatch-overview.d.ts.map +1 -0
- package/dist/actions/list-dispatch-overview.js +17 -0
- package/dist/actions/list-dispatch-overview.js.map +1 -0
- package/dist/actions/list-integrations-catalog.d.ts +3 -0
- package/dist/actions/list-integrations-catalog.d.ts.map +1 -0
- package/dist/actions/list-integrations-catalog.js +10 -0
- package/dist/actions/list-integrations-catalog.js.map +1 -0
- package/dist/actions/list-linked-identities.d.ts +3 -0
- package/dist/actions/list-linked-identities.d.ts.map +1 -0
- package/dist/actions/list-linked-identities.js +10 -0
- package/dist/actions/list-linked-identities.js.map +1 -0
- package/dist/actions/list-vault-audit.d.ts +3 -0
- package/dist/actions/list-vault-audit.d.ts.map +1 -0
- package/dist/actions/list-vault-audit.js +15 -0
- package/dist/actions/list-vault-audit.js.map +1 -0
- package/dist/actions/list-vault-grants.d.ts +3 -0
- package/dist/actions/list-vault-grants.d.ts.map +1 -0
- package/dist/actions/list-vault-grants.js +13 -0
- package/dist/actions/list-vault-grants.js.map +1 -0
- package/dist/actions/list-vault-requests.d.ts +3 -0
- package/dist/actions/list-vault-requests.d.ts.map +1 -0
- package/dist/actions/list-vault-requests.js +15 -0
- package/dist/actions/list-vault-requests.js.map +1 -0
- package/dist/actions/list-vault-secret-options.d.ts +3 -0
- package/dist/actions/list-vault-secret-options.d.ts.map +1 -0
- package/dist/actions/list-vault-secret-options.js +19 -0
- package/dist/actions/list-vault-secret-options.js.map +1 -0
- package/dist/actions/list-vault-secrets.d.ts +3 -0
- package/dist/actions/list-vault-secrets.d.ts.map +1 -0
- package/dist/actions/list-vault-secrets.js +25 -0
- package/dist/actions/list-vault-secrets.js.map +1 -0
- package/dist/actions/list-workspace-apps.d.ts +3 -0
- package/dist/actions/list-workspace-apps.d.ts.map +1 -0
- package/dist/actions/list-workspace-apps.js +24 -0
- package/dist/actions/list-workspace-apps.js.map +1 -0
- package/dist/actions/list-workspace-resource-grants.d.ts +3 -0
- package/dist/actions/list-workspace-resource-grants.d.ts.map +1 -0
- package/dist/actions/list-workspace-resource-grants.js +13 -0
- package/dist/actions/list-workspace-resource-grants.js.map +1 -0
- package/dist/actions/list-workspace-resources.d.ts +3 -0
- package/dist/actions/list-workspace-resources.d.ts.map +1 -0
- package/dist/actions/list-workspace-resources.js +15 -0
- package/dist/actions/list-workspace-resources.js.map +1 -0
- package/dist/actions/navigate.d.ts +16 -0
- package/dist/actions/navigate.d.ts.map +1 -0
- package/dist/actions/navigate.js +55 -0
- package/dist/actions/navigate.js.map +1 -0
- package/dist/actions/reject-dispatch-change.d.ts +3 -0
- package/dist/actions/reject-dispatch-change.d.ts.map +1 -0
- package/dist/actions/reject-dispatch-change.js +12 -0
- package/dist/actions/reject-dispatch-change.js.map +1 -0
- package/dist/actions/request-vault-secret.d.ts +3 -0
- package/dist/actions/request-vault-secret.d.ts.map +1 -0
- package/dist/actions/request-vault-secret.js +15 -0
- package/dist/actions/request-vault-secret.js.map +1 -0
- package/dist/actions/revoke-vault-grant.d.ts +3 -0
- package/dist/actions/revoke-vault-grant.d.ts.map +1 -0
- package/dist/actions/revoke-vault-grant.js +11 -0
- package/dist/actions/revoke-vault-grant.js.map +1 -0
- package/dist/actions/revoke-workspace-resource-grant.d.ts +3 -0
- package/dist/actions/revoke-workspace-resource-grant.d.ts.map +1 -0
- package/dist/actions/revoke-workspace-resource-grant.js +11 -0
- package/dist/actions/revoke-workspace-resource-grant.js.map +1 -0
- package/dist/actions/send-platform-message.d.ts +3 -0
- package/dist/actions/send-platform-message.d.ts.map +1 -0
- package/dist/actions/send-platform-message.js +73 -0
- package/dist/actions/send-platform-message.js.map +1 -0
- package/dist/actions/set-app-creation-settings.d.ts +3 -0
- package/dist/actions/set-app-creation-settings.d.ts.map +1 -0
- package/dist/actions/set-app-creation-settings.js +18 -0
- package/dist/actions/set-app-creation-settings.js.map +1 -0
- package/dist/actions/set-dispatch-approval-policy.d.ts +3 -0
- package/dist/actions/set-dispatch-approval-policy.d.ts.map +1 -0
- package/dist/actions/set-dispatch-approval-policy.js +19 -0
- package/dist/actions/set-dispatch-approval-policy.js.map +1 -0
- package/dist/actions/start-workspace-app-creation.d.ts +3 -0
- package/dist/actions/start-workspace-app-creation.d.ts.map +1 -0
- package/dist/actions/start-workspace-app-creation.js +31 -0
- package/dist/actions/start-workspace-app-creation.js.map +1 -0
- package/dist/actions/sync-vault-to-app.d.ts +3 -0
- package/dist/actions/sync-vault-to-app.d.ts.map +1 -0
- package/dist/actions/sync-vault-to-app.js +13 -0
- package/dist/actions/sync-vault-to-app.js.map +1 -0
- package/dist/actions/sync-workspace-resources-to-all.d.ts +3 -0
- package/dist/actions/sync-workspace-resources-to-all.d.ts.map +1 -0
- package/dist/actions/sync-workspace-resources-to-all.js +9 -0
- package/dist/actions/sync-workspace-resources-to-all.js.map +1 -0
- package/dist/actions/sync-workspace-resources-to-app.d.ts +3 -0
- package/dist/actions/sync-workspace-resources-to-app.d.ts.map +1 -0
- package/dist/actions/sync-workspace-resources-to-app.js +11 -0
- package/dist/actions/sync-workspace-resources-to-app.js.map +1 -0
- package/dist/actions/update-vault-secret.d.ts +3 -0
- package/dist/actions/update-vault-secret.d.ts.map +1 -0
- package/dist/actions/update-vault-secret.js +12 -0
- package/dist/actions/update-vault-secret.js.map +1 -0
- package/dist/actions/update-workspace-resource.d.ts +3 -0
- package/dist/actions/update-workspace-resource.d.ts.map +1 -0
- package/dist/actions/update-workspace-resource.js +18 -0
- package/dist/actions/update-workspace-resource.js.map +1 -0
- package/dist/actions/upsert-destination.d.ts +3 -0
- package/dist/actions/upsert-destination.d.ts.map +1 -0
- package/dist/actions/upsert-destination.js +26 -0
- package/dist/actions/upsert-destination.js.map +1 -0
- package/dist/actions/view-screen.d.ts +11 -0
- package/dist/actions/view-screen.d.ts.map +1 -0
- package/dist/actions/view-screen.js +68 -0
- package/dist/actions/view-screen.js.map +1 -0
- package/dist/components/agents-panel.d.ts +16 -0
- package/dist/components/agents-panel.d.ts.map +1 -0
- package/dist/components/agents-panel.js +64 -0
- package/dist/components/agents-panel.js.map +1 -0
- package/dist/components/app-keys-popover.d.ts +11 -0
- package/dist/components/app-keys-popover.d.ts.map +1 -0
- package/dist/components/app-keys-popover.js +84 -0
- package/dist/components/app-keys-popover.js.map +1 -0
- package/dist/components/create-app-popover.d.ts +24 -0
- package/dist/components/create-app-popover.d.ts.map +1 -0
- package/dist/components/create-app-popover.js +188 -0
- package/dist/components/create-app-popover.js.map +1 -0
- package/dist/components/dispatch-shell.d.ts +13 -0
- package/dist/components/dispatch-shell.d.ts.map +1 -0
- package/dist/components/dispatch-shell.js +15 -0
- package/dist/components/dispatch-shell.js.map +1 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +12 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/layout/Header.d.ts +5 -0
- package/dist/components/layout/Header.d.ts.map +1 -0
- package/dist/components/layout/Header.js +34 -0
- package/dist/components/layout/Header.js.map +1 -0
- package/dist/components/layout/HeaderActions.d.ts +18 -0
- package/dist/components/layout/HeaderActions.d.ts.map +1 -0
- package/dist/components/layout/HeaderActions.js +52 -0
- package/dist/components/layout/HeaderActions.js.map +1 -0
- package/dist/components/layout/Layout.d.ts +8 -0
- package/dist/components/layout/Layout.d.ts.map +1 -0
- package/dist/components/layout/Layout.js +70 -0
- package/dist/components/layout/Layout.js.map +1 -0
- package/dist/components/messaging-setup-panel.d.ts +2 -0
- package/dist/components/messaging-setup-panel.d.ts.map +1 -0
- package/dist/components/messaging-setup-panel.js +300 -0
- package/dist/components/messaging-setup-panel.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +14 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +21 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +27 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +23 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +4 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +4 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +12 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +21 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +20 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +24 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +34 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +41 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +17 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +99 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +80 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +131 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +9 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +6 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/command.d.ts +83 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +29 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +28 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +34 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +20 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +23 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +23 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +23 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +36 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/form.d.ts +24 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/form.js +63 -0
- package/dist/components/ui/form.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +10 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +35 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +19 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +9 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +10 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +29 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +41 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +25 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +29 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +24 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +10 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +8 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +15 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +9 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +12 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +27 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +8 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +26 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +37 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +67 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +233 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +7 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +8 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +5 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +25 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +7 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +8 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +21 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +13 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +6 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +9 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.d.ts +16 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +34 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toaster.d.ts +2 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/toaster.js +10 -0
- package/dist/components/ui/toaster.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +21 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +13 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +26 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +11 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/use-toast.d.ts +3 -0
- package/dist/components/ui/use-toast.d.ts.map +1 -0
- package/dist/components/ui/use-toast.js +3 -0
- package/dist/components/ui/use-toast.js.map +1 -0
- package/dist/config.d.ts +33 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +7 -0
- package/dist/config.js.map +1 -0
- package/dist/db/index.d.ts +7 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +10 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrations.d.ts +5 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/migrations.js +166 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/db/schema.d.ts +2344 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +148 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-navigation-state.d.ts +6 -0
- package/dist/hooks/use-navigation-state.d.ts.map +1 -0
- package/dist/hooks/use-navigation-state.js +129 -0
- package/dist/hooks/use-navigation-state.js.map +1 -0
- package/dist/hooks/use-toast.d.ts +45 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +127 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +2 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/routes/index.d.ts +32 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +51 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/pages/_index.d.ts +15 -0
- package/dist/routes/pages/_index.d.ts.map +1 -0
- package/dist/routes/pages/_index.js +42 -0
- package/dist/routes/pages/_index.js.map +1 -0
- package/dist/routes/pages/agents.d.ts +5 -0
- package/dist/routes/pages/agents.d.ts.map +1 -0
- package/dist/routes/pages/agents.js +12 -0
- package/dist/routes/pages/agents.js.map +1 -0
- package/dist/routes/pages/approval.d.ts +5 -0
- package/dist/routes/pages/approval.d.ts.map +1 -0
- package/dist/routes/pages/approval.js +47 -0
- package/dist/routes/pages/approval.js.map +1 -0
- package/dist/routes/pages/approvals.d.ts +5 -0
- package/dist/routes/pages/approvals.d.ts.map +1 -0
- package/dist/routes/pages/approvals.js +48 -0
- package/dist/routes/pages/approvals.js.map +1 -0
- package/dist/routes/pages/apps.$appId.d.ts +5 -0
- package/dist/routes/pages/apps.$appId.d.ts.map +1 -0
- package/dist/routes/pages/apps.$appId.js +31 -0
- package/dist/routes/pages/apps.$appId.js.map +1 -0
- package/dist/routes/pages/apps.d.ts +5 -0
- package/dist/routes/pages/apps.d.ts.map +1 -0
- package/dist/routes/pages/apps.js +42 -0
- package/dist/routes/pages/apps.js.map +1 -0
- package/dist/routes/pages/audit.d.ts +5 -0
- package/dist/routes/pages/audit.d.ts.map +1 -0
- package/dist/routes/pages/audit.js +11 -0
- package/dist/routes/pages/audit.js.map +1 -0
- package/dist/routes/pages/destinations.d.ts +5 -0
- package/dist/routes/pages/destinations.d.ts.map +1 -0
- package/dist/routes/pages/destinations.js +80 -0
- package/dist/routes/pages/destinations.js.map +1 -0
- package/dist/routes/pages/identities.d.ts +5 -0
- package/dist/routes/pages/identities.d.ts.map +1 -0
- package/dist/routes/pages/identities.js +18 -0
- package/dist/routes/pages/identities.js.map +1 -0
- package/dist/routes/pages/integrations.d.ts +5 -0
- package/dist/routes/pages/integrations.d.ts.map +1 -0
- package/dist/routes/pages/integrations.js +46 -0
- package/dist/routes/pages/integrations.js.map +1 -0
- package/dist/routes/pages/messaging.d.ts +5 -0
- package/dist/routes/pages/messaging.d.ts.map +1 -0
- package/dist/routes/pages/messaging.js +10 -0
- package/dist/routes/pages/messaging.js.map +1 -0
- package/dist/routes/pages/new-app.d.ts +5 -0
- package/dist/routes/pages/new-app.d.ts.map +1 -0
- package/dist/routes/pages/new-app.js +10 -0
- package/dist/routes/pages/new-app.js.map +1 -0
- package/dist/routes/pages/overview.d.ts +5 -0
- package/dist/routes/pages/overview.d.ts.map +1 -0
- package/dist/routes/pages/overview.js +225 -0
- package/dist/routes/pages/overview.js.map +1 -0
- package/dist/routes/pages/team.d.ts +5 -0
- package/dist/routes/pages/team.d.ts.map +1 -0
- package/dist/routes/pages/team.js +10 -0
- package/dist/routes/pages/team.js.map +1 -0
- package/dist/routes/pages/tools.$id.d.ts +2 -0
- package/dist/routes/pages/tools.$id.d.ts.map +1 -0
- package/dist/routes/pages/tools.$id.js +6 -0
- package/dist/routes/pages/tools.$id.js.map +1 -0
- package/dist/routes/pages/tools._index.d.ts +2 -0
- package/dist/routes/pages/tools._index.d.ts.map +1 -0
- package/dist/routes/pages/tools._index.js +6 -0
- package/dist/routes/pages/tools._index.js.map +1 -0
- package/dist/routes/pages/vault.d.ts +5 -0
- package/dist/routes/pages/vault.d.ts.map +1 -0
- package/dist/routes/pages/vault.js +131 -0
- package/dist/routes/pages/vault.js.map +1 -0
- package/dist/routes/pages/workspace.d.ts +5 -0
- package/dist/routes/pages/workspace.d.ts.map +1 -0
- package/dist/routes/pages/workspace.js +149 -0
- package/dist/routes/pages/workspace.js.map +1 -0
- package/dist/server/index.d.ts +44 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +68 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/lib/app-creation-store.d.ts +102 -0
- package/dist/server/lib/app-creation-store.d.ts.map +1 -0
- package/dist/server/lib/app-creation-store.js +780 -0
- package/dist/server/lib/app-creation-store.js.map +1 -0
- package/dist/server/lib/dispatch-integrations.d.ts +10 -0
- package/dist/server/lib/dispatch-integrations.d.ts.map +1 -0
- package/dist/server/lib/dispatch-integrations.js +105 -0
- package/dist/server/lib/dispatch-integrations.js.map +1 -0
- package/dist/server/lib/dispatch-store.d.ts +313 -0
- package/dist/server/lib/dispatch-store.d.ts.map +1 -0
- package/dist/server/lib/dispatch-store.js +669 -0
- package/dist/server/lib/dispatch-store.js.map +1 -0
- package/dist/server/lib/env-config.d.ts +3 -0
- package/dist/server/lib/env-config.d.ts.map +1 -0
- package/dist/server/lib/env-config.js +43 -0
- package/dist/server/lib/env-config.js.map +1 -0
- package/dist/server/lib/pre-auth-routing.d.ts +2 -0
- package/dist/server/lib/pre-auth-routing.d.ts.map +1 -0
- package/dist/server/lib/pre-auth-routing.js +128 -0
- package/dist/server/lib/pre-auth-routing.js.map +1 -0
- package/dist/server/lib/vault-store.d.ts +270 -0
- package/dist/server/lib/vault-store.d.ts.map +1 -0
- package/dist/server/lib/vault-store.js +554 -0
- package/dist/server/lib/vault-store.js.map +1 -0
- package/dist/server/lib/workspace-resources-store.d.ts +165 -0
- package/dist/server/lib/workspace-resources-store.d.ts.map +1 -0
- package/dist/server/lib/workspace-resources-store.js +310 -0
- package/dist/server/lib/workspace-resources-store.js.map +1 -0
- package/dist/server/plugins/agent-chat.d.ts +3 -0
- package/dist/server/plugins/agent-chat.d.ts.map +1 -0
- package/dist/server/plugins/agent-chat.js +36 -0
- package/dist/server/plugins/agent-chat.js.map +1 -0
- package/dist/server/plugins/auth.d.ts +9 -0
- package/dist/server/plugins/auth.d.ts.map +1 -0
- package/dist/server/plugins/auth.js +30 -0
- package/dist/server/plugins/auth.js.map +1 -0
- package/dist/server/plugins/core-routes.d.ts +3 -0
- package/dist/server/plugins/core-routes.d.ts.map +1 -0
- package/dist/server/plugins/core-routes.js +6 -0
- package/dist/server/plugins/core-routes.js.map +1 -0
- package/dist/server/plugins/db.d.ts +3 -0
- package/dist/server/plugins/db.d.ts.map +1 -0
- package/dist/server/plugins/db.js +6 -0
- package/dist/server/plugins/db.js.map +1 -0
- package/dist/server/plugins/integrations.d.ts +8 -0
- package/dist/server/plugins/integrations.d.ts.map +1 -0
- package/dist/server/plugins/integrations.js +51 -0
- package/dist/server/plugins/integrations.js.map +1 -0
- package/package.json +103 -0
- package/src/actions/approve-dispatch-change.ts +11 -0
- package/src/actions/approve-vault-request.ts +23 -0
- package/src/actions/create-link-token.ts +12 -0
- package/src/actions/create-vault-grant.ts +15 -0
- package/src/actions/create-vault-secret.ts +21 -0
- package/src/actions/create-workspace-resource-grant.ts +15 -0
- package/src/actions/create-workspace-resource.ts +29 -0
- package/src/actions/delete-destination.ts +11 -0
- package/src/actions/delete-vault-secret.ts +12 -0
- package/src/actions/delete-workspace-resource.ts +12 -0
- package/src/actions/deny-vault-request.ts +12 -0
- package/src/actions/get-app-creation-settings.ts +11 -0
- package/src/actions/get-dispatch-settings.ts +10 -0
- package/src/actions/get-workspace-info.ts +11 -0
- package/src/actions/grant-vault-secrets-to-app.ts +20 -0
- package/src/actions/index.ts +102 -0
- package/src/actions/list-connected-agents.ts +103 -0
- package/src/actions/list-destinations.ts +10 -0
- package/src/actions/list-dispatch-approvals.ts +10 -0
- package/src/actions/list-dispatch-audit.ts +12 -0
- package/src/actions/list-dispatch-overview.ts +18 -0
- package/src/actions/list-integrations-catalog.ts +11 -0
- package/src/actions/list-linked-identities.ts +10 -0
- package/src/actions/list-vault-audit.ts +16 -0
- package/src/actions/list-vault-grants.ts +14 -0
- package/src/actions/list-vault-requests.ts +16 -0
- package/src/actions/list-vault-secret-options.ts +20 -0
- package/src/actions/list-vault-secrets.ts +26 -0
- package/src/actions/list-workspace-apps.ts +25 -0
- package/src/actions/list-workspace-resource-grants.ts +14 -0
- package/src/actions/list-workspace-resources.ts +16 -0
- package/src/actions/navigate.ts +55 -0
- package/src/actions/reject-dispatch-change.ts +12 -0
- package/src/actions/request-vault-secret.ts +16 -0
- package/src/actions/revoke-vault-grant.ts +11 -0
- package/src/actions/revoke-workspace-resource-grant.ts +15 -0
- package/src/actions/send-platform-message.ts +96 -0
- package/src/actions/set-app-creation-settings.ts +19 -0
- package/src/actions/set-dispatch-approval-policy.ts +24 -0
- package/src/actions/start-workspace-app-creation.ts +33 -0
- package/src/actions/sync-vault-to-app.ts +14 -0
- package/src/actions/sync-workspace-resources-to-all.ts +10 -0
- package/src/actions/sync-workspace-resources-to-app.ts +12 -0
- package/src/actions/update-vault-secret.ts +12 -0
- package/src/actions/update-workspace-resource.ts +19 -0
- package/src/actions/upsert-destination.ts +29 -0
- package/src/actions/view-screen.ts +78 -0
- package/src/components/agents-panel.tsx +262 -0
- package/src/components/app-keys-popover.tsx +231 -0
- package/src/components/create-app-popover.tsx +423 -0
- package/src/components/dispatch-shell.tsx +53 -0
- package/src/components/index.ts +11 -0
- package/src/components/layout/Header.tsx +69 -0
- package/src/components/layout/HeaderActions.tsx +84 -0
- package/src/components/layout/Layout.tsx +243 -0
- package/src/components/messaging-setup-panel.tsx +666 -0
- package/src/components/ui/accordion.tsx +56 -0
- package/src/components/ui/alert-dialog.tsx +139 -0
- package/src/components/ui/alert.tsx +59 -0
- package/src/components/ui/aspect-ratio.tsx +5 -0
- package/src/components/ui/avatar.tsx +48 -0
- package/src/components/ui/badge.tsx +37 -0
- package/src/components/ui/breadcrumb.tsx +115 -0
- package/src/components/ui/button.tsx +57 -0
- package/src/components/ui/calendar.tsx +68 -0
- package/src/components/ui/card.tsx +86 -0
- package/src/components/ui/carousel.tsx +260 -0
- package/src/components/ui/chart.tsx +375 -0
- package/src/components/ui/checkbox.tsx +28 -0
- package/src/components/ui/collapsible.tsx +9 -0
- package/src/components/ui/command.tsx +154 -0
- package/src/components/ui/context-menu.tsx +198 -0
- package/src/components/ui/dialog.tsx +120 -0
- package/src/components/ui/drawer.tsx +116 -0
- package/src/components/ui/dropdown-menu.tsx +198 -0
- package/src/components/ui/form.tsx +177 -0
- package/src/components/ui/hover-card.tsx +27 -0
- package/src/components/ui/input-otp.tsx +69 -0
- package/src/components/ui/input.tsx +22 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/menubar.tsx +235 -0
- package/src/components/ui/navigation-menu.tsx +128 -0
- package/src/components/ui/pagination.tsx +121 -0
- package/src/components/ui/popover.tsx +29 -0
- package/src/components/ui/progress.tsx +26 -0
- package/src/components/ui/radio-group.tsx +42 -0
- package/src/components/ui/resizable.tsx +43 -0
- package/src/components/ui/scroll-area.tsx +46 -0
- package/src/components/ui/select.tsx +158 -0
- package/src/components/ui/separator.tsx +29 -0
- package/src/components/ui/sheet.tsx +139 -0
- package/src/components/ui/sidebar.tsx +778 -0
- package/src/components/ui/skeleton.tsx +15 -0
- package/src/components/ui/slider.tsx +26 -0
- package/src/components/ui/sonner.tsx +58 -0
- package/src/components/ui/spinner.tsx +17 -0
- package/src/components/ui/switch.tsx +27 -0
- package/src/components/ui/table.tsx +117 -0
- package/src/components/ui/tabs.tsx +53 -0
- package/src/components/ui/textarea.tsx +23 -0
- package/src/components/ui/toast.tsx +127 -0
- package/src/components/ui/toaster.tsx +33 -0
- package/src/components/ui/toggle-group.tsx +59 -0
- package/src/components/ui/toggle.tsx +43 -0
- package/src/components/ui/tooltip.tsx +28 -0
- package/src/components/ui/use-toast.ts +3 -0
- package/src/config.ts +35 -0
- package/src/db/index.ts +12 -0
- package/src/db/migrations.ts +165 -0
- package/src/db/schema.ts +160 -0
- package/src/hooks/use-mobile.tsx +21 -0
- package/src/hooks/use-navigation-state.ts +132 -0
- package/src/hooks/use-toast.ts +188 -0
- package/src/index.ts +19 -0
- package/src/lib/utils.ts +1 -0
- package/src/routes/index.ts +51 -0
- package/src/routes/pages/_index.tsx +51 -0
- package/src/routes/pages/agents.tsx +23 -0
- package/src/routes/pages/approval.tsx +243 -0
- package/src/routes/pages/approvals.tsx +157 -0
- package/src/routes/pages/apps.$appId.tsx +134 -0
- package/src/routes/pages/apps.tsx +163 -0
- package/src/routes/pages/audit.tsx +41 -0
- package/src/routes/pages/destinations.tsx +253 -0
- package/src/routes/pages/identities.tsx +91 -0
- package/src/routes/pages/integrations.tsx +278 -0
- package/src/routes/pages/messaging.tsx +17 -0
- package/src/routes/pages/new-app.tsx +17 -0
- package/src/routes/pages/overview.tsx +792 -0
- package/src/routes/pages/team.tsx +23 -0
- package/src/routes/pages/tools.$id.tsx +5 -0
- package/src/routes/pages/tools._index.tsx +5 -0
- package/src/routes/pages/vault.tsx +617 -0
- package/src/routes/pages/workspace.tsx +598 -0
- package/src/server/index.ts +78 -0
- package/src/server/lib/app-creation-store.ts +996 -0
- package/src/server/lib/dispatch-integrations.ts +125 -0
- package/src/server/lib/dispatch-store.ts +889 -0
- package/src/server/lib/env-config.ts +44 -0
- package/src/server/lib/pre-auth-routing.ts +150 -0
- package/src/server/lib/vault-store.ts +811 -0
- package/src/server/lib/workspace-resources-store.ts +445 -0
- package/src/server/plugins/agent-chat.ts +36 -0
- package/src/server/plugins/auth.ts +34 -0
- package/src/server/plugins/core-routes.ts +6 -0
- package/src/server/plugins/db.ts +6 -0
- package/src/server/plugins/integrations.ts +59 -0
|
@@ -0,0 +1,666 @@
|
|
|
1
|
+
import { useEffect, useMemo, useState } from "react";
|
|
2
|
+
import { toast } from "sonner";
|
|
3
|
+
import {
|
|
4
|
+
IconBrandSlack,
|
|
5
|
+
IconBrandTelegram,
|
|
6
|
+
IconBrandWhatsapp,
|
|
7
|
+
IconCheck,
|
|
8
|
+
IconChevronRight,
|
|
9
|
+
IconCopy,
|
|
10
|
+
IconExternalLink,
|
|
11
|
+
IconInfoCircle,
|
|
12
|
+
IconLoader2,
|
|
13
|
+
IconMail,
|
|
14
|
+
} from "@tabler/icons-react";
|
|
15
|
+
import { Button } from "@/components/ui/button";
|
|
16
|
+
import {
|
|
17
|
+
Collapsible,
|
|
18
|
+
CollapsibleContent,
|
|
19
|
+
CollapsibleTrigger,
|
|
20
|
+
} from "@/components/ui/collapsible";
|
|
21
|
+
import { Input } from "@/components/ui/input";
|
|
22
|
+
import {
|
|
23
|
+
Tooltip,
|
|
24
|
+
TooltipContent,
|
|
25
|
+
TooltipTrigger,
|
|
26
|
+
} from "@/components/ui/tooltip";
|
|
27
|
+
import { agentNativePath } from "@agent-native/core/client";
|
|
28
|
+
|
|
29
|
+
interface EnvStatus {
|
|
30
|
+
key: string;
|
|
31
|
+
label: string;
|
|
32
|
+
required: boolean;
|
|
33
|
+
configured: boolean;
|
|
34
|
+
helpText?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface RequiredEnvKey {
|
|
38
|
+
key: string;
|
|
39
|
+
label: string;
|
|
40
|
+
required: boolean;
|
|
41
|
+
helpText?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface IntegrationStatus {
|
|
45
|
+
platform: string;
|
|
46
|
+
label: string;
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
configured: boolean;
|
|
49
|
+
webhookUrl?: string;
|
|
50
|
+
requiredEnvKeys?: RequiredEnvKey[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface PlatformDefinition {
|
|
54
|
+
id: "slack" | "telegram" | "email" | "whatsapp";
|
|
55
|
+
label: string;
|
|
56
|
+
icon: typeof IconBrandSlack;
|
|
57
|
+
description: string;
|
|
58
|
+
/** Our own docs anchor — keep these on /docs/messaging so users land on
|
|
59
|
+
* the page that explains the platform in plain English. */
|
|
60
|
+
docsUrl: string;
|
|
61
|
+
/** Optional external link (e.g. to the platform's developer console). */
|
|
62
|
+
externalUrl?: string;
|
|
63
|
+
externalLabel?: string;
|
|
64
|
+
setupSteps: string[];
|
|
65
|
+
/** Fallback env keys when the adapter doesn't surface them via
|
|
66
|
+
* `IntegrationStatus.requiredEnvKeys`. The panel prefers adapter-supplied
|
|
67
|
+
* keys when present so optional fields (webhook secrets, etc.) appear
|
|
68
|
+
* automatically. */
|
|
69
|
+
envKeys: string[];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const PLATFORM_DEFINITIONS: PlatformDefinition[] = [
|
|
73
|
+
{
|
|
74
|
+
id: "slack",
|
|
75
|
+
label: "Slack",
|
|
76
|
+
icon: IconBrandSlack,
|
|
77
|
+
description: "Receive mentions and DMs in one workspace-aware dispatch.",
|
|
78
|
+
docsUrl: "/docs/messaging#slack",
|
|
79
|
+
externalUrl: "https://api.slack.com/apps",
|
|
80
|
+
externalLabel: "Open Slack apps",
|
|
81
|
+
envKeys: ["SLACK_BOT_TOKEN", "SLACK_SIGNING_SECRET"],
|
|
82
|
+
setupSteps: [
|
|
83
|
+
"Create or open a Slack app at api.slack.com/apps.",
|
|
84
|
+
"Save the bot token and signing secret below — the webhook URL appears once they're saved.",
|
|
85
|
+
"Back in Slack, enable Event Subscriptions and paste the webhook URL.",
|
|
86
|
+
"Subscribe to app_mention and message.im events, then install the app.",
|
|
87
|
+
"Optional but recommended: Basic Information → Display Information → upload an app icon and pick a background color so the bot has a clean avatar in every channel.",
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "telegram",
|
|
92
|
+
label: "Telegram",
|
|
93
|
+
icon: IconBrandTelegram,
|
|
94
|
+
description: "Chat with dispatch through a Telegram bot.",
|
|
95
|
+
docsUrl: "/docs/messaging#telegram",
|
|
96
|
+
externalUrl: "https://t.me/BotFather",
|
|
97
|
+
externalLabel: "Open BotFather",
|
|
98
|
+
envKeys: ["TELEGRAM_BOT_TOKEN"],
|
|
99
|
+
setupSteps: [
|
|
100
|
+
"Open @BotFather in Telegram and send /newbot.",
|
|
101
|
+
"Save the bot token here, then click Set up webhook below.",
|
|
102
|
+
"DM the bot in Telegram to test.",
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "email",
|
|
107
|
+
label: "Email",
|
|
108
|
+
icon: IconMail,
|
|
109
|
+
description:
|
|
110
|
+
"Give your agent an email address. People can email it directly or CC it on threads.",
|
|
111
|
+
docsUrl: "/docs/messaging#email",
|
|
112
|
+
externalUrl: "https://resend.com/webhooks",
|
|
113
|
+
externalLabel: "Open Resend webhooks",
|
|
114
|
+
envKeys: ["EMAIL_AGENT_ADDRESS"],
|
|
115
|
+
setupSteps: [
|
|
116
|
+
"Save your Resend or SendGrid API key (Vault or onboarding).",
|
|
117
|
+
"Pick an email address — the easiest is a free <slug>.resend.app address.",
|
|
118
|
+
"If using your own domain, add MX records pointing to your provider.",
|
|
119
|
+
"Save the address here, then register the webhook URL below in Resend (event: email.received).",
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "whatsapp",
|
|
124
|
+
label: "WhatsApp",
|
|
125
|
+
icon: IconBrandWhatsapp,
|
|
126
|
+
description:
|
|
127
|
+
"Receive WhatsApp messages and reply through a Meta-managed phone number.",
|
|
128
|
+
docsUrl: "/docs/messaging#whatsapp",
|
|
129
|
+
externalUrl: "https://developers.facebook.com/apps",
|
|
130
|
+
externalLabel: "Open Meta developer console",
|
|
131
|
+
envKeys: [
|
|
132
|
+
"WHATSAPP_ACCESS_TOKEN",
|
|
133
|
+
"WHATSAPP_VERIFY_TOKEN",
|
|
134
|
+
"WHATSAPP_PHONE_NUMBER_ID",
|
|
135
|
+
],
|
|
136
|
+
setupSteps: [
|
|
137
|
+
"Create a Meta app and add the WhatsApp product.",
|
|
138
|
+
"Save the access token, verify token, and phone number ID below.",
|
|
139
|
+
"In Meta's WhatsApp configuration, paste the webhook URL and your verify token.",
|
|
140
|
+
"Subscribe to the messages field, then enable here.",
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
];
|
|
144
|
+
|
|
145
|
+
function HelpTooltip({ content }: { content: string }) {
|
|
146
|
+
return (
|
|
147
|
+
<Tooltip>
|
|
148
|
+
<TooltipTrigger asChild>
|
|
149
|
+
<button
|
|
150
|
+
type="button"
|
|
151
|
+
className="text-muted-foreground/60 hover:text-foreground cursor-pointer"
|
|
152
|
+
>
|
|
153
|
+
<IconInfoCircle className="h-3.5 w-3.5" />
|
|
154
|
+
</button>
|
|
155
|
+
</TooltipTrigger>
|
|
156
|
+
<TooltipContent side="top" className="max-w-64 text-xs leading-relaxed">
|
|
157
|
+
{content}
|
|
158
|
+
</TooltipContent>
|
|
159
|
+
</Tooltip>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function StatusPill({
|
|
164
|
+
tone,
|
|
165
|
+
label,
|
|
166
|
+
}: {
|
|
167
|
+
tone: "neutral" | "success" | "warning";
|
|
168
|
+
label: string;
|
|
169
|
+
}) {
|
|
170
|
+
const toneClass =
|
|
171
|
+
tone === "success"
|
|
172
|
+
? "border-emerald-500/30 bg-emerald-500/10 text-emerald-300"
|
|
173
|
+
: tone === "warning"
|
|
174
|
+
? "border-amber-500/30 bg-amber-500/10 text-amber-300"
|
|
175
|
+
: "border-border bg-muted/40 text-muted-foreground";
|
|
176
|
+
|
|
177
|
+
return (
|
|
178
|
+
<span
|
|
179
|
+
className={`inline-flex items-center rounded-full border px-2.5 py-1 text-[11px] font-medium ${toneClass}`}
|
|
180
|
+
>
|
|
181
|
+
{label}
|
|
182
|
+
</span>
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/** Render a non-secret env value (e.g. EMAIL_AGENT_ADDRESS) as a copyable
|
|
187
|
+
* text block. We can't read the actual value from the backend (env-status
|
|
188
|
+
* only reports `configured: true|false`), so we offer a one-click reveal
|
|
189
|
+
* that hits a server endpoint, falling back to "saved" if the value is
|
|
190
|
+
* not exposed. For now we just render a "Saved — re-enter to change"
|
|
191
|
+
* placeholder; a future endpoint can return the actual value. */
|
|
192
|
+
function PublicValueReveal({ envKey: _envKey }: { envKey: string }) {
|
|
193
|
+
return (
|
|
194
|
+
<div className="rounded-md border bg-muted/20 px-3 py-2 text-xs text-muted-foreground">
|
|
195
|
+
Saved. Re-enter below to change.
|
|
196
|
+
</div>
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function ConnectionStatus({
|
|
201
|
+
configured,
|
|
202
|
+
enabled,
|
|
203
|
+
}: {
|
|
204
|
+
configured: boolean;
|
|
205
|
+
enabled: boolean;
|
|
206
|
+
}) {
|
|
207
|
+
if (enabled) {
|
|
208
|
+
return <StatusPill tone="success" label="Connected" />;
|
|
209
|
+
}
|
|
210
|
+
if (configured) {
|
|
211
|
+
return <StatusPill tone="warning" label="Configured, not enabled" />;
|
|
212
|
+
}
|
|
213
|
+
return <StatusPill tone="neutral" label="Not configured" />;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function MessagingSetupPanel() {
|
|
217
|
+
const [statuses, setStatuses] = useState<IntegrationStatus[]>([]);
|
|
218
|
+
const [loading, setLoading] = useState(true);
|
|
219
|
+
const [envStatuses, setEnvStatuses] = useState<EnvStatus[]>([]);
|
|
220
|
+
const [envLoading, setEnvLoading] = useState(true);
|
|
221
|
+
const [envValues, setEnvValues] = useState<Record<string, string>>({});
|
|
222
|
+
const [savingKeysFor, setSavingKeysFor] = useState<string | null>(null);
|
|
223
|
+
const [togglingPlatform, setTogglingPlatform] = useState<string | null>(null);
|
|
224
|
+
const [setupPlatform, setSetupPlatform] = useState<string | null>(null);
|
|
225
|
+
const [copiedWebhook, setCopiedWebhook] = useState<string | null>(null);
|
|
226
|
+
|
|
227
|
+
const refreshStatuses = async () => {
|
|
228
|
+
setLoading(true);
|
|
229
|
+
try {
|
|
230
|
+
const res = await fetch(
|
|
231
|
+
agentNativePath("/_agent-native/integrations/status"),
|
|
232
|
+
);
|
|
233
|
+
const rows = res.ok ? await res.json() : [];
|
|
234
|
+
setStatuses(Array.isArray(rows) ? rows : []);
|
|
235
|
+
} finally {
|
|
236
|
+
setLoading(false);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
useEffect(() => {
|
|
241
|
+
let active = true;
|
|
242
|
+
fetch(agentNativePath("/_agent-native/integrations/status"))
|
|
243
|
+
.then((res) => (res.ok ? res.json() : []))
|
|
244
|
+
.then((rows) => {
|
|
245
|
+
if (active) {
|
|
246
|
+
setStatuses(Array.isArray(rows) ? rows : []);
|
|
247
|
+
setLoading(false);
|
|
248
|
+
}
|
|
249
|
+
})
|
|
250
|
+
.catch(() => {
|
|
251
|
+
if (active) setLoading(false);
|
|
252
|
+
});
|
|
253
|
+
return () => {
|
|
254
|
+
active = false;
|
|
255
|
+
};
|
|
256
|
+
}, []);
|
|
257
|
+
|
|
258
|
+
useEffect(() => {
|
|
259
|
+
let active = true;
|
|
260
|
+
fetch(agentNativePath("/_agent-native/env-status"))
|
|
261
|
+
.then((res) => (res.ok ? res.json() : []))
|
|
262
|
+
.then((rows) => {
|
|
263
|
+
if (active) {
|
|
264
|
+
setEnvStatuses(Array.isArray(rows) ? rows : []);
|
|
265
|
+
setEnvLoading(false);
|
|
266
|
+
}
|
|
267
|
+
})
|
|
268
|
+
.catch(() => {
|
|
269
|
+
if (active) setEnvLoading(false);
|
|
270
|
+
});
|
|
271
|
+
return () => {
|
|
272
|
+
active = false;
|
|
273
|
+
};
|
|
274
|
+
}, []);
|
|
275
|
+
|
|
276
|
+
const envStatusByKey = useMemo(
|
|
277
|
+
() => new Map(envStatuses.map((status) => [status.key, status])),
|
|
278
|
+
[envStatuses],
|
|
279
|
+
);
|
|
280
|
+
const statusByPlatform = useMemo(
|
|
281
|
+
() => new Map(statuses.map((status) => [status.platform, status])),
|
|
282
|
+
[statuses],
|
|
283
|
+
);
|
|
284
|
+
|
|
285
|
+
const refreshEnvStatus = async () => {
|
|
286
|
+
setEnvLoading(true);
|
|
287
|
+
try {
|
|
288
|
+
const res = await fetch(agentNativePath("/_agent-native/env-status"));
|
|
289
|
+
const rows = res.ok ? await res.json() : [];
|
|
290
|
+
setEnvStatuses(Array.isArray(rows) ? rows : []);
|
|
291
|
+
} finally {
|
|
292
|
+
setEnvLoading(false);
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
const saveEnvKeys = async (platform: PlatformDefinition, keys: string[]) => {
|
|
297
|
+
const vars = keys
|
|
298
|
+
.map((key) => ({ key, value: envValues[key]?.trim() || "" }))
|
|
299
|
+
.filter((item) => item.value);
|
|
300
|
+
|
|
301
|
+
if (vars.length === 0) {
|
|
302
|
+
toast.error("Add the required credentials first.");
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
setSavingKeysFor(platform.id);
|
|
307
|
+
try {
|
|
308
|
+
const res = await fetch(agentNativePath("/_agent-native/env-vars"), {
|
|
309
|
+
method: "POST",
|
|
310
|
+
headers: { "Content-Type": "application/json" },
|
|
311
|
+
body: JSON.stringify({ vars }),
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
if (!res.ok) {
|
|
315
|
+
const payload = await res.json().catch(() => ({}));
|
|
316
|
+
throw new Error(payload.error || "Failed to save credentials");
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
toast.success(`${platform.label} credentials saved`);
|
|
320
|
+
setEnvValues((current) => {
|
|
321
|
+
const next = { ...current };
|
|
322
|
+
for (const key of keys) delete next[key];
|
|
323
|
+
return next;
|
|
324
|
+
});
|
|
325
|
+
await refreshEnvStatus();
|
|
326
|
+
await refreshStatuses();
|
|
327
|
+
} catch (error) {
|
|
328
|
+
toast.error(
|
|
329
|
+
error instanceof Error ? error.message : "Failed to save credentials",
|
|
330
|
+
);
|
|
331
|
+
} finally {
|
|
332
|
+
setSavingKeysFor(null);
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
const togglePlatform = async (
|
|
337
|
+
platform: PlatformDefinition,
|
|
338
|
+
enabled: boolean,
|
|
339
|
+
) => {
|
|
340
|
+
setTogglingPlatform(platform.id);
|
|
341
|
+
try {
|
|
342
|
+
const action = enabled ? "disable" : "enable";
|
|
343
|
+
const res = await fetch(
|
|
344
|
+
`/_agent-native/integrations/${platform.id}/${action}`,
|
|
345
|
+
{
|
|
346
|
+
method: "POST",
|
|
347
|
+
},
|
|
348
|
+
);
|
|
349
|
+
if (!res.ok) {
|
|
350
|
+
const payload = await res.json().catch(() => ({}));
|
|
351
|
+
throw new Error(
|
|
352
|
+
payload.error || `Failed to ${action} ${platform.label}`,
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
toast.success(
|
|
356
|
+
enabled
|
|
357
|
+
? `${platform.label} disconnected`
|
|
358
|
+
: `${platform.label} connected`,
|
|
359
|
+
);
|
|
360
|
+
await refreshStatuses();
|
|
361
|
+
} catch (error) {
|
|
362
|
+
toast.error(
|
|
363
|
+
error instanceof Error ? error.message : "Failed to update integration",
|
|
364
|
+
);
|
|
365
|
+
} finally {
|
|
366
|
+
setTogglingPlatform(null);
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
const runSetup = async (platform: PlatformDefinition) => {
|
|
371
|
+
setSetupPlatform(platform.id);
|
|
372
|
+
try {
|
|
373
|
+
const res = await fetch(
|
|
374
|
+
`/_agent-native/integrations/${platform.id}/setup`,
|
|
375
|
+
{
|
|
376
|
+
method: "POST",
|
|
377
|
+
},
|
|
378
|
+
);
|
|
379
|
+
if (!res.ok) {
|
|
380
|
+
const payload = await res.json().catch(() => ({}));
|
|
381
|
+
throw new Error(payload.error || `Failed to set up ${platform.label}`);
|
|
382
|
+
}
|
|
383
|
+
toast.success(
|
|
384
|
+
platform.id === "telegram"
|
|
385
|
+
? "Telegram webhook registered"
|
|
386
|
+
: `${platform.label} setup complete`,
|
|
387
|
+
);
|
|
388
|
+
await refreshStatuses();
|
|
389
|
+
} catch (error) {
|
|
390
|
+
toast.error(
|
|
391
|
+
error instanceof Error
|
|
392
|
+
? error.message
|
|
393
|
+
: `Failed to set up ${platform.label}`,
|
|
394
|
+
);
|
|
395
|
+
} finally {
|
|
396
|
+
setSetupPlatform(null);
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
const copyWebhook = async (webhookUrl: string) => {
|
|
401
|
+
await navigator.clipboard.writeText(webhookUrl);
|
|
402
|
+
setCopiedWebhook(webhookUrl);
|
|
403
|
+
toast.success("Webhook URL copied");
|
|
404
|
+
setTimeout(() => setCopiedWebhook(null), 1500);
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
return (
|
|
408
|
+
<div className="space-y-4">
|
|
409
|
+
<div className="grid gap-4 xl:grid-cols-2">
|
|
410
|
+
{PLATFORM_DEFINITIONS.map((platform) => {
|
|
411
|
+
const status = statusByPlatform.get(platform.id);
|
|
412
|
+
const configured = !!status?.configured;
|
|
413
|
+
const enabled = !!status?.enabled;
|
|
414
|
+
// Prefer adapter-supplied env keys (includes optional fields like
|
|
415
|
+
// webhook secrets); fall back to the static list.
|
|
416
|
+
const adapterKeys = status?.requiredEnvKeys;
|
|
417
|
+
const envKeys: RequiredEnvKey[] =
|
|
418
|
+
adapterKeys && adapterKeys.length > 0
|
|
419
|
+
? adapterKeys
|
|
420
|
+
: platform.envKeys.map((key) => ({
|
|
421
|
+
key,
|
|
422
|
+
label: key,
|
|
423
|
+
required: true,
|
|
424
|
+
}));
|
|
425
|
+
const canEnable = configured;
|
|
426
|
+
|
|
427
|
+
return (
|
|
428
|
+
<section
|
|
429
|
+
key={platform.id}
|
|
430
|
+
className="rounded-2xl border bg-card p-5"
|
|
431
|
+
>
|
|
432
|
+
<div className="flex items-start justify-between gap-4">
|
|
433
|
+
<div className="flex items-start gap-3">
|
|
434
|
+
<div className="flex h-10 w-10 items-center justify-center rounded-xl border bg-muted/30 text-foreground">
|
|
435
|
+
<platform.icon size={18} />
|
|
436
|
+
</div>
|
|
437
|
+
<div>
|
|
438
|
+
<div className="flex items-center gap-2">
|
|
439
|
+
<h3 className="text-base font-semibold text-foreground">
|
|
440
|
+
{platform.label}
|
|
441
|
+
</h3>
|
|
442
|
+
<ConnectionStatus
|
|
443
|
+
configured={configured}
|
|
444
|
+
enabled={enabled}
|
|
445
|
+
/>
|
|
446
|
+
</div>
|
|
447
|
+
<p className="mt-1 text-sm text-muted-foreground">
|
|
448
|
+
{platform.description}
|
|
449
|
+
</p>
|
|
450
|
+
</div>
|
|
451
|
+
</div>
|
|
452
|
+
<div className="flex items-center gap-3">
|
|
453
|
+
<a
|
|
454
|
+
href={platform.docsUrl}
|
|
455
|
+
className="inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground"
|
|
456
|
+
>
|
|
457
|
+
Docs
|
|
458
|
+
</a>
|
|
459
|
+
{platform.externalUrl ? (
|
|
460
|
+
<a
|
|
461
|
+
href={platform.externalUrl}
|
|
462
|
+
target="_blank"
|
|
463
|
+
rel="noreferrer"
|
|
464
|
+
className="inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground"
|
|
465
|
+
>
|
|
466
|
+
{platform.externalLabel ?? "Open"}
|
|
467
|
+
<IconExternalLink className="h-3.5 w-3.5" />
|
|
468
|
+
</a>
|
|
469
|
+
) : null}
|
|
470
|
+
</div>
|
|
471
|
+
</div>
|
|
472
|
+
|
|
473
|
+
<Collapsible className="mt-5">
|
|
474
|
+
<CollapsibleTrigger className="group flex w-full cursor-pointer items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground">
|
|
475
|
+
<IconChevronRight className="h-3.5 w-3.5 transition-transform group-data-[state=open]:rotate-90" />
|
|
476
|
+
<span>Setup steps</span>
|
|
477
|
+
</CollapsibleTrigger>
|
|
478
|
+
<CollapsibleContent>
|
|
479
|
+
<div className="mt-2 rounded-xl border bg-muted/20 p-4">
|
|
480
|
+
<ol className="space-y-2 text-sm text-muted-foreground">
|
|
481
|
+
{platform.setupSteps.map((step, index) => (
|
|
482
|
+
<li key={step} className="flex gap-2">
|
|
483
|
+
<span className="text-muted-foreground/60">
|
|
484
|
+
{index + 1}.
|
|
485
|
+
</span>
|
|
486
|
+
<span>{step}</span>
|
|
487
|
+
</li>
|
|
488
|
+
))}
|
|
489
|
+
</ol>
|
|
490
|
+
</div>
|
|
491
|
+
</CollapsibleContent>
|
|
492
|
+
</Collapsible>
|
|
493
|
+
|
|
494
|
+
<div className="mt-4 space-y-3">
|
|
495
|
+
<div className="flex items-center gap-2">
|
|
496
|
+
<div className="text-sm font-medium text-foreground">
|
|
497
|
+
Credentials
|
|
498
|
+
</div>
|
|
499
|
+
{envLoading ? (
|
|
500
|
+
<span className="text-xs text-muted-foreground">
|
|
501
|
+
Checking...
|
|
502
|
+
</span>
|
|
503
|
+
) : null}
|
|
504
|
+
</div>
|
|
505
|
+
<div className="space-y-3">
|
|
506
|
+
{envKeys.map((envKey) => {
|
|
507
|
+
const envStatus = envStatusByKey.get(envKey.key);
|
|
508
|
+
const isConfigured = !!envStatus?.configured;
|
|
509
|
+
const helpText = envKey.helpText ?? envStatus?.helpText;
|
|
510
|
+
const label =
|
|
511
|
+
envKey.label || envStatus?.label || envKey.key;
|
|
512
|
+
// Email agent address is not a secret — show it plainly
|
|
513
|
+
// so users can copy and share it.
|
|
514
|
+
const isPublicValue = envKey.key === "EMAIL_AGENT_ADDRESS";
|
|
515
|
+
return (
|
|
516
|
+
<div key={envKey.key} className="space-y-1.5">
|
|
517
|
+
<div className="flex items-center justify-between gap-3">
|
|
518
|
+
<div className="flex items-center gap-1.5">
|
|
519
|
+
<label className="text-xs font-medium text-foreground">
|
|
520
|
+
{label}
|
|
521
|
+
{!envKey.required ? (
|
|
522
|
+
<span className="ml-1 text-muted-foreground">
|
|
523
|
+
(optional)
|
|
524
|
+
</span>
|
|
525
|
+
) : null}
|
|
526
|
+
</label>
|
|
527
|
+
{helpText ? (
|
|
528
|
+
<HelpTooltip content={helpText} />
|
|
529
|
+
) : null}
|
|
530
|
+
</div>
|
|
531
|
+
{isConfigured ? (
|
|
532
|
+
<StatusPill tone="success" label="Saved" />
|
|
533
|
+
) : (
|
|
534
|
+
<StatusPill
|
|
535
|
+
tone={envKey.required ? "neutral" : "neutral"}
|
|
536
|
+
label={envKey.required ? "Missing" : "Not set"}
|
|
537
|
+
/>
|
|
538
|
+
)}
|
|
539
|
+
</div>
|
|
540
|
+
{isConfigured && isPublicValue ? (
|
|
541
|
+
<PublicValueReveal envKey={envKey.key} />
|
|
542
|
+
) : !isConfigured ? (
|
|
543
|
+
<Input
|
|
544
|
+
type={isPublicValue ? "text" : "password"}
|
|
545
|
+
value={envValues[envKey.key] || ""}
|
|
546
|
+
onChange={(event) =>
|
|
547
|
+
setEnvValues((current) => ({
|
|
548
|
+
...current,
|
|
549
|
+
[envKey.key]: event.target.value,
|
|
550
|
+
}))
|
|
551
|
+
}
|
|
552
|
+
placeholder={
|
|
553
|
+
isPublicValue
|
|
554
|
+
? "agent@yourcompany.com"
|
|
555
|
+
: `Enter ${label}`
|
|
556
|
+
}
|
|
557
|
+
autoComplete="off"
|
|
558
|
+
/>
|
|
559
|
+
) : null}
|
|
560
|
+
</div>
|
|
561
|
+
);
|
|
562
|
+
})}
|
|
563
|
+
</div>
|
|
564
|
+
{envKeys.some((k) => !envStatusByKey.get(k.key)?.configured) ? (
|
|
565
|
+
<Button
|
|
566
|
+
variant="outline"
|
|
567
|
+
onClick={() =>
|
|
568
|
+
saveEnvKeys(
|
|
569
|
+
platform,
|
|
570
|
+
envKeys.map((k) => k.key),
|
|
571
|
+
)
|
|
572
|
+
}
|
|
573
|
+
disabled={savingKeysFor === platform.id}
|
|
574
|
+
>
|
|
575
|
+
{savingKeysFor === platform.id ? (
|
|
576
|
+
<>
|
|
577
|
+
<IconLoader2 className="mr-2 h-4 w-4 animate-spin" />
|
|
578
|
+
Saving...
|
|
579
|
+
</>
|
|
580
|
+
) : (
|
|
581
|
+
"Save credentials"
|
|
582
|
+
)}
|
|
583
|
+
</Button>
|
|
584
|
+
) : null}
|
|
585
|
+
</div>
|
|
586
|
+
|
|
587
|
+
{status?.webhookUrl ? (
|
|
588
|
+
<div className="mt-4 space-y-2">
|
|
589
|
+
<div className="text-sm font-medium text-foreground">
|
|
590
|
+
Webhook URL
|
|
591
|
+
</div>
|
|
592
|
+
<div className="flex items-center gap-2">
|
|
593
|
+
<code className="flex-1 truncate rounded-md border bg-muted/30 px-3 py-2 text-xs text-foreground">
|
|
594
|
+
{status.webhookUrl}
|
|
595
|
+
</code>
|
|
596
|
+
<Button
|
|
597
|
+
variant="outline"
|
|
598
|
+
size="icon"
|
|
599
|
+
onClick={() => copyWebhook(status.webhookUrl!)}
|
|
600
|
+
aria-label={`Copy ${platform.label} webhook URL`}
|
|
601
|
+
>
|
|
602
|
+
{copiedWebhook === status.webhookUrl ? (
|
|
603
|
+
<IconCheck className="h-4 w-4" />
|
|
604
|
+
) : (
|
|
605
|
+
<IconCopy className="h-4 w-4" />
|
|
606
|
+
)}
|
|
607
|
+
</Button>
|
|
608
|
+
</div>
|
|
609
|
+
</div>
|
|
610
|
+
) : null}
|
|
611
|
+
|
|
612
|
+
<div className="mt-5 flex flex-wrap gap-2">
|
|
613
|
+
{platform.id === "telegram" && configured ? (
|
|
614
|
+
<Button
|
|
615
|
+
variant="outline"
|
|
616
|
+
onClick={() => runSetup(platform)}
|
|
617
|
+
disabled={setupPlatform === platform.id}
|
|
618
|
+
>
|
|
619
|
+
{setupPlatform === platform.id ? (
|
|
620
|
+
<>
|
|
621
|
+
<IconLoader2 className="mr-2 h-4 w-4 animate-spin" />
|
|
622
|
+
Setting up...
|
|
623
|
+
</>
|
|
624
|
+
) : (
|
|
625
|
+
"Set up webhook"
|
|
626
|
+
)}
|
|
627
|
+
</Button>
|
|
628
|
+
) : null}
|
|
629
|
+
<Button
|
|
630
|
+
onClick={() => togglePlatform(platform, enabled)}
|
|
631
|
+
disabled={
|
|
632
|
+
togglingPlatform === platform.id || (!enabled && !canEnable)
|
|
633
|
+
}
|
|
634
|
+
>
|
|
635
|
+
{togglingPlatform === platform.id ? (
|
|
636
|
+
<>
|
|
637
|
+
<IconLoader2 className="mr-2 h-4 w-4 animate-spin" />
|
|
638
|
+
Saving...
|
|
639
|
+
</>
|
|
640
|
+
) : enabled ? (
|
|
641
|
+
"Disable"
|
|
642
|
+
) : (
|
|
643
|
+
"Enable"
|
|
644
|
+
)}
|
|
645
|
+
</Button>
|
|
646
|
+
</div>
|
|
647
|
+
|
|
648
|
+
{!configured ? (
|
|
649
|
+
<p className="mt-3 text-xs text-muted-foreground">
|
|
650
|
+
Save the required credentials before enabling {platform.label}
|
|
651
|
+
.
|
|
652
|
+
</p>
|
|
653
|
+
) : null}
|
|
654
|
+
</section>
|
|
655
|
+
);
|
|
656
|
+
})}
|
|
657
|
+
</div>
|
|
658
|
+
|
|
659
|
+
{loading ? (
|
|
660
|
+
<div className="rounded-2xl border border-dashed px-4 py-6 text-sm text-muted-foreground">
|
|
661
|
+
Loading messaging status...
|
|
662
|
+
</div>
|
|
663
|
+
) : null}
|
|
664
|
+
</div>
|
|
665
|
+
);
|
|
666
|
+
}
|