@milaboratories/pl-model-middle-layer 1.30.14 → 1.31.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/pframe/internal_api/index.ts"],"sourcesContent":["export * from \"./api_read\";\nexport * from \"./api_factory\";\nexport * from \"./api_wasm\";\nexport * from \"./common\";\nexport * from \"./create_table\";\nexport * from \"./delete_column\";\nexport * from \"./discover_columns\";\nexport * from \"./find_columns\";\nexport * from \"./table\";\n\nexport * from \"./pframe\";\nexport * from \"./http_helpers\";\n\nexport type { SingleAxisSelector } from \"@milaboratories/pl-model-common\";\n"],"mappings":""}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/pframe/internal_api/index.ts"],"sourcesContent":["export * from \"./api_read\";\nexport * from \"./api_factory\";\nexport * from \"./common\";\nexport * from \"./create_table\";\nexport * from \"./delete_column\";\nexport * from \"./discover_columns\";\nexport * from \"./find_columns\";\nexport * from \"./table\";\n\nexport * from \"./pframe\";\nexport * from \"./http_helpers\";\n\nexport type { SingleAxisSelector } from \"@milaboratories/pl-model-common\";\n"],"mappings":""}
@@ -3,18 +3,17 @@ import { AxisQualification, ColumnAxesWithQualifications, ConstantAxisFilter, Lo
3
3
  import { PFrameReadAPIV15, UniqueValuesRequestV2 } from "./api_read.js";
4
4
  import { BaseObjectStore, CacheConfig, CacheCounters, CacheMetrics, CachingObjectStore, CachingObjectStoreOptions, FileRange, FsStoreOptions, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions } from "./http_helpers.js";
5
5
  import { AddColumnEntryV2, DataInfo, DataInfoExtension, DataInfoV2, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV6, SpecExtension } from "./api_factory.js";
6
+ import { ArtificialColumnJoinEntry, ColumnJoinEntry, CreateTableRequestV4, FullJoinV4, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, OuterJoinV4, SlicedColumnJoinEntry } from "./create_table.js";
6
7
  import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
7
8
  import { DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, MatcherMap, MultiAxisSelector, MultiColumnSelector, StringMatcher } from "./discover_columns.js";
8
9
  import { FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit } from "./find_columns.js";
9
- import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmAPIV5, PFrameWasmV2, PFrameWasmV3, PFrameWasmV4 } from "./api_wasm.js";
10
- import { ArtificialColumnJoinEntry, ColumnJoinEntry, CreateTableRequestV4, FullJoinV4, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, OuterJoinV4, SlicedColumnJoinEntry } from "./create_table.js";
11
10
  import { PFrameFactoryV9, PFrameOptionsV2, PFrameV18 } from "./pframe.js";
12
11
  import { SingleAxisSelector as SingleAxisSelector$1 } from "@milaboratories/pl-model-common";
13
12
 
14
13
  //#region src/pframe/internal_api/index.d.ts
15
14
  declare namespace index_d_exports {
16
- export { AddColumnEntryV2, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, CacheConfig, CacheCounters, CacheMetrics, CachingObjectStore, CachingObjectStoreOptions, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DataInfoV2, 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, PFrameFactoryAPIV6, PFrameFactoryV9, PFrameId, PFrameOptionsV2, PFrameReadAPIV15, PFrameV18, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmAPIV5, PFrameWasmV2, PFrameWasmV3, PFrameWasmV4, PTableId, PTableV12, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2 };
15
+ export { AddColumnEntryV2, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, CacheConfig, CacheCounters, CacheMetrics, CachingObjectStore, CachingObjectStoreOptions, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DataInfoV2, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV6, PFrameFactoryV9, PFrameId, PFrameOptionsV2, PFrameReadAPIV15, PFrameV18, PTableId, PTableV12, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2 };
17
16
  }
18
17
  //#endregion
19
- export { AddColumnEntryV2, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, CacheConfig, CacheCounters, CacheMetrics, CachingObjectStore, CachingObjectStoreOptions, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DataInfoV2, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, type 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, PFrameFactoryAPIV6, PFrameFactoryV9, PFrameId, PFrameOptionsV2, PFrameReadAPIV15, PFrameV18, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmAPIV5, PFrameWasmV2, PFrameWasmV3, PFrameWasmV4, PTableId, PTableV12, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, type SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2, index_d_exports };
18
+ export { AddColumnEntryV2, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, CacheConfig, CacheCounters, CacheMetrics, CachingObjectStore, CachingObjectStoreOptions, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DataInfoV2, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, type DiscoverColumnsStepInfo, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV6, PFrameFactoryV9, PFrameId, PFrameOptionsV2, PFrameReadAPIV15, PFrameV18, PTableId, PTableV12, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, type SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2, index_d_exports };
20
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/pframe/internal_api/index.ts"],"sourcesContent":["export * from \"./api_read\";\nexport * from \"./api_factory\";\nexport * from \"./api_wasm\";\nexport * from \"./common\";\nexport * from \"./create_table\";\nexport * from \"./delete_column\";\nexport * from \"./discover_columns\";\nexport * from \"./find_columns\";\nexport * from \"./table\";\n\nexport * from \"./pframe\";\nexport * from \"./http_helpers\";\n\nexport type { SingleAxisSelector } from \"@milaboratories/pl-model-common\";\n"],"mappings":""}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/pframe/internal_api/index.ts"],"sourcesContent":["export * from \"./api_read\";\nexport * from \"./api_factory\";\nexport * from \"./common\";\nexport * from \"./create_table\";\nexport * from \"./delete_column\";\nexport * from \"./discover_columns\";\nexport * from \"./find_columns\";\nexport * from \"./table\";\n\nexport * from \"./pframe\";\nexport * from \"./http_helpers\";\n\nexport type { SingleAxisSelector } from \"@milaboratories/pl-model-common\";\n"],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-model-middle-layer",
3
- "version": "1.30.14",
3
+ "version": "1.31.0",
4
4
  "description": "Common model between middle layer and non-block UI code",
5
5
  "files": [
6
6
  "./dist/**/*",
@@ -20,15 +20,15 @@
20
20
  "es-toolkit": "^1.39.10",
21
21
  "utility-types": "^3.11.0",
22
22
  "zod": "~3.25.76",
23
- "@milaboratories/pl-model-common": "1.47.2",
23
+ "@milaboratories/pl-model-common": "1.47.3",
24
24
  "@milaboratories/helpers": "1.14.5"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "~24.5.2",
28
28
  "typescript": "~5.9.3",
29
- "@milaboratories/build-configs": "2.0.0",
30
- "@milaboratories/ts-builder": "1.6.1",
31
- "@milaboratories/ts-configs": "1.3.1"
29
+ "@milaboratories/ts-builder": "1.6.2",
30
+ "@milaboratories/ts-configs": "1.4.0",
31
+ "@milaboratories/build-configs": "2.0.0"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "ts-builder build --target node",
@@ -1,6 +1,5 @@
1
1
  export * from "./api_read";
2
2
  export * from "./api_factory";
3
- export * from "./api_wasm";
4
3
  export * from "./common";
5
4
  export * from "./create_table";
6
5
  export * from "./delete_column";
@@ -1,310 +0,0 @@
1
- import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
2
- import { DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discover_columns.js";
3
- import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
4
- import { AxesId, AxesSpec, BuildQueryInput, DataQuery, DataQueryBooleanExpression, JoinEntry, PColumnIdAndSpec, PColumnSpec, PObjectId, PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableSorting, SingleAxisSelector, SpecQuery, SpecQueryJoinEntry } from "@milaboratories/pl-model-common";
5
-
6
- //#region src/pframe/internal_api/api_wasm.d.ts
7
- /**
8
- * V5 PFrame API factory — pure spec-layer operations plus frame construction.
9
- *
10
- * Self-contained: does not extend any earlier factory interface. Once this
11
- * version is adopted, every earlier `PFrameWasmAPIV*` and per-frame
12
- * `PFrameWasmV*` interface is dropped, so this declaration repeats the full
13
- * method surface rather than referencing the predecessors.
14
- */
15
- interface PFrameWasmAPIV5 {
16
- /**
17
- * Creates a new PFrame from a map of column IDs to column specifications.
18
- */
19
- createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV4;
20
- /**
21
- * Expands an {@link AxesSpec} into {@link AxesId}s with parent information
22
- * resolved.
23
- */
24
- expandAxes(spec: AxesSpec): AxesId;
25
- /**
26
- * Collapses {@link AxesId} into {@link AxesSpec}.
27
- */
28
- collapseAxes(ids: AxesId): AxesSpec;
29
- /**
30
- * Finds the index of an axis matching the given selector.
31
- * Returns -1 if no matching axis is found.
32
- */
33
- findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
34
- /**
35
- * Finds the flat index of a table column matching the given
36
- * selector within a table spec. Returns -1 if not found.
37
- */
38
- findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
39
- /**
40
- * Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
41
- * ordered path of wrapping steps (linker hops, filter joins).
42
- *
43
- * Right-fold over `path` starting from `Column(column)`: each `linker` step
44
- * wraps the current subquery as `linkerJoin`, each `filter` step as
45
- * `innerJoin` with the filter column. `qualifications` annotate the
46
- * outermost entry only.
47
- */
48
- buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
49
- /**
50
- * Upgrades selector-based legacy record filters into index-based data-layer
51
- * boolean expressions, resolved against the provided unified table spec
52
- * (axes first, then columns).
53
- */
54
- rewriteLegacyFilters(request: {
55
- tableSpec: PTableColumnSpec[];
56
- filters: PTableRecordFilter[];
57
- }): DataQueryBooleanExpression[];
58
- }
59
- /**
60
- * V4 PFrame interface — per-frame instance operations.
61
- *
62
- * Self-contained: does not extend any earlier per-frame interface. Once this
63
- * version is adopted, every earlier `PFrameWasmV*` interface is dropped, so
64
- * this declaration repeats the full method surface rather than referencing
65
- * the predecessors.
66
- */
67
- interface PFrameWasmV4 extends Disposable {
68
- /**
69
- * Deletes columns from a columns specification.
70
- */
71
- deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
72
- /**
73
- * Returns the id and spec of the single column registered under `columnId`
74
- * in this PFrame, or `null` if no such column is registered. Same shape as
75
- * the entries of {@link PFrameWasmV4.listColumns}.
76
- */
77
- getColumn(columnId: PObjectId): PColumnIdAndSpec | null;
78
- /**
79
- * Lists all columns currently registered in this PFrame, with their ids and specs.
80
- */
81
- listColumns(): PColumnIdAndSpec[];
82
- /**
83
- * Discovers columns compatible with a given axes integration. Include and
84
- * exclude filters are applied in order (exclude removes matches from the
85
- * include set). Each hit carries its traversal `path`; feed the hit's
86
- * column id and `path` into {@link PFrameWasmAPIV5.buildQuery} to
87
- * materialize it as a {@link SpecQueryJoinEntry}.
88
- */
89
- discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
90
- /**
91
- * Finds columns in the PFrame matching the given filter criteria.
92
- */
93
- findColumns(request: FindColumnsRequest): FindColumnsResponse;
94
- /**
95
- * Evaluates a query specification against this PFrame.
96
- */
97
- evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
98
- /**
99
- * Rewrites a legacy query format (V4) to the current SpecQuery format.
100
- */
101
- rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
102
- }
103
- /**
104
- * V4 PFrame API factory — pure spec-layer operations plus frame construction.
105
- *
106
- * Self-contained (does not extend {@link PFrameWasmAPIV3}, which is dropped
107
- * once V4 is adopted). Same surface as V3 plus
108
- * {@link PFrameWasmAPIV4.rewriteLegacyFilters}. The per-frame interface is
109
- * unchanged, so {@link PFrameWasmAPIV4.createPFrame} still returns a
110
- * {@link PFrameWasmV3}.
111
- */
112
- interface PFrameWasmAPIV4 {
113
- /**
114
- * Creates a new PFrame from a map of column IDs to column specifications.
115
- */
116
- createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV3;
117
- /**
118
- * Expands an {@link AxesSpec} into {@link AxesId}s with parent information
119
- * resolved.
120
- */
121
- expandAxes(spec: AxesSpec): AxesId;
122
- /**
123
- * Collapses {@link AxesId} into {@link AxesSpec}.
124
- */
125
- collapseAxes(ids: AxesId): AxesSpec;
126
- /**
127
- * Finds the index of an axis matching the given selector.
128
- * Returns -1 if no matching axis is found.
129
- */
130
- findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
131
- /**
132
- * Finds the flat index of a table column matching the given
133
- * selector within a table spec. Returns -1 if not found.
134
- */
135
- findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
136
- /**
137
- * Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
138
- * ordered path of wrapping steps (linker hops, filter joins).
139
- *
140
- * Right-fold over `path` starting from `Column(column)`: each `linker` step
141
- * wraps the current subquery as `linkerJoin`, each `filter` step as
142
- * `innerJoin` with the filter column. `qualifications` annotate the
143
- * outermost entry only.
144
- *
145
- * Pure over its input — no frame needed. Column ids are resolved later at
146
- * {@link PFrameWasmV3.evaluateQuery} against the registered specs. Throws
147
- * only on malformed input: shape violations and unknown step tags (so v1
148
- * callers are shielded from step variants added in later versions).
149
- */
150
- buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
151
- /**
152
- * Upgrades selector-based legacy record filters into index-based data-layer
153
- * boolean expressions, resolved against the provided unified table spec
154
- * (axes first, then columns).
155
- *
156
- * Stateless (no frame needed): filtering does not change a table's spec, so
157
- * the resulting predicates are valid both for the V2 unique-values request
158
- * (over the source column's single-column table) and for composing a
159
- * `filter` over a `table` query node of that table.
160
- */
161
- rewriteLegacyFilters(request: {
162
- tableSpec: PTableColumnSpec[];
163
- filters: PTableRecordFilter[];
164
- }): DataQueryBooleanExpression[];
165
- }
166
- /**
167
- * V3 PFrame interface — per-frame instance operations.
168
- *
169
- * Pure spec-assembly operations (e.g. {@link PFrameWasmAPIV3.buildQuery}) live
170
- * on the API factory because they don't read frame state. Everything here
171
- * consults the registered specs of this frame.
172
- */
173
- interface PFrameWasmV3 extends Disposable {
174
- /**
175
- * Deletes columns from a columns specification.
176
- */
177
- deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
178
- /**
179
- * Lists all columns currently registered in this PFrame, with their ids and specs.
180
- */
181
- listColumns(): PColumnIdAndSpec[];
182
- /**
183
- * Discovers columns compatible with a given axes integration. Include and
184
- * exclude filters are applied in order (exclude removes matches from the
185
- * include set). Each hit carries its traversal `path`; feed the hit's
186
- * column id and `path` into {@link PFrameWasmAPIV3.buildQuery} to
187
- * materialize it as a {@link SpecQueryJoinEntry}.
188
- */
189
- discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
190
- /**
191
- * Finds columns in the PFrame matching the given filter criteria.
192
- */
193
- findColumns(request: FindColumnsRequest): FindColumnsResponse;
194
- /**
195
- * Evaluates a query specification against this PFrame.
196
- */
197
- evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
198
- /**
199
- * Rewrites a legacy query format (V4) to the current SpecQuery format.
200
- */
201
- rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
202
- }
203
- /**
204
- * V3 PFrame API factory — pure spec-layer operations plus frame construction.
205
- * Everything here is stateless and does not require a frame instance.
206
- *
207
- * Superseded by {@link PFrameWasmAPIV4} (adds `rewriteLegacyFilters`); will be
208
- * removed in a future PFrames update.
209
- */
210
- interface PFrameWasmAPIV3 {
211
- /**
212
- * Creates a new V3 PFrame from a map of column IDs to column specifications.
213
- */
214
- createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV3;
215
- /**
216
- * Expands an {@link AxesSpec} into {@link AxesId}s with parent information
217
- * resolved.
218
- */
219
- expandAxes(spec: AxesSpec): AxesId;
220
- /**
221
- * Collapses {@link AxesId} into {@link AxesSpec}.
222
- */
223
- collapseAxes(ids: AxesId): AxesSpec;
224
- /**
225
- * Finds the index of an axis matching the given selector.
226
- * Returns -1 if no matching axis is found.
227
- */
228
- findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
229
- /**
230
- * Finds the flat index of a table column matching the given
231
- * selector within a table spec. Returns -1 if not found.
232
- */
233
- findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
234
- /**
235
- * Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
236
- * ordered path of wrapping steps (linker hops, filter joins).
237
- *
238
- * Right-fold over `path` starting from `Column(column)`: each `linker` step
239
- * wraps the current subquery as `linkerJoin`, each `filter` step as
240
- * `innerJoin` with the filter column. `qualifications` annotate the
241
- * outermost entry only.
242
- *
243
- * Pure over its input — no frame needed. Column ids are resolved later at
244
- * {@link PFrameWasmV3.evaluateQuery} against the registered specs. Throws
245
- * only on malformed input: shape violations and unknown step tags (so v1
246
- * callers are shielded from step variants added in later versions).
247
- */
248
- buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
249
- }
250
- /**
251
- * V2 PFrame interface. Superseded by {@link PFrameWasmV3}; will be removed
252
- * in a future PFrames update.
253
- */
254
- interface PFrameWasmV2 extends Disposable {
255
- /** @see PFrameWasmV3.deleteColumns */
256
- deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
257
- /** @see PFrameWasmV3.discoverColumns */
258
- discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
259
- /** @see PFrameWasmV3.findColumns */
260
- findColumns(request: FindColumnsRequest): FindColumnsResponse;
261
- /** @see PFrameWasmV3.evaluateQuery */
262
- evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
263
- /** @see PFrameWasmV3.rewriteLegacyQuery */
264
- rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
265
- }
266
- /**
267
- * V2 PFrame API factory. Superseded by {@link PFrameWasmAPIV3}; will be removed
268
- * in a future PFrames update.
269
- */
270
- interface PFrameWasmAPIV2 {
271
- /** @see PFrameWasmAPIV3.createPFrame */
272
- createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV2;
273
- /** @see PFrameWasmAPIV3.expandAxes */
274
- expandAxes(spec: AxesSpec): AxesId;
275
- /** @see PFrameWasmAPIV3.collapseAxes */
276
- collapseAxes(ids: AxesId): AxesSpec;
277
- /** @see PFrameWasmAPIV3.findAxis */
278
- findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
279
- /** @see PFrameWasmAPIV3.findTableColumn */
280
- findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
281
- }
282
- /**
283
- * Response from evaluating a query against a PFrame.
284
- */
285
- type EvaluateQueryResponse = {
286
- /**
287
- * The table specification describing the structure of the query result,
288
- * including all axes and columns that will be present in the output.
289
- */
290
- tableSpec: PTableColumnSpec[];
291
- /**
292
- * The data layer query representation with numeric indices,
293
- * suitable for execution by the data processing engine.
294
- */
295
- dataQuery: DataQuery;
296
- };
297
- /**
298
- * Represents a legacy (V4) query format used before the unified SpecQuery.
299
- *
300
- * This type is used with {@link PFrameWasmV3.rewriteLegacyQuery} to upgrade
301
- * older query structures to the current {@link SpecQuery} format.
302
- */
303
- type LegacyQuery = {
304
- /** The source join entry defining the data sources and join structure. */src: JoinEntry<PObjectId>; /** Optional record-level filters to apply to the query results. */
305
- filters?: PTableRecordFilter[]; /** Optional sorting specifications for ordering the results. */
306
- sorting?: PTableSorting[];
307
- };
308
- //#endregion
309
- export { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmAPIV5, PFrameWasmV2, PFrameWasmV3, PFrameWasmV4 };
310
- //# sourceMappingURL=api_wasm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api_wasm.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_wasm.ts"],"mappings":"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"}
@@ -1,373 +0,0 @@
1
- import type {
2
- AxesId,
3
- AxesSpec,
4
- BuildQueryInput,
5
- JoinEntry,
6
- PColumnIdAndSpec,
7
- PColumnSpec,
8
- PObjectId,
9
- PTableColumnId,
10
- PTableColumnSpec,
11
- PTableRecordFilter,
12
- PTableSorting,
13
- DataQuery,
14
- DataQueryBooleanExpression,
15
- SpecQuery,
16
- SpecQueryJoinEntry,
17
- SingleAxisSelector,
18
- } from "@milaboratories/pl-model-common";
19
- import type {
20
- DeleteColumnFromColumnsRequest,
21
- DeleteColumnFromColumnsResponse,
22
- } from "./delete_column";
23
- import type { DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discover_columns";
24
- import type { FindColumnsRequest, FindColumnsResponse } from "./find_columns";
25
-
26
- /**
27
- * V5 PFrame API factory — pure spec-layer operations plus frame construction.
28
- *
29
- * Self-contained: does not extend any earlier factory interface. Once this
30
- * version is adopted, every earlier `PFrameWasmAPIV*` and per-frame
31
- * `PFrameWasmV*` interface is dropped, so this declaration repeats the full
32
- * method surface rather than referencing the predecessors.
33
- */
34
- export interface PFrameWasmAPIV5 {
35
- /**
36
- * Creates a new PFrame from a map of column IDs to column specifications.
37
- */
38
- createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV4;
39
-
40
- /**
41
- * Expands an {@link AxesSpec} into {@link AxesId}s with parent information
42
- * resolved.
43
- */
44
- expandAxes(spec: AxesSpec): AxesId;
45
-
46
- /**
47
- * Collapses {@link AxesId} into {@link AxesSpec}.
48
- */
49
- collapseAxes(ids: AxesId): AxesSpec;
50
-
51
- /**
52
- * Finds the index of an axis matching the given selector.
53
- * Returns -1 if no matching axis is found.
54
- */
55
- findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
56
-
57
- /**
58
- * Finds the flat index of a table column matching the given
59
- * selector within a table spec. Returns -1 if not found.
60
- */
61
- findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
62
-
63
- /**
64
- * Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
65
- * ordered path of wrapping steps (linker hops, filter joins).
66
- *
67
- * Right-fold over `path` starting from `Column(column)`: each `linker` step
68
- * wraps the current subquery as `linkerJoin`, each `filter` step as
69
- * `innerJoin` with the filter column. `qualifications` annotate the
70
- * outermost entry only.
71
- */
72
- buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
73
-
74
- /**
75
- * Upgrades selector-based legacy record filters into index-based data-layer
76
- * boolean expressions, resolved against the provided unified table spec
77
- * (axes first, then columns).
78
- */
79
- rewriteLegacyFilters(request: {
80
- tableSpec: PTableColumnSpec[];
81
- filters: PTableRecordFilter[];
82
- }): DataQueryBooleanExpression[];
83
- }
84
-
85
- /**
86
- * V4 PFrame interface — per-frame instance operations.
87
- *
88
- * Self-contained: does not extend any earlier per-frame interface. Once this
89
- * version is adopted, every earlier `PFrameWasmV*` interface is dropped, so
90
- * this declaration repeats the full method surface rather than referencing
91
- * the predecessors.
92
- */
93
- export interface PFrameWasmV4 extends Disposable {
94
- /**
95
- * Deletes columns from a columns specification.
96
- */
97
- deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
98
-
99
- /**
100
- * Returns the id and spec of the single column registered under `columnId`
101
- * in this PFrame, or `null` if no such column is registered. Same shape as
102
- * the entries of {@link PFrameWasmV4.listColumns}.
103
- */
104
- getColumn(columnId: PObjectId): PColumnIdAndSpec | null;
105
-
106
- /**
107
- * Lists all columns currently registered in this PFrame, with their ids and specs.
108
- */
109
- listColumns(): PColumnIdAndSpec[];
110
-
111
- /**
112
- * Discovers columns compatible with a given axes integration. Include and
113
- * exclude filters are applied in order (exclude removes matches from the
114
- * include set). Each hit carries its traversal `path`; feed the hit's
115
- * column id and `path` into {@link PFrameWasmAPIV5.buildQuery} to
116
- * materialize it as a {@link SpecQueryJoinEntry}.
117
- */
118
- discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
119
-
120
- /**
121
- * Finds columns in the PFrame matching the given filter criteria.
122
- */
123
- findColumns(request: FindColumnsRequest): FindColumnsResponse;
124
-
125
- /**
126
- * Evaluates a query specification against this PFrame.
127
- */
128
- evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
129
-
130
- /**
131
- * Rewrites a legacy query format (V4) to the current SpecQuery format.
132
- */
133
- rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
134
- }
135
-
136
- /**
137
- * V4 PFrame API factory — pure spec-layer operations plus frame construction.
138
- *
139
- * Self-contained (does not extend {@link PFrameWasmAPIV3}, which is dropped
140
- * once V4 is adopted). Same surface as V3 plus
141
- * {@link PFrameWasmAPIV4.rewriteLegacyFilters}. The per-frame interface is
142
- * unchanged, so {@link PFrameWasmAPIV4.createPFrame} still returns a
143
- * {@link PFrameWasmV3}.
144
- */
145
- export interface PFrameWasmAPIV4 {
146
- /**
147
- * Creates a new PFrame from a map of column IDs to column specifications.
148
- */
149
- createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV3;
150
-
151
- /**
152
- * Expands an {@link AxesSpec} into {@link AxesId}s with parent information
153
- * resolved.
154
- */
155
- expandAxes(spec: AxesSpec): AxesId;
156
-
157
- /**
158
- * Collapses {@link AxesId} into {@link AxesSpec}.
159
- */
160
- collapseAxes(ids: AxesId): AxesSpec;
161
-
162
- /**
163
- * Finds the index of an axis matching the given selector.
164
- * Returns -1 if no matching axis is found.
165
- */
166
- findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
167
-
168
- /**
169
- * Finds the flat index of a table column matching the given
170
- * selector within a table spec. Returns -1 if not found.
171
- */
172
- findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
173
-
174
- /**
175
- * Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
176
- * ordered path of wrapping steps (linker hops, filter joins).
177
- *
178
- * Right-fold over `path` starting from `Column(column)`: each `linker` step
179
- * wraps the current subquery as `linkerJoin`, each `filter` step as
180
- * `innerJoin` with the filter column. `qualifications` annotate the
181
- * outermost entry only.
182
- *
183
- * Pure over its input — no frame needed. Column ids are resolved later at
184
- * {@link PFrameWasmV3.evaluateQuery} against the registered specs. Throws
185
- * only on malformed input: shape violations and unknown step tags (so v1
186
- * callers are shielded from step variants added in later versions).
187
- */
188
- buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
189
-
190
- /**
191
- * Upgrades selector-based legacy record filters into index-based data-layer
192
- * boolean expressions, resolved against the provided unified table spec
193
- * (axes first, then columns).
194
- *
195
- * Stateless (no frame needed): filtering does not change a table's spec, so
196
- * the resulting predicates are valid both for the V2 unique-values request
197
- * (over the source column's single-column table) and for composing a
198
- * `filter` over a `table` query node of that table.
199
- */
200
- rewriteLegacyFilters(request: {
201
- tableSpec: PTableColumnSpec[];
202
- filters: PTableRecordFilter[];
203
- }): DataQueryBooleanExpression[];
204
- }
205
-
206
- /**
207
- * V3 PFrame interface — per-frame instance operations.
208
- *
209
- * Pure spec-assembly operations (e.g. {@link PFrameWasmAPIV3.buildQuery}) live
210
- * on the API factory because they don't read frame state. Everything here
211
- * consults the registered specs of this frame.
212
- */
213
- export interface PFrameWasmV3 extends Disposable {
214
- /**
215
- * Deletes columns from a columns specification.
216
- */
217
- deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
218
-
219
- /**
220
- * Lists all columns currently registered in this PFrame, with their ids and specs.
221
- */
222
- listColumns(): PColumnIdAndSpec[];
223
-
224
- /**
225
- * Discovers columns compatible with a given axes integration. Include and
226
- * exclude filters are applied in order (exclude removes matches from the
227
- * include set). Each hit carries its traversal `path`; feed the hit's
228
- * column id and `path` into {@link PFrameWasmAPIV3.buildQuery} to
229
- * materialize it as a {@link SpecQueryJoinEntry}.
230
- */
231
- discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
232
-
233
- /**
234
- * Finds columns in the PFrame matching the given filter criteria.
235
- */
236
- findColumns(request: FindColumnsRequest): FindColumnsResponse;
237
-
238
- /**
239
- * Evaluates a query specification against this PFrame.
240
- */
241
- evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
242
-
243
- /**
244
- * Rewrites a legacy query format (V4) to the current SpecQuery format.
245
- */
246
- rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
247
- }
248
-
249
- /**
250
- * V3 PFrame API factory — pure spec-layer operations plus frame construction.
251
- * Everything here is stateless and does not require a frame instance.
252
- *
253
- * Superseded by {@link PFrameWasmAPIV4} (adds `rewriteLegacyFilters`); will be
254
- * removed in a future PFrames update.
255
- */
256
- export interface PFrameWasmAPIV3 {
257
- /**
258
- * Creates a new V3 PFrame from a map of column IDs to column specifications.
259
- */
260
- createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV3;
261
-
262
- /**
263
- * Expands an {@link AxesSpec} into {@link AxesId}s with parent information
264
- * resolved.
265
- */
266
- expandAxes(spec: AxesSpec): AxesId;
267
-
268
- /**
269
- * Collapses {@link AxesId} into {@link AxesSpec}.
270
- */
271
- collapseAxes(ids: AxesId): AxesSpec;
272
-
273
- /**
274
- * Finds the index of an axis matching the given selector.
275
- * Returns -1 if no matching axis is found.
276
- */
277
- findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
278
-
279
- /**
280
- * Finds the flat index of a table column matching the given
281
- * selector within a table spec. Returns -1 if not found.
282
- */
283
- findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
284
-
285
- /**
286
- * Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
287
- * ordered path of wrapping steps (linker hops, filter joins).
288
- *
289
- * Right-fold over `path` starting from `Column(column)`: each `linker` step
290
- * wraps the current subquery as `linkerJoin`, each `filter` step as
291
- * `innerJoin` with the filter column. `qualifications` annotate the
292
- * outermost entry only.
293
- *
294
- * Pure over its input — no frame needed. Column ids are resolved later at
295
- * {@link PFrameWasmV3.evaluateQuery} against the registered specs. Throws
296
- * only on malformed input: shape violations and unknown step tags (so v1
297
- * callers are shielded from step variants added in later versions).
298
- */
299
- buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
300
- }
301
-
302
- /**
303
- * V2 PFrame interface. Superseded by {@link PFrameWasmV3}; will be removed
304
- * in a future PFrames update.
305
- */
306
- export interface PFrameWasmV2 extends Disposable {
307
- /** @see PFrameWasmV3.deleteColumns */
308
- deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
309
-
310
- /** @see PFrameWasmV3.discoverColumns */
311
- discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
312
-
313
- /** @see PFrameWasmV3.findColumns */
314
- findColumns(request: FindColumnsRequest): FindColumnsResponse;
315
-
316
- /** @see PFrameWasmV3.evaluateQuery */
317
- evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
318
-
319
- /** @see PFrameWasmV3.rewriteLegacyQuery */
320
- rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
321
- }
322
-
323
- /**
324
- * V2 PFrame API factory. Superseded by {@link PFrameWasmAPIV3}; will be removed
325
- * in a future PFrames update.
326
- */
327
- export interface PFrameWasmAPIV2 {
328
- /** @see PFrameWasmAPIV3.createPFrame */
329
- createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV2;
330
-
331
- /** @see PFrameWasmAPIV3.expandAxes */
332
- expandAxes(spec: AxesSpec): AxesId;
333
-
334
- /** @see PFrameWasmAPIV3.collapseAxes */
335
- collapseAxes(ids: AxesId): AxesSpec;
336
-
337
- /** @see PFrameWasmAPIV3.findAxis */
338
- findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
339
-
340
- /** @see PFrameWasmAPIV3.findTableColumn */
341
- findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
342
- }
343
-
344
- /**
345
- * Response from evaluating a query against a PFrame.
346
- */
347
- export type EvaluateQueryResponse = {
348
- /**
349
- * The table specification describing the structure of the query result,
350
- * including all axes and columns that will be present in the output.
351
- */
352
- tableSpec: PTableColumnSpec[];
353
- /**
354
- * The data layer query representation with numeric indices,
355
- * suitable for execution by the data processing engine.
356
- */
357
- dataQuery: DataQuery;
358
- };
359
-
360
- /**
361
- * Represents a legacy (V4) query format used before the unified SpecQuery.
362
- *
363
- * This type is used with {@link PFrameWasmV3.rewriteLegacyQuery} to upgrade
364
- * older query structures to the current {@link SpecQuery} format.
365
- */
366
- export type LegacyQuery = {
367
- /** The source join entry defining the data sources and join structure. */
368
- src: JoinEntry<PObjectId>;
369
- /** Optional record-level filters to apply to the query results. */
370
- filters?: PTableRecordFilter[];
371
- /** Optional sorting specifications for ordering the results. */
372
- sorting?: PTableSorting[];
373
- };