@milaboratories/pl-model-middle-layer 1.7.37 → 1.7.39
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/dist/pframe/internal_api/api_read.d.ts +6 -4
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
- package/dist/pframe/internal_api/pframe.d.ts +2 -2
- package/dist/pframe/internal_api/table.d.ts +15 -6
- package/dist/pframe/internal_api/table.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/pframe/internal_api/api_read.ts +9 -4
- package/src/pframe/internal_api/pframe.ts +2 -2
- package/src/pframe/internal_api/table.ts +16 -8
|
@@ -2,9 +2,9 @@ import { FindColumnsRequest, FindColumnsResponse } from './find_columns';
|
|
|
2
2
|
import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from './delete_column';
|
|
3
3
|
import { PColumnInfo, PColumnSpec, PObjectId, UniqueValuesRequest, UniqueValuesResponse } from '@milaboratories/pl-model-common';
|
|
4
4
|
import { CreateTableRequestV3 } from './create_table';
|
|
5
|
-
import {
|
|
5
|
+
import { PTableV5 } from './table';
|
|
6
6
|
/** Read interface exposed by PFrames library */
|
|
7
|
-
export interface
|
|
7
|
+
export interface PFrameReadAPIV7 {
|
|
8
8
|
/**
|
|
9
9
|
* Finds columns given filtering criteria on column name, annotations etc.
|
|
10
10
|
* and a set of qualified axes specs to find only columns with compatible
|
|
@@ -21,8 +21,10 @@ export interface PFrameReadAPIV6 {
|
|
|
21
21
|
/** Retrieve information about all columns currently added to the PFrame */
|
|
22
22
|
listColumns(): Promise<PColumnInfo[]>;
|
|
23
23
|
/** Calculates data for the table and returns an object to access it */
|
|
24
|
-
createTable(request: CreateTableRequestV3
|
|
24
|
+
createTable(request: CreateTableRequestV3): PTableV5;
|
|
25
25
|
/** Calculate set of unique values for a specific axis for the filtered set of records */
|
|
26
|
-
getUniqueValues(request: UniqueValuesRequest,
|
|
26
|
+
getUniqueValues(request: UniqueValuesRequest, ops?: {
|
|
27
|
+
signal?: AbortSignal;
|
|
28
|
+
}): Promise<UniqueValuesResponse>;
|
|
27
29
|
}
|
|
28
30
|
//# sourceMappingURL=api_read.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_read.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/api_read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAClG,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,gDAAgD;AAChD,MAAM,WAAW,eAAe;IAC9B;;;;;;;SAOK;IACL,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEvE,mCAAmC;IACnC,YAAY,CAAC,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;IAEhG,kCAAkC;IAClC,aAAa,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzD,2EAA2E;IAC3E,WAAW,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEtC,uEAAuE;IACvE,WAAW,CAAC,OAAO,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"api_read.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/api_read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAClG,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,gDAAgD;AAChD,MAAM,WAAW,eAAe;IAC9B;;;;;;;SAOK;IACL,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEvE,mCAAmC;IACnC,YAAY,CAAC,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;IAEhG,kCAAkC;IAClC,aAAa,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzD,2EAA2E;IAC3E,WAAW,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEtC,uEAAuE;IACvE,WAAW,CAAC,OAAO,EAAE,oBAAoB,GAAG,QAAQ,CAAC;IAErD,yFAAyF;IACzF,eAAe,CACb,OAAO,EAAE,mBAAmB,EAC5B,GAAG,CAAC,EAAE;QACJ,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,GACA,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAClC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PFrameFactoryAPI } from './api_factory';
|
|
2
|
-
import {
|
|
2
|
+
import { PFrameReadAPIV7 } from './api_read';
|
|
3
3
|
export type Logger = (level: 'info' | 'warn' | 'error', message: string) => void;
|
|
4
|
-
export interface
|
|
4
|
+
export interface PFrameV7 extends PFrameFactoryAPI, PFrameReadAPIV7 {
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=pframe.d.ts.map
|
|
@@ -5,9 +5,7 @@ import { PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableShape, PTab
|
|
|
5
5
|
* PTable can be thought as having a composite primary key, consisting of axes,
|
|
6
6
|
* and a set of data columns derived from PColumn values.
|
|
7
7
|
* */
|
|
8
|
-
export interface
|
|
9
|
-
/** Unified table shape */
|
|
10
|
-
getShape(): PTableShape;
|
|
8
|
+
export interface PTableV5 {
|
|
11
9
|
/**
|
|
12
10
|
* Returns ordered array of table axes specs (primary key "columns" in SQL
|
|
13
11
|
* terms) and data column specs (regular "columns" in SQL terms).
|
|
@@ -20,19 +18,30 @@ export interface PTableV4 {
|
|
|
20
18
|
getSpec(): PTableColumnSpec[];
|
|
21
19
|
/** Transforms unified column identifiers into unified indices of columns. */
|
|
22
20
|
getColumnIndices(columnIds: PTableColumnId[]): number[];
|
|
21
|
+
/**
|
|
22
|
+
* Unified table shape
|
|
23
|
+
* Warning: This call materializes the join.
|
|
24
|
+
*/
|
|
25
|
+
getShape(ops?: {
|
|
26
|
+
signal?: AbortSignal;
|
|
27
|
+
}): Promise<PTableShape>;
|
|
23
28
|
/**
|
|
24
29
|
* Retrieve the data from the table. To retrieve only data required, it can be
|
|
25
30
|
* sliced both horizontally ({@link columnIndices}) and vertically
|
|
26
31
|
* ({@link range}).
|
|
32
|
+
* This call materializes the join.
|
|
27
33
|
*
|
|
28
34
|
* @param columnIndices unified indices of columns to be retrieved
|
|
29
35
|
* @param range optionally limit the range of records to retrieve
|
|
30
36
|
* */
|
|
31
|
-
getData(columnIndices: number[],
|
|
37
|
+
getData(columnIndices: number[], ops?: {
|
|
38
|
+
range?: TableRange;
|
|
39
|
+
signal?: AbortSignal;
|
|
40
|
+
}): Promise<PTableVector[]>;
|
|
32
41
|
/** Filters the table and returns new PTable instance */
|
|
33
|
-
filter(request: PTableRecordFilter[]
|
|
42
|
+
filter(request: PTableRecordFilter[]): PTableV5;
|
|
34
43
|
/** Sorts the table and returns new PTable instance. */
|
|
35
|
-
sort(request: PTableSorting[]
|
|
44
|
+
sort(request: PTableSorting[]): PTableV5;
|
|
36
45
|
/** Deallocates all underlying resources */
|
|
37
46
|
dispose(): void;
|
|
38
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/table.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,UAAU,EACX,MAAM,iCAAiC,CAAC;AAEzC;;;;;KAKK;AACL,MAAM,WAAW,QAAQ;IACvB
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/table.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,UAAU,EACX,MAAM,iCAAiC,CAAC;AAEzC;;;;;KAKK;AACL,MAAM,WAAW,QAAQ;IACvB;;;;;;;;SAQK;IACL,OAAO,IAAI,gBAAgB,EAAE,CAAC;IAE9B,6EAA6E;IAC7E,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAAC;IAExD;;;OAGG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE;QACb,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzB;;;;;;;;SAQK;IACL,OAAO,CACL,aAAa,EAAE,MAAM,EAAE,EACvB,GAAG,CAAC,EAAE;QACJ,KAAK,CAAC,EAAE,UAAU,CAAC;QACnB,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,GACA,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAE3B,wDAAwD;IACxD,MAAM,CAAC,OAAO,EAAE,kBAAkB,EAAE,GAAG,QAAQ,CAAC;IAEhD,uDAAuD;IACvD,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,QAAQ,CAAC;IAEzC,2CAA2C;IAC3C,OAAO,IAAI,IAAI,CAAC;CACjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-model-middle-layer",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.39",
|
|
4
4
|
"description": "Common model between middle layer and non-block UI code",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"./src/**/*"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"remeda": "^2.
|
|
20
|
+
"remeda": "^2.22.6",
|
|
21
21
|
"zod": "~3.23.8",
|
|
22
22
|
"utility-types": "^3.11.0",
|
|
23
23
|
"@milaboratories/pl-model-common": "^1.15.5"
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
UniqueValuesResponse
|
|
9
9
|
} from '@milaboratories/pl-model-common';
|
|
10
10
|
import { CreateTableRequestV3 } from './create_table';
|
|
11
|
-
import {
|
|
11
|
+
import { PTableV5 } from './table';
|
|
12
12
|
|
|
13
13
|
/** Read interface exposed by PFrames library */
|
|
14
|
-
export interface
|
|
14
|
+
export interface PFrameReadAPIV7 {
|
|
15
15
|
/**
|
|
16
16
|
* Finds columns given filtering criteria on column name, annotations etc.
|
|
17
17
|
* and a set of qualified axes specs to find only columns with compatible
|
|
@@ -32,8 +32,13 @@ export interface PFrameReadAPIV6 {
|
|
|
32
32
|
listColumns(): Promise<PColumnInfo[]>;
|
|
33
33
|
|
|
34
34
|
/** Calculates data for the table and returns an object to access it */
|
|
35
|
-
createTable(request: CreateTableRequestV3
|
|
35
|
+
createTable(request: CreateTableRequestV3): PTableV5;
|
|
36
36
|
|
|
37
37
|
/** Calculate set of unique values for a specific axis for the filtered set of records */
|
|
38
|
-
getUniqueValues(
|
|
38
|
+
getUniqueValues(
|
|
39
|
+
request: UniqueValuesRequest,
|
|
40
|
+
ops?: {
|
|
41
|
+
signal?: AbortSignal,
|
|
42
|
+
}
|
|
43
|
+
): Promise<UniqueValuesResponse>;
|
|
39
44
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { PFrameFactoryAPI } from './api_factory';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PFrameReadAPIV7 } from './api_read';
|
|
3
3
|
|
|
4
4
|
export type Logger = (
|
|
5
5
|
level: 'info' | 'warn' | 'error',
|
|
6
6
|
message: string
|
|
7
7
|
) => void;
|
|
8
8
|
|
|
9
|
-
export interface
|
|
9
|
+
export interface PFrameV7 extends PFrameFactoryAPI, PFrameReadAPIV7 {}
|
|
@@ -14,10 +14,7 @@ import {
|
|
|
14
14
|
* PTable can be thought as having a composite primary key, consisting of axes,
|
|
15
15
|
* and a set of data columns derived from PColumn values.
|
|
16
16
|
* */
|
|
17
|
-
export interface
|
|
18
|
-
/** Unified table shape */
|
|
19
|
-
getShape(): PTableShape;
|
|
20
|
-
|
|
17
|
+
export interface PTableV5 {
|
|
21
18
|
/**
|
|
22
19
|
* Returns ordered array of table axes specs (primary key "columns" in SQL
|
|
23
20
|
* terms) and data column specs (regular "columns" in SQL terms).
|
|
@@ -32,25 +29,36 @@ export interface PTableV4 {
|
|
|
32
29
|
/** Transforms unified column identifiers into unified indices of columns. */
|
|
33
30
|
getColumnIndices(columnIds: PTableColumnId[]): number[];
|
|
34
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Unified table shape
|
|
34
|
+
* Warning: This call materializes the join.
|
|
35
|
+
*/
|
|
36
|
+
getShape(ops?: {
|
|
37
|
+
signal?: AbortSignal,
|
|
38
|
+
}): Promise<PTableShape>;
|
|
39
|
+
|
|
35
40
|
/**
|
|
36
41
|
* Retrieve the data from the table. To retrieve only data required, it can be
|
|
37
42
|
* sliced both horizontally ({@link columnIndices}) and vertically
|
|
38
43
|
* ({@link range}).
|
|
44
|
+
* This call materializes the join.
|
|
39
45
|
*
|
|
40
46
|
* @param columnIndices unified indices of columns to be retrieved
|
|
41
47
|
* @param range optionally limit the range of records to retrieve
|
|
42
48
|
* */
|
|
43
49
|
getData(
|
|
44
50
|
columnIndices: number[],
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
ops?: {
|
|
52
|
+
range?: TableRange,
|
|
53
|
+
signal?: AbortSignal,
|
|
54
|
+
},
|
|
47
55
|
): Promise<PTableVector[]>;
|
|
48
56
|
|
|
49
57
|
/** Filters the table and returns new PTable instance */
|
|
50
|
-
filter(request: PTableRecordFilter[]
|
|
58
|
+
filter(request: PTableRecordFilter[]): PTableV5;
|
|
51
59
|
|
|
52
60
|
/** Sorts the table and returns new PTable instance. */
|
|
53
|
-
sort(request: PTableSorting[]
|
|
61
|
+
sort(request: PTableSorting[]): PTableV5;
|
|
54
62
|
|
|
55
63
|
/** Deallocates all underlying resources */
|
|
56
64
|
dispose(): void;
|