From f5baa66ad812b7251c0ddeb1f51171a1e4bba341 Mon Sep 17 00:00:00 2001 From: zer0stars <74260741+zer0stars@users.noreply.github.com> Date: Thu, 26 Mar 2026 16:32:20 -0600 Subject: [PATCH 1/3] feat: add MCP server endpoint with annotations and condensed schema --- .gitignore | 5 +- Makefile | 1 + cmd/telemetry-api/main.go | 1 + go.mod | 42 +- go.sum | 82 +- gqlgen.yml | 6 + internal/app/app.go | 30 +- internal/graph/attestation.resolvers.go | 2 +- internal/graph/base.resolvers.go | 29 +- internal/graph/events.resolvers.go | 2 +- internal/graph/generated.go | 3194 ++++++++++------- internal/graph/mcp_tools_gen.go | 182 + internal/graph/model/models_gen.go | 66 +- internal/graph/model/signalLatest.tmpl | 49 + internal/graph/model/signalLatest_gen.go | 836 +++++ internal/graph/privilege_filter.go | 39 + internal/graph/resolver.go | 2 + internal/graph/segments.resolvers.go | 2 +- .../graph/signals-events_gen.resolvers.go | 2 +- internal/graph/vc.resolvers.go | 2 +- internal/pricing/pricing.go | 11 + internal/repositories/repositories.go | 56 + .../repositories/repositories_mocks_test.go | 15 + internal/service/ch/ch.go | 13 + internal/service/ch/queries.go | 31 + schema/attestation.graphqls | 100 +- schema/base.graphqls | 188 +- schema/events.graphqls | 41 +- schema/mcp.graphqls | 3 + schema/segments.graphqls | 61 +- schema/vc.graphqls | 47 +- 31 files changed, 3403 insertions(+), 1737 deletions(-) create mode 100644 internal/graph/mcp_tools_gen.go create mode 100644 internal/graph/model/signalLatest.tmpl create mode 100644 internal/graph/model/signalLatest_gen.go create mode 100644 internal/graph/privilege_filter.go create mode 100644 schema/mcp.graphqls diff --git a/.gitignore b/.gitignore index c5fc232..c804818 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,7 @@ e2e/clickhouse_container_test.go .planning/ openspec/ .claude -.cursor \ No newline at end of file +.cursor +telemetry-api + +CLAUDE.md diff --git a/Makefile b/Makefile index f5bafb9..62c280f 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,7 @@ gql-model: ## Generate gqlgen data model. @go tool codegen -generators=custom -custom.output-file=schema/signals-events_gen.graphqls -custom.template-file=./schema/signals-events.tmpl @go tool codegen -generators=custom -custom.output-file=internal/graph/model/signalSetter_gen.go -custom.template-file=./internal/graph/model/signalSetter.tmpl -custom.format=true @go tool codegen -generators=custom -custom.output-file=internal/graph/signals-events_gen.resolvers.go -custom.template-file=./internal/graph/signals-events_gen.resolvers.tmpl -custom.format=true + @go tool codegen -generators=custom -custom.output-file=internal/graph/model/signalLatest_gen.go -custom.template-file=./internal/graph/model/signalLatest.tmpl -custom.format=true gql: gql-model gqlgen ## Generate all gql code. diff --git a/cmd/telemetry-api/main.go b/cmd/telemetry-api/main.go index e65f791..d080500 100644 --- a/cmd/telemetry-api/main.go +++ b/cmd/telemetry-api/main.go @@ -78,6 +78,7 @@ func main() { mux := http.NewServeMux() mux.Handle("/", app.LoggerMiddleware(app.PanicRecoveryMiddleware(playground.Handler("GraphQL playground", "/query")))) mux.Handle("/query", application.Handler) + mux.Handle("/mcp", application.MCPHandler) logger.Info().Msgf("Server started on port: %d", cfg.Port) runner.RunHandler(runnerCtx, runnerGroup, mux, ":"+strconv.Itoa(cfg.Port)) diff --git a/go.mod b/go.mod index 5e15284..7e915a2 100644 --- a/go.mod +++ b/go.mod @@ -3,29 +3,29 @@ module github.com/DIMO-Network/telemetry-api go 1.25.3 require ( - github.com/99designs/gqlgen v0.17.87 + github.com/99designs/gqlgen v0.17.89 github.com/ClickHouse/clickhouse-go/v2 v2.40.1 github.com/DIMO-Network/attestation-api v0.1.2 github.com/DIMO-Network/clickhouse-infra v0.0.7 - github.com/DIMO-Network/cloudevent v0.2.6 + github.com/DIMO-Network/cloudevent v1.0.4 github.com/DIMO-Network/credit-tracker v0.0.6 github.com/DIMO-Network/fetch-api v0.0.16 github.com/DIMO-Network/model-garage v1.0.6 - github.com/DIMO-Network/server-garage v0.0.7 - github.com/DIMO-Network/shared v1.0.7 - github.com/DIMO-Network/token-exchange-api v0.3.7 + github.com/DIMO-Network/server-garage v0.0.8 + github.com/DIMO-Network/shared v1.1.5 + github.com/DIMO-Network/token-exchange-api v0.4.0 github.com/aarondl/sqlboiler/v4 v4.19.5 github.com/auth0/go-jwt-middleware/v2 v2.3.0 github.com/ethereum/go-ethereum v1.17.1 github.com/go-jose/go-jose/v4 v4.1.3 - github.com/prometheus/client_golang v1.23.0 + github.com/prometheus/client_golang v1.23.2 github.com/rs/zerolog v1.34.0 github.com/segmentio/ksuid v1.0.4 github.com/stretchr/testify v1.11.1 github.com/uber/h3-go/v4 v4.3.0 github.com/vektah/gqlparser/v2 v2.5.32 go.uber.org/mock v0.6.0 - golang.org/x/sync v0.19.0 + golang.org/x/sync v0.20.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20260217215200-42d3e9bedb6d google.golang.org/grpc v1.79.1 google.golang.org/protobuf v1.36.11 @@ -67,13 +67,14 @@ require ( github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/goccy/go-yaml v1.19.2 // indirect - github.com/golang-jwt/jwt/v5 v5.3.0 // indirect + github.com/golang-jwt/jwt/v5 v5.3.1 // indirect + github.com/google/jsonschema-go v0.4.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.1 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/holiman/uint256 v1.3.2 // indirect github.com/huandu/xstrings v1.5.0 // indirect - github.com/klauspost/compress v1.18.4 // indirect + github.com/klauspost/compress v1.18.5 // indirect github.com/lufia/plan9stats v0.0.0-20260216142805-b3301c5f2a88 // indirect github.com/magiconair/properties v1.8.10 // indirect github.com/mattn/go-colorable v0.1.14 // indirect @@ -89,6 +90,7 @@ require ( github.com/moby/sys/user v0.4.0 // indirect github.com/moby/sys/userns v0.1.0 // indirect github.com/moby/term v0.5.2 // indirect + github.com/modelcontextprotocol/go-sdk v1.4.1 // indirect github.com/morikuni/aec v1.1.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -100,14 +102,15 @@ require ( github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/pressly/goose/v3 v3.26.0 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.65.0 // indirect - github.com/prometheus/procfs v0.19.2 // indirect + github.com/prometheus/common v0.67.5 // indirect + github.com/prometheus/procfs v0.20.1 // indirect github.com/segmentio/asm v1.2.1 // indirect + github.com/segmentio/encoding v0.5.4 // indirect github.com/sethvargo/go-retry v0.3.0 // indirect github.com/shirou/gopsutil/v4 v4.26.2 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/sirupsen/logrus v1.9.4 // indirect - github.com/sosodev/duration v1.3.1 // indirect + github.com/sosodev/duration v1.4.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/testcontainers/testcontainers-go v0.40.0 // indirect github.com/testcontainers/testcontainers-go/modules/clickhouse v0.40.0 // indirect @@ -116,7 +119,8 @@ require ( github.com/tidwall/pretty v1.2.1 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect - github.com/urfave/cli/v3 v3.6.2 // indirect + github.com/urfave/cli/v3 v3.7.0 // indirect + github.com/yosida95/uritemplate/v3 v3.0.2 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 // indirect @@ -124,11 +128,13 @@ require ( go.opentelemetry.io/otel/metric v1.42.0 // indirect go.opentelemetry.io/otel/trace v1.42.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.48.0 // indirect + go.yaml.in/yaml/v2 v2.4.4 // indirect + golang.org/x/crypto v0.49.0 // indirect golang.org/x/mod v0.33.0 // indirect - golang.org/x/net v0.50.0 // indirect - golang.org/x/sys v0.41.0 // indirect - golang.org/x/text v0.34.0 // indirect + golang.org/x/net v0.51.0 // indirect + golang.org/x/oauth2 v0.36.0 // indirect + golang.org/x/sys v0.42.0 // indirect + golang.org/x/text v0.35.0 // indirect golang.org/x/tools v0.42.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect @@ -140,3 +146,5 @@ tool ( github.com/DIMO-Network/model-garage/cmd/codegen go.uber.org/mock/mockgen ) + +replace github.com/DIMO-Network/server-garage => /Users/zer0stars/workspace/server-garage diff --git a/go.sum b/go.sum index 6ecd194..1199d97 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= -github.com/99designs/gqlgen v0.17.87 h1:pSnCIMhBQezAE8bc1GNmfdLXFmnWtWl1GRDFEE/nHP8= -github.com/99designs/gqlgen v0.17.87/go.mod h1:fK05f1RqSNfQpd4CfW5qk/810Tqi4/56Wf6Nem0khAg= +github.com/99designs/gqlgen v0.17.89 h1:KzEcxPiMgQoMw3m/E85atUEHyZyt0PbAflMia5Kw8z8= +github.com/99designs/gqlgen v0.17.89/go.mod h1:GFqruTVGB7ZTdrf1uzOagpXbY7DrEt1pIxnTdhIbWvQ= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= @@ -16,20 +16,18 @@ github.com/DIMO-Network/attestation-api v0.1.2 h1:mrsProeTVr+aF7rKkoJhCVA7mlGFX6 github.com/DIMO-Network/attestation-api v0.1.2/go.mod h1:sJT/d3Mb+qwYk1+DYKUvM8ZEohDQnM3sAqoreP+ocBI= github.com/DIMO-Network/clickhouse-infra v0.0.7 h1:TAsjkFFKu3D5Xg6dwBcRBryjCVSlXsNjVbTwJ4UDlTg= github.com/DIMO-Network/clickhouse-infra v0.0.7/go.mod h1:XS80lhSJNWBWGgZ+m4j7++zFj1wAXfmtV2gJfhGlabQ= -github.com/DIMO-Network/cloudevent v0.2.6 h1:4J2S5aDou+80Kgdh8KK4t8A9C7Leb424Z6dlDuWjA/c= -github.com/DIMO-Network/cloudevent v0.2.6/go.mod h1:I/9NcpMozV5Fw194WimhbkAsJtKVZf5UKYJ9hgc8Cdg= +github.com/DIMO-Network/cloudevent v1.0.4 h1:bZ7tRPwCbiRgAlG1gfN7qpOOUI1OEXMMoMMyS9r4omk= +github.com/DIMO-Network/cloudevent v1.0.4/go.mod h1:I/9NcpMozV5Fw194WimhbkAsJtKVZf5UKYJ9hgc8Cdg= github.com/DIMO-Network/credit-tracker v0.0.6 h1:9C9AXah2uCQKCr7Kqzu2H9aXWj7wEOj4z1K2wAmVy0E= github.com/DIMO-Network/credit-tracker v0.0.6/go.mod h1:k037ZQMuBcyNj0Czg/jd6GCBC/HihkSsA7c1FRrF2yI= github.com/DIMO-Network/fetch-api v0.0.16 h1:jOIM9AHOCTN9Omh5QoRrdVsy0UCPHwB+08/DEI0qnqs= github.com/DIMO-Network/fetch-api v0.0.16/go.mod h1:pD9+5wPYjz3ORH9FBsXLlomsZJRPTyOzKy19urT6xew= github.com/DIMO-Network/model-garage v1.0.6 h1:XMw3Hzlbu/dOBDY1hPK8cveINIJ/7lGBneMj9aHnft0= github.com/DIMO-Network/model-garage v1.0.6/go.mod h1:nvr0Ibiuu7Q7PC/hIfdZF6lPxCmq9eztQmbxUaNyus8= -github.com/DIMO-Network/server-garage v0.0.7 h1:kOBVyOtIbxa1x9pAf1epABTb9l/U3khf0PwUaHeHiKs= -github.com/DIMO-Network/server-garage v0.0.7/go.mod h1:7DFor8MMJ8fLv9EB16Z5LrN+ftW3qeIk+swpkT7F2cU= -github.com/DIMO-Network/shared v1.0.7 h1:LfSgsqJ6R7EUyfo2GTfuhrCpoDcweJqe7eVOa4j7Xbo= -github.com/DIMO-Network/shared v1.0.7/go.mod h1:lDHUKwwT2LW6Zvd42Nb33dXklRNTmfyOlbUNx2dQfGY= -github.com/DIMO-Network/token-exchange-api v0.3.7 h1:i5Ygs9DuPSwE8BC90Q6gnKnfgqw19GseF2x0vZ9sCG8= -github.com/DIMO-Network/token-exchange-api v0.3.7/go.mod h1:gKoB1Zi3EXJqIyfLnTn1GV1NSzTMBDkRleChBU/EQv8= +github.com/DIMO-Network/shared v1.1.5 h1:cRI3BbeYOgolMkeBOSqbDVGxymnDfeP/q7xgIXJ5MkY= +github.com/DIMO-Network/shared v1.1.5/go.mod h1:lDHUKwwT2LW6Zvd42Nb33dXklRNTmfyOlbUNx2dQfGY= +github.com/DIMO-Network/token-exchange-api v0.4.0 h1:EayDrw9VdyAfc6rbpdnDxFhlN3lMhbonUJoouKZu35g= +github.com/DIMO-Network/token-exchange-api v0.4.0/go.mod h1:cldgAyDGLMNk3YIf2mr6vGohcO0ANlZ88fCbI+v/wEY= github.com/DIMO-Network/yaml v0.1.0 h1:KQ3oKHUZETchR6Pxbmmol3e4ewrPv/q8cEwqxfwyZbU= github.com/DIMO-Network/yaml v0.1.0/go.mod h1:KkiehcbkVzH8Pf8f9dja8B2aW81gYYZSqfwzSj9yN68= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -133,8 +131,8 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= -github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= +github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= +github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= @@ -143,6 +141,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/jsonschema-go v0.4.2 h1:tmrUohrwoLZZS/P3x7ex0WAVknEkBZM46iALbcqoRA8= +github.com/google/jsonschema-go v0.4.2/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= @@ -158,8 +158,8 @@ github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c= -github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= +github.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE= +github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -204,6 +204,8 @@ github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= +github.com/modelcontextprotocol/go-sdk v1.4.1 h1:M4x9GyIPj+HoIlHNGpK2hq5o3BFhC+78PkEaldQRphc= +github.com/modelcontextprotocol/go-sdk v1.4.1/go.mod h1:Bo/mS87hPQqHSRkMv4dQq1XCu6zv4INdXnFZabkNU6s= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.1.0 h1:vBBl0pUnvi/Je71dsRrhMBtreIqNMYErSAbEeb8jrXQ= github.com/morikuni/aec v1.1.0/go.mod h1:xDRgiq/iw5l+zkao76YTKzKttOp2cwPEne25HDkJnBw= @@ -228,14 +230,14 @@ github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jpmM= github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY= -github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc= -github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE= -github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= -github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= -github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= +github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= +github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= +github.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc= +github.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= @@ -245,6 +247,8 @@ github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/segmentio/encoding v0.5.4 h1:OW1VRern8Nw6ITAtwSZ7Idrl3MXCFwXHPgqESYfvNt0= +github.com/segmentio/encoding v0.5.4/go.mod h1:HS1ZKa3kSN32ZHVZ7ZLPLXWvOVIiZtyJnO1gPH1sKt0= github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c= github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= @@ -257,8 +261,8 @@ github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= -github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4= -github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= +github.com/sosodev/duration v1.4.0 h1:35ed0KiVFriGHHzZZJaZLgmTEEICIyt8Sx0RQfj9IjE= +github.com/sosodev/duration v1.4.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -286,8 +290,8 @@ github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9R github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ= github.com/uber/h3-go/v4 v4.3.0 h1:5y5je8gu6+1pGzGo8soiudmgE3WJzfJRWdy0yhc3+HY= github.com/uber/h3-go/v4 v4.3.0/go.mod h1:EyZ/EWguHlheIBcshTAMmQPYcaGKVvJ4qlzEHzC0BkU= -github.com/urfave/cli/v3 v3.6.2 h1:lQuqiPrZ1cIz8hz+HcrG0TNZFxU70dPZ3Yl+pSrH9A8= -github.com/urfave/cli/v3 v3.6.2/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= +github.com/urfave/cli/v3 v3.7.0 h1:AGSnbUyjtLiM+WJUb4dzXKldl/gL+F8OwmRDtVr6g2U= +github.com/urfave/cli/v3 v3.7.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= github.com/vektah/gqlparser/v2 v2.5.32 h1:k9QPJd4sEDTL+qB4ncPLflqTJ3MmjB9SrVzJrawpFSc= github.com/vektah/gqlparser/v2 v2.5.32/go.mod h1:c1I28gSOVNzlfc4WuDlqU7voQnsqI6OG2amkBAFmgts= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -295,6 +299,8 @@ github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23n github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= +github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= +github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -327,12 +333,14 @@ go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= +go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= -golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= +golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= +golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa h1:Zt3DZoOFFYkKhDT3v7Lm9FDMEV06GpzjG2jrqW+QTE0= golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa/go.mod h1:K79w1Vqn7PoiZn+TkNpx3BUWUQksGO3JcVX6qIjytmA= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -344,14 +352,16 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60= -golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= +golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo= +golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y= +golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= +golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= -golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -365,17 +375,17 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= -golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= -golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= +golang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU= +golang.org/x/term v0.41.0/go.mod h1:3pfBgksrReYfZ5lvYM0kSO0LIkAl4Yl2bXOkKP7Ec2A= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= -golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= +golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/gqlgen.yml b/gqlgen.yml index 284c9f6..39af79f 100644 --- a/gqlgen.yml +++ b/gqlgen.yml @@ -71,6 +71,12 @@ omit_resolver_fields: true # autobind: # - "github.com/DIMO-Network/telemetry-api/internal/graph/model" +directives: + mcpTool: + skip_runtime: true + mcpExample: + skip_runtime: true + # This section declares type mapping between the GraphQL and go type systems # # The first line in each type will be used as defaults for resolver arguments and diff --git a/internal/app/app.go b/internal/app/app.go index fa5a9cb..8c28cfb 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -11,6 +11,7 @@ import ( "github.com/99designs/gqlgen/graphql/handler/extension" "github.com/99designs/gqlgen/graphql/handler/transport" "github.com/DIMO-Network/server-garage/pkg/gql/metrics" + "github.com/DIMO-Network/server-garage/pkg/mcpserver" "github.com/DIMO-Network/telemetry-api/internal/auth" "github.com/DIMO-Network/telemetry-api/internal/config" "github.com/DIMO-Network/telemetry-api/internal/dtcmiddleware" @@ -29,6 +30,7 @@ import ( // App is the main application for the telemetry API. type App struct { Handler http.Handler + MCPHandler http.Handler QueryRecorder *queryRecorder.QueryRecorder cleanup func() } @@ -78,7 +80,8 @@ func New(settings config.Settings) (*App, error) { var costCalculator pricing.CostCalculator - server := newServer(graph.NewExecutableSchema(cfg)) + es := graph.NewExecutableSchema(cfg) + server := newServer(es) server.Use(dtcmiddleware.NewDCT(ctClient, &costCalculator)) // Add query recording middleware @@ -108,8 +111,33 @@ func New(settings config.Settings) (*App, error) { ), ) + mcpHandler, err := mcpserver.New(context.Background(), mcpserver.NewGQLGenExecutor(es), "DIMO Telemetry", "0.1.0", "telemetry", + mcpserver.WithTools(graph.MCPTools), + mcpserver.WithCondensedSchema(graph.CondensedSchema), + ) + if err != nil { + return nil, fmt.Errorf("couldn't create MCP handler: %w", err) + } + + // MCP shares the same auth chain as GraphQL. Schema introspection (get_schema) + // is reachable without a JWT because WithCredentialsOptional is true — this is + // acceptable since the schema is not secret. All data-fetching tools enforce + // @requiresVehicleToken at the GraphQL resolver level. + mcpAuthHandler := PanicRecoveryMiddleware( + LoggerMiddleware( + limiter.AddRequestTimeout( + authMiddleware.CheckJWT( + authLoggerMiddleware( + auth.AddClaimHandler(mcpHandler, settings.VehicleNFTAddress), + ), + ), + ), + ), + ) + return &App{ Handler: serverHandler, + MCPHandler: mcpAuthHandler, QueryRecorder: queryRec, cleanup: func() { // TODO add cleanup logic for closing connections diff --git a/internal/graph/attestation.resolvers.go b/internal/graph/attestation.resolvers.go index c7b8fa9..956ee3a 100644 --- a/internal/graph/attestation.resolvers.go +++ b/internal/graph/attestation.resolvers.go @@ -3,7 +3,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver // implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.87 +// Code generated by github.com/99designs/gqlgen version v0.17.89 import ( "context" diff --git a/internal/graph/base.resolvers.go b/internal/graph/base.resolvers.go index c2b77ce..422038f 100644 --- a/internal/graph/base.resolvers.go +++ b/internal/graph/base.resolvers.go @@ -3,13 +3,14 @@ package graph // This file will be automatically regenerated based on the schema, any resolver // implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.87 +// Code generated by github.com/99designs/gqlgen version v0.17.89 import ( "context" "time" "github.com/99designs/gqlgen/graphql" + "github.com/DIMO-Network/telemetry-api/internal/auth" "github.com/DIMO-Network/telemetry-api/internal/graph/model" "github.com/DIMO-Network/telemetry-api/internal/repositories" ) @@ -37,6 +38,32 @@ func (r *queryResolver) AvailableSignals(ctx context.Context, tokenID int, filte return r.BaseRepo.GetAvailableSignals(ctx, uint32(tokenID), filter) } +// SignalsSnapshot is the resolver for the signalsSnapshot field. +func (r *queryResolver) SignalsSnapshot(ctx context.Context, tokenID int, filter *model.SignalFilter) (*model.SignalsSnapshotResponse, error) { + resp, err := r.BaseRepo.GetSignalSnapshot(ctx, uint32(tokenID), filter) + if err != nil { + return nil, err + } + + // Get caller's permissions from JWT claim for server-side privilege filtering. + claim, _ := ctx.Value(auth.TelemetryClaimContextKey{}).(*auth.TelemetryClaim) + var permissions []string + if claim != nil { + permissions = claim.Permissions + } + + // Filter signals by caller's privileges. + filtered := make([]*model.LatestSignal, 0, len(resp.Signals)) + for _, sig := range resp.Signals { + if hasPrivilegesForSignal(sig.Name, permissions) { + filtered = append(filtered, sig) + } + } + resp.Signals = filtered + + return resp, nil +} + // DataSummary is the resolver for the dataSummary field. func (r *queryResolver) DataSummary(ctx context.Context, tokenID int, filter *model.SignalFilter) (*model.DataSummary, error) { return r.BaseRepo.GetDataSummary(ctx, uint32(tokenID), filter) diff --git a/internal/graph/events.resolvers.go b/internal/graph/events.resolvers.go index ac792ba..11492df 100644 --- a/internal/graph/events.resolvers.go +++ b/internal/graph/events.resolvers.go @@ -3,7 +3,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver // implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.87 +// Code generated by github.com/99designs/gqlgen version v0.17.89 import ( "context" diff --git a/internal/graph/generated.go b/internal/graph/generated.go index 658eeed..8e2412e 100644 --- a/internal/graph/generated.go +++ b/internal/graph/generated.go @@ -87,6 +87,21 @@ type ComplexityRoot struct { Name func(childComplexity int) int } + EventDataSummary struct { + FirstSeen func(childComplexity int) int + LastSeen func(childComplexity int) int + Name func(childComplexity int) int + NumberOfEvents func(childComplexity int) int + } + + LatestSignal struct { + Name func(childComplexity int) int + Timestamp func(childComplexity int) int + ValueLocation func(childComplexity int) int + ValueNumber func(childComplexity int) int + ValueString func(childComplexity int) int + } + Location struct { Hdop func(childComplexity int) int Latitude func(childComplexity int) int @@ -102,6 +117,7 @@ type ComplexityRoot struct { Segments func(childComplexity int, tokenID int, from time.Time, to time.Time, mechanism model.DetectionMechanism, config *model.SegmentConfig, signalRequests []*model.SegmentSignalRequest, eventRequests []*model.SegmentEventRequest, limit *int, after *time.Time) int Signals func(childComplexity int, tokenID int, interval string, from time.Time, to time.Time, filter *model.SignalFilter) int SignalsLatest func(childComplexity int, tokenID int, filter *model.SignalFilter) int + SignalsSnapshot func(childComplexity int, tokenID int, filter *model.SignalFilter) int VinVCLatest func(childComplexity int, tokenID int) int } @@ -363,6 +379,13 @@ type ComplexityRoot struct { Speed func(childComplexity int) int } + SignalDataSummary struct { + FirstSeen func(childComplexity int) int + LastSeen func(childComplexity int) int + Name func(childComplexity int) int + NumberOfSignals func(childComplexity int) int + } + SignalFloat struct { Timestamp func(childComplexity int) int Value func(childComplexity int) int @@ -378,6 +401,11 @@ type ComplexityRoot struct { Value func(childComplexity int) int } + SignalsSnapshotResponse struct { + LastSeen func(childComplexity int) int + Signals func(childComplexity int) int + } + VINVC struct { CountryCode func(childComplexity int) int RawVc func(childComplexity int) int @@ -389,26 +417,13 @@ type ComplexityRoot struct { VehicleTokenID func(childComplexity int) int Vin func(childComplexity int) int } - - EventDataSummary struct { - FirstSeen func(childComplexity int) int - LastSeen func(childComplexity int) int - Name func(childComplexity int) int - NumberOfEvents func(childComplexity int) int - } - - SignalDataSummary struct { - FirstSeen func(childComplexity int) int - LastSeen func(childComplexity int) int - Name func(childComplexity int) int - NumberOfSignals func(childComplexity int) int - } } type QueryResolver interface { Signals(ctx context.Context, tokenID int, interval string, from time.Time, to time.Time, filter *model.SignalFilter) ([]*model.SignalAggregations, error) SignalsLatest(ctx context.Context, tokenID int, filter *model.SignalFilter) (*model.SignalCollection, error) AvailableSignals(ctx context.Context, tokenID int, filter *model.SignalFilter) ([]string, error) + SignalsSnapshot(ctx context.Context, tokenID int, filter *model.SignalFilter) (*model.SignalsSnapshotResponse, error) DataSummary(ctx context.Context, tokenID int, filter *model.SignalFilter) (*model.DataSummary, error) Attestations(ctx context.Context, tokenID *int, subject *string, filter *model.AttestationFilter) ([]*model.Attestation, error) Events(ctx context.Context, tokenID int, from time.Time, to time.Time, filter *model.EventFilter) ([]*model.Event, error) @@ -729,6 +744,62 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.EventCount.Name(childComplexity), true + case "EventDataSummary.firstSeen": + if e.ComplexityRoot.EventDataSummary.FirstSeen == nil { + break + } + + return e.ComplexityRoot.EventDataSummary.FirstSeen(childComplexity), true + case "EventDataSummary.lastSeen": + if e.ComplexityRoot.EventDataSummary.LastSeen == nil { + break + } + + return e.ComplexityRoot.EventDataSummary.LastSeen(childComplexity), true + case "EventDataSummary.name": + if e.ComplexityRoot.EventDataSummary.Name == nil { + break + } + + return e.ComplexityRoot.EventDataSummary.Name(childComplexity), true + case "EventDataSummary.numberOfEvents": + if e.ComplexityRoot.EventDataSummary.NumberOfEvents == nil { + break + } + + return e.ComplexityRoot.EventDataSummary.NumberOfEvents(childComplexity), true + + case "LatestSignal.name": + if e.ComplexityRoot.LatestSignal.Name == nil { + break + } + + return e.ComplexityRoot.LatestSignal.Name(childComplexity), true + case "LatestSignal.timestamp": + if e.ComplexityRoot.LatestSignal.Timestamp == nil { + break + } + + return e.ComplexityRoot.LatestSignal.Timestamp(childComplexity), true + case "LatestSignal.valueLocation": + if e.ComplexityRoot.LatestSignal.ValueLocation == nil { + break + } + + return e.ComplexityRoot.LatestSignal.ValueLocation(childComplexity), true + case "LatestSignal.valueNumber": + if e.ComplexityRoot.LatestSignal.ValueNumber == nil { + break + } + + return e.ComplexityRoot.LatestSignal.ValueNumber(childComplexity), true + case "LatestSignal.valueString": + if e.ComplexityRoot.LatestSignal.ValueString == nil { + break + } + + return e.ComplexityRoot.LatestSignal.ValueString(childComplexity), true + case "Location.hdop": if e.ComplexityRoot.Location.Hdop == nil { break @@ -837,6 +908,17 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin } return e.ComplexityRoot.Query.SignalsLatest(childComplexity, args["tokenId"].(int), args["filter"].(*model.SignalFilter)), true + case "Query.signalsSnapshot": + if e.ComplexityRoot.Query.SignalsSnapshot == nil { + break + } + + args, err := ec.field_Query_signalsSnapshot_args(ctx, rawArgs) + if err != nil { + return 0, false + } + + return e.ComplexityRoot.Query.SignalsSnapshot(childComplexity, args["tokenId"].(int), args["filter"].(*model.SignalFilter)), true case "Query.vinVCLatest": if e.ComplexityRoot.Query.VinVCLatest == nil { break @@ -2914,6 +2996,31 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.SignalCollection.Speed(childComplexity), true + case "SignalDataSummary.firstSeen": + if e.ComplexityRoot.SignalDataSummary.FirstSeen == nil { + break + } + + return e.ComplexityRoot.SignalDataSummary.FirstSeen(childComplexity), true + case "SignalDataSummary.lastSeen": + if e.ComplexityRoot.SignalDataSummary.LastSeen == nil { + break + } + + return e.ComplexityRoot.SignalDataSummary.LastSeen(childComplexity), true + case "SignalDataSummary.name": + if e.ComplexityRoot.SignalDataSummary.Name == nil { + break + } + + return e.ComplexityRoot.SignalDataSummary.Name(childComplexity), true + case "SignalDataSummary.numberOfSignals": + if e.ComplexityRoot.SignalDataSummary.NumberOfSignals == nil { + break + } + + return e.ComplexityRoot.SignalDataSummary.NumberOfSignals(childComplexity), true + case "SignalFloat.timestamp": if e.ComplexityRoot.SignalFloat.Timestamp == nil { break @@ -2953,6 +3060,19 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.SignalString.Value(childComplexity), true + case "SignalsSnapshotResponse.lastSeen": + if e.ComplexityRoot.SignalsSnapshotResponse.LastSeen == nil { + break + } + + return e.ComplexityRoot.SignalsSnapshotResponse.LastSeen(childComplexity), true + case "SignalsSnapshotResponse.signals": + if e.ComplexityRoot.SignalsSnapshotResponse.Signals == nil { + break + } + + return e.ComplexityRoot.SignalsSnapshotResponse.Signals(childComplexity), true + case "VINVC.countryCode": if e.ComplexityRoot.VINVC.CountryCode == nil { break @@ -3008,56 +3128,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.VINVC.Vin(childComplexity), true - case "eventDataSummary.firstSeen": - if e.ComplexityRoot.EventDataSummary.FirstSeen == nil { - break - } - - return e.ComplexityRoot.EventDataSummary.FirstSeen(childComplexity), true - case "eventDataSummary.lastSeen": - if e.ComplexityRoot.EventDataSummary.LastSeen == nil { - break - } - - return e.ComplexityRoot.EventDataSummary.LastSeen(childComplexity), true - case "eventDataSummary.name": - if e.ComplexityRoot.EventDataSummary.Name == nil { - break - } - - return e.ComplexityRoot.EventDataSummary.Name(childComplexity), true - case "eventDataSummary.numberOfEvents": - if e.ComplexityRoot.EventDataSummary.NumberOfEvents == nil { - break - } - - return e.ComplexityRoot.EventDataSummary.NumberOfEvents(childComplexity), true - - case "signalDataSummary.firstSeen": - if e.ComplexityRoot.SignalDataSummary.FirstSeen == nil { - break - } - - return e.ComplexityRoot.SignalDataSummary.FirstSeen(childComplexity), true - case "signalDataSummary.lastSeen": - if e.ComplexityRoot.SignalDataSummary.LastSeen == nil { - break - } - - return e.ComplexityRoot.SignalDataSummary.LastSeen(childComplexity), true - case "signalDataSummary.name": - if e.ComplexityRoot.SignalDataSummary.Name == nil { - break - } - - return e.ComplexityRoot.SignalDataSummary.Name(childComplexity), true - case "signalDataSummary.numberOfSignals": - if e.ComplexityRoot.SignalDataSummary.NumberOfSignals == nil { - break - } - - return e.ComplexityRoot.SignalDataSummary.NumberOfSignals(childComplexity), true - } return 0, false } @@ -3331,11 +3401,22 @@ type Query { """ signalsLatest(tokenId: Int!, filter: SignalFilter): SignalCollection @requiresVehicleToken + @mcpTool(name: "get_latest_signals", description: "Get the most recent signal values for a vehicle by token ID. Returns the last-seen timestamp for the vehicle.", selection: "lastSeen") """ availableSignals returns a list of queryable signal names that have stored data for a given tokenId. """ availableSignals(tokenId: Int!, filter: SignalFilter): [String!] @requiresVehicleToken + @mcpTool(name: "get_available_signals", description: "List queryable signal names that have stored data for a vehicle by token ID.", selection: "") + + """ + signalsSnapshot returns a point-in-time snapshot of every available signal for a given vehicle. + Only signals the caller has privileges to access are included. This is equivalent to + calling availableSignals + signalsLatest but in a single request and database query. + """ + signalsSnapshot(tokenId: Int!, filter: SignalFilter): SignalsSnapshotResponse + @requiresVehicleToken + @mcpTool(name: "get_signals_snapshot", description: "Get a point-in-time snapshot of all available signals for a vehicle by token ID. Returns every signal the caller has permission to see.", selection: "lastSeen signals { name timestamp valueNumber valueString valueLocation { latitude longitude hdop } }") """ data summary of all signals for a given tokenId @@ -3381,6 +3462,32 @@ type SignalCollection { @isSignal } +""" +LatestSignal represents a single signal's most recent value. +""" +type LatestSignal { + """Signal name (e.g., "speed", "currentLocationCoordinates")""" + name: String! + """Timestamp of the most recent reading""" + timestamp: Time! + """Numeric value, present for float-type signals""" + valueNumber: Float + """String value, present for string-type signals""" + valueString: String + """Location value, present for location-type signals""" + valueLocation: Location +} + +""" +Response for signalsSnapshot query. +""" +type SignalsSnapshotResponse { + """The last time any signal was seen matching the filter.""" + lastSeen: Time + """List of all latest signal values the caller is authorized to see.""" + signals: [LatestSignal!]! +} + type DataSummary { """ Total number of signals collected @@ -3402,15 +3509,15 @@ type DataSummary { """ data summary of an individual signal """ - signalDataSummary: [signalDataSummary!]! + signalDataSummary: [SignalDataSummary!]! """ Events known to the vehicle: per-event name, count, and first/last seen. """ - eventDataSummary: [eventDataSummary!]! + eventDataSummary: [EventDataSummary!]! } -type eventDataSummary { +type EventDataSummary { """ Event name """ @@ -3429,7 +3536,7 @@ type eventDataSummary { lastSeen: Time! } -type signalDataSummary { +type SignalDataSummary { """ signal name """ @@ -3729,6 +3836,8 @@ input EventFilter { """ source: StringValueFilter } +`, BuiltIn: false}, + {Name: "../../schema/mcp.graphqls", Input: `directive @mcpTool(name: String!, description: String!, selection: String!) on FIELD_DEFINITION `, BuiltIn: false}, {Name: "../../schema/segments.graphqls", Input: `enum DetectionMechanism { """ @@ -3822,6 +3931,7 @@ extend type Query { eventRequests: [SegmentEventRequest!] timezone: String ): [DailyActivity!]! @requiresVehicleToken @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION, VEHICLE_NON_LOCATION_DATA]) + @mcpTool(name: "get_daily_activity", description: "Get per-day driving activity summaries for a vehicle. Returns segment count, total active duration, and signal aggregates per day. Maximum date range: 31 days.", selection: "segmentCount duration signals { name agg value } eventCounts { name count }") } input SegmentSignalRequest { @@ -6112,6 +6222,22 @@ func (ec *executionContext) field_Query_signalsLatest_args(ctx context.Context, return args, nil } +func (ec *executionContext) field_Query_signalsSnapshot_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { + var err error + args := map[string]any{} + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "tokenId", ec.unmarshalNInt2int) + if err != nil { + return nil, err + } + args["tokenId"] = arg0 + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "filter", ec.unmarshalOSignalFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFilter) + if err != nil { + return nil, err + } + args["filter"] = arg1 + return args, nil +} + func (ec *executionContext) field_Query_signals_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -8659,7 +8785,7 @@ func (ec *executionContext) _DataSummary_signalDataSummary(ctx context.Context, return obj.SignalDataSummary, nil }, nil, - ec.marshalNsignalDataSummary2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalDataSummaryᚄ, + ec.marshalNSignalDataSummary2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalDataSummaryᚄ, true, true, ) @@ -8674,15 +8800,15 @@ func (ec *executionContext) fieldContext_DataSummary_signalDataSummary(_ context Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "name": - return ec.fieldContext_signalDataSummary_name(ctx, field) + return ec.fieldContext_SignalDataSummary_name(ctx, field) case "numberOfSignals": - return ec.fieldContext_signalDataSummary_numberOfSignals(ctx, field) + return ec.fieldContext_SignalDataSummary_numberOfSignals(ctx, field) case "firstSeen": - return ec.fieldContext_signalDataSummary_firstSeen(ctx, field) + return ec.fieldContext_SignalDataSummary_firstSeen(ctx, field) case "lastSeen": - return ec.fieldContext_signalDataSummary_lastSeen(ctx, field) + return ec.fieldContext_SignalDataSummary_lastSeen(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type signalDataSummary", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SignalDataSummary", field.Name) }, } return fc, nil @@ -8698,7 +8824,7 @@ func (ec *executionContext) _DataSummary_eventDataSummary(ctx context.Context, f return obj.EventDataSummary, nil }, nil, - ec.marshalNeventDataSummary2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐEventDataSummaryᚄ, + ec.marshalNEventDataSummary2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐEventDataSummaryᚄ, true, true, ) @@ -8713,15 +8839,15 @@ func (ec *executionContext) fieldContext_DataSummary_eventDataSummary(_ context. Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "name": - return ec.fieldContext_eventDataSummary_name(ctx, field) + return ec.fieldContext_EventDataSummary_name(ctx, field) case "numberOfEvents": - return ec.fieldContext_eventDataSummary_numberOfEvents(ctx, field) + return ec.fieldContext_EventDataSummary_numberOfEvents(ctx, field) case "firstSeen": - return ec.fieldContext_eventDataSummary_firstSeen(ctx, field) + return ec.fieldContext_EventDataSummary_firstSeen(ctx, field) case "lastSeen": - return ec.fieldContext_eventDataSummary_lastSeen(ctx, field) + return ec.fieldContext_EventDataSummary_lastSeen(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type eventDataSummary", field.Name) + return nil, fmt.Errorf("no field named %q was found under type EventDataSummary", field.Name) }, } return fc, nil @@ -8930,6 +9056,275 @@ func (ec *executionContext) fieldContext_EventCount_count(_ context.Context, fie return fc, nil } +func (ec *executionContext) _EventDataSummary_name(ctx context.Context, field graphql.CollectedField, obj *model.EventDataSummary) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_EventDataSummary_name, + func(ctx context.Context) (any, error) { + return obj.Name, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) +} + +func (ec *executionContext) fieldContext_EventDataSummary_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "EventDataSummary", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _EventDataSummary_numberOfEvents(ctx context.Context, field graphql.CollectedField, obj *model.EventDataSummary) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_EventDataSummary_numberOfEvents, + func(ctx context.Context) (any, error) { + return obj.NumberOfEvents, nil + }, + nil, + ec.marshalNUint642uint64, + true, + true, + ) +} + +func (ec *executionContext) fieldContext_EventDataSummary_numberOfEvents(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "EventDataSummary", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Uint64 does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _EventDataSummary_firstSeen(ctx context.Context, field graphql.CollectedField, obj *model.EventDataSummary) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_EventDataSummary_firstSeen, + func(ctx context.Context) (any, error) { + return obj.FirstSeen, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) +} + +func (ec *executionContext) fieldContext_EventDataSummary_firstSeen(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "EventDataSummary", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Time does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _EventDataSummary_lastSeen(ctx context.Context, field graphql.CollectedField, obj *model.EventDataSummary) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_EventDataSummary_lastSeen, + func(ctx context.Context) (any, error) { + return obj.LastSeen, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) +} + +func (ec *executionContext) fieldContext_EventDataSummary_lastSeen(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "EventDataSummary", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Time does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _LatestSignal_name(ctx context.Context, field graphql.CollectedField, obj *model.LatestSignal) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_LatestSignal_name, + func(ctx context.Context) (any, error) { + return obj.Name, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) +} + +func (ec *executionContext) fieldContext_LatestSignal_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "LatestSignal", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _LatestSignal_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.LatestSignal) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_LatestSignal_timestamp, + func(ctx context.Context) (any, error) { + return obj.Timestamp, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) +} + +func (ec *executionContext) fieldContext_LatestSignal_timestamp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "LatestSignal", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Time does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _LatestSignal_valueNumber(ctx context.Context, field graphql.CollectedField, obj *model.LatestSignal) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_LatestSignal_valueNumber, + func(ctx context.Context) (any, error) { + return obj.ValueNumber, nil + }, + nil, + ec.marshalOFloat2ᚖfloat64, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_LatestSignal_valueNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "LatestSignal", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _LatestSignal_valueString(ctx context.Context, field graphql.CollectedField, obj *model.LatestSignal) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_LatestSignal_valueString, + func(ctx context.Context) (any, error) { + return obj.ValueString, nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_LatestSignal_valueString(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "LatestSignal", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _LatestSignal_valueLocation(ctx context.Context, field graphql.CollectedField, obj *model.LatestSignal) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_LatestSignal_valueLocation, + func(ctx context.Context) (any, error) { + return obj.ValueLocation, nil + }, + nil, + ec.marshalOLocation2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐLocation, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_LatestSignal_valueLocation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "LatestSignal", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "latitude": + return ec.fieldContext_Location_latitude(ctx, field) + case "longitude": + return ec.fieldContext_Location_longitude(ctx, field) + case "hdop": + return ec.fieldContext_Location_hdop(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Location", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _Location_latitude(ctx context.Context, field graphql.CollectedField, obj *model.Location) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, @@ -9655,6 +10050,66 @@ func (ec *executionContext) fieldContext_Query_availableSignals(ctx context.Cont return fc, nil } +func (ec *executionContext) _Query_signalsSnapshot(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_signalsSnapshot, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Query().SignalsSnapshot(ctx, fc.Args["tokenId"].(int), fc.Args["filter"].(*model.SignalFilter)) + }, + func(ctx context.Context, next graphql.Resolver) graphql.Resolver { + directive0 := next + + directive1 := func(ctx context.Context) (any, error) { + if ec.Directives.RequiresVehicleToken == nil { + var zeroVal *model.SignalsSnapshotResponse + return zeroVal, errors.New("directive requiresVehicleToken is not implemented") + } + return ec.Directives.RequiresVehicleToken(ctx, nil, directive0) + } + + next = directive1 + return next + }, + ec.marshalOSignalsSnapshotResponse2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalsSnapshotResponse, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_Query_signalsSnapshot(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "lastSeen": + return ec.fieldContext_SignalsSnapshotResponse_lastSeen(ctx, field) + case "signals": + return ec.fieldContext_SignalsSnapshotResponse_signals(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SignalsSnapshotResponse", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_signalsSnapshot_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + func (ec *executionContext) _Query_dataSummary(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, @@ -20332,7 +20787,247 @@ func (ec *executionContext) _SignalCollection_cabinSeatRow3DriverSideIsBelted(ct ) } -func (ec *executionContext) fieldContext_SignalCollection_cabinSeatRow3DriverSideIsBelted(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_cabinSeatRow3DriverSideIsBelted(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SignalCollection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "timestamp": + return ec.fieldContext_SignalFloat_timestamp(ctx, field) + case "value": + return ec.fieldContext_SignalFloat_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SignalCollection_cabinSeatRow3PassengerSideIsBelted(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignalCollection_cabinSeatRow3PassengerSideIsBelted, + func(ctx context.Context) (any, error) { + return obj.CabinSeatRow3PassengerSideIsBelted, nil + }, + func(ctx context.Context, next graphql.Resolver) graphql.Resolver { + directive0 := next + + directive1 := func(ctx context.Context) (any, error) { + privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) + if err != nil { + var zeroVal *model.SignalFloat + return zeroVal, err + } + if ec.Directives.RequiresAllOfPrivileges == nil { + var zeroVal *model.SignalFloat + return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") + } + return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) + } + directive2 := func(ctx context.Context) (any, error) { + if ec.Directives.IsSignal == nil { + var zeroVal *model.SignalFloat + return zeroVal, errors.New("directive isSignal is not implemented") + } + return ec.Directives.IsSignal(ctx, obj, directive1) + } + + next = directive2 + return next + }, + ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_SignalCollection_cabinSeatRow3PassengerSideIsBelted(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SignalCollection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "timestamp": + return ec.fieldContext_SignalFloat_timestamp(ctx, field) + case "value": + return ec.fieldContext_SignalFloat_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelLeftSpeed(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignalCollection_chassisAxleRow1WheelLeftSpeed, + func(ctx context.Context) (any, error) { + return obj.ChassisAxleRow1WheelLeftSpeed, nil + }, + func(ctx context.Context, next graphql.Resolver) graphql.Resolver { + directive0 := next + + directive1 := func(ctx context.Context) (any, error) { + privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) + if err != nil { + var zeroVal *model.SignalFloat + return zeroVal, err + } + if ec.Directives.RequiresAllOfPrivileges == nil { + var zeroVal *model.SignalFloat + return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") + } + return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) + } + directive2 := func(ctx context.Context) (any, error) { + if ec.Directives.IsSignal == nil { + var zeroVal *model.SignalFloat + return zeroVal, errors.New("directive isSignal is not implemented") + } + return ec.Directives.IsSignal(ctx, obj, directive1) + } + + next = directive2 + return next + }, + ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelLeftSpeed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SignalCollection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "timestamp": + return ec.fieldContext_SignalFloat_timestamp(ctx, field) + case "value": + return ec.fieldContext_SignalFloat_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelLeftTirePressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignalCollection_chassisAxleRow1WheelLeftTirePressure, + func(ctx context.Context) (any, error) { + return obj.ChassisAxleRow1WheelLeftTirePressure, nil + }, + func(ctx context.Context, next graphql.Resolver) graphql.Resolver { + directive0 := next + + directive1 := func(ctx context.Context) (any, error) { + privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) + if err != nil { + var zeroVal *model.SignalFloat + return zeroVal, err + } + if ec.Directives.RequiresAllOfPrivileges == nil { + var zeroVal *model.SignalFloat + return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") + } + return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) + } + directive2 := func(ctx context.Context) (any, error) { + if ec.Directives.IsSignal == nil { + var zeroVal *model.SignalFloat + return zeroVal, errors.New("directive isSignal is not implemented") + } + return ec.Directives.IsSignal(ctx, obj, directive1) + } + + next = directive2 + return next + }, + ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelLeftTirePressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SignalCollection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "timestamp": + return ec.fieldContext_SignalFloat_timestamp(ctx, field) + case "value": + return ec.fieldContext_SignalFloat_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelRightSpeed(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignalCollection_chassisAxleRow1WheelRightSpeed, + func(ctx context.Context) (any, error) { + return obj.ChassisAxleRow1WheelRightSpeed, nil + }, + func(ctx context.Context, next graphql.Resolver) graphql.Resolver { + directive0 := next + + directive1 := func(ctx context.Context) (any, error) { + privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) + if err != nil { + var zeroVal *model.SignalFloat + return zeroVal, err + } + if ec.Directives.RequiresAllOfPrivileges == nil { + var zeroVal *model.SignalFloat + return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") + } + return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) + } + directive2 := func(ctx context.Context) (any, error) { + if ec.Directives.IsSignal == nil { + var zeroVal *model.SignalFloat + return zeroVal, errors.New("directive isSignal is not implemented") + } + return ec.Directives.IsSignal(ctx, obj, directive1) + } + + next = directive2 + return next + }, + ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelRightSpeed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -20351,14 +21046,14 @@ func (ec *executionContext) fieldContext_SignalCollection_cabinSeatRow3DriverSid return fc, nil } -func (ec *executionContext) _SignalCollection_cabinSeatRow3PassengerSideIsBelted(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelRightTirePressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_cabinSeatRow3PassengerSideIsBelted, + ec.fieldContext_SignalCollection_chassisAxleRow1WheelRightTirePressure, func(ctx context.Context) (any, error) { - return obj.CabinSeatRow3PassengerSideIsBelted, nil + return obj.ChassisAxleRow1WheelRightTirePressure, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -20392,7 +21087,7 @@ func (ec *executionContext) _SignalCollection_cabinSeatRow3PassengerSideIsBelted ) } -func (ec *executionContext) fieldContext_SignalCollection_cabinSeatRow3PassengerSideIsBelted(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelRightTirePressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -20411,14 +21106,14 @@ func (ec *executionContext) fieldContext_SignalCollection_cabinSeatRow3Passenger return fc, nil } -func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelLeftSpeed(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisAxleRow2WheelLeftTirePressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisAxleRow1WheelLeftSpeed, + ec.fieldContext_SignalCollection_chassisAxleRow2WheelLeftTirePressure, func(ctx context.Context) (any, error) { - return obj.ChassisAxleRow1WheelLeftSpeed, nil + return obj.ChassisAxleRow2WheelLeftTirePressure, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -20452,7 +21147,7 @@ func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelLeftSpeed(ctx ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelLeftSpeed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow2WheelLeftTirePressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -20471,14 +21166,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelLe return fc, nil } -func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelLeftTirePressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisAxleRow2WheelRightTirePressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisAxleRow1WheelLeftTirePressure, + ec.fieldContext_SignalCollection_chassisAxleRow2WheelRightTirePressure, func(ctx context.Context) (any, error) { - return obj.ChassisAxleRow1WheelLeftTirePressure, nil + return obj.ChassisAxleRow2WheelRightTirePressure, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -20512,7 +21207,7 @@ func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelLeftTirePressu ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelLeftTirePressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow2WheelRightTirePressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -20531,14 +21226,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelLe return fc, nil } -func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelRightSpeed(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisAxleRow3Weight(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisAxleRow1WheelRightSpeed, + ec.fieldContext_SignalCollection_chassisAxleRow3Weight, func(ctx context.Context) (any, error) { - return obj.ChassisAxleRow1WheelRightSpeed, nil + return obj.ChassisAxleRow3Weight, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -20572,7 +21267,7 @@ func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelRightSpeed(ctx ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelRightSpeed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow3Weight(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -20591,14 +21286,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelRi return fc, nil } -func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelRightTirePressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisAxleRow4Weight(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisAxleRow1WheelRightTirePressure, + ec.fieldContext_SignalCollection_chassisAxleRow4Weight, func(ctx context.Context) (any, error) { - return obj.ChassisAxleRow1WheelRightTirePressure, nil + return obj.ChassisAxleRow4Weight, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -20632,7 +21327,7 @@ func (ec *executionContext) _SignalCollection_chassisAxleRow1WheelRightTirePress ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelRightTirePressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow4Weight(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -20651,14 +21346,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow1WheelRi return fc, nil } -func (ec *executionContext) _SignalCollection_chassisAxleRow2WheelLeftTirePressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisAxleRow5Weight(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisAxleRow2WheelLeftTirePressure, + ec.fieldContext_SignalCollection_chassisAxleRow5Weight, func(ctx context.Context) (any, error) { - return obj.ChassisAxleRow2WheelLeftTirePressure, nil + return obj.ChassisAxleRow5Weight, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -20692,7 +21387,7 @@ func (ec *executionContext) _SignalCollection_chassisAxleRow2WheelLeftTirePressu ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow2WheelLeftTirePressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow5Weight(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -20711,14 +21406,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow2WheelLe return fc, nil } -func (ec *executionContext) _SignalCollection_chassisAxleRow2WheelRightTirePressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisBrakeABSIsWarningOn(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisAxleRow2WheelRightTirePressure, + ec.fieldContext_SignalCollection_chassisBrakeABSIsWarningOn, func(ctx context.Context) (any, error) { - return obj.ChassisAxleRow2WheelRightTirePressure, nil + return obj.ChassisBrakeABSIsWarningOn, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -20752,7 +21447,7 @@ func (ec *executionContext) _SignalCollection_chassisAxleRow2WheelRightTirePress ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow2WheelRightTirePressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeABSIsWarningOn(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -20771,14 +21466,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow2WheelRi return fc, nil } -func (ec *executionContext) _SignalCollection_chassisAxleRow3Weight(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisBrakeCircuit1PressurePrimary(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisAxleRow3Weight, + ec.fieldContext_SignalCollection_chassisBrakeCircuit1PressurePrimary, func(ctx context.Context) (any, error) { - return obj.ChassisAxleRow3Weight, nil + return obj.ChassisBrakeCircuit1PressurePrimary, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -20812,7 +21507,7 @@ func (ec *executionContext) _SignalCollection_chassisAxleRow3Weight(ctx context. ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow3Weight(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeCircuit1PressurePrimary(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -20831,14 +21526,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow3Weight( return fc, nil } -func (ec *executionContext) _SignalCollection_chassisAxleRow4Weight(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisBrakeCircuit2PressurePrimary(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisAxleRow4Weight, + ec.fieldContext_SignalCollection_chassisBrakeCircuit2PressurePrimary, func(ctx context.Context) (any, error) { - return obj.ChassisAxleRow4Weight, nil + return obj.ChassisBrakeCircuit2PressurePrimary, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -20872,7 +21567,7 @@ func (ec *executionContext) _SignalCollection_chassisAxleRow4Weight(ctx context. ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow4Weight(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeCircuit2PressurePrimary(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -20891,14 +21586,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow4Weight( return fc, nil } -func (ec *executionContext) _SignalCollection_chassisAxleRow5Weight(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisBrakeIsPedalPressed(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisAxleRow5Weight, + ec.fieldContext_SignalCollection_chassisBrakeIsPedalPressed, func(ctx context.Context) (any, error) { - return obj.ChassisAxleRow5Weight, nil + return obj.ChassisBrakeIsPedalPressed, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -20932,7 +21627,7 @@ func (ec *executionContext) _SignalCollection_chassisAxleRow5Weight(ctx context. ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow5Weight(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeIsPedalPressed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -20951,14 +21646,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisAxleRow5Weight( return fc, nil } -func (ec *executionContext) _SignalCollection_chassisBrakeABSIsWarningOn(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisBrakePedalPosition(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisBrakeABSIsWarningOn, + ec.fieldContext_SignalCollection_chassisBrakePedalPosition, func(ctx context.Context) (any, error) { - return obj.ChassisBrakeABSIsWarningOn, nil + return obj.ChassisBrakePedalPosition, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -20992,7 +21687,7 @@ func (ec *executionContext) _SignalCollection_chassisBrakeABSIsWarningOn(ctx con ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeABSIsWarningOn(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisBrakePedalPosition(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21011,14 +21706,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeABSIsWarni return fc, nil } -func (ec *executionContext) _SignalCollection_chassisBrakeCircuit1PressurePrimary(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisParkingBrakeIsEngaged(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisBrakeCircuit1PressurePrimary, + ec.fieldContext_SignalCollection_chassisParkingBrakeIsEngaged, func(ctx context.Context) (any, error) { - return obj.ChassisBrakeCircuit1PressurePrimary, nil + return obj.ChassisParkingBrakeIsEngaged, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -21052,7 +21747,7 @@ func (ec *executionContext) _SignalCollection_chassisBrakeCircuit1PressurePrimar ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeCircuit1PressurePrimary(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisParkingBrakeIsEngaged(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21071,14 +21766,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeCircuit1Pr return fc, nil } -func (ec *executionContext) _SignalCollection_chassisBrakeCircuit2PressurePrimary(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_chassisTireSystemIsWarningOn(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisBrakeCircuit2PressurePrimary, + ec.fieldContext_SignalCollection_chassisTireSystemIsWarningOn, func(ctx context.Context) (any, error) { - return obj.ChassisBrakeCircuit2PressurePrimary, nil + return obj.ChassisTireSystemIsWarningOn, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -21112,7 +21807,7 @@ func (ec *executionContext) _SignalCollection_chassisBrakeCircuit2PressurePrimar ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeCircuit2PressurePrimary(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_chassisTireSystemIsWarningOn(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21131,14 +21826,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeCircuit2Pr return fc, nil } -func (ec *executionContext) _SignalCollection_chassisBrakeIsPedalPressed(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_connectivityCellularIsJammingDetected(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisBrakeIsPedalPressed, + ec.fieldContext_SignalCollection_connectivityCellularIsJammingDetected, func(ctx context.Context) (any, error) { - return obj.ChassisBrakeIsPedalPressed, nil + return obj.ConnectivityCellularIsJammingDetected, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -21172,7 +21867,7 @@ func (ec *executionContext) _SignalCollection_chassisBrakeIsPedalPressed(ctx con ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeIsPedalPressed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_connectivityCellularIsJammingDetected(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21191,20 +21886,20 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisBrakeIsPedalPre return fc, nil } -func (ec *executionContext) _SignalCollection_chassisBrakePedalPosition(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_currentLocationAltitude(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisBrakePedalPosition, + ec.fieldContext_SignalCollection_currentLocationAltitude, func(ctx context.Context) (any, error) { - return obj.ChassisBrakePedalPosition, nil + return obj.CurrentLocationAltitude, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next directive1 := func(ctx context.Context) (any, error) { - privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) + privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_ALL_TIME_LOCATION"}) if err != nil { var zeroVal *model.SignalFloat return zeroVal, err @@ -21232,7 +21927,7 @@ func (ec *executionContext) _SignalCollection_chassisBrakePedalPosition(ctx cont ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisBrakePedalPosition(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_currentLocationAltitude(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21251,20 +21946,80 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisBrakePedalPosit return fc, nil } -func (ec *executionContext) _SignalCollection_chassisParkingBrakeIsEngaged(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_currentLocationCoordinates(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisParkingBrakeIsEngaged, + ec.fieldContext_SignalCollection_currentLocationCoordinates, func(ctx context.Context) (any, error) { - return obj.ChassisParkingBrakeIsEngaged, nil + return obj.CurrentLocationCoordinates, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next directive1 := func(ctx context.Context) (any, error) { - privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) + privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_ALL_TIME_LOCATION"}) + if err != nil { + var zeroVal *model.SignalLocation + return zeroVal, err + } + if ec.Directives.RequiresAllOfPrivileges == nil { + var zeroVal *model.SignalLocation + return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") + } + return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) + } + directive2 := func(ctx context.Context) (any, error) { + if ec.Directives.IsSignal == nil { + var zeroVal *model.SignalLocation + return zeroVal, errors.New("directive isSignal is not implemented") + } + return ec.Directives.IsSignal(ctx, obj, directive1) + } + + next = directive2 + return next + }, + ec.marshalOSignalLocation2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalLocation, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_SignalCollection_currentLocationCoordinates(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SignalCollection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "timestamp": + return ec.fieldContext_SignalLocation_timestamp(ctx, field) + case "value": + return ec.fieldContext_SignalLocation_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SignalLocation", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SignalCollection_currentLocationHeading(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignalCollection_currentLocationHeading, + func(ctx context.Context) (any, error) { + return obj.CurrentLocationHeading, nil + }, + func(ctx context.Context, next graphql.Resolver) graphql.Resolver { + directive0 := next + + directive1 := func(ctx context.Context) (any, error) { + privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_ALL_TIME_LOCATION"}) if err != nil { var zeroVal *model.SignalFloat return zeroVal, err @@ -21292,7 +22047,7 @@ func (ec *executionContext) _SignalCollection_chassisParkingBrakeIsEngaged(ctx c ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisParkingBrakeIsEngaged(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_currentLocationHeading(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21311,14 +22066,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisParkingBrakeIsE return fc, nil } -func (ec *executionContext) _SignalCollection_chassisTireSystemIsWarningOn(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_exteriorAirTemperature(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_chassisTireSystemIsWarningOn, + ec.fieldContext_SignalCollection_exteriorAirTemperature, func(ctx context.Context) (any, error) { - return obj.ChassisTireSystemIsWarningOn, nil + return obj.ExteriorAirTemperature, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -21352,7 +22107,7 @@ func (ec *executionContext) _SignalCollection_chassisTireSystemIsWarningOn(ctx c ) } -func (ec *executionContext) fieldContext_SignalCollection_chassisTireSystemIsWarningOn(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_exteriorAirTemperature(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21371,14 +22126,14 @@ func (ec *executionContext) fieldContext_SignalCollection_chassisTireSystemIsWar return fc, nil } -func (ec *executionContext) _SignalCollection_connectivityCellularIsJammingDetected(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_isIgnitionOn(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_connectivityCellularIsJammingDetected, + ec.fieldContext_SignalCollection_isIgnitionOn, func(ctx context.Context) (any, error) { - return obj.ConnectivityCellularIsJammingDetected, nil + return obj.IsIgnitionOn, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -21412,7 +22167,7 @@ func (ec *executionContext) _SignalCollection_connectivityCellularIsJammingDetec ) } -func (ec *executionContext) fieldContext_SignalCollection_connectivityCellularIsJammingDetected(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_isIgnitionOn(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21431,20 +22186,20 @@ func (ec *executionContext) fieldContext_SignalCollection_connectivityCellularIs return fc, nil } -func (ec *executionContext) _SignalCollection_currentLocationAltitude(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_lowVoltageBatteryCurrentVoltage(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_currentLocationAltitude, + ec.fieldContext_SignalCollection_lowVoltageBatteryCurrentVoltage, func(ctx context.Context) (any, error) { - return obj.CurrentLocationAltitude, nil + return obj.LowVoltageBatteryCurrentVoltage, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next directive1 := func(ctx context.Context) (any, error) { - privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_ALL_TIME_LOCATION"}) + privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) if err != nil { var zeroVal *model.SignalFloat return zeroVal, err @@ -21472,7 +22227,7 @@ func (ec *executionContext) _SignalCollection_currentLocationAltitude(ctx contex ) } -func (ec *executionContext) fieldContext_SignalCollection_currentLocationAltitude(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_lowVoltageBatteryCurrentVoltage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21491,33 +22246,33 @@ func (ec *executionContext) fieldContext_SignalCollection_currentLocationAltitud return fc, nil } -func (ec *executionContext) _SignalCollection_currentLocationCoordinates(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdBarometricPressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_currentLocationCoordinates, + ec.fieldContext_SignalCollection_obdBarometricPressure, func(ctx context.Context) (any, error) { - return obj.CurrentLocationCoordinates, nil + return obj.OBDBarometricPressure, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next directive1 := func(ctx context.Context) (any, error) { - privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_ALL_TIME_LOCATION"}) + privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) if err != nil { - var zeroVal *model.SignalLocation + var zeroVal *model.SignalFloat return zeroVal, err } if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalLocation + var zeroVal *model.SignalFloat return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") } return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) } directive2 := func(ctx context.Context) (any, error) { if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalLocation + var zeroVal *model.SignalFloat return zeroVal, errors.New("directive isSignal is not implemented") } return ec.Directives.IsSignal(ctx, obj, directive1) @@ -21526,13 +22281,13 @@ func (ec *executionContext) _SignalCollection_currentLocationCoordinates(ctx con next = directive2 return next }, - ec.marshalOSignalLocation2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalLocation, + ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, true, false, ) } -func (ec *executionContext) fieldContext_SignalCollection_currentLocationCoordinates(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdBarometricPressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21541,30 +22296,30 @@ func (ec *executionContext) fieldContext_SignalCollection_currentLocationCoordin Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "timestamp": - return ec.fieldContext_SignalLocation_timestamp(ctx, field) + return ec.fieldContext_SignalFloat_timestamp(ctx, field) case "value": - return ec.fieldContext_SignalLocation_value(ctx, field) + return ec.fieldContext_SignalFloat_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SignalLocation", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) }, } return fc, nil } -func (ec *executionContext) _SignalCollection_currentLocationHeading(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdCommandedEGR(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_currentLocationHeading, + ec.fieldContext_SignalCollection_obdCommandedEGR, func(ctx context.Context) (any, error) { - return obj.CurrentLocationHeading, nil + return obj.OBDCommandedEGR, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next directive1 := func(ctx context.Context) (any, error) { - privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_ALL_TIME_LOCATION"}) + privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) if err != nil { var zeroVal *model.SignalFloat return zeroVal, err @@ -21592,7 +22347,7 @@ func (ec *executionContext) _SignalCollection_currentLocationHeading(ctx context ) } -func (ec *executionContext) fieldContext_SignalCollection_currentLocationHeading(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdCommandedEGR(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21611,14 +22366,14 @@ func (ec *executionContext) fieldContext_SignalCollection_currentLocationHeading return fc, nil } -func (ec *executionContext) _SignalCollection_exteriorAirTemperature(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdCommandedEVAP(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_exteriorAirTemperature, + ec.fieldContext_SignalCollection_obdCommandedEVAP, func(ctx context.Context) (any, error) { - return obj.ExteriorAirTemperature, nil + return obj.OBDCommandedEVAP, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -21652,7 +22407,7 @@ func (ec *executionContext) _SignalCollection_exteriorAirTemperature(ctx context ) } -func (ec *executionContext) fieldContext_SignalCollection_exteriorAirTemperature(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdCommandedEVAP(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21671,14 +22426,14 @@ func (ec *executionContext) fieldContext_SignalCollection_exteriorAirTemperature return fc, nil } -func (ec *executionContext) _SignalCollection_isIgnitionOn(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdDTCList(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_isIgnitionOn, + ec.fieldContext_SignalCollection_obdDTCList, func(ctx context.Context) (any, error) { - return obj.IsIgnitionOn, nil + return obj.OBDDTCList, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -21686,18 +22441,18 @@ func (ec *executionContext) _SignalCollection_isIgnitionOn(ctx context.Context, directive1 := func(ctx context.Context) (any, error) { privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) if err != nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, err } if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") } return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) } directive2 := func(ctx context.Context) (any, error) { if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, errors.New("directive isSignal is not implemented") } return ec.Directives.IsSignal(ctx, obj, directive1) @@ -21706,13 +22461,13 @@ func (ec *executionContext) _SignalCollection_isIgnitionOn(ctx context.Context, next = directive2 return next }, - ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, + ec.marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString, true, false, ) } -func (ec *executionContext) fieldContext_SignalCollection_isIgnitionOn(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdDTCList(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21721,24 +22476,24 @@ func (ec *executionContext) fieldContext_SignalCollection_isIgnitionOn(_ context Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "timestamp": - return ec.fieldContext_SignalFloat_timestamp(ctx, field) + return ec.fieldContext_SignalString_timestamp(ctx, field) case "value": - return ec.fieldContext_SignalFloat_value(ctx, field) + return ec.fieldContext_SignalString_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SignalString", field.Name) }, } return fc, nil } -func (ec *executionContext) _SignalCollection_lowVoltageBatteryCurrentVoltage(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdDistanceSinceDTCClear(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_lowVoltageBatteryCurrentVoltage, + ec.fieldContext_SignalCollection_obdDistanceSinceDTCClear, func(ctx context.Context) (any, error) { - return obj.LowVoltageBatteryCurrentVoltage, nil + return obj.OBDDistanceSinceDTCClear, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -21772,7 +22527,7 @@ func (ec *executionContext) _SignalCollection_lowVoltageBatteryCurrentVoltage(ct ) } -func (ec *executionContext) fieldContext_SignalCollection_lowVoltageBatteryCurrentVoltage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdDistanceSinceDTCClear(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21791,14 +22546,14 @@ func (ec *executionContext) fieldContext_SignalCollection_lowVoltageBatteryCurre return fc, nil } -func (ec *executionContext) _SignalCollection_obdBarometricPressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdDistanceWithMIL(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdBarometricPressure, + ec.fieldContext_SignalCollection_obdDistanceWithMIL, func(ctx context.Context) (any, error) { - return obj.OBDBarometricPressure, nil + return obj.OBDDistanceWithMIL, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -21832,7 +22587,7 @@ func (ec *executionContext) _SignalCollection_obdBarometricPressure(ctx context. ) } -func (ec *executionContext) fieldContext_SignalCollection_obdBarometricPressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdDistanceWithMIL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21851,14 +22606,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdBarometricPressure( return fc, nil } -func (ec *executionContext) _SignalCollection_obdCommandedEGR(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdEngineLoad(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdCommandedEGR, + ec.fieldContext_SignalCollection_obdEngineLoad, func(ctx context.Context) (any, error) { - return obj.OBDCommandedEGR, nil + return obj.OBDEngineLoad, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -21892,7 +22647,7 @@ func (ec *executionContext) _SignalCollection_obdCommandedEGR(ctx context.Contex ) } -func (ec *executionContext) fieldContext_SignalCollection_obdCommandedEGR(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdEngineLoad(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21911,14 +22666,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdCommandedEGR(_ cont return fc, nil } -func (ec *executionContext) _SignalCollection_obdCommandedEVAP(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdEthanolPercent(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdCommandedEVAP, + ec.fieldContext_SignalCollection_obdEthanolPercent, func(ctx context.Context) (any, error) { - return obj.OBDCommandedEVAP, nil + return obj.OBDEthanolPercent, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -21952,7 +22707,7 @@ func (ec *executionContext) _SignalCollection_obdCommandedEVAP(ctx context.Conte ) } -func (ec *executionContext) fieldContext_SignalCollection_obdCommandedEVAP(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdEthanolPercent(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -21971,74 +22726,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdCommandedEVAP(_ con return fc, nil } -func (ec *executionContext) _SignalCollection_obdDTCList(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - ec.fieldContext_SignalCollection_obdDTCList, - func(ctx context.Context) (any, error) { - return obj.OBDDTCList, nil - }, - func(ctx context.Context, next graphql.Resolver) graphql.Resolver { - directive0 := next - - directive1 := func(ctx context.Context) (any, error) { - privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) - if err != nil { - var zeroVal *model.SignalString - return zeroVal, err - } - if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalString - return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") - } - return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) - } - directive2 := func(ctx context.Context) (any, error) { - if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalString - return zeroVal, errors.New("directive isSignal is not implemented") - } - return ec.Directives.IsSignal(ctx, obj, directive1) - } - - next = directive2 - return next - }, - ec.marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString, - true, - false, - ) -} - -func (ec *executionContext) fieldContext_SignalCollection_obdDTCList(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SignalCollection", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "timestamp": - return ec.fieldContext_SignalString_timestamp(ctx, field) - case "value": - return ec.fieldContext_SignalString_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SignalString", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _SignalCollection_obdDistanceSinceDTCClear(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdFuelPressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdDistanceSinceDTCClear, + ec.fieldContext_SignalCollection_obdFuelPressure, func(ctx context.Context) (any, error) { - return obj.OBDDistanceSinceDTCClear, nil + return obj.OBDFuelPressure, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22072,7 +22767,7 @@ func (ec *executionContext) _SignalCollection_obdDistanceSinceDTCClear(ctx conte ) } -func (ec *executionContext) fieldContext_SignalCollection_obdDistanceSinceDTCClear(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdFuelPressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22091,14 +22786,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdDistanceSinceDTCCle return fc, nil } -func (ec *executionContext) _SignalCollection_obdDistanceWithMIL(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdFuelRailPressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdDistanceWithMIL, + ec.fieldContext_SignalCollection_obdFuelRailPressure, func(ctx context.Context) (any, error) { - return obj.OBDDistanceWithMIL, nil + return obj.OBDFuelRailPressure, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22132,7 +22827,7 @@ func (ec *executionContext) _SignalCollection_obdDistanceWithMIL(ctx context.Con ) } -func (ec *executionContext) fieldContext_SignalCollection_obdDistanceWithMIL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdFuelRailPressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22151,14 +22846,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdDistanceWithMIL(_ c return fc, nil } -func (ec *executionContext) _SignalCollection_obdEngineLoad(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdFuelRate(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdEngineLoad, + ec.fieldContext_SignalCollection_obdFuelRate, func(ctx context.Context) (any, error) { - return obj.OBDEngineLoad, nil + return obj.OBDFuelRate, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22192,7 +22887,7 @@ func (ec *executionContext) _SignalCollection_obdEngineLoad(ctx context.Context, ) } -func (ec *executionContext) fieldContext_SignalCollection_obdEngineLoad(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdFuelRate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22211,14 +22906,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdEngineLoad(_ contex return fc, nil } -func (ec *executionContext) _SignalCollection_obdEthanolPercent(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdFuelTypeName(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdEthanolPercent, + ec.fieldContext_SignalCollection_obdFuelTypeName, func(ctx context.Context) (any, error) { - return obj.OBDEthanolPercent, nil + return obj.OBDFuelTypeName, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22226,18 +22921,18 @@ func (ec *executionContext) _SignalCollection_obdEthanolPercent(ctx context.Cont directive1 := func(ctx context.Context) (any, error) { privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) if err != nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, err } if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") } return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) } directive2 := func(ctx context.Context) (any, error) { if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, errors.New("directive isSignal is not implemented") } return ec.Directives.IsSignal(ctx, obj, directive1) @@ -22246,13 +22941,13 @@ func (ec *executionContext) _SignalCollection_obdEthanolPercent(ctx context.Cont next = directive2 return next }, - ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, + ec.marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString, true, false, ) } -func (ec *executionContext) fieldContext_SignalCollection_obdEthanolPercent(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdFuelTypeName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22261,24 +22956,24 @@ func (ec *executionContext) fieldContext_SignalCollection_obdEthanolPercent(_ co Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "timestamp": - return ec.fieldContext_SignalFloat_timestamp(ctx, field) + return ec.fieldContext_SignalString_timestamp(ctx, field) case "value": - return ec.fieldContext_SignalFloat_value(ctx, field) + return ec.fieldContext_SignalString_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SignalString", field.Name) }, } return fc, nil } -func (ec *executionContext) _SignalCollection_obdFuelPressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdIntakeTemp(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdFuelPressure, + ec.fieldContext_SignalCollection_obdIntakeTemp, func(ctx context.Context) (any, error) { - return obj.OBDFuelPressure, nil + return obj.OBDIntakeTemp, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22312,7 +23007,7 @@ func (ec *executionContext) _SignalCollection_obdFuelPressure(ctx context.Contex ) } -func (ec *executionContext) fieldContext_SignalCollection_obdFuelPressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdIntakeTemp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22331,14 +23026,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdFuelPressure(_ cont return fc, nil } -func (ec *executionContext) _SignalCollection_obdFuelRailPressure(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdIsEngineBlocked(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdFuelRailPressure, + ec.fieldContext_SignalCollection_obdIsEngineBlocked, func(ctx context.Context) (any, error) { - return obj.OBDFuelRailPressure, nil + return obj.OBDIsEngineBlocked, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22372,7 +23067,7 @@ func (ec *executionContext) _SignalCollection_obdFuelRailPressure(ctx context.Co ) } -func (ec *executionContext) fieldContext_SignalCollection_obdFuelRailPressure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdIsEngineBlocked(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22391,14 +23086,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdFuelRailPressure(_ return fc, nil } -func (ec *executionContext) _SignalCollection_obdFuelRate(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdIsPTOActive(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdFuelRate, + ec.fieldContext_SignalCollection_obdIsPTOActive, func(ctx context.Context) (any, error) { - return obj.OBDFuelRate, nil + return obj.OBDIsPTOActive, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22432,7 +23127,7 @@ func (ec *executionContext) _SignalCollection_obdFuelRate(ctx context.Context, f ) } -func (ec *executionContext) fieldContext_SignalCollection_obdFuelRate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdIsPTOActive(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22451,74 +23146,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdFuelRate(_ context. return fc, nil } -func (ec *executionContext) _SignalCollection_obdFuelTypeName(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - ec.fieldContext_SignalCollection_obdFuelTypeName, - func(ctx context.Context) (any, error) { - return obj.OBDFuelTypeName, nil - }, - func(ctx context.Context, next graphql.Resolver) graphql.Resolver { - directive0 := next - - directive1 := func(ctx context.Context) (any, error) { - privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) - if err != nil { - var zeroVal *model.SignalString - return zeroVal, err - } - if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalString - return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") - } - return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) - } - directive2 := func(ctx context.Context) (any, error) { - if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalString - return zeroVal, errors.New("directive isSignal is not implemented") - } - return ec.Directives.IsSignal(ctx, obj, directive1) - } - - next = directive2 - return next - }, - ec.marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString, - true, - false, - ) -} - -func (ec *executionContext) fieldContext_SignalCollection_obdFuelTypeName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SignalCollection", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "timestamp": - return ec.fieldContext_SignalString_timestamp(ctx, field) - case "value": - return ec.fieldContext_SignalString_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SignalString", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _SignalCollection_obdIntakeTemp(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdIsPluggedIn(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdIntakeTemp, + ec.fieldContext_SignalCollection_obdIsPluggedIn, func(ctx context.Context) (any, error) { - return obj.OBDIntakeTemp, nil + return obj.OBDIsPluggedIn, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22552,7 +23187,7 @@ func (ec *executionContext) _SignalCollection_obdIntakeTemp(ctx context.Context, ) } -func (ec *executionContext) fieldContext_SignalCollection_obdIntakeTemp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdIsPluggedIn(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22571,14 +23206,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdIntakeTemp(_ contex return fc, nil } -func (ec *executionContext) _SignalCollection_obdIsEngineBlocked(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdLongTermFuelTrim1(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdIsEngineBlocked, + ec.fieldContext_SignalCollection_obdLongTermFuelTrim1, func(ctx context.Context) (any, error) { - return obj.OBDIsEngineBlocked, nil + return obj.OBDLongTermFuelTrim1, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22612,7 +23247,7 @@ func (ec *executionContext) _SignalCollection_obdIsEngineBlocked(ctx context.Con ) } -func (ec *executionContext) fieldContext_SignalCollection_obdIsEngineBlocked(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdLongTermFuelTrim1(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22631,14 +23266,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdIsEngineBlocked(_ c return fc, nil } -func (ec *executionContext) _SignalCollection_obdIsPTOActive(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdLongTermFuelTrim2(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdIsPTOActive, + ec.fieldContext_SignalCollection_obdLongTermFuelTrim2, func(ctx context.Context) (any, error) { - return obj.OBDIsPTOActive, nil + return obj.OBDLongTermFuelTrim2, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22672,7 +23307,7 @@ func (ec *executionContext) _SignalCollection_obdIsPTOActive(ctx context.Context ) } -func (ec *executionContext) fieldContext_SignalCollection_obdIsPTOActive(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdLongTermFuelTrim2(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22691,14 +23326,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdIsPTOActive(_ conte return fc, nil } -func (ec *executionContext) _SignalCollection_obdIsPluggedIn(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdMAP(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdIsPluggedIn, + ec.fieldContext_SignalCollection_obdMAP, func(ctx context.Context) (any, error) { - return obj.OBDIsPluggedIn, nil + return obj.OBDMAP, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22732,7 +23367,7 @@ func (ec *executionContext) _SignalCollection_obdIsPluggedIn(ctx context.Context ) } -func (ec *executionContext) fieldContext_SignalCollection_obdIsPluggedIn(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdMAP(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22751,14 +23386,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdIsPluggedIn(_ conte return fc, nil } -func (ec *executionContext) _SignalCollection_obdLongTermFuelTrim1(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdMaxMAF(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdLongTermFuelTrim1, + ec.fieldContext_SignalCollection_obdMaxMAF, func(ctx context.Context) (any, error) { - return obj.OBDLongTermFuelTrim1, nil + return obj.OBDMaxMAF, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22792,7 +23427,7 @@ func (ec *executionContext) _SignalCollection_obdLongTermFuelTrim1(ctx context.C ) } -func (ec *executionContext) fieldContext_SignalCollection_obdLongTermFuelTrim1(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdMaxMAF(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22811,14 +23446,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdLongTermFuelTrim1(_ return fc, nil } -func (ec *executionContext) _SignalCollection_obdLongTermFuelTrim2(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdO2WRSensor1Voltage(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdLongTermFuelTrim2, + ec.fieldContext_SignalCollection_obdO2WRSensor1Voltage, func(ctx context.Context) (any, error) { - return obj.OBDLongTermFuelTrim2, nil + return obj.OBDO2WRSensor1Voltage, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22852,7 +23487,7 @@ func (ec *executionContext) _SignalCollection_obdLongTermFuelTrim2(ctx context.C ) } -func (ec *executionContext) fieldContext_SignalCollection_obdLongTermFuelTrim2(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdO2WRSensor1Voltage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22871,14 +23506,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdLongTermFuelTrim2(_ return fc, nil } -func (ec *executionContext) _SignalCollection_obdMAP(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdO2WRSensor2Voltage(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdMAP, + ec.fieldContext_SignalCollection_obdO2WRSensor2Voltage, func(ctx context.Context) (any, error) { - return obj.OBDMAP, nil + return obj.OBDO2WRSensor2Voltage, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22912,7 +23547,7 @@ func (ec *executionContext) _SignalCollection_obdMAP(ctx context.Context, field ) } -func (ec *executionContext) fieldContext_SignalCollection_obdMAP(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdO2WRSensor2Voltage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22931,14 +23566,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdMAP(_ context.Conte return fc, nil } -func (ec *executionContext) _SignalCollection_obdMaxMAF(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdOilTemperature(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdMaxMAF, + ec.fieldContext_SignalCollection_obdOilTemperature, func(ctx context.Context) (any, error) { - return obj.OBDMaxMAF, nil + return obj.OBDOilTemperature, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -22972,7 +23607,7 @@ func (ec *executionContext) _SignalCollection_obdMaxMAF(ctx context.Context, fie ) } -func (ec *executionContext) fieldContext_SignalCollection_obdMaxMAF(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdOilTemperature(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -22991,14 +23626,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdMaxMAF(_ context.Co return fc, nil } -func (ec *executionContext) _SignalCollection_obdO2WRSensor1Voltage(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdRunTime(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdO2WRSensor1Voltage, + ec.fieldContext_SignalCollection_obdRunTime, func(ctx context.Context) (any, error) { - return obj.OBDO2WRSensor1Voltage, nil + return obj.OBDRunTime, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23032,7 +23667,7 @@ func (ec *executionContext) _SignalCollection_obdO2WRSensor1Voltage(ctx context. ) } -func (ec *executionContext) fieldContext_SignalCollection_obdO2WRSensor1Voltage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdRunTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23051,14 +23686,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdO2WRSensor1Voltage( return fc, nil } -func (ec *executionContext) _SignalCollection_obdO2WRSensor2Voltage(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdShortTermFuelTrim1(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdO2WRSensor2Voltage, + ec.fieldContext_SignalCollection_obdShortTermFuelTrim1, func(ctx context.Context) (any, error) { - return obj.OBDO2WRSensor2Voltage, nil + return obj.OBDShortTermFuelTrim1, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23092,7 +23727,7 @@ func (ec *executionContext) _SignalCollection_obdO2WRSensor2Voltage(ctx context. ) } -func (ec *executionContext) fieldContext_SignalCollection_obdO2WRSensor2Voltage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdShortTermFuelTrim1(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23111,14 +23746,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdO2WRSensor2Voltage( return fc, nil } -func (ec *executionContext) _SignalCollection_obdOilTemperature(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdStatusDTCCount(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdOilTemperature, + ec.fieldContext_SignalCollection_obdStatusDTCCount, func(ctx context.Context) (any, error) { - return obj.OBDOilTemperature, nil + return obj.OBDStatusDTCCount, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23152,7 +23787,7 @@ func (ec *executionContext) _SignalCollection_obdOilTemperature(ctx context.Cont ) } -func (ec *executionContext) fieldContext_SignalCollection_obdOilTemperature(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdStatusDTCCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23171,14 +23806,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdOilTemperature(_ co return fc, nil } -func (ec *executionContext) _SignalCollection_obdRunTime(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdThrottlePosition(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdRunTime, + ec.fieldContext_SignalCollection_obdThrottlePosition, func(ctx context.Context) (any, error) { - return obj.OBDRunTime, nil + return obj.OBDThrottlePosition, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23212,7 +23847,7 @@ func (ec *executionContext) _SignalCollection_obdRunTime(ctx context.Context, fi ) } -func (ec *executionContext) fieldContext_SignalCollection_obdRunTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdThrottlePosition(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23231,14 +23866,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdRunTime(_ context.C return fc, nil } -func (ec *executionContext) _SignalCollection_obdShortTermFuelTrim1(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_obdWarmupsSinceDTCClear(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdShortTermFuelTrim1, + ec.fieldContext_SignalCollection_obdWarmupsSinceDTCClear, func(ctx context.Context) (any, error) { - return obj.OBDShortTermFuelTrim1, nil + return obj.OBDWarmupsSinceDTCClear, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23272,7 +23907,7 @@ func (ec *executionContext) _SignalCollection_obdShortTermFuelTrim1(ctx context. ) } -func (ec *executionContext) fieldContext_SignalCollection_obdShortTermFuelTrim1(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_obdWarmupsSinceDTCClear(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23291,14 +23926,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdShortTermFuelTrim1( return fc, nil } -func (ec *executionContext) _SignalCollection_obdStatusDTCCount(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineDieselExhaustFluidCapacity(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdStatusDTCCount, + ec.fieldContext_SignalCollection_powertrainCombustionEngineDieselExhaustFluidCapacity, func(ctx context.Context) (any, error) { - return obj.OBDStatusDTCCount, nil + return obj.PowertrainCombustionEngineDieselExhaustFluidCapacity, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23332,7 +23967,7 @@ func (ec *executionContext) _SignalCollection_obdStatusDTCCount(ctx context.Cont ) } -func (ec *executionContext) fieldContext_SignalCollection_obdStatusDTCCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineDieselExhaustFluidCapacity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23351,14 +23986,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdStatusDTCCount(_ co return fc, nil } -func (ec *executionContext) _SignalCollection_obdThrottlePosition(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineDieselExhaustFluidLevel(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdThrottlePosition, + ec.fieldContext_SignalCollection_powertrainCombustionEngineDieselExhaustFluidLevel, func(ctx context.Context) (any, error) { - return obj.OBDThrottlePosition, nil + return obj.PowertrainCombustionEngineDieselExhaustFluidLevel, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23392,7 +24027,7 @@ func (ec *executionContext) _SignalCollection_obdThrottlePosition(ctx context.Co ) } -func (ec *executionContext) fieldContext_SignalCollection_obdThrottlePosition(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineDieselExhaustFluidLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23411,14 +24046,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdThrottlePosition(_ return fc, nil } -func (ec *executionContext) _SignalCollection_obdWarmupsSinceDTCClear(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineECT(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_obdWarmupsSinceDTCClear, + ec.fieldContext_SignalCollection_powertrainCombustionEngineECT, func(ctx context.Context) (any, error) { - return obj.OBDWarmupsSinceDTCClear, nil + return obj.PowertrainCombustionEngineECT, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23452,7 +24087,7 @@ func (ec *executionContext) _SignalCollection_obdWarmupsSinceDTCClear(ctx contex ) } -func (ec *executionContext) fieldContext_SignalCollection_obdWarmupsSinceDTCClear(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineECT(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23471,14 +24106,14 @@ func (ec *executionContext) fieldContext_SignalCollection_obdWarmupsSinceDTCClea return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineDieselExhaustFluidCapacity(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEOP(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineDieselExhaustFluidCapacity, + ec.fieldContext_SignalCollection_powertrainCombustionEngineEOP, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineDieselExhaustFluidCapacity, nil + return obj.PowertrainCombustionEngineEOP, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23512,7 +24147,7 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineDieselEx ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineDieselExhaustFluidCapacity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineEOP(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23531,14 +24166,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineDieselExhaustFluidLevel(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEOT(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineDieselExhaustFluidLevel, + ec.fieldContext_SignalCollection_powertrainCombustionEngineEOT, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineDieselExhaustFluidLevel, nil + return obj.PowertrainCombustionEngineEOT, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23572,7 +24207,7 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineDieselEx ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineDieselExhaustFluidLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineEOT(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23591,14 +24226,74 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineECT(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEngineOilLevel(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineECT, + ec.fieldContext_SignalCollection_powertrainCombustionEngineEngineOilLevel, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineECT, nil + return obj.PowertrainCombustionEngineEngineOilLevel, nil + }, + func(ctx context.Context, next graphql.Resolver) graphql.Resolver { + directive0 := next + + directive1 := func(ctx context.Context) (any, error) { + privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) + if err != nil { + var zeroVal *model.SignalString + return zeroVal, err + } + if ec.Directives.RequiresAllOfPrivileges == nil { + var zeroVal *model.SignalString + return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") + } + return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) + } + directive2 := func(ctx context.Context) (any, error) { + if ec.Directives.IsSignal == nil { + var zeroVal *model.SignalString + return zeroVal, errors.New("directive isSignal is not implemented") + } + return ec.Directives.IsSignal(ctx, obj, directive1) + } + + next = directive2 + return next + }, + ec.marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineEngineOilLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SignalCollection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "timestamp": + return ec.fieldContext_SignalString_timestamp(ctx, field) + case "value": + return ec.fieldContext_SignalString_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SignalString", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEngineOilRelativeLevel(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignalCollection_powertrainCombustionEngineEngineOilRelativeLevel, + func(ctx context.Context) (any, error) { + return obj.PowertrainCombustionEngineEngineOilRelativeLevel, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23632,7 +24327,7 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineECT(ctx ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineECT(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineEngineOilRelativeLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23651,14 +24346,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEOP(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineMAF(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineEOP, + ec.fieldContext_SignalCollection_powertrainCombustionEngineMAF, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineEOP, nil + return obj.PowertrainCombustionEngineMAF, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23692,7 +24387,7 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEOP(ctx ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineEOP(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineMAF(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23711,14 +24406,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEOT(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineSpeed(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineEOT, + ec.fieldContext_SignalCollection_powertrainCombustionEngineSpeed, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineEOT, nil + return obj.PowertrainCombustionEngineSpeed, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23752,7 +24447,7 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEOT(ctx ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineEOT(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineSpeed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23771,14 +24466,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEngineOilLevel(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineTPS(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineEngineOilLevel, + ec.fieldContext_SignalCollection_powertrainCombustionEngineTPS, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineEngineOilLevel, nil + return obj.PowertrainCombustionEngineTPS, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23786,18 +24481,18 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEngineOi directive1 := func(ctx context.Context) (any, error) { privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) if err != nil { - var zeroVal *model.SignalString + var zeroVal *model.SignalFloat return zeroVal, err } if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalString + var zeroVal *model.SignalFloat return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") } return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) } directive2 := func(ctx context.Context) (any, error) { if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalString + var zeroVal *model.SignalFloat return zeroVal, errors.New("directive isSignal is not implemented") } return ec.Directives.IsSignal(ctx, obj, directive1) @@ -23806,13 +24501,13 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEngineOi next = directive2 return next }, - ec.marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString, + ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, true, false, ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineEngineOilLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineTPS(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23821,24 +24516,24 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "timestamp": - return ec.fieldContext_SignalString_timestamp(ctx, field) + return ec.fieldContext_SignalFloat_timestamp(ctx, field) case "value": - return ec.fieldContext_SignalString_value(ctx, field) + return ec.fieldContext_SignalFloat_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SignalString", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) }, } return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEngineOilRelativeLevel(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineTorque(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineEngineOilRelativeLevel, + ec.fieldContext_SignalCollection_powertrainCombustionEngineTorque, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineEngineOilRelativeLevel, nil + return obj.PowertrainCombustionEngineTorque, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23872,7 +24567,7 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineEngineOi ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineEngineOilRelativeLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineTorque(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23891,14 +24586,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineMAF(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainCombustionEngineTorquePercent(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineMAF, + ec.fieldContext_SignalCollection_powertrainCombustionEngineTorquePercent, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineMAF, nil + return obj.PowertrainCombustionEngineTorquePercent, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23932,7 +24627,7 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineMAF(ctx ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineMAF(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineTorquePercent(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -23951,14 +24646,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineSpeed(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainFuelSystemAbsoluteLevel(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineSpeed, + ec.fieldContext_SignalCollection_powertrainFuelSystemAbsoluteLevel, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineSpeed, nil + return obj.PowertrainFuelSystemAbsoluteLevel, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -23992,7 +24687,7 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineSpeed(ct ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineSpeed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemAbsoluteLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24011,14 +24706,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineTPS(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainFuelSystemAccumulatedConsumption(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineTPS, + ec.fieldContext_SignalCollection_powertrainFuelSystemAccumulatedConsumption, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineTPS, nil + return obj.PowertrainFuelSystemAccumulatedConsumption, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24052,7 +24747,7 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineTPS(ctx ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineTPS(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemAccumulatedConsumption(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24071,14 +24766,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineTorque(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainFuelSystemRelativeLevel(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineTorque, + ec.fieldContext_SignalCollection_powertrainFuelSystemRelativeLevel, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineTorque, nil + return obj.PowertrainFuelSystemRelativeLevel, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24112,7 +24807,7 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineTorque(c ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineTorque(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemRelativeLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24131,14 +24826,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainCombustionEngineTorquePercent(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainFuelSystemSupportedFuelTypes(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainCombustionEngineTorquePercent, + ec.fieldContext_SignalCollection_powertrainFuelSystemSupportedFuelTypes, func(ctx context.Context) (any, error) { - return obj.PowertrainCombustionEngineTorquePercent, nil + return obj.PowertrainFuelSystemSupportedFuelTypes, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24146,18 +24841,18 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineTorquePe directive1 := func(ctx context.Context) (any, error) { privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) if err != nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, err } if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") } return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) } directive2 := func(ctx context.Context) (any, error) { if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, errors.New("directive isSignal is not implemented") } return ec.Directives.IsSignal(ctx, obj, directive1) @@ -24166,13 +24861,13 @@ func (ec *executionContext) _SignalCollection_powertrainCombustionEngineTorquePe next = directive2 return next }, - ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, + ec.marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString, true, false, ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEngineTorquePercent(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemSupportedFuelTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24181,24 +24876,24 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainCombustionEn Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "timestamp": - return ec.fieldContext_SignalFloat_timestamp(ctx, field) + return ec.fieldContext_SignalString_timestamp(ctx, field) case "value": - return ec.fieldContext_SignalFloat_value(ctx, field) + return ec.fieldContext_SignalString_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SignalString", field.Name) }, } return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainFuelSystemAbsoluteLevel(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainRange(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainFuelSystemAbsoluteLevel, + ec.fieldContext_SignalCollection_powertrainRange, func(ctx context.Context) (any, error) { - return obj.PowertrainFuelSystemAbsoluteLevel, nil + return obj.PowertrainRange, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24232,7 +24927,7 @@ func (ec *executionContext) _SignalCollection_powertrainFuelSystemAbsoluteLevel( ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemAbsoluteLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainRange(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24251,14 +24946,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemAb return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainFuelSystemAccumulatedConsumption(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingAddedEnergy(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainFuelSystemAccumulatedConsumption, + ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingAddedEnergy, func(ctx context.Context) (any, error) { - return obj.PowertrainFuelSystemAccumulatedConsumption, nil + return obj.PowertrainTractionBatteryChargingAddedEnergy, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24292,7 +24987,7 @@ func (ec *executionContext) _SignalCollection_powertrainFuelSystemAccumulatedCon ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemAccumulatedConsumption(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingAddedEnergy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24311,14 +25006,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemAc return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainFuelSystemRelativeLevel(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingChargeCurrentAC(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainFuelSystemRelativeLevel, + ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeCurrentAC, func(ctx context.Context) (any, error) { - return obj.PowertrainFuelSystemRelativeLevel, nil + return obj.PowertrainTractionBatteryChargingChargeCurrentAC, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24352,7 +25047,7 @@ func (ec *executionContext) _SignalCollection_powertrainFuelSystemRelativeLevel( ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemRelativeLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeCurrentAC(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24371,14 +25066,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemRe return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainFuelSystemSupportedFuelTypes(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingChargeLimit(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainFuelSystemSupportedFuelTypes, + ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeLimit, func(ctx context.Context) (any, error) { - return obj.PowertrainFuelSystemSupportedFuelTypes, nil + return obj.PowertrainTractionBatteryChargingChargeLimit, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24386,18 +25081,18 @@ func (ec *executionContext) _SignalCollection_powertrainFuelSystemSupportedFuelT directive1 := func(ctx context.Context) (any, error) { privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) if err != nil { - var zeroVal *model.SignalString + var zeroVal *model.SignalFloat return zeroVal, err } if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalString + var zeroVal *model.SignalFloat return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") } return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) } directive2 := func(ctx context.Context) (any, error) { if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalString + var zeroVal *model.SignalFloat return zeroVal, errors.New("directive isSignal is not implemented") } return ec.Directives.IsSignal(ctx, obj, directive1) @@ -24406,13 +25101,13 @@ func (ec *executionContext) _SignalCollection_powertrainFuelSystemSupportedFuelT next = directive2 return next }, - ec.marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString, + ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, true, false, ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemSupportedFuelTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeLimit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24421,24 +25116,24 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainFuelSystemSu Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "timestamp": - return ec.fieldContext_SignalString_timestamp(ctx, field) + return ec.fieldContext_SignalFloat_timestamp(ctx, field) case "value": - return ec.fieldContext_SignalString_value(ctx, field) + return ec.fieldContext_SignalFloat_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SignalString", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) }, } return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainRange(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingChargeVoltageUnknownType(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainRange, + ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeVoltageUnknownType, func(ctx context.Context) (any, error) { - return obj.PowertrainRange, nil + return obj.PowertrainTractionBatteryChargingChargeVoltageUnknownType, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24472,7 +25167,7 @@ func (ec *executionContext) _SignalCollection_powertrainRange(ctx context.Contex ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainRange(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeVoltageUnknownType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24491,14 +25186,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainRange(_ cont return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingAddedEnergy(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingIsCharging(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingAddedEnergy, + ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingIsCharging, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryChargingAddedEnergy, nil + return obj.PowertrainTractionBatteryChargingIsCharging, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24532,7 +25227,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingA ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingAddedEnergy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingIsCharging(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24551,14 +25246,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingChargeCurrentAC(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingIsChargingCableConnected(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeCurrentAC, + ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingIsChargingCableConnected, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryChargingChargeCurrentAC, nil + return obj.PowertrainTractionBatteryChargingIsChargingCableConnected, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24592,7 +25287,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingC ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeCurrentAC(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingIsChargingCableConnected(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24611,14 +25306,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingChargeLimit(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingPower(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeLimit, + ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingPower, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryChargingChargeLimit, nil + return obj.PowertrainTractionBatteryChargingPower, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24652,7 +25347,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingC ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeLimit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingPower(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24671,14 +25366,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingChargeVoltageUnknownType(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryCurrentPower(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeVoltageUnknownType, + ec.fieldContext_SignalCollection_powertrainTractionBatteryCurrentPower, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryChargingChargeVoltageUnknownType, nil + return obj.PowertrainTractionBatteryCurrentPower, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24712,7 +25407,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingC ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingChargeVoltageUnknownType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryCurrentPower(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24731,14 +25426,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingIsCharging(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryCurrentVoltage(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingIsCharging, + ec.fieldContext_SignalCollection_powertrainTractionBatteryCurrentVoltage, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryChargingIsCharging, nil + return obj.PowertrainTractionBatteryCurrentVoltage, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24772,7 +25467,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingI ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingIsCharging(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryCurrentVoltage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24791,14 +25486,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingIsChargingCableConnected(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryGrossCapacity(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingIsChargingCableConnected, + ec.fieldContext_SignalCollection_powertrainTractionBatteryGrossCapacity, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryChargingIsChargingCableConnected, nil + return obj.PowertrainTractionBatteryGrossCapacity, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24832,7 +25527,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingI ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingIsChargingCableConnected(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryGrossCapacity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24851,14 +25546,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingPower(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryRange(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryChargingPower, + ec.fieldContext_SignalCollection_powertrainTractionBatteryRange, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryChargingPower, nil + return obj.PowertrainTractionBatteryRange, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24892,7 +25587,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryChargingP ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryChargingPower(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryRange(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24911,14 +25606,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryCurrentPower(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryStateOfChargeCurrent(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryCurrentPower, + ec.fieldContext_SignalCollection_powertrainTractionBatteryStateOfChargeCurrent, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryCurrentPower, nil + return obj.PowertrainTractionBatteryStateOfChargeCurrent, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -24952,7 +25647,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryCurrentPo ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryCurrentPower(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryStateOfChargeCurrent(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -24971,14 +25666,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryCurrentVoltage(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryStateOfChargeCurrentEnergy(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryCurrentVoltage, + ec.fieldContext_SignalCollection_powertrainTractionBatteryStateOfChargeCurrentEnergy, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryCurrentVoltage, nil + return obj.PowertrainTractionBatteryStateOfChargeCurrentEnergy, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25012,7 +25707,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryCurrentVo ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryCurrentVoltage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryStateOfChargeCurrentEnergy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25031,14 +25726,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryGrossCapacity(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryStateOfHealth(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryGrossCapacity, + ec.fieldContext_SignalCollection_powertrainTractionBatteryStateOfHealth, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryGrossCapacity, nil + return obj.PowertrainTractionBatteryStateOfHealth, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25072,7 +25767,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryGrossCapa ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryGrossCapacity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryStateOfHealth(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25091,14 +25786,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryRange(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTractionBatteryTemperatureAverage(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryRange, + ec.fieldContext_SignalCollection_powertrainTractionBatteryTemperatureAverage, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryRange, nil + return obj.PowertrainTractionBatteryTemperatureAverage, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25132,7 +25827,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryRange(ctx ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryRange(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryTemperatureAverage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25151,14 +25846,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryStateOfChargeCurrent(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTransmissionActualGear(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryStateOfChargeCurrent, + ec.fieldContext_SignalCollection_powertrainTransmissionActualGear, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryStateOfChargeCurrent, nil + return obj.PowertrainTransmissionActualGear, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25192,7 +25887,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryStateOfCh ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryStateOfChargeCurrent(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionActualGear(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25211,14 +25906,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryStateOfChargeCurrentEnergy(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTransmissionActualGearRatio(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryStateOfChargeCurrentEnergy, + ec.fieldContext_SignalCollection_powertrainTransmissionActualGearRatio, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryStateOfChargeCurrentEnergy, nil + return obj.PowertrainTransmissionActualGearRatio, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25252,7 +25947,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryStateOfCh ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryStateOfChargeCurrentEnergy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionActualGearRatio(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25271,14 +25966,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryStateOfHealth(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTransmissionCurrentGear(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryStateOfHealth, + ec.fieldContext_SignalCollection_powertrainTransmissionCurrentGear, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryStateOfHealth, nil + return obj.PowertrainTransmissionCurrentGear, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25312,7 +26007,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryStateOfHe ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryStateOfHealth(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionCurrentGear(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25331,14 +26026,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTractionBatteryTemperatureAverage(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTransmissionIsClutchSwitchOperated(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTractionBatteryTemperatureAverage, + ec.fieldContext_SignalCollection_powertrainTransmissionIsClutchSwitchOperated, func(ctx context.Context) (any, error) { - return obj.PowertrainTractionBatteryTemperatureAverage, nil + return obj.PowertrainTransmissionIsClutchSwitchOperated, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25372,7 +26067,7 @@ func (ec *executionContext) _SignalCollection_powertrainTractionBatteryTemperatu ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatteryTemperatureAverage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionIsClutchSwitchOperated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25391,14 +26086,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTractionBatt return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTransmissionActualGear(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTransmissionRetarderActualTorque(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTransmissionActualGear, + ec.fieldContext_SignalCollection_powertrainTransmissionRetarderActualTorque, func(ctx context.Context) (any, error) { - return obj.PowertrainTransmissionActualGear, nil + return obj.PowertrainTransmissionRetarderActualTorque, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25432,7 +26127,7 @@ func (ec *executionContext) _SignalCollection_powertrainTransmissionActualGear(c ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionActualGear(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionRetarderActualTorque(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25451,14 +26146,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmission return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTransmissionActualGearRatio(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTransmissionRetarderTorqueMode(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTransmissionActualGearRatio, + ec.fieldContext_SignalCollection_powertrainTransmissionRetarderTorqueMode, func(ctx context.Context) (any, error) { - return obj.PowertrainTransmissionActualGearRatio, nil + return obj.PowertrainTransmissionRetarderTorqueMode, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25466,18 +26161,18 @@ func (ec *executionContext) _SignalCollection_powertrainTransmissionActualGearRa directive1 := func(ctx context.Context) (any, error) { privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) if err != nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, err } if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") } return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) } directive2 := func(ctx context.Context) (any, error) { if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalFloat + var zeroVal *model.SignalString return zeroVal, errors.New("directive isSignal is not implemented") } return ec.Directives.IsSignal(ctx, obj, directive1) @@ -25486,13 +26181,13 @@ func (ec *executionContext) _SignalCollection_powertrainTransmissionActualGearRa next = directive2 return next }, - ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, + ec.marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString, true, false, ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionActualGearRatio(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionRetarderTorqueMode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25501,24 +26196,24 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmission Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "timestamp": - return ec.fieldContext_SignalFloat_timestamp(ctx, field) + return ec.fieldContext_SignalString_timestamp(ctx, field) case "value": - return ec.fieldContext_SignalFloat_value(ctx, field) + return ec.fieldContext_SignalString_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SignalString", field.Name) }, } return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTransmissionCurrentGear(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTransmissionSelectedGear(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTransmissionCurrentGear, + ec.fieldContext_SignalCollection_powertrainTransmissionSelectedGear, func(ctx context.Context) (any, error) { - return obj.PowertrainTransmissionCurrentGear, nil + return obj.PowertrainTransmissionSelectedGear, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25552,7 +26247,7 @@ func (ec *executionContext) _SignalCollection_powertrainTransmissionCurrentGear( ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionCurrentGear(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionSelectedGear(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25571,14 +26266,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmission return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTransmissionIsClutchSwitchOperated(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTransmissionTemperature(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTransmissionIsClutchSwitchOperated, + ec.fieldContext_SignalCollection_powertrainTransmissionTemperature, func(ctx context.Context) (any, error) { - return obj.PowertrainTransmissionIsClutchSwitchOperated, nil + return obj.PowertrainTransmissionTemperature, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25612,7 +26307,7 @@ func (ec *executionContext) _SignalCollection_powertrainTransmissionIsClutchSwit ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionIsClutchSwitchOperated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionTemperature(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25631,14 +26326,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmission return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTransmissionRetarderActualTorque(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainTransmissionTravelledDistance(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTransmissionRetarderActualTorque, + ec.fieldContext_SignalCollection_powertrainTransmissionTravelledDistance, func(ctx context.Context) (any, error) { - return obj.PowertrainTransmissionRetarderActualTorque, nil + return obj.PowertrainTransmissionTravelledDistance, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25672,7 +26367,7 @@ func (ec *executionContext) _SignalCollection_powertrainTransmissionRetarderActu ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionRetarderActualTorque(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionTravelledDistance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25691,14 +26386,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmission return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTransmissionRetarderTorqueMode(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_powertrainType(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTransmissionRetarderTorqueMode, + ec.fieldContext_SignalCollection_powertrainType, func(ctx context.Context) (any, error) { - return obj.PowertrainTransmissionRetarderTorqueMode, nil + return obj.PowertrainType, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25732,7 +26427,7 @@ func (ec *executionContext) _SignalCollection_powertrainTransmissionRetarderTorq ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionRetarderTorqueMode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_powertrainType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25751,14 +26446,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmission return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTransmissionSelectedGear(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_serviceDistanceToService(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTransmissionSelectedGear, + ec.fieldContext_SignalCollection_serviceDistanceToService, func(ctx context.Context) (any, error) { - return obj.PowertrainTransmissionSelectedGear, nil + return obj.ServiceDistanceToService, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25792,7 +26487,7 @@ func (ec *executionContext) _SignalCollection_powertrainTransmissionSelectedGear ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionSelectedGear(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_serviceDistanceToService(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25811,14 +26506,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmission return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTransmissionTemperature(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_serviceTimeToService(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTransmissionTemperature, + ec.fieldContext_SignalCollection_serviceTimeToService, func(ctx context.Context) (any, error) { - return obj.PowertrainTransmissionTemperature, nil + return obj.ServiceTimeToService, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25852,7 +26547,7 @@ func (ec *executionContext) _SignalCollection_powertrainTransmissionTemperature( ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionTemperature(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_serviceTimeToService(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25871,14 +26566,14 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmission return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainTransmissionTravelledDistance(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalCollection_speed(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainTransmissionTravelledDistance, + ec.fieldContext_SignalCollection_speed, func(ctx context.Context) (any, error) { - return obj.PowertrainTransmissionTravelledDistance, nil + return obj.Speed, nil }, func(ctx context.Context, next graphql.Resolver) graphql.Resolver { directive0 := next @@ -25912,7 +26607,7 @@ func (ec *executionContext) _SignalCollection_powertrainTransmissionTravelledDis ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmissionTravelledDistance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalCollection_speed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SignalCollection", Field: field, @@ -25931,241 +26626,117 @@ func (ec *executionContext) fieldContext_SignalCollection_powertrainTransmission return fc, nil } -func (ec *executionContext) _SignalCollection_powertrainType(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalDataSummary_name(ctx context.Context, field graphql.CollectedField, obj *model.SignalDataSummary) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_powertrainType, + ec.fieldContext_SignalDataSummary_name, func(ctx context.Context) (any, error) { - return obj.PowertrainType, nil - }, - func(ctx context.Context, next graphql.Resolver) graphql.Resolver { - directive0 := next - - directive1 := func(ctx context.Context) (any, error) { - privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) - if err != nil { - var zeroVal *model.SignalString - return zeroVal, err - } - if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalString - return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") - } - return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) - } - directive2 := func(ctx context.Context) (any, error) { - if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalString - return zeroVal, errors.New("directive isSignal is not implemented") - } - return ec.Directives.IsSignal(ctx, obj, directive1) - } - - next = directive2 - return next + return obj.Name, nil }, - ec.marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalString, + nil, + ec.marshalNString2string, + true, true, - false, ) } -func (ec *executionContext) fieldContext_SignalCollection_powertrainType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalDataSummary_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SignalCollection", + Object: "SignalDataSummary", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "timestamp": - return ec.fieldContext_SignalString_timestamp(ctx, field) - case "value": - return ec.fieldContext_SignalString_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SignalString", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _SignalCollection_serviceDistanceToService(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalDataSummary_numberOfSignals(ctx context.Context, field graphql.CollectedField, obj *model.SignalDataSummary) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_serviceDistanceToService, + ec.fieldContext_SignalDataSummary_numberOfSignals, func(ctx context.Context) (any, error) { - return obj.ServiceDistanceToService, nil - }, - func(ctx context.Context, next graphql.Resolver) graphql.Resolver { - directive0 := next - - directive1 := func(ctx context.Context) (any, error) { - privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) - if err != nil { - var zeroVal *model.SignalFloat - return zeroVal, err - } - if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalFloat - return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") - } - return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) - } - directive2 := func(ctx context.Context) (any, error) { - if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalFloat - return zeroVal, errors.New("directive isSignal is not implemented") - } - return ec.Directives.IsSignal(ctx, obj, directive1) - } - - next = directive2 - return next + return obj.NumberOfSignals, nil }, - ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, + nil, + ec.marshalNUint642uint64, + true, true, - false, ) } -func (ec *executionContext) fieldContext_SignalCollection_serviceDistanceToService(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalDataSummary_numberOfSignals(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SignalCollection", + Object: "SignalDataSummary", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "timestamp": - return ec.fieldContext_SignalFloat_timestamp(ctx, field) - case "value": - return ec.fieldContext_SignalFloat_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) + return nil, errors.New("field of type Uint64 does not have child fields") }, } return fc, nil } -func (ec *executionContext) _SignalCollection_serviceTimeToService(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalDataSummary_firstSeen(ctx context.Context, field graphql.CollectedField, obj *model.SignalDataSummary) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_serviceTimeToService, + ec.fieldContext_SignalDataSummary_firstSeen, func(ctx context.Context) (any, error) { - return obj.ServiceTimeToService, nil - }, - func(ctx context.Context, next graphql.Resolver) graphql.Resolver { - directive0 := next - - directive1 := func(ctx context.Context) (any, error) { - privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) - if err != nil { - var zeroVal *model.SignalFloat - return zeroVal, err - } - if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalFloat - return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") - } - return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) - } - directive2 := func(ctx context.Context) (any, error) { - if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalFloat - return zeroVal, errors.New("directive isSignal is not implemented") - } - return ec.Directives.IsSignal(ctx, obj, directive1) - } - - next = directive2 - return next + return obj.FirstSeen, nil }, - ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, + nil, + ec.marshalNTime2timeᚐTime, + true, true, - false, ) } -func (ec *executionContext) fieldContext_SignalCollection_serviceTimeToService(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalDataSummary_firstSeen(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SignalCollection", + Object: "SignalDataSummary", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "timestamp": - return ec.fieldContext_SignalFloat_timestamp(ctx, field) - case "value": - return ec.fieldContext_SignalFloat_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _SignalCollection_speed(ctx context.Context, field graphql.CollectedField, obj *model.SignalCollection) (ret graphql.Marshaler) { +func (ec *executionContext) _SignalDataSummary_lastSeen(ctx context.Context, field graphql.CollectedField, obj *model.SignalDataSummary) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_SignalCollection_speed, + ec.fieldContext_SignalDataSummary_lastSeen, func(ctx context.Context) (any, error) { - return obj.Speed, nil - }, - func(ctx context.Context, next graphql.Resolver) graphql.Resolver { - directive0 := next - - directive1 := func(ctx context.Context) (any, error) { - privileges, err := ec.unmarshalNPrivilege2ᚕstringᚄ(ctx, []any{"VEHICLE_NON_LOCATION_DATA"}) - if err != nil { - var zeroVal *model.SignalFloat - return zeroVal, err - } - if ec.Directives.RequiresAllOfPrivileges == nil { - var zeroVal *model.SignalFloat - return zeroVal, errors.New("directive requiresAllOfPrivileges is not implemented") - } - return ec.Directives.RequiresAllOfPrivileges(ctx, obj, directive0, privileges) - } - directive2 := func(ctx context.Context) (any, error) { - if ec.Directives.IsSignal == nil { - var zeroVal *model.SignalFloat - return zeroVal, errors.New("directive isSignal is not implemented") - } - return ec.Directives.IsSignal(ctx, obj, directive1) - } - - next = directive2 - return next + return obj.LastSeen, nil }, - ec.marshalOSignalFloat2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloat, + nil, + ec.marshalNTime2timeᚐTime, + true, true, - false, ) } -func (ec *executionContext) fieldContext_SignalCollection_speed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SignalDataSummary_lastSeen(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SignalCollection", + Object: "SignalDataSummary", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "timestamp": - return ec.fieldContext_SignalFloat_timestamp(ctx, field) - case "value": - return ec.fieldContext_SignalFloat_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SignalFloat", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil @@ -26353,6 +26924,76 @@ func (ec *executionContext) fieldContext_SignalString_value(_ context.Context, f return fc, nil } +func (ec *executionContext) _SignalsSnapshotResponse_lastSeen(ctx context.Context, field graphql.CollectedField, obj *model.SignalsSnapshotResponse) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignalsSnapshotResponse_lastSeen, + func(ctx context.Context) (any, error) { + return obj.LastSeen, nil + }, + nil, + ec.marshalOTime2ᚖtimeᚐTime, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_SignalsSnapshotResponse_lastSeen(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SignalsSnapshotResponse", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Time does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SignalsSnapshotResponse_signals(ctx context.Context, field graphql.CollectedField, obj *model.SignalsSnapshotResponse) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignalsSnapshotResponse_signals, + func(ctx context.Context) (any, error) { + return obj.Signals, nil + }, + nil, + ec.marshalNLatestSignal2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐLatestSignalᚄ, + true, + true, + ) +} + +func (ec *executionContext) fieldContext_SignalsSnapshotResponse_signals(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SignalsSnapshotResponse", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext_LatestSignal_name(ctx, field) + case "timestamp": + return ec.fieldContext_LatestSignal_timestamp(ctx, field) + case "valueNumber": + return ec.fieldContext_LatestSignal_valueNumber(ctx, field) + case "valueString": + return ec.fieldContext_LatestSignal_valueString(ctx, field) + case "valueLocation": + return ec.fieldContext_LatestSignal_valueLocation(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LatestSignal", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _VINVC_vehicleTokenId(ctx context.Context, field graphql.CollectedField, obj *model.Vinvc) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, @@ -28056,244 +28697,16 @@ func (ec *executionContext) fieldContext___Type_isOneOf(_ context.Context, field return fc, nil } -func (ec *executionContext) _eventDataSummary_name(ctx context.Context, field graphql.CollectedField, obj *model.EventDataSummary) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - ec.fieldContext_eventDataSummary_name, - func(ctx context.Context) (any, error) { - return obj.Name, nil - }, - nil, - ec.marshalNString2string, - true, - true, - ) -} - -func (ec *executionContext) fieldContext_eventDataSummary_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "eventDataSummary", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _eventDataSummary_numberOfEvents(ctx context.Context, field graphql.CollectedField, obj *model.EventDataSummary) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - ec.fieldContext_eventDataSummary_numberOfEvents, - func(ctx context.Context) (any, error) { - return obj.NumberOfEvents, nil - }, - nil, - ec.marshalNUint642uint64, - true, - true, - ) -} - -func (ec *executionContext) fieldContext_eventDataSummary_numberOfEvents(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "eventDataSummary", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Uint64 does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _eventDataSummary_firstSeen(ctx context.Context, field graphql.CollectedField, obj *model.EventDataSummary) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - ec.fieldContext_eventDataSummary_firstSeen, - func(ctx context.Context) (any, error) { - return obj.FirstSeen, nil - }, - nil, - ec.marshalNTime2timeᚐTime, - true, - true, - ) -} - -func (ec *executionContext) fieldContext_eventDataSummary_firstSeen(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "eventDataSummary", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _eventDataSummary_lastSeen(ctx context.Context, field graphql.CollectedField, obj *model.EventDataSummary) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - ec.fieldContext_eventDataSummary_lastSeen, - func(ctx context.Context) (any, error) { - return obj.LastSeen, nil - }, - nil, - ec.marshalNTime2timeᚐTime, - true, - true, - ) -} - -func (ec *executionContext) fieldContext_eventDataSummary_lastSeen(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "eventDataSummary", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _signalDataSummary_name(ctx context.Context, field graphql.CollectedField, obj *model.SignalDataSummary) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - ec.fieldContext_signalDataSummary_name, - func(ctx context.Context) (any, error) { - return obj.Name, nil - }, - nil, - ec.marshalNString2string, - true, - true, - ) -} - -func (ec *executionContext) fieldContext_signalDataSummary_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "signalDataSummary", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _signalDataSummary_numberOfSignals(ctx context.Context, field graphql.CollectedField, obj *model.SignalDataSummary) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - ec.fieldContext_signalDataSummary_numberOfSignals, - func(ctx context.Context) (any, error) { - return obj.NumberOfSignals, nil - }, - nil, - ec.marshalNUint642uint64, - true, - true, - ) -} - -func (ec *executionContext) fieldContext_signalDataSummary_numberOfSignals(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "signalDataSummary", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Uint64 does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _signalDataSummary_firstSeen(ctx context.Context, field graphql.CollectedField, obj *model.SignalDataSummary) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - ec.fieldContext_signalDataSummary_firstSeen, - func(ctx context.Context) (any, error) { - return obj.FirstSeen, nil - }, - nil, - ec.marshalNTime2timeᚐTime, - true, - true, - ) -} - -func (ec *executionContext) fieldContext_signalDataSummary_firstSeen(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "signalDataSummary", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _signalDataSummary_lastSeen(ctx context.Context, field graphql.CollectedField, obj *model.SignalDataSummary) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - ec.fieldContext_signalDataSummary_lastSeen, - func(ctx context.Context) (any, error) { - return obj.LastSeen, nil - }, - nil, - ec.marshalNTime2timeᚐTime, - true, - true, - ) -} - -func (ec *executionContext) fieldContext_signalDataSummary_lastSeen(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "signalDataSummary", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil -} - // endregion **************************** field.gotpl ***************************** // region **************************** input.gotpl ***************************** func (ec *executionContext) unmarshalInputAttestationFilter(ctx context.Context, obj any) (model.AttestationFilter, error) { var it model.AttestationFilter + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -28376,6 +28789,10 @@ func (ec *executionContext) unmarshalInputAttestationFilter(ctx context.Context, func (ec *executionContext) unmarshalInputEventFilter(ctx context.Context, obj any) (model.EventFilter, error) { var it model.EventFilter + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -28416,6 +28833,10 @@ func (ec *executionContext) unmarshalInputEventFilter(ctx context.Context, obj a func (ec *executionContext) unmarshalInputFilterLocation(ctx context.Context, obj any) (model.FilterLocation, error) { var it model.FilterLocation + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -28449,6 +28870,10 @@ func (ec *executionContext) unmarshalInputFilterLocation(ctx context.Context, ob func (ec *executionContext) unmarshalInputInCircleFilter(ctx context.Context, obj any) (model.InCircleFilter, error) { var it model.InCircleFilter + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -28482,6 +28907,10 @@ func (ec *executionContext) unmarshalInputInCircleFilter(ctx context.Context, ob func (ec *executionContext) unmarshalInputSegmentConfig(ctx context.Context, obj any) (model.SegmentConfig, error) { var it model.SegmentConfig + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -28552,6 +28981,10 @@ func (ec *executionContext) unmarshalInputSegmentConfig(ctx context.Context, obj func (ec *executionContext) unmarshalInputSegmentEventRequest(ctx context.Context, obj any) (model.SegmentEventRequest, error) { var it model.SegmentEventRequest + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -28578,6 +29011,10 @@ func (ec *executionContext) unmarshalInputSegmentEventRequest(ctx context.Contex func (ec *executionContext) unmarshalInputSegmentSignalRequest(ctx context.Context, obj any) (model.SegmentSignalRequest, error) { var it model.SegmentSignalRequest + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -28611,6 +29048,10 @@ func (ec *executionContext) unmarshalInputSegmentSignalRequest(ctx context.Conte func (ec *executionContext) unmarshalInputSignalFilter(ctx context.Context, obj any) (model.SignalFilter, error) { var it model.SignalFilter + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -28637,6 +29078,10 @@ func (ec *executionContext) unmarshalInputSignalFilter(ctx context.Context, obj func (ec *executionContext) unmarshalInputSignalFloatFilter(ctx context.Context, obj any) (model.SignalFloatFilter, error) { var it model.SignalFloatFilter + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -28719,6 +29164,10 @@ func (ec *executionContext) unmarshalInputSignalFloatFilter(ctx context.Context, func (ec *executionContext) unmarshalInputSignalLocationFilter(ctx context.Context, obj any) (model.SignalLocationFilter, error) { var it model.SignalLocationFilter + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -28752,6 +29201,10 @@ func (ec *executionContext) unmarshalInputSignalLocationFilter(ctx context.Conte func (ec *executionContext) unmarshalInputStringArrayFilter(ctx context.Context, obj any) (model.StringArrayFilter, error) { var it model.StringArrayFilter + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -28806,6 +29259,10 @@ func (ec *executionContext) unmarshalInputStringArrayFilter(ctx context.Context, func (ec *executionContext) unmarshalInputStringValueFilter(ctx context.Context, obj any) (model.StringValueFilter, error) { var it model.StringValueFilter + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -29009,44 +29466,144 @@ func (ec *executionContext) _DailyActivity(ctx context.Context, sel ast.Selectio return out } -var dataSummaryImplementors = []string{"DataSummary"} +var dataSummaryImplementors = []string{"DataSummary"} + +func (ec *executionContext) _DataSummary(ctx context.Context, sel ast.SelectionSet, obj *model.DataSummary) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, dataSummaryImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("DataSummary") + case "numberOfSignals": + out.Values[i] = ec._DataSummary_numberOfSignals(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "availableSignals": + out.Values[i] = ec._DataSummary_availableSignals(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "firstSeen": + out.Values[i] = ec._DataSummary_firstSeen(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "lastSeen": + out.Values[i] = ec._DataSummary_lastSeen(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "signalDataSummary": + out.Values[i] = ec._DataSummary_signalDataSummary(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "eventDataSummary": + out.Values[i] = ec._DataSummary_eventDataSummary(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var eventImplementors = []string{"Event"} + +func (ec *executionContext) _Event(ctx context.Context, sel ast.SelectionSet, obj *model.Event) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, eventImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Event") + case "timestamp": + out.Values[i] = ec._Event_timestamp(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "name": + out.Values[i] = ec._Event_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "source": + out.Values[i] = ec._Event_source(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "durationNs": + out.Values[i] = ec._Event_durationNs(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "metadata": + out.Values[i] = ec._Event_metadata(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var eventCountImplementors = []string{"EventCount"} -func (ec *executionContext) _DataSummary(ctx context.Context, sel ast.SelectionSet, obj *model.DataSummary) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, dataSummaryImplementors) +func (ec *executionContext) _EventCount(ctx context.Context, sel ast.SelectionSet, obj *model.EventCount) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, eventCountImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("DataSummary") - case "numberOfSignals": - out.Values[i] = ec._DataSummary_numberOfSignals(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "availableSignals": - out.Values[i] = ec._DataSummary_availableSignals(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "firstSeen": - out.Values[i] = ec._DataSummary_firstSeen(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "lastSeen": - out.Values[i] = ec._DataSummary_lastSeen(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "signalDataSummary": - out.Values[i] = ec._DataSummary_signalDataSummary(ctx, field, obj) + out.Values[i] = graphql.MarshalString("EventCount") + case "name": + out.Values[i] = ec._EventCount_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "eventDataSummary": - out.Values[i] = ec._DataSummary_eventDataSummary(ctx, field, obj) + case "count": + out.Values[i] = ec._EventCount_count(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -29073,39 +29630,37 @@ func (ec *executionContext) _DataSummary(ctx context.Context, sel ast.SelectionS return out } -var eventImplementors = []string{"Event"} +var eventDataSummaryImplementors = []string{"EventDataSummary"} -func (ec *executionContext) _Event(ctx context.Context, sel ast.SelectionSet, obj *model.Event) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, eventImplementors) +func (ec *executionContext) _EventDataSummary(ctx context.Context, sel ast.SelectionSet, obj *model.EventDataSummary) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, eventDataSummaryImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("Event") - case "timestamp": - out.Values[i] = ec._Event_timestamp(ctx, field, obj) + out.Values[i] = graphql.MarshalString("EventDataSummary") + case "name": + out.Values[i] = ec._EventDataSummary_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "name": - out.Values[i] = ec._Event_name(ctx, field, obj) + case "numberOfEvents": + out.Values[i] = ec._EventDataSummary_numberOfEvents(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "source": - out.Values[i] = ec._Event_source(ctx, field, obj) + case "firstSeen": + out.Values[i] = ec._EventDataSummary_firstSeen(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "durationNs": - out.Values[i] = ec._Event_durationNs(ctx, field, obj) + case "lastSeen": + out.Values[i] = ec._EventDataSummary_lastSeen(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "metadata": - out.Values[i] = ec._Event_metadata(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -29129,27 +29684,33 @@ func (ec *executionContext) _Event(ctx context.Context, sel ast.SelectionSet, ob return out } -var eventCountImplementors = []string{"EventCount"} +var latestSignalImplementors = []string{"LatestSignal"} -func (ec *executionContext) _EventCount(ctx context.Context, sel ast.SelectionSet, obj *model.EventCount) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, eventCountImplementors) +func (ec *executionContext) _LatestSignal(ctx context.Context, sel ast.SelectionSet, obj *model.LatestSignal) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, latestSignalImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("EventCount") + out.Values[i] = graphql.MarshalString("LatestSignal") case "name": - out.Values[i] = ec._EventCount_name(ctx, field, obj) + out.Values[i] = ec._LatestSignal_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "count": - out.Values[i] = ec._EventCount_count(ctx, field, obj) + case "timestamp": + out.Values[i] = ec._LatestSignal_timestamp(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } + case "valueNumber": + out.Values[i] = ec._LatestSignal_valueNumber(ctx, field, obj) + case "valueString": + out.Values[i] = ec._LatestSignal_valueString(ctx, field, obj) + case "valueLocation": + out.Values[i] = ec._LatestSignal_valueLocation(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -29297,6 +29858,25 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "signalsSnapshot": + field := field + + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_signalsSnapshot(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) case "dataSummary": field := field @@ -33728,24 +34308,34 @@ func (ec *executionContext) _SignalCollection(ctx context.Context, sel ast.Selec return out } -var signalFloatImplementors = []string{"SignalFloat"} +var signalDataSummaryImplementors = []string{"SignalDataSummary"} -func (ec *executionContext) _SignalFloat(ctx context.Context, sel ast.SelectionSet, obj *model.SignalFloat) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, signalFloatImplementors) +func (ec *executionContext) _SignalDataSummary(ctx context.Context, sel ast.SelectionSet, obj *model.SignalDataSummary) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, signalDataSummaryImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("SignalFloat") - case "timestamp": - out.Values[i] = ec._SignalFloat_timestamp(ctx, field, obj) + out.Values[i] = graphql.MarshalString("SignalDataSummary") + case "name": + out.Values[i] = ec._SignalDataSummary_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "value": - out.Values[i] = ec._SignalFloat_value(ctx, field, obj) + case "numberOfSignals": + out.Values[i] = ec._SignalDataSummary_numberOfSignals(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "firstSeen": + out.Values[i] = ec._SignalDataSummary_firstSeen(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "lastSeen": + out.Values[i] = ec._SignalDataSummary_lastSeen(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -33772,24 +34362,24 @@ func (ec *executionContext) _SignalFloat(ctx context.Context, sel ast.SelectionS return out } -var signalLocationImplementors = []string{"SignalLocation"} +var signalFloatImplementors = []string{"SignalFloat"} -func (ec *executionContext) _SignalLocation(ctx context.Context, sel ast.SelectionSet, obj *model.SignalLocation) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, signalLocationImplementors) +func (ec *executionContext) _SignalFloat(ctx context.Context, sel ast.SelectionSet, obj *model.SignalFloat) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, signalFloatImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("SignalLocation") + out.Values[i] = graphql.MarshalString("SignalFloat") case "timestamp": - out.Values[i] = ec._SignalLocation_timestamp(ctx, field, obj) + out.Values[i] = ec._SignalFloat_timestamp(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "value": - out.Values[i] = ec._SignalLocation_value(ctx, field, obj) + out.Values[i] = ec._SignalFloat_value(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -33816,24 +34406,24 @@ func (ec *executionContext) _SignalLocation(ctx context.Context, sel ast.Selecti return out } -var signalStringImplementors = []string{"SignalString"} +var signalLocationImplementors = []string{"SignalLocation"} -func (ec *executionContext) _SignalString(ctx context.Context, sel ast.SelectionSet, obj *model.SignalString) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, signalStringImplementors) +func (ec *executionContext) _SignalLocation(ctx context.Context, sel ast.SelectionSet, obj *model.SignalLocation) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, signalLocationImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("SignalString") + out.Values[i] = graphql.MarshalString("SignalLocation") case "timestamp": - out.Values[i] = ec._SignalString_timestamp(ctx, field, obj) + out.Values[i] = ec._SignalLocation_timestamp(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "value": - out.Values[i] = ec._SignalString_value(ctx, field, obj) + out.Values[i] = ec._SignalLocation_value(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -33860,35 +34450,24 @@ func (ec *executionContext) _SignalString(ctx context.Context, sel ast.Selection return out } -var vINVCImplementors = []string{"VINVC"} +var signalStringImplementors = []string{"SignalString"} -func (ec *executionContext) _VINVC(ctx context.Context, sel ast.SelectionSet, obj *model.Vinvc) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, vINVCImplementors) +func (ec *executionContext) _SignalString(ctx context.Context, sel ast.SelectionSet, obj *model.SignalString) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, signalStringImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("VINVC") - case "vehicleTokenId": - out.Values[i] = ec._VINVC_vehicleTokenId(ctx, field, obj) - case "vin": - out.Values[i] = ec._VINVC_vin(ctx, field, obj) - case "recordedBy": - out.Values[i] = ec._VINVC_recordedBy(ctx, field, obj) - case "recordedAt": - out.Values[i] = ec._VINVC_recordedAt(ctx, field, obj) - case "countryCode": - out.Values[i] = ec._VINVC_countryCode(ctx, field, obj) - case "vehicleContractAddress": - out.Values[i] = ec._VINVC_vehicleContractAddress(ctx, field, obj) - case "validFrom": - out.Values[i] = ec._VINVC_validFrom(ctx, field, obj) - case "validTo": - out.Values[i] = ec._VINVC_validTo(ctx, field, obj) - case "rawVC": - out.Values[i] = ec._VINVC_rawVC(ctx, field, obj) + out.Values[i] = graphql.MarshalString("SignalString") + case "timestamp": + out.Values[i] = ec._SignalString_timestamp(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "value": + out.Values[i] = ec._SignalString_value(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -33915,36 +34494,21 @@ func (ec *executionContext) _VINVC(ctx context.Context, sel ast.SelectionSet, ob return out } -var __DirectiveImplementors = []string{"__Directive"} +var signalsSnapshotResponseImplementors = []string{"SignalsSnapshotResponse"} -func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) +func (ec *executionContext) _SignalsSnapshotResponse(ctx context.Context, sel ast.SelectionSet, obj *model.SignalsSnapshotResponse) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, signalsSnapshotResponseImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("__Directive") - case "name": - out.Values[i] = ec.___Directive_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "description": - out.Values[i] = ec.___Directive_description(ctx, field, obj) - case "isRepeatable": - out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "locations": - out.Values[i] = ec.___Directive_locations(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "args": - out.Values[i] = ec.___Directive_args(ctx, field, obj) + out.Values[i] = graphql.MarshalString("SignalsSnapshotResponse") + case "lastSeen": + out.Values[i] = ec._SignalsSnapshotResponse_lastSeen(ctx, field, obj) + case "signals": + out.Values[i] = ec._SignalsSnapshotResponse_signals(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -33971,31 +34535,38 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return out } -var __EnumValueImplementors = []string{"__EnumValue"} +var vINVCImplementors = []string{"VINVC"} -func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) +func (ec *executionContext) _VINVC(ctx context.Context, sel ast.SelectionSet, obj *model.Vinvc) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, vINVCImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("__EnumValue") - case "name": - out.Values[i] = ec.___EnumValue_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "description": - out.Values[i] = ec.___EnumValue_description(ctx, field, obj) - case "isDeprecated": - out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) + out.Values[i] = graphql.MarshalString("VINVC") + case "vehicleTokenId": + out.Values[i] = ec._VINVC_vehicleTokenId(ctx, field, obj) + case "vin": + out.Values[i] = ec._VINVC_vin(ctx, field, obj) + case "recordedBy": + out.Values[i] = ec._VINVC_recordedBy(ctx, field, obj) + case "recordedAt": + out.Values[i] = ec._VINVC_recordedAt(ctx, field, obj) + case "countryCode": + out.Values[i] = ec._VINVC_countryCode(ctx, field, obj) + case "vehicleContractAddress": + out.Values[i] = ec._VINVC_vehicleContractAddress(ctx, field, obj) + case "validFrom": + out.Values[i] = ec._VINVC_validFrom(ctx, field, obj) + case "validTo": + out.Values[i] = ec._VINVC_validTo(ctx, field, obj) + case "rawVC": + out.Values[i] = ec._VINVC_rawVC(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "deprecationReason": - out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -34019,41 +34590,39 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return out } -var __FieldImplementors = []string{"__Field"} +var __DirectiveImplementors = []string{"__Directive"} -func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) +func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("__Field") + out.Values[i] = graphql.MarshalString("__Directive") case "name": - out.Values[i] = ec.___Field_name(ctx, field, obj) + out.Values[i] = ec.___Directive_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "description": - out.Values[i] = ec.___Field_description(ctx, field, obj) - case "args": - out.Values[i] = ec.___Field_args(ctx, field, obj) + out.Values[i] = ec.___Directive_description(ctx, field, obj) + case "isRepeatable": + out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "type": - out.Values[i] = ec.___Field_type(ctx, field, obj) + case "locations": + out.Values[i] = ec.___Directive_locations(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "isDeprecated": - out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) + case "args": + out.Values[i] = ec.___Directive_args(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "deprecationReason": - out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -34077,38 +34646,31 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return out } -var __InputValueImplementors = []string{"__InputValue"} +var __EnumValueImplementors = []string{"__EnumValue"} -func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) +func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("__InputValue") + out.Values[i] = graphql.MarshalString("__EnumValue") case "name": - out.Values[i] = ec.___InputValue_name(ctx, field, obj) + out.Values[i] = ec.___EnumValue_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "description": - out.Values[i] = ec.___InputValue_description(ctx, field, obj) - case "type": - out.Values[i] = ec.___InputValue_type(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "defaultValue": - out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) + out.Values[i] = ec.___EnumValue_description(ctx, field, obj) case "isDeprecated": - out.Values[i] = ec.___InputValue_isDeprecated(ctx, field, obj) + out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "deprecationReason": - out.Values[i] = ec.___InputValue_deprecationReason(ctx, field, obj) + out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -34132,38 +34694,41 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return out } -var __SchemaImplementors = []string{"__Schema"} +var __FieldImplementors = []string{"__Field"} -func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) +func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("__Schema") + out.Values[i] = graphql.MarshalString("__Field") + case "name": + out.Values[i] = ec.___Field_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } case "description": - out.Values[i] = ec.___Schema_description(ctx, field, obj) - case "types": - out.Values[i] = ec.___Schema_types(ctx, field, obj) + out.Values[i] = ec.___Field_description(ctx, field, obj) + case "args": + out.Values[i] = ec.___Field_args(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "queryType": - out.Values[i] = ec.___Schema_queryType(ctx, field, obj) + case "type": + out.Values[i] = ec.___Field_type(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "mutationType": - out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) - case "subscriptionType": - out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) - case "directives": - out.Values[i] = ec.___Schema_directives(ctx, field, obj) + case "isDeprecated": + out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } + case "deprecationReason": + out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -34187,42 +34752,38 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return out } -var __TypeImplementors = []string{"__Type"} +var __InputValueImplementors = []string{"__InputValue"} -func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) +func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("__Type") - case "kind": - out.Values[i] = ec.___Type_kind(ctx, field, obj) + out.Values[i] = graphql.MarshalString("__InputValue") + case "name": + out.Values[i] = ec.___InputValue_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "name": - out.Values[i] = ec.___Type_name(ctx, field, obj) case "description": - out.Values[i] = ec.___Type_description(ctx, field, obj) - case "specifiedByURL": - out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) - case "fields": - out.Values[i] = ec.___Type_fields(ctx, field, obj) - case "interfaces": - out.Values[i] = ec.___Type_interfaces(ctx, field, obj) - case "possibleTypes": - out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) - case "enumValues": - out.Values[i] = ec.___Type_enumValues(ctx, field, obj) - case "inputFields": - out.Values[i] = ec.___Type_inputFields(ctx, field, obj) - case "ofType": - out.Values[i] = ec.___Type_ofType(ctx, field, obj) - case "isOneOf": - out.Values[i] = ec.___Type_isOneOf(ctx, field, obj) + out.Values[i] = ec.___InputValue_description(ctx, field, obj) + case "type": + out.Values[i] = ec.___InputValue_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "defaultValue": + out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) + case "isDeprecated": + out.Values[i] = ec.___InputValue_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "deprecationReason": + out.Values[i] = ec.___InputValue_deprecationReason(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -34246,34 +34807,35 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return out } -var eventDataSummaryImplementors = []string{"eventDataSummary"} +var __SchemaImplementors = []string{"__Schema"} -func (ec *executionContext) _eventDataSummary(ctx context.Context, sel ast.SelectionSet, obj *model.EventDataSummary) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, eventDataSummaryImplementors) +func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("eventDataSummary") - case "name": - out.Values[i] = ec._eventDataSummary_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "numberOfEvents": - out.Values[i] = ec._eventDataSummary_numberOfEvents(ctx, field, obj) + out.Values[i] = graphql.MarshalString("__Schema") + case "description": + out.Values[i] = ec.___Schema_description(ctx, field, obj) + case "types": + out.Values[i] = ec.___Schema_types(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "firstSeen": - out.Values[i] = ec._eventDataSummary_firstSeen(ctx, field, obj) + case "queryType": + out.Values[i] = ec.___Schema_queryType(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "lastSeen": - out.Values[i] = ec._eventDataSummary_lastSeen(ctx, field, obj) + case "mutationType": + out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) + case "subscriptionType": + out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) + case "directives": + out.Values[i] = ec.___Schema_directives(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -34300,37 +34862,42 @@ func (ec *executionContext) _eventDataSummary(ctx context.Context, sel ast.Selec return out } -var signalDataSummaryImplementors = []string{"signalDataSummary"} +var __TypeImplementors = []string{"__Type"} -func (ec *executionContext) _signalDataSummary(ctx context.Context, sel ast.SelectionSet, obj *model.SignalDataSummary) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, signalDataSummaryImplementors) +func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("signalDataSummary") - case "name": - out.Values[i] = ec._signalDataSummary_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "numberOfSignals": - out.Values[i] = ec._signalDataSummary_numberOfSignals(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "firstSeen": - out.Values[i] = ec._signalDataSummary_firstSeen(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "lastSeen": - out.Values[i] = ec._signalDataSummary_lastSeen(ctx, field, obj) + out.Values[i] = graphql.MarshalString("__Type") + case "kind": + out.Values[i] = ec.___Type_kind(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } + case "name": + out.Values[i] = ec.___Type_name(ctx, field, obj) + case "description": + out.Values[i] = ec.___Type_description(ctx, field, obj) + case "specifiedByURL": + out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) + case "fields": + out.Values[i] = ec.___Type_fields(ctx, field, obj) + case "interfaces": + out.Values[i] = ec.___Type_interfaces(ctx, field, obj) + case "possibleTypes": + out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) + case "enumValues": + out.Values[i] = ec.___Type_enumValues(ctx, field, obj) + case "inputFields": + out.Values[i] = ec.___Type_inputFields(ctx, field, obj) + case "ofType": + out.Values[i] = ec.___Type_ofType(ctx, field, obj) + case "isOneOf": + out.Values[i] = ec.___Type_isOneOf(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -34462,6 +35029,32 @@ func (ec *executionContext) marshalNEventCount2ᚖgithubᚗcomᚋDIMOᚑNetwork return ec._EventCount(ctx, sel, v) } +func (ec *executionContext) marshalNEventDataSummary2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐEventDataSummaryᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.EventDataSummary) graphql.Marshaler { + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalNEventDataSummary2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐEventDataSummary(ctx, sel, v[i]) + }) + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNEventDataSummary2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐEventDataSummary(ctx context.Context, sel ast.SelectionSet, v *model.EventDataSummary) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._EventDataSummary(ctx, sel, v) +} + func (ec *executionContext) unmarshalNFilterLocation2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐFilterLocation(ctx context.Context, v any) (*model.FilterLocation, error) { res, err := ec.unmarshalInputFilterLocation(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) @@ -34509,6 +35102,32 @@ func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.Selecti return res } +func (ec *executionContext) marshalNLatestSignal2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐLatestSignalᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.LatestSignal) graphql.Marshaler { + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalNLatestSignal2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐLatestSignal(ctx, sel, v[i]) + }) + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNLatestSignal2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐLatestSignal(ctx context.Context, sel ast.SelectionSet, v *model.LatestSignal) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._LatestSignal(ctx, sel, v) +} + func (ec *executionContext) marshalNLocation2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐLocation(ctx context.Context, sel ast.SelectionSet, v *model.Location) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { @@ -34670,6 +35289,32 @@ func (ec *executionContext) marshalNSignalAggregations2ᚖgithubᚗcomᚋDIMOᚑ return ec._SignalAggregations(ctx, sel, v) } +func (ec *executionContext) marshalNSignalDataSummary2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalDataSummaryᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.SignalDataSummary) graphql.Marshaler { + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalNSignalDataSummary2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalDataSummary(ctx, sel, v[i]) + }) + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNSignalDataSummary2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalDataSummary(ctx context.Context, sel ast.SelectionSet, v *model.SignalDataSummary) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._SignalDataSummary(ctx, sel, v) +} + func (ec *executionContext) unmarshalNSignalFloatFilter2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalFloatFilter(ctx context.Context, v any) (*model.SignalFloatFilter, error) { res, err := ec.unmarshalInputSignalFloatFilter(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) @@ -34924,58 +35569,6 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a return res } -func (ec *executionContext) marshalNeventDataSummary2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐEventDataSummaryᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.EventDataSummary) graphql.Marshaler { - ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { - fc := graphql.GetFieldContext(ctx) - fc.Result = &v[i] - return ec.marshalNeventDataSummary2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐEventDataSummary(ctx, sel, v[i]) - }) - - for _, e := range ret { - if e == graphql.Null { - return graphql.Null - } - } - - return ret -} - -func (ec *executionContext) marshalNeventDataSummary2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐEventDataSummary(ctx context.Context, sel ast.SelectionSet, v *model.EventDataSummary) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._eventDataSummary(ctx, sel, v) -} - -func (ec *executionContext) marshalNsignalDataSummary2ᚕᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalDataSummaryᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.SignalDataSummary) graphql.Marshaler { - ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { - fc := graphql.GetFieldContext(ctx) - fc.Result = &v[i] - return ec.marshalNsignalDataSummary2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalDataSummary(ctx, sel, v[i]) - }) - - for _, e := range ret { - if e == graphql.Null { - return graphql.Null - } - } - - return ret -} - -func (ec *executionContext) marshalNsignalDataSummary2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalDataSummary(ctx context.Context, sel ast.SelectionSet, v *model.SignalDataSummary) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._signalDataSummary(ctx, sel, v) -} - func (ec *executionContext) unmarshalOAddress2ᚖgithubᚗcomᚋethereumᚋgoᚑethereumᚋcommonᚐAddress(ctx context.Context, v any) (*common.Address, error) { if v == nil { return nil, nil @@ -35361,6 +35954,13 @@ func (ec *executionContext) marshalOSignalString2ᚖgithubᚗcomᚋDIMOᚑNetwor return ec._SignalString(ctx, sel, v) } +func (ec *executionContext) marshalOSignalsSnapshotResponse2ᚖgithubᚗcomᚋDIMOᚑNetworkᚋtelemetryᚑapiᚋinternalᚋgraphᚋmodelᚐSignalsSnapshotResponse(ctx context.Context, sel ast.SelectionSet, v *model.SignalsSnapshotResponse) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._SignalsSnapshotResponse(ctx, sel, v) +} + func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v any) ([]string, error) { if v == nil { return nil, nil diff --git a/internal/graph/mcp_tools_gen.go b/internal/graph/mcp_tools_gen.go new file mode 100644 index 0000000..82cf7bd --- /dev/null +++ b/internal/graph/mcp_tools_gen.go @@ -0,0 +1,182 @@ +// Code generated by mcpgen. DO NOT EDIT. +package graph + +import ( + "github.com/DIMO-Network/server-garage/pkg/mcpserver" + "github.com/modelcontextprotocol/go-sdk/mcp" +) + +func boolPtr(b bool) *bool { return &b } + +var MCPTools = []mcpserver.ToolDefinition{ + { + Name: "telemetry_get_signals_time_series", + Description: "Get aggregated signal time series for a vehicle over a date range. Returns signal values bucketed by the specified interval (e.g. '1h', '15m'). Use with signal field names and aggregation functions.", + Args: []mcpserver.ArgDefinition{ + {Name: "tokenId", Type: "integer", Description: "tokenId (Int!, required)", Required: true, ItemsType: ""}, + {Name: "interval", Type: "string", Description: "Duration string for data aggregation buckets (e.g., \"5m\", \"1h\", \"2h45m\"). Valid units: ms, s, m, h. Common values: \"5m\" (5 minutes), \"1h\" (1 hour), \"6h\", \"24h\". Days are not a valid unit — use \"24h\" instead of \"1d\".", Required: true, ItemsType: ""}, + {Name: "from", Type: "string", Description: "from (Time!, required)", Required: true, ItemsType: ""}, + {Name: "to", Type: "string", Description: "to (Time!, required)", Required: true, ItemsType: ""}, + {Name: "filter", Type: "object", Description: "filter (SignalFilter, optional)", Required: false, ItemsType: ""}, + }, + Query: "query($tokenId: Int!, $interval: String!, $from: Time!, $to: Time!, $filter: SignalFilter) { signals(tokenId: $tokenId, interval: $interval, from: $from, to: $to, filter: $filter) { timestamp } }", + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + DestructiveHint: boolPtr(false), + OpenWorldHint: boolPtr(false), + IdempotentHint: true, + }, + }, + { + Name: "telemetry_get_latest_signals", + Description: "Get the most recent signal values for a vehicle by token ID. Returns the last-seen timestamp for the vehicle.", + Args: []mcpserver.ArgDefinition{ + {Name: "tokenId", Type: "integer", Description: "tokenId (Int!, required)", Required: true, ItemsType: ""}, + {Name: "filter", Type: "object", Description: "filter (SignalFilter, optional)", Required: false, ItemsType: ""}, + }, + Query: "query($tokenId: Int!, $filter: SignalFilter) { signalsLatest(tokenId: $tokenId, filter: $filter) { lastSeen } }", + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + DestructiveHint: boolPtr(false), + OpenWorldHint: boolPtr(false), + IdempotentHint: true, + }, + }, + { + Name: "telemetry_get_available_signals", + Description: "List queryable signal names that have stored data for a vehicle by token ID.", + Args: []mcpserver.ArgDefinition{ + {Name: "tokenId", Type: "integer", Description: "tokenId (Int!, required)", Required: true, ItemsType: ""}, + {Name: "filter", Type: "object", Description: "filter (SignalFilter, optional)", Required: false, ItemsType: ""}, + }, + Query: "query($tokenId: Int!, $filter: SignalFilter) { availableSignals(tokenId: $tokenId, filter: $filter) }", + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + DestructiveHint: boolPtr(false), + OpenWorldHint: boolPtr(false), + IdempotentHint: true, + }, + }, + { + Name: "telemetry_get_signals_snapshot", + Description: "Get a point-in-time snapshot of all available signals for a vehicle by token ID. Returns every signal the caller has permission to see.", + Args: []mcpserver.ArgDefinition{ + {Name: "tokenId", Type: "integer", Description: "tokenId (Int!, required)", Required: true, ItemsType: ""}, + {Name: "filter", Type: "object", Description: "filter (SignalFilter, optional)", Required: false, ItemsType: ""}, + }, + Query: "query($tokenId: Int!, $filter: SignalFilter) { signalsSnapshot(tokenId: $tokenId, filter: $filter) { lastSeen signals { name timestamp valueNumber valueString valueLocation { latitude longitude hdop } } } }", + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + DestructiveHint: boolPtr(false), + OpenWorldHint: boolPtr(false), + IdempotentHint: true, + }, + }, + { + Name: "telemetry_get_data_summary", + Description: "Get a summary of all data available for a vehicle by token ID. Returns total signal count, available signal names, first/last seen timestamps, and per-signal and per-event breakdowns.", + Args: []mcpserver.ArgDefinition{ + {Name: "tokenId", Type: "integer", Description: "tokenId (Int!, required)", Required: true, ItemsType: ""}, + {Name: "filter", Type: "object", Description: "filter (SignalFilter, optional)", Required: false, ItemsType: ""}, + }, + Query: "query($tokenId: Int!, $filter: SignalFilter) { dataSummary(tokenId: $tokenId, filter: $filter) { numberOfSignals availableSignals firstSeen lastSeen signalDataSummary { name numberOfSignals firstSeen lastSeen } eventDataSummary { name numberOfEvents firstSeen lastSeen } } }", + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + DestructiveHint: boolPtr(false), + OpenWorldHint: boolPtr(false), + IdempotentHint: true, + }, + }, + { + Name: "telemetry_get_attestations", + Description: "Get verifiable attestations for a vehicle. Returns attestation ID, timestamp, type, source address, signature, and tags. Supports filtering by source, data version, producer, time range, and tags.", + Args: []mcpserver.ArgDefinition{ + {Name: "tokenId", Type: "integer", Description: "tokenId (Int, optional)", Required: false, ItemsType: ""}, + {Name: "subject", Type: "string", Description: "subject (String, optional)", Required: false, ItemsType: ""}, + {Name: "filter", Type: "object", Description: "filter (AttestationFilter, optional)", Required: false, ItemsType: ""}, + }, + Query: "query($tokenId: Int, $subject: String, $filter: AttestationFilter) { attestations(tokenId: $tokenId, subject: $subject, filter: $filter) { id vehicleTokenId time type source dataVersion producer signature tags } }", + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + DestructiveHint: boolPtr(false), + OpenWorldHint: boolPtr(false), + IdempotentHint: true, + }, + }, + { + Name: "telemetry_get_events", + Description: "Get discrete events for a vehicle in a time range. Returns event name, source, timestamp, duration, and optional metadata.", + Args: []mcpserver.ArgDefinition{ + {Name: "tokenId", Type: "integer", Description: "tokenId (Int!, required)", Required: true, ItemsType: ""}, + {Name: "from", Type: "string", Description: "from (Time!, required)", Required: true, ItemsType: ""}, + {Name: "to", Type: "string", Description: "to (Time!, required)", Required: true, ItemsType: ""}, + {Name: "filter", Type: "object", Description: "filter (EventFilter, optional)", Required: false, ItemsType: ""}, + }, + Query: "query($tokenId: Int!, $from: Time!, $to: Time!, $filter: EventFilter) { events(tokenId: $tokenId, from: $from, to: $to, filter: $filter) { timestamp name source durationNs metadata } }", + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + DestructiveHint: boolPtr(false), + OpenWorldHint: boolPtr(false), + IdempotentHint: true, + }, + }, + { + Name: "telemetry_get_trip_segments", + Description: "Get vehicle trip/activity segments detected using a specified mechanism (frequencyAnalysis, ignitionDetection, changePointDetection, idling, refuel, recharge). Returns start/end locations, duration, and optional signal aggregates and event counts. Maximum date range: 31 days.", + Args: []mcpserver.ArgDefinition{ + {Name: "tokenId", Type: "integer", Description: "tokenId (Int!, required)", Required: true, ItemsType: ""}, + {Name: "from", Type: "string", Description: "from (Time!, required)", Required: true, ItemsType: ""}, + {Name: "to", Type: "string", Description: "to (Time!, required)", Required: true, ItemsType: ""}, + {Name: "mechanism", Type: "string", Description: "mechanism (DetectionMechanism!, required)", Required: true, ItemsType: "", EnumValues: []string{"ignitionDetection", "frequencyAnalysis", "changePointDetection", "idling", "refuel", "recharge"}}, + {Name: "config", Type: "object", Description: "config (SegmentConfig, optional)", Required: false, ItemsType: ""}, + {Name: "signalRequests", Type: "array", Description: "signalRequests ([SegmentSignalRequest!], optional)", Required: false, ItemsType: "object"}, + {Name: "eventRequests", Type: "array", Description: "eventRequests ([SegmentEventRequest!], optional)", Required: false, ItemsType: "object"}, + {Name: "limit", Type: "integer", Description: "Maximum number of segments to return. Default 100, max 200.", Required: false, ItemsType: ""}, + {Name: "after", Type: "string", Description: "Cursor for pagination: return only segments with startTime > after (exclusive).\nPass the startTime of the last segment from the previous page for the next page.", Required: false, ItemsType: ""}, + }, + Query: "query($tokenId: Int!, $from: Time!, $to: Time!, $mechanism: DetectionMechanism!, $config: SegmentConfig, $signalRequests: [SegmentSignalRequest!], $eventRequests: [SegmentEventRequest!], $limit: Int, $after: Time) { segments(tokenId: $tokenId, from: $from, to: $to, mechanism: $mechanism, config: $config, signalRequests: $signalRequests, eventRequests: $eventRequests, limit: $limit, after: $after) { start { timestamp value { latitude longitude } } end { timestamp value { latitude longitude } } duration isOngoing startedBeforeRange signals { name agg value } eventCounts { name count } } }", + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + DestructiveHint: boolPtr(false), + OpenWorldHint: boolPtr(false), + IdempotentHint: true, + }, + }, + { + Name: "telemetry_get_daily_activity", + Description: "Get per-day driving activity summaries for a vehicle. Returns segment count, total active duration, and signal aggregates per day. Maximum date range: 31 days.", + Args: []mcpserver.ArgDefinition{ + {Name: "tokenId", Type: "integer", Description: "tokenId (Int!, required)", Required: true, ItemsType: ""}, + {Name: "from", Type: "string", Description: "from (Time!, required)", Required: true, ItemsType: ""}, + {Name: "to", Type: "string", Description: "to (Time!, required)", Required: true, ItemsType: ""}, + {Name: "mechanism", Type: "string", Description: "mechanism (DetectionMechanism!, required)", Required: true, ItemsType: "", EnumValues: []string{"ignitionDetection", "frequencyAnalysis", "changePointDetection", "idling", "refuel", "recharge"}}, + {Name: "config", Type: "object", Description: "config (SegmentConfig, optional)", Required: false, ItemsType: ""}, + {Name: "signalRequests", Type: "array", Description: "signalRequests ([SegmentSignalRequest!], optional)", Required: false, ItemsType: "object"}, + {Name: "eventRequests", Type: "array", Description: "eventRequests ([SegmentEventRequest!], optional)", Required: false, ItemsType: "object"}, + {Name: "timezone", Type: "string", Description: "timezone (String, optional)", Required: false, ItemsType: ""}, + }, + Query: "query($tokenId: Int!, $from: Time!, $to: Time!, $mechanism: DetectionMechanism!, $config: SegmentConfig, $signalRequests: [SegmentSignalRequest!], $eventRequests: [SegmentEventRequest!], $timezone: String) { dailyActivity(tokenId: $tokenId, from: $from, to: $to, mechanism: $mechanism, config: $config, signalRequests: $signalRequests, eventRequests: $eventRequests, timezone: $timezone) { segmentCount duration signals { name agg value } eventCounts { name count } } }", + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + DestructiveHint: boolPtr(false), + OpenWorldHint: boolPtr(false), + IdempotentHint: true, + }, + }, + { + Name: "telemetry_get_vin_credential", + Description: "Get the latest VIN verifiable credential for a vehicle by token ID. Returns VIN, recording entity, timestamp, country code, and validity period.", + Args: []mcpserver.ArgDefinition{ + {Name: "tokenId", Type: "integer", Description: "tokenId (Int!, required)", Required: true, ItemsType: ""}, + }, + Query: "query($tokenId: Int!) { vinVCLatest(tokenId: $tokenId) { vehicleTokenId vin recordedBy recordedAt countryCode vehicleContractAddress validFrom validTo rawVC } }", + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + DestructiveHint: boolPtr(false), + OpenWorldHint: boolPtr(false), + IdempotentHint: true, + }, + }, +} + +var CondensedSchema = "scalar Address # A 20-byte Ethereum address, encoded as a checksummed hex string with 0x prefix.\nscalar Map\nscalar Time # A point in time, encoded per RFC-3339. Typically these will be in second precision, just like the blockchain, and in UTC.\nscalar Uint64 # A 64-bit unsigned integer.\n\n# ═══ SIGNAL FIELDS (117 total) ═══\n#\n# All signals below exist on every signal type. Calling convention per type:\n# SignalAggregations:\n# fieldName(agg: LocationAggregation!): Location\n# fieldName(agg: FloatAggregation!, filter: SignalFloatFilter): Float\n# fieldName(agg: LocationAggregation!, filter: SignalLocationFilter): Location\n# fieldName(agg: StringAggregation!): String\n# SignalCollection:\n# fieldName(): SignalLocation\n# fieldName(): SignalFloat\n# fieldName(): SignalString\n#\n# | Signal | Type | Unit | Description |\n# |--------|------|------|-------------|\n# ── CURRENT (privilege: VEHICLE_ALL_TIME_LOCATION) ──\n# | currentLocationApproximateCoordinates | Location | | Approximate location of the vehicle in WGS 84 coordinates (privilege: VEHICLE_APPROXIMATE_LOCATION VEHICLE_ALL_TIME_LOCATION) |\n# | currentLocationAltitude | Float | m | Current altitude relative to WGS 84 reference ellipsoid, as measured at the position of GNSS receiver antenna |\n# | currentLocationCoordinates | Location | | Current location of the vehicle in WGS 84 coordinates |\n# | currentLocationHeading | Float | degrees | Current heading relative to geographic north |\n# ── OTHER (privilege: VEHICLE_NON_LOCATION_DATA) ──\n# | angularVelocityYaw | Float | degrees/s | Vehicle rotation rate along Z (vertical) |\n# | connectivityCellularIsJammingDetected | Float | | Indicates whether cellular radio signal jamming or interference is detected that prevents normal communication |\n# | exteriorAirTemperature | Float | celsius | Air temperature outside the vehicle |\n# | isIgnitionOn | Float | | Vehicle ignition status |\n# | lowVoltageBatteryCurrentVoltage | Float | V | |\n# | speed | Float | km/h | |\n# ── BODY (privilege: VEHICLE_NON_LOCATION_DATA) ──\n# | bodyLightsIsAirbagWarningOn | Float | | Indicates whether the airbag/SRS warning telltale is active |\n# | bodyLockIsLocked | Float | | Indicates whether the vehicle is locked via the central locking system |\n# | bodyTrunkFrontIsOpen | Float | | Is item open or closed? True = Fully or partially open |\n# | bodyTrunkRearIsOpen | Float | | Is item open or closed? True = Fully or partially open |\n# ── CABIN (privilege: VEHICLE_NON_LOCATION_DATA) ──\n# | cabinDoorRow1DriverSideIsOpen | Float | | Is item open or closed? True = Fully or partially open |\n# | cabinDoorRow1DriverSideWindowIsOpen | Float | | Is item open or closed? True = Fully or partially open |\n# | cabinDoorRow1PassengerSideIsOpen | Float | | Is item open or closed? True = Fully or partially open |\n# | cabinDoorRow1PassengerSideWindowIsOpen | Float | | Is item open or closed? True = Fully or partially open |\n# | cabinDoorRow2DriverSideIsOpen | Float | | Is item open or closed? True = Fully or partially open |\n# | cabinDoorRow2DriverSideWindowIsOpen | Float | | Is item open or closed? True = Fully or partially open |\n# | cabinDoorRow2PassengerSideIsOpen | Float | | Is item open or closed? True = Fully or partially open |\n# | cabinDoorRow2PassengerSideWindowIsOpen | Float | | Is item open or closed? True = Fully or partially open |\n# | cabinSeatRow1DriverSideIsBelted | Float | | Is the belt engaged |\n# | cabinSeatRow1PassengerSideIsBelted | Float | | Is the belt engaged |\n# | cabinSeatRow2DriverSideIsBelted | Float | | Is the belt engaged |\n# | cabinSeatRow2MiddleIsBelted | Float | | Is the belt engaged |\n# | cabinSeatRow2PassengerSideIsBelted | Float | | Is the belt engaged |\n# | cabinSeatRow3DriverSideIsBelted | Float | | Is the belt engaged |\n# | cabinSeatRow3PassengerSideIsBelted | Float | | Is the belt engaged |\n# ── CHASSIS (privilege: VEHICLE_NON_LOCATION_DATA) ──\n# | chassisAxleRow1WheelLeftSpeed | Float | km/h | Rotational speed of a vehicle's wheel |\n# | chassisAxleRow1WheelLeftTirePressure | Float | kPa | |\n# | chassisAxleRow1WheelRightSpeed | Float | km/h | Rotational speed of a vehicle's wheel |\n# | chassisAxleRow1WheelRightTirePressure | Float | kPa | |\n# | chassisAxleRow2WheelLeftTirePressure | Float | kPa | |\n# | chassisAxleRow2WheelRightTirePressure | Float | kPa | |\n# | chassisAxleRow3Weight | Float | kg | Measured Load on axle row 3 |\n# | chassisAxleRow4Weight | Float | kg | Measured Load on axle row 3 |\n# | chassisAxleRow5Weight | Float | kg | Measured Load on axle row 3 |\n# | chassisBrakeABSIsWarningOn | Float | | Indicates whether the ABS warning telltale is active (any non-off state) |\n# | chassisBrakeCircuit1PressurePrimary | Float | kPa | Pneumatic pressure in the service brake circuit or reservoir |\n# | chassisBrakeCircuit2PressurePrimary | Float | kPa | Pneumatic pressure in the service brake circuit or reservoir |\n# | chassisBrakeIsPedalPressed | Float | | Indicates whether the brake pedal is pressed |\n# | chassisBrakePedalPosition | Float | percent | Brake pedal position as percent |\n# | chassisParkingBrakeIsEngaged | Float | | |\n# | chassisTireSystemIsWarningOn | Float | | Indicates whether the tire system warning telltale is active |\n# ── OBD (privilege: VEHICLE_NON_LOCATION_DATA) ──\n# | obdBarometricPressure | Float | kPa | PID 33 - Barometric pressure |\n# | obdCommandedEGR | Float | percent | PID 2C - Commanded exhaust gas recirculation (EGR) |\n# | obdCommandedEVAP | Float | percent | PID 2E - Commanded evaporative purge (EVAP) valve |\n# | obdDTCList | String | | List of currently active DTCs formatted according OBD II (SAE-J2012DA_201812) standard ([P|C|B|U]XXXXX ) |\n# | obdDistanceSinceDTCClear | Float | km | PID 31 - Distance traveled since codes cleared |\n# | obdDistanceWithMIL | Float | km | PID 21 - Distance traveled with MIL on |\n# | obdEngineLoad | Float | percent | PID 04 - Engine load in percent - 0 = no load, 100 = full load |\n# | obdEthanolPercent | Float | percent | PID 52 - Percentage of ethanol in the fuel |\n# | obdFuelPressure | Float | kPa | PID 0A - Fuel pressure |\n# | obdFuelRailPressure | Float | kPa | |\n# | obdFuelRate | Float | l/h | PID 5E - Engine fuel rate |\n# | obdFuelTypeName | String | | Fuel type names decoded from PID 51 |\n# | obdIntakeTemp | Float | celsius | PID 0F - Intake temperature |\n# | obdIsEngineBlocked | Float | | Engine block status, 0 = engine unblocked, 1 = engine blocked |\n# | obdIsPTOActive | Float | | PID 1E - Auxiliary input status (power take off) |\n# | obdIsPluggedIn | Float | | Aftermarket device plugged in status |\n# | obdLongTermFuelTrim1 | Float | percent | PID 07 - Long Term (learned) Fuel Trim - Bank 1 - negative percent leaner, positive percent richer |\n# | obdLongTermFuelTrim2 | Float | percent | PID 09 - Long Term (learned) Fuel Trim - Bank 2 - negative percent leaner, positive percent richer |\n# | obdMAP | Float | kPa | PID 0B - Intake manifold pressure |\n# | obdMaxMAF | Float | g/s | PID 50 - Maximum flow for mass air flow sensor |\n# | obdO2WRSensor1Voltage | Float | V | PID 2x (byte CD) - Voltage for wide range/band oxygen sensor |\n# | obdO2WRSensor2Voltage | Float | V | PID 2x (byte CD) - Voltage for wide range/band oxygen sensor |\n# | obdOilTemperature | Float | celsius | PID 5C - Engine oil temperature |\n# | obdRunTime | Float | s | PID 1F - Engine run time |\n# | obdShortTermFuelTrim1 | Float | percent | PID 06 - Short Term (immediate) Fuel Trim - Bank 1 - negative percent leaner, positive percent richer |\n# | obdStatusDTCCount | Float | | Number of Diagnostic Trouble Codes (DTC) |\n# | obdThrottlePosition | Float | percent | PID 11 - Throttle position - 0 = closed throttle, 100 = open throttle |\n# | obdWarmupsSinceDTCClear | Float | | PID 30 - Number of warm-ups since codes cleared |\n# ── POWERTRAIN (privilege: VEHICLE_NON_LOCATION_DATA) ──\n# | powertrainCombustionEngineDieselExhaustFluidCapacity | Float | l | Capacity in liters of the Diesel Exhaust Fluid Tank |\n# | powertrainCombustionEngineDieselExhaustFluidLevel | Float | percent | Level of the Diesel Exhaust Fluid tank as percent of capacity |\n# | powertrainCombustionEngineECT | Float | celsius | Engine coolant temperature |\n# | powertrainCombustionEngineEOP | Float | kPa | Engine oil pressure |\n# | powertrainCombustionEngineEOT | Float | celsius | Engine oil temperature |\n# | powertrainCombustionEngineEngineOilLevel | String | | |\n# | powertrainCombustionEngineEngineOilRelativeLevel | Float | percent | Engine oil level as a percentage |\n# | powertrainCombustionEngineMAF | Float | g/s | Grams of air drawn into engine per second |\n# | powertrainCombustionEngineSpeed | Float | rpm | Engine speed measured as rotations per minute |\n# | powertrainCombustionEngineTPS | Float | percent | Current throttle position |\n# | powertrainCombustionEngineTorque | Float | Nm | |\n# | powertrainCombustionEngineTorquePercent | Float | percent | Actual engine output torque as a percentage of reference engine torque (FMS / J1939 parameter SPN 513) |\n# | powertrainFuelSystemAbsoluteLevel | Float | l | Current available fuel in the fuel tank expressed in liters |\n# | powertrainFuelSystemAccumulatedConsumption | Float | l | Accumulated fuel consumption (totalized) reported by the vehicle (FMS SPN 250) |\n# | powertrainFuelSystemRelativeLevel | Float | percent | Level in fuel tank as percent of capacity |\n# | powertrainFuelSystemSupportedFuelTypes | String | | High level information of fuel types supported |\n# | powertrainRange | Float | km | Remaining range in kilometers using all energy sources available in the vehicle |\n# | powertrainTractionBatteryChargingAddedEnergy | Float | kWh | Amount of charge added to the high voltage battery during the current charging session, expressed in kilowatt-hours |\n# | powertrainTractionBatteryChargingChargeCurrentAC | Float | A | Current AC charging current (rms) at inlet |\n# | powertrainTractionBatteryChargingChargeLimit | Float | percent | Target charge limit (state of charge) for battery |\n# | powertrainTractionBatteryChargingChargeVoltageUnknownType | Float | V | Current charging voltage at inlet |\n# | powertrainTractionBatteryChargingIsCharging | Float | | True if charging is ongoing |\n# | powertrainTractionBatteryChargingIsChargingCableConnected | Float | | Indicates if a charging cable is physically connected to the vehicle or not |\n# | powertrainTractionBatteryChargingPower | Float | kW | Instantaneous charging power recorded during a charging event |\n# | powertrainTractionBatteryCurrentPower | Float | W | Current electrical energy flowing in/out of battery |\n# | powertrainTractionBatteryCurrentVoltage | Float | V | |\n# | powertrainTractionBatteryGrossCapacity | Float | kWh | |\n# | powertrainTractionBatteryRange | Float | km | Remaining range in kilometers using only battery |\n# | powertrainTractionBatteryStateOfChargeCurrent | Float | percent | Physical state of charge of the high voltage battery, relative to net capacity |\n# | powertrainTractionBatteryStateOfChargeCurrentEnergy | Float | kWh | Physical state of charge of high voltage battery expressed in kWh |\n# | powertrainTractionBatteryStateOfHealth | Float | percent | Calculated battery state of health at standard conditions |\n# | powertrainTractionBatteryTemperatureAverage | Float | celsius | Current average temperature of the battery cells |\n# | powertrainTransmissionActualGear | Float | | Actual transmission gear currently engaged |\n# | powertrainTransmissionActualGearRatio | Float | | |\n# | powertrainTransmissionCurrentGear | Float | | |\n# | powertrainTransmissionIsClutchSwitchOperated | Float | | Indicates if the Clutch switch is operated, so engine and transmission are partially or fully decoupled |\n# | powertrainTransmissionRetarderActualTorque | Float | percent | Actual retarder torque as a percentage (FMS / J1939 SPN 520) |\n# | powertrainTransmissionRetarderTorqueMode | String | | Active engine torque mode |\n# | powertrainTransmissionSelectedGear | Float | | |\n# | powertrainTransmissionTemperature | Float | celsius | The current gearbox temperature |\n# | powertrainTransmissionTravelledDistance | Float | km | Odometer reading, total distance travelled during the lifetime of the transmission |\n# | powertrainType | String | | Defines the powertrain type of the vehicle |\n# ── SERVICE (privilege: VEHICLE_NON_LOCATION_DATA) ──\n# | serviceDistanceToService | Float | km | Remaining distance to service (of any kind) |\n# | serviceTimeToService | Float | s | Remaining time to service (of any kind) |\n\ntype Query {\n signals(\n tokenId: Int!\n \"\"\"\n Duration string for data aggregation buckets (e.g., \"5m\", \"1h\", \"2h45m\"). Valid\n units: ms, s, m, h. Common values: \"5m\" (5 minutes), \"1h\" (1 hour), \"6h\", \"24h\".\n Days are not a valid unit — use \"24h\" instead of \"1d\".\n \"\"\"\n interval: String!\n from: Time!\n to: Time!\n filter: SignalFilter\n ): [SignalAggregations!]\n # Example - Hourly average speed over a time range:\n # query TimeSeries($tokenId:Int!,$from:Time!,$to:Time!) { signals(tokenId:$tokenId,interval:\"1h\",from:$from,to:$to) { timestamp speed(agg:AVG) } }\n\n signalsLatest(tokenId: Int!, filter: SignalFilter): SignalCollection\n # Example - Latest speed and battery charge:\n # query Latest($tokenId:Int!) { signalsLatest(tokenId:$tokenId) { lastSeen speed{timestamp value} powertrainTractionBatteryStateOfChargeCurrent{timestamp value} } }\n\n availableSignals(tokenId: Int!, filter: SignalFilter): [String!]\n # Example - List available signals with data summary:\n # query Available($tokenId:Int!) { availableSignals(tokenId:$tokenId) }\n\n \"Point-in-time snapshot of all accessible signals. Equivalent to availableSignals + signalsLatest in a single request.\"\n signalsSnapshot(tokenId: Int!, filter: SignalFilter): SignalsSnapshotResponse\n # Example - Full snapshot of all signals for a vehicle:\n # query Snapshot($tokenId:Int!) { signalsSnapshot(tokenId:$tokenId) { lastSeen signals { name timestamp valueNumber valueString valueLocation { latitude longitude hdop } } } }\n\n dataSummary(tokenId: Int!, filter: SignalFilter): DataSummary\n # Example - Data summary with signal count and time range:\n # query Summary($tokenId:Int!) { dataSummary(tokenId:$tokenId) { numberOfSignals availableSignals firstSeen lastSeen } }\n\n attestations(tokenId: Int, subject: String, filter: AttestationFilter): [Attestation]\n # Example - Attestations for a vehicle:\n # query Attestations($tokenId:Int!) { attestations(tokenId:$tokenId) { id time type source signature tags } }\n\n events(tokenId: Int!, from: Time!, to: Time!, filter: EventFilter): [Event!]\n # Example - Events in a time range:\n # query Events($tokenId:Int!,$from:Time!,$to:Time!) { events(tokenId:$tokenId,from:$from,to:$to) { timestamp name source durationNs metadata } }\n\n \"\"\"\n Returns vehicle usage segments detected using the specified mechanism. Maximum\n date range: 31 days.\n Detection mechanisms:\n - ignitionDetection: Uses 'isIgnitionOn' signal with configurable debouncing\n - frequencyAnalysis: Analyzes signal update frequency to detect activity periods\n - changePointDetection: CUSUM-based regime change detection\n - idling: Idling segments (engine rpm idle)\n - refuel: Refueling segments (fuel level increased)\n - recharge: Charging segments (battery SoC increased)\n Segment IDs are stable and consistent across queries as long as the segment\n start is captured in the underlying data source.\n Each segment includes summary: signals, start/end location, and (when requested)\n eventCounts. A default set of signal requests is always applied (e.g. speed,\n odometer; for refuel/recharge also the level signal at start and end). When\n signalRequests is provided, those requests are added on top of the default set;\n duplicates (same name and agg) are omitted.\n \"\"\"\n segments(\n tokenId: Int!\n from: Time!\n to: Time!\n mechanism: DetectionMechanism!\n config: SegmentConfig\n signalRequests: [SegmentSignalRequest!]\n eventRequests: [SegmentEventRequest!]\n \"Maximum number of segments to return. Default 100, max 200.\"\n limit: Int = 100\n after: Time\n ): [Segment!]!\n # Example - Trip segments with start/end locations and signal aggregates:\n # query Trips($tokenId:Int!,$from:Time!,$to:Time!) { segments(tokenId:$tokenId,from:$from,to:$to,mechanism:frequencyAnalysis) { start{timestamp value{latitude longitude}} end{timestamp value{latitude longitude}} duration isOngoing signals{name agg value} eventCounts{name count} } }\n\n \"\"\"\n Returns one record per calendar day in the date range. Mechanism must be\n ignitionDetection, frequencyAnalysis, or changePointDetection (idling, refuel,\n and recharge not allowed). Maximum date range: 31 days.\n \"\"\"\n dailyActivity(tokenId: Int!, from: Time!, to: Time!, mechanism: DetectionMechanism!, config: SegmentConfig, signalRequests: [SegmentSignalRequest!], eventRequests: [SegmentEventRequest!], timezone: String): [DailyActivity!]!\n # Example - Daily activity summaries:\n # query Daily($tokenId:Int!,$from:Time!,$to:Time!) { dailyActivity(tokenId:$tokenId,from:$from,to:$to,mechanism:frequencyAnalysis) { segmentCount duration signals{name agg value} eventCounts{name count} } }\n\n \"Required Privileges: [VEHICLE_VIN_CREDENTIAL]\"\n vinVCLatest(tokenId: Int!): VINVC\n # Example - VIN credential lookup:\n # query VIN($tokenId:Int!) { vinVCLatest(tokenId:$tokenId) { vin recordedBy recordedAt countryCode } }\n}\n\ntype Attestation { id: String!, vehicleTokenId: Int!, time: Time!, attestation: String!, type: String!, source: Address!, dataVersion: String!, producer: String, signature: String!, tags: [String!] }\n\ninput AttestationFilter {\n id: String\n \"The attesting party.\"\n source: Address\n dataVersion: String\n producer: String\n \"Before this timestamp.\"\n before: Time\n \"After this timestamp.\"\n after: Time\n \"Max results. Default 10.\"\n limit: Int\n \"Pagination cursor (exclusive).\"\n cursor: Time\n tags: StringArrayFilter\n}\n\ntype DailyActivity { start: SignalLocation, end: SignalLocation, segmentCount: Int!, duration: Int!, signals: [SignalAggregationValue!]!, eventCounts: [EventCount!]! }\n\ntype DataSummary { numberOfSignals: Uint64!, availableSignals: [String!]!, firstSeen: Time!, lastSeen: Time!, signalDataSummary: [SignalDataSummary!]!, eventDataSummary: [EventDataSummary!]! }\n\nenum DetectionMechanism {\n \"Ignition-based detection: Segments are identified by isIgnitionOn state transitions. Most reliable for vehicles with proper ignition signal support.\"\n ignitionDetection\n \"Frequency analysis: Segments are detected by analyzing signal update patterns. Uses pre-computed materialized view for optimal performance. Ideal for real-time APIs and bulk queries.\"\n frequencyAnalysis\n \"\"\"\n Change point detection: Uses CUSUM algorithm to detect statistical regime\n changes. Monitors cumulative deviation in signal frequency via materialized\n view. Excellent noise resistance with 100% accuracy match to ignition baseline.\n Best alternative when ignition signal is unavailable - same accuracy, same speed\n as frequency analysis.\n \"\"\"\n changePointDetection\n \"Idling: Segments are contiguous periods where engine RPM remains in idle range.\"\n idling\n \"Refuel: Detects where fuel level rises significantly.\"\n refuel\n \"Recharge: Hybrid detection. Uses charging signals and state of charge for detection.\"\n recharge\n}\n\ntype Event { timestamp: Time!, name: String!, source: String!, durationNs: Int!, metadata: String }\n\ntype EventCount { name: String!, count: Int! }\n\ntype EventDataSummary { name: String!, numberOfEvents: Uint64!, firstSeen: Time!, lastSeen: Time! }\n\ninput EventFilter {\n name: StringValueFilter\n \"Source connection that created the event.\"\n source: StringValueFilter\n tags: StringArrayFilter\n}\n\ninput FilterLocation {\n \"Latitude in the range [-90, 90].\"\n latitude: Float!\n \"Longitude in the range [-180, 180].\"\n longitude: Float!\n}\n\nenum FloatAggregation { AVG, MED, MAX, MIN, RAND, FIRST, LAST }\n\ninput InCircleFilter {\n center: FilterLocation!\n \"Radius in kilometers.\"\n radius: Float!\n}\n\ntype LatestSignal { name: String!, timestamp: Time!, valueNumber: Float, valueString: String, valueLocation: Location }\n\ntype Location { latitude: Float!, longitude: Float!, hdop: Float! }\n\nenum LocationAggregation { AVG, RAND, FIRST, LAST }\n\nenum Privilege { VEHICLE_NON_LOCATION_DATA, VEHICLE_COMMANDS, VEHICLE_CURRENT_LOCATION, VEHICLE_ALL_TIME_LOCATION, VEHICLE_VIN_CREDENTIAL, VEHICLE_APPROXIMATE_LOCATION, VEHICLE_RAW_DATA }\n\ntype Segment { start: SignalLocation!, end: SignalLocation, duration: Int!, isOngoing: Boolean!, startedBeforeRange: Boolean!, signals: [SignalAggregationValue!], eventCounts: [EventCount!] }\n\ninput SegmentConfig {\n \"\"\"\n Maximum gap (seconds) between data points before a segment is split. For\n ignitionDetection: filters noise from brief ignition OFF events. For\n frequencyAnalysis: maximum gap between active windows to merge. Default: 300 (5\n minutes), Min: 60, Max: 3600\n \"\"\"\n maxGapSeconds: Int = 300\n \"Minimum segment duration (seconds) to include in results. Filters very short segments (testing, engine cycling). Default: 240 (4 minutes), Min: 60, Max: 3600\"\n minSegmentDurationSeconds: Int = 240\n \"\"\"\n [frequencyAnalysis] Minimum signal count per window for activity detection.\n [idling] Minimum samples per window to consider it idle (same semantics). Higher\n values = more conservative. Lower values = more sensitive. Default: 10, Min: 1,\n Max: 3600\n \"\"\"\n signalCountThreshold: Int = 10\n \"[idling only] Upper bound for idle RPM. Windows with max(RPM) <= this are considered idle. Default: 1000, Min: 300, Max: 3000\"\n maxIdleRpm: Int = 1000\n \"[refuel and recharge only] Minimum percent increase within a window to consider it a level-increase window.\"\n minIncreasePercent: Int = 15\n}\n\ninput SegmentEventRequest { name: String! }\n\ninput SegmentSignalRequest { name: String!, agg: FloatAggregation! }\n\ntype SignalAggregationValue { name: String!, agg: String!, value: Float! }\n\ntype SignalAggregations {\n timestamp: Time!\n # + 117 signal fields (see SIGNAL FIELDS table above)\n}\n\ntype SignalCollection {\n lastSeen: Time\n # + 117 signal fields (see SIGNAL FIELDS table above)\n}\n\ntype SignalDataSummary { name: String!, numberOfSignals: Uint64!, firstSeen: Time!, lastSeen: Time! }\n\ninput SignalFilter {\n \"\"\"\n Filter by source ethr DID. Example:\n \"did:ethr:137:0xcd445F4c6bDAD32b68a2939b912150Fe3C88803E\"\n \"\"\"\n source: String\n}\n\ntype SignalFloat { timestamp: Time!, value: Float! }\n\ninput SignalFloatFilter { eq: Float, neq: Float, gt: Float, lt: Float, gte: Float, lte: Float, notIn: [Float!], in: [Float!], or: [SignalFloatFilter!] }\n\ntype SignalLocation { timestamp: Time!, value: Location! }\n\ninput SignalLocationFilter {\n \"Filter for locations within a polygon. The vertices should be ordered clockwise or counterclockwise, and there must be at least 3. May produce inaccurate results around the poles and the antimeridian.\"\n inPolygon: [FilterLocation!]\n \"Filter for locations within a given distance of a given point. Distances are computed using WGS 84, and points that are exactly a distance `radius` from the `center` will be included.\"\n inCircle: InCircleFilter\n}\n\ntype SignalString { timestamp: Time!, value: String! }\n\ntype SignalsSnapshotResponse { lastSeen: Time, signals: [LatestSignal!]! }\n\nenum StringAggregation {\n \"Randomly select a value from the group.\"\n RAND\n \"Select the most frequently occurring value in the group.\"\n TOP\n \"Return a list of unique values in the group.\"\n UNIQUE\n \"Return value in group associated with the minimum time value.\"\n FIRST\n \"Return value in group associated with the maximum time value.\"\n LAST\n}\n\ninput StringArrayFilter { containsAny: [String!], containsAll: [String!], notContainsAny: [String!], notContainsAll: [String!], or: [StringArrayFilter!] }\n\ninput StringValueFilter {\n eq: String\n neq: String\n notIn: [String!]\n in: [String!]\n \"Matches strings that begin with the given prefix.\"\n startsWith: String\n or: [StringValueFilter!]\n}\n\ntype VINVC { vehicleTokenId: Int, vin: String, recordedBy: String, recordedAt: Time, countryCode: String, vehicleContractAddress: String, validFrom: Time, validTo: Time, rawVC: String! }\n" diff --git a/internal/graph/model/models_gen.go b/internal/graph/model/models_gen.go index 12cc447..95f3795 100644 --- a/internal/graph/model/models_gen.go +++ b/internal/graph/model/models_gen.go @@ -106,6 +106,17 @@ type EventCount struct { Count int `json:"count"` } +type EventDataSummary struct { + // Event name + Name string `json:"name"` + // Number of times this event occurred for the vehicle + NumberOfEvents uint64 `json:"numberOfEvents"` + // First seen timestamp + FirstSeen time.Time `json:"firstSeen"` + // Last seen timestamp + LastSeen time.Time `json:"lastSeen"` +} + type EventFilter struct { // name is the name of the event. Name *StringValueFilter `json:"name,omitempty"` @@ -129,6 +140,20 @@ type InCircleFilter struct { Radius float64 `json:"radius"` } +// LatestSignal represents a single signal's most recent value. +type LatestSignal struct { + // Signal name (e.g., "speed", "currentLocationCoordinates") + Name string `json:"name"` + // Timestamp of the most recent reading + Timestamp time.Time `json:"timestamp"` + // Numeric value, present for float-type signals + ValueNumber *float64 `json:"valueNumber,omitempty"` + // String value, present for string-type signals + ValueString *string `json:"valueString,omitempty"` + // Location value, present for location-type signals + ValueLocation *Location `json:"valueLocation,omitempty"` +} + type Location struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` @@ -625,6 +650,17 @@ type SignalCollection struct { Speed *SignalFloat `json:"speed,omitempty"` } +type SignalDataSummary struct { + // signal name + Name string `json:"name"` + // number of this specific signal + NumberOfSignals uint64 `json:"numberOfSignals"` + // first seen timestamp + FirstSeen time.Time `json:"firstSeen"` + // last seen timestamp + LastSeen time.Time `json:"lastSeen"` +} + // SignalFilter holds the filter parameters for the signal querys. type SignalFilter struct { // Filter signals by source using an ethr DID. @@ -678,6 +714,14 @@ type SignalString struct { Value string `json:"value"` } +// Response for signalsSnapshot query. +type SignalsSnapshotResponse struct { + // The last time any signal was seen matching the filter. + LastSeen *time.Time `json:"lastSeen,omitempty"` + // List of all latest signal values the caller is authorized to see. + Signals []*LatestSignal `json:"signals"` +} + // Filters that apply to string arrays. type StringArrayFilter struct { // containsAny array of strings containing any of the strings in the array @@ -729,28 +773,6 @@ type Vinvc struct { RawVc string `json:"rawVC"` } -type EventDataSummary struct { - // Event name - Name string `json:"name"` - // Number of times this event occurred for the vehicle - NumberOfEvents uint64 `json:"numberOfEvents"` - // First seen timestamp - FirstSeen time.Time `json:"firstSeen"` - // Last seen timestamp - LastSeen time.Time `json:"lastSeen"` -} - -type SignalDataSummary struct { - // signal name - Name string `json:"name"` - // number of this specific signal - NumberOfSignals uint64 `json:"numberOfSignals"` - // first seen timestamp - FirstSeen time.Time `json:"firstSeen"` - // last seen timestamp - LastSeen time.Time `json:"lastSeen"` -} - type DetectionMechanism string const ( diff --git a/internal/graph/model/signalLatest.tmpl b/internal/graph/model/signalLatest.tmpl new file mode 100644 index 0000000..86fd774 --- /dev/null +++ b/internal/graph/model/signalLatest.tmpl @@ -0,0 +1,49 @@ +// Code generated by "model-garage" DO NOT EDIT. +package model + +import "github.com/DIMO-Network/model-garage/pkg/vss" + +// SignalToLatestSignal converts a vss.Signal to a LatestSignal based on the signal name. +// Returns nil if the signal name is not recognized. +func SignalToLatestSignal(signal *vss.Signal) *LatestSignal { + if signal == nil { + return nil + } + switch signal.Data.Name { +{{- range .Signals }} + case "{{ .JSONName }}": + {{- if eq .GQLType "Float" }} + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + {{- else if eq .GQLType "Location" }} + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueLocation: &Location{ + Latitude: signal.Data.ValueLocation.Latitude, + Longitude: signal.Data.ValueLocation.Longitude, + Hdop: signal.Data.ValueLocation.HDOP, + }, + } + {{- else }} + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueString: &signal.Data.ValueString, + } + {{- end }} +{{- end }} + } + return nil +} + +// SignalPrivileges maps signal JSON names to their required privilege names. +// These are the GraphQL enum values from the schema (e.g., "VEHICLE_NON_LOCATION_DATA"). +var SignalPrivileges = map[string][]string{ +{{- range .Signals }} + "{{ .JSONName }}": { {{- range $i, $p := .Privileges }}{{if $i}}, {{end}}"{{ $p }}"{{ end -}} }, +{{- end }} +} diff --git a/internal/graph/model/signalLatest_gen.go b/internal/graph/model/signalLatest_gen.go new file mode 100644 index 0000000..984edc5 --- /dev/null +++ b/internal/graph/model/signalLatest_gen.go @@ -0,0 +1,836 @@ +// Code generated by "model-garage" DO NOT EDIT. +package model + +import "github.com/DIMO-Network/model-garage/pkg/vss" + +// SignalToLatestSignal converts a vss.Signal to a LatestSignal based on the signal name. +// Returns nil if the signal name is not recognized. +func SignalToLatestSignal(signal *vss.Signal) *LatestSignal { + if signal == nil { + return nil + } + switch signal.Data.Name { + case "angularVelocityYaw": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "bodyLightsIsAirbagWarningOn": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "bodyLockIsLocked": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "bodyTrunkFrontIsOpen": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "bodyTrunkRearIsOpen": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinDoorRow1DriverSideIsOpen": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinDoorRow1DriverSideWindowIsOpen": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinDoorRow1PassengerSideIsOpen": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinDoorRow1PassengerSideWindowIsOpen": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinDoorRow2DriverSideIsOpen": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinDoorRow2DriverSideWindowIsOpen": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinDoorRow2PassengerSideIsOpen": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinDoorRow2PassengerSideWindowIsOpen": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinSeatRow1DriverSideIsBelted": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinSeatRow1PassengerSideIsBelted": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinSeatRow2DriverSideIsBelted": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinSeatRow2MiddleIsBelted": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinSeatRow2PassengerSideIsBelted": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinSeatRow3DriverSideIsBelted": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "cabinSeatRow3PassengerSideIsBelted": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisAxleRow1WheelLeftSpeed": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisAxleRow1WheelLeftTirePressure": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisAxleRow1WheelRightSpeed": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisAxleRow1WheelRightTirePressure": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisAxleRow2WheelLeftTirePressure": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisAxleRow2WheelRightTirePressure": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisAxleRow3Weight": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisAxleRow4Weight": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisAxleRow5Weight": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisBrakeABSIsWarningOn": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisBrakeCircuit1PressurePrimary": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisBrakeCircuit2PressurePrimary": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisBrakeIsPedalPressed": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisBrakePedalPosition": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisParkingBrakeIsEngaged": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "chassisTireSystemIsWarningOn": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "connectivityCellularIsJammingDetected": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "currentLocationAltitude": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "currentLocationCoordinates": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueLocation: &Location{ + Latitude: signal.Data.ValueLocation.Latitude, + Longitude: signal.Data.ValueLocation.Longitude, + Hdop: signal.Data.ValueLocation.HDOP, + }, + } + case "currentLocationHeading": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "exteriorAirTemperature": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "isIgnitionOn": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "lowVoltageBatteryCurrentVoltage": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdBarometricPressure": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdCommandedEGR": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdCommandedEVAP": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdDTCList": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueString: &signal.Data.ValueString, + } + case "obdDistanceSinceDTCClear": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdDistanceWithMIL": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdEngineLoad": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdEthanolPercent": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdFuelPressure": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdFuelRailPressure": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdFuelRate": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdFuelTypeName": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueString: &signal.Data.ValueString, + } + case "obdIntakeTemp": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdIsEngineBlocked": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdIsPTOActive": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdIsPluggedIn": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdLongTermFuelTrim1": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdLongTermFuelTrim2": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdMAP": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdMaxMAF": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdO2WRSensor1Voltage": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdO2WRSensor2Voltage": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdOilTemperature": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdRunTime": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdShortTermFuelTrim1": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdStatusDTCCount": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdThrottlePosition": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "obdWarmupsSinceDTCClear": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainCombustionEngineDieselExhaustFluidCapacity": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainCombustionEngineDieselExhaustFluidLevel": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainCombustionEngineECT": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainCombustionEngineEOP": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainCombustionEngineEOT": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainCombustionEngineEngineOilLevel": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueString: &signal.Data.ValueString, + } + case "powertrainCombustionEngineEngineOilRelativeLevel": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainCombustionEngineMAF": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainCombustionEngineSpeed": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainCombustionEngineTPS": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainCombustionEngineTorque": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainCombustionEngineTorquePercent": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainFuelSystemAbsoluteLevel": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainFuelSystemAccumulatedConsumption": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainFuelSystemRelativeLevel": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainFuelSystemSupportedFuelTypes": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueString: &signal.Data.ValueString, + } + case "powertrainRange": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryChargingAddedEnergy": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryChargingChargeCurrentAC": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryChargingChargeLimit": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryChargingChargeVoltageUnknownType": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryChargingIsCharging": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryChargingIsChargingCableConnected": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryChargingPower": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryCurrentPower": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryCurrentVoltage": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryGrossCapacity": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryRange": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryStateOfChargeCurrent": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryStateOfChargeCurrentEnergy": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryStateOfHealth": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTractionBatteryTemperatureAverage": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTransmissionActualGear": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTransmissionActualGearRatio": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTransmissionCurrentGear": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTransmissionIsClutchSwitchOperated": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTransmissionRetarderActualTorque": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTransmissionRetarderTorqueMode": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueString: &signal.Data.ValueString, + } + case "powertrainTransmissionSelectedGear": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTransmissionTemperature": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainTransmissionTravelledDistance": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "powertrainType": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueString: &signal.Data.ValueString, + } + case "serviceDistanceToService": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "serviceTimeToService": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + case "speed": + return &LatestSignal{ + Name: signal.Data.Name, + Timestamp: signal.Data.Timestamp, + ValueNumber: &signal.Data.ValueNumber, + } + } + return nil +} + +// SignalPrivileges maps signal JSON names to their required privilege names. +// These are the GraphQL enum values from the schema (e.g., "VEHICLE_NON_LOCATION_DATA"). +var SignalPrivileges = map[string][]string{ + "angularVelocityYaw": {"VEHICLE_NON_LOCATION_DATA"}, + "bodyLightsIsAirbagWarningOn": {"VEHICLE_NON_LOCATION_DATA"}, + "bodyLockIsLocked": {"VEHICLE_NON_LOCATION_DATA"}, + "bodyTrunkFrontIsOpen": {"VEHICLE_NON_LOCATION_DATA"}, + "bodyTrunkRearIsOpen": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinDoorRow1DriverSideIsOpen": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinDoorRow1DriverSideWindowIsOpen": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinDoorRow1PassengerSideIsOpen": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinDoorRow1PassengerSideWindowIsOpen": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinDoorRow2DriverSideIsOpen": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinDoorRow2DriverSideWindowIsOpen": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinDoorRow2PassengerSideIsOpen": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinDoorRow2PassengerSideWindowIsOpen": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinSeatRow1DriverSideIsBelted": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinSeatRow1PassengerSideIsBelted": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinSeatRow2DriverSideIsBelted": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinSeatRow2MiddleIsBelted": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinSeatRow2PassengerSideIsBelted": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinSeatRow3DriverSideIsBelted": {"VEHICLE_NON_LOCATION_DATA"}, + "cabinSeatRow3PassengerSideIsBelted": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisAxleRow1WheelLeftSpeed": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisAxleRow1WheelLeftTirePressure": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisAxleRow1WheelRightSpeed": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisAxleRow1WheelRightTirePressure": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisAxleRow2WheelLeftTirePressure": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisAxleRow2WheelRightTirePressure": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisAxleRow3Weight": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisAxleRow4Weight": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisAxleRow5Weight": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisBrakeABSIsWarningOn": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisBrakeCircuit1PressurePrimary": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisBrakeCircuit2PressurePrimary": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisBrakeIsPedalPressed": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisBrakePedalPosition": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisParkingBrakeIsEngaged": {"VEHICLE_NON_LOCATION_DATA"}, + "chassisTireSystemIsWarningOn": {"VEHICLE_NON_LOCATION_DATA"}, + "connectivityCellularIsJammingDetected": {"VEHICLE_NON_LOCATION_DATA"}, + "currentLocationAltitude": {"VEHICLE_ALL_TIME_LOCATION"}, + "currentLocationCoordinates": {"VEHICLE_ALL_TIME_LOCATION"}, + "currentLocationHeading": {"VEHICLE_ALL_TIME_LOCATION"}, + "exteriorAirTemperature": {"VEHICLE_NON_LOCATION_DATA"}, + "isIgnitionOn": {"VEHICLE_NON_LOCATION_DATA"}, + "lowVoltageBatteryCurrentVoltage": {"VEHICLE_NON_LOCATION_DATA"}, + "obdBarometricPressure": {"VEHICLE_NON_LOCATION_DATA"}, + "obdCommandedEGR": {"VEHICLE_NON_LOCATION_DATA"}, + "obdCommandedEVAP": {"VEHICLE_NON_LOCATION_DATA"}, + "obdDTCList": {"VEHICLE_NON_LOCATION_DATA"}, + "obdDistanceSinceDTCClear": {"VEHICLE_NON_LOCATION_DATA"}, + "obdDistanceWithMIL": {"VEHICLE_NON_LOCATION_DATA"}, + "obdEngineLoad": {"VEHICLE_NON_LOCATION_DATA"}, + "obdEthanolPercent": {"VEHICLE_NON_LOCATION_DATA"}, + "obdFuelPressure": {"VEHICLE_NON_LOCATION_DATA"}, + "obdFuelRailPressure": {"VEHICLE_NON_LOCATION_DATA"}, + "obdFuelRate": {"VEHICLE_NON_LOCATION_DATA"}, + "obdFuelTypeName": {"VEHICLE_NON_LOCATION_DATA"}, + "obdIntakeTemp": {"VEHICLE_NON_LOCATION_DATA"}, + "obdIsEngineBlocked": {"VEHICLE_NON_LOCATION_DATA"}, + "obdIsPTOActive": {"VEHICLE_NON_LOCATION_DATA"}, + "obdIsPluggedIn": {"VEHICLE_NON_LOCATION_DATA"}, + "obdLongTermFuelTrim1": {"VEHICLE_NON_LOCATION_DATA"}, + "obdLongTermFuelTrim2": {"VEHICLE_NON_LOCATION_DATA"}, + "obdMAP": {"VEHICLE_NON_LOCATION_DATA"}, + "obdMaxMAF": {"VEHICLE_NON_LOCATION_DATA"}, + "obdO2WRSensor1Voltage": {"VEHICLE_NON_LOCATION_DATA"}, + "obdO2WRSensor2Voltage": {"VEHICLE_NON_LOCATION_DATA"}, + "obdOilTemperature": {"VEHICLE_NON_LOCATION_DATA"}, + "obdRunTime": {"VEHICLE_NON_LOCATION_DATA"}, + "obdShortTermFuelTrim1": {"VEHICLE_NON_LOCATION_DATA"}, + "obdStatusDTCCount": {"VEHICLE_NON_LOCATION_DATA"}, + "obdThrottlePosition": {"VEHICLE_NON_LOCATION_DATA"}, + "obdWarmupsSinceDTCClear": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineDieselExhaustFluidCapacity": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineDieselExhaustFluidLevel": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineECT": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineEOP": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineEOT": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineEngineOilLevel": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineEngineOilRelativeLevel": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineMAF": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineSpeed": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineTPS": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineTorque": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainCombustionEngineTorquePercent": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainFuelSystemAbsoluteLevel": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainFuelSystemAccumulatedConsumption": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainFuelSystemRelativeLevel": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainFuelSystemSupportedFuelTypes": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainRange": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryChargingAddedEnergy": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryChargingChargeCurrentAC": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryChargingChargeLimit": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryChargingChargeVoltageUnknownType": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryChargingIsCharging": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryChargingIsChargingCableConnected": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryChargingPower": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryCurrentPower": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryCurrentVoltage": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryGrossCapacity": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryRange": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryStateOfChargeCurrent": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryStateOfChargeCurrentEnergy": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryStateOfHealth": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTractionBatteryTemperatureAverage": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTransmissionActualGear": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTransmissionActualGearRatio": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTransmissionCurrentGear": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTransmissionIsClutchSwitchOperated": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTransmissionRetarderActualTorque": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTransmissionRetarderTorqueMode": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTransmissionSelectedGear": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTransmissionTemperature": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainTransmissionTravelledDistance": {"VEHICLE_NON_LOCATION_DATA"}, + "powertrainType": {"VEHICLE_NON_LOCATION_DATA"}, + "serviceDistanceToService": {"VEHICLE_NON_LOCATION_DATA"}, + "serviceTimeToService": {"VEHICLE_NON_LOCATION_DATA"}, + "speed": {"VEHICLE_NON_LOCATION_DATA"}, +} diff --git a/internal/graph/privilege_filter.go b/internal/graph/privilege_filter.go new file mode 100644 index 0000000..e730278 --- /dev/null +++ b/internal/graph/privilege_filter.go @@ -0,0 +1,39 @@ +package graph + +import ( + "slices" + + "github.com/DIMO-Network/telemetry-api/internal/graph/model" + "github.com/DIMO-Network/token-exchange-api/pkg/tokenclaims" +) + +// privilegeEnumToPermission maps GraphQL Privilege enum values to tokenclaims permission strings. +var privilegeEnumToPermission = map[string]string{ + "VEHICLE_NON_LOCATION_DATA": tokenclaims.PermissionGetNonLocationHistory, + "VEHICLE_ALL_TIME_LOCATION": tokenclaims.PermissionGetLocationHistory, + "VEHICLE_APPROXIMATE_LOCATION": tokenclaims.PermissionGetApproximateLocation, +} + +// hasPrivilegesForSignal checks if the caller has all required privileges for a signal. +func hasPrivilegesForSignal(signalName string, permissions []string) bool { + required, ok := model.SignalPrivileges[signalName] + if !ok { + // Approximate location is a derived signal not in the generated map. + // Require at least one of approximate or all-time location privileges. + if signalName == model.ApproximateCoordinatesField { + return slices.Contains(permissions, tokenclaims.PermissionGetApproximateLocation) || + slices.Contains(permissions, tokenclaims.PermissionGetLocationHistory) + } + return false + } + for _, priv := range required { + perm, mapped := privilegeEnumToPermission[priv] + if !mapped { + return false + } + if !slices.Contains(permissions, perm) { + return false + } + } + return true +} diff --git a/internal/graph/resolver.go b/internal/graph/resolver.go index 9eecc88..a0d6781 100644 --- a/internal/graph/resolver.go +++ b/internal/graph/resolver.go @@ -1,5 +1,7 @@ package graph +//go:generate go run github.com/DIMO-Network/server-garage/cmd/mcpgen -schema ../../schema/ -prefix telemetry -out mcp_tools_gen.go -package graph + import ( "github.com/DIMO-Network/telemetry-api/internal/repositories" "github.com/DIMO-Network/telemetry-api/internal/repositories/attestation" diff --git a/internal/graph/segments.resolvers.go b/internal/graph/segments.resolvers.go index 95fcc3f..a15d37f 100644 --- a/internal/graph/segments.resolvers.go +++ b/internal/graph/segments.resolvers.go @@ -3,7 +3,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver // implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.87 +// Code generated by github.com/99designs/gqlgen version v0.17.89 import ( "context" diff --git a/internal/graph/signals-events_gen.resolvers.go b/internal/graph/signals-events_gen.resolvers.go index 9bd6b07..9a81386 100644 --- a/internal/graph/signals-events_gen.resolvers.go +++ b/internal/graph/signals-events_gen.resolvers.go @@ -3,7 +3,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver // implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.87 +// Code generated by github.com/99designs/gqlgen version v0.17.89 import ( "context" diff --git a/internal/graph/vc.resolvers.go b/internal/graph/vc.resolvers.go index b57f543..d3099ac 100644 --- a/internal/graph/vc.resolvers.go +++ b/internal/graph/vc.resolvers.go @@ -3,7 +3,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver // implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.87 +// Code generated by github.com/99designs/gqlgen version v0.17.89 import ( "context" diff --git a/internal/pricing/pricing.go b/internal/pricing/pricing.go index c07eb25..20387fd 100644 --- a/internal/pricing/pricing.go +++ b/internal/pricing/pricing.go @@ -25,6 +25,7 @@ func DefaultPricingConfig() *PricingConfig { BaseCosts: map[string]uint64{ "signals": 1, // Most expensive - time-series aggregations "signalsLatest": 1, // Medium - latest value lookups + "signalsSnapshot": 5, // Fetches all signals in one query "events": 3, // Medium - event log queries "availableSignals": 1, // Cheap - metadata query "vinVCLatest": 1, // Simple - credential lookup @@ -129,6 +130,16 @@ func (c *CostCalculator) calculateFieldCostBreakdown(ctx context.Context, field return c.calculateSignalsCost(ctx, field, variables) case "signalsLatest": return c.calculateSignalsLatestCost(field, variables) + case "signalsSnapshot": + baseCost, err := c.getBaseCost("signalsSnapshot") + if err != nil { + return nil, err + } + return &CostBreakdown{ + Name: field.Alias, + Cost: baseCost, + Description: "Flat cost for signalsSnapshot (fetches all signals)", + }, nil case "events": return c.calculateEventsCost(field, variables) default: diff --git a/internal/repositories/repositories.go b/internal/repositories/repositories.go index 471ea2c..b708f7a 100644 --- a/internal/repositories/repositories.go +++ b/internal/repositories/repositories.go @@ -29,6 +29,7 @@ type CHService interface { GetAggregatedSignals(ctx context.Context, subject string, aggArgs *model.AggregatedSignalArgs) ([]*ch.AggSignal, error) GetAggregatedSignalsForRanges(ctx context.Context, subject string, ranges []ch.TimeRange, globalFrom, globalTo time.Time, floatArgs []model.FloatSignalArgs, locationArgs []model.LocationSignalArgs) ([]*ch.AggSignalForRange, error) GetLatestSignals(ctx context.Context, subject string, latestArgs *model.LatestSignalsArgs) ([]*vss.Signal, error) + GetAllLatestSignals(ctx context.Context, subject string, filter *model.SignalFilter) ([]*vss.Signal, error) GetAvailableSignals(ctx context.Context, subject string, filter *model.SignalFilter) ([]string, error) GetSignalSummaries(ctx context.Context, subject string, filter *model.SignalFilter) ([]*model.SignalDataSummary, error) GetEvents(ctx context.Context, subject string, from, to time.Time, filter *model.EventFilter) ([]*vss.Event, error) @@ -170,6 +171,61 @@ func (r *Repository) GetAvailableSignals(ctx context.Context, tokenID uint32, fi return retSignals, nil } +// GetSignalSnapshot returns the latest value for every available signal for the given tokenID. +func (r *Repository) GetSignalSnapshot(ctx context.Context, tokenID uint32, filter *model.SignalFilter) (*model.SignalsSnapshotResponse, error) { + if tokenID < 1 { + return nil, errorhandler.NewBadRequestError(ctx, ValidationError("tokenID is not a positive integer")) + } + if err := validateFilter(filter); err != nil { + return nil, errorhandler.NewBadRequestError(ctx, err) + } + subject := r.toSubject(tokenID) + signals, err := r.chService.GetAllLatestSignals(ctx, subject, filter) + if err != nil { + return nil, handleDBError(ctx, err) + } + + resp := &model.SignalsSnapshotResponse{} + var rawLocationSignal *vss.Signal + for _, signal := range signals { + if signal.Data.Name == model.LastSeenField && !signal.Data.Timestamp.Equal(unixEpoch) { + resp.LastSeen = &signal.Data.Timestamp + continue + } + // Only include queryable signals. + if _, ok := r.queryableSignals[signal.Data.Name]; !ok { + continue + } + ls := model.SignalToLatestSignal(signal) + if ls == nil { + continue + } + resp.Signals = append(resp.Signals, ls) + if signal.Data.Name == vss.FieldCurrentLocationCoordinates { + rawLocationSignal = signal + } + } + + // Emit approximate location entry derived from raw coordinates. + if rawLocationSignal != nil { + loc := rawLocationSignal.Data.ValueLocation + approx := GetApproximateLoc(loc.Latitude, loc.Longitude) + if approx != nil { + resp.Signals = append(resp.Signals, &model.LatestSignal{ + Name: model.ApproximateCoordinatesField, + Timestamp: rawLocationSignal.Data.Timestamp, + ValueLocation: &model.Location{ + Latitude: approx.Lat, + Longitude: approx.Lng, + Hdop: loc.HDOP, + }, + }) + } + } + + return resp, nil +} + // GetDataSummary returns the signal and event metadata for the given tokenID and filter. func (r *Repository) GetDataSummary(ctx context.Context, tokenID uint32, filter *model.SignalFilter) (*model.DataSummary, error) { subject := r.toSubject(tokenID) diff --git a/internal/repositories/repositories_mocks_test.go b/internal/repositories/repositories_mocks_test.go index 4c415f4..4172cca 100644 --- a/internal/repositories/repositories_mocks_test.go +++ b/internal/repositories/repositories_mocks_test.go @@ -74,6 +74,21 @@ func (mr *MockCHServiceMockRecorder) GetAggregatedSignalsForRanges(ctx, subject, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAggregatedSignalsForRanges", reflect.TypeOf((*MockCHService)(nil).GetAggregatedSignalsForRanges), ctx, subject, ranges, globalFrom, globalTo, floatArgs, locationArgs) } +// GetAllLatestSignals mocks base method. +func (m *MockCHService) GetAllLatestSignals(ctx context.Context, subject string, filter *model.SignalFilter) ([]*vss.Signal, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllLatestSignals", ctx, subject, filter) + ret0, _ := ret[0].([]*vss.Signal) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAllLatestSignals indicates an expected call of GetAllLatestSignals. +func (mr *MockCHServiceMockRecorder) GetAllLatestSignals(ctx, subject, filter any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllLatestSignals", reflect.TypeOf((*MockCHService)(nil).GetAllLatestSignals), ctx, subject, filter) +} + // GetAvailableSignals mocks base method. func (m *MockCHService) GetAvailableSignals(ctx context.Context, subject string, filter *model.SignalFilter) ([]string, error) { m.ctrl.T.Helper() diff --git a/internal/service/ch/ch.go b/internal/service/ch/ch.go index 1bc5639..7c6151c 100644 --- a/internal/service/ch/ch.go +++ b/internal/service/ch/ch.go @@ -89,6 +89,19 @@ func (s *Service) GetLatestSignals(ctx context.Context, subject string, latestAr return signals, nil } +// GetAllLatestSignals returns the latest value for every signal stored for a subject. +func (s *Service) GetAllLatestSignals(ctx context.Context, subject string, filter *model.SignalFilter) ([]*vss.Signal, error) { + stmt, args := getAllLatestQuery(subject, filter) + lastSeenStmt, lastSeenArgs := getLastSeenQuery(subject, &model.SignalArgs{Filter: filter}) + stmt, args = unionAll([]string{stmt, lastSeenStmt}, [][]any{args, lastSeenArgs}) + + signals, err := s.getSignals(ctx, stmt, args) + if err != nil { + return nil, err + } + return signals, nil +} + // GetAggregatedSignals returns a slice of aggregated signals based on the provided arguments from the ClickHouse database. // The signals are sorted by timestamp in ascending order. // The timestamp on each signal is for the start of the interval. diff --git a/internal/service/ch/queries.go b/internal/service/ch/queries.go index 077e1b6..fd613d2 100644 --- a/internal/service/ch/queries.go +++ b/internal/service/ch/queries.go @@ -355,6 +355,37 @@ func getLatestQuery(subject string, latestArgs *model.LatestSignalsArgs) (string return newQuery(mods...) } +// getAllLatestQuery creates a query to get the latest signal value for ALL signal names. +// Unlike getLatestQuery, this does not filter by signal name. +/* +SELECT + name, + max(timestamp), + argMax(value_string, timestamp) as value_string, + argMax(value_number, timestamp) as value_number, + argMax(value_location, timestamp) as value_location +FROM + signal +WHERE + subject = '...' +GROUP BY + name +*/ +func getAllLatestQuery(subject string, filter *model.SignalFilter) (string, []any) { + mods := []qm.QueryMod{ + qm.Select(vss.NameCol), + qm.Select(latestTimestamp), + qm.Select(latestNumber), + qm.Select(latestString), + qm.Select(latestLocation), + qm.From(vss.TableName), + qm.Where(subjectWhere, subject), + qm.GroupBy(vss.NameCol), + } + mods = append(mods, getFilterMods(filter)...) + return newQuery(mods...) +} + // GetLastSeenQuery creates a query to get the last seen timestamp of any signal. // returns the query statement and the arguments list, /* diff --git a/schema/attestation.graphqls b/schema/attestation.graphqls index a2267e6..1d3b154 100644 --- a/schema/attestation.graphqls +++ b/schema/attestation.graphqls @@ -1,123 +1,41 @@ extend type Query { - """ - attestations returns all attestations for a given subject. - """ attestations( - """ - The token ID of the vehicle. - """ tokenId: Int - - """ - The subject of the attestation. - """ subject: String - - """ - Filter attestations by metadata fields. - """ filter: AttestationFilter ): [Attestation] + @mcpTool(name: "get_attestations", description: "Get verifiable attestations for a vehicle. Returns attestation ID, timestamp, type, source address, signature, and tags. Supports filtering by source, data version, producer, time range, and tags.", selection: "id vehicleTokenId time type source dataVersion producer signature tags") + @mcpExample(description: "Attestations for a vehicle", query: "query Attestations($tokenId:Int!) { attestations(tokenId:$tokenId) { id time type source signature tags } }") } type Attestation { - """ - id is the id of the attestation. - """ id: String! - - """ - vehicleTokenId is the token ID of the vehicle. - """ vehicleTokenId: Int! - - """ - time represents the time the attestation was made at. - """ time: Time! - - """ - attestation is the JSON-encoded attestation. - """ + """JSON-encoded attestation data.""" attestation: String! - - """ - type - """ type: String! - - """ - source is the address that created and signed the attestation - """ + """Address that signed the attestation.""" source: Address! - - """ - dataversion - """ dataVersion: String! - - """ - producer of the attestation data - """ producer: String - - """ - signature of the attestation data - """ signature: String! - - """ - tags tags associated with the attestation. - """ tags: [String!] } -""" -AttestationFilter holds the filter parameters for the attestation querys. -""" input AttestationFilter { - """ - id is the id of the attestation. - """ id: String - - """ - The attesting party. - """ + """The attesting party.""" source: Address - - """ - Filter attestations by data version. - """ dataVersion: String - - """ - Filter attestations by source type. - """ producer: String - - """ - Filter attestations made prior to this timestamp. - """ + """Before this timestamp.""" before: Time - - """ - Filter attestations made after this timestamp. - """ + """After this timestamp.""" after: Time - - """ - Limit attestations returned to this value. Defaults to 10. - """ + """Max results. Default 10.""" limit: Int - - """ - Cursor for pagination (exclusive). - """ + """Pagination cursor (exclusive).""" cursor: Time - - """ - Filter attestations by tags. - """ tags: StringArrayFilter } diff --git a/schema/base.graphqls b/schema/base.graphqls index 07da93a..c4bc667 100644 --- a/schema/base.graphqls +++ b/schema/base.graphqls @@ -1,5 +1,5 @@ """ -A point in time, encoded per RFC-3999. Typically these will be in second precision, +A point in time, encoded per RFC-3339. Typically these will be in second precision, just like the blockchain, and in UTC. """ scalar Time @@ -25,42 +25,41 @@ directive @hasAggregation on INPUT_FIELD_DEFINITION | FIELD_DEFINITION The root query type for the GraphQL schema. """ type Query { - """ - signals returns a collection of signals for a given token in a given time range. - """ signals( tokenId: Int! """ - interval is a time span that used for aggregatting the data with. - A duration string is a sequence of decimal numbers, each with optional fraction and a unit suffix, - such as "300ms" or "2h45m". Valid time units are "ms", "s", "m", "h" + Duration string for data aggregation buckets (e.g., "5m", "1h", "2h45m"). Valid units: ms, s, m, h. Common values: "5m" (5 minutes), "1h" (1 hour), "6h", "24h". Days are not a valid unit — use "24h" instead of "1d". """ interval: String! from: Time! to: Time! filter: SignalFilter ): [SignalAggregations!] @requiresVehicleToken - """ - SignalsLatest returns the latest signals for a given token. - """ + @mcpTool(name: "get_signals_time_series", description: "Get aggregated signal time series for a vehicle over a date range. Returns signal values bucketed by the specified interval (e.g. '1h', '15m'). Use with signal field names and aggregation functions.", selection: "timestamp") + @mcpExample(description: "Hourly average speed over a time range", query: "query TimeSeries($tokenId:Int!,$from:Time!,$to:Time!) { signals(tokenId:$tokenId,interval:\"1h\",from:$from,to:$to) { timestamp speed(agg:AVG) } }") signalsLatest(tokenId: Int!, filter: SignalFilter): SignalCollection @requiresVehicleToken - """ - availableSignals returns a list of queryable signal names that have stored data for a given tokenId. - """ + @mcpTool(name: "get_latest_signals", description: "Get the most recent signal values for a vehicle by token ID. Returns the last-seen timestamp for the vehicle.", selection: "lastSeen") + @mcpExample(description: "Latest speed and battery charge", query: "query Latest($tokenId:Int!) { signalsLatest(tokenId:$tokenId) { lastSeen speed{timestamp value} powertrainTractionBatteryStateOfChargeCurrent{timestamp value} } }") availableSignals(tokenId: Int!, filter: SignalFilter): [String!] @requiresVehicleToken + @mcpTool(name: "get_available_signals", description: "List queryable signal names that have stored data for a vehicle by token ID.", selection: "") + @mcpExample(description: "List available signals with data summary", query: "query Available($tokenId:Int!) { availableSignals(tokenId:$tokenId) }") """ - data summary of all signals for a given tokenId + Point-in-time snapshot of all accessible signals. Equivalent to availableSignals + signalsLatest in a single request. """ + signalsSnapshot(tokenId: Int!, filter: SignalFilter): SignalsSnapshotResponse + @requiresVehicleToken + @mcpTool(name: "get_signals_snapshot", description: "Get a point-in-time snapshot of all available signals for a vehicle by token ID. Returns every signal the caller has permission to see.", selection: "lastSeen signals { name timestamp valueNumber valueString valueLocation { latitude longitude hdop } }") + @mcpExample(description: "Full snapshot of all signals for a vehicle", query: "query Snapshot($tokenId:Int!) { signalsSnapshot(tokenId:$tokenId) { lastSeen signals { name timestamp valueNumber valueString valueLocation { latitude longitude hdop } } } }") + dataSummary(tokenId: Int!, filter: SignalFilter): DataSummary @requiresVehicleToken + @mcpTool(name: "get_data_summary", description: "Get a summary of all data available for a vehicle by token ID. Returns total signal count, available signal names, first/last seen timestamps, and per-signal and per-event breakdowns.", selection: "numberOfSignals availableSignals firstSeen lastSeen signalDataSummary { name numberOfSignals firstSeen lastSeen } eventDataSummary { name numberOfEvents firstSeen lastSeen }") + @mcpExample(description: "Data summary with signal count and time range", query: "query Summary($tokenId:Int!) { dataSummary(tokenId:$tokenId) { numberOfSignals availableSignals firstSeen lastSeen } }") } type SignalAggregations { - """ - Timestamp of the aggregated data. - """ timestamp: Time! """ Approximate location of the vehicle in WGS 84 coordinates. The aggregation is applied to @@ -78,9 +77,6 @@ type SignalAggregations { } type SignalCollection { - """ - The last time any signal was seen matching the filter. - """ lastSeen: Time """ Approximate location of the vehicle in WGS 84 coordinates. The raw value is replaced with @@ -95,70 +91,42 @@ type SignalCollection { @isSignal } +type LatestSignal { + name: String! + timestamp: Time! + """Present for float-type signals.""" + valueNumber: Float + """Present for string-type signals.""" + valueString: String + """Present for location-type signals.""" + valueLocation: Location +} + +type SignalsSnapshotResponse { + lastSeen: Time + signals: [LatestSignal!]! +} + type DataSummary { - """ - Total number of signals collected - """ numberOfSignals: Uint64! - """ - available signal names - """ availableSignals: [String!]! - """ - first seen timestamp - """ firstSeen: Time! - """ - last seen timestamp - """ lastSeen: Time! - - """ - data summary of an individual signal - """ - signalDataSummary: [signalDataSummary!]! - - """ - Events known to the vehicle: per-event name, count, and first/last seen. - """ - eventDataSummary: [eventDataSummary!]! + signalDataSummary: [SignalDataSummary!]! + eventDataSummary: [EventDataSummary!]! } -type eventDataSummary { - """ - Event name - """ +type EventDataSummary { name: String! - """ - Number of times this event occurred for the vehicle - """ numberOfEvents: Uint64! - """ - First seen timestamp - """ firstSeen: Time! - """ - Last seen timestamp - """ lastSeen: Time! } -type signalDataSummary { - """ - signal name - """ +type SignalDataSummary { name: String! - """ - number of this specific signal - """ numberOfSignals: Uint64! - """ - first seen timestamp - """ firstSeen: Time! - """ - last seen timestamp - """ lastSeen: Time! } @@ -202,47 +170,23 @@ enum StringAggregation { LAST } type SignalFloat { - """ - timestamp of when this data was collected - """ timestamp: Time! - - """ - value of the signal - """ value: Float! } type SignalString { - """ - timestamp of when this data was collected - """ timestamp: Time! - - """ - value of the signal - """ value: String! } type SignalLocation { - """ - timestamp of when this data was collected - """ timestamp: Time! - - """ - location (latitude, longitude, hdop) at this timestamp. - """ value: Location! } -""" -SignalFilter holds the filter parameters for the signal querys. -""" input SignalFilter { """ - Filter signals by source using an ethr DID. + Filter by source ethr DID. Example: "did:ethr:137:0xcd445F4c6bDAD32b68a2939b912150Fe3C88803E" """ source: String @@ -285,9 +229,6 @@ type EventCount { count: Int! } -""" -Filters that apply to locations. -""" input SignalLocationFilter { """ Filter for locations within a polygon. The vertices should be ordered @@ -305,79 +246,32 @@ input SignalLocationFilter { } input FilterLocation { - """ - Latitude in the range [-90, 90]. - """ + """Latitude in the range [-90, 90].""" latitude: Float! - """ - Longitude in the range [-180, 180]. - """ + """Longitude in the range [-180, 180].""" longitude: Float! } input InCircleFilter { - """ - Center of the filter circle. - """ center: FilterLocation! - """ - Radius of the circle around the center, in kilometers (km). - """ + """Radius in kilometers.""" radius: Float! } -""" -Filters that apply to strings. -""" input StringValueFilter { - """ - eq string equal to the string - """ eq: String - """ - neq string not equal to the string - """ neq: String - """ - notIn array of strings not in the array - """ notIn: [String!] - """ - in array of strings in the array - """ in: [String!] - """ - startsWith matches strings that begin with the given prefix. - """ + """Matches strings that begin with the given prefix.""" startsWith: String - """ - or array of string value filters - """ or: [StringValueFilter!] } -""" -Filters that apply to string arrays. -""" input StringArrayFilter { - """ - containsAny array of strings containing any of the strings in the array - """ containsAny: [String!] - """ - containsAll array of strings containing all of the strings in the array - """ containsAll: [String!] - """ - notContainsAny array of strings does not contain any of the strings in the array - """ notContainsAny: [String!] - """ - notContainsAll array of strings does not contain all of the strings in the array - """ notContainsAll: [String!] - """ - or array of string array filters - """ or: [StringArrayFilter!] } diff --git a/schema/events.graphqls b/schema/events.graphqls index f9b79fe..436b0e3 100644 --- a/schema/events.graphqls +++ b/schema/events.graphqls @@ -1,61 +1,30 @@ extend type Query { - """ - events returns a list of events for a given token in a given time range. - """ events( - """ - tokenId is the id of the token to get events for. - """ tokenId: Int! - """ - from is the start time of the event. - """ from: Time! - """ - to is the end time of the event. - """ to: Time! - """ - filter is the filter to apply to the events. - """ filter: EventFilter ): [Event!] @requiresVehicleToken @requiresAllOfPrivileges( privileges: [VEHICLE_NON_LOCATION_DATA, VEHICLE_ALL_TIME_LOCATION] ) + @mcpTool(name: "get_events", description: "Get discrete events for a vehicle in a time range. Returns event name, source, timestamp, duration, and optional metadata.", selection: "timestamp name source durationNs metadata") + @mcpExample(description: "Events in a time range", query: "query Events($tokenId:Int!,$from:Time!,$to:Time!) { events(tokenId:$tokenId,from:$from,to:$to) { timestamp name source durationNs metadata } }") } type Event { - """ - timestamp is the time the event occurred. - """ timestamp: Time! - """ - name is the name of the event. - """ name: String! - """ - source is the name of the source connection that created the event. - """ + """Source connection that created the event.""" source: String! - """ - durationNs is the duration of the event in nanoseconds. - """ + """Duration in nanoseconds.""" durationNs: Int! - """ - metadata is the metadata of the event. - """ metadata: String } input EventFilter { - """ - name is the name of the event. - """ name: StringValueFilter - """ - source is the name of the source connection that created the event. - """ + """Source connection that created the event.""" source: StringValueFilter } diff --git a/schema/mcp.graphqls b/schema/mcp.graphqls new file mode 100644 index 0000000..6dad621 --- /dev/null +++ b/schema/mcp.graphqls @@ -0,0 +1,3 @@ +directive @mcpTool(name: String!, description: String!, selection: String!, readOnly: Boolean = true) on FIELD_DEFINITION +directive @mcpExample(description: String!, query: String!) repeatable on FIELD_DEFINITION +directive @mcpHide on FIELD_DEFINITION diff --git a/schema/segments.graphqls b/schema/segments.graphqls index 46d9534..ce10f33 100644 --- a/schema/segments.graphqls +++ b/schema/segments.graphqls @@ -4,14 +4,14 @@ enum DetectionMechanism { Most reliable for vehicles with proper ignition signal support. """ ignitionDetection - + """ Frequency analysis: Segments are detected by analyzing signal update patterns. Uses pre-computed materialized view for optimal performance. Ideal for real-time APIs and bulk queries. """ frequencyAnalysis - + """ Change point detection: Uses CUSUM algorithm to detect statistical regime changes. Monitors cumulative deviation in signal frequency via materialized view. @@ -26,7 +26,7 @@ enum DetectionMechanism { idling """ - Refuel: Detects where fuel level rises significantly. + Refuel: Detects where fuel level rises significantly. """ refuel @@ -40,7 +40,7 @@ extend type Query { """ Returns vehicle usage segments detected using the specified mechanism. Maximum date range: 31 days. - + Detection mechanisms: - ignitionDetection: Uses 'isIgnitionOn' signal with configurable debouncing - frequencyAnalysis: Analyzes signal update frequency to detect activity periods @@ -48,10 +48,10 @@ extend type Query { - idling: Idling segments (engine rpm idle) - refuel: Refueling segments (fuel level increased) - recharge: Charging segments (battery SoC increased) - + Segment IDs are stable and consistent across queries as long as the segment start is captured in the underlying data source. - + Each segment includes summary: signals, start/end location, and (when requested) eventCounts. A default set of signal requests is always applied (e.g. speed, odometer; for refuel/recharge also the level signal at start and end). When signalRequests is provided, those requests are added on top of the default set; duplicates (same name and agg) are omitted. @@ -74,6 +74,8 @@ extend type Query { """ after: Time ): [Segment!]! @requiresVehicleToken @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION, VEHICLE_NON_LOCATION_DATA]) + @mcpTool(name: "get_trip_segments", description: "Get vehicle trip/activity segments detected using a specified mechanism (frequencyAnalysis, ignitionDetection, changePointDetection, idling, refuel, recharge). Returns start/end locations, duration, and optional signal aggregates and event counts. Maximum date range: 31 days.", selection: "start { timestamp value { latitude longitude } } end { timestamp value { latitude longitude } } duration isOngoing startedBeforeRange signals { name agg value } eventCounts { name count }") + @mcpExample(description: "Trip segments with start/end locations and signal aggregates", query: "query Trips($tokenId:Int!,$from:Time!,$to:Time!) { segments(tokenId:$tokenId,from:$from,to:$to,mechanism:frequencyAnalysis) { start{timestamp value{latitude longitude}} end{timestamp value{latitude longitude}} duration isOngoing signals{name agg value} eventCounts{name count} } }") """ Returns one record per calendar day in the date range. @@ -90,6 +92,8 @@ extend type Query { eventRequests: [SegmentEventRequest!] timezone: String ): [DailyActivity!]! @requiresVehicleToken @requiresAllOfPrivileges(privileges: [VEHICLE_ALL_TIME_LOCATION, VEHICLE_NON_LOCATION_DATA]) + @mcpTool(name: "get_daily_activity", description: "Get per-day driving activity summaries for a vehicle. Returns segment count, total active duration, and signal aggregates per day. Maximum date range: 31 days.", selection: "segmentCount duration signals { name agg value } eventCounts { name count }") + @mcpExample(description: "Daily activity summaries", query: "query Daily($tokenId:Int!,$from:Time!,$to:Time!) { dailyActivity(tokenId:$tokenId,from:$from,to:$to,mechanism:frequencyAnalysis) { segmentCount duration signals{name agg value} eventCounts{name count} } }") } input SegmentSignalRequest { @@ -102,17 +106,15 @@ input SegmentEventRequest { } type DailyActivity { - """Start of day (timestamp = day start, value = location). Same shape as Segment.start. Null if not available.""" + """Day start location. Null if unavailable.""" start: SignalLocation - """End of day (timestamp = day end, location). Same shape as Segment.end. Null if not available.""" + """Day end location. Null if unavailable.""" end: SignalLocation - """Number of activity segments that started or fell within that day.""" + """Activity segments that started or fell within this day.""" segmentCount: Int! - """Sum of segment durations (total active time that day) in seconds.""" + """Total active time in seconds.""" duration: Int! - """Per-day signal aggregates (same shape as segment signals).""" signals: [SignalAggregationValue!]! - """Per-day event counts.""" eventCounts: [EventCount!]! } @@ -124,14 +126,14 @@ input SegmentConfig { Default: 300 (5 minutes), Min: 60, Max: 3600 """ maxGapSeconds: Int = 300 - + """ Minimum segment duration (seconds) to include in results. Filters very short segments (testing, engine cycling). Default: 240 (4 minutes), Min: 60, Max: 3600 """ minSegmentDurationSeconds: Int = 240 - + """ [frequencyAnalysis] Minimum signal count per window for activity detection. [idling] Minimum samples per window to consider it idle (same semantics). @@ -153,39 +155,14 @@ input SegmentConfig { } type Segment { - """ - Segment start (timestamp and location). Uses SignalLocation; always present. - """ start: SignalLocation! - - """ - Segment end (timestamp and location). Uses SignalLocation; omitted when isOngoing is true. - """ + """Omitted when isOngoing is true.""" end: SignalLocation - - """ - Duration in seconds. If ongoing: from start to query 'to'. If complete: from start to end. - """ + """In seconds. If ongoing: computed from start to query 'to'.""" duration: Int! - - """ - True if segment extends beyond query time range (last activity is ongoing). - When true, end is not included in the response. - """ + """When true, end is omitted.""" isOngoing: Boolean! - - """ - True if segment started before query time range. - """ startedBeforeRange: Boolean! - - """ - Per-segment signal aggregates. Same shape as signals elsewhere (name, agg, value). - """ signals: [SignalAggregationValue!] - """ - Per-segment event counts. - """ eventCounts: [EventCount!] } - diff --git a/schema/vc.graphqls b/schema/vc.graphqls index f980bc4..cf5d1b9 100644 --- a/schema/vc.graphqls +++ b/schema/vc.graphqls @@ -1,64 +1,29 @@ extend type Query { """ - vinVCLatest returns the latest VINVC data for a given token. - Required Privileges: [VEHICLE_VIN_CREDENTIAL] """ vinVCLatest( - """ - The token ID of the vehicle. - """ tokenId: Int! ): VINVC @requiresVehicleToken @requiresAllOfPrivileges(privileges: [VEHICLE_VIN_CREDENTIAL]) + @mcpTool(name: "get_vin_credential", description: "Get the latest VIN verifiable credential for a vehicle by token ID. Returns VIN, recording entity, timestamp, country code, and validity period.", selection: "vehicleTokenId vin recordedBy recordedAt countryCode vehicleContractAddress validFrom validTo rawVC") + @mcpExample(description: "VIN credential lookup", query: "query VIN($tokenId:Int!) { vinVCLatest(tokenId:$tokenId) { vin recordedBy recordedAt countryCode } }") } type VINVC { - """ - vehicleTokenId is the token ID of the vehicle. - """ vehicleTokenId: Int - - """ - vin is the vehicle identification number. - """ vin: String - - """ - recordedBy is the entity that recorded the VIN. - """ + """Entity that recorded the VIN.""" recordedBy: String - - """ - The time the VIN was recorded. - """ recordedAt: Time - - """ - countryCode is the country code that the VIN belongs to. - """ countryCode: String - - """ - vehicleContractAddress is the address of the vehicle contract. - """ vehicleContractAddress: String - - """ - validFrom is the time the VC is valid from. - """ + """VC validity start.""" validFrom: Time - - """ - validTo is the time the VC is valid to. - """ + """VC validity end.""" validTo: Time - - """ - rawVC is the raw VC JSON. - """ + """Raw VC JSON.""" rawVC: String! } - From 918c74378f700a7195a080f08d46ca293ebb5b8b Mon Sep 17 00:00:00 2001 From: zer0stars <74260741+zer0stars@users.noreply.github.com> Date: Fri, 3 Apr 2026 09:54:30 -0400 Subject: [PATCH 2/3] Upgrade external-secrets apiVersion to v1 --- charts/telemetry-api/templates/secret.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/telemetry-api/templates/secret.yaml b/charts/telemetry-api/templates/secret.yaml index 29aec9e..071a772 100644 --- a/charts/telemetry-api/templates/secret.yaml +++ b/charts/telemetry-api/templates/secret.yaml @@ -1,4 +1,4 @@ -apiVersion: external-secrets.io/v1beta1 +apiVersion: external-secrets.io/v1 kind: ExternalSecret metadata: name: {{ include "telemetry-api.fullname" . }}-secret From 7c4105583bdfdef0774b9092d55fb24e46c598e4 Mon Sep 17 00:00:00 2001 From: zer0stars <74260741+zer0stars@users.noreply.github.com> Date: Fri, 3 Apr 2026 09:54:37 -0400 Subject: [PATCH 3/3] Revert "Upgrade external-secrets apiVersion to v1" This reverts commit 918c74378f700a7195a080f08d46ca293ebb5b8b. --- charts/telemetry-api/templates/secret.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/telemetry-api/templates/secret.yaml b/charts/telemetry-api/templates/secret.yaml index 071a772..29aec9e 100644 --- a/charts/telemetry-api/templates/secret.yaml +++ b/charts/telemetry-api/templates/secret.yaml @@ -1,4 +1,4 @@ -apiVersion: external-secrets.io/v1 +apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: {{ include "telemetry-api.fullname" . }}-secret