@sjcrh/proteinpaint-types 2.99.0 → 2.99.1-1

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.
@@ -64,7 +64,8 @@ var validSampleWSImagesRequest = (input) => {
64
64
  var validSampleWSImagesResponse = (input) => {
65
65
  const errors = [];
66
66
  const __is = (input2) => {
67
- const $io0 = (input3) => Array.isArray(input3.sampleWSImages) && input3.sampleWSImages.every((elem) => "string" === typeof elem);
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 && "string" === typeof input3.metadata;
68
69
  return "object" === typeof input2 && null !== input2 && $io0(input2);
69
70
  };
70
71
  if (false === __is(input)) {
@@ -72,17 +73,30 @@ var validSampleWSImagesResponse = (input) => {
72
73
  ((input2, _path, _exceptionable = true) => {
73
74
  const $vo0 = (input3, _path2, _exceptionable2 = true) => [(Array.isArray(input3.sampleWSImages) || $report(_exceptionable2, {
74
75
  path: _path2 + ".sampleWSImages",
75
- expected: "Array<string>",
76
+ expected: "Array<WSImage>",
76
77
  value: input3.sampleWSImages
77
- })) && input3.sampleWSImages.map((elem, _index1) => "string" === typeof elem || $report(_exceptionable2, {
78
+ })) && input3.sampleWSImages.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
78
79
  path: _path2 + ".sampleWSImages[" + _index1 + "]",
79
- expected: "string",
80
+ expected: "WSImage",
81
+ value: elem
82
+ })) && $vo1(elem, _path2 + ".sampleWSImages[" + _index1 + "]", _exceptionable2) || $report(_exceptionable2, {
83
+ path: _path2 + ".sampleWSImages[" + _index1 + "]",
84
+ expected: "WSImage",
80
85
  value: elem
81
86
  })).every((flag) => flag) || $report(_exceptionable2, {
82
87
  path: _path2 + ".sampleWSImages",
83
- expected: "Array<string>",
88
+ expected: "Array<WSImage>",
84
89
  value: input3.sampleWSImages
85
90
  })].every((flag) => flag);
91
+ const $vo1 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.filename || $report(_exceptionable2, {
92
+ path: _path2 + ".filename",
93
+ expected: "string",
94
+ value: input3.filename
95
+ }), "string" === typeof input3.metadata || $report(_exceptionable2, {
96
+ path: _path2 + ".metadata",
97
+ expected: "string",
98
+ value: input3.metadata
99
+ })].every((flag) => flag);
86
100
  return ("object" === typeof input2 && null !== input2 || $report(true, {
87
101
  path: _path + "",
88
102
  expected: "SampleWSImagesResponse",
@@ -0,0 +1,91 @@
1
+ import {
2
+ __toESM,
3
+ require_lib
4
+ } from "./chunk-Z6B6IQIY.js";
5
+
6
+ // dist/img.ts
7
+ var import_typia = __toESM(require_lib(), 1);
8
+
9
+ // src/routes/img.ts
10
+ var imgPayload = {
11
+ request: {
12
+ typeId: "imgRequest"
13
+ },
14
+ response: {
15
+ typeId: "imgResponse"
16
+ }
17
+ };
18
+
19
+ // dist/img.ts
20
+ var validimgRequest = (input) => {
21
+ const errors = [];
22
+ const __is = (input2) => {
23
+ return "object" === typeof input2 && null !== input2 && "string" === typeof input2.file;
24
+ };
25
+ if (false === __is(input)) {
26
+ const $report = import_typia.createValidate.report(errors);
27
+ ((input2, _path, _exceptionable = true) => {
28
+ const $vo0 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.file || $report(_exceptionable2, {
29
+ path: _path2 + ".file",
30
+ expected: "string",
31
+ value: input3.file
32
+ })].every((flag) => flag);
33
+ return ("object" === typeof input2 && null !== input2 || $report(true, {
34
+ path: _path + "",
35
+ expected: "imgRequest",
36
+ value: input2
37
+ })) && $vo0(input2, _path + "", true) || $report(true, {
38
+ path: _path + "",
39
+ expected: "imgRequest",
40
+ value: input2
41
+ });
42
+ })(input, "$input", true);
43
+ }
44
+ const success = 0 === errors.length;
45
+ return {
46
+ success,
47
+ errors,
48
+ data: success ? input : void 0
49
+ };
50
+ };
51
+ var validimgResponse = (input) => {
52
+ const errors = [];
53
+ const __is = (input2) => {
54
+ return "object" === typeof input2 && null !== input2 && ("string" === typeof input2.src && "string" === typeof input2.size);
55
+ };
56
+ if (false === __is(input)) {
57
+ const $report = import_typia.createValidate.report(errors);
58
+ ((input2, _path, _exceptionable = true) => {
59
+ const $vo0 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.src || $report(_exceptionable2, {
60
+ path: _path2 + ".src",
61
+ expected: "string",
62
+ value: input3.src
63
+ }), "string" === typeof input3.size || $report(_exceptionable2, {
64
+ path: _path2 + ".size",
65
+ expected: "string",
66
+ value: input3.size
67
+ })].every((flag) => flag);
68
+ return ("object" === typeof input2 && null !== input2 || $report(true, {
69
+ path: _path + "",
70
+ expected: "imgResponse",
71
+ value: input2
72
+ })) && $vo0(input2, _path + "", true) || $report(true, {
73
+ path: _path + "",
74
+ expected: "imgResponse",
75
+ value: input2
76
+ });
77
+ })(input, "$input", true);
78
+ }
79
+ const success = 0 === errors.length;
80
+ return {
81
+ success,
82
+ errors,
83
+ data: success ? input : void 0
84
+ };
85
+ };
86
+
87
+ export {
88
+ imgPayload,
89
+ validimgRequest,
90
+ validimgResponse
91
+ };
@@ -64,16 +64,20 @@ var validWSImagesRequest = (input) => {
64
64
  var validWSImagesResponse = (input) => {
65
65
  const errors = [];
66
66
  const __is = (input2) => {
67
- const $io0 = (input3) => (void 0 === input3.sessionId || "string" === typeof input3.sessionId) && (Array.isArray(input3.slide_dimensions) && input3.slide_dimensions.every((elem) => "number" === typeof elem)) && "string" === typeof input3.status;
67
+ const $io0 = (input3) => (void 0 === input3.wsiSessionId || "string" === typeof input3.wsiSessionId) && (void 0 === input3.browserImageInstanceId || "string" === typeof input3.browserImageInstanceId) && (Array.isArray(input3.slide_dimensions) && input3.slide_dimensions.every((elem) => "number" === typeof elem)) && "string" === typeof input3.status;
68
68
  return "object" === typeof input2 && null !== input2 && $io0(input2);
69
69
  };
70
70
  if (false === __is(input)) {
71
71
  const $report = import_typia.createValidate.report(errors);
72
72
  ((input2, _path, _exceptionable = true) => {
73
- const $vo0 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.sessionId || "string" === typeof input3.sessionId || $report(_exceptionable2, {
74
- path: _path2 + ".sessionId",
73
+ const $vo0 = (input3, _path2, _exceptionable2 = true) => [void 0 === input3.wsiSessionId || "string" === typeof input3.wsiSessionId || $report(_exceptionable2, {
74
+ path: _path2 + ".wsiSessionId",
75
75
  expected: "(string | undefined)",
76
- value: input3.sessionId
76
+ value: input3.wsiSessionId
77
+ }), void 0 === input3.browserImageInstanceId || "string" === typeof input3.browserImageInstanceId || $report(_exceptionable2, {
78
+ path: _path2 + ".browserImageInstanceId",
79
+ expected: "(string | undefined)",
80
+ value: input3.browserImageInstanceId
77
81
  }), (Array.isArray(input3.slide_dimensions) || $report(_exceptionable2, {
78
82
  path: _path2 + ".slide_dimensions",
79
83
  expected: "Array<number>",
@@ -0,0 +1,88 @@
1
+ import {
2
+ __toESM,
3
+ require_lib
4
+ } from "./chunk-Z6B6IQIY.js";
5
+
6
+ // dist/clearwsisession.ts
7
+ var import_typia = __toESM(require_lib(), 1);
8
+
9
+ // src/routes/clearwsisessions.ts
10
+ var clearWSImagesSessionsPayload = {
11
+ request: {
12
+ typeId: "ClearWSImagesSessionsRequest"
13
+ },
14
+ response: {
15
+ typeId: "ClearWSImagesSessionsResponse"
16
+ }
17
+ // examples: []
18
+ };
19
+
20
+ // dist/clearwsisession.ts
21
+ var validClearWSImagesSessionsRequest = (input) => {
22
+ const errors = [];
23
+ const __is = (input2) => {
24
+ const $io0 = (input3) => Array.isArray(input3.sessions);
25
+ return "object" === typeof input2 && null !== input2 && $io0(input2);
26
+ };
27
+ if (false === __is(input)) {
28
+ const $report = import_typia.createValidate.report(errors);
29
+ ((input2, _path, _exceptionable = true) => {
30
+ const $vo0 = (input3, _path2, _exceptionable2 = true) => [Array.isArray(input3.sessions) || $report(_exceptionable2, {
31
+ path: _path2 + ".sessions",
32
+ expected: "Array<any>",
33
+ value: input3.sessions
34
+ })].every((flag) => flag);
35
+ return ("object" === typeof input2 && null !== input2 || $report(true, {
36
+ path: _path + "",
37
+ expected: "ClearWSImagesSessionsRequest",
38
+ value: input2
39
+ })) && $vo0(input2, _path + "", true) || $report(true, {
40
+ path: _path + "",
41
+ expected: "ClearWSImagesSessionsRequest",
42
+ value: input2
43
+ });
44
+ })(input, "$input", true);
45
+ }
46
+ const success = 0 === errors.length;
47
+ return {
48
+ success,
49
+ errors,
50
+ data: success ? input : void 0
51
+ };
52
+ };
53
+ var validClearWSImagesSessionsResponse = (input) => {
54
+ const errors = [];
55
+ const __is = (input2) => {
56
+ return "object" === typeof input2 && null !== input2 && "string" === typeof input2.message;
57
+ };
58
+ if (false === __is(input)) {
59
+ const $report = import_typia.createValidate.report(errors);
60
+ ((input2, _path, _exceptionable = true) => {
61
+ const $vo0 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.message || $report(_exceptionable2, {
62
+ path: _path2 + ".message",
63
+ expected: "string",
64
+ value: input3.message
65
+ })].every((flag) => flag);
66
+ return ("object" === typeof input2 && null !== input2 || $report(true, {
67
+ path: _path + "",
68
+ expected: "ClearWSImagesSessionsResponse",
69
+ value: input2
70
+ })) && $vo0(input2, _path + "", true) || $report(true, {
71
+ path: _path + "",
72
+ expected: "ClearWSImagesSessionsResponse",
73
+ value: input2
74
+ });
75
+ })(input, "$input", true);
76
+ }
77
+ const success = 0 === errors.length;
78
+ return {
79
+ success,
80
+ errors,
81
+ data: success ? input : void 0
82
+ };
83
+ };
84
+ export {
85
+ clearWSImagesSessionsPayload,
86
+ validClearWSImagesSessionsRequest,
87
+ validClearWSImagesSessionsResponse
88
+ };
package/dist/img.js ADDED
@@ -0,0 +1,11 @@
1
+ import {
2
+ imgPayload,
3
+ validimgRequest,
4
+ validimgResponse
5
+ } from "./chunk-NBLSSFQV.js";
6
+ import "./chunk-Z6B6IQIY.js";
7
+ export {
8
+ imgPayload,
9
+ validimgRequest,
10
+ validimgResponse
11
+ };
package/dist/index.js CHANGED
@@ -1,3 +1,13 @@
1
+ import {
2
+ termChildrenPayload,
3
+ validTermChildrenRequest,
4
+ validTermChildrenResponse
5
+ } from "./chunk-5RZYB4M4.js";
6
+ import {
7
+ termsByIdsPayload,
8
+ validTermsByIdsRequest,
9
+ validTermsByIdsResponse
10
+ } from "./chunk-QV7KKZV4.js";
1
11
  import {
2
12
  termdbTopTermsByTypePayload,
3
13
  validTermdbTopTermsByTypeRequest,
@@ -22,7 +32,17 @@ import {
22
32
  validWSImagesRequest,
23
33
  validWSImagesResponse,
24
34
  wsImagesPayload
25
- } from "./chunk-XLBSZOMF.js";
35
+ } from "./chunk-W3KUIWKN.js";
36
+ import {
37
+ numericCategoriesPayload,
38
+ validNumericCategoriesRequest,
39
+ validNumericCategoriesResponse
40
+ } from "./chunk-JDJZ35H6.js";
41
+ import {
42
+ percentilePayload,
43
+ validPercentileRequest,
44
+ validPercentileResponse
45
+ } from "./chunk-IORCECK2.js";
26
46
  import {
27
47
  rootTermPayload,
28
48
  validRootTermRequest,
@@ -54,15 +74,15 @@ import {
54
74
  validTermdbSingleCellSamplesResponse
55
75
  } from "./chunk-FZ6QOTGM.js";
56
76
  import {
57
- termChildrenPayload,
58
- validTermChildrenRequest,
59
- validTermChildrenResponse
60
- } from "./chunk-5RZYB4M4.js";
77
+ snpPayload,
78
+ validSnpRequest,
79
+ validSnpResponse
80
+ } from "./chunk-XJCQEOPB.js";
61
81
  import {
62
- termsByIdsPayload,
63
- validTermsByIdsRequest,
64
- validTermsByIdsResponse
65
- } from "./chunk-QV7KKZV4.js";
82
+ diffExpPayload,
83
+ validDERequest,
84
+ validDEResponse
85
+ } from "./chunk-Z2WFGV6V.js";
66
86
  import {
67
87
  boxplotPayload,
68
88
  validBoxPlotRequest,
@@ -94,20 +114,20 @@ import {
94
114
  validDescrStatsResponse
95
115
  } from "./chunk-HQDTWY25.js";
96
116
  import {
97
- numericCategoriesPayload,
98
- validNumericCategoriesRequest,
99
- validNumericCategoriesResponse
100
- } from "./chunk-JDJZ35H6.js";
101
- import {
102
- percentilePayload,
103
- validPercentileRequest,
104
- validPercentileResponse
105
- } from "./chunk-IORCECK2.js";
117
+ hicGenomePayload,
118
+ validHicGenomeRequest,
119
+ validHicGenomeResponse
120
+ } from "./chunk-W3QYIXXF.js";
106
121
  import {
107
122
  hicstatPayload,
108
123
  validHicstatRequest,
109
124
  validHicstatResponse
110
125
  } from "./chunk-QX7QLUKY.js";
126
+ import {
127
+ imgPayload,
128
+ validimgRequest,
129
+ validimgResponse
130
+ } from "./chunk-NBLSSFQV.js";
111
131
  import {
112
132
  isoformlstPayload,
113
133
  validIsoformLstRequest,
@@ -127,17 +147,12 @@ import {
127
147
  sampleWSImagesPayload,
128
148
  validSampleWSImagesRequest,
129
149
  validSampleWSImagesResponse
130
- } from "./chunk-UCG25D2C.js";
131
- import {
132
- snpPayload,
133
- validSnpRequest,
134
- validSnpResponse
135
- } from "./chunk-XJCQEOPB.js";
150
+ } from "./chunk-75VJBEAQ.js";
136
151
  import {
137
- diffExpPayload,
138
- validDERequest,
139
- validDEResponse
140
- } from "./chunk-Z2WFGV6V.js";
152
+ gdcMafPayload,
153
+ validGdcMafRequest,
154
+ validGdcMafResponse
155
+ } from "./chunk-CETMA2FU.js";
141
156
  import {
142
157
  GdcMafPayload,
143
158
  validGdcMafBuildRequest,
@@ -173,11 +188,6 @@ import {
173
188
  validHicdataRequest,
174
189
  validHicdataResponse
175
190
  } from "./chunk-5JWTIWVB.js";
176
- import {
177
- hicGenomePayload,
178
- validHicGenomeRequest,
179
- validHicGenomeResponse
180
- } from "./chunk-W3QYIXXF.js";
181
191
  import {
182
192
  brainImagingPayload,
183
193
  validBrainImagingRequest,
@@ -213,11 +223,6 @@ import {
213
223
  validDZImagesRequest,
214
224
  validDZImagesResponse
215
225
  } from "./chunk-SDOWCOGK.js";
216
- import {
217
- gdcMafPayload,
218
- validGdcMafRequest,
219
- validGdcMafResponse
220
- } from "./chunk-CETMA2FU.js";
221
226
  import "./chunk-Z6B6IQIY.js";
222
227
  export {
223
228
  CorrelationVolcanoPayload,
@@ -240,6 +245,7 @@ export {
240
245
  hicGenomePayload,
241
246
  hicdataPayload,
242
247
  hicstatPayload,
248
+ imgPayload,
243
249
  isoformlstPayload,
244
250
  ntseqPayload,
245
251
  numericCategoriesPayload,
@@ -350,6 +356,8 @@ export {
350
356
  validViolinResponse,
351
357
  validWSImagesRequest,
352
358
  validWSImagesResponse,
359
+ validimgRequest,
360
+ validimgResponse,
353
361
  violinPayload,
354
362
  wsImagesPayload
355
363
  };
@@ -2,7 +2,7 @@ import {
2
2
  sampleWSImagesPayload,
3
3
  validSampleWSImagesRequest,
4
4
  validSampleWSImagesResponse
5
- } from "./chunk-UCG25D2C.js";
5
+ } from "./chunk-75VJBEAQ.js";
6
6
  import "./chunk-Z6B6IQIY.js";
7
7
  export {
8
8
  sampleWSImagesPayload,
package/dist/wsimages.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  validWSImagesRequest,
3
3
  validWSImagesResponse,
4
4
  wsImagesPayload
5
- } from "./chunk-XLBSZOMF.js";
5
+ } from "./chunk-W3KUIWKN.js";
6
6
  import "./chunk-Z6B6IQIY.js";
7
7
  export {
8
8
  validWSImagesRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.99.0",
3
+ "version": "2.99.1-1",
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
@@ -694,6 +694,17 @@ also, sampleView uses this to determine if to invoke the sc plot for a sample
694
694
  geneExpression?: SingleCellGeneExpressionGdc | SingleCellGeneExpressionNative
695
695
  /** Precomputed top differentialy expressed genes for a cell cluster, against rest of cells */
696
696
  DEgenes?: SingleCellDEgeneGdc
697
+ /** supplies per-sample images. will create a new tab on the ui. one image per sample */
698
+ images?: SCImages
699
+ }
700
+
701
+ type SCImages = {
702
+ /** folder where the per-sample image files are stored, as "SCImages/<folder>/<sample>/<fileName>" */
703
+ folder: string
704
+ /** see above */
705
+ fileName: string
706
+ /**Used to name the image tab in the single cell plot */
707
+ label: string
697
708
  }
698
709
 
699
710
  type LdQuery = {
@@ -818,9 +829,9 @@ export type WSImages = {
818
829
  // type of the image, e.g. H&E
819
830
  type: string
820
831
  // path to the folder where sample images are stored
821
- imageBySampleFolder: string
822
- // TODO extend to support multiple sources
823
- //sources?: []
832
+ imageBySampleFolder?: string
833
+
834
+ sources?: string
824
835
  }
825
836
 
826
837
  /*** types supporting Termdb ***/
package/src/index.ts CHANGED
@@ -8,6 +8,7 @@ export * from './routes/routeApi.ts'
8
8
  export * from './routes/brainImaging.ts'
9
9
  export * from './routes/brainImagingSamples.ts'
10
10
  export * from './routes/burden.ts'
11
+ export * from './routes/clearwsisessions.ts'
11
12
  export * from './routes/correlationVolcano.ts'
12
13
  export * from './routes/dataset.ts'
13
14
  export * from './routes/dsdata.ts'
@@ -41,6 +42,7 @@ export * from './routes/termdb.percentile.ts'
41
42
  export * from './routes/termdb.rootterm.ts'
42
43
  export * from './routes/termdb.termchildren.ts'
43
44
  export * from './routes/termdb.sampleImages.ts'
45
+ export * from './routes/img.ts'
44
46
  export * from './routes/termdb.singlecellData.ts'
45
47
  export * from './routes/termdb.singlecellDEgenes.ts'
46
48
  export * from './routes/termdb.singlecellSamples.ts'
@@ -0,0 +1,19 @@
1
+ import type { RoutePayload } from './routeApi.ts'
2
+
3
+ export type ClearWSImagesSessionsRequest = {
4
+ sessions: Array<any>
5
+ }
6
+
7
+ export type ClearWSImagesSessionsResponse = {
8
+ message: string
9
+ }
10
+
11
+ export const clearWSImagesSessionsPayload: RoutePayload = {
12
+ request: {
13
+ typeId: 'ClearWSImagesSessionsRequest'
14
+ },
15
+ response: {
16
+ typeId: 'ClearWSImagesSessionsResponse'
17
+ }
18
+ // examples: []
19
+ }
@@ -0,0 +1,23 @@
1
+ import type { RoutePayload } from './routeApi.js'
2
+
3
+ export type imgRequest = {
4
+ file: string
5
+ }
6
+
7
+ export type SrcImage = {
8
+ src: any
9
+ }
10
+
11
+ export type imgResponse = {
12
+ src: string
13
+ size: string
14
+ }
15
+
16
+ export const imgPayload: RoutePayload = {
17
+ request: {
18
+ typeId: 'imgRequest'
19
+ },
20
+ response: {
21
+ typeId: 'imgResponse'
22
+ }
23
+ }
@@ -3,6 +3,8 @@ export type RouteApi = {
3
3
  methods: {
4
4
  get?: RoutePayload
5
5
  post?: RoutePayload
6
+ put?: RoutePayload
7
+ delete?: RoutePayload
6
8
  }
7
9
  }
8
10
 
@@ -8,7 +8,7 @@ export type SampleWSImagesRequest = {
8
8
  }
9
9
 
10
10
  export type SampleWSImagesResponse = {
11
- sampleWSImages: string[]
11
+ sampleWSImages: WSImage[]
12
12
  }
13
13
 
14
14
  export type WSImage = {
@@ -8,7 +8,11 @@ export type WSImagesRequest = {
8
8
  }
9
9
 
10
10
  export type WSImagesResponse = {
11
- sessionId?: string
11
+ // TileServer image session id
12
+ wsiSessionId?: string
13
+ // Identifier for the image instance displayed in the browser
14
+ // In case the same image is displayed in multiple browser windows, a new id is generated
15
+ browserImageInstanceId?: string
12
16
  slide_dimensions: number[]
13
17
  status: string
14
18
  }