@milaboratories/pl-model-common 1.48.0 → 1.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/author_marker.d.ts +1 -2
- package/dist/author_marker.d.ts.map +1 -1
- package/dist/base64.d.ts +4 -6
- package/dist/base64.d.ts.map +1 -1
- package/dist/block_state.d.ts +13 -9
- package/dist/block_state.d.ts.map +1 -1
- package/dist/bmodel/block_config.d.ts +51 -29
- package/dist/bmodel/block_config.d.ts.map +1 -1
- package/dist/bmodel/block_kind_ref.d.ts +4 -6
- package/dist/bmodel/block_kind_ref.d.ts.map +1 -1
- package/dist/bmodel/code.d.ts +4 -5
- package/dist/bmodel/code.d.ts.map +1 -1
- package/dist/bmodel/container.d.ts +5 -5
- package/dist/bmodel/container.d.ts.map +1 -1
- package/dist/bmodel/normalization.d.ts +1 -3
- package/dist/bmodel/normalization.d.ts.map +1 -1
- package/dist/bmodel/types.d.ts +1 -2
- package/dist/bmodel/types.d.ts.map +1 -1
- package/dist/branding.d.ts +2 -3
- package/dist/branding.d.ts.map +1 -1
- package/dist/columns/accessor_traversal.d.ts +6 -8
- package/dist/columns/accessor_traversal.d.ts.map +1 -1
- package/dist/columns/column_registry.d.ts +2 -3
- package/dist/columns/column_registry.d.ts.map +1 -1
- package/dist/columns/column_selector.d.ts +9 -9
- package/dist/columns/column_selector.d.ts.map +1 -1
- package/dist/columns/dedup.d.ts +1 -3
- package/dist/columns/dedup.d.ts.map +1 -1
- package/dist/columns/providers.d.ts +3 -4
- package/dist/columns/providers.d.ts.map +1 -1
- package/dist/columns/types.d.ts +12 -9
- package/dist/columns/types.d.ts.map +1 -1
- package/dist/common_types.d.ts +4 -6
- package/dist/common_types.d.ts.map +1 -1
- package/dist/dialog/index.d.ts +4 -5
- package/dist/dialog/index.d.ts.map +1 -1
- package/dist/driver_kit.d.ts +2 -2
- package/dist/driver_kit.d.ts.map +1 -1
- package/dist/drivers/ChunkedStreamReader.d.ts +3 -5
- package/dist/drivers/ChunkedStreamReader.d.ts.map +1 -1
- package/dist/drivers/blob.d.ts +36 -25
- package/dist/drivers/blob.d.ts.map +1 -1
- package/dist/drivers/columns/columns_collection_driver.d.ts +6 -7
- package/dist/drivers/columns/columns_collection_driver.d.ts.map +1 -1
- package/dist/drivers/columns/discover_columns_options.d.ts +9 -8
- package/dist/drivers/columns/discover_columns_options.d.ts.map +1 -1
- package/dist/drivers/index.cjs +1 -0
- package/dist/drivers/index.d.ts +4 -2
- package/dist/drivers/index.js +2 -2
- package/dist/drivers/interfaces.d.ts +2 -3
- package/dist/drivers/interfaces.d.ts.map +1 -1
- package/dist/drivers/log.d.ts +26 -28
- package/dist/drivers/log.d.ts.map +1 -1
- package/dist/drivers/ls.d.ts +37 -27
- package/dist/drivers/ls.d.ts.map +1 -1
- package/dist/drivers/pframe/column_filter.d.ts +1 -3
- package/dist/drivers/pframe/column_filter.d.ts.map +1 -1
- package/dist/drivers/pframe/data_info.d.ts +77 -50
- package/dist/drivers/pframe/data_info.d.ts.map +1 -1
- package/dist/drivers/pframe/data_types.d.ts +50 -45
- package/dist/drivers/pframe/data_types.d.ts.map +1 -1
- package/dist/drivers/pframe/driver.d.ts +5 -5
- package/dist/drivers/pframe/driver.d.ts.map +1 -1
- package/dist/drivers/pframe/filter_spec.d.ts +10 -12
- package/dist/drivers/pframe/filter_spec.d.ts.map +1 -1
- package/dist/drivers/pframe/find_columns.d.ts +2 -4
- package/dist/drivers/pframe/find_columns.d.ts.map +1 -1
- package/dist/drivers/pframe/index.cjs +1 -0
- package/dist/drivers/pframe/index.d.ts +4 -2
- package/dist/drivers/pframe/index.js +2 -2
- package/dist/drivers/pframe/linker_columns.d.ts +4 -10
- package/dist/drivers/pframe/linker_columns.d.ts.map +1 -1
- package/dist/drivers/pframe/pframe.d.ts +3 -3
- package/dist/drivers/pframe/pframe.d.ts.map +1 -1
- package/dist/drivers/pframe/query/query_common.d.ts +52 -46
- package/dist/drivers/pframe/query/query_common.d.ts.map +1 -1
- package/dist/drivers/pframe/query/query_data.d.ts +26 -21
- package/dist/drivers/pframe/query/query_data.d.ts.map +1 -1
- package/dist/drivers/pframe/query/query_spec.d.ts +22 -19
- package/dist/drivers/pframe/query/query_spec.d.ts.map +1 -1
- package/dist/drivers/pframe/query/utils.d.ts +15 -11
- package/dist/drivers/pframe/query/utils.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/anchored.d.ts +3 -5
- package/dist/drivers/pframe/spec/anchored.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/discovered_column.d.ts +10 -11
- package/dist/drivers/pframe/spec/discovered_column.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/filtered_column.d.ts +17 -18
- package/dist/drivers/pframe/spec/filtered_column.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/ids.d.ts +16 -16
- package/dist/drivers/pframe/spec/ids.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/index.cjs +1 -0
- package/dist/drivers/pframe/spec/index.d.ts +2 -2
- package/dist/drivers/pframe/spec/index.js +2 -2
- package/dist/drivers/pframe/spec/native_id.d.ts +3 -3
- package/dist/drivers/pframe/spec/native_id.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/overridden.d.ts +14 -16
- package/dist/drivers/pframe/spec/overridden.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/selectors.d.ts +22 -22
- package/dist/drivers/pframe/spec/selectors.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/spec.cjs +39 -2
- package/dist/drivers/pframe/spec/spec.cjs.map +1 -1
- package/dist/drivers/pframe/spec/spec.d.ts +103 -71
- package/dist/drivers/pframe/spec/spec.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/spec.js +39 -3
- package/dist/drivers/pframe/spec/spec.js.map +1 -1
- package/dist/drivers/pframe/spec_driver.d.ts +30 -25
- package/dist/drivers/pframe/spec_driver.d.ts.map +1 -1
- package/dist/drivers/pframe/table.d.ts +1 -3
- package/dist/drivers/pframe/table.d.ts.map +1 -1
- package/dist/drivers/pframe/table_calculate.d.ts +55 -46
- package/dist/drivers/pframe/table_calculate.d.ts.map +1 -1
- package/dist/drivers/pframe/table_common.d.ts +9 -10
- package/dist/drivers/pframe/table_common.d.ts.map +1 -1
- package/dist/drivers/pframe/unique_values.d.ts +3 -3
- package/dist/drivers/pframe/unique_values.d.ts.map +1 -1
- package/dist/drivers/upload.d.ts +2 -3
- package/dist/drivers/upload.d.ts.map +1 -1
- package/dist/drivers/urls.d.ts +7 -8
- package/dist/drivers/urls.d.ts.map +1 -1
- package/dist/errors.d.ts +35 -36
- package/dist/errors.d.ts.map +1 -1
- package/dist/flags/block_flags.cjs.map +1 -1
- package/dist/flags/block_flags.d.ts +7 -7
- package/dist/flags/block_flags.d.ts.map +1 -1
- package/dist/flags/block_flags.js.map +1 -1
- package/dist/flags/flag_utils.d.ts +6 -8
- package/dist/flags/flag_utils.d.ts.map +1 -1
- package/dist/flags/type_utils.d.ts +6 -7
- package/dist/flags/type_utils.d.ts.map +1 -1
- package/dist/httpAuth.d.ts +4 -5
- package/dist/httpAuth.d.ts.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.js +2 -2
- package/dist/json.d.ts +11 -12
- package/dist/json.d.ts.map +1 -1
- package/dist/navigation.d.ts +16 -11
- package/dist/navigation.d.ts.map +1 -1
- package/dist/plid.d.ts +7 -9
- package/dist/plid.d.ts.map +1 -1
- package/dist/pool/entry.d.ts +8 -6
- package/dist/pool/entry.d.ts.map +1 -1
- package/dist/pool/query.d.ts +3 -4
- package/dist/pool/query.d.ts.map +1 -1
- package/dist/pool/spec.d.ts +33 -30
- package/dist/pool/spec.d.ts.map +1 -1
- package/dist/pool_entry.d.ts +2 -3
- package/dist/pool_entry.d.ts.map +1 -1
- package/dist/project_id.d.ts +1 -3
- package/dist/project_id.d.ts.map +1 -1
- package/dist/ref.d.ts +22 -23
- package/dist/ref.d.ts.map +1 -1
- package/dist/resource_types.d.ts +2 -3
- package/dist/resource_types.d.ts.map +1 -1
- package/dist/services/node_service_handlers.d.ts +1 -3
- package/dist/services/node_service_handlers.d.ts.map +1 -1
- package/dist/services/service_capabilities.d.ts +7 -9
- package/dist/services/service_capabilities.d.ts.map +1 -1
- package/dist/services/service_declarations.d.ts +2 -2
- package/dist/services/service_declarations.d.ts.map +1 -1
- package/dist/services/service_injectors.d.ts +7 -8
- package/dist/services/service_injectors.d.ts.map +1 -1
- package/dist/services/service_registry.d.ts +2 -4
- package/dist/services/service_registry.d.ts.map +1 -1
- package/dist/services/service_types.d.ts +24 -26
- package/dist/services/service_types.d.ts.map +1 -1
- package/dist/template/kind_selector.d.ts +9 -11
- package/dist/template/kind_selector.d.ts.map +1 -1
- package/dist/template/project_template_v1.d.ts +22 -20
- package/dist/template/project_template_v1.d.ts.map +1 -1
- package/dist/template/template_ref_form.d.ts +6 -5
- package/dist/template/template_ref_form.d.ts.map +1 -1
- package/dist/template/template_relocate.cjs +24 -3
- package/dist/template/template_relocate.cjs.map +1 -1
- package/dist/template/template_relocate.d.ts +8 -4
- package/dist/template/template_relocate.d.ts.map +1 -1
- package/dist/template/template_relocate.js +24 -3
- package/dist/template/template_relocate.js.map +1 -1
- package/dist/utag.d.ts +2 -4
- package/dist/utag.d.ts.map +1 -1
- package/dist/util.d.ts +2 -3
- package/dist/util.d.ts.map +1 -1
- package/dist/value_or_error.d.ts +2 -3
- package/dist/value_or_error.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/drivers/pframe/spec/spec.ts +50 -2
- package/src/flags/block_flags.ts +1 -1
- package/src/template/template_relocate.test.ts +57 -0
- package/src/template/template_relocate.ts +32 -4
|
@@ -4,9 +4,10 @@ import { PTableVector } from "./data_types.js";
|
|
|
4
4
|
import { PColumnValues } from "./data_info.js";
|
|
5
5
|
import { SpecQuery, SpecQueryJoinEntry } from "./query/query_spec.js";
|
|
6
6
|
import { PObjectId } from "../../pool/spec.js";
|
|
7
|
+
import "../../pool/index.js";
|
|
7
8
|
//#region src/drivers/pframe/table_calculate.d.ts
|
|
8
9
|
/** Defines a terminal column node in the join request tree */
|
|
9
|
-
interface ColumnJoinEntry<Col> {
|
|
10
|
+
export interface ColumnJoinEntry<Col> {
|
|
10
11
|
/** Node type discriminator */
|
|
11
12
|
readonly type: "column";
|
|
12
13
|
/** Local column */
|
|
@@ -16,7 +17,7 @@ interface ColumnJoinEntry<Col> {
|
|
|
16
17
|
* Axis filter slicing target axis from column axes.
|
|
17
18
|
* If the axis has parents or is a parent, slicing cannot be applied (an error will be thrown).
|
|
18
19
|
* */
|
|
19
|
-
interface ConstantAxisFilter {
|
|
20
|
+
export interface ConstantAxisFilter {
|
|
20
21
|
/** Filter type discriminator */
|
|
21
22
|
readonly type: "constant";
|
|
22
23
|
/** Index of axis to slice (zero-based) */
|
|
@@ -25,7 +26,7 @@ interface ConstantAxisFilter {
|
|
|
25
26
|
readonly constant: string | number;
|
|
26
27
|
}
|
|
27
28
|
/** Defines a terminal column node in the join request tree */
|
|
28
|
-
interface SlicedColumnJoinEntry<Col> {
|
|
29
|
+
export interface SlicedColumnJoinEntry<Col> {
|
|
29
30
|
/** Node type discriminator */
|
|
30
31
|
readonly type: "slicedColumn";
|
|
31
32
|
/** Local column */
|
|
@@ -35,7 +36,7 @@ interface SlicedColumnJoinEntry<Col> {
|
|
|
35
36
|
/** Non-empty list of axis filters */
|
|
36
37
|
readonly axisFilters: ConstantAxisFilter[];
|
|
37
38
|
}
|
|
38
|
-
interface ArtificialColumnJoinEntry<Col> {
|
|
39
|
+
export interface ArtificialColumnJoinEntry<Col> {
|
|
39
40
|
/** Node type discriminator */
|
|
40
41
|
readonly type: "artificialColumn";
|
|
41
42
|
/** Column definition */
|
|
@@ -46,7 +47,7 @@ interface ArtificialColumnJoinEntry<Col> {
|
|
|
46
47
|
readonly axesIndices: number[];
|
|
47
48
|
}
|
|
48
49
|
/** Defines a terminal column node in the join request tree */
|
|
49
|
-
interface InlineColumnJoinEntry {
|
|
50
|
+
export interface InlineColumnJoinEntry {
|
|
50
51
|
/** Node type discriminator */
|
|
51
52
|
readonly type: "inlineColumn";
|
|
52
53
|
/** Column definition */
|
|
@@ -56,7 +57,7 @@ interface InlineColumnJoinEntry {
|
|
|
56
57
|
* Defines a join request tree node that will output only records present in
|
|
57
58
|
* all child nodes ({@link entries}).
|
|
58
59
|
* */
|
|
59
|
-
interface InnerJoin<Col> {
|
|
60
|
+
export interface InnerJoin<Col> {
|
|
60
61
|
/** Node type discriminator */
|
|
61
62
|
readonly type: "inner";
|
|
62
63
|
/** Child nodes to be inner joined */
|
|
@@ -67,7 +68,7 @@ interface InnerJoin<Col> {
|
|
|
67
68
|
* least in one of the child nodes ({@link entries}), values for those PColumns
|
|
68
69
|
* that lack corresponding combinations of axis values will be null.
|
|
69
70
|
* */
|
|
70
|
-
interface FullJoin<Col> {
|
|
71
|
+
export interface FullJoin<Col> {
|
|
71
72
|
/** Node type discriminator */
|
|
72
73
|
readonly type: "full";
|
|
73
74
|
/** Child nodes to be fully outer joined */
|
|
@@ -83,7 +84,7 @@ interface FullJoin<Col> {
|
|
|
83
84
|
* This node can be thought as a chain of SQL LEFT JOIN operations starting from
|
|
84
85
|
* the {@link primary} node and adding {@link secondary} nodes one by one.
|
|
85
86
|
* */
|
|
86
|
-
interface OuterJoin<Col> {
|
|
87
|
+
export interface OuterJoin<Col> {
|
|
87
88
|
/** Node type discriminator */
|
|
88
89
|
readonly type: "outer";
|
|
89
90
|
/** Primes the join operation. Left part of LEFT JOIN. */
|
|
@@ -99,79 +100,79 @@ interface OuterJoin<Col> {
|
|
|
99
100
|
* the PColumns. Common axis are those axis which have equal {@link AxisId} derived
|
|
100
101
|
* from the columns axes spec.
|
|
101
102
|
* */
|
|
102
|
-
type JoinEntry<Col> = ColumnJoinEntry<Col> | SlicedColumnJoinEntry<Col> | ArtificialColumnJoinEntry<Col> | InlineColumnJoinEntry | InnerJoin<Col> | FullJoin<Col> | OuterJoin<Col>;
|
|
103
|
+
export type JoinEntry<Col> = ColumnJoinEntry<Col> | SlicedColumnJoinEntry<Col> | ArtificialColumnJoinEntry<Col> | InlineColumnJoinEntry | InnerJoin<Col> | FullJoin<Col> | OuterJoin<Col>;
|
|
103
104
|
/** Container representing whole data stored in specific PTable column. */
|
|
104
|
-
interface FullPTableColumnData {
|
|
105
|
+
export interface FullPTableColumnData {
|
|
105
106
|
/** Unified spec */
|
|
106
107
|
readonly spec: PTableColumnSpec;
|
|
107
108
|
/** Data */
|
|
108
109
|
readonly data: PTableVector;
|
|
109
110
|
}
|
|
110
|
-
interface SingleValueIsNAPredicate {
|
|
111
|
+
export interface SingleValueIsNAPredicate {
|
|
111
112
|
/** Comparison operator */
|
|
112
113
|
readonly operator: "IsNA";
|
|
113
114
|
}
|
|
114
|
-
interface SingleValueEqualPredicate {
|
|
115
|
+
export interface SingleValueEqualPredicate {
|
|
115
116
|
/** Comparison operator */
|
|
116
117
|
readonly operator: "Equal";
|
|
117
118
|
/** Reference value, NA values will not match */
|
|
118
119
|
readonly reference: string | number;
|
|
119
120
|
}
|
|
120
|
-
interface SingleValueInSetPredicate {
|
|
121
|
+
export interface SingleValueInSetPredicate {
|
|
121
122
|
/** Comparison operator */
|
|
122
123
|
readonly operator: "InSet";
|
|
123
124
|
/** Reference values, NA values will not match */
|
|
124
125
|
readonly references: (string | number)[];
|
|
125
126
|
}
|
|
126
|
-
interface SingleValueIEqualPredicate {
|
|
127
|
+
export interface SingleValueIEqualPredicate {
|
|
127
128
|
/** Comparison operator (case insensitive) */
|
|
128
129
|
readonly operator: "IEqual";
|
|
129
130
|
/** Reference value, NA values will not match */
|
|
130
131
|
readonly reference: string;
|
|
131
132
|
}
|
|
132
|
-
interface SingleValueLessPredicate {
|
|
133
|
+
export interface SingleValueLessPredicate {
|
|
133
134
|
/** Comparison operator */
|
|
134
135
|
readonly operator: "Less";
|
|
135
136
|
/** Reference value, NA values will not match */
|
|
136
137
|
readonly reference: string | number;
|
|
137
138
|
}
|
|
138
|
-
interface SingleValueLessOrEqualPredicate {
|
|
139
|
+
export interface SingleValueLessOrEqualPredicate {
|
|
139
140
|
/** Comparison operator */
|
|
140
141
|
readonly operator: "LessOrEqual";
|
|
141
142
|
/** Reference value, NA values will not match */
|
|
142
143
|
readonly reference: string | number;
|
|
143
144
|
}
|
|
144
|
-
interface SingleValueGreaterPredicate {
|
|
145
|
+
export interface SingleValueGreaterPredicate {
|
|
145
146
|
/** Comparison operator */
|
|
146
147
|
readonly operator: "Greater";
|
|
147
148
|
/** Reference value, NA values will not match */
|
|
148
149
|
readonly reference: string | number;
|
|
149
150
|
}
|
|
150
|
-
interface SingleValueGreaterOrEqualPredicate {
|
|
151
|
+
export interface SingleValueGreaterOrEqualPredicate {
|
|
151
152
|
/** Comparison operator */
|
|
152
153
|
readonly operator: "GreaterOrEqual";
|
|
153
154
|
/** Reference value, NA values will not match */
|
|
154
155
|
readonly reference: string | number;
|
|
155
156
|
}
|
|
156
|
-
interface SingleValueStringContainsPredicate {
|
|
157
|
+
export interface SingleValueStringContainsPredicate {
|
|
157
158
|
/** Comparison operator */
|
|
158
159
|
readonly operator: "StringContains";
|
|
159
160
|
/** Reference substring, NA values are skipped */
|
|
160
161
|
readonly substring: string;
|
|
161
162
|
}
|
|
162
|
-
interface SingleValueStringIContainsPredicate {
|
|
163
|
+
export interface SingleValueStringIContainsPredicate {
|
|
163
164
|
/** Comparison operator (case insensitive) */
|
|
164
165
|
readonly operator: "StringIContains";
|
|
165
166
|
/** Reference substring, NA values are skipped */
|
|
166
167
|
readonly substring: string;
|
|
167
168
|
}
|
|
168
|
-
interface SingleValueMatchesPredicate {
|
|
169
|
+
export interface SingleValueMatchesPredicate {
|
|
169
170
|
/** Comparison operator */
|
|
170
171
|
readonly operator: "Matches";
|
|
171
172
|
/** Regular expression, NA values are skipped */
|
|
172
173
|
readonly regex: string;
|
|
173
174
|
}
|
|
174
|
-
interface SingleValueStringContainsFuzzyPredicate {
|
|
175
|
+
export interface SingleValueStringContainsFuzzyPredicate {
|
|
175
176
|
/** Comparison operator */
|
|
176
177
|
readonly operator: "StringContainsFuzzy";
|
|
177
178
|
/** Reference value, NA values are skipped */
|
|
@@ -195,7 +196,7 @@ interface SingleValueStringContainsFuzzyPredicate {
|
|
|
195
196
|
*/
|
|
196
197
|
readonly wildcard?: string;
|
|
197
198
|
}
|
|
198
|
-
interface SingleValueStringIContainsFuzzyPredicate {
|
|
199
|
+
export interface SingleValueStringIContainsFuzzyPredicate {
|
|
199
200
|
/** Comparison operator (case insensitive) */
|
|
200
201
|
readonly operator: "StringIContainsFuzzy";
|
|
201
202
|
/** Reference value, NA values are skipped */
|
|
@@ -219,33 +220,33 @@ interface SingleValueStringIContainsFuzzyPredicate {
|
|
|
219
220
|
*/
|
|
220
221
|
readonly wildcard?: string;
|
|
221
222
|
}
|
|
222
|
-
interface SingleValueNotPredicateV2 {
|
|
223
|
+
export interface SingleValueNotPredicateV2 {
|
|
223
224
|
/** Comparison operator */
|
|
224
225
|
readonly operator: "Not";
|
|
225
226
|
/** Operand to negate */
|
|
226
227
|
readonly operand: SingleValuePredicateV2;
|
|
227
228
|
}
|
|
228
|
-
interface SingleValueAndPredicateV2 {
|
|
229
|
+
export interface SingleValueAndPredicateV2 {
|
|
229
230
|
/** Comparison operator */
|
|
230
231
|
readonly operator: "And";
|
|
231
232
|
/** Operands to combine */
|
|
232
233
|
readonly operands: SingleValuePredicateV2[];
|
|
233
234
|
}
|
|
234
|
-
interface SingleValueOrPredicateV2 {
|
|
235
|
+
export interface SingleValueOrPredicateV2 {
|
|
235
236
|
/** Comparison operator */
|
|
236
237
|
readonly operator: "Or";
|
|
237
238
|
/** Operands to combine */
|
|
238
239
|
readonly operands: SingleValuePredicateV2[];
|
|
239
240
|
}
|
|
240
241
|
/** Filtering predicate for a single axis or column value */
|
|
241
|
-
type SingleValuePredicateV2 = SingleValueIsNAPredicate | SingleValueEqualPredicate | SingleValueInSetPredicate | SingleValueLessPredicate | SingleValueLessOrEqualPredicate | SingleValueGreaterPredicate | SingleValueGreaterOrEqualPredicate | SingleValueStringContainsPredicate | SingleValueMatchesPredicate | SingleValueStringContainsFuzzyPredicate | SingleValueNotPredicateV2 | SingleValueAndPredicateV2 | SingleValueOrPredicateV2 | SingleValueIEqualPredicate | SingleValueStringIContainsPredicate | SingleValueStringIContainsFuzzyPredicate;
|
|
242
|
+
export type SingleValuePredicateV2 = SingleValueIsNAPredicate | SingleValueEqualPredicate | SingleValueInSetPredicate | SingleValueLessPredicate | SingleValueLessOrEqualPredicate | SingleValueGreaterPredicate | SingleValueGreaterOrEqualPredicate | SingleValueStringContainsPredicate | SingleValueMatchesPredicate | SingleValueStringContainsFuzzyPredicate | SingleValueNotPredicateV2 | SingleValueAndPredicateV2 | SingleValueOrPredicateV2 | SingleValueIEqualPredicate | SingleValueStringIContainsPredicate | SingleValueStringIContainsFuzzyPredicate;
|
|
242
243
|
/**
|
|
243
244
|
* Filter PTable records based on specific axis or column value. If this is an
|
|
244
245
|
* axis value filter and the axis is part of a partitioning key in some of the
|
|
245
246
|
* source PColumns, the filter will be pushed down to those columns, so only
|
|
246
247
|
* specific partitions will be retrieved from the remote storage.
|
|
247
248
|
* */
|
|
248
|
-
interface PTableRecordSingleValueFilterV2 {
|
|
249
|
+
export interface PTableRecordSingleValueFilterV2 {
|
|
249
250
|
/** Filter type discriminator */
|
|
250
251
|
readonly type: "bySingleColumnV2";
|
|
251
252
|
/** Target axis selector to examine values from */
|
|
@@ -254,15 +255,18 @@ interface PTableRecordSingleValueFilterV2 {
|
|
|
254
255
|
readonly predicate: SingleValuePredicateV2;
|
|
255
256
|
}
|
|
256
257
|
/** Generic PTable records filter */
|
|
257
|
-
type PTableRecordFilter = PTableRecordSingleValueFilterV2;
|
|
258
|
+
export type PTableRecordFilter = PTableRecordSingleValueFilterV2;
|
|
258
259
|
/** Sorting parameters for a PTable. */
|
|
259
|
-
type PTableSorting = {
|
|
260
|
-
/** Unified column identifier */
|
|
261
|
-
readonly
|
|
260
|
+
export type PTableSorting = {
|
|
261
|
+
/** Unified column identifier */
|
|
262
|
+
readonly column: PTableColumnId;
|
|
263
|
+
/** Sorting order */
|
|
264
|
+
readonly ascending: boolean;
|
|
265
|
+
/** Sorting in respect to NA and absent values */
|
|
262
266
|
readonly naAndAbsentAreLeastValues: boolean;
|
|
263
267
|
};
|
|
264
268
|
/** Information required to instantiate a PTable. */
|
|
265
|
-
interface PTableDef<Col> {
|
|
269
|
+
export interface PTableDef<Col> {
|
|
266
270
|
/** Join tree to populate the PTable */
|
|
267
271
|
readonly src: JoinEntry<Col>;
|
|
268
272
|
/** Partition filters */
|
|
@@ -273,27 +277,32 @@ interface PTableDef<Col> {
|
|
|
273
277
|
readonly sorting: PTableSorting[];
|
|
274
278
|
}
|
|
275
279
|
/** Information required to instantiate a PTable (V2, query-based). */
|
|
276
|
-
interface PTableDefV2<Col> {
|
|
280
|
+
export interface PTableDefV2<Col> {
|
|
277
281
|
/** Pre-built query spec describing joins, filters and sorting */
|
|
278
282
|
readonly query: SpecQuery<Col>;
|
|
279
283
|
}
|
|
280
284
|
/** Request to create and retrieve entirety of data of PTable. */
|
|
281
|
-
type CalculateTableDataRequest<Col> = {
|
|
282
|
-
/** Join tree to populate the PTable */
|
|
283
|
-
readonly
|
|
285
|
+
export type CalculateTableDataRequest<Col> = {
|
|
286
|
+
/** Join tree to populate the PTable */
|
|
287
|
+
readonly src: JoinEntry<Col>;
|
|
288
|
+
/** Record filters */
|
|
289
|
+
readonly filters: PTableRecordFilter[];
|
|
290
|
+
/** Table sorting */
|
|
284
291
|
readonly sorting: PTableSorting[];
|
|
285
292
|
};
|
|
286
293
|
/** Response for {@link CalculateTableDataRequest} */
|
|
287
|
-
type CalculateTableDataResponse = FullPTableColumnData[];
|
|
288
|
-
declare function mapPTableDef<C1, C2>(def: PTableDef<C1>, cb: (c: C1) => C2): PTableDef<C2>;
|
|
289
|
-
declare function sortPTableDef(def: PTableDef<PObjectId>): PTableDef<PObjectId>;
|
|
290
|
-
declare function mapPTableDefV2<C1, C2>(def: PTableDefV2<C1>, visitor: {
|
|
291
|
-
/** Transform column references in leaf nodes (column, sparseToDenseColumn). */
|
|
292
|
-
|
|
294
|
+
export type CalculateTableDataResponse = FullPTableColumnData[];
|
|
295
|
+
export declare function mapPTableDef<C1, C2>(def: PTableDef<C1>, cb: (c: C1) => C2): PTableDef<C2>;
|
|
296
|
+
export declare function sortPTableDef(def: PTableDef<PObjectId>): PTableDef<PObjectId>;
|
|
297
|
+
export declare function mapPTableDefV2<C1, C2>(def: PTableDefV2<C1>, visitor: {
|
|
298
|
+
/** Transform column references in leaf nodes (column, sparseToDenseColumn). */
|
|
299
|
+
column: (c: C1) => C2;
|
|
300
|
+
/** Visit a node after its children have been traversed. */
|
|
301
|
+
node?: (node: SpecQuery<C2>) => SpecQuery<C2>;
|
|
302
|
+
/** Visit a join entry after its inner query has been traversed. */
|
|
293
303
|
joinEntry?: (entry: SpecQueryJoinEntry<C2>) => SpecQueryJoinEntry<C2>;
|
|
294
304
|
}): PTableDefV2<C2>;
|
|
295
|
-
declare function mapJoinEntry<C1, C2>(entry: JoinEntry<C1>, cb: (c: C1) => C2): JoinEntry<C2>;
|
|
296
|
-
declare function sortJoinEntry(entry: JoinEntry<PObjectId>): JoinEntry<PObjectId>;
|
|
305
|
+
export declare function mapJoinEntry<C1, C2>(entry: JoinEntry<C1>, cb: (c: C1) => C2): JoinEntry<C2>;
|
|
306
|
+
export declare function sortJoinEntry(entry: JoinEntry<PObjectId>): JoinEntry<PObjectId>;
|
|
297
307
|
//#endregion
|
|
298
|
-
export { ArtificialColumnJoinEntry, CalculateTableDataRequest, CalculateTableDataResponse, ColumnJoinEntry, ConstantAxisFilter, FullJoin, FullPTableColumnData, InlineColumnJoinEntry, InnerJoin, JoinEntry, OuterJoin, PTableDef, PTableDefV2, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableSorting, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, mapJoinEntry, mapPTableDef, mapPTableDefV2, sortJoinEntry, sortPTableDef };
|
|
299
308
|
//# sourceMappingURL=table_calculate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_calculate.d.ts","names":[],"sources":["../../../src/drivers/pframe/table_calculate.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"table_calculate.d.ts","names":[],"sources":["../../../src/drivers/pframe/table_calculate.ts"],"mappings":";;;;;;;;;iBAWiB,gBAAgB;;WAEtB;;WAGA,QAAQ;;;;;;iBAOF;;WAEN;;WAGA;;WAGA;;;iBAIM,sBAAsB;;WAE5B;;WAGA,QAAQ;;WAGR,OAAO;;WAGP,aAAa;;iBAGP,0BAA0B;;WAEhC;;WAGA,QAAQ;;WAGR,OAAO;;WAGP;;;iBAIM;;WAEN;;WAGA,QAAQ,QAAQ;;;;;;iBAOV,UAAU;;WAEhB;;WAGA,SAAS,UAAU;;;;;;;iBAQb,SAAS;;WAEf;;WAGA,SAAS,UAAU;;;;;;;;;;;;iBAab,UAAU;;WAEhB;;WAGA,SAAS,UAAU;;;WAInB,WAAW,UAAU;;;;;;;;;YAUpB,UAAU,OAClB,gBAAgB,OAChB,sBAAsB,OACtB,0BAA0B,OAC1B,wBACA,UAAU,OACV,SAAS,OACT,UAAU;;iBAGG;;WAEN,MAAM;;WAGN,MAAM;;iBAGA;;WAEN;;iBAGM;;WAEN;;WAGA;;iBAGM;;WAEN;;WAGA;;iBAGM;;WAEN;;WAGA;;iBAGM;;WAEN;;WAGA;;iBAGM;;WAEN;;WAGA;;iBAGM;;WAEN;;WAGA;;iBAGM;;WAEN;;WAGA;;iBAGM;;WAEN;;WAGA;;iBAGM;;WAEN;;WAGA;;iBAGM;;WAEN;;WAGA;;iBAGM;;WAEN;;WAGA;;;;;;;;;;;WAYA;;WAGA;;;;;WAMA;;iBAGM;;WAEN;;WAGA;;;;;;;;;;;WAYA;;WAGA;;;;;WAMA;;iBAGM;;WAEN;;WAGA,SAAS;;iBAGH;;WAEN;;WAGA,UAAU;;iBAGJ;;WAEN;;WAGA,UAAU;;;YAIT,yBACR,2BACA,4BACA,4BACA,2BACA,kCACA,8BACA,qCACA,qCACA,8BACA,0CACA,4BACA,4BACA,2BACA,6BACA,sCACA;;;;;;;iBAQa;;WAEN;;WAGA,QAAQ;;WAGR,WAAW;;;YAIV,qBAAqB;;YAGrB;;WAED,QAAQ;;WAGR;;WAGA;;;iBAIM,UAAU;;WAEhB,KAAK,UAAU;;WAGf,kBAAkB;;WAGlB,SAAS;;WAGT,SAAS;;;iBAIH,YAAY;;WAElB,OAAO,UAAU;;;YAIhB,0BAA0B;;WAE3B,KAAK,UAAU;;WAGf,SAAS;;WAGT,SAAS;;;YAIR,6BAA6B;wBAEzB,aAAa,IAAI,IAAI,KAAK,UAAU,KAAK,KAAK,GAAG,OAAO,KAAK,UAAU;wBAIvE,cAAc,KAAK,UAAU,aAAa,UAAU;wBAsBpD,eAAe,IAAI,IACjC,KAAK,YAAY,KACjB;;EAEE,SAAS,GAAG,OAAO;;EAEnB,QAAQ,MAAM,UAAU,QAAQ,UAAU;;EAE1C,aAAa,OAAO,mBAAmB,QAAQ,mBAAmB;IAEnE,YAAY;wBAIC,aAAa,IAAI,IAAI,OAAO,UAAU,KAAK,KAAK,GAAG,OAAO,KAAK,UAAU;wBA0FzE,cAAc,OAAO,UAAU,aAAa,UAAU"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { AxisId, AxisSpec, PColumnSpec } from "./spec/spec.js";
|
|
2
2
|
import { ColumnUniversalId } from "./spec/ids.js";
|
|
3
|
-
|
|
4
3
|
//#region src/drivers/pframe/table_common.d.ts
|
|
5
|
-
type PTableColumnSpecAxis = {
|
|
4
|
+
export type PTableColumnSpecAxis = {
|
|
6
5
|
type: "axis";
|
|
7
6
|
id: AxisId;
|
|
8
7
|
spec: AxisSpec;
|
|
9
8
|
};
|
|
10
|
-
type PTableColumnSpecColumn = {
|
|
9
|
+
export type PTableColumnSpecColumn = {
|
|
11
10
|
type: "column";
|
|
12
11
|
/**
|
|
13
12
|
* Leaf column id as it appears in the SpecQuery — may be a rich
|
|
@@ -19,18 +18,18 @@ type PTableColumnSpecColumn = {
|
|
|
19
18
|
spec: PColumnSpec;
|
|
20
19
|
};
|
|
21
20
|
/** Unified spec object for axes and columns */
|
|
22
|
-
type PTableColumnSpec = PTableColumnSpecAxis | PTableColumnSpecColumn;
|
|
23
|
-
type PTableColumnIdAxis = {
|
|
21
|
+
export type PTableColumnSpec = PTableColumnSpecAxis | PTableColumnSpecColumn;
|
|
22
|
+
export type PTableColumnIdAxis = {
|
|
24
23
|
type: "axis";
|
|
25
24
|
id: AxisId;
|
|
26
25
|
};
|
|
27
|
-
type PTableColumnIdColumn = {
|
|
28
|
-
type: "column";
|
|
26
|
+
export type PTableColumnIdColumn = {
|
|
27
|
+
type: "column";
|
|
28
|
+
/** @see PTableColumnSpecColumn.id */
|
|
29
29
|
id: ColumnUniversalId;
|
|
30
30
|
};
|
|
31
31
|
/** Unified PTable column identifier */
|
|
32
|
-
type PTableColumnId = PTableColumnIdAxis | PTableColumnIdColumn;
|
|
33
|
-
declare function getPTableColumnId(spec: PTableColumnSpec): PTableColumnId;
|
|
32
|
+
export type PTableColumnId = PTableColumnIdAxis | PTableColumnIdColumn;
|
|
33
|
+
export declare function getPTableColumnId(spec: PTableColumnSpec): PTableColumnId;
|
|
34
34
|
//#endregion
|
|
35
|
-
export { PTableColumnId, PTableColumnIdAxis, PTableColumnIdColumn, PTableColumnSpec, PTableColumnSpecAxis, PTableColumnSpecColumn, getPTableColumnId };
|
|
36
35
|
//# sourceMappingURL=table_common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_common.d.ts","names":[],"sources":["../../../src/drivers/pframe/table_common.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"table_common.d.ts","names":[],"sources":["../../../src/drivers/pframe/table_common.ts"],"mappings":";;;YAGY;EACV;EACA,IAAI;EACJ,MAAM;;YAGI;EACV;;;;;;;EAOA,IAAI;EACJ,MAAM;;;YAII,mBAAmB,uBAAuB;YAE1C;EACV;EACA,IAAI;;YAGM;EACV;;EAEA,IAAI;;;YAIM,iBAAiB,qBAAqB;wBAElC,kBAAkB,MAAM,mBAAmB"}
|
|
@@ -2,9 +2,10 @@ import { AxisId } from "./spec/spec.js";
|
|
|
2
2
|
import { PTableVector } from "./data_types.js";
|
|
3
3
|
import { PTableRecordFilter } from "./table_calculate.js";
|
|
4
4
|
import { PObjectId } from "../../pool/spec.js";
|
|
5
|
+
import "../../pool/index.js";
|
|
5
6
|
//#region src/drivers/pframe/unique_values.d.ts
|
|
6
7
|
/** Calculate set of unique values for a specific axis for the filtered set of records */
|
|
7
|
-
interface UniqueValuesRequest {
|
|
8
|
+
export interface UniqueValuesRequest {
|
|
8
9
|
/** Target axis id */
|
|
9
10
|
readonly columnId: PObjectId;
|
|
10
11
|
/** Target axis id, if not specified calculates unique column values */
|
|
@@ -14,12 +15,11 @@ interface UniqueValuesRequest {
|
|
|
14
15
|
/** Max number of values to return, if reached response will contain overflow flag */
|
|
15
16
|
readonly limit: number;
|
|
16
17
|
}
|
|
17
|
-
interface UniqueValuesResponse {
|
|
18
|
+
export interface UniqueValuesResponse {
|
|
18
19
|
/** Unique values */
|
|
19
20
|
readonly values: PTableVector;
|
|
20
21
|
/** True if limit was reached and response contain non-exhaustive list of values. */
|
|
21
22
|
readonly overflow: boolean;
|
|
22
23
|
}
|
|
23
24
|
//#endregion
|
|
24
|
-
export { UniqueValuesRequest, UniqueValuesResponse };
|
|
25
25
|
//# sourceMappingURL=unique_values.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique_values.d.ts","names":[],"sources":["../../../src/drivers/pframe/unique_values.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"unique_values.d.ts","names":[],"sources":["../../../src/drivers/pframe/unique_values.ts"],"mappings":";;;;;;;iBAMiB;;WAEN,UAAU;;WAGV,OAAO;;WAGP,SAAS;;WAGT;;iBAGM;;WAEN,QAAQ;;WAGR"}
|
package/dist/drivers/upload.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/drivers/upload.d.ts
|
|
2
|
-
interface ImportProgress {
|
|
2
|
+
export interface ImportProgress {
|
|
3
3
|
done: boolean;
|
|
4
4
|
/** Status of indexing/uploading got from platforma gRPC. */
|
|
5
5
|
status?: ImportStatus;
|
|
@@ -14,12 +14,11 @@ interface ImportProgress {
|
|
|
14
14
|
lastError?: string;
|
|
15
15
|
}
|
|
16
16
|
/** Almost direct mapping from proto struct got from gRPC. */
|
|
17
|
-
interface ImportStatus {
|
|
17
|
+
export interface ImportStatus {
|
|
18
18
|
/** A float from 0 to 1 and is equal to bytesProcessed / bytesTotal. */
|
|
19
19
|
readonly progress: number;
|
|
20
20
|
readonly bytesProcessed?: number;
|
|
21
21
|
readonly bytesTotal?: number;
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
|
-
export { ImportProgress, ImportStatus };
|
|
25
24
|
//# sourceMappingURL=upload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","names":[],"sources":["../../src/drivers/upload.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"upload.d.ts","names":[],"sources":["../../src/drivers/upload.ts"],"mappings":";iBAAiB;EACf;;EAEA,SAAS;;WAEA;;EAET;;;;;EAKA;;;iBAIe;;WAEN;WACA;WACA"}
|
package/dist/drivers/urls.d.ts
CHANGED
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* plblob+folder://signature@sufolder_with_unzipped_blob/
|
|
4
4
|
*/
|
|
5
|
-
type FolderURL = `plblob+folder://${string}`;
|
|
6
|
-
type ArchiveFormat = "zip" | "tar" | "tgz";
|
|
7
|
-
interface BlobToURLDriver {
|
|
5
|
+
export type FolderURL = `plblob+folder://${string}`;
|
|
6
|
+
export type ArchiveFormat = "zip" | "tar" | "tgz";
|
|
7
|
+
export interface BlobToURLDriver {
|
|
8
8
|
getPathForCustomProtocol(url: FolderURL): string;
|
|
9
9
|
}
|
|
10
|
-
declare function isFolderURL(url: string): url is FolderURL;
|
|
10
|
+
export declare function isFolderURL(url: string): url is FolderURL;
|
|
11
11
|
/**
|
|
12
12
|
* URLs and a custom protocol for the block UI.
|
|
13
13
|
* block-ui://signature@folder_with_ui/
|
|
14
14
|
*/
|
|
15
|
-
type BlockUIURL = `block-ui://${string}`;
|
|
16
|
-
interface FrontendDriver {
|
|
15
|
+
export type BlockUIURL = `block-ui://${string}`;
|
|
16
|
+
export interface FrontendDriver {
|
|
17
17
|
getPathForBlockUI(url: BlockUIURL): string;
|
|
18
18
|
}
|
|
19
|
-
declare function isBlockUIURL(url: string): url is BlockUIURL;
|
|
19
|
+
export declare function isBlockUIURL(url: string): url is BlockUIURL;
|
|
20
20
|
//#endregion
|
|
21
|
-
export { ArchiveFormat, BlobToURLDriver, BlockUIURL, FolderURL, FrontendDriver, isBlockUIURL, isFolderURL };
|
|
22
21
|
//# sourceMappingURL=urls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urls.d.ts","names":[],"sources":["../../src/drivers/urls.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"urls.d.ts","names":[],"sources":["../../src/drivers/urls.ts"],"mappings":";;;;YAGY;YAEA;iBAEK;EACf,yBAAyB,KAAK;;wBAGhB,YAAY,cAAc,OAAO;;;;;YASrC;iBAEK;EACf,kBAAkB,KAAK;;wBAGT,aAAa,cAAc,OAAO"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -2,78 +2,77 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Just for convenience, usually it is an Error with name 'AbortError'
|
|
4
4
|
*/
|
|
5
|
-
declare class AbortError extends Error {
|
|
5
|
+
export declare class AbortError extends Error {
|
|
6
6
|
name: string;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Throw this to show a message without stack trace in UI
|
|
10
10
|
*/
|
|
11
|
-
declare class UiError extends Error {
|
|
11
|
+
export declare class UiError extends Error {
|
|
12
12
|
name: string;
|
|
13
13
|
}
|
|
14
|
-
declare function isAbortError(error: unknown): error is Error & {
|
|
14
|
+
export declare function isAbortError(error: unknown): error is Error & {
|
|
15
15
|
name: "AbortError";
|
|
16
16
|
};
|
|
17
|
-
declare function hasAbortError(error: unknown): boolean;
|
|
18
|
-
declare function isAggregateError(error: unknown): error is AggregateError;
|
|
19
|
-
declare class ServiceError extends Error {
|
|
17
|
+
export declare function hasAbortError(error: unknown): boolean;
|
|
18
|
+
export declare function isAggregateError(error: unknown): error is AggregateError;
|
|
19
|
+
export declare class ServiceError extends Error {
|
|
20
20
|
name: string;
|
|
21
21
|
}
|
|
22
|
-
declare function isServiceError(error: unknown): error is ServiceError;
|
|
23
|
-
declare class ServiceInvalidIdError extends ServiceError {
|
|
22
|
+
export declare function isServiceError(error: unknown): error is ServiceError;
|
|
23
|
+
export declare class ServiceInvalidIdError extends ServiceError {
|
|
24
24
|
name: string;
|
|
25
25
|
}
|
|
26
|
-
declare function isServiceInvalidIdError(error: unknown): error is ServiceInvalidIdError;
|
|
27
|
-
declare class ServiceAlreadyRegisteredError extends ServiceError {
|
|
26
|
+
export declare function isServiceInvalidIdError(error: unknown): error is ServiceInvalidIdError;
|
|
27
|
+
export declare class ServiceAlreadyRegisteredError extends ServiceError {
|
|
28
28
|
name: string;
|
|
29
29
|
}
|
|
30
|
-
declare function isServiceAlreadyRegisteredError(error: unknown): error is ServiceAlreadyRegisteredError;
|
|
31
|
-
declare class ServiceInjectionError extends ServiceError {
|
|
30
|
+
export declare function isServiceAlreadyRegisteredError(error: unknown): error is ServiceAlreadyRegisteredError;
|
|
31
|
+
export declare class ServiceInjectionError extends ServiceError {
|
|
32
32
|
name: string;
|
|
33
33
|
}
|
|
34
|
-
declare function isServiceInjectionError(error: unknown): error is ServiceInjectionError;
|
|
35
|
-
declare class ServiceNotRegisteredError extends ServiceError {
|
|
34
|
+
export declare function isServiceInjectionError(error: unknown): error is ServiceInjectionError;
|
|
35
|
+
export declare class ServiceNotRegisteredError extends ServiceError {
|
|
36
36
|
name: string;
|
|
37
37
|
}
|
|
38
|
-
declare function isServiceNotRegisteredError(error: unknown): error is ServiceNotRegisteredError;
|
|
39
|
-
declare class ServiceMethodNotFoundError extends ServiceError {
|
|
38
|
+
export declare function isServiceNotRegisteredError(error: unknown): error is ServiceNotRegisteredError;
|
|
39
|
+
export declare class ServiceMethodNotFoundError extends ServiceError {
|
|
40
40
|
name: string;
|
|
41
41
|
}
|
|
42
|
-
declare function isServiceMethodNotFoundError(error: unknown): error is ServiceMethodNotFoundError;
|
|
43
|
-
declare class PFrameError extends Error {
|
|
42
|
+
export declare function isServiceMethodNotFoundError(error: unknown): error is ServiceMethodNotFoundError;
|
|
43
|
+
export declare class PFrameError extends Error {
|
|
44
44
|
name: string;
|
|
45
45
|
}
|
|
46
|
-
declare function isPFrameError(error: unknown): error is PFrameError;
|
|
47
|
-
declare class PFrameDriverError extends PFrameError {
|
|
46
|
+
export declare function isPFrameError(error: unknown): error is PFrameError;
|
|
47
|
+
export declare class PFrameDriverError extends PFrameError {
|
|
48
48
|
name: string;
|
|
49
49
|
}
|
|
50
|
-
declare function isPFrameDriverError(error: unknown): error is PFrameDriverError;
|
|
51
|
-
declare class PFrameSpecDriverError extends PFrameError {
|
|
50
|
+
export declare function isPFrameDriverError(error: unknown): error is PFrameDriverError;
|
|
51
|
+
export declare class PFrameSpecDriverError extends PFrameError {
|
|
52
52
|
name: string;
|
|
53
53
|
}
|
|
54
|
-
declare function isPFrameSpecDriverError(error: unknown): error is PFrameSpecDriverError;
|
|
55
|
-
declare function ensureError(value: unknown): Error;
|
|
56
|
-
type SerializedError = {
|
|
54
|
+
export declare function isPFrameSpecDriverError(error: unknown): error is PFrameSpecDriverError;
|
|
55
|
+
export declare function ensureError(value: unknown): Error;
|
|
56
|
+
export type SerializedError = {
|
|
57
57
|
name: string;
|
|
58
58
|
message: string;
|
|
59
59
|
stack: string | undefined;
|
|
60
60
|
cause?: SerializedError;
|
|
61
61
|
};
|
|
62
|
-
declare function deserializeError(obj: SerializedError): Error;
|
|
63
|
-
declare function serializeError(e: unknown): SerializedError;
|
|
64
|
-
type ResultOrError<S, F = Error> = {
|
|
62
|
+
export declare function deserializeError(obj: SerializedError): Error;
|
|
63
|
+
export declare function serializeError(e: unknown): SerializedError;
|
|
64
|
+
export type ResultOrError<S, F = Error> = {
|
|
65
65
|
value: S;
|
|
66
66
|
error?: undefined;
|
|
67
67
|
} | {
|
|
68
68
|
error: F;
|
|
69
69
|
};
|
|
70
|
-
declare function unwrapResult<T>(result: ResultOrError<T, Error | SerializedError>): T;
|
|
71
|
-
declare function serializeResult<T>(result: ResultOrError<T>): ResultOrError<T, SerializedError>;
|
|
72
|
-
declare function deserializeResult<T>(result: ResultOrError<T, SerializedError>): ResultOrError<T>;
|
|
73
|
-
declare function wrapCallback<T>(callback: () => T): ResultOrError<T>;
|
|
74
|
-
declare function wrapAsyncCallback<T>(callback: () => Promise<T>): Promise<ResultOrError<T>>;
|
|
75
|
-
declare function wrapAndSerialize<T>(callback: () => T): ResultOrError<T, SerializedError>;
|
|
76
|
-
declare function wrapAndSerializeAsync<T>(callback: () => Promise<T>): Promise<ResultOrError<T, SerializedError>>;
|
|
70
|
+
export declare function unwrapResult<T>(result: ResultOrError<T, Error | SerializedError>): T;
|
|
71
|
+
export declare function serializeResult<T>(result: ResultOrError<T>): ResultOrError<T, SerializedError>;
|
|
72
|
+
export declare function deserializeResult<T>(result: ResultOrError<T, SerializedError>): ResultOrError<T>;
|
|
73
|
+
export declare function wrapCallback<T>(callback: () => T): ResultOrError<T>;
|
|
74
|
+
export declare function wrapAsyncCallback<T>(callback: () => Promise<T>): Promise<ResultOrError<T>>;
|
|
75
|
+
export declare function wrapAndSerialize<T>(callback: () => T): ResultOrError<T, SerializedError>;
|
|
76
|
+
export declare function wrapAndSerializeAsync<T>(callback: () => Promise<T>): Promise<ResultOrError<T, SerializedError>>;
|
|
77
77
|
//#endregion
|
|
78
|
-
export { AbortError, PFrameDriverError, PFrameError, PFrameSpecDriverError, ResultOrError, SerializedError, ServiceAlreadyRegisteredError, ServiceError, ServiceInjectionError, ServiceInvalidIdError, ServiceMethodNotFoundError, ServiceNotRegisteredError, UiError, deserializeError, deserializeResult, ensureError, hasAbortError, isAbortError, isAggregateError, isPFrameDriverError, isPFrameError, isPFrameSpecDriverError, isServiceAlreadyRegisteredError, isServiceError, isServiceInjectionError, isServiceInvalidIdError, isServiceMethodNotFoundError, isServiceNotRegisteredError, serializeError, serializeResult, unwrapResult, wrapAndSerialize, wrapAndSerializeAsync, wrapAsyncCallback, wrapCallback };
|
|
79
78
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","names":[],"sources":["../src/errors.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.d.ts","names":[],"sources":["../src/errors.ts"],"mappings":";;;;qBAGa,mBAAmB;EAC9B;;;;;qBAMW,gBAAgB;EAC3B;;wBAGc,aAAa,iBAAiB,SAAS;EAAU;;wBAIjD,cAAc;wBAQd,iBAAiB,iBAAiB,SAAS;qBAI9C,qBAAqB;EAChC;;wBAGc,eAAe,iBAAiB,SAAS;qBAO5C,8BAA8B;EACzC;;wBAGc,wBAAwB,iBAAiB,SAAS;qBAIrD,sCAAsC;EACjD;;wBAGc,gCACd,iBACC,SAAS;qBAIC,8BAA8B;EACzC;;wBAGc,wBAAwB,iBAAiB,SAAS;qBAIrD,kCAAkC;EAC7C;;wBAGc,4BAA4B,iBAAiB,SAAS;qBAIzD,mCAAmC;EAC9C;;wBAGc,6BAA6B,iBAAiB,SAAS;qBAI1D,oBAAoB;EAC/B;;wBAGc,cAAc,iBAAiB,SAAS;qBAI3C,0BAA0B;EACrC;;wBAGc,oBAAoB,iBAAiB,SAAS;qBAIjD,8BAA8B;EACzC;;wBAGc,wBAAwB,iBAAiB,SAAS;wBAqBlD,YAAY,iBAAiB;YAUjC;EACV;EACA;EACA;EACA,QAAQ;;wBAGM,iBAAiB,KAAK,kBAAkB;wBAUxC,eAAe,aAAa;YAYhC,cAAc,GAAG,IAAI;EAE3B,OAAO;EACP;;EAGA,OAAO;;wBAGG,aAAa,GAAG,QAAQ,cAAc,GAAG,QAAQ,mBAAmB;wBAOpE,gBAAgB,GAAG,QAAQ,cAAc,KAAK,cAAc,GAAG;wBAO/D,kBAAkB,GAAG,QAAQ,cAAc,GAAG,mBAAmB,cAAc;wBAO/E,aAAa,GAAG,gBAAgB,IAAI,cAAc;wBAS5C,kBAAkB,GAAG,gBAAgB,QAAQ,KAAK,QAAQ,cAAc;wBAS9E,iBAAiB,GAAG,gBAAgB,IAAI,cAAc,GAAG;wBAKnD,sBAAsB,GAC1C,gBAAgB,QAAQ,KACvB,QAAQ,cAAc,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_flags.cjs","names":[],"sources":["../../src/flags/block_flags.ts"],"sourcesContent":["import type { ServiceRequireFlags } from \"../services\";\nimport type { ArrayTypeUnion, Assert, Is, IsSubtypeOf } from \"./type_utils\";\n\n/**\n * Block-specific feature flags. Define flags that are interpreted by the desktop app to select\n * appropriate API to expose into Model and UI runtimes.\n *\n * Flags are split into two categories:\n * - supports... - those flags tells the desktop app that the block supports certain APIs, but can without them as well\n * - requires... - those flags tells the desktop app that the block requires certain APIs, and if desktop app doesn't support it, it can't be used in the block\n */\nexport type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> &\n Record<`requires${string}`, boolean | number | undefined>;\n\n/**\n * Known block flags. Flags are set during model compilation, see `
|
|
1
|
+
{"version":3,"file":"block_flags.cjs","names":[],"sources":["../../src/flags/block_flags.ts"],"sourcesContent":["import type { ServiceRequireFlags } from \"../services\";\nimport type { ArrayTypeUnion, Assert, Is, IsSubtypeOf } from \"./type_utils\";\n\n/**\n * Block-specific feature flags. Define flags that are interpreted by the desktop app to select\n * appropriate API to expose into Model and UI runtimes.\n *\n * Flags are split into two categories:\n * - supports... - those flags tells the desktop app that the block supports certain APIs, but can without them as well\n * - requires... - those flags tells the desktop app that the block requires certain APIs, and if desktop app doesn't support it, it can't be used in the block\n */\nexport type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> &\n Record<`requires${string}`, boolean | number | undefined>;\n\n/**\n * Known block flags. Flags are set during model compilation, see `BlockModelV3` feature flags for more details and for initial values.\n */\nexport type BlockCodeKnownFeatureFlags = {\n readonly supportsLazyState?: boolean;\n readonly supportsPframeQueryRanking?: boolean;\n readonly requiresModelAPIVersion?: number;\n readonly requiresUIAPIVersion?: number;\n readonly requiresCreatePTable?: number;\n readonly requiresPFramesVersion?: number;\n} & ServiceRequireFlags;\n\n/**\n * Required PFrames version. Bump this in lockstep with the `@milaboratories/pframes-rs-*`\n * version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on\n * older desktop apps.\n */\nexport const REQUIRES_PFRAMES_VERSION = 1_001_031;\n\nexport const AllSupportsFeatureFlags = [\"supportsLazyState\", \"supportsPframeQueryRanking\"] as const;\n\nexport const AllRequiresFeatureFlags = [\n \"requiresUIAPIVersion\",\n \"requiresCreatePTable\",\n \"requiresPFramesVersion\",\n \"requiresModelAPIVersion\",\n] as const;\n\n//\n// Assertions\n//\n\n// This assertion ensures that BlockConfigV3KnownFeatureFlags is a subtype of BlockConfigV3FeatureFlags.\n// It will produce a compile-time error if there's a mismatch.\ntype _KnownFlagsAreValidFlags = Assert<\n IsSubtypeOf<BlockCodeKnownFeatureFlags, BlockCodeFeatureFlags>\n>;\n\n// This check ensures that all keys in BlockConfigV3FeatureFlags are covered in the arrays above.\n// It will produce a compile-time error if there's a mismatch.\n// Adding a service to Services automatically satisfies this assertion via ServiceRequireFlags.\ntype _AllFlagsAreCovered = Assert<\n Is<\n keyof BlockCodeKnownFeatureFlags,\n | ArrayTypeUnion<typeof AllRequiresFeatureFlags, typeof AllSupportsFeatureFlags>\n | keyof ServiceRequireFlags\n >\n>;\n"],"mappings":";;;;;;AA+BA,MAAa,2BAA2B;AAExC,MAAa,0BAA0B,CAAC,qBAAqB,4BAA4B;AAEzF,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;AACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ServiceRequireFlags } from "../services/service_types.js";
|
|
2
|
+
import "../services/index.js";
|
|
2
3
|
//#region src/flags/block_flags.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* Block-specific feature flags. Define flags that are interpreted by the desktop app to select
|
|
@@ -8,11 +9,11 @@ import { ServiceRequireFlags } from "../services/service_types.js";
|
|
|
8
9
|
* - supports... - those flags tells the desktop app that the block supports certain APIs, but can without them as well
|
|
9
10
|
* - requires... - those flags tells the desktop app that the block requires certain APIs, and if desktop app doesn't support it, it can't be used in the block
|
|
10
11
|
*/
|
|
11
|
-
type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> & Record<`requires${string}`, boolean | number | undefined>;
|
|
12
|
+
export type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> & Record<`requires${string}`, boolean | number | undefined>;
|
|
12
13
|
/**
|
|
13
|
-
* Known block flags. Flags are set during model compilation, see `
|
|
14
|
+
* Known block flags. Flags are set during model compilation, see `BlockModelV3` feature flags for more details and for initial values.
|
|
14
15
|
*/
|
|
15
|
-
type BlockCodeKnownFeatureFlags = {
|
|
16
|
+
export type BlockCodeKnownFeatureFlags = {
|
|
16
17
|
readonly supportsLazyState?: boolean;
|
|
17
18
|
readonly supportsPframeQueryRanking?: boolean;
|
|
18
19
|
readonly requiresModelAPIVersion?: number;
|
|
@@ -25,9 +26,8 @@ type BlockCodeKnownFeatureFlags = {
|
|
|
25
26
|
* version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on
|
|
26
27
|
* older desktop apps.
|
|
27
28
|
*/
|
|
28
|
-
declare const REQUIRES_PFRAMES_VERSION = 1001031;
|
|
29
|
-
declare const AllSupportsFeatureFlags: readonly ["supportsLazyState", "supportsPframeQueryRanking"];
|
|
30
|
-
declare const AllRequiresFeatureFlags: readonly ["requiresUIAPIVersion", "requiresCreatePTable", "requiresPFramesVersion", "requiresModelAPIVersion"];
|
|
29
|
+
export declare const REQUIRES_PFRAMES_VERSION = 1001031;
|
|
30
|
+
export declare const AllSupportsFeatureFlags: readonly ["supportsLazyState", "supportsPframeQueryRanking"];
|
|
31
|
+
export declare const AllRequiresFeatureFlags: readonly ["requiresUIAPIVersion", "requiresCreatePTable", "requiresPFramesVersion", "requiresModelAPIVersion"];
|
|
31
32
|
//#endregion
|
|
32
|
-
export { AllRequiresFeatureFlags, AllSupportsFeatureFlags, BlockCodeFeatureFlags, BlockCodeKnownFeatureFlags, REQUIRES_PFRAMES_VERSION };
|
|
33
33
|
//# sourceMappingURL=block_flags.d.ts.map
|