@sjcrh/proteinpaint-types 2.152.1-0 → 2.153.1-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.
@@ -204,8 +204,17 @@ var validGRIN2Response = (input) => {
204
204
  const $io6 = (input3) => "string" === typeof input3.label && "boolean" === typeof input3.sortable;
205
205
  const $io7 = (input3) => "string" === typeof input3.value || "number" === typeof input3.value;
206
206
  const $io8 = (input3) => "number" === typeof input3.processingTime && "number" === typeof input3.grin2Time && "number" === typeof input3.totalTime;
207
- const $io9 = (input3) => (void 0 === input3.totalSamples || "number" === typeof input3.totalSamples) && (void 0 === input3.processedSamples || "number" === typeof input3.processedSamples) && (void 0 === input3.failedSamples || "number" === typeof input3.failedSamples) && (void 0 === input3.failedFiles || Array.isArray(input3.failedFiles) && input3.failedFiles.every((elem) => "object" === typeof elem && null !== elem && $io10(elem))) && (void 0 === input3.totalLesions || "number" === typeof input3.totalLesions) && (void 0 === input3.processedLesions || "number" === typeof input3.processedLesions) && (void 0 === input3.unprocessedSamples || "number" === typeof input3.unprocessedSamples);
207
+ const $io9 = (input3) => (void 0 === input3.totalSamples || "number" === typeof input3.totalSamples) && (void 0 === input3.processedSamples || "number" === typeof input3.processedSamples) && (void 0 === input3.failedSamples || "number" === typeof input3.failedSamples) && (void 0 === input3.failedFiles || Array.isArray(input3.failedFiles) && input3.failedFiles.every((elem) => "object" === typeof elem && null !== elem && $io10(elem))) && (void 0 === input3.totalLesions || "number" === typeof input3.totalLesions) && (void 0 === input3.processedLesions || "number" === typeof input3.processedLesions) && (void 0 === input3.unprocessedSamples || "number" === typeof input3.unprocessedSamples) && (void 0 === input3.lesionCounts || "object" === typeof input3.lesionCounts && null !== input3.lesionCounts && false === Array.isArray(input3.lesionCounts) && $io11(input3.lesionCounts));
208
208
  const $io10 = (input3) => "string" === typeof input3.sampleName && "string" === typeof input3.filePath && "string" === typeof input3.error;
209
+ const $io11 = (input3) => (void 0 === input3.total || "number" === typeof input3.total) && (void 0 === input3.byType || "object" === typeof input3.byType && null !== input3.byType && false === Array.isArray(input3.byType) && $io12(input3.byType));
210
+ const $io12 = (input3) => Object.keys(input3).every((key) => {
211
+ const value = input3[key];
212
+ if (void 0 === value)
213
+ return true;
214
+ if (RegExp(/(.*)/).test(key))
215
+ return "object" === typeof value && null !== value && ("number" === typeof value.count && "boolean" === typeof value.capped && "number" === typeof value.samples);
216
+ return true;
217
+ });
209
218
  return "object" === typeof input2 && null !== input2 && $io0(input2);
210
219
  };
211
220
  if (false === __is(input)) {
@@ -500,6 +509,14 @@ var validGRIN2Response = (input) => {
500
509
  path: _path2 + ".unprocessedSamples",
501
510
  expected: "(number | undefined)",
502
511
  value: input3.unprocessedSamples
512
+ }), void 0 === input3.lesionCounts || ("object" === typeof input3.lesionCounts && null !== input3.lesionCounts && false === Array.isArray(input3.lesionCounts) || $report(_exceptionable2, {
513
+ path: _path2 + ".lesionCounts",
514
+ expected: "(__type.o8 | undefined)",
515
+ value: input3.lesionCounts
516
+ })) && $vo11(input3.lesionCounts, _path2 + ".lesionCounts", _exceptionable2) || $report(_exceptionable2, {
517
+ path: _path2 + ".lesionCounts",
518
+ expected: "(__type.o8 | undefined)",
519
+ value: input3.lesionCounts
503
520
  })].every((flag) => flag);
504
521
  const $vo10 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.sampleName || $report(_exceptionable2, {
505
522
  path: _path2 + ".sampleName",
@@ -514,6 +531,48 @@ var validGRIN2Response = (input) => {
514
531
  expected: "string",
515
532
  value: input3.error
516
533
  })].every((flag) => flag);
534
+ const $vo11 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.total || "number" === typeof input3.total || $report(_exceptionable2, {
535
+ path: _path2 + ".total",
536
+ expected: "(number | undefined)",
537
+ value: input3.total
538
+ }), void 0 === input3.byType || ("object" === typeof input3.byType && null !== input3.byType && false === Array.isArray(input3.byType) || $report(_exceptionable2, {
539
+ path: _path2 + ".byType",
540
+ expected: "(Record<string, __type>.o1 | undefined)",
541
+ value: input3.byType
542
+ })) && $vo12(input3.byType, _path2 + ".byType", _exceptionable2) || $report(_exceptionable2, {
543
+ path: _path2 + ".byType",
544
+ expected: "(Record<string, __type>.o1 | undefined)",
545
+ value: input3.byType
546
+ })].every((flag) => flag);
547
+ const $vo12 = (input3, _path2, _exceptionable2 = true) => [false === _exceptionable2 || Object.keys(input3).map((key) => {
548
+ const value = input3[key];
549
+ if (void 0 === value)
550
+ return true;
551
+ if (RegExp(/(.*)/).test(key))
552
+ return ("object" === typeof value && null !== value || $report(_exceptionable2, {
553
+ path: _path2 + $join(key),
554
+ expected: "__type.o9",
555
+ value
556
+ })) && $vo13(value, _path2 + $join(key), _exceptionable2) || $report(_exceptionable2, {
557
+ path: _path2 + $join(key),
558
+ expected: "__type.o9",
559
+ value
560
+ });
561
+ return true;
562
+ }).every((flag) => flag)].every((flag) => flag);
563
+ const $vo13 = (input3, _path2, _exceptionable2 = true) => ["number" === typeof input3.count || $report(_exceptionable2, {
564
+ path: _path2 + ".count",
565
+ expected: "number",
566
+ value: input3.count
567
+ }), "boolean" === typeof input3.capped || $report(_exceptionable2, {
568
+ path: _path2 + ".capped",
569
+ expected: "boolean",
570
+ value: input3.capped
571
+ }), "number" === typeof input3.samples || $report(_exceptionable2, {
572
+ path: _path2 + ".samples",
573
+ expected: "number",
574
+ value: input3.samples
575
+ })].every((flag) => flag);
517
576
  return ("object" === typeof input2 && null !== input2 || $report(true, {
518
577
  path: _path + "",
519
578
  expected: "GRIN2Response",
package/dist/grin2.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  GRIN2Payload,
3
3
  validGRIN2Request,
4
4
  validGRIN2Response
5
- } from "./chunk-HI2IT25E.js";
5
+ } from "./chunk-4LZHDYI3.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  GRIN2Payload,
package/dist/index.js CHANGED
@@ -217,7 +217,7 @@ import {
217
217
  GRIN2Payload,
218
218
  validGRIN2Request,
219
219
  validGRIN2Response
220
- } from "./chunk-HI2IT25E.js";
220
+ } from "./chunk-4LZHDYI3.js";
221
221
  import {
222
222
  healthcheckPayload,
223
223
  validHealthCheckRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.152.1-0",
3
+ "version": "2.153.1-2",
4
4
  "type": "module",
5
5
  "description": "Shared type definitions between ProteinPaint server and client code",
6
6
  "main": "src/index.ts",
@@ -36,5 +36,10 @@
36
36
  "files": [
37
37
  "dist/*.js",
38
38
  "src"
39
- ]
39
+ ],
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "https://github.com/stjude/proteinpaint",
43
+ "directory": "server"
44
+ }
40
45
  }
@@ -166,6 +166,17 @@ export type GRIN2Response = {
166
166
  totalLesions?: number
167
167
  processedLesions?: number
168
168
  unprocessedSamples?: number
169
+ lesionCounts?: {
170
+ total?: number
171
+ byType?: Record<
172
+ string, // Our key is the GRIN2 lesion type
173
+ {
174
+ count: number
175
+ capped: boolean
176
+ samples: number
177
+ }
178
+ >
179
+ }
169
180
  }
170
181
  /** Cache file name for storing GRIN2 results */
171
182
  cacheFileName?: string