From 8cece074b6087eae9b5dd94f085c32f8d7260582 Mon Sep 17 00:00:00 2001 From: Brian Holmes Date: Wed, 7 Jan 2026 15:23:40 -0500 Subject: [PATCH] feat: connect rpc poc --- Makefile | 1 + package-lock.json | 510 +++--- proto/buf.gen.runtime.yaml | 20 + .../v1/runtimev1connect/api.connect.go | 1499 +++++++++++++++++ .../v1/runtimev1connect/connectors.connect.go | 307 ++++ .../v1/runtimev1connect/queries.connect.go | 1170 +++++++++++++ web-admin/src/features/projects/selectors.ts | 41 + web-admin/src/routes/+layout.svelte | 80 +- .../explore/[dashboard]/+page.svelte | 7 +- web-common/package.json | 2 + .../dashboards/leaderboard/Leaderboard.svelte | 72 +- .../leaderboard/leaderboard-utils.ts | 5 +- .../StateManagersProvider.svelte | 6 +- .../state-managers/state-managers.ts | 8 + .../time-series/multiple-dimension-queries.ts | 5 +- .../time-series/timeseries-data-store.ts | 112 +- .../features/project/ProjectProvider.svelte | 29 + .../src/features/project/project-manager.ts | 65 + .../proto/gen/rill/runtime/v1/api_connect.ts | 511 ++++++ .../gen/rill/runtime/v1/connectors_connect.ts | 94 ++ .../gen/rill/runtime/v1/queries_connect.ts | 405 +++++ web-common/src/runtime-client/connectrpc.ts | 167 ++ web-local/src/routes/+layout.svelte | 29 +- 23 files changed, 4848 insertions(+), 297 deletions(-) create mode 100644 proto/buf.gen.runtime.yaml create mode 100644 proto/gen/rill/runtime/v1/runtimev1connect/api.connect.go create mode 100644 proto/gen/rill/runtime/v1/runtimev1connect/connectors.connect.go create mode 100644 proto/gen/rill/runtime/v1/runtimev1connect/queries.connect.go create mode 100644 web-common/src/features/project/ProjectProvider.svelte create mode 100644 web-common/src/features/project/project-manager.ts create mode 100644 web-common/src/proto/gen/rill/runtime/v1/api_connect.ts create mode 100644 web-common/src/proto/gen/rill/runtime/v1/connectors_connect.ts create mode 100644 web-common/src/proto/gen/rill/runtime/v1/queries_connect.ts create mode 100644 web-common/src/runtime-client/connectrpc.ts diff --git a/Makefile b/Makefile index d268f0d5e34..08b7a685cd8 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,7 @@ proto.generate: cd proto && buf generate --template buf.gen.openapi-admin.yaml --path rill/admin cd proto && buf generate --template buf.gen.openapi-runtime.yaml --path rill/runtime cd proto && buf generate --template buf.gen.local.yaml --path rill/local + cd proto && buf generate --template buf.gen.runtime.yaml --path rill/runtime cd proto && buf generate --template buf.gen.ui.yaml go run -ldflags="-X main.Version=$(shell git describe --tags $(shell git rev-list --tags --max-count=1))" \ scripts/convert-openapi-v2-to-v3/convert.go --force \ diff --git a/package-lock.json b/package-lock.json index cde5e9ed476..90c6ac9c071 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,6 +63,7 @@ "integrity": "sha512-HbjwKeC+pHUFBfLMNzuSjqFE/58+rLVKmOU3lxQrpsxLBOGosYco/Q0GduBb0/jEMRiyEqjNT/01rRdOMWq5pw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@docusaurus/babel": "3.9.2", "@docusaurus/bundler": "3.9.2", @@ -130,6 +131,7 @@ "version": "3.1.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/mdx": "^2.0.0" }, @@ -269,6 +271,7 @@ "version": "1.88.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", @@ -495,6 +498,7 @@ "integrity": "sha512-G9I2atg1ShtFp0t7zwleP6aPS4DcZvsV4uoQOripp16aR6VJzbEnKFPLW4OFXzX7avgZSpYeBAS+Zx4FOgmpPw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@algolia/client-common": "5.41.0", "@algolia/requester-browser-xhr": "5.41.0", @@ -710,6 +714,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -837,6 +842,7 @@ "integrity": "sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", @@ -2758,12 +2764,157 @@ "dev": true, "license": "MIT" }, + "node_modules/@bufbuild/buf": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.63.0.tgz", + "integrity": "sha512-SvYWiCs9J8tX8qIh1haNJEwM0MmyauSFDDksHL4wtPjeXcEj+SMvWudIn8KdWoiFbNDY98phn4sqZQ4F6uViPQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "bin": { + "buf": "bin/buf", + "protoc-gen-buf-breaking": "bin/protoc-gen-buf-breaking", + "protoc-gen-buf-lint": "bin/protoc-gen-buf-lint" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@bufbuild/buf-darwin-arm64": "1.63.0", + "@bufbuild/buf-darwin-x64": "1.63.0", + "@bufbuild/buf-linux-aarch64": "1.63.0", + "@bufbuild/buf-linux-armv7": "1.63.0", + "@bufbuild/buf-linux-x64": "1.63.0", + "@bufbuild/buf-win32-arm64": "1.63.0", + "@bufbuild/buf-win32-x64": "1.63.0" + } + }, + "node_modules/@bufbuild/buf-darwin-arm64": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.63.0.tgz", + "integrity": "sha512-Jpbz2mnNO+23E3TmDgLdbYuF+ozqsKu/ASvD37RjDgp9HtqQT+ciJMYOzqd/HdrGiM9tWYN1vhjl/gP/Y23lIw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-darwin-x64": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.63.0.tgz", + "integrity": "sha512-HkVMm2cOBnTtT+AZFAQAUyrwcXtnvaBtVCW0ltBi5PzLp6CNgmkH97OAROKWiNPWrXJh5thdhdZBNjGPyTfX3w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-aarch64": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.63.0.tgz", + "integrity": "sha512-vFeFKzC+PZSngct0bP3ASGCus7qhBPFxSfz6Hi+3a2zAajn857iJC3iPiX0tRlRIUTOHuj5NmOYxg9dhev0vDw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-armv7": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-armv7/-/buf-linux-armv7-1.63.0.tgz", + "integrity": "sha512-XbrRiOfeY3d/GmR+WNnkcDo480V+cz/ecfj/Ay/JO/ZLe7quEQqHmJ6dMcIQN8QNFPZBKv0IVyhhljh8+0/gkA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-x64": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.63.0.tgz", + "integrity": "sha512-78TsMWxQ7Rn4FJPN4QZZDM3NTS1U5ZCcwLYJmwOLJbHyfYnFiC1e91yL6sVfYrWXF1Pt9xJZU50yhmJZ+9AtmA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-win32-arm64": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.63.0.tgz", + "integrity": "sha512-sMZ63kK+MuxZVBFAh95Woly9QmeApohgQoWvO9ZppTzNXya7Kznz5lqa0B7f3zfDxgy2/DmOXILOMn3n8GoAww==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-win32-x64": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.63.0.tgz", + "integrity": "sha512-ooY4o3XPpvJ6BEOWB18pc52beeB9NdRRHMINuZ1oef3HNsFqtbv7DrPX9vm/mmOkzbTQDa8m7M8bjWjBO9ynkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@bufbuild/protobuf": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.10.1.tgz", "integrity": "sha512-wJ8ReQbHxsAfXhrf9ixl0aYbZorRuOWpBNzm8pL8ftmSxQx/wnJD5Eg861NwJU/czy2VXFIebCeZnZrI9rktIQ==", "dev": true, - "license": "(Apache-2.0 AND BSD-3-Clause)" + "license": "(Apache-2.0 AND BSD-3-Clause)", + "peer": true }, "node_modules/@chevrotain/cst-dts-gen": { "version": "11.0.3", @@ -2967,6 +3118,7 @@ "integrity": "sha512-A7+f++LodNNc1wGgoRDTt78cOwWm9KVezApgjOMp1W4hM0898nsqBXwF+sbePE7ZRcjN7Sa1Z5m2oN27XkmEjQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.23.0", @@ -2982,6 +3134,7 @@ "integrity": "sha512-s3n3KisH7dx3vsoeGMxsbRAgKe4O1vbrnKBClm99PU0fWxmxsx5rR2PfqQgIt+2MMJBHbiJ5rfIdLYfB9NNvsA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.35.0", @@ -3020,6 +3173,7 @@ "integrity": "sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@marijn/find-cluster-break": "^1.0.0" } @@ -3030,6 +3184,7 @@ "integrity": "sha512-yoRo4f+FdnD01fFt4XpfpMCcCAo9QvZOtbrXExn4SqzH32YC6LgzqxfLZw/r6Ge65xyY03mK/UfUqrVw1gFiFg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@codemirror/state": "^6.5.0", "style-mod": "^4.1.0", @@ -3053,6 +3208,7 @@ "integrity": "sha512-KchMDNtU4CDTdkyf0qG7ugJ6qHTOR/aI7XebYn3OTCNagaDYWiZUVKgRgwH79yeMkpNgvEUaXSK7wKjaBK9b/Q==", "dev": true, "license": "Apache-2.0", + "peer": true, "peerDependencies": { "@bufbuild/protobuf": "^1.10.0" } @@ -3180,6 +3336,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -3203,6 +3360,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" } @@ -3317,6 +3475,7 @@ "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -3724,6 +3883,7 @@ "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -4463,6 +4623,7 @@ "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", "dev": true, "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -5114,6 +5275,7 @@ "integrity": "sha512-C5wZsGuKTY8jEYsqdxhhFOe1ZDjH0uIYJ9T/jebHwkyxqnr4wW0jTkB72OMqNjsoQRcb0JN3PcSeTwFlVgzCZg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/logger": "3.9.2", @@ -7555,6 +7717,7 @@ "integrity": "sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/mdx": "^2.0.0" }, @@ -7702,6 +7865,7 @@ "integrity": "sha512-6c4DAbR6n6nPbnZhY2V3tzpnKnGL+6aOsLvFL26VRqhlczli9eWG0VDUNoCQEPnGwDMhPS42UhSAnz5pThm5Ag==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@docusaurus/mdx-loader": "3.9.2", "@docusaurus/module-type-aliases": "3.9.2", @@ -8264,6 +8428,7 @@ "integrity": "sha512-lBSBiRruFurFKXr5Hbsl2thmGweAPmddhF3jb99U4EMDA5L+e5Y1rAkOS07Nvrup7HUMBDrCV45meaxZnt28nQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@docusaurus/logger": "3.9.2", "@docusaurus/types": "3.9.2", @@ -9944,7 +10109,8 @@ "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.3.tgz", "integrity": "sha512-w7ojc8ejBqr2REPsWxJjrMFsA/ysDCFICn8zEOR9mrqzOu2amhITYuLD8ag6XZf0CFXDrhKqw7+tW8cX66NaDA==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@lezer/css": { "version": "1.2.0", @@ -11095,7 +11261,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11117,7 +11282,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11139,7 +11303,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11161,7 +11324,6 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11183,7 +11345,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11205,7 +11366,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11227,7 +11387,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11249,7 +11408,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11271,7 +11429,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11293,7 +11450,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11315,7 +11471,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11337,7 +11492,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -11359,7 +11513,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">= 10.0.0" }, @@ -12561,8 +12714,7 @@ "optional": true, "os": [ "android" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-android-arm64": { "version": "4.40.2", @@ -12576,8 +12728,7 @@ "optional": true, "os": [ "android" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-darwin-arm64": { "version": "4.40.2", @@ -12591,8 +12742,7 @@ "optional": true, "os": [ "darwin" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-darwin-x64": { "version": "4.40.2", @@ -12606,8 +12756,7 @@ "optional": true, "os": [ "darwin" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-freebsd-arm64": { "version": "4.40.2", @@ -12621,8 +12770,7 @@ "optional": true, "os": [ "freebsd" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-freebsd-x64": { "version": "4.40.2", @@ -12636,8 +12784,7 @@ "optional": true, "os": [ "freebsd" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { "version": "4.40.2", @@ -12651,8 +12798,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { "version": "4.40.2", @@ -12666,8 +12812,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { "version": "4.40.2", @@ -12681,8 +12826,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { "version": "4.40.2", @@ -12696,8 +12840,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { "version": "4.40.2", @@ -12711,8 +12854,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { "version": "4.40.2", @@ -12726,8 +12868,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { "version": "4.40.2", @@ -12741,8 +12882,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { "version": "4.40.2", @@ -12756,8 +12896,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { "version": "4.40.2", @@ -12771,8 +12910,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { "version": "4.40.2", @@ -12786,8 +12924,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-linux-x64-musl": { "version": "4.40.2", @@ -12801,8 +12938,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { "version": "4.40.2", @@ -12816,8 +12952,7 @@ "optional": true, "os": [ "win32" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { "version": "4.40.2", @@ -12831,8 +12966,7 @@ "optional": true, "os": [ "win32" - ], - "peer": true + ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { "version": "4.40.2", @@ -12846,8 +12980,7 @@ "optional": true, "os": [ "win32" - ], - "peer": true + ] }, "node_modules/@sagold/json-pointer": { "version": "5.1.2", @@ -13181,6 +13314,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -13295,6 +13429,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -13435,6 +13570,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -14635,6 +14771,7 @@ "integrity": "sha512-ZDVMlzgqHuYnY6I2xpgPhlv/5Ndj9MiDQSj52y4DBCqNJI3kiU4ZDYLNeorbuCJKYLJ4Fe1nFyut3zDvEl5BlQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@storybook/client-logger": "7.6.20", "@storybook/core-client": "7.6.20", @@ -14893,6 +15030,7 @@ "integrity": "sha512-kvu4h9qXduiPk1Q1oqFKDLFGu/7mslEYbVaqpbBcBxjlRJnvNCFwEvEwKt0Mx9TtSi8J77xRelvJobrGlst4nQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@sveltejs/acorn-typescript": "^1.0.5", "@types/cookie": "^0.6.0", @@ -14925,6 +15063,7 @@ "integrity": "sha512-Txsm1tJvtiYeLUVRNqxZGKR/mI+CzuIQuc2gn+YCs9rMTowpNZ2Nqt53JdL8KF9bLhAf2ruR/dr9eZCwdTriRA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@sveltejs/vite-plugin-svelte-inspector": "^2.1.0", "debug": "^4.3.4", @@ -15129,6 +15268,7 @@ "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/core": "^7.21.3", "@svgr/babel-preset": "8.1.0", @@ -15350,6 +15490,7 @@ "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -15482,6 +15623,7 @@ "integrity": "sha512-kmS7ZVpHm1EMnW1Wmft9H5ZLM7E0G0NGBx+aGEHGDcNxZBXD2ZUa76CuWjIhOGpwsPbELp684ZdpF2JWoNi4Dg==", "dev": true, "license": "MIT", + "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -15569,6 +15711,7 @@ "integrity": "sha512-plCQDLCZIOc92cizB8NNhBRN0szvYR3cx9i5IXo6v9Xsgcun8KHNcJkesc2AyeqdIs0BtOJZaqQ9adHThz8UDw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "prosemirror-changeset": "^2.3.0", "prosemirror-collab": "^1.3.1", @@ -16468,6 +16611,7 @@ "integrity": "sha512-gXLBtmlcRJeT09/sI4PxVwyrku6SaNUj/6cMubjE6T6XdY1fDmBL7r0nX0jbSZPU/Xr0KuwLLZh6aOYY5d91Xw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -16773,6 +16917,7 @@ "integrity": "sha512-LKMrmwCPoLhM45Z00O1ulb6jwyVr2kr3XJp+G+tSEZcbauNnScewcQwtJqXDhXeYPDEjZ8C1SjXm015CirEmGg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.32.1", "@typescript-eslint/types": "8.32.1", @@ -16894,6 +17039,7 @@ "integrity": "sha512-DsSFNIgLSrc89gpq1LJB7Hm1YpuhK086DRDJSNrewcGvYloWW1vZLHBTIvarKZDcAORIy/uWNx8Gad+4oMpkSA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.32.1", @@ -16943,6 +17089,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@typescript/vfs": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.2.tgz", + "integrity": "sha512-hoBwJwcbKHmvd2QVebiytN1aELvpk9B74B4L1mFm/XT1Q/VOYAWl2vQ9AWRFtQq8zmz6enTpfTV8WRc4ATjW/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.1" + }, + "peerDependencies": { + "typescript": "*" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", @@ -17523,6 +17682,7 @@ "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -17593,6 +17753,7 @@ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -17662,6 +17823,7 @@ "integrity": "sha512-9E4b3rJmYbBkn7e3aAPt1as+VVnRhsR4qwRRgOzpeyz4PAOuwKh0HI4AN6mTrqK0S0M9fCCSTOUnuJ8gPY/tvA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@algolia/abtesting": "1.7.0", "@algolia/client-abtesting": "5.41.0", @@ -18894,6 +19056,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001737", "electron-to-chromium": "^1.5.211", @@ -19391,6 +19554,7 @@ "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@chevrotain/cst-dts-gen": "11.0.3", "@chevrotain/gast": "11.0.3", @@ -19491,19 +19655,6 @@ "consola": "^3.2.3" } }, - "node_modules/class-validator": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.2.tgz", - "integrity": "sha512-3kMVRF2io8N8pY1IFIXlho9r8IPUUIfHe2hYVtiebvAzU2XeQFXTv+XI4WX+TnXmtwXMDcjngcpkiPM0O9PvLw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@types/validator": "^13.11.8", - "libphonenumber-js": "^1.11.1", - "validator": "^13.9.0" - } - }, "node_modules/classcat": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/classcat/-/classcat-5.0.5.tgz", @@ -20455,6 +20606,7 @@ "dev": true, "hasInstallScript": true, "license": "MIT", + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" @@ -20797,6 +20949,7 @@ "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -21179,6 +21332,7 @@ "integrity": "sha512-5JHBC9n75kz5851jeklCPmZWcg3hUe6sjqJvyk3+hVqFaKcHwHgxsjeN1yLmggoUc6STbtm9/NQyabQehfjvWQ==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=0.10" } @@ -21511,7 +21665,6 @@ "integrity": "sha512-p0bK60CEzph1iqmnxut7d/1kyTmm3UWtPlwdkM31AU+LW+BXazd5zJdoCn7VFxNCHXRngPHRnsNn5uGjLRGndg==", "dev": true, "license": "ISC", - "peer": true, "dependencies": { "commander": "7", "d3-array": "1 - 3", @@ -21534,7 +21687,6 @@ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 10" } @@ -21691,6 +21843,7 @@ "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "dev": true, "license": "ISC", + "peer": true, "engines": { "node": ">=12" } @@ -23399,6 +23552,7 @@ "dev": true, "hasInstallScript": true, "license": "MIT", + "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -23525,6 +23679,7 @@ "integrity": "sha512-Hx0MOjPh6uK9oq9nVsATZKE/Wlbai7KFjfCuw9UHaguDW3x+HF0O5nIi3ud39TWgrTjTO5nHxmL3R1eANinWHQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", @@ -24483,8 +24638,7 @@ "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", @@ -28090,6 +28244,7 @@ "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">= 10.16.0" } @@ -28493,14 +28648,6 @@ "@lezer/lr": "^1.0.0" } }, - "node_modules/libphonenumber-js": { - "version": "1.12.8", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.12.8.tgz", - "integrity": "sha512-f1KakiQJa9tdc7w1phC2ST+DyxWimy9c3g3yeF+84QtEanJr2K77wAmBPP22riU05xldniHsvXuflnLZ4oysqA==", - "dev": true, - "license": "MIT", - "optional": true - }, "node_modules/lilconfig": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", @@ -32002,6 +32149,7 @@ "integrity": "sha512-aChaVU/DO5aRPmk1GX8L+whocagUUpBQqoPtJk+cm7UOXUk87J4PeWCh6nNmTTIfEhiR9DI/+FnA8dln/hTK7g==", "dev": true, "license": "MIT", + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/mobx" @@ -33816,6 +33964,7 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8.6" }, @@ -34019,6 +34168,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -34683,6 +34833,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "lilconfig": "^3.1.1" }, @@ -35090,6 +35241,7 @@ "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -35787,6 +35939,7 @@ "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", "dev": true, "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -36161,6 +36314,7 @@ "integrity": "sha512-PIM7E43PBxKce8OQeezAs9j4TP+5yDpZVbuurd1h5phUxEKIu+G2a+EUZzIC5nS1mJktDJWzbqS23n1tsAf5QA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "orderedmap": "^2.0.0" } @@ -36193,6 +36347,7 @@ "integrity": "sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "prosemirror-model": "^1.0.0", "prosemirror-transform": "^1.0.0", @@ -36245,6 +36400,7 @@ "integrity": "sha512-SqMiYMUQNNBP9kfPhLO8WXEk/fon47vc52FQsUiJzTBuyjKgEcoAwMyF04eQ4WZ2ArMn7+ReypYL60aKngbACQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "prosemirror-model": "^1.20.0", "prosemirror-state": "^1.0.0", @@ -36700,6 +36856,7 @@ "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -36724,6 +36881,7 @@ "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -36785,6 +36943,7 @@ "integrity": "sha512-YMMxTUQV/QFSnbgrP3tjDzLHRg7vsbMn8e9HAa8o/1iXoiomo48b7sk/kkmWEuWNDPJVlKSJRB6Y2fHqdJk+SQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/react": "*" }, @@ -36864,6 +37023,7 @@ "integrity": "sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.12.13", "history": "^4.9.0", @@ -38578,29 +38738,6 @@ "rimraf": "bin.js" } }, - "node_modules/sass": { - "version": "1.91.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.91.0.tgz", - "integrity": "sha512-aFOZHGf+ur+bp1bCHZ+u8otKGh77ZtmFyXDo4tlYvT7PWql41Kwd8wdkPqhhT+h2879IVblcHFglIMofsFd1EA==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "chokidar": "^4.0.0", - "immutable": "^5.0.2", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - }, - "optionalDependencies": { - "@parcel/watcher": "^2.4.1" - } - }, "node_modules/sass-loader": { "version": "16.0.5", "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-16.0.5.tgz", @@ -38642,40 +38779,6 @@ } } }, - "node_modules/sass/node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/sass/node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/sax": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", @@ -38739,6 +38842,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -39862,6 +39966,7 @@ "integrity": "sha512-Wt04pPTO71pwmRmsgkyZhNo4Bvdb/1pBAMsIFb9nQLykEdzzpXjvingxFFvdOG4nIowzwgxD+CLlyRqVJqnATw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@storybook/cli": "7.6.20" }, @@ -40216,6 +40321,7 @@ "integrity": "sha512-1v/e3Dl1BknC37cXMhwGomhO8AkYmN41CqyX9xhUDxry1ns3BFQy2lLDRQXJRdVVWB9OHemv/53xaStimvWyuA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@emotion/is-prop-valid": "1.2.2", "@emotion/unitless": "0.8.1", @@ -40401,6 +40507,7 @@ "integrity": "sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.1", "@jridgewell/sourcemap-codec": "^1.4.15", @@ -41470,6 +41577,7 @@ "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -42227,6 +42335,7 @@ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -42337,7 +42446,6 @@ "integrity": "sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==", "dev": true, "license": "ISC", - "peer": true, "dependencies": { "commander": "2" }, @@ -42352,8 +42460,7 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/toposort": { "version": "2.0.2", @@ -42654,7 +42761,8 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, - "license": "0BSD" + "license": "0BSD", + "peer": true }, "node_modules/tsx": { "version": "4.19.4", @@ -42662,6 +42770,7 @@ "integrity": "sha512-gK5GVzDkJK1SI1zwHf32Mqxf2tSJkNx+eYcNly5+nHvWqXUJYUkWBQtKauoESz3ymezAI++ZwT855x5p5eop+Q==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "~0.25.0", "get-tsconfig": "^4.7.5" @@ -43256,6 +43365,7 @@ "integrity": "sha512-xKvKpIywE1rnqqLgjkoq0F3wOqYaKO9nV6YkkSat6IxOWacUCc/7Es0hR3OPmkIqkPoEn7U3x+sYdG72rstZQA==", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@gerrit0/mini-shiki": "^3.2.2", "lunr": "^2.3.9", @@ -43293,6 +43403,7 @@ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -44096,8 +44207,7 @@ "resolved": "https://registry.npmjs.org/vega-canvas/-/vega-canvas-1.2.7.tgz", "integrity": "sha512-OkJ9CACVcN9R5Pi9uF6MZBF06pO6qFpDYHWSKBJsdHP5o724KrsgR6UvbnXFH82FdsiTOff/HqjuaG8C7FL+9Q==", "dev": true, - "license": "BSD-3-Clause", - "peer": true + "license": "BSD-3-Clause" }, "node_modules/vega-crossfilter": { "version": "4.1.3", @@ -44105,7 +44215,6 @@ "integrity": "sha512-nyPJAXAUABc3EocUXvAL1J/IWotZVsApIcvOeZaUdEQEtZ7bt8VtP2nj3CLbHBA8FZZVV+K6SmdwvCOaAD4wFQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "^3.2.2", "vega-dataflow": "^5.7.7", @@ -44118,7 +44227,6 @@ "integrity": "sha512-R2NX2HvgXL+u4E6u+L5lKvvRiCtnE6N6l+umgojfi53suhhkFP+zB+2UAQo4syxuZ4763H1csfkKc4xpqLzKnw==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "vega-format": "^1.1.3", "vega-loader": "^4.5.3", @@ -44131,7 +44239,6 @@ "integrity": "sha512-ZHQPWSs9mUTGJPZ5yQVhHV+OLDCoTIjR//De93vG6igZX1MQCVo03ePWlfWCUAnPV1IsKfeJLqA3K/Qd11bAFQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "fast-json-patch": "^3.1.1", "json-stringify-pretty-compact": "^4.0.0", @@ -44156,7 +44263,6 @@ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", - "peer": true, "bin": { "semver": "bin/semver.js" }, @@ -44170,7 +44276,6 @@ "integrity": "sha512-fsjEY1VaBAmqwt7Jlpz0dpPtfQFiBdP9igEefvumSpy7XUxOJmDQcRDnT3Qh9ctkv3itfPfI9g8FSnGcv2b4jQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "^3.2.2", "d3-interpolate": "^3.0.1", @@ -44203,7 +44308,6 @@ "integrity": "sha512-cHZVaY2VNNIG2RyihhSiWniPd2W9R9kJq0znxzV602CgUVgxEfTKtx/lxnVCn8nNrdKAYrGiqIsBzIeKG1GWHw==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-force": "^3.0.0", "vega-dataflow": "^5.7.7", @@ -44216,7 +44320,6 @@ "integrity": "sha512-wQhw7KR46wKJAip28FF/CicW+oiJaPAwMKdrxlnTA0Nv8Bf7bloRlc+O3kON4b4H1iALLr9KgRcYTOeXNs2MOA==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "^3.2.2", "d3-format": "^3.1.0", @@ -44231,7 +44334,6 @@ "integrity": "sha512-+D+ey4bDAhZA2CChh7bRZrcqRUDevv05kd2z8xH+il7PbYQLrhi6g1zwvf8z3KpgGInFf5O13WuFK5DQGkz5lQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "^3.2.2", "d3-color": "^3.1.0", @@ -44252,7 +44354,6 @@ "integrity": "sha512-+WnnzEPKIU1/xTFUK3EMu2htN35gp9usNZcC0ZFg2up1/Vqu6JyZsX0PIO51oXSIeXn9bwk6VgzlOmJUcx92tA==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "^3.2.2", "d3-color": "^3.1.0", @@ -44270,7 +44371,6 @@ "integrity": "sha512-0Z+TYKRgOEo8XYXnJc2HWg1EGpcbNAhJ9Wpi9ubIbEyEHqIgjCIyFVN8d4nSfsJOcWDzsSmRqohBztxAhOCSaw==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-hierarchy": "^3.1.2", "vega-dataflow": "^5.7.7", @@ -44300,7 +44400,6 @@ "integrity": "sha512-Emx4b5s7pvuRj3fBkAJ/E2snCoZACfKAwxVId7f/4kYVlAYLb5Swq6W8KZHrH4M9Qds1XJRUYW9/Y3cceqzEFA==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "vega-canvas": "^1.2.7", "vega-dataflow": "^5.7.7", @@ -44314,6 +44413,7 @@ "integrity": "sha512-l4J6+AWE3DIjvovEoHl2LdtCUkfm4zs8Xxx7INwZEAv+XVb6kR6vIN1gt3t2gN2gs/y4DYTs/RPoTeYAuEg6mA==", "dev": true, "license": "BSD-3-Clause", + "peer": true, "dependencies": { "json-stringify-pretty-compact": "~4.0.0", "tslib": "~2.8.1", @@ -44352,7 +44452,6 @@ "integrity": "sha512-dUfIpxTLF2magoMaur+jXGvwMxjtdlDZaIS8lFj6N7IhUST6nIvBzuUlRM+zLYepI5GHtCLOnqdKU4XV0NggCA==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-dsv": "^3.0.1", "node-fetch": "^2.6.7", @@ -44367,7 +44466,6 @@ "integrity": "sha512-jltyrwCTtWeidi/6VotLCybhIl+ehwnzvFWYOdWNUP0z/EskdB64YmawNwjCjzTBMemeiQtY6sJPPbewYqe3Vg==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "vega-dataflow": "^5.7.7", "vega-event-selector": "^3.0.1", @@ -44382,7 +44480,6 @@ "integrity": "sha512-3pcVaQL9R3Zfk6PzopLX6awzrQUeYOXJzlfLGP2Xd93mqUepBa6m/reVrTUoSFXA3v9lfK4W/PS2AcVzD/MIcQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-geo": "^3.1.0", "d3-geo-projection": "^4.0.0", @@ -44395,7 +44492,6 @@ "integrity": "sha512-AmccF++Z9uw4HNZC/gmkQGe6JsRxTG/R4QpbcSepyMvQN1Rj5KtVqMcmVFP1r3ivM4dYGFuPlzMWvuqp0iKMkQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "^3.2.2", "vega-dataflow": "^5.7.7", @@ -44409,7 +44505,6 @@ "integrity": "sha512-b4eot3tWKCk++INWqot+6sLn3wDTj/HE+tRSbiaf8aecuniPMlwJEK7wWuhVGeW2Ae5n8fI/8TeTViaC94bNHA==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "vega-dataflow": "^5.7.7", "vega-util": "^1.17.3" @@ -44421,7 +44516,6 @@ "integrity": "sha512-o6Hl76aU1jlCK7Q8DPYZ8OGsp4PtzLdzI6nGpLt8rxoE78QuB3GBGEwGAQJitp4IF7Lb2rL5oAXEl3ZP6xf9jg==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "^3.2.2", "d3-interpolate": "^3.0.1", @@ -44437,7 +44531,6 @@ "integrity": "sha512-LFY9+sLIxRfdDI9ZTKjLoijMkIAzPLBWHpPkwv4NPYgdyx+0qFmv+puBpAUGUY9VZqAZ736Uj5NJY9zw+/M3yQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-path": "^3.1.0", "d3-shape": "^3.2.0", @@ -44452,8 +44545,7 @@ "resolved": "https://registry.npmjs.org/vega-schema-url-parser/-/vega-schema-url-parser-3.0.2.tgz", "integrity": "sha512-xAnR7KAvNPYewI3O0l5QGdT8Tv0+GCZQjqfP39cW/hbe/b3aYMAQ39vm8O2wfXUHzm04xTe7nolcsx8WQNVLRQ==", "dev": true, - "license": "BSD-3-Clause", - "peer": true + "license": "BSD-3-Clause" }, "node_modules/vega-selections": { "version": "5.6.0", @@ -44461,7 +44553,6 @@ "integrity": "sha512-UE2w78rUUbaV3Ph+vQbQDwh8eywIJYRxBiZdxEG/Tr/KtFMLdy2BDgNZuuDO1Nv8jImPJwONmqjNhNDYwM0VJQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "3.2.4", "vega-expression": "^5.2.0", @@ -44474,7 +44565,6 @@ "integrity": "sha512-GAqS7mkatpXcMCQKWtFu1eMUKLUymjInU0O8kXshWaQrVWjPIO2lllZ1VNhdgE0qGj4oOIRRS11kzuijLshGXQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "^3.2.2" } @@ -44485,7 +44575,6 @@ "integrity": "sha512-1iFiI3BNmW9FrsLnDLx0ZKEddsCitRY3XmUAwp6qmp+p+IXyJYc9pfjlVj9E6KXBPfm4cQyU++s0smKNiWzO4g==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "funding": { "url": "https://app.hubspot.com/payments/GyPC972GD9Rt" }, @@ -44500,7 +44589,6 @@ "integrity": "sha512-hFcWPdTV844IiY0m97+WUoMLADCp+8yUQR1NStWhzBzwDDA7QEGGwYGxALhdMOaDTwkyoNj3V/nox2rQAJD/vQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "^3.2.2", "d3-time": "^3.1.0", @@ -44513,7 +44601,6 @@ "integrity": "sha512-P1R0JP29v0qnTuwzCQ0SPJlkjAzr6qeyj+H4VgUFSykHmHc1OBxda//XBaFDl/bZgIscEMvjKSjZpXd84x3aZQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "vega-util": "^2.0.0" }, @@ -44526,8 +44613,7 @@ "resolved": "https://registry.npmjs.org/vega-util/-/vega-util-2.0.0.tgz", "integrity": "sha512-/ayLYX3VVqfkKJB1mG+xkOKiBVlfFZ9BfUB5vf7eVyIRork24sABXdeH4x+XeWuqDKnLBTDedotA+1a5MxlV2Q==", "dev": true, - "license": "BSD-3-Clause", - "peer": true + "license": "BSD-3-Clause" }, "node_modules/vega-transforms": { "version": "4.12.1", @@ -44535,7 +44621,6 @@ "integrity": "sha512-Qxo+xeEEftY1jYyKgzOGc9NuW4/MqGm1YPZ5WrL9eXg2G0410Ne+xL/MFIjHF4hRX+3mgFF4Io2hPpfy/thjLg==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "^3.2.2", "vega-dataflow": "^5.7.7", @@ -44577,7 +44662,6 @@ "integrity": "sha512-Nxp1MEAY+8bphIm+7BeGFzWPoJnX9+hgvze6wqCAPoM69YiyVR0o0VK8M2EESIL+22+Owr0Fdy94hWHnmon5tQ==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-array": "^3.2.2", "d3-timer": "^3.0.1", @@ -44595,7 +44679,6 @@ "integrity": "sha512-RYlyMJu5kZV4XXjmyTQKADJWDB25SMHsiF+B1rbE1p+pmdQPlp5tGdPl9r5dUJOp3p8mSt/NGI8GPGucmPMxtw==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "vega-dataflow": "^5.7.7", "vega-scenegraph": "^4.13.1", @@ -44608,7 +44691,6 @@ "integrity": "sha512-lWNimgJAXGeRFu2Pz8axOUqVf1moYhD+5yhBzDSmckE9I5jLOyZc/XvgFTXwFnsVkMd1QW1vxJa+y9yfUblzYw==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "d3-delaunay": "^6.0.2", "vega-dataflow": "^5.7.7", @@ -44621,7 +44703,6 @@ "integrity": "sha512-lFmF3u9/ozU0P+WqPjeThQfZm0PigdbXDwpIUCxczrCXKYJLYFmZuZLZR7cxtmpZ0/yuvRvAJ4g123LXbSZF8A==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "vega-canvas": "^1.2.7", "vega-dataflow": "^5.7.7", @@ -44681,6 +44762,7 @@ "integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", @@ -44778,7 +44860,6 @@ "os": [ "aix" ], - "peer": true, "engines": { "node": ">=12" } @@ -44796,7 +44877,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=12" } @@ -44814,7 +44894,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=12" } @@ -44832,7 +44911,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=12" } @@ -44850,7 +44928,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=12" } @@ -44868,7 +44945,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=12" } @@ -44886,7 +44962,6 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=12" } @@ -44904,7 +44979,6 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=12" } @@ -44922,7 +44996,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } @@ -44940,7 +45013,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } @@ -44958,7 +45030,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } @@ -44976,7 +45047,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } @@ -44994,7 +45064,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } @@ -45012,7 +45081,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } @@ -45030,7 +45098,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } @@ -45048,7 +45115,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } @@ -45066,7 +45132,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } @@ -45084,7 +45149,6 @@ "os": [ "netbsd" ], - "peer": true, "engines": { "node": ">=12" } @@ -45102,7 +45166,6 @@ "os": [ "openbsd" ], - "peer": true, "engines": { "node": ">=12" } @@ -45120,7 +45183,6 @@ "os": [ "sunos" ], - "peer": true, "engines": { "node": ">=12" } @@ -45138,7 +45200,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=12" } @@ -45156,7 +45217,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=12" } @@ -45174,7 +45234,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=12" } @@ -45634,6 +45693,7 @@ "integrity": "sha512-lQ3CPiSTpfOnrEGeXDwoq5hIGzSjmwD72GdfVzF7CQAI7t47rJG9eDWvcEkEn3CUQymAElVvDg3YNTlCYj+qUQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", @@ -46783,6 +46843,7 @@ "integrity": "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==", "dev": true, "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -46833,7 +46894,9 @@ "web-common": { "version": "0.0.0", "devDependencies": { + "@bufbuild/buf": "^1.63.0", "@bufbuild/protobuf": "^1.0.0", + "@bufbuild/protoc-gen-es": "^1.10.0", "@codemirror/autocomplete": "^6.18.1", "@codemirror/commands": "^6.7.0", "@codemirror/lang-json": "^6.0.1", @@ -46933,6 +46996,43 @@ "yup": "^1.4.0" } }, + "web-common/node_modules/@bufbuild/protoc-gen-es": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-1.10.1.tgz", + "integrity": "sha512-YADugbvibIdZSb0NGf5OF87IyKTuMvMFZ7vMHgm6pL1SCfDwJ/ZRianTdrPG9hq/gOipK+NwHmXBViyS3J7nxA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "^1.10.1", + "@bufbuild/protoplugin": "1.10.1" + }, + "bin": { + "protoc-gen-es": "bin/protoc-gen-es" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@bufbuild/protobuf": "1.10.1" + }, + "peerDependenciesMeta": { + "@bufbuild/protobuf": { + "optional": true + } + } + }, + "web-common/node_modules/@bufbuild/protoplugin": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-1.10.1.tgz", + "integrity": "sha512-LaSbfwabAFIvbVnbn8jWwElRoffCIxhVraO8arliVwWupWezHLXgqPHEYLXZY/SsAR+/YsFBQJa8tAGtNPJyaQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "1.10.1", + "@typescript/vfs": "^1.4.0", + "typescript": "4.5.2" + } + }, "web-common/node_modules/@floating-ui/core": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.3.tgz", @@ -46961,6 +47061,20 @@ "dev": true, "license": "MIT" }, + "web-common/node_modules/typescript": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", + "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "web-integration": { "version": "0.0.0" }, diff --git a/proto/buf.gen.runtime.yaml b/proto/buf.gen.runtime.yaml new file mode 100644 index 00000000000..65019baad9d --- /dev/null +++ b/proto/buf.gen.runtime.yaml @@ -0,0 +1,20 @@ +version: v2 +managed: + enabled: true + override: + - file_option: go_package_prefix + value: github.com/rilldata/rill/proto/gen + disable: + - module: buf.build/googleapis/googleapis + file_option: go_package_prefix + - module: buf.build/envoyproxy/protoc-gen-validate + file_option: go_package_prefix +plugins: + - remote: buf.build/connectrpc/go:v1.16.2 + out: gen + opt: + - paths=source_relative + - remote: buf.build/connectrpc/es:v1.4.0 + out: ../web-common/src/proto/gen + opt: + - target=ts diff --git a/proto/gen/rill/runtime/v1/runtimev1connect/api.connect.go b/proto/gen/rill/runtime/v1/runtimev1connect/api.connect.go new file mode 100644 index 00000000000..dd069345dd9 --- /dev/null +++ b/proto/gen/rill/runtime/v1/runtimev1connect/api.connect.go @@ -0,0 +1,1499 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: rill/runtime/v1/api.proto + +package runtimev1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/rilldata/rill/proto/gen/rill/runtime/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // RuntimeServiceName is the fully-qualified name of the RuntimeService service. + RuntimeServiceName = "rill.runtime.v1.RuntimeService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // RuntimeServicePingProcedure is the fully-qualified name of the RuntimeService's Ping RPC. + RuntimeServicePingProcedure = "/rill.runtime.v1.RuntimeService/Ping" + // RuntimeServiceHealthProcedure is the fully-qualified name of the RuntimeService's Health RPC. + RuntimeServiceHealthProcedure = "/rill.runtime.v1.RuntimeService/Health" + // RuntimeServiceInstanceHealthProcedure is the fully-qualified name of the RuntimeService's + // InstanceHealth RPC. + RuntimeServiceInstanceHealthProcedure = "/rill.runtime.v1.RuntimeService/InstanceHealth" + // RuntimeServiceListInstancesProcedure is the fully-qualified name of the RuntimeService's + // ListInstances RPC. + RuntimeServiceListInstancesProcedure = "/rill.runtime.v1.RuntimeService/ListInstances" + // RuntimeServiceGetInstanceProcedure is the fully-qualified name of the RuntimeService's + // GetInstance RPC. + RuntimeServiceGetInstanceProcedure = "/rill.runtime.v1.RuntimeService/GetInstance" + // RuntimeServiceCreateInstanceProcedure is the fully-qualified name of the RuntimeService's + // CreateInstance RPC. + RuntimeServiceCreateInstanceProcedure = "/rill.runtime.v1.RuntimeService/CreateInstance" + // RuntimeServiceEditInstanceProcedure is the fully-qualified name of the RuntimeService's + // EditInstance RPC. + RuntimeServiceEditInstanceProcedure = "/rill.runtime.v1.RuntimeService/EditInstance" + // RuntimeServiceDeleteInstanceProcedure is the fully-qualified name of the RuntimeService's + // DeleteInstance RPC. + RuntimeServiceDeleteInstanceProcedure = "/rill.runtime.v1.RuntimeService/DeleteInstance" + // RuntimeServiceReloadConfigProcedure is the fully-qualified name of the RuntimeService's + // ReloadConfig RPC. + RuntimeServiceReloadConfigProcedure = "/rill.runtime.v1.RuntimeService/ReloadConfig" + // RuntimeServiceListFilesProcedure is the fully-qualified name of the RuntimeService's ListFiles + // RPC. + RuntimeServiceListFilesProcedure = "/rill.runtime.v1.RuntimeService/ListFiles" + // RuntimeServiceWatchFilesProcedure is the fully-qualified name of the RuntimeService's WatchFiles + // RPC. + RuntimeServiceWatchFilesProcedure = "/rill.runtime.v1.RuntimeService/WatchFiles" + // RuntimeServiceGetFileProcedure is the fully-qualified name of the RuntimeService's GetFile RPC. + RuntimeServiceGetFileProcedure = "/rill.runtime.v1.RuntimeService/GetFile" + // RuntimeServicePutFileProcedure is the fully-qualified name of the RuntimeService's PutFile RPC. + RuntimeServicePutFileProcedure = "/rill.runtime.v1.RuntimeService/PutFile" + // RuntimeServiceCreateDirectoryProcedure is the fully-qualified name of the RuntimeService's + // CreateDirectory RPC. + RuntimeServiceCreateDirectoryProcedure = "/rill.runtime.v1.RuntimeService/CreateDirectory" + // RuntimeServiceDeleteFileProcedure is the fully-qualified name of the RuntimeService's DeleteFile + // RPC. + RuntimeServiceDeleteFileProcedure = "/rill.runtime.v1.RuntimeService/DeleteFile" + // RuntimeServiceRenameFileProcedure is the fully-qualified name of the RuntimeService's RenameFile + // RPC. + RuntimeServiceRenameFileProcedure = "/rill.runtime.v1.RuntimeService/RenameFile" + // RuntimeServiceListExamplesProcedure is the fully-qualified name of the RuntimeService's + // ListExamples RPC. + RuntimeServiceListExamplesProcedure = "/rill.runtime.v1.RuntimeService/ListExamples" + // RuntimeServiceUnpackExampleProcedure is the fully-qualified name of the RuntimeService's + // UnpackExample RPC. + RuntimeServiceUnpackExampleProcedure = "/rill.runtime.v1.RuntimeService/UnpackExample" + // RuntimeServiceUnpackEmptyProcedure is the fully-qualified name of the RuntimeService's + // UnpackEmpty RPC. + RuntimeServiceUnpackEmptyProcedure = "/rill.runtime.v1.RuntimeService/UnpackEmpty" + // RuntimeServiceGenerateMetricsViewFileProcedure is the fully-qualified name of the + // RuntimeService's GenerateMetricsViewFile RPC. + RuntimeServiceGenerateMetricsViewFileProcedure = "/rill.runtime.v1.RuntimeService/GenerateMetricsViewFile" + // RuntimeServiceGenerateCanvasFileProcedure is the fully-qualified name of the RuntimeService's + // GenerateCanvasFile RPC. + RuntimeServiceGenerateCanvasFileProcedure = "/rill.runtime.v1.RuntimeService/GenerateCanvasFile" + // RuntimeServiceGenerateResolverProcedure is the fully-qualified name of the RuntimeService's + // GenerateResolver RPC. + RuntimeServiceGenerateResolverProcedure = "/rill.runtime.v1.RuntimeService/GenerateResolver" + // RuntimeServiceGenerateRendererProcedure is the fully-qualified name of the RuntimeService's + // GenerateRenderer RPC. + RuntimeServiceGenerateRendererProcedure = "/rill.runtime.v1.RuntimeService/GenerateRenderer" + // RuntimeServiceQueryResolverProcedure is the fully-qualified name of the RuntimeService's + // QueryResolver RPC. + RuntimeServiceQueryResolverProcedure = "/rill.runtime.v1.RuntimeService/QueryResolver" + // RuntimeServiceGetLogsProcedure is the fully-qualified name of the RuntimeService's GetLogs RPC. + RuntimeServiceGetLogsProcedure = "/rill.runtime.v1.RuntimeService/GetLogs" + // RuntimeServiceWatchLogsProcedure is the fully-qualified name of the RuntimeService's WatchLogs + // RPC. + RuntimeServiceWatchLogsProcedure = "/rill.runtime.v1.RuntimeService/WatchLogs" + // RuntimeServiceListResourcesProcedure is the fully-qualified name of the RuntimeService's + // ListResources RPC. + RuntimeServiceListResourcesProcedure = "/rill.runtime.v1.RuntimeService/ListResources" + // RuntimeServiceWatchResourcesProcedure is the fully-qualified name of the RuntimeService's + // WatchResources RPC. + RuntimeServiceWatchResourcesProcedure = "/rill.runtime.v1.RuntimeService/WatchResources" + // RuntimeServiceGetResourceProcedure is the fully-qualified name of the RuntimeService's + // GetResource RPC. + RuntimeServiceGetResourceProcedure = "/rill.runtime.v1.RuntimeService/GetResource" + // RuntimeServiceGetExploreProcedure is the fully-qualified name of the RuntimeService's GetExplore + // RPC. + RuntimeServiceGetExploreProcedure = "/rill.runtime.v1.RuntimeService/GetExplore" + // RuntimeServiceGetModelPartitionsProcedure is the fully-qualified name of the RuntimeService's + // GetModelPartitions RPC. + RuntimeServiceGetModelPartitionsProcedure = "/rill.runtime.v1.RuntimeService/GetModelPartitions" + // RuntimeServiceCreateTriggerProcedure is the fully-qualified name of the RuntimeService's + // CreateTrigger RPC. + RuntimeServiceCreateTriggerProcedure = "/rill.runtime.v1.RuntimeService/CreateTrigger" + // RuntimeServiceListConnectorDriversProcedure is the fully-qualified name of the RuntimeService's + // ListConnectorDrivers RPC. + RuntimeServiceListConnectorDriversProcedure = "/rill.runtime.v1.RuntimeService/ListConnectorDrivers" + // RuntimeServiceAnalyzeConnectorsProcedure is the fully-qualified name of the RuntimeService's + // AnalyzeConnectors RPC. + RuntimeServiceAnalyzeConnectorsProcedure = "/rill.runtime.v1.RuntimeService/AnalyzeConnectors" + // RuntimeServiceListNotifierConnectorsProcedure is the fully-qualified name of the RuntimeService's + // ListNotifierConnectors RPC. + RuntimeServiceListNotifierConnectorsProcedure = "/rill.runtime.v1.RuntimeService/ListNotifierConnectors" + // RuntimeServiceListConversationsProcedure is the fully-qualified name of the RuntimeService's + // ListConversations RPC. + RuntimeServiceListConversationsProcedure = "/rill.runtime.v1.RuntimeService/ListConversations" + // RuntimeServiceGetConversationProcedure is the fully-qualified name of the RuntimeService's + // GetConversation RPC. + RuntimeServiceGetConversationProcedure = "/rill.runtime.v1.RuntimeService/GetConversation" + // RuntimeServiceShareConversationProcedure is the fully-qualified name of the RuntimeService's + // ShareConversation RPC. + RuntimeServiceShareConversationProcedure = "/rill.runtime.v1.RuntimeService/ShareConversation" + // RuntimeServiceForkConversationProcedure is the fully-qualified name of the RuntimeService's + // ForkConversation RPC. + RuntimeServiceForkConversationProcedure = "/rill.runtime.v1.RuntimeService/ForkConversation" + // RuntimeServiceListToolsProcedure is the fully-qualified name of the RuntimeService's ListTools + // RPC. + RuntimeServiceListToolsProcedure = "/rill.runtime.v1.RuntimeService/ListTools" + // RuntimeServiceCompleteProcedure is the fully-qualified name of the RuntimeService's Complete RPC. + RuntimeServiceCompleteProcedure = "/rill.runtime.v1.RuntimeService/Complete" + // RuntimeServiceCompleteStreamingProcedure is the fully-qualified name of the RuntimeService's + // CompleteStreaming RPC. + RuntimeServiceCompleteStreamingProcedure = "/rill.runtime.v1.RuntimeService/CompleteStreaming" + // RuntimeServiceIssueDevJWTProcedure is the fully-qualified name of the RuntimeService's + // IssueDevJWT RPC. + RuntimeServiceIssueDevJWTProcedure = "/rill.runtime.v1.RuntimeService/IssueDevJWT" + // RuntimeServiceAnalyzeVariablesProcedure is the fully-qualified name of the RuntimeService's + // AnalyzeVariables RPC. + RuntimeServiceAnalyzeVariablesProcedure = "/rill.runtime.v1.RuntimeService/AnalyzeVariables" +) + +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + runtimeServiceServiceDescriptor = v1.File_rill_runtime_v1_api_proto.Services().ByName("RuntimeService") + runtimeServicePingMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("Ping") + runtimeServiceHealthMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("Health") + runtimeServiceInstanceHealthMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("InstanceHealth") + runtimeServiceListInstancesMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("ListInstances") + runtimeServiceGetInstanceMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("GetInstance") + runtimeServiceCreateInstanceMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("CreateInstance") + runtimeServiceEditInstanceMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("EditInstance") + runtimeServiceDeleteInstanceMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("DeleteInstance") + runtimeServiceReloadConfigMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("ReloadConfig") + runtimeServiceListFilesMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("ListFiles") + runtimeServiceWatchFilesMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("WatchFiles") + runtimeServiceGetFileMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("GetFile") + runtimeServicePutFileMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("PutFile") + runtimeServiceCreateDirectoryMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("CreateDirectory") + runtimeServiceDeleteFileMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("DeleteFile") + runtimeServiceRenameFileMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("RenameFile") + runtimeServiceListExamplesMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("ListExamples") + runtimeServiceUnpackExampleMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("UnpackExample") + runtimeServiceUnpackEmptyMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("UnpackEmpty") + runtimeServiceGenerateMetricsViewFileMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("GenerateMetricsViewFile") + runtimeServiceGenerateCanvasFileMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("GenerateCanvasFile") + runtimeServiceGenerateResolverMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("GenerateResolver") + runtimeServiceGenerateRendererMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("GenerateRenderer") + runtimeServiceQueryResolverMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("QueryResolver") + runtimeServiceGetLogsMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("GetLogs") + runtimeServiceWatchLogsMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("WatchLogs") + runtimeServiceListResourcesMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("ListResources") + runtimeServiceWatchResourcesMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("WatchResources") + runtimeServiceGetResourceMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("GetResource") + runtimeServiceGetExploreMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("GetExplore") + runtimeServiceGetModelPartitionsMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("GetModelPartitions") + runtimeServiceCreateTriggerMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("CreateTrigger") + runtimeServiceListConnectorDriversMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("ListConnectorDrivers") + runtimeServiceAnalyzeConnectorsMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("AnalyzeConnectors") + runtimeServiceListNotifierConnectorsMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("ListNotifierConnectors") + runtimeServiceListConversationsMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("ListConversations") + runtimeServiceGetConversationMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("GetConversation") + runtimeServiceShareConversationMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("ShareConversation") + runtimeServiceForkConversationMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("ForkConversation") + runtimeServiceListToolsMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("ListTools") + runtimeServiceCompleteMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("Complete") + runtimeServiceCompleteStreamingMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("CompleteStreaming") + runtimeServiceIssueDevJWTMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("IssueDevJWT") + runtimeServiceAnalyzeVariablesMethodDescriptor = runtimeServiceServiceDescriptor.Methods().ByName("AnalyzeVariables") +) + +// RuntimeServiceClient is a client for the rill.runtime.v1.RuntimeService service. +type RuntimeServiceClient interface { + // Ping returns information about the runtime + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) + // Health runs a health check on the runtime. + Health(context.Context, *connect.Request[v1.HealthRequest]) (*connect.Response[v1.HealthResponse], error) + // InstanceHealth runs a health check on a specific instance. + InstanceHealth(context.Context, *connect.Request[v1.InstanceHealthRequest]) (*connect.Response[v1.InstanceHealthResponse], error) + // ListInstances lists all the instances currently managed by the runtime + ListInstances(context.Context, *connect.Request[v1.ListInstancesRequest]) (*connect.Response[v1.ListInstancesResponse], error) + // GetInstance returns information about a specific instance + GetInstance(context.Context, *connect.Request[v1.GetInstanceRequest]) (*connect.Response[v1.GetInstanceResponse], error) + // CreateInstance creates a new instance + CreateInstance(context.Context, *connect.Request[v1.CreateInstanceRequest]) (*connect.Response[v1.CreateInstanceResponse], error) + // EditInstance edits an existing instance + EditInstance(context.Context, *connect.Request[v1.EditInstanceRequest]) (*connect.Response[v1.EditInstanceResponse], error) + // DeleteInstance deletes an instance + DeleteInstance(context.Context, *connect.Request[v1.DeleteInstanceRequest]) (*connect.Response[v1.DeleteInstanceResponse], error) + // ReloadConfig pulls the latest configuration from the admin service and triggers a repo pull. + // If the instance doesn't have an admin connector, this RPC does nothing. + ReloadConfig(context.Context, *connect.Request[v1.ReloadConfigRequest]) (*connect.Response[v1.ReloadConfigResponse], error) + // ListFiles lists all the files matching a glob in a repo. + // The files are sorted by their full path. + ListFiles(context.Context, *connect.Request[v1.ListFilesRequest]) (*connect.Response[v1.ListFilesResponse], error) + // WatchFiles streams repo file update events. It is not supported on all backends. + WatchFiles(context.Context, *connect.Request[v1.WatchFilesRequest]) (*connect.ServerStreamForClient[v1.WatchFilesResponse], error) + // GetFile returns the contents of a specific file in a repo. + GetFile(context.Context, *connect.Request[v1.GetFileRequest]) (*connect.Response[v1.GetFileResponse], error) + // PutFile creates or updates a file in a repo + PutFile(context.Context, *connect.Request[v1.PutFileRequest]) (*connect.Response[v1.PutFileResponse], error) + // CreateDirectory create a directory for the given path + CreateDirectory(context.Context, *connect.Request[v1.CreateDirectoryRequest]) (*connect.Response[v1.CreateDirectoryResponse], error) + // DeleteFile deletes a file from a repo + DeleteFile(context.Context, *connect.Request[v1.DeleteFileRequest]) (*connect.Response[v1.DeleteFileResponse], error) + // RenameFile renames a file in a repo + RenameFile(context.Context, *connect.Request[v1.RenameFileRequest]) (*connect.Response[v1.RenameFileResponse], error) + // ListExamples lists all the examples embedded into binary + ListExamples(context.Context, *connect.Request[v1.ListExamplesRequest]) (*connect.Response[v1.ListExamplesResponse], error) + // UnpackExample unpacks an example project + UnpackExample(context.Context, *connect.Request[v1.UnpackExampleRequest]) (*connect.Response[v1.UnpackExampleResponse], error) + // UnpackEmpty unpacks an empty project + UnpackEmpty(context.Context, *connect.Request[v1.UnpackEmptyRequest]) (*connect.Response[v1.UnpackEmptyResponse], error) + // GenerateMetricsViewFile generates a metrics view YAML file from a table in an OLAP database + GenerateMetricsViewFile(context.Context, *connect.Request[v1.GenerateMetricsViewFileRequest]) (*connect.Response[v1.GenerateMetricsViewFileResponse], error) + // GenerateCanvasFile generates a canvas YAML file from a metrics view + GenerateCanvasFile(context.Context, *connect.Request[v1.GenerateCanvasFileRequest]) (*connect.Response[v1.GenerateCanvasFileResponse], error) + // GenerateResolver generates resolver and resolver properties from a table or a metrics view + GenerateResolver(context.Context, *connect.Request[v1.GenerateResolverRequest]) (*connect.Response[v1.GenerateResolverResponse], error) + // GenerateRenderer generates a component renderer and renderer properties from a resolver and resolver properties + GenerateRenderer(context.Context, *connect.Request[v1.GenerateRendererRequest]) (*connect.Response[v1.GenerateRendererResponse], error) + // QueryResolver queries a resolver with the given properties and arguments + QueryResolver(context.Context, *connect.Request[v1.QueryResolverRequest]) (*connect.Response[v1.QueryResolverResponse], error) + // GetLogs returns recent logs from a controller + GetLogs(context.Context, *connect.Request[v1.GetLogsRequest]) (*connect.Response[v1.GetLogsResponse], error) + // WatchLogs streams new logs emitted from a controller + WatchLogs(context.Context, *connect.Request[v1.WatchLogsRequest]) (*connect.ServerStreamForClient[v1.WatchLogsResponse], error) + // ListResources lists the resources stored in the catalog + ListResources(context.Context, *connect.Request[v1.ListResourcesRequest]) (*connect.Response[v1.ListResourcesResponse], error) + // WatchResources streams updates to catalog resources (including creation and deletion events) + WatchResources(context.Context, *connect.Request[v1.WatchResourcesRequest]) (*connect.ServerStreamForClient[v1.WatchResourcesResponse], error) + // GetResource looks up a specific catalog resource + GetResource(context.Context, *connect.Request[v1.GetResourceRequest]) (*connect.Response[v1.GetResourceResponse], error) + // GetExplore is a convenience RPC that combines looking up an Explore resource and its underlying MetricsView into one network call. + GetExplore(context.Context, *connect.Request[v1.GetExploreRequest]) (*connect.Response[v1.GetExploreResponse], error) + // GetModelPartitions returns the partitions of a model + GetModelPartitions(context.Context, *connect.Request[v1.GetModelPartitionsRequest]) (*connect.Response[v1.GetModelPartitionsResponse], error) + // CreateTrigger submits a refresh trigger, which will asynchronously refresh the specified resources. + // Triggers are ephemeral resources that will be cleaned up by the controller. + CreateTrigger(context.Context, *connect.Request[v1.CreateTriggerRequest]) (*connect.Response[v1.CreateTriggerResponse], error) + // ListConnectorDrivers returns a description of all the connector drivers registed in the runtime, + // including their configuration specs and the capabilities they support. + ListConnectorDrivers(context.Context, *connect.Request[v1.ListConnectorDriversRequest]) (*connect.Response[v1.ListConnectorDriversResponse], error) + // AnalyzeConnectors scans all the project files and returns information about all referenced connectors. + AnalyzeConnectors(context.Context, *connect.Request[v1.AnalyzeConnectorsRequest]) (*connect.Response[v1.AnalyzeConnectorsResponse], error) + // ListNotifierConnectors returns the names of all configured connectors that can be used as notifiers. + // This API is much faster than AnalyzeConnectors and can be called without admin-level permissions. + ListNotifierConnectors(context.Context, *connect.Request[v1.ListNotifierConnectorsRequest]) (*connect.Response[v1.ListNotifierConnectorsResponse], error) + // ListConversations lists all AI chat conversations for an instance. + ListConversations(context.Context, *connect.Request[v1.ListConversationsRequest]) (*connect.Response[v1.ListConversationsResponse], error) + // GetConversation returns a specific AI chat conversation. + GetConversation(context.Context, *connect.Request[v1.GetConversationRequest]) (*connect.Response[v1.GetConversationResponse], error) + // ShareConversation enables sharing of the conversation by adding metadata. + ShareConversation(context.Context, *connect.Request[v1.ShareConversationRequest]) (*connect.Response[v1.ShareConversationResponse], error) + // ForkConversation creates a new conversation by copying messages from an existing one. + // If its the owner then all messages will be copied, otherwise only messages up to the session.SharedUntilMessageID are copied. + ForkConversation(context.Context, *connect.Request[v1.ForkConversationRequest]) (*connect.Response[v1.ForkConversationResponse], error) + // ListTools lists metadata about all AI tools that calls to Complete(Streaming) may invoke. + // Note that it covers all registered tools, but the current user may not have access to all of them. + ListTools(context.Context, *connect.Request[v1.ListToolsRequest]) (*connect.Response[v1.ListToolsResponse], error) + // Complete runs a language model completion (LLM chat) using the configured AI connector. + Complete(context.Context, *connect.Request[v1.CompleteRequest]) (*connect.Response[v1.CompleteResponse], error) + // CompleteStreaming runs an AI-powered chat completion, optionally invoking agents or tool calls available in Rill. + CompleteStreaming(context.Context, *connect.Request[v1.CompleteStreamingRequest]) (*connect.ServerStreamForClient[v1.CompleteStreamingResponse], error) + // IssueDevJWT issues a JWT for mimicking a user in local development. + IssueDevJWT(context.Context, *connect.Request[v1.IssueDevJWTRequest]) (*connect.Response[v1.IssueDevJWTResponse], error) + // AnalyzeVariables scans `Source`, `Model` and `Connector` resources in the catalog for use of an environment variable + AnalyzeVariables(context.Context, *connect.Request[v1.AnalyzeVariablesRequest]) (*connect.Response[v1.AnalyzeVariablesResponse], error) +} + +// NewRuntimeServiceClient constructs a client for the rill.runtime.v1.RuntimeService service. By +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewRuntimeServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RuntimeServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &runtimeServiceClient{ + ping: connect.NewClient[v1.PingRequest, v1.PingResponse]( + httpClient, + baseURL+RuntimeServicePingProcedure, + connect.WithSchema(runtimeServicePingMethodDescriptor), + connect.WithClientOptions(opts...), + ), + health: connect.NewClient[v1.HealthRequest, v1.HealthResponse]( + httpClient, + baseURL+RuntimeServiceHealthProcedure, + connect.WithSchema(runtimeServiceHealthMethodDescriptor), + connect.WithClientOptions(opts...), + ), + instanceHealth: connect.NewClient[v1.InstanceHealthRequest, v1.InstanceHealthResponse]( + httpClient, + baseURL+RuntimeServiceInstanceHealthProcedure, + connect.WithSchema(runtimeServiceInstanceHealthMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listInstances: connect.NewClient[v1.ListInstancesRequest, v1.ListInstancesResponse]( + httpClient, + baseURL+RuntimeServiceListInstancesProcedure, + connect.WithSchema(runtimeServiceListInstancesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getInstance: connect.NewClient[v1.GetInstanceRequest, v1.GetInstanceResponse]( + httpClient, + baseURL+RuntimeServiceGetInstanceProcedure, + connect.WithSchema(runtimeServiceGetInstanceMethodDescriptor), + connect.WithClientOptions(opts...), + ), + createInstance: connect.NewClient[v1.CreateInstanceRequest, v1.CreateInstanceResponse]( + httpClient, + baseURL+RuntimeServiceCreateInstanceProcedure, + connect.WithSchema(runtimeServiceCreateInstanceMethodDescriptor), + connect.WithClientOptions(opts...), + ), + editInstance: connect.NewClient[v1.EditInstanceRequest, v1.EditInstanceResponse]( + httpClient, + baseURL+RuntimeServiceEditInstanceProcedure, + connect.WithSchema(runtimeServiceEditInstanceMethodDescriptor), + connect.WithClientOptions(opts...), + ), + deleteInstance: connect.NewClient[v1.DeleteInstanceRequest, v1.DeleteInstanceResponse]( + httpClient, + baseURL+RuntimeServiceDeleteInstanceProcedure, + connect.WithSchema(runtimeServiceDeleteInstanceMethodDescriptor), + connect.WithClientOptions(opts...), + ), + reloadConfig: connect.NewClient[v1.ReloadConfigRequest, v1.ReloadConfigResponse]( + httpClient, + baseURL+RuntimeServiceReloadConfigProcedure, + connect.WithSchema(runtimeServiceReloadConfigMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listFiles: connect.NewClient[v1.ListFilesRequest, v1.ListFilesResponse]( + httpClient, + baseURL+RuntimeServiceListFilesProcedure, + connect.WithSchema(runtimeServiceListFilesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + watchFiles: connect.NewClient[v1.WatchFilesRequest, v1.WatchFilesResponse]( + httpClient, + baseURL+RuntimeServiceWatchFilesProcedure, + connect.WithSchema(runtimeServiceWatchFilesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getFile: connect.NewClient[v1.GetFileRequest, v1.GetFileResponse]( + httpClient, + baseURL+RuntimeServiceGetFileProcedure, + connect.WithSchema(runtimeServiceGetFileMethodDescriptor), + connect.WithClientOptions(opts...), + ), + putFile: connect.NewClient[v1.PutFileRequest, v1.PutFileResponse]( + httpClient, + baseURL+RuntimeServicePutFileProcedure, + connect.WithSchema(runtimeServicePutFileMethodDescriptor), + connect.WithClientOptions(opts...), + ), + createDirectory: connect.NewClient[v1.CreateDirectoryRequest, v1.CreateDirectoryResponse]( + httpClient, + baseURL+RuntimeServiceCreateDirectoryProcedure, + connect.WithSchema(runtimeServiceCreateDirectoryMethodDescriptor), + connect.WithClientOptions(opts...), + ), + deleteFile: connect.NewClient[v1.DeleteFileRequest, v1.DeleteFileResponse]( + httpClient, + baseURL+RuntimeServiceDeleteFileProcedure, + connect.WithSchema(runtimeServiceDeleteFileMethodDescriptor), + connect.WithClientOptions(opts...), + ), + renameFile: connect.NewClient[v1.RenameFileRequest, v1.RenameFileResponse]( + httpClient, + baseURL+RuntimeServiceRenameFileProcedure, + connect.WithSchema(runtimeServiceRenameFileMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listExamples: connect.NewClient[v1.ListExamplesRequest, v1.ListExamplesResponse]( + httpClient, + baseURL+RuntimeServiceListExamplesProcedure, + connect.WithSchema(runtimeServiceListExamplesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + unpackExample: connect.NewClient[v1.UnpackExampleRequest, v1.UnpackExampleResponse]( + httpClient, + baseURL+RuntimeServiceUnpackExampleProcedure, + connect.WithSchema(runtimeServiceUnpackExampleMethodDescriptor), + connect.WithClientOptions(opts...), + ), + unpackEmpty: connect.NewClient[v1.UnpackEmptyRequest, v1.UnpackEmptyResponse]( + httpClient, + baseURL+RuntimeServiceUnpackEmptyProcedure, + connect.WithSchema(runtimeServiceUnpackEmptyMethodDescriptor), + connect.WithClientOptions(opts...), + ), + generateMetricsViewFile: connect.NewClient[v1.GenerateMetricsViewFileRequest, v1.GenerateMetricsViewFileResponse]( + httpClient, + baseURL+RuntimeServiceGenerateMetricsViewFileProcedure, + connect.WithSchema(runtimeServiceGenerateMetricsViewFileMethodDescriptor), + connect.WithClientOptions(opts...), + ), + generateCanvasFile: connect.NewClient[v1.GenerateCanvasFileRequest, v1.GenerateCanvasFileResponse]( + httpClient, + baseURL+RuntimeServiceGenerateCanvasFileProcedure, + connect.WithSchema(runtimeServiceGenerateCanvasFileMethodDescriptor), + connect.WithClientOptions(opts...), + ), + generateResolver: connect.NewClient[v1.GenerateResolverRequest, v1.GenerateResolverResponse]( + httpClient, + baseURL+RuntimeServiceGenerateResolverProcedure, + connect.WithSchema(runtimeServiceGenerateResolverMethodDescriptor), + connect.WithClientOptions(opts...), + ), + generateRenderer: connect.NewClient[v1.GenerateRendererRequest, v1.GenerateRendererResponse]( + httpClient, + baseURL+RuntimeServiceGenerateRendererProcedure, + connect.WithSchema(runtimeServiceGenerateRendererMethodDescriptor), + connect.WithClientOptions(opts...), + ), + queryResolver: connect.NewClient[v1.QueryResolverRequest, v1.QueryResolverResponse]( + httpClient, + baseURL+RuntimeServiceQueryResolverProcedure, + connect.WithSchema(runtimeServiceQueryResolverMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getLogs: connect.NewClient[v1.GetLogsRequest, v1.GetLogsResponse]( + httpClient, + baseURL+RuntimeServiceGetLogsProcedure, + connect.WithSchema(runtimeServiceGetLogsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + watchLogs: connect.NewClient[v1.WatchLogsRequest, v1.WatchLogsResponse]( + httpClient, + baseURL+RuntimeServiceWatchLogsProcedure, + connect.WithSchema(runtimeServiceWatchLogsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listResources: connect.NewClient[v1.ListResourcesRequest, v1.ListResourcesResponse]( + httpClient, + baseURL+RuntimeServiceListResourcesProcedure, + connect.WithSchema(runtimeServiceListResourcesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + watchResources: connect.NewClient[v1.WatchResourcesRequest, v1.WatchResourcesResponse]( + httpClient, + baseURL+RuntimeServiceWatchResourcesProcedure, + connect.WithSchema(runtimeServiceWatchResourcesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getResource: connect.NewClient[v1.GetResourceRequest, v1.GetResourceResponse]( + httpClient, + baseURL+RuntimeServiceGetResourceProcedure, + connect.WithSchema(runtimeServiceGetResourceMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getExplore: connect.NewClient[v1.GetExploreRequest, v1.GetExploreResponse]( + httpClient, + baseURL+RuntimeServiceGetExploreProcedure, + connect.WithSchema(runtimeServiceGetExploreMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getModelPartitions: connect.NewClient[v1.GetModelPartitionsRequest, v1.GetModelPartitionsResponse]( + httpClient, + baseURL+RuntimeServiceGetModelPartitionsProcedure, + connect.WithSchema(runtimeServiceGetModelPartitionsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + createTrigger: connect.NewClient[v1.CreateTriggerRequest, v1.CreateTriggerResponse]( + httpClient, + baseURL+RuntimeServiceCreateTriggerProcedure, + connect.WithSchema(runtimeServiceCreateTriggerMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listConnectorDrivers: connect.NewClient[v1.ListConnectorDriversRequest, v1.ListConnectorDriversResponse]( + httpClient, + baseURL+RuntimeServiceListConnectorDriversProcedure, + connect.WithSchema(runtimeServiceListConnectorDriversMethodDescriptor), + connect.WithClientOptions(opts...), + ), + analyzeConnectors: connect.NewClient[v1.AnalyzeConnectorsRequest, v1.AnalyzeConnectorsResponse]( + httpClient, + baseURL+RuntimeServiceAnalyzeConnectorsProcedure, + connect.WithSchema(runtimeServiceAnalyzeConnectorsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listNotifierConnectors: connect.NewClient[v1.ListNotifierConnectorsRequest, v1.ListNotifierConnectorsResponse]( + httpClient, + baseURL+RuntimeServiceListNotifierConnectorsProcedure, + connect.WithSchema(runtimeServiceListNotifierConnectorsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listConversations: connect.NewClient[v1.ListConversationsRequest, v1.ListConversationsResponse]( + httpClient, + baseURL+RuntimeServiceListConversationsProcedure, + connect.WithSchema(runtimeServiceListConversationsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getConversation: connect.NewClient[v1.GetConversationRequest, v1.GetConversationResponse]( + httpClient, + baseURL+RuntimeServiceGetConversationProcedure, + connect.WithSchema(runtimeServiceGetConversationMethodDescriptor), + connect.WithClientOptions(opts...), + ), + shareConversation: connect.NewClient[v1.ShareConversationRequest, v1.ShareConversationResponse]( + httpClient, + baseURL+RuntimeServiceShareConversationProcedure, + connect.WithSchema(runtimeServiceShareConversationMethodDescriptor), + connect.WithClientOptions(opts...), + ), + forkConversation: connect.NewClient[v1.ForkConversationRequest, v1.ForkConversationResponse]( + httpClient, + baseURL+RuntimeServiceForkConversationProcedure, + connect.WithSchema(runtimeServiceForkConversationMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listTools: connect.NewClient[v1.ListToolsRequest, v1.ListToolsResponse]( + httpClient, + baseURL+RuntimeServiceListToolsProcedure, + connect.WithSchema(runtimeServiceListToolsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + complete: connect.NewClient[v1.CompleteRequest, v1.CompleteResponse]( + httpClient, + baseURL+RuntimeServiceCompleteProcedure, + connect.WithSchema(runtimeServiceCompleteMethodDescriptor), + connect.WithClientOptions(opts...), + ), + completeStreaming: connect.NewClient[v1.CompleteStreamingRequest, v1.CompleteStreamingResponse]( + httpClient, + baseURL+RuntimeServiceCompleteStreamingProcedure, + connect.WithSchema(runtimeServiceCompleteStreamingMethodDescriptor), + connect.WithClientOptions(opts...), + ), + issueDevJWT: connect.NewClient[v1.IssueDevJWTRequest, v1.IssueDevJWTResponse]( + httpClient, + baseURL+RuntimeServiceIssueDevJWTProcedure, + connect.WithSchema(runtimeServiceIssueDevJWTMethodDescriptor), + connect.WithClientOptions(opts...), + ), + analyzeVariables: connect.NewClient[v1.AnalyzeVariablesRequest, v1.AnalyzeVariablesResponse]( + httpClient, + baseURL+RuntimeServiceAnalyzeVariablesProcedure, + connect.WithSchema(runtimeServiceAnalyzeVariablesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// runtimeServiceClient implements RuntimeServiceClient. +type runtimeServiceClient struct { + ping *connect.Client[v1.PingRequest, v1.PingResponse] + health *connect.Client[v1.HealthRequest, v1.HealthResponse] + instanceHealth *connect.Client[v1.InstanceHealthRequest, v1.InstanceHealthResponse] + listInstances *connect.Client[v1.ListInstancesRequest, v1.ListInstancesResponse] + getInstance *connect.Client[v1.GetInstanceRequest, v1.GetInstanceResponse] + createInstance *connect.Client[v1.CreateInstanceRequest, v1.CreateInstanceResponse] + editInstance *connect.Client[v1.EditInstanceRequest, v1.EditInstanceResponse] + deleteInstance *connect.Client[v1.DeleteInstanceRequest, v1.DeleteInstanceResponse] + reloadConfig *connect.Client[v1.ReloadConfigRequest, v1.ReloadConfigResponse] + listFiles *connect.Client[v1.ListFilesRequest, v1.ListFilesResponse] + watchFiles *connect.Client[v1.WatchFilesRequest, v1.WatchFilesResponse] + getFile *connect.Client[v1.GetFileRequest, v1.GetFileResponse] + putFile *connect.Client[v1.PutFileRequest, v1.PutFileResponse] + createDirectory *connect.Client[v1.CreateDirectoryRequest, v1.CreateDirectoryResponse] + deleteFile *connect.Client[v1.DeleteFileRequest, v1.DeleteFileResponse] + renameFile *connect.Client[v1.RenameFileRequest, v1.RenameFileResponse] + listExamples *connect.Client[v1.ListExamplesRequest, v1.ListExamplesResponse] + unpackExample *connect.Client[v1.UnpackExampleRequest, v1.UnpackExampleResponse] + unpackEmpty *connect.Client[v1.UnpackEmptyRequest, v1.UnpackEmptyResponse] + generateMetricsViewFile *connect.Client[v1.GenerateMetricsViewFileRequest, v1.GenerateMetricsViewFileResponse] + generateCanvasFile *connect.Client[v1.GenerateCanvasFileRequest, v1.GenerateCanvasFileResponse] + generateResolver *connect.Client[v1.GenerateResolverRequest, v1.GenerateResolverResponse] + generateRenderer *connect.Client[v1.GenerateRendererRequest, v1.GenerateRendererResponse] + queryResolver *connect.Client[v1.QueryResolverRequest, v1.QueryResolverResponse] + getLogs *connect.Client[v1.GetLogsRequest, v1.GetLogsResponse] + watchLogs *connect.Client[v1.WatchLogsRequest, v1.WatchLogsResponse] + listResources *connect.Client[v1.ListResourcesRequest, v1.ListResourcesResponse] + watchResources *connect.Client[v1.WatchResourcesRequest, v1.WatchResourcesResponse] + getResource *connect.Client[v1.GetResourceRequest, v1.GetResourceResponse] + getExplore *connect.Client[v1.GetExploreRequest, v1.GetExploreResponse] + getModelPartitions *connect.Client[v1.GetModelPartitionsRequest, v1.GetModelPartitionsResponse] + createTrigger *connect.Client[v1.CreateTriggerRequest, v1.CreateTriggerResponse] + listConnectorDrivers *connect.Client[v1.ListConnectorDriversRequest, v1.ListConnectorDriversResponse] + analyzeConnectors *connect.Client[v1.AnalyzeConnectorsRequest, v1.AnalyzeConnectorsResponse] + listNotifierConnectors *connect.Client[v1.ListNotifierConnectorsRequest, v1.ListNotifierConnectorsResponse] + listConversations *connect.Client[v1.ListConversationsRequest, v1.ListConversationsResponse] + getConversation *connect.Client[v1.GetConversationRequest, v1.GetConversationResponse] + shareConversation *connect.Client[v1.ShareConversationRequest, v1.ShareConversationResponse] + forkConversation *connect.Client[v1.ForkConversationRequest, v1.ForkConversationResponse] + listTools *connect.Client[v1.ListToolsRequest, v1.ListToolsResponse] + complete *connect.Client[v1.CompleteRequest, v1.CompleteResponse] + completeStreaming *connect.Client[v1.CompleteStreamingRequest, v1.CompleteStreamingResponse] + issueDevJWT *connect.Client[v1.IssueDevJWTRequest, v1.IssueDevJWTResponse] + analyzeVariables *connect.Client[v1.AnalyzeVariablesRequest, v1.AnalyzeVariablesResponse] +} + +// Ping calls rill.runtime.v1.RuntimeService.Ping. +func (c *runtimeServiceClient) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { + return c.ping.CallUnary(ctx, req) +} + +// Health calls rill.runtime.v1.RuntimeService.Health. +func (c *runtimeServiceClient) Health(ctx context.Context, req *connect.Request[v1.HealthRequest]) (*connect.Response[v1.HealthResponse], error) { + return c.health.CallUnary(ctx, req) +} + +// InstanceHealth calls rill.runtime.v1.RuntimeService.InstanceHealth. +func (c *runtimeServiceClient) InstanceHealth(ctx context.Context, req *connect.Request[v1.InstanceHealthRequest]) (*connect.Response[v1.InstanceHealthResponse], error) { + return c.instanceHealth.CallUnary(ctx, req) +} + +// ListInstances calls rill.runtime.v1.RuntimeService.ListInstances. +func (c *runtimeServiceClient) ListInstances(ctx context.Context, req *connect.Request[v1.ListInstancesRequest]) (*connect.Response[v1.ListInstancesResponse], error) { + return c.listInstances.CallUnary(ctx, req) +} + +// GetInstance calls rill.runtime.v1.RuntimeService.GetInstance. +func (c *runtimeServiceClient) GetInstance(ctx context.Context, req *connect.Request[v1.GetInstanceRequest]) (*connect.Response[v1.GetInstanceResponse], error) { + return c.getInstance.CallUnary(ctx, req) +} + +// CreateInstance calls rill.runtime.v1.RuntimeService.CreateInstance. +func (c *runtimeServiceClient) CreateInstance(ctx context.Context, req *connect.Request[v1.CreateInstanceRequest]) (*connect.Response[v1.CreateInstanceResponse], error) { + return c.createInstance.CallUnary(ctx, req) +} + +// EditInstance calls rill.runtime.v1.RuntimeService.EditInstance. +func (c *runtimeServiceClient) EditInstance(ctx context.Context, req *connect.Request[v1.EditInstanceRequest]) (*connect.Response[v1.EditInstanceResponse], error) { + return c.editInstance.CallUnary(ctx, req) +} + +// DeleteInstance calls rill.runtime.v1.RuntimeService.DeleteInstance. +func (c *runtimeServiceClient) DeleteInstance(ctx context.Context, req *connect.Request[v1.DeleteInstanceRequest]) (*connect.Response[v1.DeleteInstanceResponse], error) { + return c.deleteInstance.CallUnary(ctx, req) +} + +// ReloadConfig calls rill.runtime.v1.RuntimeService.ReloadConfig. +func (c *runtimeServiceClient) ReloadConfig(ctx context.Context, req *connect.Request[v1.ReloadConfigRequest]) (*connect.Response[v1.ReloadConfigResponse], error) { + return c.reloadConfig.CallUnary(ctx, req) +} + +// ListFiles calls rill.runtime.v1.RuntimeService.ListFiles. +func (c *runtimeServiceClient) ListFiles(ctx context.Context, req *connect.Request[v1.ListFilesRequest]) (*connect.Response[v1.ListFilesResponse], error) { + return c.listFiles.CallUnary(ctx, req) +} + +// WatchFiles calls rill.runtime.v1.RuntimeService.WatchFiles. +func (c *runtimeServiceClient) WatchFiles(ctx context.Context, req *connect.Request[v1.WatchFilesRequest]) (*connect.ServerStreamForClient[v1.WatchFilesResponse], error) { + return c.watchFiles.CallServerStream(ctx, req) +} + +// GetFile calls rill.runtime.v1.RuntimeService.GetFile. +func (c *runtimeServiceClient) GetFile(ctx context.Context, req *connect.Request[v1.GetFileRequest]) (*connect.Response[v1.GetFileResponse], error) { + return c.getFile.CallUnary(ctx, req) +} + +// PutFile calls rill.runtime.v1.RuntimeService.PutFile. +func (c *runtimeServiceClient) PutFile(ctx context.Context, req *connect.Request[v1.PutFileRequest]) (*connect.Response[v1.PutFileResponse], error) { + return c.putFile.CallUnary(ctx, req) +} + +// CreateDirectory calls rill.runtime.v1.RuntimeService.CreateDirectory. +func (c *runtimeServiceClient) CreateDirectory(ctx context.Context, req *connect.Request[v1.CreateDirectoryRequest]) (*connect.Response[v1.CreateDirectoryResponse], error) { + return c.createDirectory.CallUnary(ctx, req) +} + +// DeleteFile calls rill.runtime.v1.RuntimeService.DeleteFile. +func (c *runtimeServiceClient) DeleteFile(ctx context.Context, req *connect.Request[v1.DeleteFileRequest]) (*connect.Response[v1.DeleteFileResponse], error) { + return c.deleteFile.CallUnary(ctx, req) +} + +// RenameFile calls rill.runtime.v1.RuntimeService.RenameFile. +func (c *runtimeServiceClient) RenameFile(ctx context.Context, req *connect.Request[v1.RenameFileRequest]) (*connect.Response[v1.RenameFileResponse], error) { + return c.renameFile.CallUnary(ctx, req) +} + +// ListExamples calls rill.runtime.v1.RuntimeService.ListExamples. +func (c *runtimeServiceClient) ListExamples(ctx context.Context, req *connect.Request[v1.ListExamplesRequest]) (*connect.Response[v1.ListExamplesResponse], error) { + return c.listExamples.CallUnary(ctx, req) +} + +// UnpackExample calls rill.runtime.v1.RuntimeService.UnpackExample. +func (c *runtimeServiceClient) UnpackExample(ctx context.Context, req *connect.Request[v1.UnpackExampleRequest]) (*connect.Response[v1.UnpackExampleResponse], error) { + return c.unpackExample.CallUnary(ctx, req) +} + +// UnpackEmpty calls rill.runtime.v1.RuntimeService.UnpackEmpty. +func (c *runtimeServiceClient) UnpackEmpty(ctx context.Context, req *connect.Request[v1.UnpackEmptyRequest]) (*connect.Response[v1.UnpackEmptyResponse], error) { + return c.unpackEmpty.CallUnary(ctx, req) +} + +// GenerateMetricsViewFile calls rill.runtime.v1.RuntimeService.GenerateMetricsViewFile. +func (c *runtimeServiceClient) GenerateMetricsViewFile(ctx context.Context, req *connect.Request[v1.GenerateMetricsViewFileRequest]) (*connect.Response[v1.GenerateMetricsViewFileResponse], error) { + return c.generateMetricsViewFile.CallUnary(ctx, req) +} + +// GenerateCanvasFile calls rill.runtime.v1.RuntimeService.GenerateCanvasFile. +func (c *runtimeServiceClient) GenerateCanvasFile(ctx context.Context, req *connect.Request[v1.GenerateCanvasFileRequest]) (*connect.Response[v1.GenerateCanvasFileResponse], error) { + return c.generateCanvasFile.CallUnary(ctx, req) +} + +// GenerateResolver calls rill.runtime.v1.RuntimeService.GenerateResolver. +func (c *runtimeServiceClient) GenerateResolver(ctx context.Context, req *connect.Request[v1.GenerateResolverRequest]) (*connect.Response[v1.GenerateResolverResponse], error) { + return c.generateResolver.CallUnary(ctx, req) +} + +// GenerateRenderer calls rill.runtime.v1.RuntimeService.GenerateRenderer. +func (c *runtimeServiceClient) GenerateRenderer(ctx context.Context, req *connect.Request[v1.GenerateRendererRequest]) (*connect.Response[v1.GenerateRendererResponse], error) { + return c.generateRenderer.CallUnary(ctx, req) +} + +// QueryResolver calls rill.runtime.v1.RuntimeService.QueryResolver. +func (c *runtimeServiceClient) QueryResolver(ctx context.Context, req *connect.Request[v1.QueryResolverRequest]) (*connect.Response[v1.QueryResolverResponse], error) { + return c.queryResolver.CallUnary(ctx, req) +} + +// GetLogs calls rill.runtime.v1.RuntimeService.GetLogs. +func (c *runtimeServiceClient) GetLogs(ctx context.Context, req *connect.Request[v1.GetLogsRequest]) (*connect.Response[v1.GetLogsResponse], error) { + return c.getLogs.CallUnary(ctx, req) +} + +// WatchLogs calls rill.runtime.v1.RuntimeService.WatchLogs. +func (c *runtimeServiceClient) WatchLogs(ctx context.Context, req *connect.Request[v1.WatchLogsRequest]) (*connect.ServerStreamForClient[v1.WatchLogsResponse], error) { + return c.watchLogs.CallServerStream(ctx, req) +} + +// ListResources calls rill.runtime.v1.RuntimeService.ListResources. +func (c *runtimeServiceClient) ListResources(ctx context.Context, req *connect.Request[v1.ListResourcesRequest]) (*connect.Response[v1.ListResourcesResponse], error) { + return c.listResources.CallUnary(ctx, req) +} + +// WatchResources calls rill.runtime.v1.RuntimeService.WatchResources. +func (c *runtimeServiceClient) WatchResources(ctx context.Context, req *connect.Request[v1.WatchResourcesRequest]) (*connect.ServerStreamForClient[v1.WatchResourcesResponse], error) { + return c.watchResources.CallServerStream(ctx, req) +} + +// GetResource calls rill.runtime.v1.RuntimeService.GetResource. +func (c *runtimeServiceClient) GetResource(ctx context.Context, req *connect.Request[v1.GetResourceRequest]) (*connect.Response[v1.GetResourceResponse], error) { + return c.getResource.CallUnary(ctx, req) +} + +// GetExplore calls rill.runtime.v1.RuntimeService.GetExplore. +func (c *runtimeServiceClient) GetExplore(ctx context.Context, req *connect.Request[v1.GetExploreRequest]) (*connect.Response[v1.GetExploreResponse], error) { + return c.getExplore.CallUnary(ctx, req) +} + +// GetModelPartitions calls rill.runtime.v1.RuntimeService.GetModelPartitions. +func (c *runtimeServiceClient) GetModelPartitions(ctx context.Context, req *connect.Request[v1.GetModelPartitionsRequest]) (*connect.Response[v1.GetModelPartitionsResponse], error) { + return c.getModelPartitions.CallUnary(ctx, req) +} + +// CreateTrigger calls rill.runtime.v1.RuntimeService.CreateTrigger. +func (c *runtimeServiceClient) CreateTrigger(ctx context.Context, req *connect.Request[v1.CreateTriggerRequest]) (*connect.Response[v1.CreateTriggerResponse], error) { + return c.createTrigger.CallUnary(ctx, req) +} + +// ListConnectorDrivers calls rill.runtime.v1.RuntimeService.ListConnectorDrivers. +func (c *runtimeServiceClient) ListConnectorDrivers(ctx context.Context, req *connect.Request[v1.ListConnectorDriversRequest]) (*connect.Response[v1.ListConnectorDriversResponse], error) { + return c.listConnectorDrivers.CallUnary(ctx, req) +} + +// AnalyzeConnectors calls rill.runtime.v1.RuntimeService.AnalyzeConnectors. +func (c *runtimeServiceClient) AnalyzeConnectors(ctx context.Context, req *connect.Request[v1.AnalyzeConnectorsRequest]) (*connect.Response[v1.AnalyzeConnectorsResponse], error) { + return c.analyzeConnectors.CallUnary(ctx, req) +} + +// ListNotifierConnectors calls rill.runtime.v1.RuntimeService.ListNotifierConnectors. +func (c *runtimeServiceClient) ListNotifierConnectors(ctx context.Context, req *connect.Request[v1.ListNotifierConnectorsRequest]) (*connect.Response[v1.ListNotifierConnectorsResponse], error) { + return c.listNotifierConnectors.CallUnary(ctx, req) +} + +// ListConversations calls rill.runtime.v1.RuntimeService.ListConversations. +func (c *runtimeServiceClient) ListConversations(ctx context.Context, req *connect.Request[v1.ListConversationsRequest]) (*connect.Response[v1.ListConversationsResponse], error) { + return c.listConversations.CallUnary(ctx, req) +} + +// GetConversation calls rill.runtime.v1.RuntimeService.GetConversation. +func (c *runtimeServiceClient) GetConversation(ctx context.Context, req *connect.Request[v1.GetConversationRequest]) (*connect.Response[v1.GetConversationResponse], error) { + return c.getConversation.CallUnary(ctx, req) +} + +// ShareConversation calls rill.runtime.v1.RuntimeService.ShareConversation. +func (c *runtimeServiceClient) ShareConversation(ctx context.Context, req *connect.Request[v1.ShareConversationRequest]) (*connect.Response[v1.ShareConversationResponse], error) { + return c.shareConversation.CallUnary(ctx, req) +} + +// ForkConversation calls rill.runtime.v1.RuntimeService.ForkConversation. +func (c *runtimeServiceClient) ForkConversation(ctx context.Context, req *connect.Request[v1.ForkConversationRequest]) (*connect.Response[v1.ForkConversationResponse], error) { + return c.forkConversation.CallUnary(ctx, req) +} + +// ListTools calls rill.runtime.v1.RuntimeService.ListTools. +func (c *runtimeServiceClient) ListTools(ctx context.Context, req *connect.Request[v1.ListToolsRequest]) (*connect.Response[v1.ListToolsResponse], error) { + return c.listTools.CallUnary(ctx, req) +} + +// Complete calls rill.runtime.v1.RuntimeService.Complete. +func (c *runtimeServiceClient) Complete(ctx context.Context, req *connect.Request[v1.CompleteRequest]) (*connect.Response[v1.CompleteResponse], error) { + return c.complete.CallUnary(ctx, req) +} + +// CompleteStreaming calls rill.runtime.v1.RuntimeService.CompleteStreaming. +func (c *runtimeServiceClient) CompleteStreaming(ctx context.Context, req *connect.Request[v1.CompleteStreamingRequest]) (*connect.ServerStreamForClient[v1.CompleteStreamingResponse], error) { + return c.completeStreaming.CallServerStream(ctx, req) +} + +// IssueDevJWT calls rill.runtime.v1.RuntimeService.IssueDevJWT. +func (c *runtimeServiceClient) IssueDevJWT(ctx context.Context, req *connect.Request[v1.IssueDevJWTRequest]) (*connect.Response[v1.IssueDevJWTResponse], error) { + return c.issueDevJWT.CallUnary(ctx, req) +} + +// AnalyzeVariables calls rill.runtime.v1.RuntimeService.AnalyzeVariables. +func (c *runtimeServiceClient) AnalyzeVariables(ctx context.Context, req *connect.Request[v1.AnalyzeVariablesRequest]) (*connect.Response[v1.AnalyzeVariablesResponse], error) { + return c.analyzeVariables.CallUnary(ctx, req) +} + +// RuntimeServiceHandler is an implementation of the rill.runtime.v1.RuntimeService service. +type RuntimeServiceHandler interface { + // Ping returns information about the runtime + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) + // Health runs a health check on the runtime. + Health(context.Context, *connect.Request[v1.HealthRequest]) (*connect.Response[v1.HealthResponse], error) + // InstanceHealth runs a health check on a specific instance. + InstanceHealth(context.Context, *connect.Request[v1.InstanceHealthRequest]) (*connect.Response[v1.InstanceHealthResponse], error) + // ListInstances lists all the instances currently managed by the runtime + ListInstances(context.Context, *connect.Request[v1.ListInstancesRequest]) (*connect.Response[v1.ListInstancesResponse], error) + // GetInstance returns information about a specific instance + GetInstance(context.Context, *connect.Request[v1.GetInstanceRequest]) (*connect.Response[v1.GetInstanceResponse], error) + // CreateInstance creates a new instance + CreateInstance(context.Context, *connect.Request[v1.CreateInstanceRequest]) (*connect.Response[v1.CreateInstanceResponse], error) + // EditInstance edits an existing instance + EditInstance(context.Context, *connect.Request[v1.EditInstanceRequest]) (*connect.Response[v1.EditInstanceResponse], error) + // DeleteInstance deletes an instance + DeleteInstance(context.Context, *connect.Request[v1.DeleteInstanceRequest]) (*connect.Response[v1.DeleteInstanceResponse], error) + // ReloadConfig pulls the latest configuration from the admin service and triggers a repo pull. + // If the instance doesn't have an admin connector, this RPC does nothing. + ReloadConfig(context.Context, *connect.Request[v1.ReloadConfigRequest]) (*connect.Response[v1.ReloadConfigResponse], error) + // ListFiles lists all the files matching a glob in a repo. + // The files are sorted by their full path. + ListFiles(context.Context, *connect.Request[v1.ListFilesRequest]) (*connect.Response[v1.ListFilesResponse], error) + // WatchFiles streams repo file update events. It is not supported on all backends. + WatchFiles(context.Context, *connect.Request[v1.WatchFilesRequest], *connect.ServerStream[v1.WatchFilesResponse]) error + // GetFile returns the contents of a specific file in a repo. + GetFile(context.Context, *connect.Request[v1.GetFileRequest]) (*connect.Response[v1.GetFileResponse], error) + // PutFile creates or updates a file in a repo + PutFile(context.Context, *connect.Request[v1.PutFileRequest]) (*connect.Response[v1.PutFileResponse], error) + // CreateDirectory create a directory for the given path + CreateDirectory(context.Context, *connect.Request[v1.CreateDirectoryRequest]) (*connect.Response[v1.CreateDirectoryResponse], error) + // DeleteFile deletes a file from a repo + DeleteFile(context.Context, *connect.Request[v1.DeleteFileRequest]) (*connect.Response[v1.DeleteFileResponse], error) + // RenameFile renames a file in a repo + RenameFile(context.Context, *connect.Request[v1.RenameFileRequest]) (*connect.Response[v1.RenameFileResponse], error) + // ListExamples lists all the examples embedded into binary + ListExamples(context.Context, *connect.Request[v1.ListExamplesRequest]) (*connect.Response[v1.ListExamplesResponse], error) + // UnpackExample unpacks an example project + UnpackExample(context.Context, *connect.Request[v1.UnpackExampleRequest]) (*connect.Response[v1.UnpackExampleResponse], error) + // UnpackEmpty unpacks an empty project + UnpackEmpty(context.Context, *connect.Request[v1.UnpackEmptyRequest]) (*connect.Response[v1.UnpackEmptyResponse], error) + // GenerateMetricsViewFile generates a metrics view YAML file from a table in an OLAP database + GenerateMetricsViewFile(context.Context, *connect.Request[v1.GenerateMetricsViewFileRequest]) (*connect.Response[v1.GenerateMetricsViewFileResponse], error) + // GenerateCanvasFile generates a canvas YAML file from a metrics view + GenerateCanvasFile(context.Context, *connect.Request[v1.GenerateCanvasFileRequest]) (*connect.Response[v1.GenerateCanvasFileResponse], error) + // GenerateResolver generates resolver and resolver properties from a table or a metrics view + GenerateResolver(context.Context, *connect.Request[v1.GenerateResolverRequest]) (*connect.Response[v1.GenerateResolverResponse], error) + // GenerateRenderer generates a component renderer and renderer properties from a resolver and resolver properties + GenerateRenderer(context.Context, *connect.Request[v1.GenerateRendererRequest]) (*connect.Response[v1.GenerateRendererResponse], error) + // QueryResolver queries a resolver with the given properties and arguments + QueryResolver(context.Context, *connect.Request[v1.QueryResolverRequest]) (*connect.Response[v1.QueryResolverResponse], error) + // GetLogs returns recent logs from a controller + GetLogs(context.Context, *connect.Request[v1.GetLogsRequest]) (*connect.Response[v1.GetLogsResponse], error) + // WatchLogs streams new logs emitted from a controller + WatchLogs(context.Context, *connect.Request[v1.WatchLogsRequest], *connect.ServerStream[v1.WatchLogsResponse]) error + // ListResources lists the resources stored in the catalog + ListResources(context.Context, *connect.Request[v1.ListResourcesRequest]) (*connect.Response[v1.ListResourcesResponse], error) + // WatchResources streams updates to catalog resources (including creation and deletion events) + WatchResources(context.Context, *connect.Request[v1.WatchResourcesRequest], *connect.ServerStream[v1.WatchResourcesResponse]) error + // GetResource looks up a specific catalog resource + GetResource(context.Context, *connect.Request[v1.GetResourceRequest]) (*connect.Response[v1.GetResourceResponse], error) + // GetExplore is a convenience RPC that combines looking up an Explore resource and its underlying MetricsView into one network call. + GetExplore(context.Context, *connect.Request[v1.GetExploreRequest]) (*connect.Response[v1.GetExploreResponse], error) + // GetModelPartitions returns the partitions of a model + GetModelPartitions(context.Context, *connect.Request[v1.GetModelPartitionsRequest]) (*connect.Response[v1.GetModelPartitionsResponse], error) + // CreateTrigger submits a refresh trigger, which will asynchronously refresh the specified resources. + // Triggers are ephemeral resources that will be cleaned up by the controller. + CreateTrigger(context.Context, *connect.Request[v1.CreateTriggerRequest]) (*connect.Response[v1.CreateTriggerResponse], error) + // ListConnectorDrivers returns a description of all the connector drivers registed in the runtime, + // including their configuration specs and the capabilities they support. + ListConnectorDrivers(context.Context, *connect.Request[v1.ListConnectorDriversRequest]) (*connect.Response[v1.ListConnectorDriversResponse], error) + // AnalyzeConnectors scans all the project files and returns information about all referenced connectors. + AnalyzeConnectors(context.Context, *connect.Request[v1.AnalyzeConnectorsRequest]) (*connect.Response[v1.AnalyzeConnectorsResponse], error) + // ListNotifierConnectors returns the names of all configured connectors that can be used as notifiers. + // This API is much faster than AnalyzeConnectors and can be called without admin-level permissions. + ListNotifierConnectors(context.Context, *connect.Request[v1.ListNotifierConnectorsRequest]) (*connect.Response[v1.ListNotifierConnectorsResponse], error) + // ListConversations lists all AI chat conversations for an instance. + ListConversations(context.Context, *connect.Request[v1.ListConversationsRequest]) (*connect.Response[v1.ListConversationsResponse], error) + // GetConversation returns a specific AI chat conversation. + GetConversation(context.Context, *connect.Request[v1.GetConversationRequest]) (*connect.Response[v1.GetConversationResponse], error) + // ShareConversation enables sharing of the conversation by adding metadata. + ShareConversation(context.Context, *connect.Request[v1.ShareConversationRequest]) (*connect.Response[v1.ShareConversationResponse], error) + // ForkConversation creates a new conversation by copying messages from an existing one. + // If its the owner then all messages will be copied, otherwise only messages up to the session.SharedUntilMessageID are copied. + ForkConversation(context.Context, *connect.Request[v1.ForkConversationRequest]) (*connect.Response[v1.ForkConversationResponse], error) + // ListTools lists metadata about all AI tools that calls to Complete(Streaming) may invoke. + // Note that it covers all registered tools, but the current user may not have access to all of them. + ListTools(context.Context, *connect.Request[v1.ListToolsRequest]) (*connect.Response[v1.ListToolsResponse], error) + // Complete runs a language model completion (LLM chat) using the configured AI connector. + Complete(context.Context, *connect.Request[v1.CompleteRequest]) (*connect.Response[v1.CompleteResponse], error) + // CompleteStreaming runs an AI-powered chat completion, optionally invoking agents or tool calls available in Rill. + CompleteStreaming(context.Context, *connect.Request[v1.CompleteStreamingRequest], *connect.ServerStream[v1.CompleteStreamingResponse]) error + // IssueDevJWT issues a JWT for mimicking a user in local development. + IssueDevJWT(context.Context, *connect.Request[v1.IssueDevJWTRequest]) (*connect.Response[v1.IssueDevJWTResponse], error) + // AnalyzeVariables scans `Source`, `Model` and `Connector` resources in the catalog for use of an environment variable + AnalyzeVariables(context.Context, *connect.Request[v1.AnalyzeVariablesRequest]) (*connect.Response[v1.AnalyzeVariablesResponse], error) +} + +// NewRuntimeServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewRuntimeServiceHandler(svc RuntimeServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + runtimeServicePingHandler := connect.NewUnaryHandler( + RuntimeServicePingProcedure, + svc.Ping, + connect.WithSchema(runtimeServicePingMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceHealthHandler := connect.NewUnaryHandler( + RuntimeServiceHealthProcedure, + svc.Health, + connect.WithSchema(runtimeServiceHealthMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceInstanceHealthHandler := connect.NewUnaryHandler( + RuntimeServiceInstanceHealthProcedure, + svc.InstanceHealth, + connect.WithSchema(runtimeServiceInstanceHealthMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceListInstancesHandler := connect.NewUnaryHandler( + RuntimeServiceListInstancesProcedure, + svc.ListInstances, + connect.WithSchema(runtimeServiceListInstancesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceGetInstanceHandler := connect.NewUnaryHandler( + RuntimeServiceGetInstanceProcedure, + svc.GetInstance, + connect.WithSchema(runtimeServiceGetInstanceMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceCreateInstanceHandler := connect.NewUnaryHandler( + RuntimeServiceCreateInstanceProcedure, + svc.CreateInstance, + connect.WithSchema(runtimeServiceCreateInstanceMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceEditInstanceHandler := connect.NewUnaryHandler( + RuntimeServiceEditInstanceProcedure, + svc.EditInstance, + connect.WithSchema(runtimeServiceEditInstanceMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceDeleteInstanceHandler := connect.NewUnaryHandler( + RuntimeServiceDeleteInstanceProcedure, + svc.DeleteInstance, + connect.WithSchema(runtimeServiceDeleteInstanceMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceReloadConfigHandler := connect.NewUnaryHandler( + RuntimeServiceReloadConfigProcedure, + svc.ReloadConfig, + connect.WithSchema(runtimeServiceReloadConfigMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceListFilesHandler := connect.NewUnaryHandler( + RuntimeServiceListFilesProcedure, + svc.ListFiles, + connect.WithSchema(runtimeServiceListFilesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceWatchFilesHandler := connect.NewServerStreamHandler( + RuntimeServiceWatchFilesProcedure, + svc.WatchFiles, + connect.WithSchema(runtimeServiceWatchFilesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceGetFileHandler := connect.NewUnaryHandler( + RuntimeServiceGetFileProcedure, + svc.GetFile, + connect.WithSchema(runtimeServiceGetFileMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServicePutFileHandler := connect.NewUnaryHandler( + RuntimeServicePutFileProcedure, + svc.PutFile, + connect.WithSchema(runtimeServicePutFileMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceCreateDirectoryHandler := connect.NewUnaryHandler( + RuntimeServiceCreateDirectoryProcedure, + svc.CreateDirectory, + connect.WithSchema(runtimeServiceCreateDirectoryMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceDeleteFileHandler := connect.NewUnaryHandler( + RuntimeServiceDeleteFileProcedure, + svc.DeleteFile, + connect.WithSchema(runtimeServiceDeleteFileMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceRenameFileHandler := connect.NewUnaryHandler( + RuntimeServiceRenameFileProcedure, + svc.RenameFile, + connect.WithSchema(runtimeServiceRenameFileMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceListExamplesHandler := connect.NewUnaryHandler( + RuntimeServiceListExamplesProcedure, + svc.ListExamples, + connect.WithSchema(runtimeServiceListExamplesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceUnpackExampleHandler := connect.NewUnaryHandler( + RuntimeServiceUnpackExampleProcedure, + svc.UnpackExample, + connect.WithSchema(runtimeServiceUnpackExampleMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceUnpackEmptyHandler := connect.NewUnaryHandler( + RuntimeServiceUnpackEmptyProcedure, + svc.UnpackEmpty, + connect.WithSchema(runtimeServiceUnpackEmptyMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceGenerateMetricsViewFileHandler := connect.NewUnaryHandler( + RuntimeServiceGenerateMetricsViewFileProcedure, + svc.GenerateMetricsViewFile, + connect.WithSchema(runtimeServiceGenerateMetricsViewFileMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceGenerateCanvasFileHandler := connect.NewUnaryHandler( + RuntimeServiceGenerateCanvasFileProcedure, + svc.GenerateCanvasFile, + connect.WithSchema(runtimeServiceGenerateCanvasFileMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceGenerateResolverHandler := connect.NewUnaryHandler( + RuntimeServiceGenerateResolverProcedure, + svc.GenerateResolver, + connect.WithSchema(runtimeServiceGenerateResolverMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceGenerateRendererHandler := connect.NewUnaryHandler( + RuntimeServiceGenerateRendererProcedure, + svc.GenerateRenderer, + connect.WithSchema(runtimeServiceGenerateRendererMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceQueryResolverHandler := connect.NewUnaryHandler( + RuntimeServiceQueryResolverProcedure, + svc.QueryResolver, + connect.WithSchema(runtimeServiceQueryResolverMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceGetLogsHandler := connect.NewUnaryHandler( + RuntimeServiceGetLogsProcedure, + svc.GetLogs, + connect.WithSchema(runtimeServiceGetLogsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceWatchLogsHandler := connect.NewServerStreamHandler( + RuntimeServiceWatchLogsProcedure, + svc.WatchLogs, + connect.WithSchema(runtimeServiceWatchLogsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceListResourcesHandler := connect.NewUnaryHandler( + RuntimeServiceListResourcesProcedure, + svc.ListResources, + connect.WithSchema(runtimeServiceListResourcesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceWatchResourcesHandler := connect.NewServerStreamHandler( + RuntimeServiceWatchResourcesProcedure, + svc.WatchResources, + connect.WithSchema(runtimeServiceWatchResourcesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceGetResourceHandler := connect.NewUnaryHandler( + RuntimeServiceGetResourceProcedure, + svc.GetResource, + connect.WithSchema(runtimeServiceGetResourceMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceGetExploreHandler := connect.NewUnaryHandler( + RuntimeServiceGetExploreProcedure, + svc.GetExplore, + connect.WithSchema(runtimeServiceGetExploreMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceGetModelPartitionsHandler := connect.NewUnaryHandler( + RuntimeServiceGetModelPartitionsProcedure, + svc.GetModelPartitions, + connect.WithSchema(runtimeServiceGetModelPartitionsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceCreateTriggerHandler := connect.NewUnaryHandler( + RuntimeServiceCreateTriggerProcedure, + svc.CreateTrigger, + connect.WithSchema(runtimeServiceCreateTriggerMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceListConnectorDriversHandler := connect.NewUnaryHandler( + RuntimeServiceListConnectorDriversProcedure, + svc.ListConnectorDrivers, + connect.WithSchema(runtimeServiceListConnectorDriversMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceAnalyzeConnectorsHandler := connect.NewUnaryHandler( + RuntimeServiceAnalyzeConnectorsProcedure, + svc.AnalyzeConnectors, + connect.WithSchema(runtimeServiceAnalyzeConnectorsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceListNotifierConnectorsHandler := connect.NewUnaryHandler( + RuntimeServiceListNotifierConnectorsProcedure, + svc.ListNotifierConnectors, + connect.WithSchema(runtimeServiceListNotifierConnectorsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceListConversationsHandler := connect.NewUnaryHandler( + RuntimeServiceListConversationsProcedure, + svc.ListConversations, + connect.WithSchema(runtimeServiceListConversationsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceGetConversationHandler := connect.NewUnaryHandler( + RuntimeServiceGetConversationProcedure, + svc.GetConversation, + connect.WithSchema(runtimeServiceGetConversationMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceShareConversationHandler := connect.NewUnaryHandler( + RuntimeServiceShareConversationProcedure, + svc.ShareConversation, + connect.WithSchema(runtimeServiceShareConversationMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceForkConversationHandler := connect.NewUnaryHandler( + RuntimeServiceForkConversationProcedure, + svc.ForkConversation, + connect.WithSchema(runtimeServiceForkConversationMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceListToolsHandler := connect.NewUnaryHandler( + RuntimeServiceListToolsProcedure, + svc.ListTools, + connect.WithSchema(runtimeServiceListToolsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceCompleteHandler := connect.NewUnaryHandler( + RuntimeServiceCompleteProcedure, + svc.Complete, + connect.WithSchema(runtimeServiceCompleteMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceCompleteStreamingHandler := connect.NewServerStreamHandler( + RuntimeServiceCompleteStreamingProcedure, + svc.CompleteStreaming, + connect.WithSchema(runtimeServiceCompleteStreamingMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceIssueDevJWTHandler := connect.NewUnaryHandler( + RuntimeServiceIssueDevJWTProcedure, + svc.IssueDevJWT, + connect.WithSchema(runtimeServiceIssueDevJWTMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runtimeServiceAnalyzeVariablesHandler := connect.NewUnaryHandler( + RuntimeServiceAnalyzeVariablesProcedure, + svc.AnalyzeVariables, + connect.WithSchema(runtimeServiceAnalyzeVariablesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/rill.runtime.v1.RuntimeService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case RuntimeServicePingProcedure: + runtimeServicePingHandler.ServeHTTP(w, r) + case RuntimeServiceHealthProcedure: + runtimeServiceHealthHandler.ServeHTTP(w, r) + case RuntimeServiceInstanceHealthProcedure: + runtimeServiceInstanceHealthHandler.ServeHTTP(w, r) + case RuntimeServiceListInstancesProcedure: + runtimeServiceListInstancesHandler.ServeHTTP(w, r) + case RuntimeServiceGetInstanceProcedure: + runtimeServiceGetInstanceHandler.ServeHTTP(w, r) + case RuntimeServiceCreateInstanceProcedure: + runtimeServiceCreateInstanceHandler.ServeHTTP(w, r) + case RuntimeServiceEditInstanceProcedure: + runtimeServiceEditInstanceHandler.ServeHTTP(w, r) + case RuntimeServiceDeleteInstanceProcedure: + runtimeServiceDeleteInstanceHandler.ServeHTTP(w, r) + case RuntimeServiceReloadConfigProcedure: + runtimeServiceReloadConfigHandler.ServeHTTP(w, r) + case RuntimeServiceListFilesProcedure: + runtimeServiceListFilesHandler.ServeHTTP(w, r) + case RuntimeServiceWatchFilesProcedure: + runtimeServiceWatchFilesHandler.ServeHTTP(w, r) + case RuntimeServiceGetFileProcedure: + runtimeServiceGetFileHandler.ServeHTTP(w, r) + case RuntimeServicePutFileProcedure: + runtimeServicePutFileHandler.ServeHTTP(w, r) + case RuntimeServiceCreateDirectoryProcedure: + runtimeServiceCreateDirectoryHandler.ServeHTTP(w, r) + case RuntimeServiceDeleteFileProcedure: + runtimeServiceDeleteFileHandler.ServeHTTP(w, r) + case RuntimeServiceRenameFileProcedure: + runtimeServiceRenameFileHandler.ServeHTTP(w, r) + case RuntimeServiceListExamplesProcedure: + runtimeServiceListExamplesHandler.ServeHTTP(w, r) + case RuntimeServiceUnpackExampleProcedure: + runtimeServiceUnpackExampleHandler.ServeHTTP(w, r) + case RuntimeServiceUnpackEmptyProcedure: + runtimeServiceUnpackEmptyHandler.ServeHTTP(w, r) + case RuntimeServiceGenerateMetricsViewFileProcedure: + runtimeServiceGenerateMetricsViewFileHandler.ServeHTTP(w, r) + case RuntimeServiceGenerateCanvasFileProcedure: + runtimeServiceGenerateCanvasFileHandler.ServeHTTP(w, r) + case RuntimeServiceGenerateResolverProcedure: + runtimeServiceGenerateResolverHandler.ServeHTTP(w, r) + case RuntimeServiceGenerateRendererProcedure: + runtimeServiceGenerateRendererHandler.ServeHTTP(w, r) + case RuntimeServiceQueryResolverProcedure: + runtimeServiceQueryResolverHandler.ServeHTTP(w, r) + case RuntimeServiceGetLogsProcedure: + runtimeServiceGetLogsHandler.ServeHTTP(w, r) + case RuntimeServiceWatchLogsProcedure: + runtimeServiceWatchLogsHandler.ServeHTTP(w, r) + case RuntimeServiceListResourcesProcedure: + runtimeServiceListResourcesHandler.ServeHTTP(w, r) + case RuntimeServiceWatchResourcesProcedure: + runtimeServiceWatchResourcesHandler.ServeHTTP(w, r) + case RuntimeServiceGetResourceProcedure: + runtimeServiceGetResourceHandler.ServeHTTP(w, r) + case RuntimeServiceGetExploreProcedure: + runtimeServiceGetExploreHandler.ServeHTTP(w, r) + case RuntimeServiceGetModelPartitionsProcedure: + runtimeServiceGetModelPartitionsHandler.ServeHTTP(w, r) + case RuntimeServiceCreateTriggerProcedure: + runtimeServiceCreateTriggerHandler.ServeHTTP(w, r) + case RuntimeServiceListConnectorDriversProcedure: + runtimeServiceListConnectorDriversHandler.ServeHTTP(w, r) + case RuntimeServiceAnalyzeConnectorsProcedure: + runtimeServiceAnalyzeConnectorsHandler.ServeHTTP(w, r) + case RuntimeServiceListNotifierConnectorsProcedure: + runtimeServiceListNotifierConnectorsHandler.ServeHTTP(w, r) + case RuntimeServiceListConversationsProcedure: + runtimeServiceListConversationsHandler.ServeHTTP(w, r) + case RuntimeServiceGetConversationProcedure: + runtimeServiceGetConversationHandler.ServeHTTP(w, r) + case RuntimeServiceShareConversationProcedure: + runtimeServiceShareConversationHandler.ServeHTTP(w, r) + case RuntimeServiceForkConversationProcedure: + runtimeServiceForkConversationHandler.ServeHTTP(w, r) + case RuntimeServiceListToolsProcedure: + runtimeServiceListToolsHandler.ServeHTTP(w, r) + case RuntimeServiceCompleteProcedure: + runtimeServiceCompleteHandler.ServeHTTP(w, r) + case RuntimeServiceCompleteStreamingProcedure: + runtimeServiceCompleteStreamingHandler.ServeHTTP(w, r) + case RuntimeServiceIssueDevJWTProcedure: + runtimeServiceIssueDevJWTHandler.ServeHTTP(w, r) + case RuntimeServiceAnalyzeVariablesProcedure: + runtimeServiceAnalyzeVariablesHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedRuntimeServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedRuntimeServiceHandler struct{} + +func (UnimplementedRuntimeServiceHandler) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.Ping is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) Health(context.Context, *connect.Request[v1.HealthRequest]) (*connect.Response[v1.HealthResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.Health is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) InstanceHealth(context.Context, *connect.Request[v1.InstanceHealthRequest]) (*connect.Response[v1.InstanceHealthResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.InstanceHealth is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) ListInstances(context.Context, *connect.Request[v1.ListInstancesRequest]) (*connect.Response[v1.ListInstancesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.ListInstances is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) GetInstance(context.Context, *connect.Request[v1.GetInstanceRequest]) (*connect.Response[v1.GetInstanceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.GetInstance is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) CreateInstance(context.Context, *connect.Request[v1.CreateInstanceRequest]) (*connect.Response[v1.CreateInstanceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.CreateInstance is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) EditInstance(context.Context, *connect.Request[v1.EditInstanceRequest]) (*connect.Response[v1.EditInstanceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.EditInstance is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) DeleteInstance(context.Context, *connect.Request[v1.DeleteInstanceRequest]) (*connect.Response[v1.DeleteInstanceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.DeleteInstance is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) ReloadConfig(context.Context, *connect.Request[v1.ReloadConfigRequest]) (*connect.Response[v1.ReloadConfigResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.ReloadConfig is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) ListFiles(context.Context, *connect.Request[v1.ListFilesRequest]) (*connect.Response[v1.ListFilesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.ListFiles is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) WatchFiles(context.Context, *connect.Request[v1.WatchFilesRequest], *connect.ServerStream[v1.WatchFilesResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.WatchFiles is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) GetFile(context.Context, *connect.Request[v1.GetFileRequest]) (*connect.Response[v1.GetFileResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.GetFile is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) PutFile(context.Context, *connect.Request[v1.PutFileRequest]) (*connect.Response[v1.PutFileResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.PutFile is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) CreateDirectory(context.Context, *connect.Request[v1.CreateDirectoryRequest]) (*connect.Response[v1.CreateDirectoryResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.CreateDirectory is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) DeleteFile(context.Context, *connect.Request[v1.DeleteFileRequest]) (*connect.Response[v1.DeleteFileResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.DeleteFile is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) RenameFile(context.Context, *connect.Request[v1.RenameFileRequest]) (*connect.Response[v1.RenameFileResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.RenameFile is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) ListExamples(context.Context, *connect.Request[v1.ListExamplesRequest]) (*connect.Response[v1.ListExamplesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.ListExamples is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) UnpackExample(context.Context, *connect.Request[v1.UnpackExampleRequest]) (*connect.Response[v1.UnpackExampleResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.UnpackExample is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) UnpackEmpty(context.Context, *connect.Request[v1.UnpackEmptyRequest]) (*connect.Response[v1.UnpackEmptyResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.UnpackEmpty is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) GenerateMetricsViewFile(context.Context, *connect.Request[v1.GenerateMetricsViewFileRequest]) (*connect.Response[v1.GenerateMetricsViewFileResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.GenerateMetricsViewFile is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) GenerateCanvasFile(context.Context, *connect.Request[v1.GenerateCanvasFileRequest]) (*connect.Response[v1.GenerateCanvasFileResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.GenerateCanvasFile is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) GenerateResolver(context.Context, *connect.Request[v1.GenerateResolverRequest]) (*connect.Response[v1.GenerateResolverResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.GenerateResolver is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) GenerateRenderer(context.Context, *connect.Request[v1.GenerateRendererRequest]) (*connect.Response[v1.GenerateRendererResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.GenerateRenderer is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) QueryResolver(context.Context, *connect.Request[v1.QueryResolverRequest]) (*connect.Response[v1.QueryResolverResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.QueryResolver is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) GetLogs(context.Context, *connect.Request[v1.GetLogsRequest]) (*connect.Response[v1.GetLogsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.GetLogs is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) WatchLogs(context.Context, *connect.Request[v1.WatchLogsRequest], *connect.ServerStream[v1.WatchLogsResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.WatchLogs is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) ListResources(context.Context, *connect.Request[v1.ListResourcesRequest]) (*connect.Response[v1.ListResourcesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.ListResources is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) WatchResources(context.Context, *connect.Request[v1.WatchResourcesRequest], *connect.ServerStream[v1.WatchResourcesResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.WatchResources is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) GetResource(context.Context, *connect.Request[v1.GetResourceRequest]) (*connect.Response[v1.GetResourceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.GetResource is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) GetExplore(context.Context, *connect.Request[v1.GetExploreRequest]) (*connect.Response[v1.GetExploreResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.GetExplore is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) GetModelPartitions(context.Context, *connect.Request[v1.GetModelPartitionsRequest]) (*connect.Response[v1.GetModelPartitionsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.GetModelPartitions is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) CreateTrigger(context.Context, *connect.Request[v1.CreateTriggerRequest]) (*connect.Response[v1.CreateTriggerResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.CreateTrigger is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) ListConnectorDrivers(context.Context, *connect.Request[v1.ListConnectorDriversRequest]) (*connect.Response[v1.ListConnectorDriversResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.ListConnectorDrivers is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) AnalyzeConnectors(context.Context, *connect.Request[v1.AnalyzeConnectorsRequest]) (*connect.Response[v1.AnalyzeConnectorsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.AnalyzeConnectors is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) ListNotifierConnectors(context.Context, *connect.Request[v1.ListNotifierConnectorsRequest]) (*connect.Response[v1.ListNotifierConnectorsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.ListNotifierConnectors is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) ListConversations(context.Context, *connect.Request[v1.ListConversationsRequest]) (*connect.Response[v1.ListConversationsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.ListConversations is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) GetConversation(context.Context, *connect.Request[v1.GetConversationRequest]) (*connect.Response[v1.GetConversationResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.GetConversation is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) ShareConversation(context.Context, *connect.Request[v1.ShareConversationRequest]) (*connect.Response[v1.ShareConversationResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.ShareConversation is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) ForkConversation(context.Context, *connect.Request[v1.ForkConversationRequest]) (*connect.Response[v1.ForkConversationResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.ForkConversation is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) ListTools(context.Context, *connect.Request[v1.ListToolsRequest]) (*connect.Response[v1.ListToolsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.ListTools is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) Complete(context.Context, *connect.Request[v1.CompleteRequest]) (*connect.Response[v1.CompleteResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.Complete is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) CompleteStreaming(context.Context, *connect.Request[v1.CompleteStreamingRequest], *connect.ServerStream[v1.CompleteStreamingResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.CompleteStreaming is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) IssueDevJWT(context.Context, *connect.Request[v1.IssueDevJWTRequest]) (*connect.Response[v1.IssueDevJWTResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.IssueDevJWT is not implemented")) +} + +func (UnimplementedRuntimeServiceHandler) AnalyzeVariables(context.Context, *connect.Request[v1.AnalyzeVariablesRequest]) (*connect.Response[v1.AnalyzeVariablesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.RuntimeService.AnalyzeVariables is not implemented")) +} diff --git a/proto/gen/rill/runtime/v1/runtimev1connect/connectors.connect.go b/proto/gen/rill/runtime/v1/runtimev1connect/connectors.connect.go new file mode 100644 index 00000000000..10709738ef1 --- /dev/null +++ b/proto/gen/rill/runtime/v1/runtimev1connect/connectors.connect.go @@ -0,0 +1,307 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: rill/runtime/v1/connectors.proto + +package runtimev1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/rilldata/rill/proto/gen/rill/runtime/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // ConnectorServiceName is the fully-qualified name of the ConnectorService service. + ConnectorServiceName = "rill.runtime.v1.ConnectorService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // ConnectorServiceListBucketsProcedure is the fully-qualified name of the ConnectorService's + // ListBuckets RPC. + ConnectorServiceListBucketsProcedure = "/rill.runtime.v1.ConnectorService/ListBuckets" + // ConnectorServiceListObjectsProcedure is the fully-qualified name of the ConnectorService's + // ListObjects RPC. + ConnectorServiceListObjectsProcedure = "/rill.runtime.v1.ConnectorService/ListObjects" + // ConnectorServiceOLAPListTablesProcedure is the fully-qualified name of the ConnectorService's + // OLAPListTables RPC. + ConnectorServiceOLAPListTablesProcedure = "/rill.runtime.v1.ConnectorService/OLAPListTables" + // ConnectorServiceOLAPGetTableProcedure is the fully-qualified name of the ConnectorService's + // OLAPGetTable RPC. + ConnectorServiceOLAPGetTableProcedure = "/rill.runtime.v1.ConnectorService/OLAPGetTable" + // ConnectorServiceListDatabaseSchemasProcedure is the fully-qualified name of the + // ConnectorService's ListDatabaseSchemas RPC. + ConnectorServiceListDatabaseSchemasProcedure = "/rill.runtime.v1.ConnectorService/ListDatabaseSchemas" + // ConnectorServiceListTablesProcedure is the fully-qualified name of the ConnectorService's + // ListTables RPC. + ConnectorServiceListTablesProcedure = "/rill.runtime.v1.ConnectorService/ListTables" + // ConnectorServiceGetTableProcedure is the fully-qualified name of the ConnectorService's GetTable + // RPC. + ConnectorServiceGetTableProcedure = "/rill.runtime.v1.ConnectorService/GetTable" +) + +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + connectorServiceServiceDescriptor = v1.File_rill_runtime_v1_connectors_proto.Services().ByName("ConnectorService") + connectorServiceListBucketsMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("ListBuckets") + connectorServiceListObjectsMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("ListObjects") + connectorServiceOLAPListTablesMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("OLAPListTables") + connectorServiceOLAPGetTableMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("OLAPGetTable") + connectorServiceListDatabaseSchemasMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("ListDatabaseSchemas") + connectorServiceListTablesMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("ListTables") + connectorServiceGetTableMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("GetTable") +) + +// ConnectorServiceClient is a client for the rill.runtime.v1.ConnectorService service. +type ConnectorServiceClient interface { + // ListBuckets lists buckets accessible with the configured credentials. + ListBuckets(context.Context, *connect.Request[v1.ListBucketsRequest]) (*connect.Response[v1.ListBucketsResponse], error) + // ListObjects lists objects for the given bucket. + ListObjects(context.Context, *connect.Request[v1.ListObjectsRequest]) (*connect.Response[v1.ListObjectsResponse], error) + // OLAPListTables list all tables across all databases in an OLAP + OLAPListTables(context.Context, *connect.Request[v1.OLAPListTablesRequest]) (*connect.Response[v1.OLAPListTablesResponse], error) + // OLAPGetTable returns metadata about a table or view in an OLAP + OLAPGetTable(context.Context, *connect.Request[v1.OLAPGetTableRequest]) (*connect.Response[v1.OLAPGetTableResponse], error) + // ListDatabaseSchemas list all schemas across databases + ListDatabaseSchemas(context.Context, *connect.Request[v1.ListDatabaseSchemasRequest]) (*connect.Response[v1.ListDatabaseSchemasResponse], error) + // ListTables list all tables for database and database_schema provided + ListTables(context.Context, *connect.Request[v1.ListTablesRequest]) (*connect.Response[v1.ListTablesResponse], error) + // GetTable returns metadata about a table or view + GetTable(context.Context, *connect.Request[v1.GetTableRequest]) (*connect.Response[v1.GetTableResponse], error) +} + +// NewConnectorServiceClient constructs a client for the rill.runtime.v1.ConnectorService service. +// By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped +// responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewConnectorServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ConnectorServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &connectorServiceClient{ + listBuckets: connect.NewClient[v1.ListBucketsRequest, v1.ListBucketsResponse]( + httpClient, + baseURL+ConnectorServiceListBucketsProcedure, + connect.WithSchema(connectorServiceListBucketsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listObjects: connect.NewClient[v1.ListObjectsRequest, v1.ListObjectsResponse]( + httpClient, + baseURL+ConnectorServiceListObjectsProcedure, + connect.WithSchema(connectorServiceListObjectsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + oLAPListTables: connect.NewClient[v1.OLAPListTablesRequest, v1.OLAPListTablesResponse]( + httpClient, + baseURL+ConnectorServiceOLAPListTablesProcedure, + connect.WithSchema(connectorServiceOLAPListTablesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + oLAPGetTable: connect.NewClient[v1.OLAPGetTableRequest, v1.OLAPGetTableResponse]( + httpClient, + baseURL+ConnectorServiceOLAPGetTableProcedure, + connect.WithSchema(connectorServiceOLAPGetTableMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listDatabaseSchemas: connect.NewClient[v1.ListDatabaseSchemasRequest, v1.ListDatabaseSchemasResponse]( + httpClient, + baseURL+ConnectorServiceListDatabaseSchemasProcedure, + connect.WithSchema(connectorServiceListDatabaseSchemasMethodDescriptor), + connect.WithClientOptions(opts...), + ), + listTables: connect.NewClient[v1.ListTablesRequest, v1.ListTablesResponse]( + httpClient, + baseURL+ConnectorServiceListTablesProcedure, + connect.WithSchema(connectorServiceListTablesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + getTable: connect.NewClient[v1.GetTableRequest, v1.GetTableResponse]( + httpClient, + baseURL+ConnectorServiceGetTableProcedure, + connect.WithSchema(connectorServiceGetTableMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// connectorServiceClient implements ConnectorServiceClient. +type connectorServiceClient struct { + listBuckets *connect.Client[v1.ListBucketsRequest, v1.ListBucketsResponse] + listObjects *connect.Client[v1.ListObjectsRequest, v1.ListObjectsResponse] + oLAPListTables *connect.Client[v1.OLAPListTablesRequest, v1.OLAPListTablesResponse] + oLAPGetTable *connect.Client[v1.OLAPGetTableRequest, v1.OLAPGetTableResponse] + listDatabaseSchemas *connect.Client[v1.ListDatabaseSchemasRequest, v1.ListDatabaseSchemasResponse] + listTables *connect.Client[v1.ListTablesRequest, v1.ListTablesResponse] + getTable *connect.Client[v1.GetTableRequest, v1.GetTableResponse] +} + +// ListBuckets calls rill.runtime.v1.ConnectorService.ListBuckets. +func (c *connectorServiceClient) ListBuckets(ctx context.Context, req *connect.Request[v1.ListBucketsRequest]) (*connect.Response[v1.ListBucketsResponse], error) { + return c.listBuckets.CallUnary(ctx, req) +} + +// ListObjects calls rill.runtime.v1.ConnectorService.ListObjects. +func (c *connectorServiceClient) ListObjects(ctx context.Context, req *connect.Request[v1.ListObjectsRequest]) (*connect.Response[v1.ListObjectsResponse], error) { + return c.listObjects.CallUnary(ctx, req) +} + +// OLAPListTables calls rill.runtime.v1.ConnectorService.OLAPListTables. +func (c *connectorServiceClient) OLAPListTables(ctx context.Context, req *connect.Request[v1.OLAPListTablesRequest]) (*connect.Response[v1.OLAPListTablesResponse], error) { + return c.oLAPListTables.CallUnary(ctx, req) +} + +// OLAPGetTable calls rill.runtime.v1.ConnectorService.OLAPGetTable. +func (c *connectorServiceClient) OLAPGetTable(ctx context.Context, req *connect.Request[v1.OLAPGetTableRequest]) (*connect.Response[v1.OLAPGetTableResponse], error) { + return c.oLAPGetTable.CallUnary(ctx, req) +} + +// ListDatabaseSchemas calls rill.runtime.v1.ConnectorService.ListDatabaseSchemas. +func (c *connectorServiceClient) ListDatabaseSchemas(ctx context.Context, req *connect.Request[v1.ListDatabaseSchemasRequest]) (*connect.Response[v1.ListDatabaseSchemasResponse], error) { + return c.listDatabaseSchemas.CallUnary(ctx, req) +} + +// ListTables calls rill.runtime.v1.ConnectorService.ListTables. +func (c *connectorServiceClient) ListTables(ctx context.Context, req *connect.Request[v1.ListTablesRequest]) (*connect.Response[v1.ListTablesResponse], error) { + return c.listTables.CallUnary(ctx, req) +} + +// GetTable calls rill.runtime.v1.ConnectorService.GetTable. +func (c *connectorServiceClient) GetTable(ctx context.Context, req *connect.Request[v1.GetTableRequest]) (*connect.Response[v1.GetTableResponse], error) { + return c.getTable.CallUnary(ctx, req) +} + +// ConnectorServiceHandler is an implementation of the rill.runtime.v1.ConnectorService service. +type ConnectorServiceHandler interface { + // ListBuckets lists buckets accessible with the configured credentials. + ListBuckets(context.Context, *connect.Request[v1.ListBucketsRequest]) (*connect.Response[v1.ListBucketsResponse], error) + // ListObjects lists objects for the given bucket. + ListObjects(context.Context, *connect.Request[v1.ListObjectsRequest]) (*connect.Response[v1.ListObjectsResponse], error) + // OLAPListTables list all tables across all databases in an OLAP + OLAPListTables(context.Context, *connect.Request[v1.OLAPListTablesRequest]) (*connect.Response[v1.OLAPListTablesResponse], error) + // OLAPGetTable returns metadata about a table or view in an OLAP + OLAPGetTable(context.Context, *connect.Request[v1.OLAPGetTableRequest]) (*connect.Response[v1.OLAPGetTableResponse], error) + // ListDatabaseSchemas list all schemas across databases + ListDatabaseSchemas(context.Context, *connect.Request[v1.ListDatabaseSchemasRequest]) (*connect.Response[v1.ListDatabaseSchemasResponse], error) + // ListTables list all tables for database and database_schema provided + ListTables(context.Context, *connect.Request[v1.ListTablesRequest]) (*connect.Response[v1.ListTablesResponse], error) + // GetTable returns metadata about a table or view + GetTable(context.Context, *connect.Request[v1.GetTableRequest]) (*connect.Response[v1.GetTableResponse], error) +} + +// NewConnectorServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewConnectorServiceHandler(svc ConnectorServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + connectorServiceListBucketsHandler := connect.NewUnaryHandler( + ConnectorServiceListBucketsProcedure, + svc.ListBuckets, + connect.WithSchema(connectorServiceListBucketsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + connectorServiceListObjectsHandler := connect.NewUnaryHandler( + ConnectorServiceListObjectsProcedure, + svc.ListObjects, + connect.WithSchema(connectorServiceListObjectsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + connectorServiceOLAPListTablesHandler := connect.NewUnaryHandler( + ConnectorServiceOLAPListTablesProcedure, + svc.OLAPListTables, + connect.WithSchema(connectorServiceOLAPListTablesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + connectorServiceOLAPGetTableHandler := connect.NewUnaryHandler( + ConnectorServiceOLAPGetTableProcedure, + svc.OLAPGetTable, + connect.WithSchema(connectorServiceOLAPGetTableMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + connectorServiceListDatabaseSchemasHandler := connect.NewUnaryHandler( + ConnectorServiceListDatabaseSchemasProcedure, + svc.ListDatabaseSchemas, + connect.WithSchema(connectorServiceListDatabaseSchemasMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + connectorServiceListTablesHandler := connect.NewUnaryHandler( + ConnectorServiceListTablesProcedure, + svc.ListTables, + connect.WithSchema(connectorServiceListTablesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + connectorServiceGetTableHandler := connect.NewUnaryHandler( + ConnectorServiceGetTableProcedure, + svc.GetTable, + connect.WithSchema(connectorServiceGetTableMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/rill.runtime.v1.ConnectorService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case ConnectorServiceListBucketsProcedure: + connectorServiceListBucketsHandler.ServeHTTP(w, r) + case ConnectorServiceListObjectsProcedure: + connectorServiceListObjectsHandler.ServeHTTP(w, r) + case ConnectorServiceOLAPListTablesProcedure: + connectorServiceOLAPListTablesHandler.ServeHTTP(w, r) + case ConnectorServiceOLAPGetTableProcedure: + connectorServiceOLAPGetTableHandler.ServeHTTP(w, r) + case ConnectorServiceListDatabaseSchemasProcedure: + connectorServiceListDatabaseSchemasHandler.ServeHTTP(w, r) + case ConnectorServiceListTablesProcedure: + connectorServiceListTablesHandler.ServeHTTP(w, r) + case ConnectorServiceGetTableProcedure: + connectorServiceGetTableHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedConnectorServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedConnectorServiceHandler struct{} + +func (UnimplementedConnectorServiceHandler) ListBuckets(context.Context, *connect.Request[v1.ListBucketsRequest]) (*connect.Response[v1.ListBucketsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.ConnectorService.ListBuckets is not implemented")) +} + +func (UnimplementedConnectorServiceHandler) ListObjects(context.Context, *connect.Request[v1.ListObjectsRequest]) (*connect.Response[v1.ListObjectsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.ConnectorService.ListObjects is not implemented")) +} + +func (UnimplementedConnectorServiceHandler) OLAPListTables(context.Context, *connect.Request[v1.OLAPListTablesRequest]) (*connect.Response[v1.OLAPListTablesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.ConnectorService.OLAPListTables is not implemented")) +} + +func (UnimplementedConnectorServiceHandler) OLAPGetTable(context.Context, *connect.Request[v1.OLAPGetTableRequest]) (*connect.Response[v1.OLAPGetTableResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.ConnectorService.OLAPGetTable is not implemented")) +} + +func (UnimplementedConnectorServiceHandler) ListDatabaseSchemas(context.Context, *connect.Request[v1.ListDatabaseSchemasRequest]) (*connect.Response[v1.ListDatabaseSchemasResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.ConnectorService.ListDatabaseSchemas is not implemented")) +} + +func (UnimplementedConnectorServiceHandler) ListTables(context.Context, *connect.Request[v1.ListTablesRequest]) (*connect.Response[v1.ListTablesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.ConnectorService.ListTables is not implemented")) +} + +func (UnimplementedConnectorServiceHandler) GetTable(context.Context, *connect.Request[v1.GetTableRequest]) (*connect.Response[v1.GetTableResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.ConnectorService.GetTable is not implemented")) +} diff --git a/proto/gen/rill/runtime/v1/runtimev1connect/queries.connect.go b/proto/gen/rill/runtime/v1/runtimev1connect/queries.connect.go new file mode 100644 index 00000000000..ebab3585e67 --- /dev/null +++ b/proto/gen/rill/runtime/v1/runtimev1connect/queries.connect.go @@ -0,0 +1,1170 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: rill/runtime/v1/queries.proto + +package runtimev1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/rilldata/rill/proto/gen/rill/runtime/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // QueryServiceName is the fully-qualified name of the QueryService service. + QueryServiceName = "rill.runtime.v1.QueryService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // QueryServiceQueryProcedure is the fully-qualified name of the QueryService's Query RPC. + QueryServiceQueryProcedure = "/rill.runtime.v1.QueryService/Query" + // QueryServiceQueryBatchProcedure is the fully-qualified name of the QueryService's QueryBatch RPC. + QueryServiceQueryBatchProcedure = "/rill.runtime.v1.QueryService/QueryBatch" + // QueryServiceExportProcedure is the fully-qualified name of the QueryService's Export RPC. + QueryServiceExportProcedure = "/rill.runtime.v1.QueryService/Export" + // QueryServiceExportReportProcedure is the fully-qualified name of the QueryService's ExportReport + // RPC. + QueryServiceExportReportProcedure = "/rill.runtime.v1.QueryService/ExportReport" + // QueryServiceMetricsViewAggregationProcedure is the fully-qualified name of the QueryService's + // MetricsViewAggregation RPC. + QueryServiceMetricsViewAggregationProcedure = "/rill.runtime.v1.QueryService/MetricsViewAggregation" + // QueryServiceMetricsViewToplistProcedure is the fully-qualified name of the QueryService's + // MetricsViewToplist RPC. + QueryServiceMetricsViewToplistProcedure = "/rill.runtime.v1.QueryService/MetricsViewToplist" + // QueryServiceMetricsViewComparisonProcedure is the fully-qualified name of the QueryService's + // MetricsViewComparison RPC. + QueryServiceMetricsViewComparisonProcedure = "/rill.runtime.v1.QueryService/MetricsViewComparison" + // QueryServiceMetricsViewTimeSeriesProcedure is the fully-qualified name of the QueryService's + // MetricsViewTimeSeries RPC. + QueryServiceMetricsViewTimeSeriesProcedure = "/rill.runtime.v1.QueryService/MetricsViewTimeSeries" + // QueryServiceMetricsViewTotalsProcedure is the fully-qualified name of the QueryService's + // MetricsViewTotals RPC. + QueryServiceMetricsViewTotalsProcedure = "/rill.runtime.v1.QueryService/MetricsViewTotals" + // QueryServiceMetricsViewRowsProcedure is the fully-qualified name of the QueryService's + // MetricsViewRows RPC. + QueryServiceMetricsViewRowsProcedure = "/rill.runtime.v1.QueryService/MetricsViewRows" + // QueryServiceMetricsViewTimeRangeProcedure is the fully-qualified name of the QueryService's + // MetricsViewTimeRange RPC. + QueryServiceMetricsViewTimeRangeProcedure = "/rill.runtime.v1.QueryService/MetricsViewTimeRange" + // QueryServiceMetricsViewSchemaProcedure is the fully-qualified name of the QueryService's + // MetricsViewSchema RPC. + QueryServiceMetricsViewSchemaProcedure = "/rill.runtime.v1.QueryService/MetricsViewSchema" + // QueryServiceMetricsViewSearchProcedure is the fully-qualified name of the QueryService's + // MetricsViewSearch RPC. + QueryServiceMetricsViewSearchProcedure = "/rill.runtime.v1.QueryService/MetricsViewSearch" + // QueryServiceMetricsViewTimeRangesProcedure is the fully-qualified name of the QueryService's + // MetricsViewTimeRanges RPC. + QueryServiceMetricsViewTimeRangesProcedure = "/rill.runtime.v1.QueryService/MetricsViewTimeRanges" + // QueryServiceMetricsViewAnnotationsProcedure is the fully-qualified name of the QueryService's + // MetricsViewAnnotations RPC. + QueryServiceMetricsViewAnnotationsProcedure = "/rill.runtime.v1.QueryService/MetricsViewAnnotations" + // QueryServiceConvertExpressionToMetricsSQLProcedure is the fully-qualified name of the + // QueryService's ConvertExpressionToMetricsSQL RPC. + QueryServiceConvertExpressionToMetricsSQLProcedure = "/rill.runtime.v1.QueryService/ConvertExpressionToMetricsSQL" + // QueryServiceResolveCanvasProcedure is the fully-qualified name of the QueryService's + // ResolveCanvas RPC. + QueryServiceResolveCanvasProcedure = "/rill.runtime.v1.QueryService/ResolveCanvas" + // QueryServiceResolveComponentProcedure is the fully-qualified name of the QueryService's + // ResolveComponent RPC. + QueryServiceResolveComponentProcedure = "/rill.runtime.v1.QueryService/ResolveComponent" + // QueryServiceResolveTemplatedStringProcedure is the fully-qualified name of the QueryService's + // ResolveTemplatedString RPC. + QueryServiceResolveTemplatedStringProcedure = "/rill.runtime.v1.QueryService/ResolveTemplatedString" + // QueryServiceColumnRollupIntervalProcedure is the fully-qualified name of the QueryService's + // ColumnRollupInterval RPC. + QueryServiceColumnRollupIntervalProcedure = "/rill.runtime.v1.QueryService/ColumnRollupInterval" + // QueryServiceColumnTopKProcedure is the fully-qualified name of the QueryService's ColumnTopK RPC. + QueryServiceColumnTopKProcedure = "/rill.runtime.v1.QueryService/ColumnTopK" + // QueryServiceColumnNullCountProcedure is the fully-qualified name of the QueryService's + // ColumnNullCount RPC. + QueryServiceColumnNullCountProcedure = "/rill.runtime.v1.QueryService/ColumnNullCount" + // QueryServiceColumnDescriptiveStatisticsProcedure is the fully-qualified name of the + // QueryService's ColumnDescriptiveStatistics RPC. + QueryServiceColumnDescriptiveStatisticsProcedure = "/rill.runtime.v1.QueryService/ColumnDescriptiveStatistics" + // QueryServiceColumnTimeGrainProcedure is the fully-qualified name of the QueryService's + // ColumnTimeGrain RPC. + QueryServiceColumnTimeGrainProcedure = "/rill.runtime.v1.QueryService/ColumnTimeGrain" + // QueryServiceColumnNumericHistogramProcedure is the fully-qualified name of the QueryService's + // ColumnNumericHistogram RPC. + QueryServiceColumnNumericHistogramProcedure = "/rill.runtime.v1.QueryService/ColumnNumericHistogram" + // QueryServiceColumnRugHistogramProcedure is the fully-qualified name of the QueryService's + // ColumnRugHistogram RPC. + QueryServiceColumnRugHistogramProcedure = "/rill.runtime.v1.QueryService/ColumnRugHistogram" + // QueryServiceColumnTimeRangeProcedure is the fully-qualified name of the QueryService's + // ColumnTimeRange RPC. + QueryServiceColumnTimeRangeProcedure = "/rill.runtime.v1.QueryService/ColumnTimeRange" + // QueryServiceColumnCardinalityProcedure is the fully-qualified name of the QueryService's + // ColumnCardinality RPC. + QueryServiceColumnCardinalityProcedure = "/rill.runtime.v1.QueryService/ColumnCardinality" + // QueryServiceColumnTimeSeriesProcedure is the fully-qualified name of the QueryService's + // ColumnTimeSeries RPC. + QueryServiceColumnTimeSeriesProcedure = "/rill.runtime.v1.QueryService/ColumnTimeSeries" + // QueryServiceTableCardinalityProcedure is the fully-qualified name of the QueryService's + // TableCardinality RPC. + QueryServiceTableCardinalityProcedure = "/rill.runtime.v1.QueryService/TableCardinality" + // QueryServiceTableColumnsProcedure is the fully-qualified name of the QueryService's TableColumns + // RPC. + QueryServiceTableColumnsProcedure = "/rill.runtime.v1.QueryService/TableColumns" + // QueryServiceTableRowsProcedure is the fully-qualified name of the QueryService's TableRows RPC. + QueryServiceTableRowsProcedure = "/rill.runtime.v1.QueryService/TableRows" +) + +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + queryServiceServiceDescriptor = v1.File_rill_runtime_v1_queries_proto.Services().ByName("QueryService") + queryServiceQueryMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("Query") + queryServiceQueryBatchMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("QueryBatch") + queryServiceExportMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("Export") + queryServiceExportReportMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ExportReport") + queryServiceMetricsViewAggregationMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("MetricsViewAggregation") + queryServiceMetricsViewToplistMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("MetricsViewToplist") + queryServiceMetricsViewComparisonMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("MetricsViewComparison") + queryServiceMetricsViewTimeSeriesMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("MetricsViewTimeSeries") + queryServiceMetricsViewTotalsMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("MetricsViewTotals") + queryServiceMetricsViewRowsMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("MetricsViewRows") + queryServiceMetricsViewTimeRangeMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("MetricsViewTimeRange") + queryServiceMetricsViewSchemaMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("MetricsViewSchema") + queryServiceMetricsViewSearchMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("MetricsViewSearch") + queryServiceMetricsViewTimeRangesMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("MetricsViewTimeRanges") + queryServiceMetricsViewAnnotationsMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("MetricsViewAnnotations") + queryServiceConvertExpressionToMetricsSQLMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ConvertExpressionToMetricsSQL") + queryServiceResolveCanvasMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ResolveCanvas") + queryServiceResolveComponentMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ResolveComponent") + queryServiceResolveTemplatedStringMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ResolveTemplatedString") + queryServiceColumnRollupIntervalMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ColumnRollupInterval") + queryServiceColumnTopKMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ColumnTopK") + queryServiceColumnNullCountMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ColumnNullCount") + queryServiceColumnDescriptiveStatisticsMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ColumnDescriptiveStatistics") + queryServiceColumnTimeGrainMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ColumnTimeGrain") + queryServiceColumnNumericHistogramMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ColumnNumericHistogram") + queryServiceColumnRugHistogramMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ColumnRugHistogram") + queryServiceColumnTimeRangeMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ColumnTimeRange") + queryServiceColumnCardinalityMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ColumnCardinality") + queryServiceColumnTimeSeriesMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("ColumnTimeSeries") + queryServiceTableCardinalityMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("TableCardinality") + queryServiceTableColumnsMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("TableColumns") + queryServiceTableRowsMethodDescriptor = queryServiceServiceDescriptor.Methods().ByName("TableRows") +) + +// QueryServiceClient is a client for the rill.runtime.v1.QueryService service. +type QueryServiceClient interface { + // Query runs a SQL query against the instance's OLAP datastore. + Query(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error) + // Batch request with different queries + QueryBatch(context.Context, *connect.Request[v1.QueryBatchRequest]) (*connect.ServerStreamForClient[v1.QueryBatchResponse], error) + // Export builds a URL to download the results of a query as a file. + Export(context.Context, *connect.Request[v1.ExportRequest]) (*connect.Response[v1.ExportResponse], error) + // ExportReport builds a URL to download the results of a query as a file. + ExportReport(context.Context, *connect.Request[v1.ExportReportRequest]) (*connect.Response[v1.ExportReportResponse], error) + // MetricsViewAggregation is a generic API for running group-by/pivot queries against a metrics view. + MetricsViewAggregation(context.Context, *connect.Request[v1.MetricsViewAggregationRequest]) (*connect.Response[v1.MetricsViewAggregationResponse], error) + // Deprecated - use MetricsViewComparison instead. + // MetricsViewToplist returns the top dimension values of a metrics view sorted by one or more measures. + // It's a convenience API for querying a metrics view. + MetricsViewToplist(context.Context, *connect.Request[v1.MetricsViewToplistRequest]) (*connect.Response[v1.MetricsViewToplistResponse], error) + // MetricsViewComparison returns a toplist containing comparison data of another toplist (same dimension/measure but a different time range). + // Returns a toplist without comparison data if comparison time range is omitted. + // + // ie. comparsion toplist: + // | measure1_base | measure1_previous | measure1__delta_abs | measure1__delta_rel | dimension | + // |---------------|---------------------|---------------------|--------------------|-----------| + // | 2 | 2 | 0 | 0 | Safari | + // | 1 | 0 | 1 | N/A | Chrome | + // | 0 | 4 | -4 | -1.0 | Firefox | + // + // ie. toplist: + // | measure1 | measure2 | dimension | + // |----------|----------|-----------| + // | 2 | 45 | Safari | + // | 1 | 350 | Chrome | + // | 0 | 25 | Firefox | + MetricsViewComparison(context.Context, *connect.Request[v1.MetricsViewComparisonRequest]) (*connect.Response[v1.MetricsViewComparisonResponse], error) + // MetricsViewTimeSeries returns time series for the measures in the metrics view. + // It's a convenience API for querying a metrics view. + MetricsViewTimeSeries(context.Context, *connect.Request[v1.MetricsViewTimeSeriesRequest]) (*connect.Response[v1.MetricsViewTimeSeriesResponse], error) + // MetricsViewTotals returns totals over a time period for the measures in a metrics view. + // It's a convenience API for querying a metrics view. + MetricsViewTotals(context.Context, *connect.Request[v1.MetricsViewTotalsRequest]) (*connect.Response[v1.MetricsViewTotalsResponse], error) + // MetricsViewRows returns the underlying model rows matching a metrics view time range and filter(s). + // + // ie. without granularity + // | column1 | column2 | dimension | + // |---------|---------|-----------| + // | 2 | 2 | Safari | + // | 1 | 0 | Chrome | + // | 0 | 4 | Firefox | + // + // ie. with granularity + // | timestamp__day0 | column1 | column2 | dimension | + // |----------------------|---------|---------|-----------| + // | 2022-01-01T00:00:00Z | 2 | 2 | Safari | + // | 2022-01-01T00:00:00Z | 1 | 0 | Chrome | + // | 2022-01-01T00:00:00Z | 0 | 4 | Firefox | + MetricsViewRows(context.Context, *connect.Request[v1.MetricsViewRowsRequest]) (*connect.Response[v1.MetricsViewRowsResponse], error) + // MetricsViewTimeRange Get the time range summaries (min, max) for time column in a metrics view. + // Deprecated: use MetricsViewTimeRanges instead. + MetricsViewTimeRange(context.Context, *connect.Request[v1.MetricsViewTimeRangeRequest]) (*connect.Response[v1.MetricsViewTimeRangeResponse], error) + // MetricsViewSchema Get the data types of measures and dimensions + MetricsViewSchema(context.Context, *connect.Request[v1.MetricsViewSchemaRequest]) (*connect.Response[v1.MetricsViewSchemaResponse], error) + // MetricsViewSearch Get the data types of measures and dimensions + MetricsViewSearch(context.Context, *connect.Request[v1.MetricsViewSearchRequest]) (*connect.Response[v1.MetricsViewSearchResponse], error) + // MetricsViewTimeRanges resolves time ranges for a metrics view. + MetricsViewTimeRanges(context.Context, *connect.Request[v1.MetricsViewTimeRangesRequest]) (*connect.Response[v1.MetricsViewTimeRangesResponse], error) + MetricsViewAnnotations(context.Context, *connect.Request[v1.MetricsViewAnnotationsRequest]) (*connect.Response[v1.MetricsViewAnnotationsResponse], error) + // ConvertExpressionToMetricsSQL converts a filter expression to a SQL filter string. + ConvertExpressionToMetricsSQL(context.Context, *connect.Request[v1.ConvertExpressionToMetricsSQLRequest]) (*connect.Response[v1.ConvertExpressionToMetricsSQLResponse], error) + // ResolveCanvas is a convenience API that returns a canvas and all its referenced components and metrics views. + ResolveCanvas(context.Context, *connect.Request[v1.ResolveCanvasRequest]) (*connect.Response[v1.ResolveCanvasResponse], error) + // ResolveComponent resolves renderer for a Component resource. + ResolveComponent(context.Context, *connect.Request[v1.ResolveComponentRequest]) (*connect.Response[v1.ResolveComponentResponse], error) + // ResolveTemplatedString resolves a templated strings. + ResolveTemplatedString(context.Context, *connect.Request[v1.ResolveTemplatedStringRequest]) (*connect.Response[v1.ResolveTemplatedStringResponse], error) + // ColumnRollupInterval returns the minimum time granularity (as well as the time range) for a specified timestamp column + ColumnRollupInterval(context.Context, *connect.Request[v1.ColumnRollupIntervalRequest]) (*connect.Response[v1.ColumnRollupIntervalResponse], error) + // Get TopK elements from a table for a column given an agg function + // agg function and k are optional, defaults are count(*) and 50 respectively + ColumnTopK(context.Context, *connect.Request[v1.ColumnTopKRequest]) (*connect.Response[v1.ColumnTopKResponse], error) + // Get the number of nulls in a column + ColumnNullCount(context.Context, *connect.Request[v1.ColumnNullCountRequest]) (*connect.Response[v1.ColumnNullCountResponse], error) + // Get basic stats for a numeric column like min, max, mean, stddev, etc + ColumnDescriptiveStatistics(context.Context, *connect.Request[v1.ColumnDescriptiveStatisticsRequest]) (*connect.Response[v1.ColumnDescriptiveStatisticsResponse], error) + // Estimates the smallest time grain present in the column + ColumnTimeGrain(context.Context, *connect.Request[v1.ColumnTimeGrainRequest]) (*connect.Response[v1.ColumnTimeGrainResponse], error) + // Get the histogram for values in a column + ColumnNumericHistogram(context.Context, *connect.Request[v1.ColumnNumericHistogramRequest]) (*connect.Response[v1.ColumnNumericHistogramResponse], error) + // Get outliers for a numeric column + ColumnRugHistogram(context.Context, *connect.Request[v1.ColumnRugHistogramRequest]) (*connect.Response[v1.ColumnRugHistogramResponse], error) + // Get the time range summaries (min, max) for a column + ColumnTimeRange(context.Context, *connect.Request[v1.ColumnTimeRangeRequest]) (*connect.Response[v1.ColumnTimeRangeResponse], error) + // Get cardinality for a column + ColumnCardinality(context.Context, *connect.Request[v1.ColumnCardinalityRequest]) (*connect.Response[v1.ColumnCardinalityResponse], error) + // Generate time series for the given measures (aggregation expressions) along with the sparkline timeseries + ColumnTimeSeries(context.Context, *connect.Request[v1.ColumnTimeSeriesRequest]) (*connect.Response[v1.ColumnTimeSeriesResponse], error) + // TableCardinality returns row count + TableCardinality(context.Context, *connect.Request[v1.TableCardinalityRequest]) (*connect.Response[v1.TableCardinalityResponse], error) + // TableColumns returns column profiles + TableColumns(context.Context, *connect.Request[v1.TableColumnsRequest]) (*connect.Response[v1.TableColumnsResponse], error) + // TableRows returns table rows + TableRows(context.Context, *connect.Request[v1.TableRowsRequest]) (*connect.Response[v1.TableRowsResponse], error) +} + +// NewQueryServiceClient constructs a client for the rill.runtime.v1.QueryService service. By +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewQueryServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) QueryServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &queryServiceClient{ + query: connect.NewClient[v1.QueryRequest, v1.QueryResponse]( + httpClient, + baseURL+QueryServiceQueryProcedure, + connect.WithSchema(queryServiceQueryMethodDescriptor), + connect.WithClientOptions(opts...), + ), + queryBatch: connect.NewClient[v1.QueryBatchRequest, v1.QueryBatchResponse]( + httpClient, + baseURL+QueryServiceQueryBatchProcedure, + connect.WithSchema(queryServiceQueryBatchMethodDescriptor), + connect.WithClientOptions(opts...), + ), + export: connect.NewClient[v1.ExportRequest, v1.ExportResponse]( + httpClient, + baseURL+QueryServiceExportProcedure, + connect.WithSchema(queryServiceExportMethodDescriptor), + connect.WithClientOptions(opts...), + ), + exportReport: connect.NewClient[v1.ExportReportRequest, v1.ExportReportResponse]( + httpClient, + baseURL+QueryServiceExportReportProcedure, + connect.WithSchema(queryServiceExportReportMethodDescriptor), + connect.WithClientOptions(opts...), + ), + metricsViewAggregation: connect.NewClient[v1.MetricsViewAggregationRequest, v1.MetricsViewAggregationResponse]( + httpClient, + baseURL+QueryServiceMetricsViewAggregationProcedure, + connect.WithSchema(queryServiceMetricsViewAggregationMethodDescriptor), + connect.WithClientOptions(opts...), + ), + metricsViewToplist: connect.NewClient[v1.MetricsViewToplistRequest, v1.MetricsViewToplistResponse]( + httpClient, + baseURL+QueryServiceMetricsViewToplistProcedure, + connect.WithSchema(queryServiceMetricsViewToplistMethodDescriptor), + connect.WithClientOptions(opts...), + ), + metricsViewComparison: connect.NewClient[v1.MetricsViewComparisonRequest, v1.MetricsViewComparisonResponse]( + httpClient, + baseURL+QueryServiceMetricsViewComparisonProcedure, + connect.WithSchema(queryServiceMetricsViewComparisonMethodDescriptor), + connect.WithClientOptions(opts...), + ), + metricsViewTimeSeries: connect.NewClient[v1.MetricsViewTimeSeriesRequest, v1.MetricsViewTimeSeriesResponse]( + httpClient, + baseURL+QueryServiceMetricsViewTimeSeriesProcedure, + connect.WithSchema(queryServiceMetricsViewTimeSeriesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + metricsViewTotals: connect.NewClient[v1.MetricsViewTotalsRequest, v1.MetricsViewTotalsResponse]( + httpClient, + baseURL+QueryServiceMetricsViewTotalsProcedure, + connect.WithSchema(queryServiceMetricsViewTotalsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + metricsViewRows: connect.NewClient[v1.MetricsViewRowsRequest, v1.MetricsViewRowsResponse]( + httpClient, + baseURL+QueryServiceMetricsViewRowsProcedure, + connect.WithSchema(queryServiceMetricsViewRowsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + metricsViewTimeRange: connect.NewClient[v1.MetricsViewTimeRangeRequest, v1.MetricsViewTimeRangeResponse]( + httpClient, + baseURL+QueryServiceMetricsViewTimeRangeProcedure, + connect.WithSchema(queryServiceMetricsViewTimeRangeMethodDescriptor), + connect.WithClientOptions(opts...), + ), + metricsViewSchema: connect.NewClient[v1.MetricsViewSchemaRequest, v1.MetricsViewSchemaResponse]( + httpClient, + baseURL+QueryServiceMetricsViewSchemaProcedure, + connect.WithSchema(queryServiceMetricsViewSchemaMethodDescriptor), + connect.WithClientOptions(opts...), + ), + metricsViewSearch: connect.NewClient[v1.MetricsViewSearchRequest, v1.MetricsViewSearchResponse]( + httpClient, + baseURL+QueryServiceMetricsViewSearchProcedure, + connect.WithSchema(queryServiceMetricsViewSearchMethodDescriptor), + connect.WithClientOptions(opts...), + ), + metricsViewTimeRanges: connect.NewClient[v1.MetricsViewTimeRangesRequest, v1.MetricsViewTimeRangesResponse]( + httpClient, + baseURL+QueryServiceMetricsViewTimeRangesProcedure, + connect.WithSchema(queryServiceMetricsViewTimeRangesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + metricsViewAnnotations: connect.NewClient[v1.MetricsViewAnnotationsRequest, v1.MetricsViewAnnotationsResponse]( + httpClient, + baseURL+QueryServiceMetricsViewAnnotationsProcedure, + connect.WithSchema(queryServiceMetricsViewAnnotationsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + convertExpressionToMetricsSQL: connect.NewClient[v1.ConvertExpressionToMetricsSQLRequest, v1.ConvertExpressionToMetricsSQLResponse]( + httpClient, + baseURL+QueryServiceConvertExpressionToMetricsSQLProcedure, + connect.WithSchema(queryServiceConvertExpressionToMetricsSQLMethodDescriptor), + connect.WithClientOptions(opts...), + ), + resolveCanvas: connect.NewClient[v1.ResolveCanvasRequest, v1.ResolveCanvasResponse]( + httpClient, + baseURL+QueryServiceResolveCanvasProcedure, + connect.WithSchema(queryServiceResolveCanvasMethodDescriptor), + connect.WithClientOptions(opts...), + ), + resolveComponent: connect.NewClient[v1.ResolveComponentRequest, v1.ResolveComponentResponse]( + httpClient, + baseURL+QueryServiceResolveComponentProcedure, + connect.WithSchema(queryServiceResolveComponentMethodDescriptor), + connect.WithClientOptions(opts...), + ), + resolveTemplatedString: connect.NewClient[v1.ResolveTemplatedStringRequest, v1.ResolveTemplatedStringResponse]( + httpClient, + baseURL+QueryServiceResolveTemplatedStringProcedure, + connect.WithSchema(queryServiceResolveTemplatedStringMethodDescriptor), + connect.WithClientOptions(opts...), + ), + columnRollupInterval: connect.NewClient[v1.ColumnRollupIntervalRequest, v1.ColumnRollupIntervalResponse]( + httpClient, + baseURL+QueryServiceColumnRollupIntervalProcedure, + connect.WithSchema(queryServiceColumnRollupIntervalMethodDescriptor), + connect.WithClientOptions(opts...), + ), + columnTopK: connect.NewClient[v1.ColumnTopKRequest, v1.ColumnTopKResponse]( + httpClient, + baseURL+QueryServiceColumnTopKProcedure, + connect.WithSchema(queryServiceColumnTopKMethodDescriptor), + connect.WithClientOptions(opts...), + ), + columnNullCount: connect.NewClient[v1.ColumnNullCountRequest, v1.ColumnNullCountResponse]( + httpClient, + baseURL+QueryServiceColumnNullCountProcedure, + connect.WithSchema(queryServiceColumnNullCountMethodDescriptor), + connect.WithClientOptions(opts...), + ), + columnDescriptiveStatistics: connect.NewClient[v1.ColumnDescriptiveStatisticsRequest, v1.ColumnDescriptiveStatisticsResponse]( + httpClient, + baseURL+QueryServiceColumnDescriptiveStatisticsProcedure, + connect.WithSchema(queryServiceColumnDescriptiveStatisticsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + columnTimeGrain: connect.NewClient[v1.ColumnTimeGrainRequest, v1.ColumnTimeGrainResponse]( + httpClient, + baseURL+QueryServiceColumnTimeGrainProcedure, + connect.WithSchema(queryServiceColumnTimeGrainMethodDescriptor), + connect.WithClientOptions(opts...), + ), + columnNumericHistogram: connect.NewClient[v1.ColumnNumericHistogramRequest, v1.ColumnNumericHistogramResponse]( + httpClient, + baseURL+QueryServiceColumnNumericHistogramProcedure, + connect.WithSchema(queryServiceColumnNumericHistogramMethodDescriptor), + connect.WithClientOptions(opts...), + ), + columnRugHistogram: connect.NewClient[v1.ColumnRugHistogramRequest, v1.ColumnRugHistogramResponse]( + httpClient, + baseURL+QueryServiceColumnRugHistogramProcedure, + connect.WithSchema(queryServiceColumnRugHistogramMethodDescriptor), + connect.WithClientOptions(opts...), + ), + columnTimeRange: connect.NewClient[v1.ColumnTimeRangeRequest, v1.ColumnTimeRangeResponse]( + httpClient, + baseURL+QueryServiceColumnTimeRangeProcedure, + connect.WithSchema(queryServiceColumnTimeRangeMethodDescriptor), + connect.WithClientOptions(opts...), + ), + columnCardinality: connect.NewClient[v1.ColumnCardinalityRequest, v1.ColumnCardinalityResponse]( + httpClient, + baseURL+QueryServiceColumnCardinalityProcedure, + connect.WithSchema(queryServiceColumnCardinalityMethodDescriptor), + connect.WithClientOptions(opts...), + ), + columnTimeSeries: connect.NewClient[v1.ColumnTimeSeriesRequest, v1.ColumnTimeSeriesResponse]( + httpClient, + baseURL+QueryServiceColumnTimeSeriesProcedure, + connect.WithSchema(queryServiceColumnTimeSeriesMethodDescriptor), + connect.WithClientOptions(opts...), + ), + tableCardinality: connect.NewClient[v1.TableCardinalityRequest, v1.TableCardinalityResponse]( + httpClient, + baseURL+QueryServiceTableCardinalityProcedure, + connect.WithSchema(queryServiceTableCardinalityMethodDescriptor), + connect.WithClientOptions(opts...), + ), + tableColumns: connect.NewClient[v1.TableColumnsRequest, v1.TableColumnsResponse]( + httpClient, + baseURL+QueryServiceTableColumnsProcedure, + connect.WithSchema(queryServiceTableColumnsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + tableRows: connect.NewClient[v1.TableRowsRequest, v1.TableRowsResponse]( + httpClient, + baseURL+QueryServiceTableRowsProcedure, + connect.WithSchema(queryServiceTableRowsMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// queryServiceClient implements QueryServiceClient. +type queryServiceClient struct { + query *connect.Client[v1.QueryRequest, v1.QueryResponse] + queryBatch *connect.Client[v1.QueryBatchRequest, v1.QueryBatchResponse] + export *connect.Client[v1.ExportRequest, v1.ExportResponse] + exportReport *connect.Client[v1.ExportReportRequest, v1.ExportReportResponse] + metricsViewAggregation *connect.Client[v1.MetricsViewAggregationRequest, v1.MetricsViewAggregationResponse] + metricsViewToplist *connect.Client[v1.MetricsViewToplistRequest, v1.MetricsViewToplistResponse] + metricsViewComparison *connect.Client[v1.MetricsViewComparisonRequest, v1.MetricsViewComparisonResponse] + metricsViewTimeSeries *connect.Client[v1.MetricsViewTimeSeriesRequest, v1.MetricsViewTimeSeriesResponse] + metricsViewTotals *connect.Client[v1.MetricsViewTotalsRequest, v1.MetricsViewTotalsResponse] + metricsViewRows *connect.Client[v1.MetricsViewRowsRequest, v1.MetricsViewRowsResponse] + metricsViewTimeRange *connect.Client[v1.MetricsViewTimeRangeRequest, v1.MetricsViewTimeRangeResponse] + metricsViewSchema *connect.Client[v1.MetricsViewSchemaRequest, v1.MetricsViewSchemaResponse] + metricsViewSearch *connect.Client[v1.MetricsViewSearchRequest, v1.MetricsViewSearchResponse] + metricsViewTimeRanges *connect.Client[v1.MetricsViewTimeRangesRequest, v1.MetricsViewTimeRangesResponse] + metricsViewAnnotations *connect.Client[v1.MetricsViewAnnotationsRequest, v1.MetricsViewAnnotationsResponse] + convertExpressionToMetricsSQL *connect.Client[v1.ConvertExpressionToMetricsSQLRequest, v1.ConvertExpressionToMetricsSQLResponse] + resolveCanvas *connect.Client[v1.ResolveCanvasRequest, v1.ResolveCanvasResponse] + resolveComponent *connect.Client[v1.ResolveComponentRequest, v1.ResolveComponentResponse] + resolveTemplatedString *connect.Client[v1.ResolveTemplatedStringRequest, v1.ResolveTemplatedStringResponse] + columnRollupInterval *connect.Client[v1.ColumnRollupIntervalRequest, v1.ColumnRollupIntervalResponse] + columnTopK *connect.Client[v1.ColumnTopKRequest, v1.ColumnTopKResponse] + columnNullCount *connect.Client[v1.ColumnNullCountRequest, v1.ColumnNullCountResponse] + columnDescriptiveStatistics *connect.Client[v1.ColumnDescriptiveStatisticsRequest, v1.ColumnDescriptiveStatisticsResponse] + columnTimeGrain *connect.Client[v1.ColumnTimeGrainRequest, v1.ColumnTimeGrainResponse] + columnNumericHistogram *connect.Client[v1.ColumnNumericHistogramRequest, v1.ColumnNumericHistogramResponse] + columnRugHistogram *connect.Client[v1.ColumnRugHistogramRequest, v1.ColumnRugHistogramResponse] + columnTimeRange *connect.Client[v1.ColumnTimeRangeRequest, v1.ColumnTimeRangeResponse] + columnCardinality *connect.Client[v1.ColumnCardinalityRequest, v1.ColumnCardinalityResponse] + columnTimeSeries *connect.Client[v1.ColumnTimeSeriesRequest, v1.ColumnTimeSeriesResponse] + tableCardinality *connect.Client[v1.TableCardinalityRequest, v1.TableCardinalityResponse] + tableColumns *connect.Client[v1.TableColumnsRequest, v1.TableColumnsResponse] + tableRows *connect.Client[v1.TableRowsRequest, v1.TableRowsResponse] +} + +// Query calls rill.runtime.v1.QueryService.Query. +func (c *queryServiceClient) Query(ctx context.Context, req *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error) { + return c.query.CallUnary(ctx, req) +} + +// QueryBatch calls rill.runtime.v1.QueryService.QueryBatch. +func (c *queryServiceClient) QueryBatch(ctx context.Context, req *connect.Request[v1.QueryBatchRequest]) (*connect.ServerStreamForClient[v1.QueryBatchResponse], error) { + return c.queryBatch.CallServerStream(ctx, req) +} + +// Export calls rill.runtime.v1.QueryService.Export. +func (c *queryServiceClient) Export(ctx context.Context, req *connect.Request[v1.ExportRequest]) (*connect.Response[v1.ExportResponse], error) { + return c.export.CallUnary(ctx, req) +} + +// ExportReport calls rill.runtime.v1.QueryService.ExportReport. +func (c *queryServiceClient) ExportReport(ctx context.Context, req *connect.Request[v1.ExportReportRequest]) (*connect.Response[v1.ExportReportResponse], error) { + return c.exportReport.CallUnary(ctx, req) +} + +// MetricsViewAggregation calls rill.runtime.v1.QueryService.MetricsViewAggregation. +func (c *queryServiceClient) MetricsViewAggregation(ctx context.Context, req *connect.Request[v1.MetricsViewAggregationRequest]) (*connect.Response[v1.MetricsViewAggregationResponse], error) { + return c.metricsViewAggregation.CallUnary(ctx, req) +} + +// MetricsViewToplist calls rill.runtime.v1.QueryService.MetricsViewToplist. +func (c *queryServiceClient) MetricsViewToplist(ctx context.Context, req *connect.Request[v1.MetricsViewToplistRequest]) (*connect.Response[v1.MetricsViewToplistResponse], error) { + return c.metricsViewToplist.CallUnary(ctx, req) +} + +// MetricsViewComparison calls rill.runtime.v1.QueryService.MetricsViewComparison. +func (c *queryServiceClient) MetricsViewComparison(ctx context.Context, req *connect.Request[v1.MetricsViewComparisonRequest]) (*connect.Response[v1.MetricsViewComparisonResponse], error) { + return c.metricsViewComparison.CallUnary(ctx, req) +} + +// MetricsViewTimeSeries calls rill.runtime.v1.QueryService.MetricsViewTimeSeries. +func (c *queryServiceClient) MetricsViewTimeSeries(ctx context.Context, req *connect.Request[v1.MetricsViewTimeSeriesRequest]) (*connect.Response[v1.MetricsViewTimeSeriesResponse], error) { + return c.metricsViewTimeSeries.CallUnary(ctx, req) +} + +// MetricsViewTotals calls rill.runtime.v1.QueryService.MetricsViewTotals. +func (c *queryServiceClient) MetricsViewTotals(ctx context.Context, req *connect.Request[v1.MetricsViewTotalsRequest]) (*connect.Response[v1.MetricsViewTotalsResponse], error) { + return c.metricsViewTotals.CallUnary(ctx, req) +} + +// MetricsViewRows calls rill.runtime.v1.QueryService.MetricsViewRows. +func (c *queryServiceClient) MetricsViewRows(ctx context.Context, req *connect.Request[v1.MetricsViewRowsRequest]) (*connect.Response[v1.MetricsViewRowsResponse], error) { + return c.metricsViewRows.CallUnary(ctx, req) +} + +// MetricsViewTimeRange calls rill.runtime.v1.QueryService.MetricsViewTimeRange. +func (c *queryServiceClient) MetricsViewTimeRange(ctx context.Context, req *connect.Request[v1.MetricsViewTimeRangeRequest]) (*connect.Response[v1.MetricsViewTimeRangeResponse], error) { + return c.metricsViewTimeRange.CallUnary(ctx, req) +} + +// MetricsViewSchema calls rill.runtime.v1.QueryService.MetricsViewSchema. +func (c *queryServiceClient) MetricsViewSchema(ctx context.Context, req *connect.Request[v1.MetricsViewSchemaRequest]) (*connect.Response[v1.MetricsViewSchemaResponse], error) { + return c.metricsViewSchema.CallUnary(ctx, req) +} + +// MetricsViewSearch calls rill.runtime.v1.QueryService.MetricsViewSearch. +func (c *queryServiceClient) MetricsViewSearch(ctx context.Context, req *connect.Request[v1.MetricsViewSearchRequest]) (*connect.Response[v1.MetricsViewSearchResponse], error) { + return c.metricsViewSearch.CallUnary(ctx, req) +} + +// MetricsViewTimeRanges calls rill.runtime.v1.QueryService.MetricsViewTimeRanges. +func (c *queryServiceClient) MetricsViewTimeRanges(ctx context.Context, req *connect.Request[v1.MetricsViewTimeRangesRequest]) (*connect.Response[v1.MetricsViewTimeRangesResponse], error) { + return c.metricsViewTimeRanges.CallUnary(ctx, req) +} + +// MetricsViewAnnotations calls rill.runtime.v1.QueryService.MetricsViewAnnotations. +func (c *queryServiceClient) MetricsViewAnnotations(ctx context.Context, req *connect.Request[v1.MetricsViewAnnotationsRequest]) (*connect.Response[v1.MetricsViewAnnotationsResponse], error) { + return c.metricsViewAnnotations.CallUnary(ctx, req) +} + +// ConvertExpressionToMetricsSQL calls rill.runtime.v1.QueryService.ConvertExpressionToMetricsSQL. +func (c *queryServiceClient) ConvertExpressionToMetricsSQL(ctx context.Context, req *connect.Request[v1.ConvertExpressionToMetricsSQLRequest]) (*connect.Response[v1.ConvertExpressionToMetricsSQLResponse], error) { + return c.convertExpressionToMetricsSQL.CallUnary(ctx, req) +} + +// ResolveCanvas calls rill.runtime.v1.QueryService.ResolveCanvas. +func (c *queryServiceClient) ResolveCanvas(ctx context.Context, req *connect.Request[v1.ResolveCanvasRequest]) (*connect.Response[v1.ResolveCanvasResponse], error) { + return c.resolveCanvas.CallUnary(ctx, req) +} + +// ResolveComponent calls rill.runtime.v1.QueryService.ResolveComponent. +func (c *queryServiceClient) ResolveComponent(ctx context.Context, req *connect.Request[v1.ResolveComponentRequest]) (*connect.Response[v1.ResolveComponentResponse], error) { + return c.resolveComponent.CallUnary(ctx, req) +} + +// ResolveTemplatedString calls rill.runtime.v1.QueryService.ResolveTemplatedString. +func (c *queryServiceClient) ResolveTemplatedString(ctx context.Context, req *connect.Request[v1.ResolveTemplatedStringRequest]) (*connect.Response[v1.ResolveTemplatedStringResponse], error) { + return c.resolveTemplatedString.CallUnary(ctx, req) +} + +// ColumnRollupInterval calls rill.runtime.v1.QueryService.ColumnRollupInterval. +func (c *queryServiceClient) ColumnRollupInterval(ctx context.Context, req *connect.Request[v1.ColumnRollupIntervalRequest]) (*connect.Response[v1.ColumnRollupIntervalResponse], error) { + return c.columnRollupInterval.CallUnary(ctx, req) +} + +// ColumnTopK calls rill.runtime.v1.QueryService.ColumnTopK. +func (c *queryServiceClient) ColumnTopK(ctx context.Context, req *connect.Request[v1.ColumnTopKRequest]) (*connect.Response[v1.ColumnTopKResponse], error) { + return c.columnTopK.CallUnary(ctx, req) +} + +// ColumnNullCount calls rill.runtime.v1.QueryService.ColumnNullCount. +func (c *queryServiceClient) ColumnNullCount(ctx context.Context, req *connect.Request[v1.ColumnNullCountRequest]) (*connect.Response[v1.ColumnNullCountResponse], error) { + return c.columnNullCount.CallUnary(ctx, req) +} + +// ColumnDescriptiveStatistics calls rill.runtime.v1.QueryService.ColumnDescriptiveStatistics. +func (c *queryServiceClient) ColumnDescriptiveStatistics(ctx context.Context, req *connect.Request[v1.ColumnDescriptiveStatisticsRequest]) (*connect.Response[v1.ColumnDescriptiveStatisticsResponse], error) { + return c.columnDescriptiveStatistics.CallUnary(ctx, req) +} + +// ColumnTimeGrain calls rill.runtime.v1.QueryService.ColumnTimeGrain. +func (c *queryServiceClient) ColumnTimeGrain(ctx context.Context, req *connect.Request[v1.ColumnTimeGrainRequest]) (*connect.Response[v1.ColumnTimeGrainResponse], error) { + return c.columnTimeGrain.CallUnary(ctx, req) +} + +// ColumnNumericHistogram calls rill.runtime.v1.QueryService.ColumnNumericHistogram. +func (c *queryServiceClient) ColumnNumericHistogram(ctx context.Context, req *connect.Request[v1.ColumnNumericHistogramRequest]) (*connect.Response[v1.ColumnNumericHistogramResponse], error) { + return c.columnNumericHistogram.CallUnary(ctx, req) +} + +// ColumnRugHistogram calls rill.runtime.v1.QueryService.ColumnRugHistogram. +func (c *queryServiceClient) ColumnRugHistogram(ctx context.Context, req *connect.Request[v1.ColumnRugHistogramRequest]) (*connect.Response[v1.ColumnRugHistogramResponse], error) { + return c.columnRugHistogram.CallUnary(ctx, req) +} + +// ColumnTimeRange calls rill.runtime.v1.QueryService.ColumnTimeRange. +func (c *queryServiceClient) ColumnTimeRange(ctx context.Context, req *connect.Request[v1.ColumnTimeRangeRequest]) (*connect.Response[v1.ColumnTimeRangeResponse], error) { + return c.columnTimeRange.CallUnary(ctx, req) +} + +// ColumnCardinality calls rill.runtime.v1.QueryService.ColumnCardinality. +func (c *queryServiceClient) ColumnCardinality(ctx context.Context, req *connect.Request[v1.ColumnCardinalityRequest]) (*connect.Response[v1.ColumnCardinalityResponse], error) { + return c.columnCardinality.CallUnary(ctx, req) +} + +// ColumnTimeSeries calls rill.runtime.v1.QueryService.ColumnTimeSeries. +func (c *queryServiceClient) ColumnTimeSeries(ctx context.Context, req *connect.Request[v1.ColumnTimeSeriesRequest]) (*connect.Response[v1.ColumnTimeSeriesResponse], error) { + return c.columnTimeSeries.CallUnary(ctx, req) +} + +// TableCardinality calls rill.runtime.v1.QueryService.TableCardinality. +func (c *queryServiceClient) TableCardinality(ctx context.Context, req *connect.Request[v1.TableCardinalityRequest]) (*connect.Response[v1.TableCardinalityResponse], error) { + return c.tableCardinality.CallUnary(ctx, req) +} + +// TableColumns calls rill.runtime.v1.QueryService.TableColumns. +func (c *queryServiceClient) TableColumns(ctx context.Context, req *connect.Request[v1.TableColumnsRequest]) (*connect.Response[v1.TableColumnsResponse], error) { + return c.tableColumns.CallUnary(ctx, req) +} + +// TableRows calls rill.runtime.v1.QueryService.TableRows. +func (c *queryServiceClient) TableRows(ctx context.Context, req *connect.Request[v1.TableRowsRequest]) (*connect.Response[v1.TableRowsResponse], error) { + return c.tableRows.CallUnary(ctx, req) +} + +// QueryServiceHandler is an implementation of the rill.runtime.v1.QueryService service. +type QueryServiceHandler interface { + // Query runs a SQL query against the instance's OLAP datastore. + Query(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error) + // Batch request with different queries + QueryBatch(context.Context, *connect.Request[v1.QueryBatchRequest], *connect.ServerStream[v1.QueryBatchResponse]) error + // Export builds a URL to download the results of a query as a file. + Export(context.Context, *connect.Request[v1.ExportRequest]) (*connect.Response[v1.ExportResponse], error) + // ExportReport builds a URL to download the results of a query as a file. + ExportReport(context.Context, *connect.Request[v1.ExportReportRequest]) (*connect.Response[v1.ExportReportResponse], error) + // MetricsViewAggregation is a generic API for running group-by/pivot queries against a metrics view. + MetricsViewAggregation(context.Context, *connect.Request[v1.MetricsViewAggregationRequest]) (*connect.Response[v1.MetricsViewAggregationResponse], error) + // Deprecated - use MetricsViewComparison instead. + // MetricsViewToplist returns the top dimension values of a metrics view sorted by one or more measures. + // It's a convenience API for querying a metrics view. + MetricsViewToplist(context.Context, *connect.Request[v1.MetricsViewToplistRequest]) (*connect.Response[v1.MetricsViewToplistResponse], error) + // MetricsViewComparison returns a toplist containing comparison data of another toplist (same dimension/measure but a different time range). + // Returns a toplist without comparison data if comparison time range is omitted. + // + // ie. comparsion toplist: + // | measure1_base | measure1_previous | measure1__delta_abs | measure1__delta_rel | dimension | + // |---------------|---------------------|---------------------|--------------------|-----------| + // | 2 | 2 | 0 | 0 | Safari | + // | 1 | 0 | 1 | N/A | Chrome | + // | 0 | 4 | -4 | -1.0 | Firefox | + // + // ie. toplist: + // | measure1 | measure2 | dimension | + // |----------|----------|-----------| + // | 2 | 45 | Safari | + // | 1 | 350 | Chrome | + // | 0 | 25 | Firefox | + MetricsViewComparison(context.Context, *connect.Request[v1.MetricsViewComparisonRequest]) (*connect.Response[v1.MetricsViewComparisonResponse], error) + // MetricsViewTimeSeries returns time series for the measures in the metrics view. + // It's a convenience API for querying a metrics view. + MetricsViewTimeSeries(context.Context, *connect.Request[v1.MetricsViewTimeSeriesRequest]) (*connect.Response[v1.MetricsViewTimeSeriesResponse], error) + // MetricsViewTotals returns totals over a time period for the measures in a metrics view. + // It's a convenience API for querying a metrics view. + MetricsViewTotals(context.Context, *connect.Request[v1.MetricsViewTotalsRequest]) (*connect.Response[v1.MetricsViewTotalsResponse], error) + // MetricsViewRows returns the underlying model rows matching a metrics view time range and filter(s). + // + // ie. without granularity + // | column1 | column2 | dimension | + // |---------|---------|-----------| + // | 2 | 2 | Safari | + // | 1 | 0 | Chrome | + // | 0 | 4 | Firefox | + // + // ie. with granularity + // | timestamp__day0 | column1 | column2 | dimension | + // |----------------------|---------|---------|-----------| + // | 2022-01-01T00:00:00Z | 2 | 2 | Safari | + // | 2022-01-01T00:00:00Z | 1 | 0 | Chrome | + // | 2022-01-01T00:00:00Z | 0 | 4 | Firefox | + MetricsViewRows(context.Context, *connect.Request[v1.MetricsViewRowsRequest]) (*connect.Response[v1.MetricsViewRowsResponse], error) + // MetricsViewTimeRange Get the time range summaries (min, max) for time column in a metrics view. + // Deprecated: use MetricsViewTimeRanges instead. + MetricsViewTimeRange(context.Context, *connect.Request[v1.MetricsViewTimeRangeRequest]) (*connect.Response[v1.MetricsViewTimeRangeResponse], error) + // MetricsViewSchema Get the data types of measures and dimensions + MetricsViewSchema(context.Context, *connect.Request[v1.MetricsViewSchemaRequest]) (*connect.Response[v1.MetricsViewSchemaResponse], error) + // MetricsViewSearch Get the data types of measures and dimensions + MetricsViewSearch(context.Context, *connect.Request[v1.MetricsViewSearchRequest]) (*connect.Response[v1.MetricsViewSearchResponse], error) + // MetricsViewTimeRanges resolves time ranges for a metrics view. + MetricsViewTimeRanges(context.Context, *connect.Request[v1.MetricsViewTimeRangesRequest]) (*connect.Response[v1.MetricsViewTimeRangesResponse], error) + MetricsViewAnnotations(context.Context, *connect.Request[v1.MetricsViewAnnotationsRequest]) (*connect.Response[v1.MetricsViewAnnotationsResponse], error) + // ConvertExpressionToMetricsSQL converts a filter expression to a SQL filter string. + ConvertExpressionToMetricsSQL(context.Context, *connect.Request[v1.ConvertExpressionToMetricsSQLRequest]) (*connect.Response[v1.ConvertExpressionToMetricsSQLResponse], error) + // ResolveCanvas is a convenience API that returns a canvas and all its referenced components and metrics views. + ResolveCanvas(context.Context, *connect.Request[v1.ResolveCanvasRequest]) (*connect.Response[v1.ResolveCanvasResponse], error) + // ResolveComponent resolves renderer for a Component resource. + ResolveComponent(context.Context, *connect.Request[v1.ResolveComponentRequest]) (*connect.Response[v1.ResolveComponentResponse], error) + // ResolveTemplatedString resolves a templated strings. + ResolveTemplatedString(context.Context, *connect.Request[v1.ResolveTemplatedStringRequest]) (*connect.Response[v1.ResolveTemplatedStringResponse], error) + // ColumnRollupInterval returns the minimum time granularity (as well as the time range) for a specified timestamp column + ColumnRollupInterval(context.Context, *connect.Request[v1.ColumnRollupIntervalRequest]) (*connect.Response[v1.ColumnRollupIntervalResponse], error) + // Get TopK elements from a table for a column given an agg function + // agg function and k are optional, defaults are count(*) and 50 respectively + ColumnTopK(context.Context, *connect.Request[v1.ColumnTopKRequest]) (*connect.Response[v1.ColumnTopKResponse], error) + // Get the number of nulls in a column + ColumnNullCount(context.Context, *connect.Request[v1.ColumnNullCountRequest]) (*connect.Response[v1.ColumnNullCountResponse], error) + // Get basic stats for a numeric column like min, max, mean, stddev, etc + ColumnDescriptiveStatistics(context.Context, *connect.Request[v1.ColumnDescriptiveStatisticsRequest]) (*connect.Response[v1.ColumnDescriptiveStatisticsResponse], error) + // Estimates the smallest time grain present in the column + ColumnTimeGrain(context.Context, *connect.Request[v1.ColumnTimeGrainRequest]) (*connect.Response[v1.ColumnTimeGrainResponse], error) + // Get the histogram for values in a column + ColumnNumericHistogram(context.Context, *connect.Request[v1.ColumnNumericHistogramRequest]) (*connect.Response[v1.ColumnNumericHistogramResponse], error) + // Get outliers for a numeric column + ColumnRugHistogram(context.Context, *connect.Request[v1.ColumnRugHistogramRequest]) (*connect.Response[v1.ColumnRugHistogramResponse], error) + // Get the time range summaries (min, max) for a column + ColumnTimeRange(context.Context, *connect.Request[v1.ColumnTimeRangeRequest]) (*connect.Response[v1.ColumnTimeRangeResponse], error) + // Get cardinality for a column + ColumnCardinality(context.Context, *connect.Request[v1.ColumnCardinalityRequest]) (*connect.Response[v1.ColumnCardinalityResponse], error) + // Generate time series for the given measures (aggregation expressions) along with the sparkline timeseries + ColumnTimeSeries(context.Context, *connect.Request[v1.ColumnTimeSeriesRequest]) (*connect.Response[v1.ColumnTimeSeriesResponse], error) + // TableCardinality returns row count + TableCardinality(context.Context, *connect.Request[v1.TableCardinalityRequest]) (*connect.Response[v1.TableCardinalityResponse], error) + // TableColumns returns column profiles + TableColumns(context.Context, *connect.Request[v1.TableColumnsRequest]) (*connect.Response[v1.TableColumnsResponse], error) + // TableRows returns table rows + TableRows(context.Context, *connect.Request[v1.TableRowsRequest]) (*connect.Response[v1.TableRowsResponse], error) +} + +// NewQueryServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewQueryServiceHandler(svc QueryServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + queryServiceQueryHandler := connect.NewUnaryHandler( + QueryServiceQueryProcedure, + svc.Query, + connect.WithSchema(queryServiceQueryMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceQueryBatchHandler := connect.NewServerStreamHandler( + QueryServiceQueryBatchProcedure, + svc.QueryBatch, + connect.WithSchema(queryServiceQueryBatchMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceExportHandler := connect.NewUnaryHandler( + QueryServiceExportProcedure, + svc.Export, + connect.WithSchema(queryServiceExportMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceExportReportHandler := connect.NewUnaryHandler( + QueryServiceExportReportProcedure, + svc.ExportReport, + connect.WithSchema(queryServiceExportReportMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceMetricsViewAggregationHandler := connect.NewUnaryHandler( + QueryServiceMetricsViewAggregationProcedure, + svc.MetricsViewAggregation, + connect.WithSchema(queryServiceMetricsViewAggregationMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceMetricsViewToplistHandler := connect.NewUnaryHandler( + QueryServiceMetricsViewToplistProcedure, + svc.MetricsViewToplist, + connect.WithSchema(queryServiceMetricsViewToplistMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceMetricsViewComparisonHandler := connect.NewUnaryHandler( + QueryServiceMetricsViewComparisonProcedure, + svc.MetricsViewComparison, + connect.WithSchema(queryServiceMetricsViewComparisonMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceMetricsViewTimeSeriesHandler := connect.NewUnaryHandler( + QueryServiceMetricsViewTimeSeriesProcedure, + svc.MetricsViewTimeSeries, + connect.WithSchema(queryServiceMetricsViewTimeSeriesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceMetricsViewTotalsHandler := connect.NewUnaryHandler( + QueryServiceMetricsViewTotalsProcedure, + svc.MetricsViewTotals, + connect.WithSchema(queryServiceMetricsViewTotalsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceMetricsViewRowsHandler := connect.NewUnaryHandler( + QueryServiceMetricsViewRowsProcedure, + svc.MetricsViewRows, + connect.WithSchema(queryServiceMetricsViewRowsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceMetricsViewTimeRangeHandler := connect.NewUnaryHandler( + QueryServiceMetricsViewTimeRangeProcedure, + svc.MetricsViewTimeRange, + connect.WithSchema(queryServiceMetricsViewTimeRangeMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceMetricsViewSchemaHandler := connect.NewUnaryHandler( + QueryServiceMetricsViewSchemaProcedure, + svc.MetricsViewSchema, + connect.WithSchema(queryServiceMetricsViewSchemaMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceMetricsViewSearchHandler := connect.NewUnaryHandler( + QueryServiceMetricsViewSearchProcedure, + svc.MetricsViewSearch, + connect.WithSchema(queryServiceMetricsViewSearchMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceMetricsViewTimeRangesHandler := connect.NewUnaryHandler( + QueryServiceMetricsViewTimeRangesProcedure, + svc.MetricsViewTimeRanges, + connect.WithSchema(queryServiceMetricsViewTimeRangesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceMetricsViewAnnotationsHandler := connect.NewUnaryHandler( + QueryServiceMetricsViewAnnotationsProcedure, + svc.MetricsViewAnnotations, + connect.WithSchema(queryServiceMetricsViewAnnotationsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceConvertExpressionToMetricsSQLHandler := connect.NewUnaryHandler( + QueryServiceConvertExpressionToMetricsSQLProcedure, + svc.ConvertExpressionToMetricsSQL, + connect.WithSchema(queryServiceConvertExpressionToMetricsSQLMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceResolveCanvasHandler := connect.NewUnaryHandler( + QueryServiceResolveCanvasProcedure, + svc.ResolveCanvas, + connect.WithSchema(queryServiceResolveCanvasMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceResolveComponentHandler := connect.NewUnaryHandler( + QueryServiceResolveComponentProcedure, + svc.ResolveComponent, + connect.WithSchema(queryServiceResolveComponentMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceResolveTemplatedStringHandler := connect.NewUnaryHandler( + QueryServiceResolveTemplatedStringProcedure, + svc.ResolveTemplatedString, + connect.WithSchema(queryServiceResolveTemplatedStringMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceColumnRollupIntervalHandler := connect.NewUnaryHandler( + QueryServiceColumnRollupIntervalProcedure, + svc.ColumnRollupInterval, + connect.WithSchema(queryServiceColumnRollupIntervalMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceColumnTopKHandler := connect.NewUnaryHandler( + QueryServiceColumnTopKProcedure, + svc.ColumnTopK, + connect.WithSchema(queryServiceColumnTopKMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceColumnNullCountHandler := connect.NewUnaryHandler( + QueryServiceColumnNullCountProcedure, + svc.ColumnNullCount, + connect.WithSchema(queryServiceColumnNullCountMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceColumnDescriptiveStatisticsHandler := connect.NewUnaryHandler( + QueryServiceColumnDescriptiveStatisticsProcedure, + svc.ColumnDescriptiveStatistics, + connect.WithSchema(queryServiceColumnDescriptiveStatisticsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceColumnTimeGrainHandler := connect.NewUnaryHandler( + QueryServiceColumnTimeGrainProcedure, + svc.ColumnTimeGrain, + connect.WithSchema(queryServiceColumnTimeGrainMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceColumnNumericHistogramHandler := connect.NewUnaryHandler( + QueryServiceColumnNumericHistogramProcedure, + svc.ColumnNumericHistogram, + connect.WithSchema(queryServiceColumnNumericHistogramMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceColumnRugHistogramHandler := connect.NewUnaryHandler( + QueryServiceColumnRugHistogramProcedure, + svc.ColumnRugHistogram, + connect.WithSchema(queryServiceColumnRugHistogramMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceColumnTimeRangeHandler := connect.NewUnaryHandler( + QueryServiceColumnTimeRangeProcedure, + svc.ColumnTimeRange, + connect.WithSchema(queryServiceColumnTimeRangeMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceColumnCardinalityHandler := connect.NewUnaryHandler( + QueryServiceColumnCardinalityProcedure, + svc.ColumnCardinality, + connect.WithSchema(queryServiceColumnCardinalityMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceColumnTimeSeriesHandler := connect.NewUnaryHandler( + QueryServiceColumnTimeSeriesProcedure, + svc.ColumnTimeSeries, + connect.WithSchema(queryServiceColumnTimeSeriesMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceTableCardinalityHandler := connect.NewUnaryHandler( + QueryServiceTableCardinalityProcedure, + svc.TableCardinality, + connect.WithSchema(queryServiceTableCardinalityMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceTableColumnsHandler := connect.NewUnaryHandler( + QueryServiceTableColumnsProcedure, + svc.TableColumns, + connect.WithSchema(queryServiceTableColumnsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + queryServiceTableRowsHandler := connect.NewUnaryHandler( + QueryServiceTableRowsProcedure, + svc.TableRows, + connect.WithSchema(queryServiceTableRowsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/rill.runtime.v1.QueryService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case QueryServiceQueryProcedure: + queryServiceQueryHandler.ServeHTTP(w, r) + case QueryServiceQueryBatchProcedure: + queryServiceQueryBatchHandler.ServeHTTP(w, r) + case QueryServiceExportProcedure: + queryServiceExportHandler.ServeHTTP(w, r) + case QueryServiceExportReportProcedure: + queryServiceExportReportHandler.ServeHTTP(w, r) + case QueryServiceMetricsViewAggregationProcedure: + queryServiceMetricsViewAggregationHandler.ServeHTTP(w, r) + case QueryServiceMetricsViewToplistProcedure: + queryServiceMetricsViewToplistHandler.ServeHTTP(w, r) + case QueryServiceMetricsViewComparisonProcedure: + queryServiceMetricsViewComparisonHandler.ServeHTTP(w, r) + case QueryServiceMetricsViewTimeSeriesProcedure: + queryServiceMetricsViewTimeSeriesHandler.ServeHTTP(w, r) + case QueryServiceMetricsViewTotalsProcedure: + queryServiceMetricsViewTotalsHandler.ServeHTTP(w, r) + case QueryServiceMetricsViewRowsProcedure: + queryServiceMetricsViewRowsHandler.ServeHTTP(w, r) + case QueryServiceMetricsViewTimeRangeProcedure: + queryServiceMetricsViewTimeRangeHandler.ServeHTTP(w, r) + case QueryServiceMetricsViewSchemaProcedure: + queryServiceMetricsViewSchemaHandler.ServeHTTP(w, r) + case QueryServiceMetricsViewSearchProcedure: + queryServiceMetricsViewSearchHandler.ServeHTTP(w, r) + case QueryServiceMetricsViewTimeRangesProcedure: + queryServiceMetricsViewTimeRangesHandler.ServeHTTP(w, r) + case QueryServiceMetricsViewAnnotationsProcedure: + queryServiceMetricsViewAnnotationsHandler.ServeHTTP(w, r) + case QueryServiceConvertExpressionToMetricsSQLProcedure: + queryServiceConvertExpressionToMetricsSQLHandler.ServeHTTP(w, r) + case QueryServiceResolveCanvasProcedure: + queryServiceResolveCanvasHandler.ServeHTTP(w, r) + case QueryServiceResolveComponentProcedure: + queryServiceResolveComponentHandler.ServeHTTP(w, r) + case QueryServiceResolveTemplatedStringProcedure: + queryServiceResolveTemplatedStringHandler.ServeHTTP(w, r) + case QueryServiceColumnRollupIntervalProcedure: + queryServiceColumnRollupIntervalHandler.ServeHTTP(w, r) + case QueryServiceColumnTopKProcedure: + queryServiceColumnTopKHandler.ServeHTTP(w, r) + case QueryServiceColumnNullCountProcedure: + queryServiceColumnNullCountHandler.ServeHTTP(w, r) + case QueryServiceColumnDescriptiveStatisticsProcedure: + queryServiceColumnDescriptiveStatisticsHandler.ServeHTTP(w, r) + case QueryServiceColumnTimeGrainProcedure: + queryServiceColumnTimeGrainHandler.ServeHTTP(w, r) + case QueryServiceColumnNumericHistogramProcedure: + queryServiceColumnNumericHistogramHandler.ServeHTTP(w, r) + case QueryServiceColumnRugHistogramProcedure: + queryServiceColumnRugHistogramHandler.ServeHTTP(w, r) + case QueryServiceColumnTimeRangeProcedure: + queryServiceColumnTimeRangeHandler.ServeHTTP(w, r) + case QueryServiceColumnCardinalityProcedure: + queryServiceColumnCardinalityHandler.ServeHTTP(w, r) + case QueryServiceColumnTimeSeriesProcedure: + queryServiceColumnTimeSeriesHandler.ServeHTTP(w, r) + case QueryServiceTableCardinalityProcedure: + queryServiceTableCardinalityHandler.ServeHTTP(w, r) + case QueryServiceTableColumnsProcedure: + queryServiceTableColumnsHandler.ServeHTTP(w, r) + case QueryServiceTableRowsProcedure: + queryServiceTableRowsHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedQueryServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedQueryServiceHandler struct{} + +func (UnimplementedQueryServiceHandler) Query(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.Query is not implemented")) +} + +func (UnimplementedQueryServiceHandler) QueryBatch(context.Context, *connect.Request[v1.QueryBatchRequest], *connect.ServerStream[v1.QueryBatchResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.QueryBatch is not implemented")) +} + +func (UnimplementedQueryServiceHandler) Export(context.Context, *connect.Request[v1.ExportRequest]) (*connect.Response[v1.ExportResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.Export is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ExportReport(context.Context, *connect.Request[v1.ExportReportRequest]) (*connect.Response[v1.ExportReportResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ExportReport is not implemented")) +} + +func (UnimplementedQueryServiceHandler) MetricsViewAggregation(context.Context, *connect.Request[v1.MetricsViewAggregationRequest]) (*connect.Response[v1.MetricsViewAggregationResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.MetricsViewAggregation is not implemented")) +} + +func (UnimplementedQueryServiceHandler) MetricsViewToplist(context.Context, *connect.Request[v1.MetricsViewToplistRequest]) (*connect.Response[v1.MetricsViewToplistResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.MetricsViewToplist is not implemented")) +} + +func (UnimplementedQueryServiceHandler) MetricsViewComparison(context.Context, *connect.Request[v1.MetricsViewComparisonRequest]) (*connect.Response[v1.MetricsViewComparisonResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.MetricsViewComparison is not implemented")) +} + +func (UnimplementedQueryServiceHandler) MetricsViewTimeSeries(context.Context, *connect.Request[v1.MetricsViewTimeSeriesRequest]) (*connect.Response[v1.MetricsViewTimeSeriesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.MetricsViewTimeSeries is not implemented")) +} + +func (UnimplementedQueryServiceHandler) MetricsViewTotals(context.Context, *connect.Request[v1.MetricsViewTotalsRequest]) (*connect.Response[v1.MetricsViewTotalsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.MetricsViewTotals is not implemented")) +} + +func (UnimplementedQueryServiceHandler) MetricsViewRows(context.Context, *connect.Request[v1.MetricsViewRowsRequest]) (*connect.Response[v1.MetricsViewRowsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.MetricsViewRows is not implemented")) +} + +func (UnimplementedQueryServiceHandler) MetricsViewTimeRange(context.Context, *connect.Request[v1.MetricsViewTimeRangeRequest]) (*connect.Response[v1.MetricsViewTimeRangeResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.MetricsViewTimeRange is not implemented")) +} + +func (UnimplementedQueryServiceHandler) MetricsViewSchema(context.Context, *connect.Request[v1.MetricsViewSchemaRequest]) (*connect.Response[v1.MetricsViewSchemaResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.MetricsViewSchema is not implemented")) +} + +func (UnimplementedQueryServiceHandler) MetricsViewSearch(context.Context, *connect.Request[v1.MetricsViewSearchRequest]) (*connect.Response[v1.MetricsViewSearchResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.MetricsViewSearch is not implemented")) +} + +func (UnimplementedQueryServiceHandler) MetricsViewTimeRanges(context.Context, *connect.Request[v1.MetricsViewTimeRangesRequest]) (*connect.Response[v1.MetricsViewTimeRangesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.MetricsViewTimeRanges is not implemented")) +} + +func (UnimplementedQueryServiceHandler) MetricsViewAnnotations(context.Context, *connect.Request[v1.MetricsViewAnnotationsRequest]) (*connect.Response[v1.MetricsViewAnnotationsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.MetricsViewAnnotations is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ConvertExpressionToMetricsSQL(context.Context, *connect.Request[v1.ConvertExpressionToMetricsSQLRequest]) (*connect.Response[v1.ConvertExpressionToMetricsSQLResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ConvertExpressionToMetricsSQL is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ResolveCanvas(context.Context, *connect.Request[v1.ResolveCanvasRequest]) (*connect.Response[v1.ResolveCanvasResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ResolveCanvas is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ResolveComponent(context.Context, *connect.Request[v1.ResolveComponentRequest]) (*connect.Response[v1.ResolveComponentResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ResolveComponent is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ResolveTemplatedString(context.Context, *connect.Request[v1.ResolveTemplatedStringRequest]) (*connect.Response[v1.ResolveTemplatedStringResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ResolveTemplatedString is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ColumnRollupInterval(context.Context, *connect.Request[v1.ColumnRollupIntervalRequest]) (*connect.Response[v1.ColumnRollupIntervalResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ColumnRollupInterval is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ColumnTopK(context.Context, *connect.Request[v1.ColumnTopKRequest]) (*connect.Response[v1.ColumnTopKResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ColumnTopK is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ColumnNullCount(context.Context, *connect.Request[v1.ColumnNullCountRequest]) (*connect.Response[v1.ColumnNullCountResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ColumnNullCount is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ColumnDescriptiveStatistics(context.Context, *connect.Request[v1.ColumnDescriptiveStatisticsRequest]) (*connect.Response[v1.ColumnDescriptiveStatisticsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ColumnDescriptiveStatistics is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ColumnTimeGrain(context.Context, *connect.Request[v1.ColumnTimeGrainRequest]) (*connect.Response[v1.ColumnTimeGrainResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ColumnTimeGrain is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ColumnNumericHistogram(context.Context, *connect.Request[v1.ColumnNumericHistogramRequest]) (*connect.Response[v1.ColumnNumericHistogramResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ColumnNumericHistogram is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ColumnRugHistogram(context.Context, *connect.Request[v1.ColumnRugHistogramRequest]) (*connect.Response[v1.ColumnRugHistogramResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ColumnRugHistogram is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ColumnTimeRange(context.Context, *connect.Request[v1.ColumnTimeRangeRequest]) (*connect.Response[v1.ColumnTimeRangeResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ColumnTimeRange is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ColumnCardinality(context.Context, *connect.Request[v1.ColumnCardinalityRequest]) (*connect.Response[v1.ColumnCardinalityResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ColumnCardinality is not implemented")) +} + +func (UnimplementedQueryServiceHandler) ColumnTimeSeries(context.Context, *connect.Request[v1.ColumnTimeSeriesRequest]) (*connect.Response[v1.ColumnTimeSeriesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.ColumnTimeSeries is not implemented")) +} + +func (UnimplementedQueryServiceHandler) TableCardinality(context.Context, *connect.Request[v1.TableCardinalityRequest]) (*connect.Response[v1.TableCardinalityResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.TableCardinality is not implemented")) +} + +func (UnimplementedQueryServiceHandler) TableColumns(context.Context, *connect.Request[v1.TableColumnsRequest]) (*connect.Response[v1.TableColumnsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.TableColumns is not implemented")) +} + +func (UnimplementedQueryServiceHandler) TableRows(context.Context, *connect.Request[v1.TableRowsRequest]) (*connect.Response[v1.TableRowsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("rill.runtime.v1.QueryService.TableRows is not implemented")) +} diff --git a/web-admin/src/features/projects/selectors.ts b/web-admin/src/features/projects/selectors.ts index e3e870be916..fe741aeb760 100644 --- a/web-admin/src/features/projects/selectors.ts +++ b/web-admin/src/features/projects/selectors.ts @@ -148,6 +148,47 @@ export async function fetchProjectDeploymentDetails( }; } +export async function fetchProject( + orgName: string, + projectName: string, + token: string | undefined, +) { + let queryKey: QueryKey; + let queryFn: QueryFunction< + Awaited> + >; + + if (token) { + queryKey = getAdminServiceGetProjectWithBearerTokenQueryKey( + orgName, + projectName, + token, + {}, + ); + + queryFn = ({ signal }) => + adminServiceGetProjectWithBearerToken( + orgName, + projectName, + token, + {}, + signal, + ); + } else { + queryKey = getAdminServiceGetProjectQueryKey(orgName, projectName); + + queryFn = ({ signal }) => + adminServiceGetProject(orgName, projectName, {}, signal); + } + + const projResp = await queryClient.fetchQuery({ + queryKey, + queryFn, + }); + + return projResp; +} + export function useGithubLastSynced(instanceId: string) { return useResourceV2( instanceId, diff --git a/web-admin/src/routes/+layout.svelte b/web-admin/src/routes/+layout.svelte index 86c96f7c538..353789e1348 100644 --- a/web-admin/src/routes/+layout.svelte +++ b/web-admin/src/routes/+layout.svelte @@ -28,6 +28,7 @@ import ErrorBoundary from "../components/errors/ErrorBoundary.svelte"; import TopNavigationBar from "../features/navigation/TopNavigationBar.svelte"; import "@rilldata/web-common/app.css"; + import ProjectProvider from "@rilldata/web-common/features/project/ProjectProvider.svelte"; export let data; @@ -39,7 +40,7 @@ planDisplayName, } = data); $: ({ - params: { organization }, + params, url: { pathname }, } = $page); @@ -90,7 +91,7 @@ isPublicReportPage($page); $: hideBillingManager = // billing manager needs organization - !organization || + !params?.organization || // invite page shouldn't show the banner since the illusion is that the user is not on cloud yet. isProjectInvitePage($page); @@ -127,36 +128,51 @@ -
- - {#if !hideBillingManager} - - {/if} - {#if !isEmbed && !hideTopBar} - - - {#if withinOnlyOrg} - - {/if} - {/if} - - - -
+ {#key params?.organization + "-" + params?.project} + +
+ + {#if !hideBillingManager} + + {/if} + {#if !isEmbed && !hideTopBar} + + + {#if withinOnlyOrg} + + {/if} + {/if} + + + +
+
+ {/key}
diff --git a/web-admin/src/routes/[organization]/[project]/explore/[dashboard]/+page.svelte b/web-admin/src/routes/[organization]/[project]/explore/[dashboard]/+page.svelte index 07538000e80..e06558753eb 100644 --- a/web-admin/src/routes/[organization]/[project]/explore/[dashboard]/+page.svelte +++ b/web-admin/src/routes/[organization]/[project]/explore/[dashboard]/+page.svelte @@ -143,7 +143,12 @@ {:else if metricsViewName} {#key exploreName} - + { + const computeCase = measure.name?.endsWith("_prev") + ? "comparisonValue" + : measure.name?.endsWith("_delta") + ? "comparisonDelta" + : measure.name?.endsWith("_delta_perc") + ? "comparisonRatio" + : undefined; + + return { + name: measure.name, + compute: computeCase + ? { case: computeCase, value: { measure: measures[0].name } } + : undefined, + }; + }) as MetricsViewAggregationMeasure[]; + + $: sortedQuery = metricsViewAggregation( { + metricsView: metricsViewName, dimensions: [{ name: dimensionName }], - measures, - timeRange, - comparisonTimeRange, + measures: connectRpcMeasures, + timeRange: { + start: toTimestamp(timeRange.start), + end: toTimestamp(timeRange.end), + }, + comparisonTimeRange: { + start: toTimestamp(comparisonTimeRange?.start), + end: toTimestamp(comparisonTimeRange?.end), + }, sort, - where, - limit: queryLimit.toString(), - offset: "0", + where: where as Expression, + offset: 0n, + limit: BigInt(queryLimit), }, { query: { enabled: visible && timeControlsReady, }, }, - ); + ).create(); + + // $: sortedQuery = createQueryServiceMetricsViewAggregation( + // instanceId, + // metricsViewName, + // { + // dimensions: [{ name: dimensionName }], + // measures, + // timeRange, + // comparisonTimeRange, + // sort, + // where, + // limit: queryLimit.toString(), + // offset: "0", + // }, + // { + // query: { + // enabled: visible && timeControlsReady, + // }, + // }, + // ); $: totalsQuery = createQueryServiceMetricsViewAggregation( instanceId, @@ -214,7 +264,7 @@ $: ({ aboveTheFold, belowTheFoldValues, noAvailableValues, showExpandTable } = prepareLeaderboardItemData( - sortedData?.data, + sortedData?.data?.map((struct) => struct.toJson()) ?? [], dimensionName, leaderboardMeasureNames, slice, diff --git a/web-common/src/features/dashboards/leaderboard/leaderboard-utils.ts b/web-common/src/features/dashboards/leaderboard/leaderboard-utils.ts index 7813dc3a044..9774fa04f0c 100644 --- a/web-common/src/features/dashboards/leaderboard/leaderboard-utils.ts +++ b/web-common/src/features/dashboards/leaderboard/leaderboard-utils.ts @@ -11,6 +11,7 @@ import { } from "@rilldata/web-common/runtime-client"; import { SortType } from "../proto-state/derived-types"; import { DashboardState_LeaderboardSortType } from "@rilldata/web-common/proto/gen/rill/ui/v1/dashboard_pb"; +import type { JsonValue } from "@bufbuild/protobuf"; export type LeaderboardItemData = { /** @@ -158,7 +159,7 @@ export function getSort( } export function prepareLeaderboardItemData( - values: V1MetricsViewAggregationResponseDataItem[] | undefined, + values: JsonValue[] | undefined, dimensionName: string, measureNames: string[], numberAboveTheFold: number, @@ -180,7 +181,7 @@ export function prepareLeaderboardItemData( const belowTheFoldValues = new Set(selectedValues); for (const value of values) { - if (aboveTheFold.length === numberAboveTheFold) break; + if (aboveTheFold.length === numberAboveTheFold || !value) break; const dimensionValue = value[dimensionName] as string; diff --git a/web-common/src/features/dashboards/state-managers/StateManagersProvider.svelte b/web-common/src/features/dashboards/state-managers/StateManagersProvider.svelte index bf6f8ca789d..1a9922ce3f5 100644 --- a/web-common/src/features/dashboards/state-managers/StateManagersProvider.svelte +++ b/web-common/src/features/dashboards/state-managers/StateManagersProvider.svelte @@ -1,11 +1,13 @@ + + diff --git a/web-common/src/features/project/project-manager.ts b/web-common/src/features/project/project-manager.ts new file mode 100644 index 00000000000..752f625d897 --- /dev/null +++ b/web-common/src/features/project/project-manager.ts @@ -0,0 +1,65 @@ +import type { V1GetProjectResponse } from "@rilldata/web-admin/client"; +import { createQueryServiceClient } from "@rilldata/web-common/runtime-client/connectrpc"; + +class Project { + projectData: V1GetProjectResponse; + queryServiceClient: ReturnType; + + constructor(projectData: V1GetProjectResponse) { + this.projectData = projectData; + this.queryServiceClient = createQueryServiceClient(projectData); + } +} + +export function createDummyProject( + organization: string = "default", + project: string = "default", +): V1GetProjectResponse { + return { + project: { + name: project, + orgName: organization, + }, + deployment: { + runtimeInstanceId: "default", + runtimeHost: "http://localhost:9009", + }, + }; +} + +class ProjectManager { + _map = new Map(); + + addProject(projectData: V1GetProjectResponse) { + const key = this._getProjectKey( + projectData.project!.orgName!, + projectData.project!.name!, + ); + if (!this._map.has(key)) { + const context = new Project(projectData); + this._map.set(key, context); + } + return this._map.get(key)!; + } + + getProjectContext({ + organization, + project, + }: { + organization: string; + project: string; + }): Project { + const key = this._getProjectKey(organization, project); + + return ( + this._map.get(key) || + this.addProject(createDummyProject(organization, project)) + ); + } + + private _getProjectKey(organization: string, project: string): string { + return `${organization}::${project}`; + } +} + +export const projectManager = new ProjectManager(); diff --git a/web-common/src/proto/gen/rill/runtime/v1/api_connect.ts b/web-common/src/proto/gen/rill/runtime/v1/api_connect.ts new file mode 100644 index 00000000000..abc409527c3 --- /dev/null +++ b/web-common/src/proto/gen/rill/runtime/v1/api_connect.ts @@ -0,0 +1,511 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" +// @generated from file rill/runtime/v1/api.proto (package rill.runtime.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { AnalyzeConnectorsRequest, AnalyzeConnectorsResponse, AnalyzeVariablesRequest, AnalyzeVariablesResponse, CompleteRequest, CompleteResponse, CompleteStreamingRequest, CompleteStreamingResponse, CreateDirectoryRequest, CreateDirectoryResponse, CreateInstanceRequest, CreateInstanceResponse, CreateTriggerRequest, CreateTriggerResponse, DeleteFileRequest, DeleteFileResponse, DeleteInstanceRequest, DeleteInstanceResponse, EditInstanceRequest, EditInstanceResponse, ForkConversationRequest, ForkConversationResponse, GenerateCanvasFileRequest, GenerateCanvasFileResponse, GenerateMetricsViewFileRequest, GenerateMetricsViewFileResponse, GenerateRendererRequest, GenerateRendererResponse, GenerateResolverRequest, GenerateResolverResponse, GetConversationRequest, GetConversationResponse, GetExploreRequest, GetExploreResponse, GetFileRequest, GetFileResponse, GetInstanceRequest, GetInstanceResponse, GetLogsRequest, GetLogsResponse, GetModelPartitionsRequest, GetModelPartitionsResponse, GetResourceRequest, GetResourceResponse, HealthRequest, HealthResponse, InstanceHealthRequest, InstanceHealthResponse, IssueDevJWTRequest, IssueDevJWTResponse, ListConnectorDriversRequest, ListConnectorDriversResponse, ListConversationsRequest, ListConversationsResponse, ListExamplesRequest, ListExamplesResponse, ListFilesRequest, ListFilesResponse, ListInstancesRequest, ListInstancesResponse, ListNotifierConnectorsRequest, ListNotifierConnectorsResponse, ListResourcesRequest, ListResourcesResponse, ListToolsRequest, ListToolsResponse, PingRequest, PingResponse, PutFileRequest, PutFileResponse, QueryResolverRequest, QueryResolverResponse, ReloadConfigRequest, ReloadConfigResponse, RenameFileRequest, RenameFileResponse, ShareConversationRequest, ShareConversationResponse, UnpackEmptyRequest, UnpackEmptyResponse, UnpackExampleRequest, UnpackExampleResponse, WatchFilesRequest, WatchFilesResponse, WatchLogsRequest, WatchLogsResponse, WatchResourcesRequest, WatchResourcesResponse } from "./api_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * RuntimeService is a data infrastructure proxy and orchestrator based on Rill SQL. + * It has a concept of instances, which are fully isolated data projects, enabling optional multi-tenancy. + * + * @generated from service rill.runtime.v1.RuntimeService + */ +export const RuntimeService = { + typeName: "rill.runtime.v1.RuntimeService", + methods: { + /** + * Ping returns information about the runtime + * + * @generated from rpc rill.runtime.v1.RuntimeService.Ping + */ + ping: { + name: "Ping", + I: PingRequest, + O: PingResponse, + kind: MethodKind.Unary, + }, + /** + * Health runs a health check on the runtime. + * + * @generated from rpc rill.runtime.v1.RuntimeService.Health + */ + health: { + name: "Health", + I: HealthRequest, + O: HealthResponse, + kind: MethodKind.Unary, + }, + /** + * InstanceHealth runs a health check on a specific instance. + * + * @generated from rpc rill.runtime.v1.RuntimeService.InstanceHealth + */ + instanceHealth: { + name: "InstanceHealth", + I: InstanceHealthRequest, + O: InstanceHealthResponse, + kind: MethodKind.Unary, + }, + /** + * ListInstances lists all the instances currently managed by the runtime + * + * @generated from rpc rill.runtime.v1.RuntimeService.ListInstances + */ + listInstances: { + name: "ListInstances", + I: ListInstancesRequest, + O: ListInstancesResponse, + kind: MethodKind.Unary, + }, + /** + * GetInstance returns information about a specific instance + * + * @generated from rpc rill.runtime.v1.RuntimeService.GetInstance + */ + getInstance: { + name: "GetInstance", + I: GetInstanceRequest, + O: GetInstanceResponse, + kind: MethodKind.Unary, + }, + /** + * CreateInstance creates a new instance + * + * @generated from rpc rill.runtime.v1.RuntimeService.CreateInstance + */ + createInstance: { + name: "CreateInstance", + I: CreateInstanceRequest, + O: CreateInstanceResponse, + kind: MethodKind.Unary, + }, + /** + * EditInstance edits an existing instance + * + * @generated from rpc rill.runtime.v1.RuntimeService.EditInstance + */ + editInstance: { + name: "EditInstance", + I: EditInstanceRequest, + O: EditInstanceResponse, + kind: MethodKind.Unary, + }, + /** + * DeleteInstance deletes an instance + * + * @generated from rpc rill.runtime.v1.RuntimeService.DeleteInstance + */ + deleteInstance: { + name: "DeleteInstance", + I: DeleteInstanceRequest, + O: DeleteInstanceResponse, + kind: MethodKind.Unary, + }, + /** + * ReloadConfig pulls the latest configuration from the admin service and triggers a repo pull. + * If the instance doesn't have an admin connector, this RPC does nothing. + * + * @generated from rpc rill.runtime.v1.RuntimeService.ReloadConfig + */ + reloadConfig: { + name: "ReloadConfig", + I: ReloadConfigRequest, + O: ReloadConfigResponse, + kind: MethodKind.Unary, + }, + /** + * ListFiles lists all the files matching a glob in a repo. + * The files are sorted by their full path. + * + * @generated from rpc rill.runtime.v1.RuntimeService.ListFiles + */ + listFiles: { + name: "ListFiles", + I: ListFilesRequest, + O: ListFilesResponse, + kind: MethodKind.Unary, + }, + /** + * WatchFiles streams repo file update events. It is not supported on all backends. + * + * @generated from rpc rill.runtime.v1.RuntimeService.WatchFiles + */ + watchFiles: { + name: "WatchFiles", + I: WatchFilesRequest, + O: WatchFilesResponse, + kind: MethodKind.ServerStreaming, + }, + /** + * GetFile returns the contents of a specific file in a repo. + * + * @generated from rpc rill.runtime.v1.RuntimeService.GetFile + */ + getFile: { + name: "GetFile", + I: GetFileRequest, + O: GetFileResponse, + kind: MethodKind.Unary, + }, + /** + * PutFile creates or updates a file in a repo + * + * @generated from rpc rill.runtime.v1.RuntimeService.PutFile + */ + putFile: { + name: "PutFile", + I: PutFileRequest, + O: PutFileResponse, + kind: MethodKind.Unary, + }, + /** + * CreateDirectory create a directory for the given path + * + * @generated from rpc rill.runtime.v1.RuntimeService.CreateDirectory + */ + createDirectory: { + name: "CreateDirectory", + I: CreateDirectoryRequest, + O: CreateDirectoryResponse, + kind: MethodKind.Unary, + }, + /** + * DeleteFile deletes a file from a repo + * + * @generated from rpc rill.runtime.v1.RuntimeService.DeleteFile + */ + deleteFile: { + name: "DeleteFile", + I: DeleteFileRequest, + O: DeleteFileResponse, + kind: MethodKind.Unary, + }, + /** + * RenameFile renames a file in a repo + * + * @generated from rpc rill.runtime.v1.RuntimeService.RenameFile + */ + renameFile: { + name: "RenameFile", + I: RenameFileRequest, + O: RenameFileResponse, + kind: MethodKind.Unary, + }, + /** + * ListExamples lists all the examples embedded into binary + * + * @generated from rpc rill.runtime.v1.RuntimeService.ListExamples + */ + listExamples: { + name: "ListExamples", + I: ListExamplesRequest, + O: ListExamplesResponse, + kind: MethodKind.Unary, + }, + /** + * UnpackExample unpacks an example project + * + * @generated from rpc rill.runtime.v1.RuntimeService.UnpackExample + */ + unpackExample: { + name: "UnpackExample", + I: UnpackExampleRequest, + O: UnpackExampleResponse, + kind: MethodKind.Unary, + }, + /** + * UnpackEmpty unpacks an empty project + * + * @generated from rpc rill.runtime.v1.RuntimeService.UnpackEmpty + */ + unpackEmpty: { + name: "UnpackEmpty", + I: UnpackEmptyRequest, + O: UnpackEmptyResponse, + kind: MethodKind.Unary, + }, + /** + * GenerateMetricsViewFile generates a metrics view YAML file from a table in an OLAP database + * + * @generated from rpc rill.runtime.v1.RuntimeService.GenerateMetricsViewFile + */ + generateMetricsViewFile: { + name: "GenerateMetricsViewFile", + I: GenerateMetricsViewFileRequest, + O: GenerateMetricsViewFileResponse, + kind: MethodKind.Unary, + }, + /** + * GenerateCanvasFile generates a canvas YAML file from a metrics view + * + * @generated from rpc rill.runtime.v1.RuntimeService.GenerateCanvasFile + */ + generateCanvasFile: { + name: "GenerateCanvasFile", + I: GenerateCanvasFileRequest, + O: GenerateCanvasFileResponse, + kind: MethodKind.Unary, + }, + /** + * GenerateResolver generates resolver and resolver properties from a table or a metrics view + * + * @generated from rpc rill.runtime.v1.RuntimeService.GenerateResolver + */ + generateResolver: { + name: "GenerateResolver", + I: GenerateResolverRequest, + O: GenerateResolverResponse, + kind: MethodKind.Unary, + }, + /** + * GenerateRenderer generates a component renderer and renderer properties from a resolver and resolver properties + * + * @generated from rpc rill.runtime.v1.RuntimeService.GenerateRenderer + */ + generateRenderer: { + name: "GenerateRenderer", + I: GenerateRendererRequest, + O: GenerateRendererResponse, + kind: MethodKind.Unary, + }, + /** + * QueryResolver queries a resolver with the given properties and arguments + * + * @generated from rpc rill.runtime.v1.RuntimeService.QueryResolver + */ + queryResolver: { + name: "QueryResolver", + I: QueryResolverRequest, + O: QueryResolverResponse, + kind: MethodKind.Unary, + }, + /** + * GetLogs returns recent logs from a controller + * + * @generated from rpc rill.runtime.v1.RuntimeService.GetLogs + */ + getLogs: { + name: "GetLogs", + I: GetLogsRequest, + O: GetLogsResponse, + kind: MethodKind.Unary, + }, + /** + * WatchLogs streams new logs emitted from a controller + * + * @generated from rpc rill.runtime.v1.RuntimeService.WatchLogs + */ + watchLogs: { + name: "WatchLogs", + I: WatchLogsRequest, + O: WatchLogsResponse, + kind: MethodKind.ServerStreaming, + }, + /** + * ListResources lists the resources stored in the catalog + * + * @generated from rpc rill.runtime.v1.RuntimeService.ListResources + */ + listResources: { + name: "ListResources", + I: ListResourcesRequest, + O: ListResourcesResponse, + kind: MethodKind.Unary, + }, + /** + * WatchResources streams updates to catalog resources (including creation and deletion events) + * + * @generated from rpc rill.runtime.v1.RuntimeService.WatchResources + */ + watchResources: { + name: "WatchResources", + I: WatchResourcesRequest, + O: WatchResourcesResponse, + kind: MethodKind.ServerStreaming, + }, + /** + * GetResource looks up a specific catalog resource + * + * @generated from rpc rill.runtime.v1.RuntimeService.GetResource + */ + getResource: { + name: "GetResource", + I: GetResourceRequest, + O: GetResourceResponse, + kind: MethodKind.Unary, + }, + /** + * GetExplore is a convenience RPC that combines looking up an Explore resource and its underlying MetricsView into one network call. + * + * @generated from rpc rill.runtime.v1.RuntimeService.GetExplore + */ + getExplore: { + name: "GetExplore", + I: GetExploreRequest, + O: GetExploreResponse, + kind: MethodKind.Unary, + }, + /** + * GetModelPartitions returns the partitions of a model + * + * @generated from rpc rill.runtime.v1.RuntimeService.GetModelPartitions + */ + getModelPartitions: { + name: "GetModelPartitions", + I: GetModelPartitionsRequest, + O: GetModelPartitionsResponse, + kind: MethodKind.Unary, + }, + /** + * CreateTrigger submits a refresh trigger, which will asynchronously refresh the specified resources. + * Triggers are ephemeral resources that will be cleaned up by the controller. + * + * @generated from rpc rill.runtime.v1.RuntimeService.CreateTrigger + */ + createTrigger: { + name: "CreateTrigger", + I: CreateTriggerRequest, + O: CreateTriggerResponse, + kind: MethodKind.Unary, + }, + /** + * ListConnectorDrivers returns a description of all the connector drivers registed in the runtime, + * including their configuration specs and the capabilities they support. + * + * @generated from rpc rill.runtime.v1.RuntimeService.ListConnectorDrivers + */ + listConnectorDrivers: { + name: "ListConnectorDrivers", + I: ListConnectorDriversRequest, + O: ListConnectorDriversResponse, + kind: MethodKind.Unary, + }, + /** + * AnalyzeConnectors scans all the project files and returns information about all referenced connectors. + * + * @generated from rpc rill.runtime.v1.RuntimeService.AnalyzeConnectors + */ + analyzeConnectors: { + name: "AnalyzeConnectors", + I: AnalyzeConnectorsRequest, + O: AnalyzeConnectorsResponse, + kind: MethodKind.Unary, + }, + /** + * ListNotifierConnectors returns the names of all configured connectors that can be used as notifiers. + * This API is much faster than AnalyzeConnectors and can be called without admin-level permissions. + * + * @generated from rpc rill.runtime.v1.RuntimeService.ListNotifierConnectors + */ + listNotifierConnectors: { + name: "ListNotifierConnectors", + I: ListNotifierConnectorsRequest, + O: ListNotifierConnectorsResponse, + kind: MethodKind.Unary, + }, + /** + * ListConversations lists all AI chat conversations for an instance. + * + * @generated from rpc rill.runtime.v1.RuntimeService.ListConversations + */ + listConversations: { + name: "ListConversations", + I: ListConversationsRequest, + O: ListConversationsResponse, + kind: MethodKind.Unary, + }, + /** + * GetConversation returns a specific AI chat conversation. + * + * @generated from rpc rill.runtime.v1.RuntimeService.GetConversation + */ + getConversation: { + name: "GetConversation", + I: GetConversationRequest, + O: GetConversationResponse, + kind: MethodKind.Unary, + }, + /** + * ShareConversation enables sharing of the conversation by adding metadata. + * + * @generated from rpc rill.runtime.v1.RuntimeService.ShareConversation + */ + shareConversation: { + name: "ShareConversation", + I: ShareConversationRequest, + O: ShareConversationResponse, + kind: MethodKind.Unary, + }, + /** + * ForkConversation creates a new conversation by copying messages from an existing one. + * If its the owner then all messages will be copied, otherwise only messages up to the session.SharedUntilMessageID are copied. + * + * @generated from rpc rill.runtime.v1.RuntimeService.ForkConversation + */ + forkConversation: { + name: "ForkConversation", + I: ForkConversationRequest, + O: ForkConversationResponse, + kind: MethodKind.Unary, + }, + /** + * ListTools lists metadata about all AI tools that calls to Complete(Streaming) may invoke. + * Note that it covers all registered tools, but the current user may not have access to all of them. + * + * @generated from rpc rill.runtime.v1.RuntimeService.ListTools + */ + listTools: { + name: "ListTools", + I: ListToolsRequest, + O: ListToolsResponse, + kind: MethodKind.Unary, + }, + /** + * Complete runs a language model completion (LLM chat) using the configured AI connector. + * + * @generated from rpc rill.runtime.v1.RuntimeService.Complete + */ + complete: { + name: "Complete", + I: CompleteRequest, + O: CompleteResponse, + kind: MethodKind.Unary, + }, + /** + * CompleteStreaming runs an AI-powered chat completion, optionally invoking agents or tool calls available in Rill. + * + * @generated from rpc rill.runtime.v1.RuntimeService.CompleteStreaming + */ + completeStreaming: { + name: "CompleteStreaming", + I: CompleteStreamingRequest, + O: CompleteStreamingResponse, + kind: MethodKind.ServerStreaming, + }, + /** + * IssueDevJWT issues a JWT for mimicking a user in local development. + * + * @generated from rpc rill.runtime.v1.RuntimeService.IssueDevJWT + */ + issueDevJWT: { + name: "IssueDevJWT", + I: IssueDevJWTRequest, + O: IssueDevJWTResponse, + kind: MethodKind.Unary, + }, + /** + * AnalyzeVariables scans `Source`, `Model` and `Connector` resources in the catalog for use of an environment variable + * + * @generated from rpc rill.runtime.v1.RuntimeService.AnalyzeVariables + */ + analyzeVariables: { + name: "AnalyzeVariables", + I: AnalyzeVariablesRequest, + O: AnalyzeVariablesResponse, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/web-common/src/proto/gen/rill/runtime/v1/connectors_connect.ts b/web-common/src/proto/gen/rill/runtime/v1/connectors_connect.ts new file mode 100644 index 00000000000..ba9bcec6e68 --- /dev/null +++ b/web-common/src/proto/gen/rill/runtime/v1/connectors_connect.ts @@ -0,0 +1,94 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" +// @generated from file rill/runtime/v1/connectors.proto (package rill.runtime.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { GetTableRequest, GetTableResponse, ListBucketsRequest, ListBucketsResponse, ListDatabaseSchemasRequest, ListDatabaseSchemasResponse, ListObjectsRequest, ListObjectsResponse, ListTablesRequest, ListTablesResponse, OLAPGetTableRequest, OLAPGetTableResponse, OLAPListTablesRequest, OLAPListTablesResponse } from "./connectors_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service rill.runtime.v1.ConnectorService + */ +export const ConnectorService = { + typeName: "rill.runtime.v1.ConnectorService", + methods: { + /** + * ListBuckets lists buckets accessible with the configured credentials. + * + * @generated from rpc rill.runtime.v1.ConnectorService.ListBuckets + */ + listBuckets: { + name: "ListBuckets", + I: ListBucketsRequest, + O: ListBucketsResponse, + kind: MethodKind.Unary, + }, + /** + * ListObjects lists objects for the given bucket. + * + * @generated from rpc rill.runtime.v1.ConnectorService.ListObjects + */ + listObjects: { + name: "ListObjects", + I: ListObjectsRequest, + O: ListObjectsResponse, + kind: MethodKind.Unary, + }, + /** + * OLAPListTables list all tables across all databases in an OLAP + * + * @generated from rpc rill.runtime.v1.ConnectorService.OLAPListTables + */ + oLAPListTables: { + name: "OLAPListTables", + I: OLAPListTablesRequest, + O: OLAPListTablesResponse, + kind: MethodKind.Unary, + }, + /** + * OLAPGetTable returns metadata about a table or view in an OLAP + * + * @generated from rpc rill.runtime.v1.ConnectorService.OLAPGetTable + */ + oLAPGetTable: { + name: "OLAPGetTable", + I: OLAPGetTableRequest, + O: OLAPGetTableResponse, + kind: MethodKind.Unary, + }, + /** + * ListDatabaseSchemas list all schemas across databases + * + * @generated from rpc rill.runtime.v1.ConnectorService.ListDatabaseSchemas + */ + listDatabaseSchemas: { + name: "ListDatabaseSchemas", + I: ListDatabaseSchemasRequest, + O: ListDatabaseSchemasResponse, + kind: MethodKind.Unary, + }, + /** + * ListTables list all tables for database and database_schema provided + * + * @generated from rpc rill.runtime.v1.ConnectorService.ListTables + */ + listTables: { + name: "ListTables", + I: ListTablesRequest, + O: ListTablesResponse, + kind: MethodKind.Unary, + }, + /** + * GetTable returns metadata about a table or view + * + * @generated from rpc rill.runtime.v1.ConnectorService.GetTable + */ + getTable: { + name: "GetTable", + I: GetTableRequest, + O: GetTableResponse, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/web-common/src/proto/gen/rill/runtime/v1/queries_connect.ts b/web-common/src/proto/gen/rill/runtime/v1/queries_connect.ts new file mode 100644 index 00000000000..1c68c818d99 --- /dev/null +++ b/web-common/src/proto/gen/rill/runtime/v1/queries_connect.ts @@ -0,0 +1,405 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" +// @generated from file rill/runtime/v1/queries.proto (package rill.runtime.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { ColumnCardinalityRequest, ColumnCardinalityResponse, ColumnDescriptiveStatisticsRequest, ColumnDescriptiveStatisticsResponse, ColumnNullCountRequest, ColumnNullCountResponse, ColumnNumericHistogramRequest, ColumnNumericHistogramResponse, ColumnRollupIntervalRequest, ColumnRollupIntervalResponse, ColumnRugHistogramRequest, ColumnRugHistogramResponse, ColumnTimeGrainRequest, ColumnTimeGrainResponse, ColumnTimeRangeRequest, ColumnTimeRangeResponse, ColumnTimeSeriesRequest, ColumnTimeSeriesResponse, ColumnTopKRequest, ColumnTopKResponse, ConvertExpressionToMetricsSQLRequest, ConvertExpressionToMetricsSQLResponse, ExportReportRequest, ExportReportResponse, ExportRequest, ExportResponse, MetricsViewAggregationRequest, MetricsViewAggregationResponse, MetricsViewAnnotationsRequest, MetricsViewAnnotationsResponse, MetricsViewComparisonRequest, MetricsViewComparisonResponse, MetricsViewRowsRequest, MetricsViewRowsResponse, MetricsViewSchemaRequest, MetricsViewSchemaResponse, MetricsViewSearchRequest, MetricsViewSearchResponse, MetricsViewTimeRangeRequest, MetricsViewTimeRangeResponse, MetricsViewTimeRangesRequest, MetricsViewTimeRangesResponse, MetricsViewTimeSeriesRequest, MetricsViewTimeSeriesResponse, MetricsViewToplistRequest, MetricsViewToplistResponse, MetricsViewTotalsRequest, MetricsViewTotalsResponse, QueryBatchRequest, QueryBatchResponse, QueryRequest, QueryResponse, ResolveCanvasRequest, ResolveCanvasResponse, ResolveComponentRequest, ResolveComponentResponse, ResolveTemplatedStringRequest, ResolveTemplatedStringResponse, TableCardinalityRequest, TableCardinalityResponse, TableColumnsRequest, TableColumnsResponse, TableRowsRequest, TableRowsResponse } from "./queries_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service rill.runtime.v1.QueryService + */ +export const QueryService = { + typeName: "rill.runtime.v1.QueryService", + methods: { + /** + * Query runs a SQL query against the instance's OLAP datastore. + * + * @generated from rpc rill.runtime.v1.QueryService.Query + */ + query: { + name: "Query", + I: QueryRequest, + O: QueryResponse, + kind: MethodKind.Unary, + }, + /** + * Batch request with different queries + * + * @generated from rpc rill.runtime.v1.QueryService.QueryBatch + */ + queryBatch: { + name: "QueryBatch", + I: QueryBatchRequest, + O: QueryBatchResponse, + kind: MethodKind.ServerStreaming, + }, + /** + * Export builds a URL to download the results of a query as a file. + * + * @generated from rpc rill.runtime.v1.QueryService.Export + */ + export: { + name: "Export", + I: ExportRequest, + O: ExportResponse, + kind: MethodKind.Unary, + }, + /** + * ExportReport builds a URL to download the results of a query as a file. + * + * @generated from rpc rill.runtime.v1.QueryService.ExportReport + */ + exportReport: { + name: "ExportReport", + I: ExportReportRequest, + O: ExportReportResponse, + kind: MethodKind.Unary, + }, + /** + * MetricsViewAggregation is a generic API for running group-by/pivot queries against a metrics view. + * + * @generated from rpc rill.runtime.v1.QueryService.MetricsViewAggregation + */ + metricsViewAggregation: { + name: "MetricsViewAggregation", + I: MetricsViewAggregationRequest, + O: MetricsViewAggregationResponse, + kind: MethodKind.Unary, + }, + /** + * + * Deprecated - use MetricsViewComparison instead. + * MetricsViewToplist returns the top dimension values of a metrics view sorted by one or more measures. + * It's a convenience API for querying a metrics view. + * + * @generated from rpc rill.runtime.v1.QueryService.MetricsViewToplist + */ + metricsViewToplist: { + name: "MetricsViewToplist", + I: MetricsViewToplistRequest, + O: MetricsViewToplistResponse, + kind: MethodKind.Unary, + }, + /** + * + * MetricsViewComparison returns a toplist containing comparison data of another toplist (same dimension/measure but a different time range). + * Returns a toplist without comparison data if comparison time range is omitted. + * + * ie. comparsion toplist: + * | measure1_base | measure1_previous | measure1__delta_abs | measure1__delta_rel | dimension | + * |---------------|---------------------|---------------------|--------------------|-----------| + * | 2 | 2 | 0 | 0 | Safari | + * | 1 | 0 | 1 | N/A | Chrome | + * | 0 | 4 | -4 | -1.0 | Firefox | + * + * ie. toplist: + * | measure1 | measure2 | dimension | + * |----------|----------|-----------| + * | 2 | 45 | Safari | + * | 1 | 350 | Chrome | + * | 0 | 25 | Firefox | + * + * @generated from rpc rill.runtime.v1.QueryService.MetricsViewComparison + */ + metricsViewComparison: { + name: "MetricsViewComparison", + I: MetricsViewComparisonRequest, + O: MetricsViewComparisonResponse, + kind: MethodKind.Unary, + }, + /** + * MetricsViewTimeSeries returns time series for the measures in the metrics view. + * It's a convenience API for querying a metrics view. + * + * @generated from rpc rill.runtime.v1.QueryService.MetricsViewTimeSeries + */ + metricsViewTimeSeries: { + name: "MetricsViewTimeSeries", + I: MetricsViewTimeSeriesRequest, + O: MetricsViewTimeSeriesResponse, + kind: MethodKind.Unary, + }, + /** + * MetricsViewTotals returns totals over a time period for the measures in a metrics view. + * It's a convenience API for querying a metrics view. + * + * @generated from rpc rill.runtime.v1.QueryService.MetricsViewTotals + */ + metricsViewTotals: { + name: "MetricsViewTotals", + I: MetricsViewTotalsRequest, + O: MetricsViewTotalsResponse, + kind: MethodKind.Unary, + }, + /** + * + * MetricsViewRows returns the underlying model rows matching a metrics view time range and filter(s). + * + * ie. without granularity + * | column1 | column2 | dimension | + * |---------|---------|-----------| + * | 2 | 2 | Safari | + * | 1 | 0 | Chrome | + * | 0 | 4 | Firefox | + * + * ie. with granularity + * | timestamp__day0 | column1 | column2 | dimension | + * |----------------------|---------|---------|-----------| + * | 2022-01-01T00:00:00Z | 2 | 2 | Safari | + * | 2022-01-01T00:00:00Z | 1 | 0 | Chrome | + * | 2022-01-01T00:00:00Z | 0 | 4 | Firefox | + * + * @generated from rpc rill.runtime.v1.QueryService.MetricsViewRows + */ + metricsViewRows: { + name: "MetricsViewRows", + I: MetricsViewRowsRequest, + O: MetricsViewRowsResponse, + kind: MethodKind.Unary, + }, + /** + * MetricsViewTimeRange Get the time range summaries (min, max) for time column in a metrics view. + * Deprecated: use MetricsViewTimeRanges instead. + * + * @generated from rpc rill.runtime.v1.QueryService.MetricsViewTimeRange + */ + metricsViewTimeRange: { + name: "MetricsViewTimeRange", + I: MetricsViewTimeRangeRequest, + O: MetricsViewTimeRangeResponse, + kind: MethodKind.Unary, + }, + /** + * MetricsViewSchema Get the data types of measures and dimensions + * + * @generated from rpc rill.runtime.v1.QueryService.MetricsViewSchema + */ + metricsViewSchema: { + name: "MetricsViewSchema", + I: MetricsViewSchemaRequest, + O: MetricsViewSchemaResponse, + kind: MethodKind.Unary, + }, + /** + * MetricsViewSearch Get the data types of measures and dimensions + * + * @generated from rpc rill.runtime.v1.QueryService.MetricsViewSearch + */ + metricsViewSearch: { + name: "MetricsViewSearch", + I: MetricsViewSearchRequest, + O: MetricsViewSearchResponse, + kind: MethodKind.Unary, + }, + /** + * MetricsViewTimeRanges resolves time ranges for a metrics view. + * + * @generated from rpc rill.runtime.v1.QueryService.MetricsViewTimeRanges + */ + metricsViewTimeRanges: { + name: "MetricsViewTimeRanges", + I: MetricsViewTimeRangesRequest, + O: MetricsViewTimeRangesResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc rill.runtime.v1.QueryService.MetricsViewAnnotations + */ + metricsViewAnnotations: { + name: "MetricsViewAnnotations", + I: MetricsViewAnnotationsRequest, + O: MetricsViewAnnotationsResponse, + kind: MethodKind.Unary, + }, + /** + * ConvertExpressionToMetricsSQL converts a filter expression to a SQL filter string. + * + * @generated from rpc rill.runtime.v1.QueryService.ConvertExpressionToMetricsSQL + */ + convertExpressionToMetricsSQL: { + name: "ConvertExpressionToMetricsSQL", + I: ConvertExpressionToMetricsSQLRequest, + O: ConvertExpressionToMetricsSQLResponse, + kind: MethodKind.Unary, + }, + /** + * ResolveCanvas is a convenience API that returns a canvas and all its referenced components and metrics views. + * + * @generated from rpc rill.runtime.v1.QueryService.ResolveCanvas + */ + resolveCanvas: { + name: "ResolveCanvas", + I: ResolveCanvasRequest, + O: ResolveCanvasResponse, + kind: MethodKind.Unary, + }, + /** + * ResolveComponent resolves renderer for a Component resource. + * + * @generated from rpc rill.runtime.v1.QueryService.ResolveComponent + */ + resolveComponent: { + name: "ResolveComponent", + I: ResolveComponentRequest, + O: ResolveComponentResponse, + kind: MethodKind.Unary, + }, + /** + * ResolveTemplatedString resolves a templated strings. + * + * @generated from rpc rill.runtime.v1.QueryService.ResolveTemplatedString + */ + resolveTemplatedString: { + name: "ResolveTemplatedString", + I: ResolveTemplatedStringRequest, + O: ResolveTemplatedStringResponse, + kind: MethodKind.Unary, + }, + /** + * ColumnRollupInterval returns the minimum time granularity (as well as the time range) for a specified timestamp column + * + * @generated from rpc rill.runtime.v1.QueryService.ColumnRollupInterval + */ + columnRollupInterval: { + name: "ColumnRollupInterval", + I: ColumnRollupIntervalRequest, + O: ColumnRollupIntervalResponse, + kind: MethodKind.Unary, + }, + /** + * Get TopK elements from a table for a column given an agg function + * agg function and k are optional, defaults are count(*) and 50 respectively + * + * @generated from rpc rill.runtime.v1.QueryService.ColumnTopK + */ + columnTopK: { + name: "ColumnTopK", + I: ColumnTopKRequest, + O: ColumnTopKResponse, + kind: MethodKind.Unary, + }, + /** + * Get the number of nulls in a column + * + * @generated from rpc rill.runtime.v1.QueryService.ColumnNullCount + */ + columnNullCount: { + name: "ColumnNullCount", + I: ColumnNullCountRequest, + O: ColumnNullCountResponse, + kind: MethodKind.Unary, + }, + /** + * Get basic stats for a numeric column like min, max, mean, stddev, etc + * + * @generated from rpc rill.runtime.v1.QueryService.ColumnDescriptiveStatistics + */ + columnDescriptiveStatistics: { + name: "ColumnDescriptiveStatistics", + I: ColumnDescriptiveStatisticsRequest, + O: ColumnDescriptiveStatisticsResponse, + kind: MethodKind.Unary, + }, + /** + * Estimates the smallest time grain present in the column + * + * @generated from rpc rill.runtime.v1.QueryService.ColumnTimeGrain + */ + columnTimeGrain: { + name: "ColumnTimeGrain", + I: ColumnTimeGrainRequest, + O: ColumnTimeGrainResponse, + kind: MethodKind.Unary, + }, + /** + * Get the histogram for values in a column + * + * @generated from rpc rill.runtime.v1.QueryService.ColumnNumericHistogram + */ + columnNumericHistogram: { + name: "ColumnNumericHistogram", + I: ColumnNumericHistogramRequest, + O: ColumnNumericHistogramResponse, + kind: MethodKind.Unary, + }, + /** + * Get outliers for a numeric column + * + * @generated from rpc rill.runtime.v1.QueryService.ColumnRugHistogram + */ + columnRugHistogram: { + name: "ColumnRugHistogram", + I: ColumnRugHistogramRequest, + O: ColumnRugHistogramResponse, + kind: MethodKind.Unary, + }, + /** + * Get the time range summaries (min, max) for a column + * + * @generated from rpc rill.runtime.v1.QueryService.ColumnTimeRange + */ + columnTimeRange: { + name: "ColumnTimeRange", + I: ColumnTimeRangeRequest, + O: ColumnTimeRangeResponse, + kind: MethodKind.Unary, + }, + /** + * Get cardinality for a column + * + * @generated from rpc rill.runtime.v1.QueryService.ColumnCardinality + */ + columnCardinality: { + name: "ColumnCardinality", + I: ColumnCardinalityRequest, + O: ColumnCardinalityResponse, + kind: MethodKind.Unary, + }, + /** + * Generate time series for the given measures (aggregation expressions) along with the sparkline timeseries + * + * @generated from rpc rill.runtime.v1.QueryService.ColumnTimeSeries + */ + columnTimeSeries: { + name: "ColumnTimeSeries", + I: ColumnTimeSeriesRequest, + O: ColumnTimeSeriesResponse, + kind: MethodKind.Unary, + }, + /** + * TableCardinality returns row count + * + * @generated from rpc rill.runtime.v1.QueryService.TableCardinality + */ + tableCardinality: { + name: "TableCardinality", + I: TableCardinalityRequest, + O: TableCardinalityResponse, + kind: MethodKind.Unary, + }, + /** + * TableColumns returns column profiles + * + * @generated from rpc rill.runtime.v1.QueryService.TableColumns + */ + tableColumns: { + name: "TableColumns", + I: TableColumnsRequest, + O: TableColumnsResponse, + kind: MethodKind.Unary, + }, + /** + * TableRows returns table rows + * + * @generated from rpc rill.runtime.v1.QueryService.TableRows + */ + tableRows: { + name: "TableRows", + I: TableRowsRequest, + O: TableRowsResponse, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/web-common/src/runtime-client/connectrpc.ts b/web-common/src/runtime-client/connectrpc.ts new file mode 100644 index 00000000000..614dd4d1b3b --- /dev/null +++ b/web-common/src/runtime-client/connectrpc.ts @@ -0,0 +1,167 @@ +import { createClient } from "@connectrpc/connect"; +import { createConnectTransport } from "@connectrpc/connect-web"; +import { QueryService } from "../proto/gen/rill/runtime/v1/queries_connect"; +import { createQuery, type CreateQueryOptions } from "@tanstack/svelte-query"; +import { + MetricsViewAggregationResponse, + MetricsViewTimeSeriesResponse, + type MetricsViewAggregationRequest, + type MetricsViewTimeSeriesRequest, +} from "../proto/gen/rill/runtime/v1/queries_pb"; +import type { PartialMessage } from "@bufbuild/protobuf"; +import type { V1GetProjectResponse } from "@rilldata/web-admin/client"; +import { projectManager } from "../features/project/project-manager"; +import { getContext } from "svelte"; +import { Timestamp } from "@bufbuild/protobuf"; +import { queryClient } from "../lib/svelte-query/globalQueryClient"; +import { TimeGrain } from "../proto/gen/rill/runtime/v1/time_grain_pb"; +import { V1TimeGrain } from "./gen/index.schemas"; + +export function useQueryServiceClient( + { organization, project }: { organization: string; project: string } = { + organization: getContext("organization"), + project: getContext("project"), + }, +) { + return projectManager.getProjectContext({ + organization, + project, + }); +} + +export function createQueryServiceClient(projectData: V1GetProjectResponse) { + const baseUrl: string = + projectData.deployment?.runtimeHost || "http://localhost:9009"; + const instanceId: string = + projectData.deployment?.runtimeInstanceId || "default"; + const token = projectData.jwt; + + const transport = createConnectTransport({ + baseUrl, + useBinaryFormat: false, + interceptors: token + ? [ + (next) => async (req) => { + req.header.set("Authorization", `Bearer ${token}`); + return await next(req); + }, + ] + : [], + }); + + const client = createClient(QueryService, transport); + + return { + metricsViewAggregation: ( + params: PartialMessage, + options?: { + query?: Partial< + CreateQueryOptions< + MetricsViewAggregationResponse, + Error, + MetricsViewAggregationResponse + > + >; + }, + ) => { + const queryOptions = { + queryKey: [ + "RuntimeService", + "metricsViewAggregation", + instanceId, + params.dimensions, + params.measures, + ], + queryFn: () => + client.metricsViewAggregation({ + ...params, + instanceId, + }), + ...options?.query, + enabled: !!instanceId && (options?.query?.enabled ?? true), + queryClient: queryClient, + }; + + return { + create: () => createQuery(queryOptions), + options: queryOptions, + }; + }, + + metricsViewTimeSeries: ( + params: PartialMessage, + options?: { + query?: Partial< + CreateQueryOptions< + MetricsViewTimeSeriesResponse, + Error, + MetricsViewTimeSeriesResponse + > + >; + }, + ) => { + const queryOptions = { + queryKey: [ + "RuntimeService", + "metricsViewTimeSeries", + instanceId, + params.timeStart, + params.timeEnd, + params.timeGranularity, + params.measureNames, + params.where, + ], + queryFn: () => + client.metricsViewTimeSeries({ + ...params, + instanceId, + }), + ...options?.query, + enabled: !!instanceId && (options?.query?.enabled ?? true), + queryClient: queryClient, + }; + + return { + create: () => createQuery(queryOptions), + options: queryOptions, + }; + }, + }; +} + +export function toTimestamp( + dateString: string | Date | undefined, +): Timestamp | undefined { + if (!dateString) return undefined; + if (typeof dateString === "string") { + return Timestamp.fromJson(dateString); + } + return Timestamp.fromDate(dateString); +} + +export function toConnectRPCTimeGrain( + timeGrain: V1TimeGrain | undefined, +): TimeGrain { + switch (timeGrain) { + case V1TimeGrain.TIME_GRAIN_UNSPECIFIED: + return TimeGrain.UNSPECIFIED; + case V1TimeGrain.TIME_GRAIN_SECOND: + return TimeGrain.SECOND; + case V1TimeGrain.TIME_GRAIN_MINUTE: + return TimeGrain.MINUTE; + case V1TimeGrain.TIME_GRAIN_HOUR: + return TimeGrain.HOUR; + case V1TimeGrain.TIME_GRAIN_DAY: + return TimeGrain.DAY; + case V1TimeGrain.TIME_GRAIN_WEEK: + return TimeGrain.WEEK; + case V1TimeGrain.TIME_GRAIN_MONTH: + return TimeGrain.MONTH; + case V1TimeGrain.TIME_GRAIN_QUARTER: + return TimeGrain.QUARTER; + case V1TimeGrain.TIME_GRAIN_YEAR: + return TimeGrain.YEAR; + default: + return TimeGrain.UNSPECIFIED; + } +} diff --git a/web-local/src/routes/+layout.svelte b/web-local/src/routes/+layout.svelte index 5550cf3a293..14870c0ec1a 100644 --- a/web-local/src/routes/+layout.svelte +++ b/web-local/src/routes/+layout.svelte @@ -28,6 +28,7 @@ import { onMount } from "svelte"; import type { LayoutData } from "./$types"; import "@rilldata/web-common/app.css"; + import ProjectProvider from "@rilldata/web-common/features/project/ProjectProvider.svelte"; export let data: LayoutData; @@ -77,20 +78,24 @@ - -
- {#if data.initialized} - - - - {#if $deploy} - + + +
+ {#if data.initialized} + + + + {#if $deploy} + + {/if} {/if} - {/if} - -
-
+ +
+
+
{#if $overlay !== null}