@sjcrh/proteinpaint-types 2.166.0 → 2.167.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,7 +73,7 @@ var validBoxPlotRequest = (input) => {
73
73
  const errors = [];
74
74
  const __is = (input2) => {
75
75
  const $join = import_typia.createValidate.join;
76
- const $io0 = (input3) => "object" === typeof input3.tw && null !== input3.tw && $iu6(input3.tw) && "string" === typeof input3.genome && "string" === typeof input3.dslabel && "boolean" === typeof input3.isLogScale && "boolean" === typeof input3.orderByMedian && (void 0 === input3.overlayTw || "object" === typeof input3.overlayTw && null !== input3.overlayTw && $iu6(input3.overlayTw)) && (void 0 === input3.divideTw || "object" === typeof input3.divideTw && null !== input3.divideTw && $iu6(input3.divideTw)) && (void 0 === input3.filter || "object" === typeof input3.filter && null !== input3.filter && $io6(input3.filter)) && true && true && (void 0 === input3.removeOutliers || "boolean" === typeof input3.removeOutliers);
76
+ const $io0 = (input3) => "object" === typeof input3.tw && null !== input3.tw && $iu6(input3.tw) && "string" === typeof input3.genome && "string" === typeof input3.dslabel && "boolean" === typeof input3.isLogScale && "boolean" === typeof input3.orderByMedian && (void 0 === input3.removeOutliers || "boolean" === typeof input3.removeOutliers) && (void 0 === input3.showAssocTests || "boolean" === typeof input3.showAssocTests) && (void 0 === input3.overlayTw || "object" === typeof input3.overlayTw && null !== input3.overlayTw && $iu6(input3.overlayTw)) && (void 0 === input3.divideTw || "object" === typeof input3.divideTw && null !== input3.divideTw && $iu6(input3.divideTw)) && (void 0 === input3.filter || "object" === typeof input3.filter && null !== input3.filter && $io6(input3.filter)) && true && true;
77
77
  const $io1 = (input3) => (void 0 === input3.id || "string" === typeof input3.id) && (void 0 === input3.$id || "string" === typeof input3.$id) && (void 0 === input3.isAtomic || true === input3.isAtomic) && true && (void 0 === input3.settings || "object" === typeof input3.settings && null !== input3.settings && false === Array.isArray(input3.settings) && $io2(input3.settings)) && true && (void 0 === input3.minNumSamples || "number" === typeof input3.minNumSamples) && true && ("object" === typeof input3.term && null !== input3.term && $iu7(input3.term)) && ("object" === typeof input3.q && null !== input3.q && $io43(input3.q)) && "QualTWValues" === input3.type;
78
78
  const $io2 = (input3) => Object.keys(input3).every((key) => {
79
79
  const value = input3[key];
@@ -340,6 +340,14 @@ var validBoxPlotRequest = (input) => {
340
340
  path: _path2 + ".orderByMedian",
341
341
  expected: "boolean",
342
342
  value: input3.orderByMedian
343
+ }), void 0 === input3.removeOutliers || "boolean" === typeof input3.removeOutliers || $report(_exceptionable2, {
344
+ path: _path2 + ".removeOutliers",
345
+ expected: "(boolean | undefined)",
346
+ value: input3.removeOutliers
347
+ }), void 0 === input3.showAssocTests || "boolean" === typeof input3.showAssocTests || $report(_exceptionable2, {
348
+ path: _path2 + ".showAssocTests",
349
+ expected: "(boolean | undefined)",
350
+ value: input3.showAssocTests
343
351
  }), void 0 === input3.overlayTw || ("object" === typeof input3.overlayTw && null !== input3.overlayTw || $report(_exceptionable2, {
344
352
  path: _path2 + ".overlayTw",
345
353
  expected: "(ConditionTW | GvCustomGsTW | GvPredefinedGsTW | GvValuesTW | NumTWBinary | NumTWCont | NumTWCustomBin | NumTWRegularBin | NumTWSpline | QualTWCustomGS | QualTWPredefinedGS | QualTWValues | SnpsTW | undefined)",
@@ -364,11 +372,7 @@ var validBoxPlotRequest = (input) => {
364
372
  path: _path2 + ".filter",
365
373
  expected: "(Filter | undefined)",
366
374
  value: input3.filter
367
- }), true, true, void 0 === input3.removeOutliers || "boolean" === typeof input3.removeOutliers || $report(_exceptionable2, {
368
- path: _path2 + ".removeOutliers",
369
- expected: "(boolean | undefined)",
370
- value: input3.removeOutliers
371
- })].every((flag) => flag);
375
+ }), true, true].every((flag) => flag);
372
376
  const $vo1 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.id || "string" === typeof input3.id || $report(_exceptionable2, {
373
377
  path: _path2 + ".id",
374
378
  expected: "(string | undefined)",
@@ -4251,7 +4255,7 @@ var validBoxPlotResponse = (input) => {
4251
4255
  return "object" === typeof value && null !== value && $io2(value);
4252
4256
  return true;
4253
4257
  });
4254
- const $io2 = (input3) => "string" === typeof input3.chartId && (Array.isArray(input3.plots) && input3.plots.every((elem) => "object" === typeof elem && null !== elem && $io3(elem))) && true && (void 0 === input3.absMin || "number" === typeof input3.absMin) && (void 0 === input3.absMax || "number" === typeof input3.absMax) && (null === input3.uncomputableValues || void 0 === input3.uncomputableValues || Array.isArray(input3.uncomputableValues) && input3.uncomputableValues.every((elem) => "object" === typeof elem && null !== elem && $io8(elem)));
4258
+ const $io2 = (input3) => "string" === typeof input3.chartId && (Array.isArray(input3.plots) && input3.plots.every((elem) => "object" === typeof elem && null !== elem && $io3(elem))) && true && (void 0 === input3.absMin || "number" === typeof input3.absMin) && (void 0 === input3.absMax || "number" === typeof input3.absMax) && (null === input3.uncomputableValues || void 0 === input3.uncomputableValues || Array.isArray(input3.uncomputableValues) && input3.uncomputableValues.every((elem) => "object" === typeof elem && null !== elem && $io8(elem))) && true;
4255
4259
  const $io3 = (input3) => "object" === typeof input3.boxplot && null !== input3.boxplot && $io4(input3.boxplot) && (void 0 === input3.color || "string" === typeof input3.color) && ("object" === typeof input3.descrStats && null !== input3.descrStats && false === Array.isArray(input3.descrStats) && $io6(input3.descrStats)) && (void 0 === input3.isHidden || "boolean" === typeof input3.isHidden) && "string" === typeof input3.key && true && (void 0 === input3.seriesId || "string" === typeof input3.seriesId);
4256
4260
  const $io4 = (input3) => (void 0 === input3.w1 || "number" === typeof input3.w1) && (void 0 === input3.w2 || "number" === typeof input3.w2) && "number" === typeof input3.p05 && "number" === typeof input3.p25 && "number" === typeof input3.p50 && "number" === typeof input3.p75 && "number" === typeof input3.p95 && "number" === typeof input3.iqr && (Array.isArray(input3.out) && input3.out.every((elem) => "object" === typeof elem && null !== elem && $io5(elem))) && "string" === typeof input3.label;
4257
4261
  const $io5 = (input3) => "number" === typeof input3.value;
@@ -4372,7 +4376,7 @@ var validBoxPlotResponse = (input) => {
4372
4376
  path: _path2 + ".uncomputableValues",
4373
4377
  expected: "(Array<__type>.o1 | null | undefined)",
4374
4378
  value: input3.uncomputableValues
4375
- })].every((flag) => flag);
4379
+ }), true].every((flag) => flag);
4376
4380
  const $vo3 = (input3, _path2, _exceptionable2 = true) => [("object" === typeof input3.boxplot && null !== input3.boxplot || $report(_exceptionable2, {
4377
4381
  path: _path2 + ".boxplot",
4378
4382
  expected: "BoxPlotData & { label: string; }",
@@ -22,7 +22,7 @@ var validChatRequest = (input) => {
22
22
  const errors = [];
23
23
  const __is = (input2) => {
24
24
  const $join = import_typia.createValidate.join;
25
- const $io0 = (input3) => "string" === typeof input3.genome && "string" === typeof input3.dslabel && (void 0 === input3.filter || "object" === typeof input3.filter && null !== input3.filter && $io1(input3.filter)) && true && "string" === typeof input3.prompt && true;
25
+ const $io0 = (input3) => "string" === typeof input3.genome && "string" === typeof input3.dslabel && (void 0 === input3.filter || "object" === typeof input3.filter && null !== input3.filter && $io1(input3.filter)) && "string" === typeof input3.prompt && true;
26
26
  const $io1 = (input3) => "tvslst" === input3.type && "boolean" === typeof input3["in"] && "string" === typeof input3.join && (void 0 === input3.tag || "string" === typeof input3.tag) && (Array.isArray(input3.lst) && input3.lst.every((elem) => "object" === typeof elem && null !== elem && $iu0(elem)));
27
27
  const $io2 = (input3) => "tvs" === input3.type && ("object" === typeof input3.tvs && null !== input3.tvs && $iu4(input3.tvs));
28
28
  const $io3 = (input3) => (void 0 === input3.join || "string" === typeof input3.join) && (void 0 === input3.isnot || "boolean" === typeof input3.isnot) && ("object" === typeof input3.term && null !== input3.term && $io4(input3.term)) && (void 0 === input3.groupset_label || "string" === typeof input3.groupset_label) && (Array.isArray(input3.values) && input3.values.every((elem) => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io6(elem)));
@@ -185,7 +185,7 @@ var validChatRequest = (input) => {
185
185
  path: _path2 + ".filter",
186
186
  expected: "(Filter | undefined)",
187
187
  value: input3.filter
188
- }), true, "string" === typeof input3.prompt || $report(_exceptionable2, {
188
+ }), "string" === typeof input3.prompt || $report(_exceptionable2, {
189
189
  path: _path2 + ".prompt",
190
190
  expected: "string",
191
191
  value: input3.prompt
@@ -2207,28 +2207,61 @@ var validChatRequest = (input) => {
2207
2207
  var validChatResponse = (input) => {
2208
2208
  const errors = [];
2209
2209
  const __is = (input2) => {
2210
- const $io0 = (input3) => ("html" === input3.type || "plot" === input3.type || "json" === input3.type) && (void 0 === input3.html || "string" === typeof input3.html) && true;
2211
- return "object" === typeof input2 && null !== input2 && $io0(input2);
2210
+ const $io0 = (input3) => "html" === input3.type && "string" === typeof input3.html;
2211
+ const $io1 = (input3) => "plot" === input3.type && ("object" === typeof input3.plot && null !== input3.plot && true);
2212
+ const $iu0 = (input3) => (() => {
2213
+ if ("html" === input3.type)
2214
+ return $io0(input3);
2215
+ if ("plot" === input3.type)
2216
+ return $io1(input3);
2217
+ return false;
2218
+ })();
2219
+ return "object" === typeof input2 && null !== input2 && $iu0(input2);
2212
2220
  };
2213
2221
  if (false === __is(input)) {
2214
2222
  const $report = import_typia.createValidate.report(errors);
2215
2223
  ((input2, _path, _exceptionable = true) => {
2216
- const $vo0 = (input3, _path2, _exceptionable2 = true) => ["html" === input3.type || "plot" === input3.type || "json" === input3.type || $report(_exceptionable2, {
2224
+ const $vo0 = (input3, _path2, _exceptionable2 = true) => ["html" === input3.type || $report(_exceptionable2, {
2217
2225
  path: _path2 + ".type",
2218
- expected: '("html" | "json" | "plot")',
2226
+ expected: '"html"',
2219
2227
  value: input3.type
2220
- }), void 0 === input3.html || "string" === typeof input3.html || $report(_exceptionable2, {
2228
+ }), "string" === typeof input3.html || $report(_exceptionable2, {
2221
2229
  path: _path2 + ".html",
2222
- expected: "(string | undefined)",
2230
+ expected: "string",
2223
2231
  value: input3.html
2224
- }), true].every((flag) => flag);
2232
+ })].every((flag) => flag);
2233
+ const $vo1 = (input3, _path2, _exceptionable2 = true) => ["plot" === input3.type || $report(_exceptionable2, {
2234
+ path: _path2 + ".type",
2235
+ expected: '"plot"',
2236
+ value: input3.type
2237
+ }), ("object" === typeof input3.plot && null !== input3.plot && false === Array.isArray(input3.plot) || $report(_exceptionable2, {
2238
+ path: _path2 + ".plot",
2239
+ expected: "object",
2240
+ value: input3.plot
2241
+ })) && $vo2(input3.plot, _path2 + ".plot", _exceptionable2) || $report(_exceptionable2, {
2242
+ path: _path2 + ".plot",
2243
+ expected: "object",
2244
+ value: input3.plot
2245
+ })].every((flag) => flag);
2246
+ const $vo2 = (input3, _path2, _exceptionable2 = true) => true;
2247
+ const $vu0 = (input3, _path2, _exceptionable2 = true) => (() => {
2248
+ if ("html" === input3.type)
2249
+ return $vo0(input3, _path2, _exceptionable2);
2250
+ if ("plot" === input3.type)
2251
+ return $vo1(input3, _path2, _exceptionable2);
2252
+ return $report(_exceptionable2, {
2253
+ path: _path2,
2254
+ expected: "(HtmlResponse | PlotResponse)",
2255
+ value: input3
2256
+ });
2257
+ })();
2225
2258
  return ("object" === typeof input2 && null !== input2 || $report(true, {
2226
2259
  path: _path + "",
2227
- expected: "ChatResponse",
2260
+ expected: "(HtmlResponse | PlotResponse)",
2228
2261
  value: input2
2229
- })) && $vo0(input2, _path + "", true) || $report(true, {
2262
+ })) && $vu0(input2, _path + "", true) || $report(true, {
2230
2263
  path: _path + "",
2231
- expected: "ChatResponse",
2264
+ expected: "(HtmlResponse | PlotResponse)",
2232
2265
  value: input2
2233
2266
  });
2234
2267
  })(input, "$input", true);
package/dist/index.js CHANGED
@@ -132,7 +132,7 @@ import {
132
132
  boxplotPayload,
133
133
  validBoxPlotRequest,
134
134
  validBoxPlotResponse
135
- } from "./chunk-JT4DSNJ3.js";
135
+ } from "./chunk-E4Z7PJZQ.js";
136
136
  import {
137
137
  termdbCategoriesPayload,
138
138
  validCategoriesRequest,
@@ -142,7 +142,7 @@ import {
142
142
  ChatPayload,
143
143
  validChatRequest,
144
144
  validChatResponse
145
- } from "./chunk-TR2MSSP3.js";
145
+ } from "./chunk-GIPUG4HD.js";
146
146
  import {
147
147
  termdbClusterPayload,
148
148
  validTermdbClusterRequest,
@@ -2,7 +2,7 @@ import {
2
2
  boxplotPayload,
3
3
  validBoxPlotRequest,
4
4
  validBoxPlotResponse
5
- } from "./chunk-JT4DSNJ3.js";
5
+ } from "./chunk-E4Z7PJZQ.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  boxplotPayload,
@@ -2,7 +2,7 @@ import {
2
2
  ChatPayload,
3
3
  validChatRequest,
4
4
  validChatResponse
5
- } from "./chunk-TR2MSSP3.js";
5
+ } from "./chunk-GIPUG4HD.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  ChatPayload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.166.0",
3
+ "version": "2.167.0",
4
4
  "type": "module",
5
5
  "description": "Shared type definitions between ProteinPaint server and client code",
6
6
  "main": "src/index.ts",
package/src/dataset.ts CHANGED
@@ -1172,6 +1172,12 @@ type CorrelationVolcano = {
1172
1172
  }
1173
1173
  }
1174
1174
 
1175
+ /** Configurations for box plots */
1176
+ type BoxPlots = {
1177
+ /** If true, allows user to 'remove outliers' from burger menu */
1178
+ removeOutliers: boolean
1179
+ }
1180
+
1175
1181
  type UiLabels = {
1176
1182
  [propName: string]: string | { label: string; [otherAttr: string]: string }
1177
1183
  }
@@ -1739,6 +1745,7 @@ export type Cohort = {
1739
1745
  scatterplots?: Scatterplots
1740
1746
  termdb: Termdb
1741
1747
  hiddenTermIds?: string[]
1748
+ boxplots?: BoxPlots
1742
1749
  }
1743
1750
 
1744
1751
  /** Customizations specific to the mass nav component */
@@ -14,6 +14,9 @@ export type BoxPlotRequest = {
14
14
  isLogScale: boolean
15
15
  /** sort plots by median value */
16
16
  orderByMedian: boolean
17
+ removeOutliers?: boolean
18
+ /** If true, show association tests table */
19
+ showAssocTests?: boolean
17
20
  /** term2 */
18
21
  overlayTw?: TermWrapper
19
22
  /** term0 */
@@ -21,7 +24,6 @@ export type BoxPlotRequest = {
21
24
  filter?: Filter
22
25
  filter0?: any
23
26
  __protected__: any
24
- removeOutliers?: boolean
25
27
  }
26
28
 
27
29
  export type BoxPlotResponse = {
@@ -52,6 +54,7 @@ export type BoxPlotChartEntry = {
52
54
  absMin?: number
53
55
  absMax?: number
54
56
  uncomputableValues?: { label: string; value: number }[] | null
57
+ wilcoxon: any
55
58
  }
56
59
 
57
60
  // individual boxplot
@@ -6,46 +6,24 @@ export type ChatRequest = {
6
6
  genome: string
7
7
  dslabel: string
8
8
  filter?: Filter
9
- filter0?: any // gdc
10
9
  /** user prompt */
11
10
  prompt: string
12
- __protected__: any
11
+ __protected__?: any
13
12
  }
14
13
 
15
- export type numeric_filter = {
16
- lower: number
17
- upper: number
14
+ type HtmlResponse = {
15
+ type: 'html'
16
+ /** for display only */
17
+ html: string
18
18
  }
19
-
20
- export type categorical_filter = {
21
- name: string
22
- }
23
-
24
- export type filter_variable = {
25
- name: string
26
- variable_type: 'float' | 'categories'
27
- cutoff: numeric_filter | categorical_filter
28
- }
29
-
30
- export type summary = {
31
- group_categories: string
32
- overlay?: string
33
- divide_by?: string
34
- filter?: filter_variable
35
- }
36
-
37
- export type plot = {
38
- /** Different chart types currently supported by the AI chatbot, will add types for the other charts when they will be implemented */
39
- chartType: summary | 'survival' | 'hierarchial' | 'snv_indel' | 'cnv' | 'variant_calling' | 'none' | 'dge'
19
+ export type PlotResponse = {
20
+ type: 'plot'
21
+ /** plot state. Currently only supports summary chart, will add other chart types later */
22
+ plot: object
23
+ /** Specifies what action to take e.g. Summary plot or no action. Will add more chart types later */
40
24
  }
41
25
 
42
- export type ChatResponse = {
43
- type: 'html' | 'plot' | 'json'
44
- /** when type=html, this value is set meaning server returns a chat response */
45
- html?: string
46
- /** when type=plot. value is json */
47
- plot?: any
48
- }
26
+ export type ChatResponse = HtmlResponse | PlotResponse
49
27
 
50
28
  export const ChatPayload: RoutePayload = {
51
29
  request: {