[perf] Expose trybot types to TypeScript.

Bug: skia: 10844
Change-Id: I8383379313ed282f45c3cb86cb6eb4ccad971a77
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/329376
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
diff --git a/perf/go/ts/main.go b/perf/go/ts/main.go
index 952aab6..221d1cc 100644
--- a/perf/go/ts/main.go
+++ b/perf/go/ts/main.go
@@ -17,6 +17,7 @@
 	"go.skia.org/infra/perf/go/regression"
 	"go.skia.org/infra/perf/go/regression/continuous"
 	"go.skia.org/infra/perf/go/stepfit"
+	"go.skia.org/infra/perf/go/trybot/results"
 	"go.skia.org/infra/perf/go/types"
 )
 
@@ -66,6 +67,8 @@
 		regression.FullSummary{},
 		regression.RegressionDetectionRequest{},
 		regression.TriageStatus{},
+		results.TryBotRequest{},
+		results.TryBotResponse{},
 	)
 	if err != nil {
 		sklog.Fatal(err)
@@ -83,6 +86,7 @@
 		{stepfit.AllStepFitStatus, "StepFitStatus"},
 		{types.AllClusterAlgos, "ClusterAlgo"},
 		{types.AllStepDetections, "StepDetection"},
+		{results.AllRequestKind, "TryBotRequestKind"},
 	})
 	err = util.WithWriteFile("./modules/json/index.ts", func(w io.Writer) error {
 		return generator.Render(w)
diff --git a/perf/modules/json/index.ts b/perf/modules/json/index.ts
index 808eefb..f3818b2 100644
--- a/perf/modules/json/index.ts
+++ b/perf/modules/json/index.ts
@@ -248,6 +248,27 @@
 	total_queries: number;
 }
 
+export interface TryBotRequest {
+	kind: Kind;
+	cl: CL;
+	cid: CommitNumber;
+	query: string;
+}
+
+export interface TryBotResult {
+	params: Params;
+	median: number;
+	lower: number;
+	upper: number;
+	stddevRatio: number;
+	values: number[] | null;
+}
+
+export interface TryBotResponse {
+	Header: ColumnHeader[] | null;
+	Results: TryBotResult[] | null;
+}
+
 export type RegressionDetectionGrouping = string;
 
 export type StepDetection = "" | "absolute" | "percent" | "cohen";
@@ -274,4 +295,12 @@
 
 export type Subset = "all" | "regressions" | "untriaged";
 
+export type Kind = string;
+
+export type CL = string;
+
+export type Params = { [key: string]: string };
+
 export type ClusterAlgo = "kmeans" | "stepfit";
+
+export type TryBotRequestKind = "trybot" | "commit";