@milaboratories/pl-model-middle-layer 1.16.4 → 1.18.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.
- package/dist/block_meta/block_components.d.ts +33 -33
- package/dist/block_meta/block_description.d.ts +120 -120
- package/dist/block_meta/block_id.d.ts +4 -4
- package/dist/block_meta/block_manifest.d.ts +258 -258
- package/dist/block_meta/block_meta.d.ts +58 -58
- package/dist/block_meta/content_types.d.ts +23 -23
- package/dist/block_registry/block_pack_spec.d.ts +24 -24
- package/dist/block_registry/overview.d.ts +1452 -1452
- package/dist/block_registry/registry_spec.d.ts +12 -12
- package/dist/pframe/internal_api/api_wasm.d.ts +70 -12
- package/dist/pframe/internal_api/api_wasm.d.ts.map +1 -1
- package/dist/pframe/internal_api/discover_columns.d.ts +10 -5
- package/dist/pframe/internal_api/discover_columns.d.ts.map +1 -1
- package/dist/pframe/internal_api/index.d.ts +3 -3
- package/package.json +5 -5
- package/src/pframe/internal_api/api_wasm.ts +83 -10
- package/src/pframe/internal_api/discover_columns.ts +9 -5
|
@@ -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
|
-
} | {
|
|
105
102
|
type: "remote-v1";
|
|
106
103
|
url: string;
|
|
107
104
|
} | {
|
|
108
105
|
type: "remote-v2";
|
|
109
106
|
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
|
-
} | {
|
|
118
115
|
type: "remote-v1";
|
|
119
116
|
url: string;
|
|
120
117
|
} | {
|
|
121
118
|
type: "remote-v2";
|
|
122
119
|
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
|
-
} | {
|
|
164
161
|
type: "remote-v1";
|
|
165
162
|
url: string;
|
|
166
163
|
} | {
|
|
167
164
|
type: "remote-v2";
|
|
168
165
|
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
|
-
} | {
|
|
177
174
|
type: "remote-v1";
|
|
178
175
|
url: string;
|
|
179
176
|
} | {
|
|
180
177
|
type: "remote-v2";
|
|
181
178
|
url: string;
|
|
179
|
+
} | {
|
|
180
|
+
type: "local-dev";
|
|
181
|
+
path: string;
|
|
182
182
|
};
|
|
183
183
|
title?: string | undefined;
|
|
184
184
|
}>, "many">;
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
|
|
2
2
|
import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
|
|
3
3
|
import { DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discover_columns.js";
|
|
4
|
-
import { AxesId, AxesSpec, DataQuery, JoinEntry, PColumnSpec, PObjectId, PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableSorting, SingleAxisSelector, SpecQuery } from "@milaboratories/pl-model-common";
|
|
4
|
+
import { AxesId, AxesSpec, BuildQueryInput, DataQuery, JoinEntry, PColumnInfo, PColumnSpec, PObjectId, PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableSorting, SingleAxisSelector, SpecQuery, SpecQueryJoinEntry } from "@milaboratories/pl-model-common";
|
|
5
5
|
|
|
6
6
|
//#region src/pframe/internal_api/api_wasm.d.ts
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* V3 PFrame interface — per-frame instance operations.
|
|
9
|
+
*
|
|
10
|
+
* Pure spec-assembly operations (e.g. {@link PFrameWasmAPIV3.buildQuery}) live
|
|
11
|
+
* on the API factory because they don't read frame state. Everything here
|
|
12
|
+
* consults the registered specs of this frame.
|
|
9
13
|
*/
|
|
10
|
-
interface
|
|
14
|
+
interface PFrameWasmV3 extends Disposable {
|
|
11
15
|
/**
|
|
12
16
|
* Deletes columns from a columns specification.
|
|
13
17
|
*/
|
|
14
18
|
deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
|
|
15
19
|
/**
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
* Lists all columns currently registered in this PFrame, with their ids and specs.
|
|
21
|
+
*/
|
|
22
|
+
listColumns(): PColumnInfo[];
|
|
23
|
+
/**
|
|
24
|
+
* Discovers columns compatible with a given axes integration. Include and
|
|
25
|
+
* exclude filters are applied in order (exclude removes matches from the
|
|
26
|
+
* include set). Each hit carries its traversal `path`; feed the hit's
|
|
27
|
+
* column id and `path` into {@link PFrameWasmAPIV3.buildQuery} to
|
|
28
|
+
* materialize it as a {@link SpecQueryJoinEntry}.
|
|
19
29
|
*/
|
|
20
30
|
discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
|
|
21
31
|
/**
|
|
@@ -32,13 +42,14 @@ interface PFrameWasmV2 extends Disposable {
|
|
|
32
42
|
rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
|
|
33
43
|
}
|
|
34
44
|
/**
|
|
35
|
-
*
|
|
45
|
+
* V3 PFrame API factory — pure spec-layer operations plus frame construction.
|
|
46
|
+
* Everything here is stateless and does not require a frame instance.
|
|
36
47
|
*/
|
|
37
|
-
interface
|
|
48
|
+
interface PFrameWasmAPIV3 {
|
|
38
49
|
/**
|
|
39
|
-
* Creates a new
|
|
50
|
+
* Creates a new V3 PFrame from a map of column IDs to column specifications.
|
|
40
51
|
*/
|
|
41
|
-
createPFrame(spec: Record<string, PColumnSpec>):
|
|
52
|
+
createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV3;
|
|
42
53
|
/**
|
|
43
54
|
* Expands an {@link AxesSpec} into {@link AxesId}s with parent information
|
|
44
55
|
* resolved.
|
|
@@ -58,6 +69,53 @@ interface PFrameWasmAPIV2 {
|
|
|
58
69
|
* selector within a table spec. Returns -1 if not found.
|
|
59
70
|
*/
|
|
60
71
|
findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
|
|
72
|
+
/**
|
|
73
|
+
* Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
|
|
74
|
+
* ordered path of wrapping steps (linker hops, filter joins).
|
|
75
|
+
*
|
|
76
|
+
* Right-fold over `path` starting from `Column(column)`: each `linker` step
|
|
77
|
+
* wraps the current subquery as `linkerJoin`, each `filter` step as
|
|
78
|
+
* `innerJoin` with the filter column. `qualifications` annotate the
|
|
79
|
+
* outermost entry only.
|
|
80
|
+
*
|
|
81
|
+
* Pure over its input — no frame needed. Column ids are resolved later at
|
|
82
|
+
* {@link PFrameWasmV3.evaluateQuery} against the registered specs. Throws
|
|
83
|
+
* only on malformed input: shape violations and unknown step tags (so v1
|
|
84
|
+
* callers are shielded from step variants added in later versions).
|
|
85
|
+
*/
|
|
86
|
+
buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* V2 PFrame interface. Superseded by {@link PFrameWasmV3}; will be removed
|
|
90
|
+
* in a future PFrames update.
|
|
91
|
+
*/
|
|
92
|
+
interface PFrameWasmV2 extends Disposable {
|
|
93
|
+
/** @see PFrameWasmV3.deleteColumns */
|
|
94
|
+
deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
|
|
95
|
+
/** @see PFrameWasmV3.discoverColumns */
|
|
96
|
+
discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
|
|
97
|
+
/** @see PFrameWasmV3.findColumns */
|
|
98
|
+
findColumns(request: FindColumnsRequest): FindColumnsResponse;
|
|
99
|
+
/** @see PFrameWasmV3.evaluateQuery */
|
|
100
|
+
evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
|
|
101
|
+
/** @see PFrameWasmV3.rewriteLegacyQuery */
|
|
102
|
+
rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* V2 PFrame API factory. Superseded by {@link PFrameWasmAPIV3}; will be removed
|
|
106
|
+
* in a future PFrames update.
|
|
107
|
+
*/
|
|
108
|
+
interface PFrameWasmAPIV2 {
|
|
109
|
+
/** @see PFrameWasmAPIV3.createPFrame */
|
|
110
|
+
createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV2;
|
|
111
|
+
/** @see PFrameWasmAPIV3.expandAxes */
|
|
112
|
+
expandAxes(spec: AxesSpec): AxesId;
|
|
113
|
+
/** @see PFrameWasmAPIV3.collapseAxes */
|
|
114
|
+
collapseAxes(ids: AxesId): AxesSpec;
|
|
115
|
+
/** @see PFrameWasmAPIV3.findAxis */
|
|
116
|
+
findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
|
|
117
|
+
/** @see PFrameWasmAPIV3.findTableColumn */
|
|
118
|
+
findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
|
|
61
119
|
}
|
|
62
120
|
/**
|
|
63
121
|
* Response from evaluating a query against a PFrame.
|
|
@@ -77,7 +135,7 @@ type EvaluateQueryResponse = {
|
|
|
77
135
|
/**
|
|
78
136
|
* Represents a legacy (V4) query format used before the unified SpecQuery.
|
|
79
137
|
*
|
|
80
|
-
* This type is used with {@link
|
|
138
|
+
* This type is used with {@link PFrameWasmV3.rewriteLegacyQuery} to upgrade
|
|
81
139
|
* older query structures to the current {@link SpecQuery} format.
|
|
82
140
|
*/
|
|
83
141
|
type LegacyQuery = {
|
|
@@ -86,5 +144,5 @@ type LegacyQuery = {
|
|
|
86
144
|
sorting?: PTableSorting[];
|
|
87
145
|
};
|
|
88
146
|
//#endregion
|
|
89
|
-
export { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmV2 };
|
|
147
|
+
export { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmV2, PFrameWasmV3 };
|
|
90
148
|
//# sourceMappingURL=api_wasm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_wasm.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_wasm.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"api_wasm.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_wasm.ts"],"mappings":";;;;;;;;AA+BA;;;;;UAAiB,YAAA,SAAqB,UAAA;EAkBX;;;EAdzB,aAAA,CAAc,OAAA,EAAS,8BAAA,GAAiC,+BAAA;EAwBjC;;;EAnBvB,WAAA,IAAe,WAAA;EATqB;;;;;;;EAkBpC,eAAA,CAAgB,OAAA,EAAS,wBAAA,GAA2B,uBAAA;EATpD;;;EAcA,WAAA,CAAY,OAAA,EAAS,kBAAA,GAAqB,mBAAA;EAL1B;;;EAUhB,aAAA,CAAc,OAAA,EAAS,SAAA,GAAY,qBAAA;EALvB;;;EAUZ,kBAAA,CAAmB,OAAA,EAAS,WAAA,GAAc,SAAA;AAAA;;;;;UAO3B,eAAA;EAPoC;;AAOrD;EAIE,YAAA,CAAa,IAAA,EAAM,MAAA,SAAe,WAAA,IAAe,YAAA;;;;;EAMjD,UAAA,CAAW,IAAA,EAAM,QAAA,GAAW,MAAA;EAAA;;;EAK5B,YAAA,CAAa,GAAA,EAAK,MAAA,GAAS,QAAA;EAMQ;;;;EAAnC,QAAA,CAAS,IAAA,EAAM,QAAA,EAAU,QAAA,EAAU,kBAAA;EAsBmB;;;;EAhBtD,eAAA,CAAgB,SAAA,EAAW,gBAAA,IAAoB,QAAA,EAAU,cAAA;EAvB5C;;;;;;;;;;;;;;EAuCb,UAAA,CAAW,KAAA,EAAO,eAAA,GAAkB,kBAAA;AAAA;;;;;UAOrB,YAAA,SAAqB,UAAA;EAPlB;EASlB,aAAA,CAAc,OAAA,EAAS,8BAAA,GAAiC,+BAAA;EATpB;EAYpC,eAAA,CAAgB,OAAA,EAAS,wBAAA,GAA2B,uBAAA;EAZE;EAetD,WAAA,CAAY,OAAA,EAAS,kBAAA,GAAqB,mBAAA;EARd;EAW5B,aAAA,CAAc,OAAA,EAAS,SAAA,GAAY,qBAAA;EATZ;EAYvB,kBAAA,CAAmB,OAAA,EAAS,WAAA,GAAc,SAAA;AAAA;;;;;UAO3B,eAAA;EAPa;EAS5B,YAAA,CAAa,IAAA,EAAM,MAAA,SAAe,WAAA,IAAe,YAAA;EAvBb;EA0BpC,UAAA,CAAW,IAAA,EAAM,QAAA,GAAW,MAAA;EA1BkB;EA6B9C,YAAA,CAAa,GAAA,EAAK,MAAA,GAAS,QAAA;EA3B3B;EA8BA,QAAA,CAAS,IAAA,EAAM,QAAA,EAAU,QAAA,EAAU,kBAAA;EA9BrB;EAiCd,eAAA,CAAgB,SAAA,EAAW,gBAAA,IAAoB,QAAA,EAAU,cAAA;AAAA;;;;KAM/C,qBAAA;EAjCW;;;;EAsCrB,SAAA,EAAW,gBAAA;EAnCG;;;;EAwCd,SAAA,EAAW,SAAA;AAAA;;;AA9Bb;;;;KAuCY,WAAA;EArCuC,0EAuCjD,GAAA,EAAK,SAAA,CAAU,SAAA,GApCa;EAsC5B,OAAA,GAAU,kBAAA,IAnCiB;EAqC3B,OAAA,GAAU,aAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxisQualification, ColumnAxesWithQualifications } from "./common.js";
|
|
2
|
-
import { AxisValueType, ColumnValueType,
|
|
2
|
+
import { AxisValueType, ColumnValueType, DiscoverColumnsStepInfo, PColumnIdAndSpec } from "@milaboratories/pl-model-common";
|
|
3
3
|
|
|
4
4
|
//#region src/pframe/internal_api/discover_columns.d.ts
|
|
5
5
|
/** Matches a string value either exactly or by regex pattern */
|
|
@@ -81,20 +81,25 @@ interface DiscoverColumnsMappingVariant {
|
|
|
81
81
|
/** Distinctive (minimal) qualifications needed for integration */
|
|
82
82
|
distinctiveQualifications: DiscoverColumnsResponseQualifications;
|
|
83
83
|
}
|
|
84
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* A single hit in the discover columns response. Carries the matched column
|
|
86
|
+
* along with its integration metadata and the path traversed to reach it.
|
|
87
|
+
* To materialize the hit as an executable query, feed `hit.columnId` and
|
|
88
|
+
* `path` into the PFrame's `buildQuery`.
|
|
89
|
+
*/
|
|
85
90
|
interface DiscoverColumnsResponseHit {
|
|
86
91
|
/** The column that was found compatible */
|
|
87
92
|
hit: PColumnIdAndSpec;
|
|
88
93
|
/** Possible ways to integrate this column with the existing set */
|
|
89
94
|
mappingVariants: DiscoverColumnsMappingVariant[];
|
|
90
|
-
/**
|
|
95
|
+
/** Steps traversed to reach this hit; empty for direct matches */
|
|
91
96
|
path: DiscoverColumnsStepInfo[];
|
|
92
97
|
}
|
|
93
|
-
/** Response from discover columns */
|
|
98
|
+
/** Response from discover columns. */
|
|
94
99
|
interface DiscoverColumnsResponse {
|
|
95
100
|
/** Columns that could be integrated and possible ways to integrate them */
|
|
96
101
|
hits: DiscoverColumnsResponseHit[];
|
|
97
102
|
}
|
|
98
103
|
//#endregion
|
|
99
|
-
export { DiscoverColumnsConstraints,
|
|
104
|
+
export { DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, type DiscoverColumnsStepInfo, MatcherMap, MultiAxisSelector, MultiColumnSelector, StringMatcher };
|
|
100
105
|
//# sourceMappingURL=discover_columns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover_columns.d.ts","names":[],"sources":["../../../src/pframe/internal_api/discover_columns.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"discover_columns.d.ts","names":[],"sources":["../../../src/pframe/internal_api/discover_columns.ts"],"mappings":";;;;;KAWY,aAAA;EAAkB,IAAA;EAAe,KAAA;AAAA;EAAoB,IAAA;EAAe,KAAA;AAAA;;KAGpE,UAAA,GAAa,MAAA,SAAe,aAAA;;UAGvB,iBAAA;EAHK;EAAA,SAKX,IAAA,GAAO,aAAA;EALO;EAAA,SAOd,IAAA,GAAO,aAAA;EAJD;EAAA,SAMN,MAAA,GAAS,UAAA;;WAET,aAAA,GAAgB,UAAA;EAJT;EAAA,SAMP,WAAA,GAAc,UAAA;AAAA;;;UAKR,mBAAA;EAbN;EAAA,SAeA,IAAA,GAAO,eAAA;EAbP;EAAA,SAeA,IAAA,GAAO,aAAA;EAbP;EAAA,SAeA,MAAA,GAAS,UAAA;EAbT;EAAA,SAeA,aAAA,GAAgB,UAAA;EAbhB;EAAA,SAeA,WAAA,GAAc,UAAA;EAfU;EAAA,SAiBxB,IAAA,GAAO,iBAAA;EAZD;EAAA,SAcN,gBAAA;AAAA;;UAIM,0BAAA;EAZG;EAclB,uBAAA;EAVuB;EAYvB,oBAAA;EAViC;EAYjC,yBAAA;EAtBS;EAwBT,sBAAA;AAAA;;UAIe,wBAAA;EAxBG;EA0BlB,cAAA,GAAiB,mBAAA;EAxBQ;EA0BzB,cAAA,GAAiB,mBAAA;EAxBM;EA0BvB,IAAA,EAAM,4BAAA;EAxBU;EA0BhB,OAAA;EAxByB;EA0BzB,WAAA,EAAa,0BAAA;AAAA;;UAIE,qCAAA;EA1B0B;EA4BzC,UAAA,EAAY,iBAAA;EAxBZ;EA0BA,MAAA,EAAQ,iBAAA;AAAA;;UAIO,6BAAA;EAtBA;EAwBf,cAAA,EAAgB,qCAAA;;EAEhB,yBAAA,EAA2B,qCAAA;AAAA;;;;;;;UASZ,0BAAA;EA/BE;EAiCjB,GAAA,EAAK,gBAAA;EA/BC;EAiCN,eAAA,EAAiB,6BAAA;EA7BjB;EA+BA,IAAA,EAAM,uBAAA;AAAA;;UAIS,uBAAA;EA/BqC;EAiCpD,IAAA,EAAM,0BAAA;AAAA"}
|
|
@@ -6,14 +6,14 @@ import { PTableV8 } from "./table.js";
|
|
|
6
6
|
import { PFrameReadAPIV11 } from "./api_read.js";
|
|
7
7
|
import { BaseObjectStore, FileRange, FsStoreOptions, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions } from "./http_helpers.js";
|
|
8
8
|
import { DataInfo, DataInfoExtension, FilePath, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV4, SpecExtension } from "./api_factory.js";
|
|
9
|
-
import { DiscoverColumnsConstraints,
|
|
10
|
-
import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmV2 } from "./api_wasm.js";
|
|
9
|
+
import { DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, MatcherMap, MultiAxisSelector, MultiColumnSelector, StringMatcher } from "./discover_columns.js";
|
|
10
|
+
import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmV2, PFrameWasmV3 } from "./api_wasm.js";
|
|
11
11
|
import { PFrameFactoryV4, PFrameOptionsV2, PFrameV13 } 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 { ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints,
|
|
16
|
+
export { 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, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV4, PFrameFactoryV4, PFrameId, PFrameOptionsV2, PFrameReadAPIV11, PFrameV13, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmV2, PFrameWasmV3, PTableId, PTableV8, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher };
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
export { index_d_exports };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-model-middle-layer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.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/
|
|
24
|
-
"@milaboratories/
|
|
23
|
+
"@milaboratories/pl-model-common": "1.32.1",
|
|
24
|
+
"@milaboratories/helpers": "1.14.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "~24.5.2",
|
|
28
28
|
"typescript": "~5.9.3",
|
|
29
|
+
"@milaboratories/ts-builder": "1.3.2",
|
|
29
30
|
"@milaboratories/build-configs": "2.0.0",
|
|
30
|
-
"@milaboratories/ts-configs": "1.2.3"
|
|
31
|
-
"@milaboratories/ts-builder": "1.3.1"
|
|
31
|
+
"@milaboratories/ts-configs": "1.2.3"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "ts-builder build --target node",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AxesId,
|
|
3
3
|
AxesSpec,
|
|
4
|
+
BuildQueryInput,
|
|
4
5
|
JoinEntry,
|
|
6
|
+
PColumnInfo,
|
|
5
7
|
PColumnSpec,
|
|
6
8
|
PObjectId,
|
|
7
9
|
PTableColumnId,
|
|
@@ -10,6 +12,7 @@ import type {
|
|
|
10
12
|
PTableSorting,
|
|
11
13
|
DataQuery,
|
|
12
14
|
SpecQuery,
|
|
15
|
+
SpecQueryJoinEntry,
|
|
13
16
|
SingleAxisSelector,
|
|
14
17
|
} from "@milaboratories/pl-model-common";
|
|
15
18
|
import type {
|
|
@@ -20,18 +23,29 @@ import type { DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discov
|
|
|
20
23
|
import type { FindColumnsRequest, FindColumnsResponse } from "./find_columns";
|
|
21
24
|
|
|
22
25
|
/**
|
|
23
|
-
*
|
|
26
|
+
* V3 PFrame interface — per-frame instance operations.
|
|
27
|
+
*
|
|
28
|
+
* Pure spec-assembly operations (e.g. {@link PFrameWasmAPIV3.buildQuery}) live
|
|
29
|
+
* on the API factory because they don't read frame state. Everything here
|
|
30
|
+
* consults the registered specs of this frame.
|
|
24
31
|
*/
|
|
25
|
-
export interface
|
|
32
|
+
export interface PFrameWasmV3 extends Disposable {
|
|
26
33
|
/**
|
|
27
34
|
* Deletes columns from a columns specification.
|
|
28
35
|
*/
|
|
29
36
|
deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
|
|
30
37
|
|
|
31
38
|
/**
|
|
32
|
-
*
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
* Lists all columns currently registered in this PFrame, with their ids and specs.
|
|
40
|
+
*/
|
|
41
|
+
listColumns(): PColumnInfo[];
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Discovers columns compatible with a given axes integration. Include and
|
|
45
|
+
* exclude filters are applied in order (exclude removes matches from the
|
|
46
|
+
* include set). Each hit carries its traversal `path`; feed the hit's
|
|
47
|
+
* column id and `path` into {@link PFrameWasmAPIV3.buildQuery} to
|
|
48
|
+
* materialize it as a {@link SpecQueryJoinEntry}.
|
|
35
49
|
*/
|
|
36
50
|
discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
|
|
37
51
|
|
|
@@ -52,13 +66,14 @@ export interface PFrameWasmV2 extends Disposable {
|
|
|
52
66
|
}
|
|
53
67
|
|
|
54
68
|
/**
|
|
55
|
-
*
|
|
69
|
+
* V3 PFrame API factory — pure spec-layer operations plus frame construction.
|
|
70
|
+
* Everything here is stateless and does not require a frame instance.
|
|
56
71
|
*/
|
|
57
|
-
export interface
|
|
72
|
+
export interface PFrameWasmAPIV3 {
|
|
58
73
|
/**
|
|
59
|
-
* Creates a new
|
|
74
|
+
* Creates a new V3 PFrame from a map of column IDs to column specifications.
|
|
60
75
|
*/
|
|
61
|
-
createPFrame(spec: Record<string, PColumnSpec>):
|
|
76
|
+
createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV3;
|
|
62
77
|
|
|
63
78
|
/**
|
|
64
79
|
* Expands an {@link AxesSpec} into {@link AxesId}s with parent information
|
|
@@ -82,6 +97,64 @@ export interface PFrameWasmAPIV2 {
|
|
|
82
97
|
* selector within a table spec. Returns -1 if not found.
|
|
83
98
|
*/
|
|
84
99
|
findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
|
|
103
|
+
* ordered path of wrapping steps (linker hops, filter joins).
|
|
104
|
+
*
|
|
105
|
+
* Right-fold over `path` starting from `Column(column)`: each `linker` step
|
|
106
|
+
* wraps the current subquery as `linkerJoin`, each `filter` step as
|
|
107
|
+
* `innerJoin` with the filter column. `qualifications` annotate the
|
|
108
|
+
* outermost entry only.
|
|
109
|
+
*
|
|
110
|
+
* Pure over its input — no frame needed. Column ids are resolved later at
|
|
111
|
+
* {@link PFrameWasmV3.evaluateQuery} against the registered specs. Throws
|
|
112
|
+
* only on malformed input: shape violations and unknown step tags (so v1
|
|
113
|
+
* callers are shielded from step variants added in later versions).
|
|
114
|
+
*/
|
|
115
|
+
buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* V2 PFrame interface. Superseded by {@link PFrameWasmV3}; will be removed
|
|
120
|
+
* in a future PFrames update.
|
|
121
|
+
*/
|
|
122
|
+
export interface PFrameWasmV2 extends Disposable {
|
|
123
|
+
/** @see PFrameWasmV3.deleteColumns */
|
|
124
|
+
deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
|
|
125
|
+
|
|
126
|
+
/** @see PFrameWasmV3.discoverColumns */
|
|
127
|
+
discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
|
|
128
|
+
|
|
129
|
+
/** @see PFrameWasmV3.findColumns */
|
|
130
|
+
findColumns(request: FindColumnsRequest): FindColumnsResponse;
|
|
131
|
+
|
|
132
|
+
/** @see PFrameWasmV3.evaluateQuery */
|
|
133
|
+
evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
|
|
134
|
+
|
|
135
|
+
/** @see PFrameWasmV3.rewriteLegacyQuery */
|
|
136
|
+
rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* V2 PFrame API factory. Superseded by {@link PFrameWasmAPIV3}; will be removed
|
|
141
|
+
* in a future PFrames update.
|
|
142
|
+
*/
|
|
143
|
+
export interface PFrameWasmAPIV2 {
|
|
144
|
+
/** @see PFrameWasmAPIV3.createPFrame */
|
|
145
|
+
createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV2;
|
|
146
|
+
|
|
147
|
+
/** @see PFrameWasmAPIV3.expandAxes */
|
|
148
|
+
expandAxes(spec: AxesSpec): AxesId;
|
|
149
|
+
|
|
150
|
+
/** @see PFrameWasmAPIV3.collapseAxes */
|
|
151
|
+
collapseAxes(ids: AxesId): AxesSpec;
|
|
152
|
+
|
|
153
|
+
/** @see PFrameWasmAPIV3.findAxis */
|
|
154
|
+
findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
|
|
155
|
+
|
|
156
|
+
/** @see PFrameWasmAPIV3.findTableColumn */
|
|
157
|
+
findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
|
|
85
158
|
}
|
|
86
159
|
|
|
87
160
|
/**
|
|
@@ -103,7 +176,7 @@ export type EvaluateQueryResponse = {
|
|
|
103
176
|
/**
|
|
104
177
|
* Represents a legacy (V4) query format used before the unified SpecQuery.
|
|
105
178
|
*
|
|
106
|
-
* This type is used with {@link
|
|
179
|
+
* This type is used with {@link PFrameWasmV3.rewriteLegacyQuery} to upgrade
|
|
107
180
|
* older query structures to the current {@link SpecQuery} format.
|
|
108
181
|
*/
|
|
109
182
|
export type LegacyQuery = {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AxisValueType,
|
|
3
3
|
ColumnValueType,
|
|
4
|
-
DiscoverColumnsLinkerStep,
|
|
5
4
|
DiscoverColumnsStepInfo,
|
|
6
5
|
PColumnIdAndSpec,
|
|
7
6
|
} from "@milaboratories/pl-model-common";
|
|
8
7
|
import type { AxisQualification, ColumnAxesWithQualifications } from "./common";
|
|
9
8
|
|
|
10
|
-
export type {
|
|
9
|
+
export type { DiscoverColumnsStepInfo };
|
|
11
10
|
|
|
12
11
|
/** Matches a string value either exactly or by regex pattern */
|
|
13
12
|
export type StringMatcher = { type: "exact"; value: string } | { type: "regex"; value: string };
|
|
@@ -90,17 +89,22 @@ export interface DiscoverColumnsMappingVariant {
|
|
|
90
89
|
distinctiveQualifications: DiscoverColumnsResponseQualifications;
|
|
91
90
|
}
|
|
92
91
|
|
|
93
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* A single hit in the discover columns response. Carries the matched column
|
|
94
|
+
* along with its integration metadata and the path traversed to reach it.
|
|
95
|
+
* To materialize the hit as an executable query, feed `hit.columnId` and
|
|
96
|
+
* `path` into the PFrame's `buildQuery`.
|
|
97
|
+
*/
|
|
94
98
|
export interface DiscoverColumnsResponseHit {
|
|
95
99
|
/** The column that was found compatible */
|
|
96
100
|
hit: PColumnIdAndSpec;
|
|
97
101
|
/** Possible ways to integrate this column with the existing set */
|
|
98
102
|
mappingVariants: DiscoverColumnsMappingVariant[];
|
|
99
|
-
/**
|
|
103
|
+
/** Steps traversed to reach this hit; empty for direct matches */
|
|
100
104
|
path: DiscoverColumnsStepInfo[];
|
|
101
105
|
}
|
|
102
106
|
|
|
103
|
-
/** Response from discover columns */
|
|
107
|
+
/** Response from discover columns. */
|
|
104
108
|
export interface DiscoverColumnsResponse {
|
|
105
109
|
/** Columns that could be integrated and possible ways to integrate them */
|
|
106
110
|
hits: DiscoverColumnsResponseHit[];
|