@milaboratories/pl-model-common 1.15.8 → 1.15.9

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": "@milaboratories/pl-model-common",
3
- "version": "1.15.8",
3
+ "version": "1.15.9",
4
4
  "description": "Platforma SDK Model",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "eslint": "^9.25.1",
26
- "typescript": "~5.5.4",
26
+ "typescript": "~5.6.3",
27
27
  "vite": "^6.3.5",
28
28
  "vitest": "^2.1.9",
29
29
  "@milaboratories/build-configs": "1.0.4",
@@ -339,6 +339,9 @@ export interface PTableDef<Col> {
339
339
  /** Join tree to populate the PTable */
340
340
  readonly src: JoinEntry<Col>;
341
341
 
342
+ /** Partition filters */
343
+ readonly partitionFilters: PTableRecordSingleValueFilterV2[];
344
+
342
345
  /** Record filters */
343
346
  readonly filters: PTableRecordFilter[];
344
347
 
@@ -347,7 +350,16 @@ export interface PTableDef<Col> {
347
350
  }
348
351
 
349
352
  /** Request to create and retrieve entirety of data of PTable. */
350
- export type CalculateTableDataRequest<Col> = PTableDef<Col>;
353
+ export type CalculateTableDataRequest<Col> = {
354
+ /** Join tree to populate the PTable */
355
+ readonly src: JoinEntry<Col>;
356
+
357
+ /** Record filters */
358
+ readonly filters: PTableRecordFilter[];
359
+
360
+ /** Table sorting */
361
+ readonly sorting: PTableSorting[];
362
+ };
351
363
 
352
364
  /** Response for {@link CalculateTableDataRequest} */
353
365
  export type CalculateTableDataResponse = FullPTableColumnData[];
@@ -26,3 +26,18 @@ export type PTableColumnIdColumn = {
26
26
 
27
27
  /** Unified PTable column identifier */
28
28
  export type PTableColumnId = PTableColumnIdAxis | PTableColumnIdColumn;
29
+
30
+ export function getPTableColumnId(spec: PTableColumnSpec): PTableColumnId {
31
+ switch (spec.type) {
32
+ case 'axis':
33
+ return {
34
+ type: 'axis',
35
+ id: spec.id,
36
+ };
37
+ case 'column':
38
+ return {
39
+ type: 'column',
40
+ id: spec.id,
41
+ };
42
+ }
43
+ }