@milaboratories/pl-model-middle-layer 1.2.16 → 1.2.18
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/author_marker.d.ts +10 -0
- package/dist/author_marker.d.ts.map +1 -0
- package/dist/block_meta/block_components.d.ts +277 -0
- package/dist/block_meta/block_components.d.ts.map +1 -0
- package/dist/block_meta/block_pack_id.d.ts +29 -0
- package/dist/block_meta/block_pack_id.d.ts.map +1 -0
- package/dist/block_meta/common.d.ts +3 -0
- package/dist/block_meta/common.d.ts.map +1 -0
- package/dist/block_meta/content_conversion.d.ts +3 -0
- package/dist/block_meta/content_conversion.d.ts.map +1 -0
- package/dist/block_meta/content_types.d.ts +478 -0
- package/dist/block_meta/content_types.d.ts.map +1 -0
- package/dist/block_meta/index.d.ts +1669 -0
- package/dist/block_meta/index.d.ts.map +1 -0
- package/dist/block_meta/meta.d.ts +656 -0
- package/dist/block_meta/meta.d.ts.map +1 -0
- package/dist/block_meta/semver.d.ts +3 -0
- package/dist/block_meta/semver.d.ts.map +1 -0
- package/dist/block_pack.d.ts +24 -0
- package/dist/block_pack.d.ts.map +1 -0
- package/dist/block_state.d.ts +9 -0
- package/dist/block_state.d.ts.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -209
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +213 -0
- package/dist/index.mjs.map +1 -0
- package/dist/pframe/index.d.ts +2 -0
- package/dist/pframe/index.d.ts.map +1 -0
- package/dist/pframe/internal_api/api_factory.d.ts +52 -0
- package/dist/pframe/internal_api/api_factory.d.ts.map +1 -0
- package/dist/pframe/internal_api/api_read.d.ts +28 -0
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -0
- package/dist/pframe/internal_api/common.d.ts +19 -0
- package/dist/pframe/internal_api/common.d.ts.map +1 -0
- package/dist/pframe/internal_api/create_table.d.ts +26 -0
- package/dist/pframe/internal_api/create_table.d.ts.map +1 -0
- package/dist/pframe/internal_api/delete_column.d.ts +10 -0
- package/dist/pframe/internal_api/delete_column.d.ts.map +1 -0
- package/dist/pframe/internal_api/find_columns.d.ts +23 -0
- package/dist/pframe/internal_api/find_columns.d.ts.map +1 -0
- package/dist/pframe/internal_api/index.d.ts +9 -0
- package/dist/pframe/internal_api/index.d.ts.map +1 -0
- package/dist/pframe/internal_api/pframe.d.ts +4 -0
- package/dist/pframe/internal_api/pframe.d.ts.map +1 -0
- package/dist/pframe/internal_api/table.d.ts +37 -0
- package/dist/pframe/internal_api/table.d.ts.map +1 -0
- package/dist/project.d.ts +5 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project_list.d.ts +17 -0
- package/dist/project_list.d.ts.map +1 -0
- package/dist/project_overview.d.ts +103 -0
- package/dist/project_overview.d.ts.map +1 -0
- package/package.json +13 -10
- package/src/block_meta/index.ts +27 -21
- package/dist/index.cjs +0 -249
- package/dist/index.cjs.map +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { PColumnSpec, PObjectId } from '@milaboratories/pl-model-common';
|
|
2
|
+
/** Abstract identifier of a data blob that can be requested from the storage backend */
|
|
3
|
+
export type PFrameBlobId = string;
|
|
4
|
+
export type JsonDataValue = string | number | null;
|
|
5
|
+
export type JsonDataInfo = {
|
|
6
|
+
type: 'Json';
|
|
7
|
+
keyLength: number;
|
|
8
|
+
data: Record<string, JsonDataValue>;
|
|
9
|
+
};
|
|
10
|
+
export type JsonPartitionedDataInfo<Blob = PFrameBlobId> = {
|
|
11
|
+
type: 'JsonPartitioned';
|
|
12
|
+
partitionKeyLength: number;
|
|
13
|
+
parts: Record<string, Blob>;
|
|
14
|
+
};
|
|
15
|
+
export type BinaryChunkInfo<Blob = PFrameBlobId> = {
|
|
16
|
+
index: Blob;
|
|
17
|
+
values: Blob;
|
|
18
|
+
};
|
|
19
|
+
export type BinaryPartitionedDataInfo<Blob = PFrameBlobId> = {
|
|
20
|
+
type: 'BinaryPartitioned';
|
|
21
|
+
partitionKeyLength: number;
|
|
22
|
+
parts: Record<string, BinaryChunkInfo<Blob>>;
|
|
23
|
+
};
|
|
24
|
+
export type DataInfo<Blob = PFrameBlobId> = JsonDataInfo | JsonPartitionedDataInfo<Blob> | BinaryPartitionedDataInfo<Blob>;
|
|
25
|
+
/** Path of the file containing requested data (blob). This path is returned by
|
|
26
|
+
* {@link BlobPathResolver} as soon as blob materialized in the file system. */
|
|
27
|
+
export type FilePath = string;
|
|
28
|
+
/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */
|
|
29
|
+
export type PFrameDataSource = {
|
|
30
|
+
/**
|
|
31
|
+
* PFrame may notify storage backend about its plans to use particular blobs in the future.
|
|
32
|
+
* Storage backend will do its best to preload specified blob so the subsequent
|
|
33
|
+
* {@link resolveBlob} will quickly return preloaded file path.
|
|
34
|
+
*/
|
|
35
|
+
preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;
|
|
36
|
+
/** Allows to read actual data given the blob id from {@link DataInfo}. */
|
|
37
|
+
resolveBlob(blobId: PFrameBlobId): Promise<FilePath>;
|
|
38
|
+
};
|
|
39
|
+
/** API exposed by PFrames library allowing to create and provide data for
|
|
40
|
+
* PFrame objects */
|
|
41
|
+
export interface PFrameFactoryAPI {
|
|
42
|
+
/** Associates data source with this PFrame */
|
|
43
|
+
setDataSource(dataSource: PFrameDataSource): void;
|
|
44
|
+
/** Adds PColumn without spec */
|
|
45
|
+
addColumnSpec(columnId: PObjectId, columnSpec: PColumnSpec): void;
|
|
46
|
+
/** Associates data info with cpecific column */
|
|
47
|
+
setColumnData(columnId: PObjectId, dataInfo: DataInfo): void;
|
|
48
|
+
/** Releases all the data previously added to PFrame using methods above,
|
|
49
|
+
* any interactions with disposed PFrame will result in exception */
|
|
50
|
+
dispose(): void;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=api_factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api_factory.d.ts","source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,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD,0EAA0E;IAC1E,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACtD,CAAC;AAEF;oBACoB;AACpB,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,aAAa,CAAC,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAElD,gCAAgC;IAChC,aAAa,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAElE,gDAAgD;IAChD,aAAa,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE7D;wEACoE;IACpE,OAAO,IAAI,IAAI,CAAC;CACjB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FindColumnsRequest, FindColumnsResponse } from './find_columns';
|
|
2
|
+
import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from './delete_column';
|
|
3
|
+
import { PColumnInfo, PColumnSpec, PObjectId, UniqueValuesRequest, UniqueValuesResponse } from '@milaboratories/pl-model-common';
|
|
4
|
+
import { CreateTableRequest } from './create_table';
|
|
5
|
+
import { PTable } from './table';
|
|
6
|
+
/** Read interface exposed by PFrames library */
|
|
7
|
+
export interface PFrameReadAPI {
|
|
8
|
+
/**
|
|
9
|
+
* Finds columns given filtering criteria on column name, annotations etc.
|
|
10
|
+
* and a set of qualified axes specs to find only columns with compatible
|
|
11
|
+
* axes spec.
|
|
12
|
+
*
|
|
13
|
+
* Only column specs are used, this method will work even for columns
|
|
14
|
+
* with no assigned data.
|
|
15
|
+
* */
|
|
16
|
+
findColumns(request: FindColumnsRequest): Promise<FindColumnsResponse>;
|
|
17
|
+
/** To be reviewed in the future */
|
|
18
|
+
deleteColumn(request: DeleteColumnFromColumnsRequest): Promise<DeleteColumnFromColumnsResponse>;
|
|
19
|
+
/** Retrieve single column spec */
|
|
20
|
+
getColumnSpec(columnId: PObjectId): Promise<PColumnSpec>;
|
|
21
|
+
/** Retrieve information about all columns currently added to the PFrame */
|
|
22
|
+
listColumns(): Promise<PColumnInfo[]>;
|
|
23
|
+
/** Calculates data for the table and returns an object to access it */
|
|
24
|
+
createTable(request: CreateTableRequest): Promise<PTable>;
|
|
25
|
+
/** Calculate set of unique values for a specific axis for the filtered set of records */
|
|
26
|
+
getUniqueValues(request: UniqueValuesRequest): Promise<UniqueValuesResponse>;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=api_read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api_read.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/api_read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAClG,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B;;;;;;;SAOK;IACL,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEvE,mCAAmC;IACnC,YAAY,CAAC,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;IAEhG,kCAAkC;IAClC,aAAa,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzD,2EAA2E;IAC3E,WAAW,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEtC,uEAAuE;IACvE,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE1D,yFAAyF;IACzF,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAC9E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AxisId, AxisSpec, ValueType } from '@milaboratories/pl-model-common';
|
|
2
|
+
export interface SingleAxisSelector {
|
|
3
|
+
name: string;
|
|
4
|
+
type?: ValueType;
|
|
5
|
+
domain?: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
export interface AxisQualification {
|
|
8
|
+
axis: SingleAxisSelector;
|
|
9
|
+
additionalDomains: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
export interface AxisQualificationWithAxisId {
|
|
12
|
+
axis: AxisId;
|
|
13
|
+
additionalDomains: Record<string, string>;
|
|
14
|
+
}
|
|
15
|
+
export interface ColumnAxesWithQualifications {
|
|
16
|
+
axesSpec: AxisSpec[];
|
|
17
|
+
qualifications: AxisQualification[];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE9E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,kBAAkB,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,cAAc,EAAE,iBAAiB,EAAE,CAAC;CACrC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AxisQualificationWithAxisId } from './common';
|
|
2
|
+
import { PObjectId, PTableRecordFilter } from '@milaboratories/pl-model-common';
|
|
3
|
+
export interface ColumnJoinEntry {
|
|
4
|
+
type: 'column';
|
|
5
|
+
columnId: PObjectId;
|
|
6
|
+
qualifications: AxisQualificationWithAxisId[];
|
|
7
|
+
}
|
|
8
|
+
export interface InnerJoin {
|
|
9
|
+
type: 'inner';
|
|
10
|
+
entries: JoinEntry[];
|
|
11
|
+
}
|
|
12
|
+
export interface FullJoin {
|
|
13
|
+
type: 'full';
|
|
14
|
+
entries: JoinEntry[];
|
|
15
|
+
}
|
|
16
|
+
export interface OuterJoin {
|
|
17
|
+
type: 'outer';
|
|
18
|
+
primary: JoinEntry;
|
|
19
|
+
secondary: JoinEntry[];
|
|
20
|
+
}
|
|
21
|
+
export type JoinEntry = ColumnJoinEntry | InnerJoin | FullJoin | OuterJoin;
|
|
22
|
+
export interface CreateTableRequest {
|
|
23
|
+
src: JoinEntry;
|
|
24
|
+
filters: PTableRecordFilter[];
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=create_table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_table.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/create_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAEhF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,EAAE,2BAA2B,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,SAAS,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,SAAS,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,EAAE,SAAS,EAAE,CAAC;CACxB;AAED,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE3E,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,SAAS,CAAC;IACf,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ColumnAxesWithQualifications } from './common';
|
|
2
|
+
export interface DeleteColumnFromColumnsRequest {
|
|
3
|
+
columns: ColumnAxesWithQualifications[];
|
|
4
|
+
/** Zero based index of the column to delete */
|
|
5
|
+
delete: number;
|
|
6
|
+
}
|
|
7
|
+
export interface DeleteColumnFromColumnsResponse {
|
|
8
|
+
columns: ColumnAxesWithQualifications[];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=delete_column.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete_column.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/delete_column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,4BAA4B,EAAE,CAAC;IAExC,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,+BAA+B;IAC9C,OAAO,EAAE,4BAA4B,EAAE,CAAC;CACzC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ColumnFilter, PColumnIdAndSpec } from '@milaboratories/pl-model-common';
|
|
2
|
+
import { AxisQualification, ColumnAxesWithQualifications } from './common';
|
|
3
|
+
export interface FindColumnsRequest {
|
|
4
|
+
columnFilter: ColumnFilter;
|
|
5
|
+
compatibleWith: ColumnAxesWithQualifications[];
|
|
6
|
+
strictlyCompatible: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface FindColumnResponseQualifications {
|
|
9
|
+
forQueries: AxisQualification[][];
|
|
10
|
+
forHit: AxisQualification[];
|
|
11
|
+
}
|
|
12
|
+
export interface FindColumnsMappingVariant {
|
|
13
|
+
qualifications: FindColumnResponseQualifications;
|
|
14
|
+
distinctiveQualifications: FindColumnResponseQualifications;
|
|
15
|
+
}
|
|
16
|
+
export interface FindColumnsResponseHit {
|
|
17
|
+
hit: PColumnIdAndSpec;
|
|
18
|
+
mappingVariants: FindColumnsMappingVariant[];
|
|
19
|
+
}
|
|
20
|
+
export interface FindColumnsResponse {
|
|
21
|
+
hits: FindColumnsResponseHit[];
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=find_columns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find_columns.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/find_columns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE3E,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,YAAY,CAAC;IAC3B,cAAc,EAAE,4BAA4B,EAAE,CAAC;IAC/C,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,gCAAgC;IAC/C,UAAU,EAAE,iBAAiB,EAAE,EAAE,CAAC;IAClC,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,gCAAgC,CAAC;IACjD,yBAAyB,EAAE,gCAAgC,CAAC;CAC7D;AAED,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,gBAAgB,CAAC;IACtB,eAAe,EAAE,yBAAyB,EAAE,CAAC;CAC9C;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,sBAAsB,EAAE,CAAC;CAChC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './api_read';
|
|
2
|
+
export * from './api_factory';
|
|
3
|
+
export * from './common';
|
|
4
|
+
export * from './create_table';
|
|
5
|
+
export * from './delete_column';
|
|
6
|
+
export * from './find_columns';
|
|
7
|
+
export * from './table';
|
|
8
|
+
export * from './pframe';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AAExB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pframe.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/pframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,WAAW,MAAO,SAAQ,gBAAgB,EAAE,aAAa;CAC9D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PTableColumnId, PTableColumnSpec, PTableShape, PTableSorting, PTableVector, TableRange } from '@milaboratories/pl-model-common';
|
|
2
|
+
/**
|
|
3
|
+
* Table view returned as a result of create table operation.
|
|
4
|
+
*
|
|
5
|
+
* PTable can be thought as having a composite primary key, consisting of axes,
|
|
6
|
+
* and a set of data columns derived from PColumn values.
|
|
7
|
+
* */
|
|
8
|
+
export interface PTable {
|
|
9
|
+
/** Unified table shape */
|
|
10
|
+
getShape(): PTableShape;
|
|
11
|
+
/**
|
|
12
|
+
* Returns ordered array of table axes specs (primary key "columns" in SQL
|
|
13
|
+
* terms) and data column specs (regular "columns" in SQL terms).
|
|
14
|
+
*
|
|
15
|
+
* Data for a specific table column can be retrieved using unified indexing
|
|
16
|
+
* corresponding to elements in this array.
|
|
17
|
+
*
|
|
18
|
+
* Axes are always listed first.
|
|
19
|
+
* */
|
|
20
|
+
getSpec(): PTableColumnSpec[];
|
|
21
|
+
/** Transforms unified column identifiers into unified indices of columns. */
|
|
22
|
+
getColumnIndices(columnIds: PTableColumnId[]): number[];
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve the data from the table. To retrieve only data required, it can be
|
|
25
|
+
* sliced both horizontally ({@link columnIndices}) and vertically
|
|
26
|
+
* ({@link range}).
|
|
27
|
+
*
|
|
28
|
+
* @param columnIndices unified indices of columns to be retrieved
|
|
29
|
+
* @param range optionally limit the range of records to retrieve
|
|
30
|
+
* */
|
|
31
|
+
getData(columnIndices: number[], range?: TableRange): Promise<PTableVector[]>;
|
|
32
|
+
/** Sorts the table and returns new PTable instance. */
|
|
33
|
+
sort(request: PTableSorting[]): Promise<PTable>;
|
|
34
|
+
/** Deallocates all underlying resources */
|
|
35
|
+
dispose(): void;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/table.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,UAAU,EACX,MAAM,iCAAiC,CAAC;AAEzC;;;;;KAKK;AACL,MAAM,WAAW,MAAM;IACrB,0BAA0B;IAC1B,QAAQ,IAAI,WAAW,CAAC;IAExB;;;;;;;;SAQK;IACL,OAAO,IAAI,gBAAgB,EAAE,CAAC;IAE9B,6EAA6E;IAC7E,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAAC;IAExD;;;;;;;SAOK;IACL,OAAO,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAE9E,uDAAuD;IACvD,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEhD,2CAA2C;IAC3C,OAAO,IAAI,IAAI,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,mBAAmB;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ProjectMeta } from './project';
|
|
2
|
+
/** Represents single entry in the list of projects owned by current user */
|
|
3
|
+
export interface ProjectListEntry {
|
|
4
|
+
/** Project resource ID. */
|
|
5
|
+
rid: bigint;
|
|
6
|
+
/** Internal (user-specific) project id */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Creation timestamp. */
|
|
9
|
+
created: Date;
|
|
10
|
+
/** Last modification timestamp. */
|
|
11
|
+
lastModified: Date;
|
|
12
|
+
/** True if project is opened */
|
|
13
|
+
opened: boolean;
|
|
14
|
+
/** Project meta, namely label */
|
|
15
|
+
meta: ProjectMeta;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=project_list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project_list.d.ts","sourceRoot":"","sources":["../src/project_list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,4EAA4E;AAC5E,MAAM,WAAW,gBAAgB;IAC/B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,0BAA0B;IAC1B,OAAO,EAAE,IAAI,CAAC;IACd,mCAAmC;IACnC,YAAY,EAAE,IAAI,CAAC;IACnB,gCAAgC;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,iCAAiC;IACjC,IAAI,EAAE,WAAW,CAAC;CACnB"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { ProjectMeta } from './project';
|
|
2
|
+
import { BlockPackSpec } from './block_pack';
|
|
3
|
+
import { BlockRenderingMode, BlockSection, NavigationState } from '@milaboratories/pl-model-common';
|
|
4
|
+
import { AuthorMarker } from './author_marker';
|
|
5
|
+
/** Generalized block status, to be used in block item "styling". */
|
|
6
|
+
export type BlockCalculationStatus = 'NotCalculated' | 'Running' | 'Done' | 'Limbo';
|
|
7
|
+
/** Overview of the whole project state, required to render a left panel. */
|
|
8
|
+
export type ProjectOverview = {
|
|
9
|
+
/** Metadata, like project label associated with the project */
|
|
10
|
+
meta: ProjectMeta;
|
|
11
|
+
/** Creation timestamp. */
|
|
12
|
+
created: Date;
|
|
13
|
+
/** Last modification timestamp. */
|
|
14
|
+
lastModified: Date;
|
|
15
|
+
/**
|
|
16
|
+
* Marker of the party last doing modification of the project structure
|
|
17
|
+
* - whole project renamed
|
|
18
|
+
* - blocks reordering
|
|
19
|
+
* - block renaming
|
|
20
|
+
* - block-pack update
|
|
21
|
+
* */
|
|
22
|
+
authorMarker?: AuthorMarker;
|
|
23
|
+
/** Overview information for each block */
|
|
24
|
+
blocks: BlockStateOverview[];
|
|
25
|
+
};
|
|
26
|
+
/** Overview of the block state, required for visualization in the left panel */
|
|
27
|
+
export type BlockStateOverview = {
|
|
28
|
+
/** Block id */
|
|
29
|
+
id: string;
|
|
30
|
+
/** Blocks label visible to the user */
|
|
31
|
+
label: string;
|
|
32
|
+
/** Block rendering mode */
|
|
33
|
+
renderingMode: BlockRenderingMode;
|
|
34
|
+
/**
|
|
35
|
+
* True if block have missing references, e.g. referenced block was deleted
|
|
36
|
+
* or moved downstream.
|
|
37
|
+
* */
|
|
38
|
+
missingReference: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Means that current heavy results (or results being calculated at the
|
|
41
|
+
* moment) are not in sync with current arguments. This takes into account
|
|
42
|
+
* stale state of all upstream blocks as well. Initial state also considered
|
|
43
|
+
* stale.
|
|
44
|
+
* */
|
|
45
|
+
stale: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* True if any of the outputs have errors. Errors may appear even before
|
|
48
|
+
* calculations are finished.
|
|
49
|
+
* */
|
|
50
|
+
outputErrors: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* If outputs have errors, this field will contain the error message extracted
|
|
53
|
+
* from the outputs map.
|
|
54
|
+
* */
|
|
55
|
+
outputsError?: string;
|
|
56
|
+
/**
|
|
57
|
+
* If exports context have errors, this field will contain the error message
|
|
58
|
+
* extracted from the exports context resource.
|
|
59
|
+
* */
|
|
60
|
+
exportsError?: string;
|
|
61
|
+
/** Generalized block calculation status */
|
|
62
|
+
calculationStatus: BlockCalculationStatus;
|
|
63
|
+
/**
|
|
64
|
+
* All upstream blocks of this block. In other words all dependencies of this
|
|
65
|
+
* block, including transitive dependencies.
|
|
66
|
+
* */
|
|
67
|
+
upstreams: string[];
|
|
68
|
+
/**
|
|
69
|
+
* All downstream blocks of this block. In other words all blocks that depends
|
|
70
|
+
* on outputs of this block, accounting for transitive dependencies.
|
|
71
|
+
* */
|
|
72
|
+
downstreams: string[];
|
|
73
|
+
/**
|
|
74
|
+
* Block sections. May be unavailable, if block-pack for this block is not
|
|
75
|
+
* yet materialized.
|
|
76
|
+
* */
|
|
77
|
+
sections: BlockSection[] | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* True if inputs of current block are suitable for block execution.
|
|
80
|
+
* May be unavailable, if block-pack for this block is not yet materialized.
|
|
81
|
+
* */
|
|
82
|
+
inputsValid: boolean | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* True if current block can be executed. This takes into account can run of
|
|
85
|
+
* all upstream blocks as well.
|
|
86
|
+
* */
|
|
87
|
+
canRun: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* SDK version the block was compiled with.
|
|
90
|
+
* Udefined when block-pack for this block is not yet materialized.
|
|
91
|
+
* */
|
|
92
|
+
sdkVersion: string | undefined;
|
|
93
|
+
/** Information on where the block pack for this block came from */
|
|
94
|
+
currentBlockPack: BlockPackSpec | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* If block pack update is available this field will contain latest specs to
|
|
97
|
+
* perform the update
|
|
98
|
+
* */
|
|
99
|
+
updatedBlockPack: BlockPackSpec | undefined;
|
|
100
|
+
/** Current navigation state of the block */
|
|
101
|
+
navigationState: NavigationState;
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=project_overview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project_overview.d.ts","sourceRoot":"","sources":["../src/project_overview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,oEAAoE;AACpE,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpF,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG;IAC5B,+DAA+D;IAC/D,IAAI,EAAE,WAAW,CAAC;IAElB,0BAA0B;IAC1B,OAAO,EAAE,IAAI,CAAC;IAEd,mCAAmC;I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version": "1.2.
|
|
3
|
+
"version": "1.2.18",
|
|
4
4
|
"description": "Common model between middle layer and non-block UI code",
|
|
5
|
-
"
|
|
5
|
+
"types": "./dist/index.d.ts",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
6
8
|
"exports": {
|
|
7
9
|
".": {
|
|
8
|
-
"types": "./
|
|
9
|
-
"import": "./dist/index.
|
|
10
|
-
"require": "./dist/index.
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
11
13
|
}
|
|
12
14
|
},
|
|
13
15
|
"files": [
|
|
@@ -17,14 +19,15 @@
|
|
|
17
19
|
"dependencies": {
|
|
18
20
|
"zod": "^3.23.8",
|
|
19
21
|
"utility-types": "^3.11.0",
|
|
20
|
-
"@milaboratories/pl-model-common": "^1.3.
|
|
22
|
+
"@milaboratories/pl-model-common": "^1.3.11"
|
|
21
23
|
},
|
|
22
24
|
"devDependencies": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"@milaboratories/platforma-build-configs": "1.0.
|
|
25
|
+
"typescript": "~5.6.2",
|
|
26
|
+
"vite": "^5.4.7",
|
|
27
|
+
"@milaboratories/platforma-build-configs": "1.0.1"
|
|
26
28
|
},
|
|
27
29
|
"scripts": {
|
|
28
|
-
"
|
|
30
|
+
"type-check": "tsc --noEmit --composite false",
|
|
31
|
+
"build": "vite build"
|
|
29
32
|
}
|
|
30
33
|
}
|
package/src/block_meta/index.ts
CHANGED
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
import { ZodTypeAny, z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
BlockComponentsDescriptionRaw,
|
|
4
|
-
BlockComponentsManifest
|
|
5
|
-
} from './block_components';
|
|
1
|
+
import { ZodTypeAny, string, z } from 'zod';
|
|
2
|
+
import { BlockComponentsDescriptionRaw, BlockComponentsManifest } from './block_components';
|
|
6
3
|
import { BlockPackId } from './block_pack_id';
|
|
7
|
-
import {
|
|
8
|
-
BlockPackMetaDescriptionRaw,
|
|
9
|
-
BlockPackMetaManifest
|
|
10
|
-
} from './meta';
|
|
4
|
+
import { BlockPackMetaDescriptionRaw, BlockPackMetaManifest } from './meta';
|
|
11
5
|
|
|
12
|
-
export * from './block_components'
|
|
13
|
-
export * from './block_pack_id'
|
|
14
|
-
export * from './common'
|
|
15
|
-
export * from './content_types'
|
|
16
|
-
export * from './meta'
|
|
17
|
-
export * from './semver'
|
|
6
|
+
export * from './block_components';
|
|
7
|
+
export * from './block_pack_id';
|
|
8
|
+
export * from './common';
|
|
9
|
+
export * from './content_types';
|
|
10
|
+
export * from './meta';
|
|
11
|
+
export * from './semver';
|
|
18
12
|
|
|
19
13
|
export const BlockPackDescriptionFromPackageJsonRaw = z.object({
|
|
20
14
|
components: BlockComponentsDescriptionRaw,
|
|
21
15
|
meta: BlockPackMetaDescriptionRaw
|
|
22
16
|
});
|
|
23
17
|
|
|
24
|
-
export function CreateBlockPackDescriptionSchema<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
) {
|
|
18
|
+
export function CreateBlockPackDescriptionSchema<
|
|
19
|
+
Components extends ZodTypeAny,
|
|
20
|
+
Meta extends ZodTypeAny
|
|
21
|
+
>(components: Components, meta: Meta) {
|
|
28
22
|
return z.object({
|
|
29
23
|
id: BlockPackId,
|
|
30
24
|
components,
|
|
@@ -44,8 +38,20 @@ export const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(
|
|
|
44
38
|
);
|
|
45
39
|
export type BlockPackDescriptionRaw = z.infer<typeof BlockPackDescriptionRaw>;
|
|
46
40
|
|
|
47
|
-
export const
|
|
41
|
+
export const ManifestFileInfo = z.object({
|
|
42
|
+
name: z.string(),
|
|
43
|
+
size: z.number().int(),
|
|
44
|
+
sha256: z
|
|
45
|
+
.string()
|
|
46
|
+
.regex(/[0-9a-fA-F]/)
|
|
47
|
+
.toUpperCase()
|
|
48
|
+
.length(64) // 256 / 4 (bits per hex register)
|
|
49
|
+
});
|
|
50
|
+
export type ManifestFileInfo = z.infer<typeof ManifestFileInfo>;
|
|
51
|
+
|
|
52
|
+
export const BlockPackManifest = z.object({
|
|
48
53
|
schema: z.literal('v1'),
|
|
49
|
-
|
|
54
|
+
description: BlockPackDescriptionManifest,
|
|
55
|
+
files: z.array(ManifestFileInfo)
|
|
50
56
|
});
|
|
51
57
|
export type BlockPackManifest = z.infer<typeof BlockPackManifest>;
|