@milaboratories/pl-model-middle-layer 1.25.0 → 1.27.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.
@@ -659,6 +659,14 @@ declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
659
659
  requiredCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
660
660
  }, ZodTypeAny, "passthrough">>;
661
661
  }, "strip", ZodTypeAny, {
662
+ components: {
663
+ workflow: WorkflowV1<string> | {
664
+ type: "workflow-v1";
665
+ main: string;
666
+ };
667
+ model: string;
668
+ ui: string;
669
+ };
662
670
  meta: {
663
671
  organization: {
664
672
  name: string;
@@ -722,15 +730,15 @@ declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
722
730
  } & {
723
731
  [k: string]: unknown;
724
732
  };
733
+ }, {
725
734
  components: {
726
- workflow: WorkflowV1<string> | {
735
+ workflow: string | {
727
736
  type: "workflow-v1";
728
737
  main: string;
729
738
  };
730
739
  model: string;
731
740
  ui: string;
732
741
  };
733
- }, {
734
742
  meta: {
735
743
  organization: {
736
744
  name: string;
@@ -794,14 +802,6 @@ declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
794
802
  } & {
795
803
  [k: string]: unknown;
796
804
  };
797
- components: {
798
- workflow: string | {
799
- type: "workflow-v1";
800
- main: string;
801
- };
802
- model: string;
803
- ui: string;
804
- };
805
805
  }>;
806
806
  declare const FeatureFlags: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>;
807
807
  declare function CreateBlockPackDescriptionSchema<Components extends ZodTypeAny, Meta extends ZodTypeAny>(components: Components, meta: Meta): z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"api_factory.cjs","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PColumnSpec,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/** API exposed by PFrames library allowing to create and provide data for\n * PFrame objects */\nexport interface PFrameFactoryAPIV4 extends Disposable {\n /** Associates data source with this PFrame */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /** Adds PColumn without data info */\n addColumnSpec(columnId: PObjectId, columnSpec: PColumnSpec): void;\n\n /**\n * Assign data info to the specified PColumn.\n * For parquet data info, schema resolution via network is performed during this call.\n */\n setColumnData(\n columnId: PObjectId,\n dataInfo: DataInfo<PFrameBlobId>,\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n\n/**\n * Structural type information needed by the data side: axis value\n * types and column value types, in their canonical order. Mirrors\n * the bridge-side `TypeSpec`.\n */\nexport interface PColumnValueTypeSpec {\n readonly axes: AxisValueType[];\n readonly columns: ColumnValueType[];\n}\n\n/** Single column entry for {@link PFrameFactoryAPIV5.addColumns}. */\nexport interface AddColumnEntry {\n /** Unique column identifier within the PFrame. */\n readonly id: PObjectId;\n /** Structural type info (axes / column value types). */\n readonly typeSpec: PColumnValueTypeSpec;\n /** Data info for the column. */\n readonly data: DataInfo<PFrameBlobId>;\n}\n\n/** API for populating a PFrame with columns and a data source. */\nexport interface PFrameFactoryAPIV5 extends Disposable {\n /** Associates data source with this PFrame. */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /**\n * Registers all PColumns at once: specs are recorded and data info\n * is attached atomically. For parquet data info, schema resolution\n * via network is performed during this call.\n */\n addColumns(\n columns: AddColumnEntry[],\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"mappings":";;AAeA,MAAa,gBAAgB;;AAG7B,MAAa,oBAAoB"}
1
+ {"version":3,"file":"api_factory.cjs","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/**\n * Structural type information needed by the data side: axis value\n * types and column value types, in their canonical order. Mirrors\n * the bridge-side `TypeSpec`.\n */\nexport interface PColumnValueTypeSpec {\n readonly axes: AxisValueType[];\n readonly columns: ColumnValueType[];\n}\n\n/** Single column entry for {@link PFrameFactoryAPIV5.addColumns}. */\nexport interface AddColumnEntry {\n /** Unique column identifier within the PFrame. */\n readonly id: PObjectId;\n /** Structural type info (axes / column value types). */\n readonly typeSpec: PColumnValueTypeSpec;\n /** Data info for the column. */\n readonly data: DataInfo<PFrameBlobId>;\n}\n\n/** API for populating a PFrame with columns and a data source. */\nexport interface PFrameFactoryAPIV5 extends Disposable {\n /** Associates data source with this PFrame. */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /**\n * Registers all PColumns at once: specs are recorded and data info\n * is attached atomically. For parquet data info, schema resolution\n * via network is performed during this call.\n */\n addColumns(\n columns: AddColumnEntry[],\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"mappings":";;AAcA,MAAa,gBAAgB;;AAG7B,MAAa,oBAAoB"}
@@ -1,5 +1,5 @@
1
1
  import { HttpServerInfo } from "./http_helpers.js";
2
- import { AxisValueType, BinaryPartitionedDataInfo, Branded, ColumnValueType, JsonDataInfo, JsonPartitionedDataInfo, PColumnSpec, PObjectId, ParquetChunk, ParquetPartitionedDataInfo } from "@milaboratories/pl-model-common";
2
+ import { AxisValueType, BinaryPartitionedDataInfo, Branded, ColumnValueType, JsonDataInfo, JsonPartitionedDataInfo, PObjectId, ParquetChunk, ParquetPartitionedDataInfo } from "@milaboratories/pl-model-common";
3
3
 
4
4
  //#region src/pframe/internal_api/api_factory.d.ts
5
5
  /** PColumn spec file extension */
@@ -34,24 +34,6 @@ interface PFrameDataSourceV2 {
34
34
  * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)
35
35
  */
36
36
  type DataInfo<Blob> = JsonDataInfo | JsonPartitionedDataInfo<Blob> | BinaryPartitionedDataInfo<Blob> | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;
37
- /** API exposed by PFrames library allowing to create and provide data for
38
- * PFrame objects */
39
- interface PFrameFactoryAPIV4 extends Disposable {
40
- /** Associates data source with this PFrame */
41
- setDataSource(dataSource: PFrameDataSourceV2): void;
42
- /** Adds PColumn without data info */
43
- addColumnSpec(columnId: PObjectId, columnSpec: PColumnSpec): void;
44
- /**
45
- * Assign data info to the specified PColumn.
46
- * For parquet data info, schema resolution via network is performed during this call.
47
- */
48
- setColumnData(columnId: PObjectId, dataInfo: DataInfo<PFrameBlobId>, options?: {
49
- signal?: AbortSignal;
50
- }): Promise<void>;
51
- /** Releases all the data previously added to PFrame using methods above,
52
- * any interactions with disposed PFrame will result in exception */
53
- dispose(): void;
54
- }
55
37
  /**
56
38
  * Structural type information needed by the data side: axis value
57
39
  * types and column value types, in their canonical order. Mirrors
@@ -87,5 +69,5 @@ interface PFrameFactoryAPIV5 extends Disposable {
87
69
  dispose(): void;
88
70
  }
89
71
  //#endregion
90
- export { AddColumnEntry, DataInfo, DataInfoExtension, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV4, PFrameFactoryAPIV5, SpecExtension };
72
+ export { AddColumnEntry, DataInfo, DataInfoExtension, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, SpecExtension };
91
73
  //# sourceMappingURL=api_factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api_factory.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"mappings":";;;;;cAea,aAAA;AAAb;AAAA,cAGa,iBAAA;;KAGD,YAAA,GAAe,OAAA;;AAH3B;KAOY,QAAA;;UAGK,kBAAA;EAVoC;AAGrD;;;;EAaE,WAAA,CAAY,OAAA,EAAS,YAAA,KAAiB,OAAA;EAT5B;EAYV,kBAAA,CAAmB,MAAA,EAAQ,YAAA,GAAe,OAAA,CAAQ,UAAA;;;;AATpD;EAeE,aAAA,GAAgB,cAAA;AAAA;;;;;;;KASN,QAAA,SACR,YAAA,GACA,uBAAA,CAAwB,IAAA,IACxB,yBAAA,CAA0B,IAAA,IAC1B,0BAAA,CAA2B,YAAA,CAAa,IAAA;;;UAI3B,kBAAA,SAA2B,UAAA;EA1B9B;EA4BZ,aAAA,CAAc,UAAA,EAAY,kBAAA;EAzB1B;EA4BA,aAAA,CAAc,QAAA,EAAU,SAAA,EAAW,UAAA,EAAY,WAAA;EA5B5B;;;;EAkCnB,aAAA,CACE,QAAA,EAAU,SAAA,EACV,QAAA,EAAU,QAAA,CAAS,YAAA,GACnB,OAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA;EAzBO;;EA6BV,OAAA;AAAA;;;;;;UAQe,oBAAA;EAAA,SACN,IAAA,EAAM,aAAA;EAAA,SACN,OAAA,EAAS,eAAA;AAAA;;UAIH,cAAA;EAzCb;EAAA,SA2CO,EAAA,EAAI,SAAA;EA1CX;EAAA,SA4CO,QAAA,EAAU,oBAAA;EA3CjB;EAAA,SA6CO,IAAA,EAAM,QAAA,CAAS,YAAA;AAAA;;UAIT,kBAAA,SAA2B,UAAA;EA7C3B;EA+Cf,aAAA,CAAc,UAAA,EAAY,kBAAA;;;;;;EAO1B,UAAA,CACE,OAAA,EAAS,cAAA,IACT,OAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA;EA1CA;;EA8CH,OAAA;AAAA"}
1
+ {"version":3,"file":"api_factory.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"mappings":";;;;;cAca,aAAA;AAAb;AAAA,cAGa,iBAAA;;KAGD,YAAA,GAAe,OAAA;;AAH3B;KAOY,QAAA;;UAGK,kBAAA;EAVoC;AAGrD;;;;EAaE,WAAA,CAAY,OAAA,EAAS,YAAA,KAAiB,OAAA;EAT5B;EAYV,kBAAA,CAAmB,MAAA,EAAQ,YAAA,GAAe,OAAA,CAAQ,UAAA;;;;AATpD;EAeE,aAAA,GAAgB,cAAA;AAAA;;;;;;;KASN,QAAA,SACR,YAAA,GACA,uBAAA,CAAwB,IAAA,IACxB,yBAAA,CAA0B,IAAA,IAC1B,0BAAA,CAA2B,YAAA,CAAa,IAAA;;;;;;UAO3B,oBAAA;EAAA,SACN,IAAA,EAAM,aAAA;EAAA,SACN,OAAA,EAAS,eAAA;AAAA;;UAIH,cAAA;EA1BC;EAAA,SA4BP,EAAA,EAAI,SAAA;EA5BiB;EAAA,SA8BrB,QAAA,EAAU,oBAAA;EArBD;EAAA,SAuBT,IAAA,EAAM,QAAA,CAAS,YAAA;AAAA;;UAIT,kBAAA,SAA2B,UAAA;EAxBd;EA0B5B,aAAA,CAAc,UAAA,EAAY,kBAAA;EAzBgB;;;;;EAgC1C,UAAA,CACE,OAAA,EAAS,cAAA,IACT,OAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA;EAvCuB;;EA2C1B,OAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"api_factory.js","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PColumnSpec,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/** API exposed by PFrames library allowing to create and provide data for\n * PFrame objects */\nexport interface PFrameFactoryAPIV4 extends Disposable {\n /** Associates data source with this PFrame */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /** Adds PColumn without data info */\n addColumnSpec(columnId: PObjectId, columnSpec: PColumnSpec): void;\n\n /**\n * Assign data info to the specified PColumn.\n * For parquet data info, schema resolution via network is performed during this call.\n */\n setColumnData(\n columnId: PObjectId,\n dataInfo: DataInfo<PFrameBlobId>,\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n\n/**\n * Structural type information needed by the data side: axis value\n * types and column value types, in their canonical order. Mirrors\n * the bridge-side `TypeSpec`.\n */\nexport interface PColumnValueTypeSpec {\n readonly axes: AxisValueType[];\n readonly columns: ColumnValueType[];\n}\n\n/** Single column entry for {@link PFrameFactoryAPIV5.addColumns}. */\nexport interface AddColumnEntry {\n /** Unique column identifier within the PFrame. */\n readonly id: PObjectId;\n /** Structural type info (axes / column value types). */\n readonly typeSpec: PColumnValueTypeSpec;\n /** Data info for the column. */\n readonly data: DataInfo<PFrameBlobId>;\n}\n\n/** API for populating a PFrame with columns and a data source. */\nexport interface PFrameFactoryAPIV5 extends Disposable {\n /** Associates data source with this PFrame. */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /**\n * Registers all PColumns at once: specs are recorded and data info\n * is attached atomically. For parquet data info, schema resolution\n * via network is performed during this call.\n */\n addColumns(\n columns: AddColumnEntry[],\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"mappings":";;AAeA,MAAa,gBAAgB;;AAG7B,MAAa,oBAAoB"}
1
+ {"version":3,"file":"api_factory.js","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/**\n * Structural type information needed by the data side: axis value\n * types and column value types, in their canonical order. Mirrors\n * the bridge-side `TypeSpec`.\n */\nexport interface PColumnValueTypeSpec {\n readonly axes: AxisValueType[];\n readonly columns: ColumnValueType[];\n}\n\n/** Single column entry for {@link PFrameFactoryAPIV5.addColumns}. */\nexport interface AddColumnEntry {\n /** Unique column identifier within the PFrame. */\n readonly id: PObjectId;\n /** Structural type info (axes / column value types). */\n readonly typeSpec: PColumnValueTypeSpec;\n /** Data info for the column. */\n readonly data: DataInfo<PFrameBlobId>;\n}\n\n/** API for populating a PFrame with columns and a data source. */\nexport interface PFrameFactoryAPIV5 extends Disposable {\n /** Associates data source with this PFrame. */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /**\n * Registers all PColumns at once: specs are recorded and data info\n * is attached atomically. For parquet data info, schema resolution\n * via network is performed during this call.\n */\n addColumns(\n columns: AddColumnEntry[],\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"mappings":";;AAcA,MAAa,gBAAgB;;AAG7B,MAAa,oBAAoB"}
@@ -1,43 +1,8 @@
1
+ import { PTableV10, PTableV9 } from "./table.js";
1
2
  import { PTableId } from "./common.js";
2
- import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
3
- import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
4
- import { CreateTableRequestV4 } from "./create_table.js";
5
- import { PTableV8, PTableV9 } from "./table.js";
6
- import { DataQuery, DataQueryBooleanExpression, PColumnInfo, PColumnSpec, PObjectId, PTableColumnSpec, UniqueValuesRequest, UniqueValuesResponse } from "@milaboratories/pl-model-common";
3
+ import { DataQuery, DataQueryBooleanExpression, PObjectId, UniqueValuesResponse } from "@milaboratories/pl-model-common";
7
4
 
8
5
  //#region src/pframe/internal_api/api_read.d.ts
9
- /** Read interface exposed by PFrames library */
10
- interface PFrameReadAPIV11 {
11
- /**
12
- * Finds columns given filtering criteria on column name, annotations etc.
13
- * and a set of qualified axes specs to find only columns with compatible
14
- * axes spec.
15
- *
16
- * Only column specs are used, this method will work even for columns
17
- * with no assigned data.
18
- * */
19
- findColumns(request: FindColumnsRequest): Promise<FindColumnsResponse>;
20
- /**
21
- * Construct new axes integration with some entry removed but integration qualificaitons preserved.
22
- * Removes more then one entry in case the removal will create several disjoint sets of axes.
23
- */
24
- deleteColumn(request: DeleteColumnFromColumnsRequest): Promise<DeleteColumnFromColumnsResponse>;
25
- /** Retrieve single column spec */
26
- getColumnSpec(columnId: PObjectId): Promise<PColumnSpec | null>;
27
- /** Retrieve information about all columns currently added to the PFrame */
28
- listColumns(): Promise<PColumnInfo[]>;
29
- /** Calculates data for the table and returns an object to access it */
30
- createTable(tableId: PTableId, request: CreateTableRequestV4): PTableV8;
31
- /** Creates table from data query and returns an object to access it */
32
- createTableV2(tableId: PTableId, request: {
33
- tableSpec: PTableColumnSpec[];
34
- dataQuery: DataQuery;
35
- }): PTableV8;
36
- /** Calculate set of unique values for a specific axis for the filtered set of records */
37
- getUniqueValues(request: UniqueValuesRequest, ops?: {
38
- signal?: AbortSignal;
39
- }): Promise<UniqueValuesResponse>;
40
- }
41
6
  /**
42
7
  * V2 unique-values request. Axis and filter references are
43
8
  * pre-resolved to numeric indices; no selector ids cross the API
@@ -75,6 +40,27 @@ interface PFrameReadAPIV12 {
75
40
  signal?: AbortSignal;
76
41
  }): Promise<UniqueValuesResponse>;
77
42
  }
43
+ /**
44
+ * Read interface exposed by PFrames library.
45
+ *
46
+ * Identical to {@link PFrameReadAPIV12} but returns the {@link PTableV10}
47
+ * table view, which adds the `export` method.
48
+ *
49
+ * Spec-side operations (finding columns, listing columns, retrieving
50
+ * column specs, computing axis integrations) are not part of this
51
+ * surface — callers cache column specs themselves or route through
52
+ * WASM-spec. The data-side `createTable` accepts a pre-lowered
53
+ * `DataQuery`; `getUniqueValues` takes pre-resolved indices via
54
+ * {@link UniqueValuesRequestV2}.
55
+ */
56
+ interface PFrameReadAPIV13 {
57
+ /** Creates table from a pre-lowered data query. */
58
+ createTable(tableId: PTableId, dataQuery: DataQuery): PTableV10;
59
+ /** Calculate set of unique values for a specific axis for the filtered set of records. */
60
+ getUniqueValues(request: UniqueValuesRequestV2, ops?: {
61
+ signal?: AbortSignal;
62
+ }): Promise<UniqueValuesResponse>;
63
+ }
78
64
  //#endregion
79
- export { PFrameReadAPIV11, PFrameReadAPIV12, UniqueValuesRequestV2 };
65
+ export { PFrameReadAPIV12, PFrameReadAPIV13, UniqueValuesRequestV2 };
80
66
  //# sourceMappingURL=api_read.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api_read.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_read.ts"],"mappings":";;;;;;;;;UAoBiB,gBAAA;EAAA;;;;;;;;EASf,WAAA,CAAY,OAAA,EAAS,kBAAA,GAAqB,OAAA,CAAQ,mBAAA;EAS1B;;;;EAHxB,YAAA,CAAa,OAAA,EAAS,8BAAA,GAAiC,OAAA,CAAQ,+BAAA;EAS1C;EANrB,aAAA,CAAc,QAAA,EAAU,SAAA,GAAY,OAAA,CAAQ,WAAA;EAMmB;EAH/D,WAAA,IAAe,OAAA,CAAQ,WAAA;EASR;EANf,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,OAAA,EAAS,oBAAA,GAAuB,QAAA;EAS5D;EANH,aAAA,CACE,OAAA,EAAS,QAAA,EACT,OAAA;IACE,SAAA,EAAW,gBAAA;IACX,SAAA,EAAW,SAAA;EAAA,IAEZ,QAAA;EAQO;EALV,eAAA,CACE,OAAA,EAAS,mBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA;;;;;;;UASI,qBAAA;EAhCf;EAAA,SAkCS,QAAA,EAAU,SAAA;EAlCL;;;;EAAA,SAwCL,SAAA;EArCc;EAAA,SAwCd,OAAA,EAAS,0BAAA;EArCG;EAAA,SAwCZ,KAAA;AAAA;;;;;;;;;;;UAaM,gBAAA;EAzCf;EA2CA,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,SAAA,EAAW,SAAA,GAAY,QAAA;EA1CpD;EA6CF,eAAA,CACE,OAAA,EAAS,qBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA"}
1
+ {"version":3,"file":"api_read.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_read.ts"],"mappings":";;;;;;;AAeA;;;;UAAiB,qBAAA;EAEI;EAAA,SAAV,QAAA,EAAU,SAAA;EASV;;;;EAAA,SAHA,SAAA;EAmBM;EAAA,SAhBN,OAAA,EAAS,0BAAA;;WAGT,KAAA;AAAA;;;;;;;;;;;UAaM,gBAAA;EAEgB;EAA/B,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,SAAA,EAAW,SAAA,GAAY,QAAA;EAGtD;EAAA,eAAA,CACE,OAAA,EAAS,qBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA;;;;;;AAgBb;;;;;;;;UAAiB,gBAAA;EAUZ;EARH,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,SAAA,EAAW,SAAA,GAAY,SAAA;EAQ5C;EALV,eAAA,CACE,OAAA,EAAS,qBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA"}
@@ -1,6 +1,6 @@
1
- import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
2
1
  import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
3
2
  import { DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discover_columns.js";
3
+ import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
4
4
  import { AxesId, AxesSpec, BuildQueryInput, DataQuery, DataQueryBooleanExpression, 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
@@ -1,19 +1,19 @@
1
+ import { PTableV10, PTableV9 } from "./table.js";
1
2
  import { AxisQualification, ColumnAxesWithQualifications, ConstantAxisFilter, Logger, PFrameId, PTableId } from "./common.js";
2
- import { FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit } from "./find_columns.js";
3
- import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
4
- import { ArtificialColumnJoinEntry, ColumnJoinEntry, CreateTableRequestV4, FullJoinV4, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, OuterJoinV4, SlicedColumnJoinEntry } from "./create_table.js";
5
- import { PTableV8, PTableV9 } from "./table.js";
6
- import { PFrameReadAPIV11, PFrameReadAPIV12, UniqueValuesRequestV2 } from "./api_read.js";
3
+ import { PFrameReadAPIV12, PFrameReadAPIV13, UniqueValuesRequestV2 } from "./api_read.js";
7
4
  import { BaseObjectStore, FileRange, FsStoreOptions, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions } from "./http_helpers.js";
8
- import { AddColumnEntry, DataInfo, DataInfoExtension, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV4, PFrameFactoryAPIV5, SpecExtension } from "./api_factory.js";
5
+ import { AddColumnEntry, DataInfo, DataInfoExtension, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, SpecExtension } from "./api_factory.js";
6
+ import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
9
7
  import { DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, MatcherMap, MultiAxisSelector, MultiColumnSelector, StringMatcher } from "./discover_columns.js";
8
+ import { FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit } from "./find_columns.js";
10
9
  import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3 } from "./api_wasm.js";
11
- import { PFrameFactoryV4, PFrameFactoryV5, PFrameOptionsV2, PFrameV13, PFrameV14 } from "./pframe.js";
10
+ import { ArtificialColumnJoinEntry, ColumnJoinEntry, CreateTableRequestV4, FullJoinV4, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, OuterJoinV4, SlicedColumnJoinEntry } from "./create_table.js";
11
+ import { PFrameFactoryV5, PFrameFactoryV6, PFrameOptionsV2, PFrameV14, PFrameV15 } from "./pframe.js";
12
12
  import { SingleAxisSelector as SingleAxisSelector$1 } from "@milaboratories/pl-model-common";
13
13
 
14
14
  //#region src/pframe/internal_api/index.d.ts
15
15
  declare namespace index_d_exports {
16
- export { AddColumnEntry, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, LegacyQuery, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV4, PFrameFactoryAPIV5, PFrameFactoryV4, PFrameFactoryV5, PFrameId, PFrameOptionsV2, PFrameReadAPIV11, PFrameReadAPIV12, PFrameV13, PFrameV14, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3, PTableId, PTableV8, PTableV9, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2 };
16
+ export { AddColumnEntry, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, LegacyQuery, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, PFrameFactoryV5, PFrameFactoryV6, PFrameId, PFrameOptionsV2, PFrameReadAPIV12, PFrameReadAPIV13, PFrameV14, PFrameV15, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3, PTableId, PTableV10, PTableV9, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2 };
17
17
  }
18
18
  //#endregion
19
19
  export { index_d_exports };
@@ -1,23 +1,29 @@
1
1
  import { Logger, PFrameId } from "./common.js";
2
- import { PFrameReadAPIV11, PFrameReadAPIV12 } from "./api_read.js";
3
- import { PFrameFactoryAPIV4, PFrameFactoryAPIV5 } from "./api_factory.js";
2
+ import { PFrameReadAPIV12, PFrameReadAPIV13 } from "./api_read.js";
3
+ import { PFrameFactoryAPIV5 } from "./api_factory.js";
4
4
 
5
5
  //#region src/pframe/internal_api/pframe.d.ts
6
- interface PFrameV13 extends PFrameFactoryAPIV4, PFrameReadAPIV11 {}
7
6
  /** Full PFrame surface — factory operations plus data-side reads. */
8
7
  interface PFrameV14 extends PFrameFactoryAPIV5, PFrameReadAPIV12 {}
8
+ /**
9
+ * Full PFrame surface — factory operations plus data-side reads.
10
+ *
11
+ * Identical to {@link PFrameV14} but exposes {@link PFrameReadAPIV13}, whose
12
+ * tables add the `export` method.
13
+ */
14
+ interface PFrameV15 extends PFrameFactoryAPIV5, PFrameReadAPIV13 {}
9
15
  type PFrameOptionsV2 = {
10
16
  /** PFrame ID for logging purposes */frameId: PFrameId; /** Path to directory where PFrame can create temporary files */
11
17
  spillPath: string; /** Logger instance, no logging is performed when not provided */
12
18
  logger?: Logger;
13
19
  };
14
- /** List of PFrame management functions exposed by PFrame module */
15
- interface PFrameFactoryV4 {
20
+ /** PFrame management functions exposed by the PFrame module. */
21
+ interface PFrameFactoryV5 {
16
22
  /**
17
23
  * Create a new PFrame instance.
18
24
  * @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
19
25
  */
20
- createPFrame(options: PFrameOptionsV2): PFrameV13;
26
+ createPFrame(options: PFrameOptionsV2): PFrameV14;
21
27
  /**
22
28
  * Dump active allocations from all PFrames instances in pprof format.
23
29
  * The result of this function should be saved as `profile.pb.gz`.
@@ -27,13 +33,18 @@ interface PFrameFactoryV4 {
27
33
  */
28
34
  pprofDump: () => Promise<Uint8Array>;
29
35
  }
30
- /** PFrame management functions exposed by the PFrame module. */
31
- interface PFrameFactoryV5 {
36
+ /**
37
+ * PFrame management functions exposed by the PFrame module.
38
+ *
39
+ * Identical to {@link PFrameFactoryV5} but creates {@link PFrameV15} instances,
40
+ * whose tables add the `export` method.
41
+ */
42
+ interface PFrameFactoryV6 {
32
43
  /**
33
44
  * Create a new PFrame instance.
34
45
  * @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
35
46
  */
36
- createPFrame(options: PFrameOptionsV2): PFrameV14;
47
+ createPFrame(options: PFrameOptionsV2): PFrameV15;
37
48
  /**
38
49
  * Dump active allocations from all PFrames instances in pprof format.
39
50
  * The result of this function should be saved as `profile.pb.gz`.
@@ -44,5 +55,5 @@ interface PFrameFactoryV5 {
44
55
  pprofDump: () => Promise<Uint8Array>;
45
56
  }
46
57
  //#endregion
47
- export { PFrameFactoryV4, PFrameFactoryV5, PFrameOptionsV2, PFrameV13, PFrameV14 };
58
+ export { PFrameFactoryV5, PFrameFactoryV6, PFrameOptionsV2, PFrameV14, PFrameV15 };
48
59
  //# sourceMappingURL=pframe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":";;;;;UAKiB,SAAA,SAAkB,kBAAA,EAAoB,gBAAA;;UAGtC,SAAA,SAAkB,kBAAA,EAAoB,gBAAA;AAAA,KAE3C,eAAA;EAFK,qCAIf,OAAA,EAAS,QAAA;EAET,SAAA,UANqE;EAQrE,MAAA,GAAS,MAAA;AAAA;;UAIM,eAAA;EARf;;;;EAaA,YAAA,CAAa,OAAA,EAAS,eAAA,GAAkB,SAAA;EATzB;;AAIjB;;;;;EAcE,SAAA,QAAiB,OAAA,CAAQ,UAAA;AAAA;;UAIV,eAAA;EAbf;;;;EAkBA,YAAA,CAAa,OAAA,EAAS,eAAA,GAAkB,SAAA;EATvB;;;;AAInB;;;EAcE,SAAA,QAAiB,OAAA,CAAQ,UAAA;AAAA"}
1
+ {"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":";;;;;;UAMiB,SAAA,SAAkB,kBAAA,EAAoB,gBAAA;;;;AAQvD;;;UAAiB,SAAA,SAAkB,kBAAA,EAAoB,gBAAA;AAAA,KAE3C,eAAA;EAAe,qCAEzB,OAAA,EAAS,QAAA,EAIM;EAFf,SAAA,UAFS;EAIT,MAAA,GAAS,MAAA;AAAA;;UAIM,eAAA;EAJA;AAIjB;;;EAKE,YAAA,CAAa,OAAA,EAAS,eAAA,GAAkB,SAAA;EAAA;;;;;;;EASxC,SAAA,QAAiB,OAAA,CAAQ,UAAA;AAAA;;;;;;AAS3B;UAAiB,eAAA;;;;;EAKf,YAAA,CAAa,OAAA,EAAS,eAAA,GAAkB,SAAA;EAShB;;;;;;;EAAxB,SAAA,QAAiB,OAAA,CAAQ,UAAA;AAAA"}
@@ -1,31 +1,27 @@
1
- import { PTableId } from "./common.js";
2
- import { PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableShape, PTableSorting, PTableVector, TableRange } from "@milaboratories/pl-model-common";
1
+ import { PTableShape, PTableVector, TableRange } from "@milaboratories/pl-model-common";
3
2
 
4
3
  //#region src/pframe/internal_api/table.d.ts
5
4
  /**
6
- * Table view returned as a result of create table operation.
5
+ * Table view returned by `createTable`.
7
6
  *
8
- * PTable can be thought as having a composite primary key, consisting of axes,
9
- * and a set of data columns derived from PColumn values.
10
- * */
11
- interface PTableV8 extends Disposable {
7
+ * PTable can be thought as having a composite primary key, consisting
8
+ * of axes, and a set of data columns derived from PColumn values.
9
+ * The table's column spec is owned by the caller — selector → index
10
+ * resolution runs on the caller side via WASM-spec.
11
+ */
12
+ interface PTableV9 extends Disposable {
12
13
  /**
13
- * Returns ordered array of table axes specs (primary key "columns" in SQL
14
- * terms) and data column specs (regular "columns" in SQL terms).
14
+ * Get PTable disk footprint in bytes.
15
15
  *
16
- * Data for a specific table column can be retrieved using unified indexing
17
- * corresponding to elements in this array.
16
+ * @param ops.withPredecessors When true, the footprint includes
17
+ * every registered predecessor table reachable through the
18
+ * query lineage. When false or omitted, only this table's own
19
+ * materialised data is counted.
18
20
  *
19
- * Axes are always listed first.
20
- * */
21
- getSpec(): PTableColumnSpec[];
22
- /** Transforms unified column identifiers into unified indices of columns. */
23
- getColumnIndices(columnIds: PTableColumnId[]): number[];
24
- /**
25
- * Get PTable disk footprint in bytes
26
21
  * Warning: This call materializes the join.
27
22
  */
28
23
  getFootprint(ops?: {
24
+ withPredecessors?: boolean;
29
25
  signal?: AbortSignal;
30
26
  }): Promise<number>;
31
27
  /**
@@ -48,10 +44,6 @@ interface PTableV8 extends Disposable {
48
44
  range?: TableRange;
49
45
  signal?: AbortSignal;
50
46
  }): Promise<PTableVector[]>;
51
- /** Filters the table and returns new PTable instance */
52
- filter(tableId: PTableId, request: PTableRecordFilter[]): PTableV8;
53
- /** Sorts the table and returns new PTable instance. */
54
- sort(tableId: PTableId, request: PTableSorting[]): PTableV8;
55
47
  /** Deallocates all underlying resources */
56
48
  dispose(): void;
57
49
  }
@@ -63,7 +55,7 @@ interface PTableV8 extends Disposable {
63
55
  * The table's column spec is owned by the caller — selector → index
64
56
  * resolution runs on the caller side via WASM-spec.
65
57
  */
66
- interface PTableV9 extends Disposable {
58
+ interface PTableV10 extends Disposable {
67
59
  /**
68
60
  * Get PTable disk footprint in bytes.
69
61
  *
@@ -98,9 +90,26 @@ interface PTableV9 extends Disposable {
98
90
  range?: TableRange;
99
91
  signal?: AbortSignal;
100
92
  }): Promise<PTableVector[]>;
93
+ /**
94
+ * Stream the full, sorted table to a file at `path`. The output format is
95
+ * selected from the file extension: `csv`, `tsv`, `parquet`, or `xlsx`.
96
+ * Writing is bounded-memory.
97
+ * This call materializes the join.
98
+ *
99
+ * @param path destination file path; its extension selects the format
100
+ * @param headers column names in unified order (axes first, then data
101
+ * columns). Length must equal the number of table fields — the data layer
102
+ * is name-independent, so names are supplied by the caller.
103
+ *
104
+ * @remarks For `xlsx` the caller must ensure the row count is below Excel's
105
+ * 1,048,576-row per-sheet limit.
106
+ */
107
+ export(path: string, headers: string[], ops?: {
108
+ signal?: AbortSignal;
109
+ }): Promise<void>;
101
110
  /** Deallocates all underlying resources */
102
111
  dispose(): void;
103
112
  }
104
113
  //#endregion
105
- export { PTableV8, PTableV9 };
114
+ export { PTableV10, PTableV9 };
106
115
  //# sourceMappingURL=table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","names":[],"sources":["../../../src/pframe/internal_api/table.ts"],"mappings":";;;;;;AAiBA;;;;UAAiB,QAAA,SAAiB,UAAA;EAmBF;;;;;;;;;EAT9B,OAAA,IAAW,gBAAA;EAmCwB;EAhCnC,gBAAA,CAAiB,SAAA,EAAW,cAAA;EAmCd;;;;EA7Bd,YAAA,CAAa,GAAA;IAAQ,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA;EAT9C;;;;EAeA,QAAA,CAAS,GAAA;IAAQ,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA,CAAQ,WAAA;EANpB;;;;;;;;;EAiB9B,OAAA,CACE,aAAA,YACA,GAAA;IACE,KAAA,GAAQ,UAAA;IACR,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,YAAA;EAFP;EAKJ,MAAA,CAAO,OAAA,EAAS,QAAA,EAAU,OAAA,EAAS,kBAAA,KAAuB,QAAA;EAPxD;EAUF,IAAA,CAAK,OAAA,EAAS,QAAA,EAAU,OAAA,EAAS,aAAA,KAAkB,QAAA;EANxC;EASX,OAAA;AAAA;;;;;;;;;UAWe,QAAA,SAAiB,UAAA;EAdmB;;;;AAcrD;;;;;;EAWE,YAAA,CAAa,GAAA;IAAQ,gBAAA;IAA4B,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA;EAuB/D;;;;EAjBX,QAAA,CAAS,GAAA;IAAQ,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA,CAAQ,WAAA;EAN7B;;;;;;;;;EAiBrB,OAAA,CACE,aAAA,YACA,GAAA;IACE,KAAA,GAAQ,UAAA;IACR,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,YAAA;EAHP;EAMJ,OAAA;AAAA"}
1
+ {"version":3,"file":"table.d.ts","names":[],"sources":["../../../src/pframe/internal_api/table.ts"],"mappings":";;;;;AAUA;;;;;;UAAiB,QAAA,SAAiB,UAAA;EAiBU;;;;;;;;;;EAN1C,YAAA,CAAa,GAAA;IAAQ,gBAAA;IAA4B,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA;EAAA;;;;EAM1E,QAAA,CAAS,GAAA;IAAQ,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA,CAAQ,WAAA;EAWlD;;;;;;;;;EAAA,OAAA,CACE,aAAA,YACA,GAAA;IACE,KAAA,GAAQ,UAAA;IACR,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,YAAA;EAcc;EAXzB,OAAA;AAAA;;;;;;;;;UAWe,SAAA,SAAkB,UAAA;EAwD9B;;;;;;;;;;EA7CH,YAAA,CAAa,GAAA;IAAQ,gBAAA;IAA4B,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA;EAMjE;;;;EAAT,QAAA,CAAS,GAAA;IAAQ,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA,CAAQ,WAAA;EAe9C;;;;;;;;;EAJJ,OAAA,CACE,aAAA,YACA,GAAA;IACE,KAAA,GAAQ,UAAA;IACR,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,YAAA;EAyBJ;;;;;;;;;;;;;;EATP,MAAA,CACE,IAAA,UACA,OAAA,YACA,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA;;EAGH,OAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-model-middle-layer",
3
- "version": "1.25.0",
3
+ "version": "1.27.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.42.0",
24
- "@milaboratories/helpers": "1.14.2"
23
+ "@milaboratories/helpers": "1.14.2",
24
+ "@milaboratories/pl-model-common": "1.43.0"
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
29
  "@milaboratories/ts-builder": "1.5.0",
31
- "@milaboratories/ts-configs": "1.2.3"
30
+ "@milaboratories/ts-configs": "1.2.3",
31
+ "@milaboratories/build-configs": "2.0.0"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "ts-builder build --target node",
@@ -7,7 +7,6 @@ import type {
7
7
  JsonPartitionedDataInfo,
8
8
  ParquetChunk,
9
9
  ParquetPartitionedDataInfo,
10
- PColumnSpec,
11
10
  PObjectId,
12
11
  } from "@milaboratories/pl-model-common";
13
12
  import type { HttpServerInfo } from "./http_helpers";
@@ -56,32 +55,6 @@ export type DataInfo<Blob> =
56
55
  | BinaryPartitionedDataInfo<Blob>
57
56
  | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;
58
57
 
59
- /** API exposed by PFrames library allowing to create and provide data for
60
- * PFrame objects */
61
- export interface PFrameFactoryAPIV4 extends Disposable {
62
- /** Associates data source with this PFrame */
63
- setDataSource(dataSource: PFrameDataSourceV2): void;
64
-
65
- /** Adds PColumn without data info */
66
- addColumnSpec(columnId: PObjectId, columnSpec: PColumnSpec): void;
67
-
68
- /**
69
- * Assign data info to the specified PColumn.
70
- * For parquet data info, schema resolution via network is performed during this call.
71
- */
72
- setColumnData(
73
- columnId: PObjectId,
74
- dataInfo: DataInfo<PFrameBlobId>,
75
- options?: {
76
- signal?: AbortSignal;
77
- },
78
- ): Promise<void>;
79
-
80
- /** Releases all the data previously added to PFrame using methods above,
81
- * any interactions with disposed PFrame will result in exception */
82
- dispose(): void;
83
- }
84
-
85
58
  /**
86
59
  * Structural type information needed by the data side: axis value
87
60
  * types and column value types, in their canonical order. Mirrors
@@ -1,67 +1,12 @@
1
- import type { FindColumnsRequest, FindColumnsResponse } from "./find_columns";
2
1
  import type {
3
- DeleteColumnFromColumnsRequest,
4
- DeleteColumnFromColumnsResponse,
5
- } from "./delete_column";
6
- import type {
7
- PColumnInfo,
8
- PColumnSpec,
9
2
  PObjectId,
10
- UniqueValuesRequest,
11
3
  UniqueValuesResponse,
12
4
  DataQuery,
13
5
  DataQueryBooleanExpression,
14
- PTableColumnSpec,
15
6
  } from "@milaboratories/pl-model-common";
16
- import type { CreateTableRequestV4 } from "./create_table";
17
- import type { PTableV8, PTableV9 } from "./table";
7
+ import type { PTableV9, PTableV10 } from "./table";
18
8
  import type { PTableId } from "./common";
19
9
 
20
- /** Read interface exposed by PFrames library */
21
- export interface PFrameReadAPIV11 {
22
- /**
23
- * Finds columns given filtering criteria on column name, annotations etc.
24
- * and a set of qualified axes specs to find only columns with compatible
25
- * axes spec.
26
- *
27
- * Only column specs are used, this method will work even for columns
28
- * with no assigned data.
29
- * */
30
- findColumns(request: FindColumnsRequest): Promise<FindColumnsResponse>;
31
-
32
- /**
33
- * Construct new axes integration with some entry removed but integration qualificaitons preserved.
34
- * Removes more then one entry in case the removal will create several disjoint sets of axes.
35
- */
36
- deleteColumn(request: DeleteColumnFromColumnsRequest): Promise<DeleteColumnFromColumnsResponse>;
37
-
38
- /** Retrieve single column spec */
39
- getColumnSpec(columnId: PObjectId): Promise<PColumnSpec | null>;
40
-
41
- /** Retrieve information about all columns currently added to the PFrame */
42
- listColumns(): Promise<PColumnInfo[]>;
43
-
44
- /** Calculates data for the table and returns an object to access it */
45
- createTable(tableId: PTableId, request: CreateTableRequestV4): PTableV8;
46
-
47
- /** Creates table from data query and returns an object to access it */
48
- createTableV2(
49
- tableId: PTableId,
50
- request: {
51
- tableSpec: PTableColumnSpec[];
52
- dataQuery: DataQuery;
53
- },
54
- ): PTableV8;
55
-
56
- /** Calculate set of unique values for a specific axis for the filtered set of records */
57
- getUniqueValues(
58
- request: UniqueValuesRequest,
59
- ops?: {
60
- signal?: AbortSignal;
61
- },
62
- ): Promise<UniqueValuesResponse>;
63
- }
64
-
65
10
  /**
66
11
  * V2 unique-values request. Axis and filter references are
67
12
  * pre-resolved to numeric indices; no selector ids cross the API
@@ -107,3 +52,29 @@ export interface PFrameReadAPIV12 {
107
52
  },
108
53
  ): Promise<UniqueValuesResponse>;
109
54
  }
55
+
56
+ /**
57
+ * Read interface exposed by PFrames library.
58
+ *
59
+ * Identical to {@link PFrameReadAPIV12} but returns the {@link PTableV10}
60
+ * table view, which adds the `export` method.
61
+ *
62
+ * Spec-side operations (finding columns, listing columns, retrieving
63
+ * column specs, computing axis integrations) are not part of this
64
+ * surface — callers cache column specs themselves or route through
65
+ * WASM-spec. The data-side `createTable` accepts a pre-lowered
66
+ * `DataQuery`; `getUniqueValues` takes pre-resolved indices via
67
+ * {@link UniqueValuesRequestV2}.
68
+ */
69
+ export interface PFrameReadAPIV13 {
70
+ /** Creates table from a pre-lowered data query. */
71
+ createTable(tableId: PTableId, dataQuery: DataQuery): PTableV10;
72
+
73
+ /** Calculate set of unique values for a specific axis for the filtered set of records. */
74
+ getUniqueValues(
75
+ request: UniqueValuesRequestV2,
76
+ ops?: {
77
+ signal?: AbortSignal;
78
+ },
79
+ ): Promise<UniqueValuesResponse>;
80
+ }
@@ -1,13 +1,19 @@
1
- import type { PFrameFactoryAPIV4, PFrameFactoryAPIV5 } from "./api_factory";
2
- import type { PFrameReadAPIV11, PFrameReadAPIV12 } from "./api_read";
1
+ import type { PFrameFactoryAPIV5 } from "./api_factory";
2
+ import type { PFrameReadAPIV12, PFrameReadAPIV13 } from "./api_read";
3
3
  import type { Logger } from "./common";
4
4
  import type { PFrameId } from "./common";
5
5
 
6
- export interface PFrameV13 extends PFrameFactoryAPIV4, PFrameReadAPIV11 {}
7
-
8
6
  /** Full PFrame surface — factory operations plus data-side reads. */
9
7
  export interface PFrameV14 extends PFrameFactoryAPIV5, PFrameReadAPIV12 {}
10
8
 
9
+ /**
10
+ * Full PFrame surface — factory operations plus data-side reads.
11
+ *
12
+ * Identical to {@link PFrameV14} but exposes {@link PFrameReadAPIV13}, whose
13
+ * tables add the `export` method.
14
+ */
15
+ export interface PFrameV15 extends PFrameFactoryAPIV5, PFrameReadAPIV13 {}
16
+
11
17
  export type PFrameOptionsV2 = {
12
18
  /** PFrame ID for logging purposes */
13
19
  frameId: PFrameId;
@@ -17,13 +23,13 @@ export type PFrameOptionsV2 = {
17
23
  logger?: Logger;
18
24
  };
19
25
 
20
- /** List of PFrame management functions exposed by PFrame module */
21
- export interface PFrameFactoryV4 {
26
+ /** PFrame management functions exposed by the PFrame module. */
27
+ export interface PFrameFactoryV5 {
22
28
  /**
23
29
  * Create a new PFrame instance.
24
30
  * @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
25
31
  */
26
- createPFrame(options: PFrameOptionsV2): PFrameV13;
32
+ createPFrame(options: PFrameOptionsV2): PFrameV14;
27
33
 
28
34
  /**
29
35
  * Dump active allocations from all PFrames instances in pprof format.
@@ -35,13 +41,18 @@ export interface PFrameFactoryV4 {
35
41
  pprofDump: () => Promise<Uint8Array>;
36
42
  }
37
43
 
38
- /** PFrame management functions exposed by the PFrame module. */
39
- export interface PFrameFactoryV5 {
44
+ /**
45
+ * PFrame management functions exposed by the PFrame module.
46
+ *
47
+ * Identical to {@link PFrameFactoryV5} but creates {@link PFrameV15} instances,
48
+ * whose tables add the `export` method.
49
+ */
50
+ export interface PFrameFactoryV6 {
40
51
  /**
41
52
  * Create a new PFrame instance.
42
53
  * @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
43
54
  */
44
- createPFrame(options: PFrameOptionsV2): PFrameV14;
55
+ createPFrame(options: PFrameOptionsV2): PFrameV15;
45
56
 
46
57
  /**
47
58
  * Dump active allocations from all PFrames instances in pprof format.
@@ -1,40 +1,25 @@
1
- import type {
2
- PTableColumnId,
3
- PTableColumnSpec,
4
- PTableRecordFilter,
5
- PTableShape,
6
- PTableSorting,
7
- PTableVector,
8
- TableRange,
9
- } from "@milaboratories/pl-model-common";
10
- import type { PTableId } from "./common";
1
+ import type { PTableShape, PTableVector, TableRange } from "@milaboratories/pl-model-common";
11
2
 
12
3
  /**
13
- * Table view returned as a result of create table operation.
4
+ * Table view returned by `createTable`.
14
5
  *
15
- * PTable can be thought as having a composite primary key, consisting of axes,
16
- * and a set of data columns derived from PColumn values.
17
- * */
18
- export interface PTableV8 extends Disposable {
6
+ * PTable can be thought as having a composite primary key, consisting
7
+ * of axes, and a set of data columns derived from PColumn values.
8
+ * The table's column spec is owned by the caller — selector → index
9
+ * resolution runs on the caller side via WASM-spec.
10
+ */
11
+ export interface PTableV9 extends Disposable {
19
12
  /**
20
- * Returns ordered array of table axes specs (primary key "columns" in SQL
21
- * terms) and data column specs (regular "columns" in SQL terms).
13
+ * Get PTable disk footprint in bytes.
22
14
  *
23
- * Data for a specific table column can be retrieved using unified indexing
24
- * corresponding to elements in this array.
15
+ * @param ops.withPredecessors When true, the footprint includes
16
+ * every registered predecessor table reachable through the
17
+ * query lineage. When false or omitted, only this table's own
18
+ * materialised data is counted.
25
19
  *
26
- * Axes are always listed first.
27
- * */
28
- getSpec(): PTableColumnSpec[];
29
-
30
- /** Transforms unified column identifiers into unified indices of columns. */
31
- getColumnIndices(columnIds: PTableColumnId[]): number[];
32
-
33
- /**
34
- * Get PTable disk footprint in bytes
35
20
  * Warning: This call materializes the join.
36
21
  */
37
- getFootprint(ops?: { signal?: AbortSignal }): Promise<number>;
22
+ getFootprint(ops?: { withPredecessors?: boolean; signal?: AbortSignal }): Promise<number>;
38
23
 
39
24
  /**
40
25
  * Unified table shape
@@ -59,12 +44,6 @@ export interface PTableV8 extends Disposable {
59
44
  },
60
45
  ): Promise<PTableVector[]>;
61
46
 
62
- /** Filters the table and returns new PTable instance */
63
- filter(tableId: PTableId, request: PTableRecordFilter[]): PTableV8;
64
-
65
- /** Sorts the table and returns new PTable instance. */
66
- sort(tableId: PTableId, request: PTableSorting[]): PTableV8;
67
-
68
47
  /** Deallocates all underlying resources */
69
48
  dispose(): void;
70
49
  }
@@ -77,7 +56,7 @@ export interface PTableV8 extends Disposable {
77
56
  * The table's column spec is owned by the caller — selector → index
78
57
  * resolution runs on the caller side via WASM-spec.
79
58
  */
80
- export interface PTableV9 extends Disposable {
59
+ export interface PTableV10 extends Disposable {
81
60
  /**
82
61
  * Get PTable disk footprint in bytes.
83
62
  *
@@ -113,6 +92,28 @@ export interface PTableV9 extends Disposable {
113
92
  },
114
93
  ): Promise<PTableVector[]>;
115
94
 
95
+ /**
96
+ * Stream the full, sorted table to a file at `path`. The output format is
97
+ * selected from the file extension: `csv`, `tsv`, `parquet`, or `xlsx`.
98
+ * Writing is bounded-memory.
99
+ * This call materializes the join.
100
+ *
101
+ * @param path destination file path; its extension selects the format
102
+ * @param headers column names in unified order (axes first, then data
103
+ * columns). Length must equal the number of table fields — the data layer
104
+ * is name-independent, so names are supplied by the caller.
105
+ *
106
+ * @remarks For `xlsx` the caller must ensure the row count is below Excel's
107
+ * 1,048,576-row per-sheet limit.
108
+ */
109
+ export(
110
+ path: string,
111
+ headers: string[],
112
+ ops?: {
113
+ signal?: AbortSignal;
114
+ },
115
+ ): Promise<void>;
116
+
116
117
  /** Deallocates all underlying resources */
117
118
  dispose(): void;
118
119
  }