@sjcrh/proteinpaint-types 2.137.2 → 2.137.3

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.
Files changed (33) hide show
  1. package/dist/brainImaging.js +1 -1
  2. package/dist/{chunk-SUL2XLYM.js → chunk-2YASZMH3.js} +665 -229
  3. package/dist/{chunk-6LRQCE3E.js → chunk-6HAS5WRS.js} +243 -41
  4. package/dist/{chunk-6H6TQ3MA.js → chunk-7FTOFTNK.js} +243 -41
  5. package/dist/{chunk-PAQX4HYF.js → chunk-AL4VFH5I.js} +520 -286
  6. package/dist/{chunk-7YFANJ2A.js → chunk-CC3OBRKE.js} +479 -245
  7. package/dist/{chunk-FMSTAFII.js → chunk-DD2RLZHC.js} +243 -41
  8. package/dist/{chunk-YW6G7WTF.js → chunk-GGZUN2GE.js} +5 -1
  9. package/dist/{chunk-CBPDONEQ.js → chunk-HCBXL376.js} +494 -246
  10. package/dist/{chunk-MDPMNCMV.js → chunk-HWRFIXJA.js} +480 -246
  11. package/dist/{chunk-IE3MSHTB.js → chunk-I2BMMKPN.js} +480 -246
  12. package/dist/{chunk-QCGBPQ7S.js → chunk-JKBVXIRQ.js} +247 -45
  13. package/dist/{chunk-657TS66W.js → chunk-LTGT4NK4.js} +713 -277
  14. package/dist/{chunk-YGOZU46P.js → chunk-S2M5SN7Q.js} +243 -41
  15. package/dist/correlationVolcano.js +1 -1
  16. package/dist/index.js +13 -13
  17. package/dist/termdb.boxplot.js +1 -1
  18. package/dist/termdb.categories.js +1 -1
  19. package/dist/termdb.cluster.js +1 -1
  20. package/dist/termdb.descrstats.js +1 -1
  21. package/dist/termdb.numericcategories.js +1 -1
  22. package/dist/termdb.percentile.js +1 -1
  23. package/dist/termdb.singleSampleMutation.js +1 -1
  24. package/dist/termdb.termsbyids.js +1 -1
  25. package/dist/termdb.topTermsByType.js +1 -1
  26. package/dist/termdb.topVariablyExpressedGenes.js +1 -1
  27. package/dist/termdb.violin.js +1 -1
  28. package/package.json +1 -1
  29. package/src/dataset.ts +5 -7
  30. package/src/routes/termdb.categories.ts +5 -0
  31. package/src/routes/termdb.descrstats.ts +1 -0
  32. package/src/routes/termdb.singleSampleMutation.ts +3 -1
  33. package/src/terms/geneVariant.ts +11 -3
@@ -2,7 +2,7 @@ import {
2
2
  termdbCategoriesPayload,
3
3
  validCategoriesRequest,
4
4
  validCategoriesResponse
5
- } from "./chunk-CBPDONEQ.js";
5
+ } from "./chunk-HCBXL376.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbCategoriesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbClusterPayload,
3
3
  validTermdbClusterRequest,
4
4
  validTermdbClusterResponse
5
- } from "./chunk-657TS66W.js";
5
+ } from "./chunk-LTGT4NK4.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbClusterPayload,
@@ -2,7 +2,7 @@ import {
2
2
  descrStatsPayload,
3
3
  validDescrStatsRequest,
4
4
  validDescrStatsResponse
5
- } from "./chunk-IE3MSHTB.js";
5
+ } from "./chunk-I2BMMKPN.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  descrStatsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  numericCategoriesPayload,
3
3
  validNumericCategoriesRequest,
4
4
  validNumericCategoriesResponse
5
- } from "./chunk-FMSTAFII.js";
5
+ } from "./chunk-DD2RLZHC.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  numericCategoriesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  percentilePayload,
3
3
  validPercentileRequest,
4
4
  validPercentileResponse
5
- } from "./chunk-6LRQCE3E.js";
5
+ } from "./chunk-6HAS5WRS.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  percentilePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbSingleSampleMutationPayload,
3
3
  validTermdbSingleSampleMutationRequest,
4
4
  validTermdbSingleSampleMutationResponse
5
- } from "./chunk-YW6G7WTF.js";
5
+ } from "./chunk-GGZUN2GE.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbSingleSampleMutationPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termsByIdsPayload,
3
3
  validTermsByIdsRequest,
4
4
  validTermsByIdsResponse
5
- } from "./chunk-7YFANJ2A.js";
5
+ } from "./chunk-CC3OBRKE.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termsByIdsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopTermsByTypePayload,
3
3
  validTermdbTopTermsByTypeRequest,
4
4
  validTermdbTopTermsByTypeResponse
5
- } from "./chunk-SUL2XLYM.js";
5
+ } from "./chunk-2YASZMH3.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbTopTermsByTypePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopVariablyExpressedGenesPayload,
3
3
  validTermdbTopVariablyExpressedGenesRequest,
4
4
  validTermdbTopVariablyExpressedGenesResponse
5
- } from "./chunk-6H6TQ3MA.js";
5
+ } from "./chunk-7FTOFTNK.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbTopVariablyExpressedGenesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  validViolinRequest,
3
3
  validViolinResponse,
4
4
  violinPayload
5
- } from "./chunk-YGOZU46P.js";
5
+ } from "./chunk-S2M5SN7Q.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  validViolinRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.137.2",
3
+ "version": "2.137.3",
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
@@ -1363,7 +1363,7 @@ if missing, name is value of m[url.namekey], as used in url itself (e.g. snp rsi
1363
1363
  }
1364
1364
 
1365
1365
  /*** type of ds.cohort.termdb{} ***/
1366
- type Termdb = {
1366
+ export type Termdb = {
1367
1367
  /** Terms */
1368
1368
  termIds?: TermIds
1369
1369
  /** if true, backend is allowed to send sample names to client in charts */
@@ -1517,15 +1517,13 @@ keep this setting here for reason of:
1517
1517
  /** colors for a category multivalues */
1518
1518
  [index: string]: { [index: string]: string }
1519
1519
  }
1520
- /** terms are shown in the dictionary based on term and user role.
1521
- */
1522
- isTermVisible?: (clientAuthResult: any, id: string) => boolean
1523
- /** when ds supports chart types e.g. summarizeMutationDiagnosis, this setting is required to supply a dict term to populate the chart ui
1524
- */
1525
1520
  defaultTw4correlationPlot?: {
1526
1521
  /** key is string as disease/survial etc, value is tw */
1527
1522
  [index: string]: Tw
1528
1523
  }
1524
+ //terms are shown in the dictionary based on term and user role.
1525
+ isTermVisible?: (clientAuthResult: any, ids: string) => boolean
1526
+ getAdditionalFilter?: (clientAuthResult: any, term: any) => Filter | undefined
1529
1527
  }
1530
1528
 
1531
1529
  type SampleType = {
@@ -1548,7 +1546,7 @@ type Tw = {
1548
1546
  /** short hand for using either id (dict term) or term{} */
1549
1547
  id?: string
1550
1548
  term?: object
1551
- q: object
1549
+ q: unknown
1552
1550
  /** quick fix for generating URL links in mds3 tk sample table! adhoc design. may move to tw.term.baseURL and not specific to mds3 tk
1553
1551
  */
1554
1552
  baseURL?: string
@@ -14,6 +14,11 @@ export type CategoriesRequest = {
14
14
  currentGeneNames?: string[]
15
15
  /** optional property added by mds3 tk, to limit to cases mutated in this region */
16
16
  rglst?: any
17
+ __protected__?: {
18
+ sessionId?: string
19
+ clientAuthResults?: any
20
+ ignoredTermIds?: any
21
+ }
17
22
  }
18
23
 
19
24
  interface Entries {
@@ -17,6 +17,7 @@ export type DescrStatsRequest = {
17
17
  filter?: Filter
18
18
  /** optional gdc filter */
19
19
  filter0?: any
20
+ __protected__?: any //reuse definition from termdb.matrix.ts!!!
20
21
  }
21
22
 
22
23
  interface entries {
@@ -14,7 +14,7 @@ type ValidResponse = {
14
14
  mlst: object[]
15
15
  /** total number of items for each dt, useful to indicate snvindel limited to 10k for a hypermutator */
16
16
  dt2total?: { dt: number; total: number }[]
17
- /** alternative data by dt
17
+ /** this declares alternative data for some dt, e.g. a gdc case has cnv results from both snp array and wgs
18
18
  key: dt value
19
19
  value: array of objects, each is a distinct set of data points for this dt
20
20
  on ui, selecting an object will allow to show this data in disco plot
@@ -26,6 +26,8 @@ type ValidResponse = {
26
26
  nameHtml?: string
27
27
  /** name in text */
28
28
  name?: string
29
+ /** one set of data must have this flag set to true to indicate its data is already present in ValidResponse.mlst */
30
+ inuse?: boolean
29
31
  /** required list of events from this data */
30
32
  mlst: object[]
31
33
  }[]
@@ -20,7 +20,7 @@ export type GvCustomGsQ = GvBaseQ & { type: 'custom-groupset'; customset: BaseGr
20
20
  export type GvQ = GvValuesQ | GvPredefinedGsQ | GvCustomGsQ
21
21
 
22
22
  // term types
23
- export type GvGene = {
23
+ type Gene = {
24
24
  kind: 'gene'
25
25
  gene: string
26
26
  // chr,start,stop should exist together as a separate type called
@@ -31,14 +31,22 @@ export type GvGene = {
31
31
  stop?: number
32
32
  }
33
33
 
34
- export type GvCoord = {
34
+ type Coord = {
35
35
  kind: 'coord'
36
36
  chr: string
37
37
  start: number
38
38
  stop: number
39
39
  }
40
40
 
41
- type GvBaseTerm = BaseTerm & { type: 'geneVariant' } & (GvGene | GvCoord)
41
+ type GvGeneTerm = BaseTerm & (Gene | Coord)
42
+
43
+ // including (Gene | Coord) for backwards compatibility
44
+ // with older geneVariant term structure
45
+ type GvBaseTerm = BaseTerm &
46
+ (Gene | Coord) & {
47
+ type: 'geneVariant'
48
+ genes: GvGeneTerm[]
49
+ }
42
50
 
43
51
  export type RawGvTerm = GvBaseTerm & {
44
52
  groupsetting?: TermGroupSetting