@milaboratories/pl-model-middle-layer 1.15.0 → 1.16.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.
@@ -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,69 +1,9 @@
1
1
  import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
2
2
  import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
3
- import { DiscoverColumnsRequest, DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discover_columns.js";
3
+ import { DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discover_columns.js";
4
4
  import { AxesId, AxesSpec, DataQuery, JoinEntry, PColumnSpec, PObjectId, PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableSorting, SingleAxisSelector, SpecQuery } from "@milaboratories/pl-model-common";
5
5
 
6
6
  //#region src/pframe/internal_api/api_wasm.d.ts
7
- interface PFrameWasmAPI {
8
- /**
9
- * Creates a new PFrame from a map of column IDs to column specifications.
10
- */
11
- createPFrame(spec: Record<string, PColumnSpec>): PFrameWasm;
12
- /**
13
- * Expands an {@link AxesSpec} into {@link AxesId}s with parent information
14
- * resolved.
15
- */
16
- expandAxes(spec: AxesSpec): AxesId;
17
- /**
18
- * Collapses {@link AxesId} into {@link AxesSpec}.
19
- */
20
- collapseAxes(ids: AxesId): AxesSpec;
21
- /**
22
- * Finds the index of an axis matching the given selector.
23
- * Returns -1 if no matching axis is found.
24
- */
25
- findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
26
- /**
27
- * Finds the flat index of a table column matching the given
28
- * selector within a table spec. Returns -1 if not found.
29
- */
30
- findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
31
- }
32
- /**
33
- * A PFrame represents a collection of columns that can be queried and joined.
34
- */
35
- interface PFrameWasm extends Disposable {
36
- /**
37
- * Deletes columns from a columns specification.
38
- */
39
- deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
40
- /**
41
- * Discovers columns compatible with a given axes integration.
42
- * Returns columns that could be integrated with the provided column set,
43
- * along with possible mapping variants describing how to integrate them.
44
- */
45
- discoverColumns(request: DiscoverColumnsRequest): DiscoverColumnsResponse;
46
- /**
47
- * Finds columns in the PFrame matching the given filter criteria.
48
- */
49
- findColumns(request: FindColumnsRequest): FindColumnsResponse;
50
- /**
51
- * Evaluates a query specification against this PFrame.
52
- *
53
- * Takes a SpecQuery (which can represent columns, joins, filters, sorts,
54
- * etc.) and returns the resulting table specification along with the data
55
- * layer query representation.
56
- */
57
- evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
58
- /**
59
- * Rewrites a legacy query format (V4) to the current SpecQuery format.
60
- *
61
- * This method upgrades older query structures that use JoinEntryV4, filters,
62
- * and sorting into the new unified SpecQuery format with proper filter and
63
- * sort query nodes.
64
- */
65
- rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
66
- }
67
7
  /**
68
8
  * V2 PFrame interface with include/exclude column filtering in discoverColumns.
69
9
  */
@@ -137,7 +77,7 @@ type EvaluateQueryResponse = {
137
77
  /**
138
78
  * Represents a legacy (V4) query format used before the unified SpecQuery.
139
79
  *
140
- * This type is used with {@link PFrameWasm.rewriteLegacyQuery} to upgrade
80
+ * This type is used with {@link PFrameWasmV2.rewriteLegacyQuery} to upgrade
141
81
  * older query structures to the current {@link SpecQuery} format.
142
82
  */
143
83
  type LegacyQuery = {
@@ -146,5 +86,5 @@ type LegacyQuery = {
146
86
  sorting?: PTableSorting[];
147
87
  };
148
88
  //#endregion
149
- export { EvaluateQueryResponse, LegacyQuery, PFrameWasm, PFrameWasmAPI, PFrameWasmAPIV2, PFrameWasmV2 };
89
+ export { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmV2 };
150
90
  //# sourceMappingURL=api_wasm.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { AxisQualification, ColumnAxesWithQualifications } from "./common.js";
2
- import { DiscoverColumnsLinkerStep, DiscoverColumnsStepInfo, PColumnIdAndSpec } from "@milaboratories/pl-model-common";
2
+ import { AxisValueType, ColumnValueType, DiscoverColumnsLinkerStep, 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 */
@@ -15,7 +15,7 @@ type MatcherMap = Record<string, StringMatcher[]>;
15
15
  /** Selector for matching axes by various criteria */
16
16
  interface MultiAxisSelector {
17
17
  /** Match any of the axis types listed here */
18
- readonly type?: string[];
18
+ readonly type?: AxisValueType[];
19
19
  /** Match any of the axis names listed here */
20
20
  readonly name?: StringMatcher[];
21
21
  /** Match requires all the domains listed here */
@@ -29,7 +29,7 @@ interface MultiAxisSelector {
29
29
  * Multiple selectors are OR-ed: a column matches if it satisfies any selector. */
30
30
  interface MultiColumnSelector {
31
31
  /** Match any of the value types listed here */
32
- readonly type?: string[];
32
+ readonly type?: ColumnValueType[];
33
33
  /** Match any of the names listed here */
34
34
  readonly name?: StringMatcher[];
35
35
  /** Match requires all the domains listed here */
@@ -54,15 +54,6 @@ interface DiscoverColumnsConstraints {
54
54
  /** Allow hit column axes to be qualified (contextDomain extended) */
55
55
  allowHitQualifications: boolean;
56
56
  }
57
- /** Request for discovering columns compatible with a given axes integration */
58
- interface DiscoverColumnsRequest {
59
- /** Column filters (OR-ed); empty array matches all columns */
60
- columnFilter?: MultiColumnSelector[];
61
- /** Already integrated axes with qualifications */
62
- axes: ColumnAxesWithQualifications[];
63
- /** Constraints controlling axes matching and qualification behavior */
64
- constraints: DiscoverColumnsConstraints;
65
- }
66
57
  /** V2 request with separate include/exclude filters */
67
58
  interface DiscoverColumnsRequestV2 {
68
59
  /** Include columns matching these selectors (OR-ed); empty or omitted matches all columns */
@@ -105,5 +96,5 @@ interface DiscoverColumnsResponse {
105
96
  hits: DiscoverColumnsResponseHit[];
106
97
  }
107
98
  //#endregion
108
- export { DiscoverColumnsConstraints, type DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, type DiscoverColumnsStepInfo, MatcherMap, MultiAxisSelector, MultiColumnSelector, StringMatcher };
99
+ export { DiscoverColumnsConstraints, type DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, type DiscoverColumnsStepInfo, MatcherMap, MultiAxisSelector, MultiColumnSelector, StringMatcher };
109
100
  //# sourceMappingURL=discover_columns.d.ts.map
@@ -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, DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, MatcherMap, MultiAxisSelector, MultiColumnSelector, StringMatcher } from "./discover_columns.js";
10
- import { EvaluateQueryResponse, LegacyQuery, PFrameWasm, PFrameWasmAPI, PFrameWasmAPIV2, PFrameWasmV2 } from "./api_wasm.js";
9
+ import { DiscoverColumnsConstraints, DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, MatcherMap, MultiAxisSelector, MultiColumnSelector, StringMatcher } from "./discover_columns.js";
10
+ import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmV2 } 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, DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, 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, PFrameWasm, PFrameWasmAPI, PFrameWasmAPIV2, PFrameWasmV2, PTableId, PTableV8, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher };
16
+ export { ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsLinkerStep, 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, PFrameWasmV2, 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.15.0",
3
+ "version": "1.16.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.23.8",
23
23
  "@milaboratories/helpers": "1.14.0",
24
- "@milaboratories/pl-model-common": "1.28.0"
24
+ "@milaboratories/pl-model-common": "1.30.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "~24.5.2",
28
28
  "typescript": "~5.9.3",
29
- "@milaboratories/build-configs": "1.5.2",
30
29
  "@milaboratories/ts-builder": "1.3.0",
31
- "@milaboratories/ts-configs": "1.2.2"
30
+ "@milaboratories/ts-configs": "1.2.2",
31
+ "@milaboratories/build-configs": "1.5.2"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "ts-builder build --target node",
@@ -16,82 +16,9 @@ import type {
16
16
  DeleteColumnFromColumnsRequest,
17
17
  DeleteColumnFromColumnsResponse,
18
18
  } from "./delete_column";
19
- import type {
20
- DiscoverColumnsRequest,
21
- DiscoverColumnsRequestV2,
22
- DiscoverColumnsResponse,
23
- } from "./discover_columns";
19
+ import type { DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discover_columns";
24
20
  import type { FindColumnsRequest, FindColumnsResponse } from "./find_columns";
25
21
 
26
- export interface PFrameWasmAPI {
27
- /**
28
- * Creates a new PFrame from a map of column IDs to column specifications.
29
- */
30
- createPFrame(spec: Record<string, PColumnSpec>): PFrameWasm;
31
-
32
- /**
33
- * Expands an {@link AxesSpec} into {@link AxesId}s with parent information
34
- * resolved.
35
- */
36
- expandAxes(spec: AxesSpec): AxesId;
37
-
38
- /**
39
- * Collapses {@link AxesId} into {@link AxesSpec}.
40
- */
41
- collapseAxes(ids: AxesId): AxesSpec;
42
-
43
- /**
44
- * Finds the index of an axis matching the given selector.
45
- * Returns -1 if no matching axis is found.
46
- */
47
- findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
48
-
49
- /**
50
- * Finds the flat index of a table column matching the given
51
- * selector within a table spec. Returns -1 if not found.
52
- */
53
- findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
54
- }
55
-
56
- /**
57
- * A PFrame represents a collection of columns that can be queried and joined.
58
- */
59
- export interface PFrameWasm extends Disposable {
60
- /**
61
- * Deletes columns from a columns specification.
62
- */
63
- deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
64
-
65
- /**
66
- * Discovers columns compatible with a given axes integration.
67
- * Returns columns that could be integrated with the provided column set,
68
- * along with possible mapping variants describing how to integrate them.
69
- */
70
- discoverColumns(request: DiscoverColumnsRequest): DiscoverColumnsResponse;
71
-
72
- /**
73
- * Finds columns in the PFrame matching the given filter criteria.
74
- */
75
- findColumns(request: FindColumnsRequest): FindColumnsResponse;
76
- /**
77
- * Evaluates a query specification against this PFrame.
78
- *
79
- * Takes a SpecQuery (which can represent columns, joins, filters, sorts,
80
- * etc.) and returns the resulting table specification along with the data
81
- * layer query representation.
82
- */
83
- evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
84
-
85
- /**
86
- * Rewrites a legacy query format (V4) to the current SpecQuery format.
87
- *
88
- * This method upgrades older query structures that use JoinEntryV4, filters,
89
- * and sorting into the new unified SpecQuery format with proper filter and
90
- * sort query nodes.
91
- */
92
- rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
93
- }
94
-
95
22
  /**
96
23
  * V2 PFrame interface with include/exclude column filtering in discoverColumns.
97
24
  */
@@ -176,7 +103,7 @@ export type EvaluateQueryResponse = {
176
103
  /**
177
104
  * Represents a legacy (V4) query format used before the unified SpecQuery.
178
105
  *
179
- * This type is used with {@link PFrameWasm.rewriteLegacyQuery} to upgrade
106
+ * This type is used with {@link PFrameWasmV2.rewriteLegacyQuery} to upgrade
180
107
  * older query structures to the current {@link SpecQuery} format.
181
108
  */
182
109
  export type LegacyQuery = {
@@ -1,4 +1,6 @@
1
1
  import type {
2
+ AxisValueType,
3
+ ColumnValueType,
2
4
  DiscoverColumnsLinkerStep,
3
5
  DiscoverColumnsStepInfo,
4
6
  PColumnIdAndSpec,
@@ -16,7 +18,7 @@ export type MatcherMap = Record<string, StringMatcher[]>;
16
18
  /** Selector for matching axes by various criteria */
17
19
  export interface MultiAxisSelector {
18
20
  /** Match any of the axis types listed here */
19
- readonly type?: string[];
21
+ readonly type?: AxisValueType[];
20
22
  /** Match any of the axis names listed here */
21
23
  readonly name?: StringMatcher[];
22
24
  /** Match requires all the domains listed here */
@@ -31,7 +33,7 @@ export interface MultiAxisSelector {
31
33
  * Multiple selectors are OR-ed: a column matches if it satisfies any selector. */
32
34
  export interface MultiColumnSelector {
33
35
  /** Match any of the value types listed here */
34
- readonly type?: string[];
36
+ readonly type?: ColumnValueType[];
35
37
  /** Match any of the names listed here */
36
38
  readonly name?: StringMatcher[];
37
39
  /** Match requires all the domains listed here */
@@ -58,16 +60,6 @@ export interface DiscoverColumnsConstraints {
58
60
  allowHitQualifications: boolean;
59
61
  }
60
62
 
61
- /** Request for discovering columns compatible with a given axes integration */
62
- export interface DiscoverColumnsRequest {
63
- /** Column filters (OR-ed); empty array matches all columns */
64
- columnFilter?: MultiColumnSelector[];
65
- /** Already integrated axes with qualifications */
66
- axes: ColumnAxesWithQualifications[];
67
- /** Constraints controlling axes matching and qualification behavior */
68
- constraints: DiscoverColumnsConstraints;
69
- }
70
-
71
63
  /** V2 request with separate include/exclude filters */
72
64
  export interface DiscoverColumnsRequestV2 {
73
65
  /** Include columns matching these selectors (OR-ed); empty or omitted matches all columns */