@sjcrh/proteinpaint-types 2.163.1 → 2.164.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.
@@ -2,7 +2,7 @@ import {
2
2
  aiProjectSelectedWSImagesResponsePayload,
3
3
  validAiProjectSelectedWSImagesRequest,
4
4
  validAiProjectSelectedWSImagesResponse
5
- } from "./chunk-225Q2ZUA.js";
5
+ } from "./chunk-C6EUYXHJ.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  aiProjectSelectedWSImagesResponsePayload,
@@ -74,7 +74,7 @@ var validAiProjectSelectedWSImagesResponse = (input) => {
74
74
  const __is = (input2) => {
75
75
  const $io0 = (input3) => Array.isArray(input3.wsimages) && input3.wsimages.every((elem) => "object" === typeof elem && null !== elem && $io1(elem));
76
76
  const $io1 = (input3) => (void 0 === input3.id || "number" === typeof input3.id) && "string" === typeof input3.filename && (void 0 === input3.metadata || "string" === typeof input3.metadata) && (void 0 === input3.predictionLayers || Array.isArray(input3.predictionLayers) && input3.predictionLayers.every((elem) => "string" === typeof elem)) && (void 0 === input3.annotations || Array.isArray(input3.annotations) && input3.annotations.every((elem) => "object" === typeof elem && null !== elem && $io2(elem))) && (void 0 === input3.predictions || Array.isArray(input3.predictions) && input3.predictions.every((elem) => "object" === typeof elem && null !== elem && $io3(elem))) && (void 0 === input3.classes || Array.isArray(input3.classes) && input3.classes.every((elem) => "object" === typeof elem && null !== elem && $io4(elem))) && true && (void 0 === input3.activePatchColor || "string" === typeof input3.activePatchColor) && (void 0 === input3.tileSize || "number" === typeof input3.tileSize);
77
- const $io2 = (input3) => "string" === typeof input3["class"] && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
77
+ const $io2 = (input3) => "string" === typeof input3["class"] && (void 0 === input3.timestamp || "string" === typeof input3.timestamp) && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
78
78
  const $io3 = (input3) => "string" === typeof input3["class"] && "number" === typeof input3.uncertainty && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
79
79
  const $io4 = (input3) => "number" === typeof input3.id && "string" === typeof input3.key_shortcut && "string" === typeof input3.label && "string" === typeof input3.color;
80
80
  return "object" === typeof input2 && null !== input2 && $io0(input2);
@@ -184,6 +184,10 @@ var validAiProjectSelectedWSImagesResponse = (input) => {
184
184
  path: _path2 + '["class"]',
185
185
  expected: "string",
186
186
  value: input3["class"]
187
+ }), void 0 === input3.timestamp || "string" === typeof input3.timestamp || $report(_exceptionable2, {
188
+ path: _path2 + ".timestamp",
189
+ expected: "(string | undefined)",
190
+ value: input3.timestamp
187
191
  }), (Array.isArray(input3.zoomCoordinates) || $report(_exceptionable2, {
188
192
  path: _path2 + ".zoomCoordinates",
189
193
  expected: "[number, number]",
@@ -2207,15 +2207,15 @@ var validChatRequest = (input) => {
2207
2207
  var validChatResponse = (input) => {
2208
2208
  const errors = [];
2209
2209
  const __is = (input2) => {
2210
- const $io0 = (input3) => ("html" === input3.type || "plot" === input3.type) && (void 0 === input3.html || "string" === typeof input3.html) && true;
2210
+ const $io0 = (input3) => ("html" === input3.type || "plot" === input3.type || "json" === input3.type) && (void 0 === input3.html || "string" === typeof input3.html) && true;
2211
2211
  return "object" === typeof input2 && null !== input2 && $io0(input2);
2212
2212
  };
2213
2213
  if (false === __is(input)) {
2214
2214
  const $report = import_typia.createValidate.report(errors);
2215
2215
  ((input2, _path, _exceptionable = true) => {
2216
- const $vo0 = (input3, _path2, _exceptionable2 = true) => ["html" === input3.type || "plot" === input3.type || $report(_exceptionable2, {
2216
+ const $vo0 = (input3, _path2, _exceptionable2 = true) => ["html" === input3.type || "plot" === input3.type || "json" === input3.type || $report(_exceptionable2, {
2217
2217
  path: _path2 + ".type",
2218
- expected: '("html" | "plot")',
2218
+ expected: '("html" | "json" | "plot")',
2219
2219
  value: input3.type
2220
2220
  }), void 0 === input3.html || "string" === typeof input3.html || $report(_exceptionable2, {
2221
2221
  path: _path2 + ".html",
@@ -66,7 +66,7 @@ var validSampleWSImagesResponse = (input) => {
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
68
  const $io1 = (input3) => (void 0 === input3.id || "number" === typeof input3.id) && "string" === typeof input3.filename && (void 0 === input3.metadata || "string" === typeof input3.metadata) && (void 0 === input3.predictionLayers || Array.isArray(input3.predictionLayers) && input3.predictionLayers.every((elem) => "string" === typeof elem)) && (void 0 === input3.annotations || Array.isArray(input3.annotations) && input3.annotations.every((elem) => "object" === typeof elem && null !== elem && $io2(elem))) && (void 0 === input3.predictions || Array.isArray(input3.predictions) && input3.predictions.every((elem) => "object" === typeof elem && null !== elem && $io3(elem))) && (void 0 === input3.classes || Array.isArray(input3.classes) && input3.classes.every((elem) => "object" === typeof elem && null !== elem && $io4(elem))) && true && (void 0 === input3.activePatchColor || "string" === typeof input3.activePatchColor) && (void 0 === input3.tileSize || "number" === typeof input3.tileSize);
69
- const $io2 = (input3) => "string" === typeof input3["class"] && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
69
+ const $io2 = (input3) => "string" === typeof input3["class"] && (void 0 === input3.timestamp || "string" === typeof input3.timestamp) && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
70
70
  const $io3 = (input3) => "string" === typeof input3["class"] && "number" === typeof input3.uncertainty && (Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]));
71
71
  const $io4 = (input3) => "number" === typeof input3.id && "string" === typeof input3.key_shortcut && "string" === typeof input3.label && "string" === typeof input3.color;
72
72
  return "object" === typeof input2 && null !== input2 && $io0(input2);
@@ -176,6 +176,10 @@ var validSampleWSImagesResponse = (input) => {
176
176
  path: _path2 + '["class"]',
177
177
  expected: "string",
178
178
  value: input3["class"]
179
+ }), void 0 === input3.timestamp || "string" === typeof input3.timestamp || $report(_exceptionable2, {
180
+ path: _path2 + ".timestamp",
181
+ expected: "(string | undefined)",
182
+ value: input3.timestamp
179
183
  }), (Array.isArray(input3.zoomCoordinates) || $report(_exceptionable2, {
180
184
  path: _path2 + ".zoomCoordinates",
181
185
  expected: "[number, number]",
package/dist/index.js CHANGED
@@ -142,7 +142,7 @@ import {
142
142
  ChatPayload,
143
143
  validChatRequest,
144
144
  validChatResponse
145
- } from "./chunk-OAETETAO.js";
145
+ } from "./chunk-TR2MSSP3.js";
146
146
  import {
147
147
  termdbClusterPayload,
148
148
  validTermdbClusterRequest,
@@ -187,7 +187,7 @@ import {
187
187
  sampleWSImagesPayload,
188
188
  validSampleWSImagesRequest,
189
189
  validSampleWSImagesResponse
190
- } from "./chunk-ETMCI34A.js";
190
+ } from "./chunk-ZFEV22KC.js";
191
191
  import {
192
192
  gdcMafPayload,
193
193
  validGdcMafRequest,
@@ -277,7 +277,7 @@ import {
277
277
  aiProjectSelectedWSImagesResponsePayload,
278
278
  validAiProjectSelectedWSImagesRequest,
279
279
  validAiProjectSelectedWSImagesResponse
280
- } from "./chunk-225Q2ZUA.js";
280
+ } from "./chunk-C6EUYXHJ.js";
281
281
  import {
282
282
  aiProjectTrainModelPayload,
283
283
  validAIProjectTrainModelRequest,
@@ -2,7 +2,7 @@ import {
2
2
  sampleWSImagesPayload,
3
3
  validSampleWSImagesRequest,
4
4
  validSampleWSImagesResponse
5
- } from "./chunk-ETMCI34A.js";
5
+ } from "./chunk-ZFEV22KC.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  sampleWSImagesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  ChatPayload,
3
3
  validChatRequest,
4
4
  validChatResponse
5
- } from "./chunk-OAETETAO.js";
5
+ } from "./chunk-TR2MSSP3.js";
6
6
  import "./chunk-YNHC5SXO.js";
7
7
  export {
8
8
  ChatPayload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.163.1",
3
+ "version": "2.164.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
@@ -1050,6 +1050,9 @@ export type WSImages = {
1050
1050
  /** dynamically added on launch with built in logic */
1051
1051
  deleteWSIAnnotation?: (annotation: DeleteWSIAnnotationRequest) => Promise<void>
1052
1052
 
1053
+ /** dynamically added on launch with built in logic - returns all image filenames for a project */
1054
+ getAllWSImages?: (projectId: string) => Promise<string[]>
1055
+
1053
1056
  /** either ds supplied or dynamically added on launch with built in logic (retrieve the sample list from the wsimages table) */
1054
1057
  getSamples?: () => Promise<Array<WSISample>>
1055
1058
  /** either ds supplied or dynamically added on launch with built in logic */
@@ -21,6 +21,7 @@ export interface TileSelection {
21
21
 
22
22
  export interface Annotation extends TileSelection {
23
23
  class: string
24
+ timestamp?: string
24
25
  }
25
26
 
26
27
  export interface Prediction extends TileSelection {
@@ -40,7 +40,7 @@ export type plot = {
40
40
  }
41
41
 
42
42
  export type ChatResponse = {
43
- type: 'html' | 'plot'
43
+ type: 'html' | 'plot' | 'json'
44
44
  /** when type=html, this value is set meaning server returns a chat response */
45
45
  html?: string
46
46
  /** when type=plot. value is json */
package/src/terms/q.ts CHANGED
@@ -22,7 +22,7 @@ export type CategoricalBaseQ = MinBaseQ & {
22
22
  mode?: 'discrete' | 'binary'
23
23
  }
24
24
 
25
- export type RawValuesQ = MinBaseQ & { type?: 'values'; mode?: 'binary' }
25
+ export type RawValuesQ = MinBaseQ & { type?: 'values'; mode?: 'binary' | 'discrete' }
26
26
 
27
27
  export type RawPredefinedGroupsetQ = MinBaseQ & {
28
28
  type: 'predefined-groupset'