@sjcrh/proteinpaint-types 2.137.2-2 → 2.137.2

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.
@@ -61,10 +61,20 @@ var validTermdbSingleSampleMutationRequest = (input) => {
61
61
  var validTermdbSingleSampleMutationResponse = (input) => {
62
62
  const errors = [];
63
63
  const __is = (input2) => {
64
+ const $join = import_typia.createValidate.join;
64
65
  const $io0 = (input3) => "number" === typeof input3.status && "string" === typeof input3.error;
65
- const $io1 = (input3) => Array.isArray(input3.mlst) && input3.mlst.every((elem) => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem)) && (void 0 === input3.dt2total || Array.isArray(input3.dt2total) && input3.dt2total.every((elem) => "object" === typeof elem && null !== elem && $io3(elem)));
66
+ const $io1 = (input3) => Array.isArray(input3.mlst) && input3.mlst.every((elem) => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem)) && (void 0 === input3.dt2total || Array.isArray(input3.dt2total) && input3.dt2total.every((elem) => "object" === typeof elem && null !== elem && $io3(elem))) && (void 0 === input3.alternativeDataByDt || "object" === typeof input3.alternativeDataByDt && null !== input3.alternativeDataByDt && false === Array.isArray(input3.alternativeDataByDt) && $io4(input3.alternativeDataByDt));
66
67
  const $io2 = (input3) => true;
67
68
  const $io3 = (input3) => "number" === typeof input3.dt && "number" === typeof input3.total;
69
+ const $io4 = (input3) => Object.keys(input3).every((key) => {
70
+ const value = input3[key];
71
+ if (void 0 === value)
72
+ return true;
73
+ if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
74
+ return Array.isArray(value) && value.every((elem) => "object" === typeof elem && null !== elem && $io5(elem));
75
+ return true;
76
+ });
77
+ const $io5 = (input3) => (void 0 === input3.nameHtml || "string" === typeof input3.nameHtml) && (void 0 === input3.name || "string" === typeof input3.name) && (Array.isArray(input3.mlst) && input3.mlst.every((elem) => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem)));
68
78
  const $iu0 = (input3) => (() => {
69
79
  if (void 0 !== input3.status)
70
80
  return $io0(input3);
@@ -77,6 +87,7 @@ var validTermdbSingleSampleMutationResponse = (input) => {
77
87
  if (false === __is(input)) {
78
88
  const $report = import_typia.createValidate.report(errors);
79
89
  ((input2, _path, _exceptionable = true) => {
90
+ const $join = import_typia.createValidate.join;
80
91
  const $vo0 = (input3, _path2, _exceptionable2 = true) => ["number" === typeof input3.status || $report(_exceptionable2, {
81
92
  path: _path2 + ".status",
82
93
  expected: "number",
@@ -118,6 +129,14 @@ var validTermdbSingleSampleMutationResponse = (input) => {
118
129
  path: _path2 + ".dt2total",
119
130
  expected: "(Array<__type> | undefined)",
120
131
  value: input3.dt2total
132
+ }), void 0 === input3.alternativeDataByDt || ("object" === typeof input3.alternativeDataByDt && null !== input3.alternativeDataByDt && false === Array.isArray(input3.alternativeDataByDt) || $report(_exceptionable2, {
133
+ path: _path2 + ".alternativeDataByDt",
134
+ expected: "(__type.o1 | undefined)",
135
+ value: input3.alternativeDataByDt
136
+ })) && $vo4(input3.alternativeDataByDt, _path2 + ".alternativeDataByDt", _exceptionable2) || $report(_exceptionable2, {
137
+ path: _path2 + ".alternativeDataByDt",
138
+ expected: "(__type.o1 | undefined)",
139
+ value: input3.alternativeDataByDt
121
140
  })].every((flag) => flag);
122
141
  const $vo2 = (input3, _path2, _exceptionable2 = true) => true;
123
142
  const $vo3 = (input3, _path2, _exceptionable2 = true) => ["number" === typeof input3.dt || $report(_exceptionable2, {
@@ -129,6 +148,55 @@ var validTermdbSingleSampleMutationResponse = (input) => {
129
148
  expected: "number",
130
149
  value: input3.total
131
150
  })].every((flag) => flag);
151
+ const $vo4 = (input3, _path2, _exceptionable2 = true) => [false === _exceptionable2 || Object.keys(input3).map((key) => {
152
+ const value = input3[key];
153
+ if (void 0 === value)
154
+ return true;
155
+ if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
156
+ return (Array.isArray(value) || $report(_exceptionable2, {
157
+ path: _path2 + $join(key),
158
+ expected: "Array<__type>.o1",
159
+ value
160
+ })) && value.map((elem, _index3) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
161
+ path: _path2 + $join(key) + "[" + _index3 + "]",
162
+ expected: "__type.o2",
163
+ value: elem
164
+ })) && $vo5(elem, _path2 + $join(key) + "[" + _index3 + "]", _exceptionable2) || $report(_exceptionable2, {
165
+ path: _path2 + $join(key) + "[" + _index3 + "]",
166
+ expected: "__type.o2",
167
+ value: elem
168
+ })).every((flag) => flag) || $report(_exceptionable2, {
169
+ path: _path2 + $join(key),
170
+ expected: "Array<__type>.o1",
171
+ value
172
+ });
173
+ return true;
174
+ }).every((flag) => flag)].every((flag) => flag);
175
+ const $vo5 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.nameHtml || "string" === typeof input3.nameHtml || $report(_exceptionable2, {
176
+ path: _path2 + ".nameHtml",
177
+ expected: "(string | undefined)",
178
+ value: input3.nameHtml
179
+ }), void 0 === input3.name || "string" === typeof input3.name || $report(_exceptionable2, {
180
+ path: _path2 + ".name",
181
+ expected: "(string | undefined)",
182
+ value: input3.name
183
+ }), (Array.isArray(input3.mlst) || $report(_exceptionable2, {
184
+ path: _path2 + ".mlst",
185
+ expected: "Array<object>",
186
+ value: input3.mlst
187
+ })) && input3.mlst.map((elem, _index4) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $report(_exceptionable2, {
188
+ path: _path2 + ".mlst[" + _index4 + "]",
189
+ expected: "object",
190
+ value: elem
191
+ })) && $vo2(elem, _path2 + ".mlst[" + _index4 + "]", _exceptionable2) || $report(_exceptionable2, {
192
+ path: _path2 + ".mlst[" + _index4 + "]",
193
+ expected: "object",
194
+ value: elem
195
+ })).every((flag) => flag) || $report(_exceptionable2, {
196
+ path: _path2 + ".mlst",
197
+ expected: "Array<object>",
198
+ value: input3.mlst
199
+ })].every((flag) => flag);
132
200
  const $vu0 = (input3, _path2, _exceptionable2 = true) => (() => {
133
201
  if (void 0 !== input3.status)
134
202
  return $vo0(input3, _path2, _exceptionable2);
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ import {
47
47
  termdbSingleSampleMutationPayload,
48
48
  validTermdbSingleSampleMutationRequest,
49
49
  validTermdbSingleSampleMutationResponse
50
- } from "./chunk-G36XAK7Y.js";
50
+ } from "./chunk-YW6G7WTF.js";
51
51
  import {
52
52
  termdbSingleCellDEgenesPayload,
53
53
  validTermdbSingleCellDEgenesRequest,
@@ -2,7 +2,7 @@ import {
2
2
  termdbSingleSampleMutationPayload,
3
3
  validTermdbSingleSampleMutationRequest,
4
4
  validTermdbSingleSampleMutationResponse
5
- } from "./chunk-G36XAK7Y.js";
5
+ } from "./chunk-YW6G7WTF.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbSingleSampleMutationPayload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.137.2-2",
3
+ "version": "2.137.2",
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
@@ -1522,7 +1522,10 @@ keep this setting here for reason of:
1522
1522
  isTermVisible?: (clientAuthResult: any, id: string) => boolean
1523
1523
  /** when ds supports chart types e.g. summarizeMutationDiagnosis, this setting is required to supply a dict term to populate the chart ui
1524
1524
  */
1525
- defaultTw4correlationPlot?: Tw
1525
+ defaultTw4correlationPlot?: {
1526
+ /** key is string as disease/survial etc, value is tw */
1527
+ [index: string]: Tw
1528
+ }
1526
1529
  }
1527
1530
 
1528
1531
  type SampleType = {
@@ -12,8 +12,24 @@ export type TermdbSingleSampleMutationRequest = {
12
12
  type ValidResponse = {
13
13
  /** List of mutation data points from this sample TODO change to type of M elements */
14
14
  mlst: object[]
15
- /** */
15
+ /** total number of items for each dt, useful to indicate snvindel limited to 10k for a hypermutator */
16
16
  dt2total?: { dt: number; total: number }[]
17
+ /** alternative data by dt
18
+ key: dt value
19
+ value: array of objects, each is a distinct set of data points for this dt
20
+ on ui, selecting an object will allow to show this data in disco plot
21
+ each is identified by either nameHtml or name
22
+ */
23
+ alternativeDataByDt?: {
24
+ [index: number]: {
25
+ /** hyperlink */
26
+ nameHtml?: string
27
+ /** name in text */
28
+ name?: string
29
+ /** required list of events from this data */
30
+ mlst: object[]
31
+ }[]
32
+ }
17
33
  }
18
34
 
19
35
  export type TermdbSingleSampleMutationResponse = ErrorResponse | ValidResponse