@sjcrh/proteinpaint-types 2.121.0 → 2.123.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.
@@ -65,7 +65,7 @@ var validSampleWSImagesResponse = (input) => {
65
65
  const errors = [];
66
66
  const __is = (input2) => {
67
67
  const $io0 = (input3) => Array.isArray(input3.sampleWSImages) && input3.sampleWSImages.every((elem) => "object" === typeof elem && null !== elem && $io1(elem));
68
- const $io1 = (input3) => "string" === typeof input3.filename && (void 0 === input3.overlays || Array.isArray(input3.overlays) && input3.overlays.every((elem) => "string" === typeof elem)) && "string" === typeof input3.metadata;
68
+ const $io1 = (input3) => "string" === typeof input3.filename && (void 0 === input3.overlays || Array.isArray(input3.overlays) && input3.overlays.every((elem) => "string" === typeof elem)) && (void 0 === input3.zoomInPoints || Array.isArray(input3.zoomInPoints) && input3.zoomInPoints.every((elem) => Array.isArray(elem) && (elem.length === 2 && "number" === typeof elem[0] && "number" === typeof elem[1]))) && "string" === typeof input3.metadata;
69
69
  return "object" === typeof input2 && null !== input2 && $io0(input2);
70
70
  };
71
71
  if (false === __is(input)) {
@@ -104,6 +104,37 @@ var validSampleWSImagesResponse = (input) => {
104
104
  path: _path2 + ".overlays",
105
105
  expected: "(Array<string> | undefined)",
106
106
  value: input3.overlays
107
+ }), void 0 === input3.zoomInPoints || (Array.isArray(input3.zoomInPoints) || $report(_exceptionable2, {
108
+ path: _path2 + ".zoomInPoints",
109
+ expected: "(Array<[number, number]> | undefined)",
110
+ value: input3.zoomInPoints
111
+ })) && input3.zoomInPoints.map((elem, _index3) => (Array.isArray(elem) || $report(_exceptionable2, {
112
+ path: _path2 + ".zoomInPoints[" + _index3 + "]",
113
+ expected: "[number, number]",
114
+ value: elem
115
+ })) && ((elem.length === 2 || $report(_exceptionable2, {
116
+ path: _path2 + ".zoomInPoints[" + _index3 + "]",
117
+ expected: "[number, number]",
118
+ value: elem
119
+ })) && [
120
+ "number" === typeof elem[0] || $report(_exceptionable2, {
121
+ path: _path2 + ".zoomInPoints[" + _index3 + "][0]",
122
+ expected: "number",
123
+ value: elem[0]
124
+ }),
125
+ "number" === typeof elem[1] || $report(_exceptionable2, {
126
+ path: _path2 + ".zoomInPoints[" + _index3 + "][1]",
127
+ expected: "number",
128
+ value: elem[1]
129
+ })
130
+ ].every((flag) => flag)) || $report(_exceptionable2, {
131
+ path: _path2 + ".zoomInPoints[" + _index3 + "]",
132
+ expected: "[number, number]",
133
+ value: elem
134
+ })).every((flag) => flag) || $report(_exceptionable2, {
135
+ path: _path2 + ".zoomInPoints",
136
+ expected: "(Array<[number, number]> | undefined)",
137
+ value: input3.zoomInPoints
107
138
  }), "string" === typeof input3.metadata || $report(_exceptionable2, {
108
139
  path: _path2 + ".metadata",
109
140
  expected: "string",
package/dist/index.js CHANGED
@@ -147,7 +147,7 @@ import {
147
147
  sampleWSImagesPayload,
148
148
  validSampleWSImagesRequest,
149
149
  validSampleWSImagesResponse
150
- } from "./chunk-HURSYPTO.js";
150
+ } from "./chunk-D5OG676D.js";
151
151
  import {
152
152
  snpPayload,
153
153
  validSnpRequest,
@@ -2,7 +2,7 @@ import {
2
2
  sampleWSImagesPayload,
3
3
  validSampleWSImagesRequest,
4
4
  validSampleWSImagesResponse
5
- } from "./chunk-HURSYPTO.js";
5
+ } from "./chunk-D5OG676D.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  sampleWSImagesPayload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.121.0",
3
+ "version": "2.123.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
@@ -600,9 +600,13 @@ type CnvSegment = {
600
600
  cnvMaxCopynumber?: number
601
601
  */
602
602
 
603
- /** if cnv is using qualitative categories. ui will show checkboxes for each category that's present
604
- cnvCategories?:string[]
603
+ /** quick fix for gdc cnv tool:
604
+ if not set, mds3 tk & matrix will load cnv segments and show them together with ssm & fusion
605
+ if set:
606
+ - for mds3 tk loading via mds3.load.js, only when tk.hardcodeCnvOnly=true, this will be loaded and shown
607
+ - for others using mayGetGeneVariantData(), this is always disabled, as request won't have this flag
605
608
  */
609
+ requiresHardcodeCnvOnlyFlag?: true
606
610
  }
607
611
 
608
612
  /*
@@ -946,6 +950,8 @@ export type WSImages = {
946
950
  getWSImages?: (sampleName: string) => Promise<WSImage[]>
947
951
  /** ds supplied */
948
952
  getWSIAnnotations?: (sampleName: string, wsiImage: string) => Promise<string[]>
953
+ /** ds supplied */
954
+ getZoomInPoints?: (sampleName: string, wsiImage: string) => Promise<Array<[number, number]>>
949
955
  }
950
956
 
951
957
  /*** types supporting Termdb ***/
@@ -1278,7 +1284,7 @@ type Termdb = {
1278
1284
  /** Terms */
1279
1285
  termIds?: TermIds
1280
1286
  /** if true, backend is allowed to send sample names to client in charts */
1281
- displaySampleIds?: boolean
1287
+ displaySampleIds?: (clientAuthResult: any) => boolean
1282
1288
  converSampleIds?: boolean
1283
1289
  alwaysShowBranchTerms?: boolean
1284
1290
  minimumSampleAllowed4filter?: number
@@ -1428,8 +1434,8 @@ keep this setting here for reason of:
1428
1434
  /** colors for a category multivalues */
1429
1435
  [index: string]: { [index: string]: string }
1430
1436
  }
1431
- //terms that are not shown in the dictionary tree unless the user is admin. If there is no authentication the terms listes are always hidden
1432
- hiddenTermIds?: string[]
1437
+ //terms are shown in the dictionary based on term and user role.
1438
+ isTermVisible?: (clientAuthResult: any, id: string) => boolean
1433
1439
  }
1434
1440
 
1435
1441
  type SampleType = {
@@ -14,6 +14,7 @@ export type SampleWSImagesResponse = {
14
14
  export type WSImage = {
15
15
  filename: string
16
16
  overlays?: Array<string>
17
+ zoomInPoints?: Array<[number, number]>
17
18
  metadata: string
18
19
  }
19
20