feat(apollo-vertex): charts insights adapter [AGVSOL-3412]#754
feat(apollo-vertex): charts insights adapter [AGVSOL-3412]#754pieman1313 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
Adds a new insights-adapter registry package that implements DataAdapter against the UiPath Insights standalone-query API, alongside a charts-core refactor that replaces the legacy Aggregation model with a richer MetricExpression/DataModelField model shared by both Data Fabric and Insights adapters.
Changes:
- New
insights-adapterregistry package: ts-rest contract, schemas (filters, aggregates with recursive expressions, query), chart adapters (bar/distribution/kpi/line/multi-line/table), client-side binning, and a/api/insights/[...path]proxy. - charts-core refactor: removed
models/aggregation.ts; addedmodels/expression.ts(typedAggregationKind,DataModelAggregate),models/field.ts(typed fields incl. currency/boolean/percentage/duration),data-query-response-schema.ts,chart-data-mapper.ts, andgetMetricFieldType/buildFieldhelpers. All chart-with-adapter components now format viametric.expression. - Extracted shared
proxyToUiPathhelper used by both/api/datafabricand/api/insightsroutes, enforcing the service segment atpath[2].
Reviewed changes
Copilot reviewed 58 out of 59 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
apps/apollo-vertex/registry/insights-adapter/** |
New Insights adapter: contract, schemas, chart adapters, binning, filter mapping, query helpers. |
apps/apollo-vertex/app/api/insights/[...path]/route.ts |
New Insights proxy route delegating to proxyToUiPath. |
apps/apollo-vertex/app/api/datafabric/[...path]/route.ts |
Refactored to delegate to shared proxyToUiPath. |
apps/apollo-vertex/lib/api-proxy.ts |
New shared UiPath proxy helper with service segment guard. |
apps/apollo-vertex/registry/charts-core/models/expression.ts |
New typed metric expression model replacing Aggregation. |
apps/apollo-vertex/registry/charts-core/models/field.ts |
New typed field model (numeric/string/datetime/percentage/duration/currency/boolean). |
apps/apollo-vertex/registry/charts-core/data-query-response-schema.ts |
Promoted to charts-core (was data-fabric-adapter local). |
apps/apollo-vertex/registry/charts-core/chart-data-mapper.ts |
Promoted generic mapper to charts-core. |
apps/apollo-vertex/registry/charts-core/util/get-metric-field-type.ts / build-field.ts |
New helpers for expression → field type and field construction. |
apps/apollo-vertex/registry/charts-core/util/format/format-metric-value.ts |
Uses MetricExpression, supports currency/boolean field formats. |
apps/apollo-vertex/registry/charts-core/util/data-type-alignment.ts |
Extended alignment to currency/percentage/duration. |
apps/apollo-vertex/registry/charts-core/chart-models.ts / table-data-model.ts / charts-core.ts |
Aligned to new field/expression types and re-exports. |
apps/apollo-vertex/registry/charts-core/models/configurations/base-chart-configuration.ts |
Added optional filterTableId for Insights tableWith wrapping. |
apps/apollo-vertex/registry/{bar,line,multi-line,distribution,kpi}-chart/*-with-adapter.tsx |
Format calls migrated to metric.expression. |
apps/apollo-vertex/registry/data-fabric-adapter/** |
Migrated to charts-core's expression/field model; throws on filtered/unsupported aggregations; uses shared mapper. |
apps/apollo-vertex/registry/ai-chat/tools/data-fabric/util/{chart-helpers,entities}.ts, data-fabric-table/table-data-model.ts |
AI chat tool helpers updated to expression model + buildField. |
apps/apollo-vertex/registry.json |
Promotes charts-core entries, drops removed data-fabric files, registers new insights-adapter package. |
apps/apollo-vertex/tsconfig.json |
Adds @/lib/insights-adapter path alias. |
apps/apollo-vertex/app/components/*/page.mdx |
Docs updated with new metric expression shape and Insights install instructions. |
| @@ -0,0 +1,57 @@ | |||
| import { type NextRequest, NextResponse } from "next/server"; | |||
|
|
|||
| const UPSTREAM_ORIGIN = "https://alpha.uipath.com"; | |||
There was a problem hiding this comment.
will this always be alpha? 🤔
shouldn't be configurable for the consumer?
There was a problem hiding this comment.
this is only the proxy, consumers will not instal this; either way, we only whitelisted this app towards alpha, and its specific for this vercel app
ports over the stand alone adapter from apollo-dashboarding to our insights adapter
I tested it locally with a custom page with 2 charts hitting insights, but I`m not adding the test page to this pr / vertex
I can add a temporary commit if anyone wants to test as well