@burdenoff/microfe-eventfullymanaged 2026.1110.9 → 2026.1110.10

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.
@@ -177,7 +177,8 @@ function V({ connector: e, onDelete: t, onSync: n, eventOptions: r }) {
177
177
  }), /* @__PURE__ */ d(o, {
178
178
  ariaLabel: `${e.name} connector actions`,
179
179
  entityName: e.name,
180
- onDelete: t
180
+ onDelete: t,
181
+ confirmNote: "The stored access token will be wiped here, but you should also revoke or rotate it in your HubSpot account — disconnecting here cannot revoke it at HubSpot."
181
182
  })]
182
183
  }),
183
184
  /* @__PURE__ */ f("div", {
@@ -208,7 +209,7 @@ function V({ connector: e, onDelete: t, onSync: n, eventOptions: r }) {
208
209
  }
209
210
  },
210
211
  disabled: c || e.status !== "CONNECTED",
211
- children: [/* @__PURE__ */ d(g, { className: "h-4 w-4" }), c ? "Syncing…" : "Sync attendees"]
212
+ children: [/* @__PURE__ */ d(g, { className: "h-4 w-4" }), c ? "Syncing…" : "Sync attendees & leads"]
212
213
  })]
213
214
  }),
214
215
  b.length > 0 ? /* @__PURE__ */ d("div", {
@@ -286,7 +287,7 @@ function H() {
286
287
  children: /* @__PURE__ */ d(C, {
287
288
  illustration: "empty-data",
288
289
  title: "No connectors yet",
289
- description: "Connect a CRM or marketing-automation account to sync attendees automatically.",
290
+ description: "Connect a CRM or marketing-automation account, then sync attendees and leads on demand from the connector card — nothing syncs automatically.",
290
291
  className: "py-6"
291
292
  })
292
293
  }) : /* @__PURE__ */ d("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"IntegrationsPage.js","names":["Badge","Badge$1","PROVIDERS","statusMeta","status","CheckCircle2","XCircle","Plug","CreateConnectorDialog","name","setName","useState","provider","setProvider","accessToken","setAccessToken","createConnector","saving","useCreateIntegrationConnectorMutation","ResponsiveDialog","ResponsiveDialogContent","ResponsiveDialogHeader","ResponsiveDialogTitle","ResponsiveDialogDescription","event","response","mutationSucceeded","created","notify","onOpenChange","error","describeError","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","p","Input","ResponsiveDialogFooter","Button","ConnectorCard","syncEventId","setSyncEventId","syncing","setSyncing","StatusIcon","connector","runsQuery","useIntegrationSyncRunsQuery","runs","GlassCard","ActionMenu","eventOptions","onSync","RefreshCw","run","IntegrationsPage","createOpen","setCreateOpen","connectorsQuery","useIntegrationConnectorsQuery","eventsData","useEventsQuery","deleteConnector","useDeleteIntegrationConnectorMutation","syncAttendees","useSyncAttendeesToConnectorMutation","connectors","onDelete","PagePurpose","EmphasisPanel","GradientText","Plus","IllustratedEmptyState","eventId","Label"],"sources":["../../../../src/eventfullymanaged/pages/modules/IntegrationsPage.tsx"],"sourcesContent":["/**\n * IntegrationsPage (BOFF-4324)\n *\n * Real CRM/marketing-automation integration catalog: register a connector\n * (currently HubSpot — the only provider with a real working client, see\n * `IntegrationService` in `wspace-eventfullymanaged-svc`), see its live\n * connection status, and sync an event's attendees + leads to it as CRM\n * contacts. Sync runs are recorded and shown with real record counts.\n *\n * Replaces the prior `RoadmapPanel` placeholder for this route now that the\n * connector framework is real and shipped.\n */\nimport {\n Badge,\n Button,\n EmphasisPanel,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n Label,\n PagePurpose,\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogDescription,\n ResponsiveDialogFooter,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@burdenoff/fe-libs/ui';\nimport { CheckCircle2, Plug, Plus, RefreshCw, XCircle } from 'lucide-react';\nimport { useState } from 'react';\n\nimport {\n useCreateIntegrationConnectorMutation,\n useDeleteIntegrationConnectorMutation,\n useEventsQuery,\n useIntegrationConnectorsQuery,\n useIntegrationSyncRunsQuery,\n useSyncAttendeesToConnectorMutation,\n type IntegrationConnectorGql,\n} from '../../api/eventApi';\nimport { ActionMenu } from '../../components/ActionMenu';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\n\nconst PROVIDERS = [{ value: 'HUBSPOT', label: 'HubSpot' }];\n\nfunction statusMeta(status: IntegrationConnectorGql['status']): {\n variant: 'success' | 'warning' | 'secondary' | 'info';\n icon: typeof CheckCircle2;\n} {\n if (status === 'CONNECTED') return { variant: 'success', icon: CheckCircle2 };\n if (status === 'ERROR') return { variant: 'warning', icon: XCircle };\n return { variant: 'secondary', icon: Plug };\n}\n\ninterface CreateConnectorDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}\n\nfunction CreateConnectorDialog({ open, onOpenChange }: CreateConnectorDialogProps) {\n const [name, setName] = useState('');\n const [provider, setProvider] = useState('HUBSPOT');\n const [accessToken, setAccessToken] = useState('');\n const [createConnector, { loading: saving }] = useCreateIntegrationConnectorMutation();\n\n const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n if (!name.trim() || !accessToken.trim()) {\n notify.error('Missing details', 'Give the connector a name and paste the private-app access token.');\n return;\n }\n try {\n const response = await createConnector({\n variables: { input: { provider, name: name.trim(), accessToken: accessToken.trim() } },\n });\n if (!mutationSucceeded(response, response.data?.createIntegrationConnector?.id, 'Could not create connector')) {\n return;\n }\n const created = response.data?.createIntegrationConnector;\n if (created?.status === 'CONNECTED') {\n notify.success('Connector connected', `${created.name} verified live against ${provider}.`);\n } else {\n notify.info(\n 'Connector created',\n `${created?.name ?? 'Connector'} was saved but could not verify — check the token.`\n );\n }\n setName('');\n setAccessToken('');\n onOpenChange(false);\n } catch (error) {\n notify.error('Could not create connector', describeError(error));\n }\n };\n\n return (\n <ResponsiveDialog open={open} onOpenChange={onOpenChange}>\n <ResponsiveDialogContent className=\"max-w-lg\">\n <ResponsiveDialogHeader>\n <ResponsiveDialogTitle>New integration connector</ResponsiveDialogTitle>\n <ResponsiveDialogDescription>\n Connects to your CRM/marketing-automation account with a private-app access token. The token is encrypted at\n rest and never shown again after saving.\n </ResponsiveDialogDescription>\n </ResponsiveDialogHeader>\n\n <form id=\"connector-form\" onSubmit={onSubmit} className=\"space-y-4\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Provider</span>\n <Select value={provider} onValueChange={setProvider}>\n <SelectTrigger aria-label=\"Provider\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {PROVIDERS.map((p) => (\n <SelectItem key={p.value} value={p.value}>\n {p.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <p className=\"text-xs text-text-secondary\">\n HubSpot is the only live connector today — more providers can be added without a schema change.\n </p>\n </label>\n\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Connector name</span>\n <Input value={name} onChange={(e) => setName(e.target.value)} placeholder=\"Marketing HubSpot\" required />\n </label>\n\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Private-app access token</span>\n <Input\n type=\"password\"\n value={accessToken}\n onChange={(e) => setAccessToken(e.target.value)}\n placeholder=\"pat-na1-…\"\n autoComplete=\"off\"\n required\n />\n <p className=\"text-xs text-text-secondary\">\n From your HubSpot developer sandbox: Settings → Integrations → Private Apps. Needs the{' '}\n <code>crm.objects.contacts.read/write</code> scopes.\n </p>\n </label>\n </form>\n\n <ResponsiveDialogFooter>\n <Button type=\"button\" variant=\"outline\" onClick={() => onOpenChange(false)} disabled={saving}>\n Cancel\n </Button>\n <Button type=\"submit\" form=\"connector-form\" disabled={saving}>\n {saving ? 'Connecting…' : 'Create & test connection'}\n </Button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n}\n\ninterface ConnectorCardProps {\n connector: IntegrationConnectorGql;\n onDelete: () => void;\n onSync: (eventId: string) => Promise<void>;\n eventOptions: Array<{ id: string; name: string }>;\n}\n\nfunction ConnectorCard({ connector, onDelete, onSync, eventOptions }: ConnectorCardProps) {\n const [syncEventId, setSyncEventId] = useState('');\n const [syncing, setSyncing] = useState(false);\n const { variant, icon: StatusIcon } = statusMeta(connector.status);\n const runsQuery = useIntegrationSyncRunsQuery({ connectorId: connector.id, limit: 5, offset: 0 });\n const runs = runsQuery.data?.integrationSyncRuns ?? [];\n\n const onSyncClick = async () => {\n if (!syncEventId) {\n notify.error('Pick an event', 'Choose which event to sync attendees from.');\n return;\n }\n setSyncing(true);\n try {\n await onSync(syncEventId);\n await runsQuery.refetch();\n } finally {\n setSyncing(false);\n }\n };\n\n return (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-4\">\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"min-w-0\">\n <div className=\"flex items-center gap-2\">\n <p className=\"truncate font-medium text-text-primary\">{connector.name}</p>\n <Badge variant=\"secondary\" className=\"uppercase\">\n {connector.provider}\n </Badge>\n </div>\n <p className=\"mt-1 flex items-center gap-1.5 text-xs text-text-secondary\">\n <StatusIcon className=\"h-3.5 w-3.5\" />\n <Badge variant={variant} className=\"uppercase\">\n {connector.status}\n </Badge>\n {connector.externalAccountName ? <span>· {connector.externalAccountName}</span> : null}\n </p>\n {connector.lastError ? <p className=\"mt-1 text-xs text-status-danger\">{connector.lastError}</p> : null}\n </div>\n <ActionMenu ariaLabel={`${connector.name} connector actions`} entityName={connector.name} onDelete={onDelete} />\n </div>\n\n <div className=\"mt-3 flex flex-wrap items-center gap-2\">\n <Select value={syncEventId} onValueChange={setSyncEventId}>\n <SelectTrigger aria-label=\"Event to sync\" className=\"w-56\">\n <SelectValue placeholder=\"Select an event\" />\n </SelectTrigger>\n <SelectContent>\n {eventOptions.map((event) => (\n <SelectItem key={event.id} value={event.id}>\n {event.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Button type=\"button\" size=\"sm\" onClick={onSyncClick} disabled={syncing || connector.status !== 'CONNECTED'}>\n <RefreshCw className=\"h-4 w-4\" />\n {syncing ? 'Syncing…' : 'Sync attendees'}\n </Button>\n </div>\n\n {runs.length > 0 ? (\n <div className=\"mt-3 space-y-1.5 border-t border-border-seam pt-3\">\n {runs.map((run) => (\n <div key={run.id} className=\"flex items-center justify-between text-xs text-text-secondary\">\n <span>{new Date(run.startedAt).toLocaleString()}</span>\n <span className=\"flex items-center gap-2\">\n <Badge\n variant={run.status === 'SUCCESS' ? 'success' : run.status === 'FAILED' ? 'warning' : 'info'}\n className=\"uppercase\"\n >\n {run.status}\n </Badge>\n <span>\n {run.recordsSynced} synced{run.recordsFailed > 0 ? `, ${run.recordsFailed} failed` : ''}\n </span>\n </span>\n </div>\n ))}\n </div>\n ) : null}\n </GlassCard>\n );\n}\n\nexport default function IntegrationsPage() {\n const [createOpen, setCreateOpen] = useState(false);\n const connectorsQuery = useIntegrationConnectorsQuery({ limit: 50, offset: 0 });\n const { data: eventsData } = useEventsQuery({ limit: 100, offset: 0 });\n const [deleteConnector] = useDeleteIntegrationConnectorMutation();\n const [syncAttendees] = useSyncAttendeesToConnectorMutation();\n\n const connectors = connectorsQuery.data?.integrationConnectors ?? [];\n const eventOptions = eventsData?.events?.items ?? [];\n\n const onDelete = async (connector: IntegrationConnectorGql) => {\n try {\n const response = await deleteConnector({ variables: { id: connector.id } });\n if (\n !mutationSucceeded(\n response,\n response.data?.deleteIntegrationConnector ? connector.id : undefined,\n 'Could not remove connector'\n )\n ) {\n return;\n }\n notify.success('Connector removed', `${connector.name} was disconnected.`);\n } catch (error) {\n notify.error('Could not remove connector', describeError(error));\n }\n };\n\n const onSync = async (connector: IntegrationConnectorGql, eventId: string) => {\n try {\n const response = await syncAttendees({ variables: { connectorId: connector.id, eventId } });\n const run = response.data?.syncAttendeesToConnector;\n if (!run) {\n notify.error('Sync failed', response.error?.message ?? 'Please try again.');\n return;\n }\n if (run.status === 'SUCCESS') {\n notify.success(\n 'Sync complete',\n `${run.recordsSynced} attendee${run.recordsSynced === 1 ? '' : 's'} synced to ${connector.name}.`\n );\n } else {\n notify.error('Sync failed', run.errorMessage ?? 'The provider rejected the sync.');\n }\n } catch (error) {\n notify.error('Could not sync attendees', describeError(error));\n }\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n Integration connectors sync this workspace&apos;s real attendee and lead data to your CRM or\n marketing-automation platform. Register a connector with a private-app access token, verify the live connection,\n then sync any event&apos;s attendees as CRM contacts on demand.\n </PagePurpose>\n\n <EmphasisPanel className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>Integrations</GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n CRM and marketing-automation connectors for this workspace.\n </p>\n </div>\n <Button type=\"button\" onClick={() => setCreateOpen(true)}>\n <Plus className=\"h-4 w-4\" />\n New connector\n </Button>\n </EmphasisPanel>\n\n {connectorsQuery.loading ? null : connectors.length === 0 ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-8\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No connectors yet\"\n description=\"Connect a CRM or marketing-automation account to sync attendees automatically.\"\n className=\"py-6\"\n />\n </GlassCard>\n ) : (\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n {connectors.map((connector) => (\n <ConnectorCard\n key={connector.id}\n connector={connector}\n eventOptions={eventOptions}\n onDelete={() => onDelete(connector)}\n onSync={(eventId) => onSync(connector, eventId)}\n />\n ))}\n </div>\n )}\n\n <CreateConnectorDialog open={createOpen} onOpenChange={setCreateOpen} />\n\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-4 text-xs text-text-secondary\">\n <Label className=\"text-text-primary\">Connector framework</Label>\n <p className=\"mt-1\">\n Only HubSpot has a real working client today. Adding a second provider (Salesforce, Mailchimp, …) is a\n backend-only change — no changes needed here once it ships.\n </p>\n <p className=\"mt-2\">\n <span className=\"font-medium text-text-primary\">Not built yet:</span> outbound webhooks and calendar sync are\n still roadmap items, not shipped — this page only covers CRM/marketing-automation connectors.\n </p>\n </GlassCard>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAkDA,IAAME,I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;MAAO,WAAU;MAAoB,UAAA;KAA0B,CAAA;KAC/D,kBAAC,KAAD;MAAG,WAAU;MAAO,UAAA;KAGjB,CAAA;KACH,kBAAC,KAAD;MAAG,WAAU;MAAb,UAAA,CACE,kBAAC,QAAD;OAAM,WAAU;OAAgC,UAAA;MAAoB,CAAA,GAAC,wIAEpE;;IACM;;EACR;;AAET"}
1
+ {"version":3,"file":"IntegrationsPage.js","names":["Badge","Badge$1","PROVIDERS","statusMeta","status","CheckCircle2","XCircle","Plug","CreateConnectorDialog","name","setName","useState","provider","setProvider","accessToken","setAccessToken","createConnector","saving","useCreateIntegrationConnectorMutation","ResponsiveDialog","ResponsiveDialogContent","ResponsiveDialogHeader","ResponsiveDialogTitle","ResponsiveDialogDescription","event","response","mutationSucceeded","created","notify","onOpenChange","error","describeError","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","p","Input","ResponsiveDialogFooter","Button","ConnectorCard","syncEventId","setSyncEventId","syncing","setSyncing","StatusIcon","connector","runsQuery","useIntegrationSyncRunsQuery","runs","GlassCard","ActionMenu","eventOptions","onSync","RefreshCw","run","IntegrationsPage","createOpen","setCreateOpen","connectorsQuery","useIntegrationConnectorsQuery","eventsData","useEventsQuery","deleteConnector","useDeleteIntegrationConnectorMutation","syncAttendees","useSyncAttendeesToConnectorMutation","connectors","onDelete","PagePurpose","EmphasisPanel","GradientText","Plus","IllustratedEmptyState","eventId","Label"],"sources":["../../../../src/eventfullymanaged/pages/modules/IntegrationsPage.tsx"],"sourcesContent":["/**\n * IntegrationsPage (BOFF-4324)\n *\n * Real CRM/marketing-automation integration catalog: register a connector\n * (currently HubSpot — the only provider with a real working client, see\n * `IntegrationService` in `wspace-eventfullymanaged-svc`), see its live\n * connection status, and sync an event's attendees + leads to it as CRM\n * contacts. Sync runs are recorded and shown with real record counts.\n *\n * Replaces the prior `RoadmapPanel` placeholder for this route now that the\n * connector framework is real and shipped.\n */\nimport {\n Badge,\n Button,\n EmphasisPanel,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n Label,\n PagePurpose,\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogDescription,\n ResponsiveDialogFooter,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@burdenoff/fe-libs/ui';\nimport { CheckCircle2, Plug, Plus, RefreshCw, XCircle } from 'lucide-react';\nimport { useState } from 'react';\n\nimport {\n useCreateIntegrationConnectorMutation,\n useDeleteIntegrationConnectorMutation,\n useEventsQuery,\n useIntegrationConnectorsQuery,\n useIntegrationSyncRunsQuery,\n useSyncAttendeesToConnectorMutation,\n type IntegrationConnectorGql,\n} from '../../api/eventApi';\nimport { ActionMenu } from '../../components/ActionMenu';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\n\nconst PROVIDERS = [{ value: 'HUBSPOT', label: 'HubSpot' }];\n\nfunction statusMeta(status: IntegrationConnectorGql['status']): {\n variant: 'success' | 'warning' | 'secondary' | 'info';\n icon: typeof CheckCircle2;\n} {\n if (status === 'CONNECTED') return { variant: 'success', icon: CheckCircle2 };\n if (status === 'ERROR') return { variant: 'warning', icon: XCircle };\n return { variant: 'secondary', icon: Plug };\n}\n\ninterface CreateConnectorDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}\n\nfunction CreateConnectorDialog({ open, onOpenChange }: CreateConnectorDialogProps) {\n const [name, setName] = useState('');\n const [provider, setProvider] = useState('HUBSPOT');\n const [accessToken, setAccessToken] = useState('');\n const [createConnector, { loading: saving }] = useCreateIntegrationConnectorMutation();\n\n const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n if (!name.trim() || !accessToken.trim()) {\n notify.error('Missing details', 'Give the connector a name and paste the private-app access token.');\n return;\n }\n try {\n const response = await createConnector({\n variables: { input: { provider, name: name.trim(), accessToken: accessToken.trim() } },\n });\n if (!mutationSucceeded(response, response.data?.createIntegrationConnector?.id, 'Could not create connector')) {\n return;\n }\n const created = response.data?.createIntegrationConnector;\n if (created?.status === 'CONNECTED') {\n notify.success('Connector connected', `${created.name} verified live against ${provider}.`);\n } else {\n notify.info(\n 'Connector created',\n `${created?.name ?? 'Connector'} was saved but could not verify — check the token.`\n );\n }\n setName('');\n setAccessToken('');\n onOpenChange(false);\n } catch (error) {\n notify.error('Could not create connector', describeError(error));\n }\n };\n\n return (\n <ResponsiveDialog open={open} onOpenChange={onOpenChange}>\n <ResponsiveDialogContent className=\"max-w-lg\">\n <ResponsiveDialogHeader>\n <ResponsiveDialogTitle>New integration connector</ResponsiveDialogTitle>\n <ResponsiveDialogDescription>\n Connects to your CRM/marketing-automation account with a private-app access token. The token is encrypted at\n rest and never shown again after saving.\n </ResponsiveDialogDescription>\n </ResponsiveDialogHeader>\n\n <form id=\"connector-form\" onSubmit={onSubmit} className=\"space-y-4\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Provider</span>\n <Select value={provider} onValueChange={setProvider}>\n <SelectTrigger aria-label=\"Provider\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {PROVIDERS.map((p) => (\n <SelectItem key={p.value} value={p.value}>\n {p.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <p className=\"text-xs text-text-secondary\">\n HubSpot is the only live connector today — more providers can be added without a schema change.\n </p>\n </label>\n\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Connector name</span>\n <Input value={name} onChange={(e) => setName(e.target.value)} placeholder=\"Marketing HubSpot\" required />\n </label>\n\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Private-app access token</span>\n <Input\n type=\"password\"\n value={accessToken}\n onChange={(e) => setAccessToken(e.target.value)}\n placeholder=\"pat-na1-…\"\n autoComplete=\"off\"\n required\n />\n <p className=\"text-xs text-text-secondary\">\n From your HubSpot developer sandbox: Settings → Integrations → Private Apps. Needs the{' '}\n <code>crm.objects.contacts.read/write</code> scopes.\n </p>\n </label>\n </form>\n\n <ResponsiveDialogFooter>\n <Button type=\"button\" variant=\"outline\" onClick={() => onOpenChange(false)} disabled={saving}>\n Cancel\n </Button>\n <Button type=\"submit\" form=\"connector-form\" disabled={saving}>\n {saving ? 'Connecting…' : 'Create & test connection'}\n </Button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n}\n\ninterface ConnectorCardProps {\n connector: IntegrationConnectorGql;\n onDelete: () => void;\n onSync: (eventId: string) => Promise<void>;\n eventOptions: Array<{ id: string; name: string }>;\n}\n\nfunction ConnectorCard({ connector, onDelete, onSync, eventOptions }: ConnectorCardProps) {\n const [syncEventId, setSyncEventId] = useState('');\n const [syncing, setSyncing] = useState(false);\n const { variant, icon: StatusIcon } = statusMeta(connector.status);\n const runsQuery = useIntegrationSyncRunsQuery({ connectorId: connector.id, limit: 5, offset: 0 });\n const runs = runsQuery.data?.integrationSyncRuns ?? [];\n\n const onSyncClick = async () => {\n if (!syncEventId) {\n notify.error('Pick an event', 'Choose which event to sync attendees from.');\n return;\n }\n setSyncing(true);\n try {\n await onSync(syncEventId);\n await runsQuery.refetch();\n } finally {\n setSyncing(false);\n }\n };\n\n return (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-4\">\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"min-w-0\">\n <div className=\"flex items-center gap-2\">\n <p className=\"truncate font-medium text-text-primary\">{connector.name}</p>\n <Badge variant=\"secondary\" className=\"uppercase\">\n {connector.provider}\n </Badge>\n </div>\n <p className=\"mt-1 flex items-center gap-1.5 text-xs text-text-secondary\">\n <StatusIcon className=\"h-3.5 w-3.5\" />\n <Badge variant={variant} className=\"uppercase\">\n {connector.status}\n </Badge>\n {connector.externalAccountName ? <span>· {connector.externalAccountName}</span> : null}\n </p>\n {connector.lastError ? <p className=\"mt-1 text-xs text-status-danger\">{connector.lastError}</p> : null}\n </div>\n <ActionMenu\n ariaLabel={`${connector.name} connector actions`}\n entityName={connector.name}\n onDelete={onDelete}\n confirmNote=\"The stored access token will be wiped here, but you should also revoke or rotate it in your HubSpot account — disconnecting here cannot revoke it at HubSpot.\"\n />\n </div>\n\n <div className=\"mt-3 flex flex-wrap items-center gap-2\">\n <Select value={syncEventId} onValueChange={setSyncEventId}>\n <SelectTrigger aria-label=\"Event to sync\" className=\"w-56\">\n <SelectValue placeholder=\"Select an event\" />\n </SelectTrigger>\n <SelectContent>\n {eventOptions.map((event) => (\n <SelectItem key={event.id} value={event.id}>\n {event.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Button type=\"button\" size=\"sm\" onClick={onSyncClick} disabled={syncing || connector.status !== 'CONNECTED'}>\n <RefreshCw className=\"h-4 w-4\" />\n {syncing ? 'Syncing…' : 'Sync attendees & leads'}\n </Button>\n </div>\n\n {runs.length > 0 ? (\n <div className=\"mt-3 space-y-1.5 border-t border-border-seam pt-3\">\n {runs.map((run) => (\n <div key={run.id} className=\"flex items-center justify-between text-xs text-text-secondary\">\n <span>{new Date(run.startedAt).toLocaleString()}</span>\n <span className=\"flex items-center gap-2\">\n <Badge\n variant={run.status === 'SUCCESS' ? 'success' : run.status === 'FAILED' ? 'warning' : 'info'}\n className=\"uppercase\"\n >\n {run.status}\n </Badge>\n <span>\n {run.recordsSynced} synced{run.recordsFailed > 0 ? `, ${run.recordsFailed} failed` : ''}\n </span>\n </span>\n </div>\n ))}\n </div>\n ) : null}\n </GlassCard>\n );\n}\n\nexport default function IntegrationsPage() {\n const [createOpen, setCreateOpen] = useState(false);\n const connectorsQuery = useIntegrationConnectorsQuery({ limit: 50, offset: 0 });\n const { data: eventsData } = useEventsQuery({ limit: 100, offset: 0 });\n const [deleteConnector] = useDeleteIntegrationConnectorMutation();\n const [syncAttendees] = useSyncAttendeesToConnectorMutation();\n\n const connectors = connectorsQuery.data?.integrationConnectors ?? [];\n const eventOptions = eventsData?.events?.items ?? [];\n\n const onDelete = async (connector: IntegrationConnectorGql) => {\n try {\n const response = await deleteConnector({ variables: { id: connector.id } });\n if (\n !mutationSucceeded(\n response,\n response.data?.deleteIntegrationConnector ? connector.id : undefined,\n 'Could not remove connector'\n )\n ) {\n return;\n }\n notify.success('Connector removed', `${connector.name} was disconnected.`);\n } catch (error) {\n notify.error('Could not remove connector', describeError(error));\n }\n };\n\n const onSync = async (connector: IntegrationConnectorGql, eventId: string) => {\n try {\n const response = await syncAttendees({ variables: { connectorId: connector.id, eventId } });\n const run = response.data?.syncAttendeesToConnector;\n if (!run) {\n notify.error('Sync failed', response.error?.message ?? 'Please try again.');\n return;\n }\n if (run.status === 'SUCCESS') {\n notify.success(\n 'Sync complete',\n `${run.recordsSynced} attendee${run.recordsSynced === 1 ? '' : 's'} synced to ${connector.name}.`\n );\n } else {\n notify.error('Sync failed', run.errorMessage ?? 'The provider rejected the sync.');\n }\n } catch (error) {\n notify.error('Could not sync attendees', describeError(error));\n }\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n Integration connectors sync this workspace&apos;s real attendee and lead data to your CRM or\n marketing-automation platform. Register a connector with a private-app access token, verify the live connection,\n then sync any event&apos;s attendees as CRM contacts on demand.\n </PagePurpose>\n\n <EmphasisPanel className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>Integrations</GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n CRM and marketing-automation connectors for this workspace.\n </p>\n </div>\n <Button type=\"button\" onClick={() => setCreateOpen(true)}>\n <Plus className=\"h-4 w-4\" />\n New connector\n </Button>\n </EmphasisPanel>\n\n {connectorsQuery.loading ? null : connectors.length === 0 ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-8\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No connectors yet\"\n description=\"Connect a CRM or marketing-automation account, then sync attendees and leads on demand from the connector card — nothing syncs automatically.\"\n className=\"py-6\"\n />\n </GlassCard>\n ) : (\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n {connectors.map((connector) => (\n <ConnectorCard\n key={connector.id}\n connector={connector}\n eventOptions={eventOptions}\n onDelete={() => onDelete(connector)}\n onSync={(eventId) => onSync(connector, eventId)}\n />\n ))}\n </div>\n )}\n\n <CreateConnectorDialog open={createOpen} onOpenChange={setCreateOpen} />\n\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-4 text-xs text-text-secondary\">\n <Label className=\"text-text-primary\">Connector framework</Label>\n <p className=\"mt-1\">\n Only HubSpot has a real working client today. Adding a second provider (Salesforce, Mailchimp, …) is a\n backend-only change — no changes needed here once it ships.\n </p>\n <p className=\"mt-2\">\n <span className=\"font-medium text-text-primary\">Not built yet:</span> outbound webhooks and calendar sync are\n still roadmap items, not shipped — this page only covers CRM/marketing-automation connectors.\n </p>\n </GlassCard>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAkDA,IAAME,IAAY,CAAC;CAAE,OAAO;CAAW,OAAO;AAAU,CAAC;AAEzD,SAASC,EAAW,GAGlB;CAGA,OAFIC,MAAW,cAAoB;EAAE,SAAS;EAAW,MAAMC;CAAa,IACxED,MAAW,UAAgB;EAAE,SAAS;EAAW,MAAME;CAAQ,IAC5D;EAAE,SAAS;EAAa,MAAMC;CAAK;AAC5C;AAOA,SAASC,EAAsB,EAAE,SAAM,mBAA4C;CACjF,IAAM,CAACC,GAAMC,KAAWC,EAAS,EAAE,GAC7B,CAACC,GAAUC,KAAeF,EAAS,SAAS,GAC5C,CAACG,GAAaC,KAAkBJ,EAAS,EAAE,GAC3C,CAACK,GAAiB,EAAE,SAASC,OAAYC,EAAsC;CAgCrF,OACE,kBAACC,GAAD;EAAwB;EAAoB;EAC1C,UAAA,kBAACC,GAAD;GAAyB,WAAU;GAAnC,UAAA;IACE,kBAACC,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD,EAAA,UAAuB,4BAAgD,CAAA,GACvE,kBAACC,GAAD,EAAA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D,UAAA,CACE,kBAACc,GAAD,EAAM,WAAU,UAAW,CAAA,GAAC,eAEtB;IACK,CAAA,CAAA;;GAEdb,EAAgB,UAAU,OAAOQ,EAAW,WAAW,IACtD,kBAACjB,GAAD;IAAW,WAAU;IAAQ,WAAU;IACrC,UAAA,kBAACuB,GAAD;KACE,cAAa;KACb,OAAM;KACN,aAAY;KACZ,WAAU;IACX,CAAA;GACQ,CAAA,IAEX,kBAAC,OAAD;IAAK,WAAU;IACZ,UAAAN,EAAW,KAAK,MACf,kBAAC3B,GAAD;KAEa;KACG;KACd,gBAAgB4B,EAAStB,CAAS;KAClC,SAAS,MAAYO,EAAOP,GAAW4B,CAAO;IAC/C,GALM5B,EAAU,EAKhB,CACF;GACE,CAAA;GAGP,kBAACvC,GAAD;IAAuB,MAAMkD;IAAY,cAAcC;GAAgB,CAAA;GAEvE,kBAACR,GAAD;IAAW,WAAU;IAAQ,WAAU;IAAvC,UAAA;KACE,kBAACyB,GAAD;MAAO,WAAU;MAAoB,UAAA;KAA0B,CAAA;KAC/D,kBAAC,KAAD;MAAG,WAAU;MAAO,UAAA;KAGjB,CAAA;KACH,kBAAC,KAAD;MAAG,WAAU;MAAb,UAAA,CACE,kBAAC,QAAD;OAAM,WAAU;OAAgC,UAAA;MAAoB,CAAA,GAAC,wIAEpE;;IACM;;EACR;;AAET"}
@@ -3,6 +3,13 @@ interface OperationsHubPageProps {
3
3
  title: string;
4
4
  description: string;
5
5
  sectionKeys: SectionKey[];
6
+ /**
7
+ * BOFF-11390/11391/11392 — only the Finance hub gets the revenue-by-currency
8
+ * tiles (computed server-side from `eventfullyManagedFinanceSummary`). Other
9
+ * hubs (Exhibition, HR, ...) share this same component but have no revenue
10
+ * concept, so the tile — and the query behind it — is opt-in, not global.
11
+ */
12
+ financial?: boolean;
6
13
  }
7
- export default function OperationsHubPage({ title, description, sectionKeys }: OperationsHubPageProps): import('react').JSX.Element;
14
+ export default function OperationsHubPage({ title, description, sectionKeys, financial }: OperationsHubPageProps): import('react').JSX.Element;
8
15
  export {};