gps-global-types 1.0.15 → 1.0.18
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/mst.types.tsx +14 -10
- package/package.json +1 -1
package/mst.types.tsx
CHANGED
|
@@ -40,14 +40,14 @@ export type CustomDict = Record<ObjectId, CustomDictEntry>
|
|
|
40
40
|
|
|
41
41
|
export interface LatestNodes { armordCultureDate: Date | string, isos: any[], _id: ObjectId[] }
|
|
42
42
|
export interface MSTGraph {
|
|
43
|
-
name?:string,
|
|
44
|
-
snapshotData?:SnapshotType
|
|
43
|
+
name?: string,
|
|
44
|
+
snapshotData?: SnapshotType
|
|
45
45
|
nodes: any //todo:temp//NodeType[] // core parameter of d3tree.js . keeps all isolates collection data
|
|
46
46
|
links: EdgeType[] // core parameter of d3tree.js
|
|
47
47
|
latest: LatestNodes // earliest node for easy toggling
|
|
48
48
|
custom: CustomDict // . I KNOW THIS IS DUMB but from user's pov it results in seamless color transitions across pages
|
|
49
49
|
legend: MSTLegend // saves legend configs across all color fields
|
|
50
|
-
missing:Record<string,any>[] //todo: isolate.types. global
|
|
50
|
+
missing: Record<string, any>[] //todo: isolate.types. global
|
|
51
51
|
}interface FlashTable {
|
|
52
52
|
"_id": ObjectId,
|
|
53
53
|
"MRSN ID¹": mrsnId,
|
|
@@ -97,7 +97,7 @@ export interface LegendBullet { //or custom upload data
|
|
|
97
97
|
label: string
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
export type MSTLegend = Partial<Record<colorKey|'beforeAndAfter'|'custom color', LegendBullet[]>> & Partial<Record<dateKey, 'date'>>;
|
|
100
|
+
export type MSTLegend = Partial<Record<colorKey | 'beforeAndAfter' | 'custom color', LegendBullet[]>> & Partial<Record<dateKey, 'date'>>;
|
|
101
101
|
// & { 'beforeAndAfter': [{ color: '#666666', label: 'Before ' }, { color: '#4a64aa', label: 'After ' }] }
|
|
102
102
|
|
|
103
103
|
|
|
@@ -152,14 +152,18 @@ export interface SnapshotType {
|
|
|
152
152
|
// module.exports = { MSTGraph, MSTLegend, NodeType,EdgeType,Hex, ColorField,LabelField}
|
|
153
153
|
// exports.unused = {};
|
|
154
154
|
|
|
155
|
+
export type QueryFields = keyof typeof IsolateFields | 'cluster' | `cluster.${keyof typeof ClusterFields}` | keyof typeof ClusterFields
|
|
156
|
+
|
|
155
157
|
|
|
156
158
|
export interface getAClusterBody {
|
|
157
159
|
//theres 4 ways of calling this function
|
|
158
160
|
//1. through a BAQ involving iso and/or cluster fields
|
|
159
|
-
|
|
160
|
-
clusterQuery?:Partial<Record<keyof typeof ClusterFields, Object>>, //2. selecting a cluster on /clusters (sending cluster _id)
|
|
161
|
-
fuzzy?:number, //3. by recalculating a previous query
|
|
162
|
-
neighbors?:number, // (fuzzy and neighbors are only available on recalc)
|
|
163
|
-
snapshotData?:SnapshotType //4. uploading a snapshot. (should i extrapolate ),
|
|
161
|
+
query?: Partial<Record<QueryFields, Object>>,
|
|
162
|
+
// clusterQuery?:Partial<Record<keyof typeof ClusterFields, Object>>, //2. selecting a cluster on /clusters (sending cluster _id)
|
|
163
|
+
fuzzy?: number, //3. by recalculating a previous query
|
|
164
|
+
neighbors?: number, // (fuzzy and neighbors are only available on recalc)
|
|
165
|
+
snapshotData?: SnapshotType //4. uploading a snapshot. (should i extrapolate ),
|
|
166
|
+
type: 'clusterId' | 'recalc' | 'BAQ' | 'snapshot' //for backend readability
|
|
167
|
+
|
|
164
168
|
|
|
165
|
-
|
|
169
|
+
}
|