@sjcrh/proteinpaint-types 2.167.0 → 2.169.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.
@@ -4246,7 +4246,7 @@ var validBoxPlotResponse = (input) => {
4246
4246
  const errors = [];
4247
4247
  const __is = (input2) => {
4248
4248
  const $join = import_typia.createValidate.join;
4249
- const $io0 = (input3) => (void 0 === input3.absMin || "number" === typeof input3.absMin) && (void 0 === input3.absMax || "number" === typeof input3.absMax) && ("object" === typeof input3.charts && null !== input3.charts && false === Array.isArray(input3.charts) && $io1(input3.charts)) && (null === input3.uncomputableValues || Array.isArray(input3.uncomputableValues) && input3.uncomputableValues.every((elem) => "object" === typeof elem && null !== elem && $io9(elem))) && true && ("object" === typeof input3.descrStats && null !== input3.descrStats && false === Array.isArray(input3.descrStats) && $io6(input3.descrStats));
4249
+ const $io0 = (input3) => (void 0 === input3.absMin || "number" === typeof input3.absMin) && (void 0 === input3.absMax || "number" === typeof input3.absMax) && ("object" === typeof input3.charts && null !== input3.charts && false === Array.isArray(input3.charts) && $io1(input3.charts)) && ("object" === typeof input3.descrStats && null !== input3.descrStats && false === Array.isArray(input3.descrStats) && $io6(input3.descrStats)) && (null === input3.uncomputableValues || Array.isArray(input3.uncomputableValues) && input3.uncomputableValues.every((elem) => "object" === typeof elem && null !== elem && $io11(elem))) && true;
4250
4250
  const $io1 = (input3) => Object.keys(input3).every((key) => {
4251
4251
  const value = input3[key];
4252
4252
  if (void 0 === value)
@@ -4255,7 +4255,7 @@ var validBoxPlotResponse = (input) => {
4255
4255
  return "object" === typeof value && null !== value && $io2(value);
4256
4256
  return true;
4257
4257
  });
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;
4258
+ const $io2 = (input3) => "string" === typeof input3.chartId && (Array.isArray(input3.plots) && input3.plots.every((elem) => "object" === typeof elem && null !== elem && $io3(elem))) && "number" === typeof input3.sampleCount && (void 0 === input3.wilcoxon || Array.isArray(input3.wilcoxon) && input3.wilcoxon.every((elem) => Array.isArray(elem) && (elem.length === 3 && ("object" === typeof elem[0] && null !== elem[0] && $io8(elem[0])) && ("object" === typeof elem[1] && null !== elem[1] && $io9(elem[1])) && ("object" === typeof elem[2] && null !== elem[2] && $io10(elem[2])))));
4259
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);
4260
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;
4261
4261
  const $io5 = (input3) => "number" === typeof input3.value;
@@ -4267,8 +4267,10 @@ var validBoxPlotResponse = (input) => {
4267
4267
  return "object" === typeof value && null !== value && ("string" === typeof value.key && "string" === typeof value.label && "number" === typeof value.value);
4268
4268
  return true;
4269
4269
  });
4270
- const $io8 = (input3) => "string" === typeof input3.label && "number" === typeof input3.value;
4271
- const $io9 = (input3) => "string" === typeof input3.label && "number" === typeof input3.value;
4270
+ const $io8 = (input3) => "string" === typeof input3.value;
4271
+ const $io9 = (input3) => "string" === typeof input3.value;
4272
+ const $io10 = (input3) => "string" === typeof input3.html;
4273
+ const $io11 = (input3) => "string" === typeof input3.label && "number" === typeof input3.value;
4272
4274
  return "object" === typeof input2 && null !== input2 && $io0(input2);
4273
4275
  };
4274
4276
  if (false === __is(input)) {
@@ -4291,31 +4293,31 @@ var validBoxPlotResponse = (input) => {
4291
4293
  path: _path2 + ".charts",
4292
4294
  expected: "__type",
4293
4295
  value: input3.charts
4296
+ }), ("object" === typeof input3.descrStats && null !== input3.descrStats && false === Array.isArray(input3.descrStats) || $report(_exceptionable2, {
4297
+ path: _path2 + ".descrStats",
4298
+ expected: "DescrStats",
4299
+ value: input3.descrStats
4300
+ })) && $vo6(input3.descrStats, _path2 + ".descrStats", _exceptionable2) || $report(_exceptionable2, {
4301
+ path: _path2 + ".descrStats",
4302
+ expected: "DescrStats",
4303
+ value: input3.descrStats
4294
4304
  }), null === input3.uncomputableValues || (Array.isArray(input3.uncomputableValues) || $report(_exceptionable2, {
4295
4305
  path: _path2 + ".uncomputableValues",
4296
- expected: "(Array<__type>.o2 | null)",
4306
+ expected: "(Array<__type>.o1 | null)",
4297
4307
  value: input3.uncomputableValues
4298
4308
  })) && input3.uncomputableValues.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
4299
4309
  path: _path2 + ".uncomputableValues[" + _index1 + "]",
4300
- expected: "__type.o4",
4310
+ expected: "__type.o6",
4301
4311
  value: elem
4302
- })) && $vo9(elem, _path2 + ".uncomputableValues[" + _index1 + "]", _exceptionable2) || $report(_exceptionable2, {
4312
+ })) && $vo11(elem, _path2 + ".uncomputableValues[" + _index1 + "]", _exceptionable2) || $report(_exceptionable2, {
4303
4313
  path: _path2 + ".uncomputableValues[" + _index1 + "]",
4304
- expected: "__type.o4",
4314
+ expected: "__type.o6",
4305
4315
  value: elem
4306
4316
  })).every((flag) => flag) || $report(_exceptionable2, {
4307
4317
  path: _path2 + ".uncomputableValues",
4308
- expected: "(Array<__type>.o2 | null)",
4318
+ expected: "(Array<__type>.o1 | null)",
4309
4319
  value: input3.uncomputableValues
4310
- }), true, ("object" === typeof input3.descrStats && null !== input3.descrStats && false === Array.isArray(input3.descrStats) || $report(_exceptionable2, {
4311
- path: _path2 + ".descrStats",
4312
- expected: "DescrStats",
4313
- value: input3.descrStats
4314
- })) && $vo6(input3.descrStats, _path2 + ".descrStats", _exceptionable2) || $report(_exceptionable2, {
4315
- path: _path2 + ".descrStats",
4316
- expected: "DescrStats",
4317
- value: input3.descrStats
4318
- })].every((flag) => flag);
4320
+ }), true].every((flag) => flag);
4319
4321
  const $vo1 = (input3, _path2, _exceptionable2 = true) => [false === _exceptionable2 || Object.keys(input3).map((key) => {
4320
4322
  const value = input3[key];
4321
4323
  if (void 0 === value)
@@ -4352,31 +4354,59 @@ var validBoxPlotResponse = (input) => {
4352
4354
  path: _path2 + ".plots",
4353
4355
  expected: "Array<BoxPlotEntry>",
4354
4356
  value: input3.plots
4355
- }), true, void 0 === input3.absMin || "number" === typeof input3.absMin || $report(_exceptionable2, {
4356
- path: _path2 + ".absMin",
4357
- expected: "(number | undefined)",
4358
- value: input3.absMin
4359
- }), void 0 === input3.absMax || "number" === typeof input3.absMax || $report(_exceptionable2, {
4360
- path: _path2 + ".absMax",
4361
- expected: "(number | undefined)",
4362
- value: input3.absMax
4363
- }), null === input3.uncomputableValues || void 0 === input3.uncomputableValues || (Array.isArray(input3.uncomputableValues) || $report(_exceptionable2, {
4364
- path: _path2 + ".uncomputableValues",
4365
- expected: "(Array<__type>.o1 | null | undefined)",
4366
- value: input3.uncomputableValues
4367
- })) && input3.uncomputableValues.map((elem, _index3) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
4368
- path: _path2 + ".uncomputableValues[" + _index3 + "]",
4369
- expected: "__type.o3",
4357
+ }), "number" === typeof input3.sampleCount || $report(_exceptionable2, {
4358
+ path: _path2 + ".sampleCount",
4359
+ expected: "number",
4360
+ value: input3.sampleCount
4361
+ }), void 0 === input3.wilcoxon || (Array.isArray(input3.wilcoxon) || $report(_exceptionable2, {
4362
+ path: _path2 + ".wilcoxon",
4363
+ expected: "(Array<[{ value: string; }, { value: string; }, { html: string; }]> | undefined)",
4364
+ value: input3.wilcoxon
4365
+ })) && input3.wilcoxon.map((elem, _index3) => (Array.isArray(elem) || $report(_exceptionable2, {
4366
+ path: _path2 + ".wilcoxon[" + _index3 + "]",
4367
+ expected: "[{ value: string; }, { value: string; }, { html: string; }]",
4370
4368
  value: elem
4371
- })) && $vo8(elem, _path2 + ".uncomputableValues[" + _index3 + "]", _exceptionable2) || $report(_exceptionable2, {
4372
- path: _path2 + ".uncomputableValues[" + _index3 + "]",
4373
- expected: "__type.o3",
4369
+ })) && ((elem.length === 3 || $report(_exceptionable2, {
4370
+ path: _path2 + ".wilcoxon[" + _index3 + "]",
4371
+ expected: "[__type.o3, __type.o4, __type.o5]",
4372
+ value: elem
4373
+ })) && [
4374
+ ("object" === typeof elem[0] && null !== elem[0] || $report(_exceptionable2, {
4375
+ path: _path2 + ".wilcoxon[" + _index3 + "][0]",
4376
+ expected: "__type.o3",
4377
+ value: elem[0]
4378
+ })) && $vo8(elem[0], _path2 + ".wilcoxon[" + _index3 + "][0]", _exceptionable2) || $report(_exceptionable2, {
4379
+ path: _path2 + ".wilcoxon[" + _index3 + "][0]",
4380
+ expected: "__type.o3",
4381
+ value: elem[0]
4382
+ }),
4383
+ ("object" === typeof elem[1] && null !== elem[1] || $report(_exceptionable2, {
4384
+ path: _path2 + ".wilcoxon[" + _index3 + "][1]",
4385
+ expected: "__type.o4",
4386
+ value: elem[1]
4387
+ })) && $vo9(elem[1], _path2 + ".wilcoxon[" + _index3 + "][1]", _exceptionable2) || $report(_exceptionable2, {
4388
+ path: _path2 + ".wilcoxon[" + _index3 + "][1]",
4389
+ expected: "__type.o4",
4390
+ value: elem[1]
4391
+ }),
4392
+ ("object" === typeof elem[2] && null !== elem[2] || $report(_exceptionable2, {
4393
+ path: _path2 + ".wilcoxon[" + _index3 + "][2]",
4394
+ expected: "__type.o5",
4395
+ value: elem[2]
4396
+ })) && $vo10(elem[2], _path2 + ".wilcoxon[" + _index3 + "][2]", _exceptionable2) || $report(_exceptionable2, {
4397
+ path: _path2 + ".wilcoxon[" + _index3 + "][2]",
4398
+ expected: "__type.o5",
4399
+ value: elem[2]
4400
+ })
4401
+ ].every((flag) => flag)) || $report(_exceptionable2, {
4402
+ path: _path2 + ".wilcoxon[" + _index3 + "]",
4403
+ expected: "[{ value: string; }, { value: string; }, { html: string; }]",
4374
4404
  value: elem
4375
4405
  })).every((flag) => flag) || $report(_exceptionable2, {
4376
- path: _path2 + ".uncomputableValues",
4377
- expected: "(Array<__type>.o1 | null | undefined)",
4378
- value: input3.uncomputableValues
4379
- }), true].every((flag) => flag);
4406
+ path: _path2 + ".wilcoxon",
4407
+ expected: "(Array<[{ value: string; }, { value: string; }, { html: string; }]> | undefined)",
4408
+ value: input3.wilcoxon
4409
+ })].every((flag) => flag);
4380
4410
  const $vo3 = (input3, _path2, _exceptionable2 = true) => [("object" === typeof input3.boxplot && null !== input3.boxplot || $report(_exceptionable2, {
4381
4411
  path: _path2 + ".boxplot",
4382
4412
  expected: "BoxPlotData & { label: string; }",
@@ -4497,16 +4527,22 @@ var validBoxPlotResponse = (input) => {
4497
4527
  expected: "number",
4498
4528
  value: input3.value
4499
4529
  })].every((flag) => flag);
4500
- const $vo8 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.label || $report(_exceptionable2, {
4501
- path: _path2 + ".label",
4530
+ const $vo8 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.value || $report(_exceptionable2, {
4531
+ path: _path2 + ".value",
4502
4532
  expected: "string",
4503
- value: input3.label
4504
- }), "number" === typeof input3.value || $report(_exceptionable2, {
4533
+ value: input3.value
4534
+ })].every((flag) => flag);
4535
+ const $vo9 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.value || $report(_exceptionable2, {
4505
4536
  path: _path2 + ".value",
4506
- expected: "number",
4537
+ expected: "string",
4507
4538
  value: input3.value
4508
4539
  })].every((flag) => flag);
4509
- const $vo9 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.label || $report(_exceptionable2, {
4540
+ const $vo10 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.html || $report(_exceptionable2, {
4541
+ path: _path2 + ".html",
4542
+ expected: "string",
4543
+ value: input3.html
4544
+ })].every((flag) => flag);
4545
+ const $vo11 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.label || $report(_exceptionable2, {
4510
4546
  path: _path2 + ".label",
4511
4547
  expected: "string",
4512
4548
  value: input3.label
package/dist/index.js CHANGED
@@ -132,7 +132,7 @@ import {
132
132
  boxplotPayload,
133
133
  validBoxPlotRequest,
134
134
  validBoxPlotResponse
135
- } from "./chunk-E4Z7PJZQ.js";
135
+ } from "./chunk-PZHVYGSD.js";
136
136
  import {
137
137
  termdbCategoriesPayload,
138
138
  validCategoriesRequest,
@@ -2,7 +2,7 @@ import {
2
2
  boxplotPayload,
3
3
  validBoxPlotRequest,
4
4
  validBoxPlotResponse
5
- } from "./chunk-E4Z7PJZQ.js";
5
+ } from "./chunk-PZHVYGSD.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  boxplotPayload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.167.0",
3
+ "version": "2.169.0",
4
4
  "type": "module",
5
5
  "description": "Shared type definitions between ProteinPaint server and client code",
6
6
  "main": "src/index.ts",
@@ -35,10 +35,11 @@ export type BoxPlotResponse = {
35
35
  charts: {
36
36
  [chartId: string]: BoxPlotChartEntry
37
37
  }
38
+ /** Descriptive statistics for the entire response */
39
+ descrStats: DescrStats
38
40
  /** Categories not shown in the final plot */
39
41
  uncomputableValues: { label: string; value: number }[] | null
40
42
  error?: any
41
- descrStats: DescrStats
42
43
  }
43
44
 
44
45
  // chart containing a set of boxplots
@@ -47,14 +48,11 @@ export type BoxPlotChartEntry = {
47
48
  chartId: string
48
49
  /** Boxplot data within the chart */
49
50
  plots: BoxPlotEntry[]
50
- /** svg of chart, necessary for svg download */
51
- svg?: any
52
- /** Copied from BoxPlotResponse, necessary for
53
- ViewModel to process chart data */
54
- absMin?: number
55
- absMax?: number
56
- uncomputableValues?: { label: string; value: number }[] | null
57
- wilcoxon: any
51
+ /** Number of samples represented in the chart */
52
+ sampleCount: number
53
+ /** Wilcoxon test results for the chart formatted
54
+ * for #dom/table.js */
55
+ wilcoxon?: [{ value: string }, { value: string }, { html: string }][]
58
56
  }
59
57
 
60
58
  // individual boxplot