@milaboratories/pl-model-middle-layer 1.17.0 → 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.
@@ -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,23 +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, BuildQueryInput, DataQuery, JoinEntry, PColumnSpec, PObjectId, PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableSorting, SingleAxisSelector, SpecQuery, SpecQueryJoinEntry } 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
- * V3 PFrame interface: adds {@link PFrameWasmV3.buildQuery} on top of V2.
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
14
  interface PFrameWasmV3 extends Disposable {
11
15
  /**
12
16
  * Deletes columns from a columns specification.
13
17
  */
14
18
  deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
19
+ /**
20
+ * Lists all columns currently registered in this PFrame, with their ids and specs.
21
+ */
22
+ listColumns(): PColumnInfo[];
15
23
  /**
16
24
  * Discovers columns compatible with a given axes integration. Include and
17
25
  * exclude filters are applied in order (exclude removes matches from the
18
26
  * include set). Each hit carries its traversal `path`; feed the hit's
19
- * column id and `path` into {@link buildQuery} to materialize it as a
20
- * {@link SpecQueryJoinEntry}.
27
+ * column id and `path` into {@link PFrameWasmAPIV3.buildQuery} to
28
+ * materialize it as a {@link SpecQueryJoinEntry}.
21
29
  */
22
30
  discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
23
31
  /**
@@ -32,24 +40,10 @@ interface PFrameWasmV3 extends Disposable {
32
40
  * Rewrites a legacy query format (V4) to the current SpecQuery format.
33
41
  */
34
42
  rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
35
- /**
36
- * Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
37
- * ordered path of wrapping steps (linker hops, filter joins).
38
- *
39
- * Right-fold over `path` starting from `Column(column)`: each `linker` step
40
- * wraps the current subquery as `linkerJoin`, each `filter` step as
41
- * `innerJoin` with the filter column. `qualifications` annotate the
42
- * outermost entry only.
43
- *
44
- * Pure over its input — column ids are resolved later in
45
- * {@link evaluateQuery}. Throws only on malformed input: shape violations
46
- * and unknown step tags (so v1 callers are shielded from step variants
47
- * added in later versions).
48
- */
49
- buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
50
43
  }
51
44
  /**
52
- * V3 PFrame API factory with createPFrame returning {@link PFrameWasmV3}.
45
+ * V3 PFrame API factory — pure spec-layer operations plus frame construction.
46
+ * Everything here is stateless and does not require a frame instance.
53
47
  */
54
48
  interface PFrameWasmAPIV3 {
55
49
  /**
@@ -75,10 +69,25 @@ interface PFrameWasmAPIV3 {
75
69
  * selector within a table spec. Returns -1 if not found.
76
70
  */
77
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;
78
87
  }
79
88
  /**
80
- * V2 PFrame interface. Superseded by {@link PFrameWasmV3}, which adds
81
- * {@link PFrameWasmV3.buildQuery}. Will be removed in a future PFrames update.
89
+ * V2 PFrame interface. Superseded by {@link PFrameWasmV3}; will be removed
90
+ * in a future PFrames update.
82
91
  */
83
92
  interface PFrameWasmV2 extends Disposable {
84
93
  /** @see PFrameWasmV3.deleteColumns */
@@ -1 +1 @@
1
- {"version":3,"file":"api_wasm.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_wasm.ts"],"mappings":";;;;;;;;AA0BA;UAAiB,YAAA,SAAqB,UAAA;;;;EAIpC,aAAA,CAAc,OAAA,EAAS,8BAAA,GAAiC,+BAAA;EASJ;;;;;;;EAApD,eAAA,CAAgB,OAAA,EAAS,wBAAA,GAA2B,uBAAA;EA+BhB;;;EA1BpC,WAAA,CAAY,OAAA,EAAS,kBAAA,GAAqB,mBAAA;EAlBN;;;EAuBpC,aAAA,CAAc,OAAA,EAAS,SAAA,GAAY,qBAAA;EAnBqB;;;EAwBxD,kBAAA,CAAmB,OAAA,EAAS,WAAA,GAAc,SAAA;EAfU;;;;;;;;;;;;;;EA+BpD,UAAA,CAAW,KAAA,EAAO,eAAA,GAAkB,kBAAA;AAAA;;;;UAMrB,eAAA;EAAe;;;EAI9B,YAAA,CAAa,IAAA,EAAM,MAAA,SAAe,WAAA,IAAe,YAAA;EAAA;;;;EAMjD,UAAA,CAAW,IAAA,EAAM,QAAA,GAAW,MAAA;EAWb;;;EANf,YAAA,CAAa,GAAA,EAAK,MAAA,GAAS,QAAA;EAY4C;;;;EANvE,QAAA,CAAS,IAAA,EAAM,QAAA,EAAU,QAAA,EAAU,kBAAA;EAjBtB;;;;EAuBb,eAAA,CAAgB,SAAA,EAAW,gBAAA,IAAoB,QAAA,EAAU,cAAA;AAAA;;;;;UAO1C,YAAA,SAAqB,UAAA;EAbrB;EAef,aAAA,CAAc,OAAA,EAAS,8BAAA,GAAiC,+BAAA;EAfrB;EAkBnC,eAAA,CAAgB,OAAA,EAAS,wBAAA,GAA2B,uBAAA;EAZpD;EAeA,WAAA,CAAY,OAAA,EAAS,k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;KAuCY,WAAA;EArCuC,0EAuCjD,GAAA,EAAK,SAAA,CAAU,SAAA,GApCa;EAsC5B,OAAA,GAAU,kBAAA,IAnCiB;EAqC3B,OAAA,GAAU,aAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-model-middle-layer",
3
- "version": "1.17.0",
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/helpers": "1.14.1",
24
- "@milaboratories/pl-model-common": "1.32.0"
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
29
  "@milaboratories/ts-builder": "1.3.2",
30
- "@milaboratories/ts-configs": "1.2.3",
31
- "@milaboratories/build-configs": "2.0.0"
30
+ "@milaboratories/build-configs": "2.0.0",
31
+ "@milaboratories/ts-configs": "1.2.3"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "ts-builder build --target node",
@@ -3,6 +3,7 @@ import type {
3
3
  AxesSpec,
4
4
  BuildQueryInput,
5
5
  JoinEntry,
6
+ PColumnInfo,
6
7
  PColumnSpec,
7
8
  PObjectId,
8
9
  PTableColumnId,
@@ -22,7 +23,11 @@ import type { DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discov
22
23
  import type { FindColumnsRequest, FindColumnsResponse } from "./find_columns";
23
24
 
24
25
  /**
25
- * V3 PFrame interface: adds {@link PFrameWasmV3.buildQuery} on top of V2.
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.
26
31
  */
27
32
  export interface PFrameWasmV3 extends Disposable {
28
33
  /**
@@ -30,12 +35,17 @@ export interface PFrameWasmV3 extends Disposable {
30
35
  */
31
36
  deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
32
37
 
38
+ /**
39
+ * Lists all columns currently registered in this PFrame, with their ids and specs.
40
+ */
41
+ listColumns(): PColumnInfo[];
42
+
33
43
  /**
34
44
  * Discovers columns compatible with a given axes integration. Include and
35
45
  * exclude filters are applied in order (exclude removes matches from the
36
46
  * include set). Each hit carries its traversal `path`; feed the hit's
37
- * column id and `path` into {@link buildQuery} to materialize it as a
38
- * {@link SpecQueryJoinEntry}.
47
+ * column id and `path` into {@link PFrameWasmAPIV3.buildQuery} to
48
+ * materialize it as a {@link SpecQueryJoinEntry}.
39
49
  */
40
50
  discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
41
51
 
@@ -53,26 +63,11 @@ export interface PFrameWasmV3 extends Disposable {
53
63
  * Rewrites a legacy query format (V4) to the current SpecQuery format.
54
64
  */
55
65
  rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
56
-
57
- /**
58
- * Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
59
- * ordered path of wrapping steps (linker hops, filter joins).
60
- *
61
- * Right-fold over `path` starting from `Column(column)`: each `linker` step
62
- * wraps the current subquery as `linkerJoin`, each `filter` step as
63
- * `innerJoin` with the filter column. `qualifications` annotate the
64
- * outermost entry only.
65
- *
66
- * Pure over its input — column ids are resolved later in
67
- * {@link evaluateQuery}. Throws only on malformed input: shape violations
68
- * and unknown step tags (so v1 callers are shielded from step variants
69
- * added in later versions).
70
- */
71
- buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
72
66
  }
73
67
 
74
68
  /**
75
- * V3 PFrame API factory with createPFrame returning {@link PFrameWasmV3}.
69
+ * V3 PFrame API factory — pure spec-layer operations plus frame construction.
70
+ * Everything here is stateless and does not require a frame instance.
76
71
  */
77
72
  export interface PFrameWasmAPIV3 {
78
73
  /**
@@ -102,11 +97,27 @@ export interface PFrameWasmAPIV3 {
102
97
  * selector within a table spec. Returns -1 if not found.
103
98
  */
104
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;
105
116
  }
106
117
 
107
118
  /**
108
- * V2 PFrame interface. Superseded by {@link PFrameWasmV3}, which adds
109
- * {@link PFrameWasmV3.buildQuery}. Will be removed in a future PFrames update.
119
+ * V2 PFrame interface. Superseded by {@link PFrameWasmV3}; will be removed
120
+ * in a future PFrames update.
110
121
  */
111
122
  export interface PFrameWasmV2 extends Disposable {
112
123
  /** @see PFrameWasmV3.deleteColumns */