@milaboratories/pl-model-middle-layer 1.28.0 → 1.29.1
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/block_meta/block_description.d.ts +2 -2
- package/dist/block_registry/overview.d.ts +18 -18
- package/dist/block_registry/registry_spec.d.ts +12 -12
- package/dist/pframe/internal_api/api_read.d.ts +6 -6
- package/dist/pframe/internal_api/index.d.ts +4 -4
- package/dist/pframe/internal_api/pframe.d.ts +9 -7
- package/dist/pframe/internal_api/pframe.d.ts.map +1 -1
- package/dist/pframe/internal_api/table.d.ts +12 -7
- package/dist/pframe/internal_api/table.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/pframe/internal_api/api_read.ts +5 -5
- package/src/pframe/internal_api/pframe.ts +8 -6
- package/src/pframe/internal_api/table.ts +11 -6
|
@@ -679,6 +679,7 @@ declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
679
679
|
};
|
|
680
680
|
title: string;
|
|
681
681
|
description: string;
|
|
682
|
+
url?: string | undefined;
|
|
682
683
|
longDescription?: {
|
|
683
684
|
type: "relative";
|
|
684
685
|
path: string;
|
|
@@ -710,7 +711,6 @@ declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
710
711
|
type: "absolute-file";
|
|
711
712
|
file: string;
|
|
712
713
|
} | undefined;
|
|
713
|
-
url?: string | undefined;
|
|
714
714
|
docs?: string | undefined;
|
|
715
715
|
support?: string | undefined;
|
|
716
716
|
tags?: string[] | undefined;
|
|
@@ -751,6 +751,7 @@ declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
751
751
|
};
|
|
752
752
|
title: string;
|
|
753
753
|
description: string;
|
|
754
|
+
url?: string | undefined;
|
|
754
755
|
longDescription?: string | {
|
|
755
756
|
type: "relative";
|
|
756
757
|
path: string;
|
|
@@ -782,7 +783,6 @@ declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
782
783
|
type: "absolute-file";
|
|
783
784
|
file: string;
|
|
784
785
|
} | undefined;
|
|
785
|
-
url?: string | undefined;
|
|
786
786
|
docs?: string | undefined;
|
|
787
787
|
support?: string | undefined;
|
|
788
788
|
tags?: string[] | undefined;
|
|
@@ -10006,28 +10006,28 @@ declare const RegistryStatus: z.ZodObject<{
|
|
|
10006
10006
|
status: "online" | "offline";
|
|
10007
10007
|
id: string;
|
|
10008
10008
|
spec: {
|
|
10009
|
+
type: "local-dev";
|
|
10010
|
+
path: string;
|
|
10011
|
+
} | {
|
|
10009
10012
|
type: "remote-v1";
|
|
10010
10013
|
url: string;
|
|
10011
10014
|
} | {
|
|
10012
10015
|
type: "remote-v2";
|
|
10013
10016
|
url: string;
|
|
10014
|
-
} | {
|
|
10015
|
-
type: "local-dev";
|
|
10016
|
-
path: string;
|
|
10017
10017
|
};
|
|
10018
10018
|
title?: string | undefined;
|
|
10019
10019
|
}, {
|
|
10020
10020
|
status: "online" | "offline";
|
|
10021
10021
|
id: string;
|
|
10022
10022
|
spec: {
|
|
10023
|
+
type: "local-dev";
|
|
10024
|
+
path: string;
|
|
10025
|
+
} | {
|
|
10023
10026
|
type: "remote-v1";
|
|
10024
10027
|
url: string;
|
|
10025
10028
|
} | {
|
|
10026
10029
|
type: "remote-v2";
|
|
10027
10030
|
url: string;
|
|
10028
|
-
} | {
|
|
10029
|
-
type: "local-dev";
|
|
10030
|
-
path: string;
|
|
10031
10031
|
};
|
|
10032
10032
|
title?: string | undefined;
|
|
10033
10033
|
}>;
|
|
@@ -10070,28 +10070,28 @@ declare const BlockPackListing: z.ZodObject<{
|
|
|
10070
10070
|
status: "online" | "offline";
|
|
10071
10071
|
id: string;
|
|
10072
10072
|
spec: {
|
|
10073
|
+
type: "local-dev";
|
|
10074
|
+
path: string;
|
|
10075
|
+
} | {
|
|
10073
10076
|
type: "remote-v1";
|
|
10074
10077
|
url: string;
|
|
10075
10078
|
} | {
|
|
10076
10079
|
type: "remote-v2";
|
|
10077
10080
|
url: string;
|
|
10078
|
-
} | {
|
|
10079
|
-
type: "local-dev";
|
|
10080
|
-
path: string;
|
|
10081
10081
|
};
|
|
10082
10082
|
title?: string | undefined;
|
|
10083
10083
|
}, {
|
|
10084
10084
|
status: "online" | "offline";
|
|
10085
10085
|
id: string;
|
|
10086
10086
|
spec: {
|
|
10087
|
+
type: "local-dev";
|
|
10088
|
+
path: string;
|
|
10089
|
+
} | {
|
|
10087
10090
|
type: "remote-v1";
|
|
10088
10091
|
url: string;
|
|
10089
10092
|
} | {
|
|
10090
10093
|
type: "remote-v2";
|
|
10091
10094
|
url: string;
|
|
10092
|
-
} | {
|
|
10093
|
-
type: "local-dev";
|
|
10094
|
-
path: string;
|
|
10095
10095
|
};
|
|
10096
10096
|
title?: string | undefined;
|
|
10097
10097
|
}>, "many">;
|
|
@@ -13197,14 +13197,14 @@ declare const BlockPackListing: z.ZodObject<{
|
|
|
13197
13197
|
status: "online" | "offline";
|
|
13198
13198
|
id: string;
|
|
13199
13199
|
spec: {
|
|
13200
|
+
type: "local-dev";
|
|
13201
|
+
path: string;
|
|
13202
|
+
} | {
|
|
13200
13203
|
type: "remote-v1";
|
|
13201
13204
|
url: string;
|
|
13202
13205
|
} | {
|
|
13203
13206
|
type: "remote-v2";
|
|
13204
13207
|
url: string;
|
|
13205
|
-
} | {
|
|
13206
|
-
type: "local-dev";
|
|
13207
|
-
path: string;
|
|
13208
13208
|
};
|
|
13209
13209
|
title?: string | undefined;
|
|
13210
13210
|
}[];
|
|
@@ -14246,14 +14246,14 @@ declare const BlockPackListing: z.ZodObject<{
|
|
|
14246
14246
|
status: "online" | "offline";
|
|
14247
14247
|
id: string;
|
|
14248
14248
|
spec: {
|
|
14249
|
+
type: "local-dev";
|
|
14250
|
+
path: string;
|
|
14251
|
+
} | {
|
|
14249
14252
|
type: "remote-v1";
|
|
14250
14253
|
url: string;
|
|
14251
14254
|
} | {
|
|
14252
14255
|
type: "remote-v2";
|
|
14253
14256
|
url: string;
|
|
14254
|
-
} | {
|
|
14255
|
-
type: "local-dev";
|
|
14256
|
-
path: string;
|
|
14257
14257
|
};
|
|
14258
14258
|
title?: string | undefined;
|
|
14259
14259
|
}[];
|
|
@@ -99,27 +99,27 @@ declare const RegistryEntry: z.ZodObject<{
|
|
|
99
99
|
}, "strip", z.ZodTypeAny, {
|
|
100
100
|
id: string;
|
|
101
101
|
spec: {
|
|
102
|
+
type: "local-dev";
|
|
103
|
+
path: string;
|
|
104
|
+
} | {
|
|
102
105
|
type: "remote-v1";
|
|
103
106
|
url: string;
|
|
104
107
|
} | {
|
|
105
108
|
type: "remote-v2";
|
|
106
109
|
url: string;
|
|
107
|
-
} | {
|
|
108
|
-
type: "local-dev";
|
|
109
|
-
path: string;
|
|
110
110
|
};
|
|
111
111
|
title?: string | undefined;
|
|
112
112
|
}, {
|
|
113
113
|
id: string;
|
|
114
114
|
spec: {
|
|
115
|
+
type: "local-dev";
|
|
116
|
+
path: string;
|
|
117
|
+
} | {
|
|
115
118
|
type: "remote-v1";
|
|
116
119
|
url: string;
|
|
117
120
|
} | {
|
|
118
121
|
type: "remote-v2";
|
|
119
122
|
url: string;
|
|
120
|
-
} | {
|
|
121
|
-
type: "local-dev";
|
|
122
|
-
path: string;
|
|
123
123
|
};
|
|
124
124
|
title?: string | undefined;
|
|
125
125
|
}>;
|
|
@@ -158,27 +158,27 @@ declare const RegistryList: z.ZodArray<z.ZodObject<{
|
|
|
158
158
|
}, "strip", z.ZodTypeAny, {
|
|
159
159
|
id: string;
|
|
160
160
|
spec: {
|
|
161
|
+
type: "local-dev";
|
|
162
|
+
path: string;
|
|
163
|
+
} | {
|
|
161
164
|
type: "remote-v1";
|
|
162
165
|
url: string;
|
|
163
166
|
} | {
|
|
164
167
|
type: "remote-v2";
|
|
165
168
|
url: string;
|
|
166
|
-
} | {
|
|
167
|
-
type: "local-dev";
|
|
168
|
-
path: string;
|
|
169
169
|
};
|
|
170
170
|
title?: string | undefined;
|
|
171
171
|
}, {
|
|
172
172
|
id: string;
|
|
173
173
|
spec: {
|
|
174
|
+
type: "local-dev";
|
|
175
|
+
path: string;
|
|
176
|
+
} | {
|
|
174
177
|
type: "remote-v1";
|
|
175
178
|
url: string;
|
|
176
179
|
} | {
|
|
177
180
|
type: "remote-v2";
|
|
178
181
|
url: string;
|
|
179
|
-
} | {
|
|
180
|
-
type: "local-dev";
|
|
181
|
-
path: string;
|
|
182
182
|
};
|
|
183
183
|
title?: string | undefined;
|
|
184
184
|
}>, "many">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PTableV11 } from "./table.js";
|
|
2
2
|
import { PTableId } from "./common.js";
|
|
3
3
|
import { DataQuery, DataQueryBooleanExpression, PObjectId, UniqueValuesResponse } from "@milaboratories/pl-model-common";
|
|
4
4
|
|
|
@@ -23,8 +23,8 @@ interface UniqueValuesRequestV2 {
|
|
|
23
23
|
readonly limit: number;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Read interface exposed by PFrames library. Returns the {@link
|
|
27
|
-
* table view,
|
|
26
|
+
* Read interface exposed by PFrames library. Returns the {@link PTableV11}
|
|
27
|
+
* table view, whose `export` takes a column-index → header map.
|
|
28
28
|
*
|
|
29
29
|
* Spec-side operations (finding columns, listing columns, retrieving
|
|
30
30
|
* column specs, computing axis integrations) are not part of this
|
|
@@ -33,14 +33,14 @@ interface UniqueValuesRequestV2 {
|
|
|
33
33
|
* `DataQuery`; `getUniqueValues` takes pre-resolved indices via
|
|
34
34
|
* {@link UniqueValuesRequestV2}.
|
|
35
35
|
*/
|
|
36
|
-
interface
|
|
36
|
+
interface PFrameReadAPIV14 {
|
|
37
37
|
/** Creates table from a pre-lowered data query. */
|
|
38
|
-
createTable(tableId: PTableId, dataQuery: DataQuery):
|
|
38
|
+
createTable(tableId: PTableId, dataQuery: DataQuery): PTableV11;
|
|
39
39
|
/** Calculate set of unique values for a specific axis for the filtered set of records. */
|
|
40
40
|
getUniqueValues(request: UniqueValuesRequestV2, ops?: {
|
|
41
41
|
signal?: AbortSignal;
|
|
42
42
|
}): Promise<UniqueValuesResponse>;
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
|
-
export {
|
|
45
|
+
export { PFrameReadAPIV14, UniqueValuesRequestV2 };
|
|
46
46
|
//# sourceMappingURL=api_read.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PTableV11 } from "./table.js";
|
|
2
2
|
import { AxisQualification, ColumnAxesWithQualifications, ConstantAxisFilter, Logger, PFrameId, PTableId } from "./common.js";
|
|
3
|
-
import {
|
|
3
|
+
import { PFrameReadAPIV14, UniqueValuesRequestV2 } from "./api_read.js";
|
|
4
4
|
import { BaseObjectStore, FileRange, FsStoreOptions, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions } from "./http_helpers.js";
|
|
5
5
|
import { AddColumnEntry, DataInfo, DataInfoExtension, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, SpecExtension } from "./api_factory.js";
|
|
6
6
|
import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
|
|
@@ -8,12 +8,12 @@ import { DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColu
|
|
|
8
8
|
import { FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit } from "./find_columns.js";
|
|
9
9
|
import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3 } from "./api_wasm.js";
|
|
10
10
|
import { ArtificialColumnJoinEntry, ColumnJoinEntry, CreateTableRequestV4, FullJoinV4, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, OuterJoinV4, SlicedColumnJoinEntry } from "./create_table.js";
|
|
11
|
-
import {
|
|
11
|
+
import { PFrameFactoryV7, PFrameOptionsV2, PFrameV16 } from "./pframe.js";
|
|
12
12
|
import { SingleAxisSelector as SingleAxisSelector$1 } from "@milaboratories/pl-model-common";
|
|
13
13
|
|
|
14
14
|
//#region src/pframe/internal_api/index.d.ts
|
|
15
15
|
declare namespace index_d_exports {
|
|
16
|
-
export { AddColumnEntry, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, LegacyQuery, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5,
|
|
16
|
+
export { AddColumnEntry, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, LegacyQuery, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, PFrameFactoryV7, PFrameId, PFrameOptionsV2, PFrameReadAPIV14, PFrameV16, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3, PTableId, PTableV11, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2 };
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
export { index_d_exports };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Logger, PFrameId } from "./common.js";
|
|
2
|
-
import {
|
|
2
|
+
import { PFrameReadAPIV14 } from "./api_read.js";
|
|
3
3
|
import { PFrameFactoryAPIV5 } from "./api_factory.js";
|
|
4
4
|
|
|
5
5
|
//#region src/pframe/internal_api/pframe.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Full PFrame surface — factory operations plus data-side reads. Exposes
|
|
8
|
-
* {@link
|
|
8
|
+
* {@link PFrameReadAPIV14}, whose tables' `export` takes a column-index →
|
|
9
|
+
* header map.
|
|
9
10
|
*/
|
|
10
|
-
interface
|
|
11
|
+
interface PFrameV16 extends PFrameFactoryAPIV5, PFrameReadAPIV14 {}
|
|
11
12
|
type PFrameOptionsV2 = {
|
|
12
13
|
/** PFrame ID for logging purposes */frameId: PFrameId; /** Path to directory where PFrame can create temporary files */
|
|
13
14
|
spillPath: string; /** Logger instance, no logging is performed when not provided */
|
|
@@ -15,14 +16,15 @@ type PFrameOptionsV2 = {
|
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
* PFrame management functions exposed by the PFrame module. Creates
|
|
18
|
-
* {@link
|
|
19
|
+
* {@link PFrameV16} instances, whose tables' `export` takes a
|
|
20
|
+
* column-index → header map.
|
|
19
21
|
*/
|
|
20
|
-
interface
|
|
22
|
+
interface PFrameFactoryV7 {
|
|
21
23
|
/**
|
|
22
24
|
* Create a new PFrame instance.
|
|
23
25
|
* @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
|
|
24
26
|
*/
|
|
25
|
-
createPFrame(options: PFrameOptionsV2):
|
|
27
|
+
createPFrame(options: PFrameOptionsV2): PFrameV16;
|
|
26
28
|
/**
|
|
27
29
|
* Dump active allocations from all PFrames instances in pprof format.
|
|
28
30
|
* The result of this function should be saved as `profile.pb.gz`.
|
|
@@ -33,5 +35,5 @@ interface PFrameFactoryV6 {
|
|
|
33
35
|
pprofDump: () => Promise<Uint8Array>;
|
|
34
36
|
}
|
|
35
37
|
//#endregion
|
|
36
|
-
export {
|
|
38
|
+
export { PFrameFactoryV7, PFrameOptionsV2, PFrameV16 };
|
|
37
39
|
//# sourceMappingURL=pframe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":";;;;;;AAUA;;;;UAAiB,SAAA,SAAkB,kBAAA,EAAoB,gBAAA;AAAA,KAE3C,eAAA;uCAEV,OAAA,EAAS,QAAA,EAAT;EAEA,SAAA;EAEA,MAAA,GAAS,MAAA;AAAA;;;AAQX;;;UAAiB,eAAA;EAKyB;;;;EAAxC,YAAA,CAAa,OAAA,EAAS,eAAA,GAAkB,SAAA;EAAxC;;;;;;;EASA,SAAA,QAAiB,OAAA,CAAQ,UAAA;AAAA"}
|
|
@@ -4,12 +4,15 @@ import { PTableShape, PTableVector, TableRange } from "@milaboratories/pl-model-
|
|
|
4
4
|
/**
|
|
5
5
|
* Table view returned by `createTable`.
|
|
6
6
|
*
|
|
7
|
+
* {@link PTableV11.export} takes a `headers` map (unified column index →
|
|
8
|
+
* header name) that both selects the columns to export and names them.
|
|
9
|
+
*
|
|
7
10
|
* PTable can be thought as having a composite primary key, consisting
|
|
8
11
|
* of axes, and a set of data columns derived from PColumn values.
|
|
9
12
|
* The table's column spec is owned by the caller — selector → index
|
|
10
13
|
* resolution runs on the caller side via WASM-spec.
|
|
11
14
|
*/
|
|
12
|
-
interface
|
|
15
|
+
interface PTableV11 extends Disposable {
|
|
13
16
|
/**
|
|
14
17
|
* Get PTable disk footprint in bytes.
|
|
15
18
|
*
|
|
@@ -45,25 +48,27 @@ interface PTableV10 extends Disposable {
|
|
|
45
48
|
signal?: AbortSignal;
|
|
46
49
|
}): Promise<PTableVector[]>;
|
|
47
50
|
/**
|
|
48
|
-
* Stream the
|
|
51
|
+
* Stream the sorted table to a file at `path`. The output format is
|
|
49
52
|
* selected from the file extension: `csv`, `tsv`, `parquet`, or `xlsx`.
|
|
50
53
|
* Writing is bounded-memory.
|
|
51
54
|
* This call materializes the join.
|
|
52
55
|
*
|
|
53
56
|
* @param path destination file path; its extension selects the format
|
|
54
|
-
* @param headers
|
|
55
|
-
* columns)
|
|
56
|
-
*
|
|
57
|
+
* @param headers map from unified column index (axes first, then data
|
|
58
|
+
* columns) to the header name to use for that column. Only the columns
|
|
59
|
+
* present as keys are exported, in ascending index order — the map both
|
|
60
|
+
* selects the columns and names them (the data layer is name-independent,
|
|
61
|
+
* so names are supplied by the caller).
|
|
57
62
|
*
|
|
58
63
|
* @remarks For `xlsx` the caller must ensure the row count is below Excel's
|
|
59
64
|
* 1,048,576-row per-sheet limit.
|
|
60
65
|
*/
|
|
61
|
-
export(path: string, headers:
|
|
66
|
+
export(path: string, headers: Record<number, string>, ops?: {
|
|
62
67
|
signal?: AbortSignal;
|
|
63
68
|
}): Promise<void>;
|
|
64
69
|
/** Deallocates all underlying resources */
|
|
65
70
|
dispose(): void;
|
|
66
71
|
}
|
|
67
72
|
//#endregion
|
|
68
|
-
export {
|
|
73
|
+
export { PTableV11 };
|
|
69
74
|
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","names":[],"sources":["../../../src/pframe/internal_api/table.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"table.d.ts","names":[],"sources":["../../../src/pframe/internal_api/table.ts"],"mappings":";;;;;AAaA;;;;;;;;;UAAiB,SAAA,SAAkB,UAAA;EAkCtB;;;;;;;;;;EAvBX,YAAA,CAAa,GAAA;IAAQ,gBAAA;IAA4B,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA;EAAA;;;;EAM1E,QAAA,CAAS,GAAA;IAAQ,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA,CAAQ,WAAA;EAWlD;;;;;;;;;EAAA,OAAA,CACE,aAAA,YACA,GAAA;IACE,KAAA,GAAQ,UAAA;IACR,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,YAAA;EAsBP;;;;;;;;;;;;;;;;EAJJ,MAAA,CACE,IAAA,UACA,OAAA,EAAS,MAAA,kBACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA;;EAGH,OAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-model-middle-layer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.1",
|
|
4
4
|
"description": "Common model between middle layer and non-block UI code",
|
|
5
5
|
"files": [
|
|
6
6
|
"./dist/**/*",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"utility-types": "^3.11.0",
|
|
22
22
|
"zod": "~3.25.76",
|
|
23
23
|
"@milaboratories/helpers": "1.14.2",
|
|
24
|
-
"@milaboratories/pl-model-common": "1.
|
|
24
|
+
"@milaboratories/pl-model-common": "1.45.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "~24.5.2",
|
|
28
28
|
"typescript": "~5.9.3",
|
|
29
|
-
"@milaboratories/
|
|
29
|
+
"@milaboratories/ts-configs": "1.2.3",
|
|
30
30
|
"@milaboratories/ts-builder": "1.5.0",
|
|
31
|
-
"@milaboratories/
|
|
31
|
+
"@milaboratories/build-configs": "2.0.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "ts-builder build --target node",
|
|
@@ -4,7 +4,7 @@ import type {
|
|
|
4
4
|
DataQuery,
|
|
5
5
|
DataQueryBooleanExpression,
|
|
6
6
|
} from "@milaboratories/pl-model-common";
|
|
7
|
-
import type {
|
|
7
|
+
import type { PTableV11 } from "./table";
|
|
8
8
|
import type { PTableId } from "./common";
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -31,8 +31,8 @@ export interface UniqueValuesRequestV2 {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* Read interface exposed by PFrames library. Returns the {@link
|
|
35
|
-
* table view,
|
|
34
|
+
* Read interface exposed by PFrames library. Returns the {@link PTableV11}
|
|
35
|
+
* table view, whose `export` takes a column-index → header map.
|
|
36
36
|
*
|
|
37
37
|
* Spec-side operations (finding columns, listing columns, retrieving
|
|
38
38
|
* column specs, computing axis integrations) are not part of this
|
|
@@ -41,9 +41,9 @@ export interface UniqueValuesRequestV2 {
|
|
|
41
41
|
* `DataQuery`; `getUniqueValues` takes pre-resolved indices via
|
|
42
42
|
* {@link UniqueValuesRequestV2}.
|
|
43
43
|
*/
|
|
44
|
-
export interface
|
|
44
|
+
export interface PFrameReadAPIV14 {
|
|
45
45
|
/** Creates table from a pre-lowered data query. */
|
|
46
|
-
createTable(tableId: PTableId, dataQuery: DataQuery):
|
|
46
|
+
createTable(tableId: PTableId, dataQuery: DataQuery): PTableV11;
|
|
47
47
|
|
|
48
48
|
/** Calculate set of unique values for a specific axis for the filtered set of records. */
|
|
49
49
|
getUniqueValues(
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { PFrameFactoryAPIV5 } from "./api_factory";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PFrameReadAPIV14 } from "./api_read";
|
|
3
3
|
import type { Logger } from "./common";
|
|
4
4
|
import type { PFrameId } from "./common";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Full PFrame surface — factory operations plus data-side reads. Exposes
|
|
8
|
-
* {@link
|
|
8
|
+
* {@link PFrameReadAPIV14}, whose tables' `export` takes a column-index →
|
|
9
|
+
* header map.
|
|
9
10
|
*/
|
|
10
|
-
export interface
|
|
11
|
+
export interface PFrameV16 extends PFrameFactoryAPIV5, PFrameReadAPIV14 {}
|
|
11
12
|
|
|
12
13
|
export type PFrameOptionsV2 = {
|
|
13
14
|
/** PFrame ID for logging purposes */
|
|
@@ -20,14 +21,15 @@ export type PFrameOptionsV2 = {
|
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* PFrame management functions exposed by the PFrame module. Creates
|
|
23
|
-
* {@link
|
|
24
|
+
* {@link PFrameV16} instances, whose tables' `export` takes a
|
|
25
|
+
* column-index → header map.
|
|
24
26
|
*/
|
|
25
|
-
export interface
|
|
27
|
+
export interface PFrameFactoryV7 {
|
|
26
28
|
/**
|
|
27
29
|
* Create a new PFrame instance.
|
|
28
30
|
* @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
|
|
29
31
|
*/
|
|
30
|
-
createPFrame(options: PFrameOptionsV2):
|
|
32
|
+
createPFrame(options: PFrameOptionsV2): PFrameV16;
|
|
31
33
|
|
|
32
34
|
/**
|
|
33
35
|
* Dump active allocations from all PFrames instances in pprof format.
|
|
@@ -3,12 +3,15 @@ import type { PTableShape, PTableVector, TableRange } from "@milaboratories/pl-m
|
|
|
3
3
|
/**
|
|
4
4
|
* Table view returned by `createTable`.
|
|
5
5
|
*
|
|
6
|
+
* {@link PTableV11.export} takes a `headers` map (unified column index →
|
|
7
|
+
* header name) that both selects the columns to export and names them.
|
|
8
|
+
*
|
|
6
9
|
* PTable can be thought as having a composite primary key, consisting
|
|
7
10
|
* of axes, and a set of data columns derived from PColumn values.
|
|
8
11
|
* The table's column spec is owned by the caller — selector → index
|
|
9
12
|
* resolution runs on the caller side via WASM-spec.
|
|
10
13
|
*/
|
|
11
|
-
export interface
|
|
14
|
+
export interface PTableV11 extends Disposable {
|
|
12
15
|
/**
|
|
13
16
|
* Get PTable disk footprint in bytes.
|
|
14
17
|
*
|
|
@@ -45,22 +48,24 @@ export interface PTableV10 extends Disposable {
|
|
|
45
48
|
): Promise<PTableVector[]>;
|
|
46
49
|
|
|
47
50
|
/**
|
|
48
|
-
* Stream the
|
|
51
|
+
* Stream the sorted table to a file at `path`. The output format is
|
|
49
52
|
* selected from the file extension: `csv`, `tsv`, `parquet`, or `xlsx`.
|
|
50
53
|
* Writing is bounded-memory.
|
|
51
54
|
* This call materializes the join.
|
|
52
55
|
*
|
|
53
56
|
* @param path destination file path; its extension selects the format
|
|
54
|
-
* @param headers
|
|
55
|
-
* columns)
|
|
56
|
-
*
|
|
57
|
+
* @param headers map from unified column index (axes first, then data
|
|
58
|
+
* columns) to the header name to use for that column. Only the columns
|
|
59
|
+
* present as keys are exported, in ascending index order — the map both
|
|
60
|
+
* selects the columns and names them (the data layer is name-independent,
|
|
61
|
+
* so names are supplied by the caller).
|
|
57
62
|
*
|
|
58
63
|
* @remarks For `xlsx` the caller must ensure the row count is below Excel's
|
|
59
64
|
* 1,048,576-row per-sheet limit.
|
|
60
65
|
*/
|
|
61
66
|
export(
|
|
62
67
|
path: string,
|
|
63
|
-
headers: string
|
|
68
|
+
headers: Record<number, string>,
|
|
64
69
|
ops?: {
|
|
65
70
|
signal?: AbortSignal;
|
|
66
71
|
},
|