@sjcrh/proteinpaint-types 2.179.0 → 2.180.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.179.0",
3
+ "version": "2.180.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
@@ -1471,6 +1471,8 @@ export type Termdb = {
1471
1471
  }
1472
1472
  /** if true, backend is allowed to send sample names to client in charts */
1473
1473
  displaySampleIds?: (clientAuthResult: any) => boolean
1474
+ /** get samples that match supplied filter */
1475
+ getSamples?: (filter: any, ds: any) => Promise<Set<any>>
1474
1476
  converSampleIds?: boolean
1475
1477
  alwaysShowBranchTerms?: boolean
1476
1478
  minimumSampleAllowed4filter?: number
@@ -1647,6 +1649,8 @@ keep this setting here for reason of:
1647
1649
  isTermVisible?: (clientAuthResult: any, ids: string) => boolean
1648
1650
  hiddenIds?: string[]
1649
1651
  getAdditionalFilter?: (__protected__: any, term: any) => Filter | undefined
1652
+ //Returns allowed values for role-restricted terms. Returns null for no restriction
1653
+ getRestrictedValues?: (clientAuthResult: any, termId: string) => (string | number)[] | null
1650
1654
  /** collections of dictionary terms (numeric or categorical) that are related and can be used together in some plots */
1651
1655
  termCollections?: TermCollection[]
1652
1656
  }
@@ -2052,7 +2056,10 @@ export type Mds3 = BaseMds & {
2052
2056
  // !!! TODO: improve these type definitions below !!!
2053
2057
  serverconfigFeatures?: any
2054
2058
  /** a dataset may supply custom URL host and headers to use when making external API requests, such as for GDC */
2055
- getHostHeaders?: (q?: any) => {
2059
+ getHostHeaders?: (
2060
+ q?: any,
2061
+ overrides?: { [key: string]: string }
2062
+ ) => {
2056
2063
  host: {
2057
2064
  [apiStyle: string]: string
2058
2065
  }
@@ -2060,7 +2067,7 @@ export type Mds3 = BaseMds & {
2060
2067
  [field: string]: string
2061
2068
  }
2062
2069
  }
2063
- /** a dataset may track req.headers based on an abort signal and/or filter0 that was created for the req;
2070
+ /** a dataset may track req.headers based on a req.query, abort signal, and/or filter0;
2064
2071
  * this tracking is necessary since the req.headers is not necessarily passed through all to downstream code
2065
2072
  * when processing external API-based dataset data, such as for GDC, but req.query.__abortSignal and filter0
2066
2073
  * both much more likely to be passed as-is and make it to when `getHostHeaders()` is called */
@@ -40,6 +40,11 @@ export type LlmConfig = {
40
40
  verbose?: boolean
41
41
  }
42
42
 
43
+ export interface GeneDataTypeResult {
44
+ gene: string
45
+ dataType: string
46
+ }
47
+
43
48
  export type ChatResponse = TextResponse | HtmlResponse | PlotResponse
44
49
 
45
50
  export const ChatPayload: RoutePayload = {
@@ -115,7 +120,7 @@ export type plot_type = {
115
120
  type: 'plot'
116
121
  /** The type of plot to be displayed on the UI.
117
122
  * Standard categories are listed; datasets may define additional custom categories. */
118
- plot: 'summary' | 'dge' | 'survival' | 'matrix' | 'sampleScatter' | 'hierCluster'
123
+ plot: 'summary' | 'dge' | 'survival' | 'matrix' | 'sampleScatter' | 'hierCluster' | 'lollipop'
119
124
  }
120
125
 
121
126
  export type resource_type = {
@@ -132,7 +137,7 @@ export type none_type = {
132
137
  export type QueryClassification = { type: 'plot' } | { type: 'notplot' }
133
138
 
134
139
  /** Specific plot type returned by classifyPlotType in plot.ts */
135
- export type PlotType = 'summary' | 'dge' | 'survival' | 'matrix' | 'samplescatter' | 'hiercluster'
140
+ export type PlotType = 'summary' | 'dge' | 'survival' | 'matrix' | 'samplescatter' | 'hiercluster' | 'lollipop'
136
141
 
137
142
  export type DEType = {
138
143
  /** Name of group1 which is an array of filter terms */