@milaboratories/pl-model-common 1.26.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.
Files changed (37) hide show
  1. package/dist/drivers/index.d.ts +2 -1
  2. package/dist/drivers/index.js +1 -1
  3. package/dist/drivers/pframe/index.d.ts +1 -1
  4. package/dist/drivers/pframe/index.js +1 -1
  5. package/dist/drivers/pframe/linker_columns.cjs +2 -5
  6. package/dist/drivers/pframe/linker_columns.cjs.map +1 -1
  7. package/dist/drivers/pframe/linker_columns.js +2 -5
  8. package/dist/drivers/pframe/linker_columns.js.map +1 -1
  9. package/dist/drivers/pframe/spec/anchored.cjs.map +1 -1
  10. package/dist/drivers/pframe/spec/anchored.js.map +1 -1
  11. package/dist/drivers/pframe/spec/index.d.ts +1 -1
  12. package/dist/drivers/pframe/spec/index.js +1 -1
  13. package/dist/drivers/pframe/spec/selectors.cjs +2 -2
  14. package/dist/drivers/pframe/spec/selectors.cjs.map +1 -1
  15. package/dist/drivers/pframe/spec/selectors.d.ts +12 -6
  16. package/dist/drivers/pframe/spec/selectors.js +2 -2
  17. package/dist/drivers/pframe/spec/selectors.js.map +1 -1
  18. package/dist/drivers/pspec.d.ts +127 -0
  19. package/dist/index.cjs +4 -1
  20. package/dist/index.d.ts +4 -2
  21. package/dist/index.js +3 -2
  22. package/dist/resource_types.cjs +53 -0
  23. package/dist/resource_types.cjs.map +1 -0
  24. package/dist/resource_types.d.ts +50 -0
  25. package/dist/resource_types.js +51 -0
  26. package/dist/resource_types.js.map +1 -0
  27. package/package.json +5 -4
  28. package/src/common_types.ts +0 -1
  29. package/src/drivers/index.ts +1 -0
  30. package/src/drivers/pframe/linker_columns.test.ts +22 -3
  31. package/src/drivers/pframe/linker_columns.ts +2 -2
  32. package/src/drivers/pframe/spec/anchored.ts +2 -2
  33. package/src/drivers/pframe/spec/selectors.ts +11 -5
  34. package/src/drivers/pframe/type_util.ts +0 -1
  35. package/src/drivers/pspec.ts +143 -0
  36. package/src/index.ts +1 -0
  37. package/src/resource_types.ts +47 -0
@@ -13,8 +13,14 @@ import { AxisId, AxisValueType, Domain, PColumnSpec, ValueType } from "./spec.js
13
13
  *
14
14
  * This interface is used in various selection and matching operations
15
15
  * throughout the PFrame system, such as column queries and axis lookups.
16
+ *
17
+ * @deprecated This selector is part of the legacy column matching API.
18
+ * The new Columns API (see sdk/model/src/columns/) now handles column and axis
19
+ * selection via {@link AxisSelector} and {@link ColumnSelector}, providing
20
+ * stricter matching semantics (StringMatcher-based) and a unified approach
21
+ * to working with columns, including domain and annotation matching.
16
22
  */
17
- interface AxisSelector {
23
+ interface LegacyAxisSelector {
18
24
  /**
19
25
  * Optional value type to match against.
20
26
  * When specified, only axes with this exact type will match.
@@ -95,7 +101,7 @@ type ADomain = string | AnchorDomainRef;
95
101
  * Axis identifier that can be either a direct AxisId or a reference to an axis through an anchor
96
102
  * Allows referring to axes in a way that can be resolved in different contexts
97
103
  */
98
- type AAxisSelector = AxisSelector | AnchorAxisRef;
104
+ type AAxisSelector = LegacyAxisSelector | AnchorAxisRef;
99
105
  /**
100
106
  * Match resolution strategy for PColumns
101
107
  * Specifies how to handle when multiple columns match the criteria
@@ -142,7 +148,7 @@ interface PColumnSelector extends AnchoredPColumnSelector {
142
148
  domain?: Record<string, string>;
143
149
  contextDomainAnchor?: never;
144
150
  contextDomain?: Record<string, string>;
145
- axes?: AxisSelector[];
151
+ axes?: LegacyAxisSelector[];
146
152
  }
147
153
  /**
148
154
  * Strict identifier for PColumns in an anchored context
@@ -179,7 +185,7 @@ declare function isAnchoredPColumnId(id: unknown): id is AnchoredPColumnId;
179
185
  * @param axis - The AxisId to check against the selector
180
186
  * @returns true if the AxisId matches all specified criteria in the selector, false otherwise
181
187
  */
182
- declare function matchAxis(selector: AxisSelector, axis: AxisId): boolean;
188
+ declare function matchAxis(selector: LegacyAxisSelector, axis: AxisId): boolean;
183
189
  /**
184
190
  * Determines if a given PColumnSpec matches a selector.
185
191
  *
@@ -194,7 +200,7 @@ declare function matchPColumn(pcolumn: PColumnSpec, selector: PColumnSelector):
194
200
  * or an array of PColumnSelectors, or a single PColumnSelector
195
201
  * @returns A function that takes a PColumnSpec and returns a boolean
196
202
  */
197
- declare function selectorsToPredicate(predicateOrSelectors: PColumnSelector | PColumnSelector[]): (spec: PObjectSpec) => boolean;
203
+ declare function legacyColumnSelectorsToPredicate(predicateOrSelectors: PColumnSelector | PColumnSelector[]): (spec: PObjectSpec) => boolean;
198
204
  //#endregion
199
- export { AAxisSelector, ADomain, AnchorAxisIdOrRefBasic, AnchorAxisRef, AnchorAxisRefByIdx, AnchorAxisRefByMatcher, AnchorAxisRefByName, AnchorDomainRef, AnchoredColumnMatchStrategy, AnchoredPColumnId, AnchoredPColumnSelector, AxisSelector, PColumnSelector, SingleAxisSelector, isAnchoredPColumnId, matchAxis, matchPColumn, selectorsToPredicate };
205
+ export { AAxisSelector, ADomain, AnchorAxisIdOrRefBasic, AnchorAxisRef, AnchorAxisRefByIdx, AnchorAxisRefByMatcher, AnchorAxisRefByName, AnchorDomainRef, AnchoredColumnMatchStrategy, AnchoredPColumnId, AnchoredPColumnSelector, LegacyAxisSelector, PColumnSelector, SingleAxisSelector, isAnchoredPColumnId, legacyColumnSelectorsToPredicate, matchAxis, matchPColumn };
200
206
  //# sourceMappingURL=selectors.d.ts.map
@@ -85,11 +85,11 @@ function matchPColumn(pcolumn, selector) {
85
85
  * or an array of PColumnSelectors, or a single PColumnSelector
86
86
  * @returns A function that takes a PColumnSpec and returns a boolean
87
87
  */
88
- function selectorsToPredicate(predicateOrSelectors) {
88
+ function legacyColumnSelectorsToPredicate(predicateOrSelectors) {
89
89
  if (Array.isArray(predicateOrSelectors)) return (spec) => predicateOrSelectors.some((selector) => isPColumnSpec(spec) && matchPColumn(spec, selector));
90
90
  else return (spec) => isPColumnSpec(spec) && matchPColumn(spec, predicateOrSelectors);
91
91
  }
92
92
 
93
93
  //#endregion
94
- export { isAnchoredPColumnId, matchAxis, matchPColumn, selectorsToPredicate };
94
+ export { isAnchoredPColumnId, legacyColumnSelectorsToPredicate, matchAxis, matchPColumn };
95
95
  //# sourceMappingURL=selectors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectors.js","names":[],"sources":["../../../../src/drivers/pframe/spec/selectors.ts"],"sourcesContent":["import { isPColumnSpec, type PObjectSpec } from \"../../../pool\";\nimport type { AxisId, AxisValueType, Domain, PColumnSpec, ValueType } from \"./spec\";\nimport { getAxisId } from \"./spec\";\n\n/**\n * Defines a pattern for matching axes within the PFrame data model.\n *\n * AxisSelector provides a flexible way to identify axes based on their\n * properties. All fields are optional, allowing for partial matching.\n * When multiple properties are specified, all must match for an axis\n * to be selected (logical AND).\n *\n * This interface is used in various selection and matching operations\n * throughout the PFrame system, such as column queries and axis lookups.\n */\nexport interface AxisSelector {\n /**\n * Optional value type to match against.\n * When specified, only axes with this exact type will match.\n * Can be a single type or an array of types to match against any of them.\n * Valid types include: 'Int', 'Long', 'Float', 'Double', 'String', 'Bytes'.\n */\n type?: ValueType | ValueType[];\n\n /**\n * Optional name to match against.\n * When specified, only axes with this exact name will match.\n */\n name?: string;\n\n /**\n * Optional domain key-value pairs to match against.\n * Domains provide additional context to uniquely identify an axis beyond its name and type.\n * When specified, an axis will match only if it contains all the key-value pairs defined here.\n * An axis with additional domain entries not present in this selector will still match.\n */\n domain?: Record<string, string>;\n\n /**\n * Optional context domain key-value pairs to match against.\n * Context domains are matched by kinship rules (subset/superset/overlap) rather than exact equality.\n * When specified, an axis will match only if it contains all the key-value pairs defined here.\n */\n contextDomain?: Record<string, string>;\n}\n\n/** Single axis selector */\nexport interface SingleAxisSelector {\n /** Axis name (required) */\n name: string;\n /** Axis type (optional) */\n type?: AxisValueType;\n /** Domain requirements (optional) */\n domain?: Domain;\n /** Parent axes requirements (optional) */\n parentAxes?: SingleAxisSelector[];\n}\n\n/**\n * Reference to an axis by its numerical index within the anchor column's axes array\n * Format: [anchorId, axisIndex]\n */\nexport type AnchorAxisRefByIdx = { anchor: string; idx: number };\n\n/**\n * Reference to an axis by its name within the anchor column\n * Format: [anchorId, axisName]\n */\nexport type AnchorAxisRefByName = { anchor: string; name: string };\n\n/**\n * Reference to an axis using an AxisId matcher within the anchor\n * Format: [anchorId, axisMatcher]\n */\nexport type AnchorAxisRefByMatcher = { anchor: string; id: AxisId };\n\n/**\n * Basic anchor axis reference that can be either by index or a direct AxisId\n */\nexport type AnchorAxisIdOrRefBasic = AnchorAxisRefByIdx | AxisId;\n\n/** Union of all possible ways to reference an axis in an anchored context */\nexport type AnchorAxisRef = AnchorAxisRefByIdx | AnchorAxisRefByName | AnchorAxisRefByMatcher;\n\n/** Reference to a domain value through an anchor */\nexport type AnchorDomainRef = { anchor: string };\n\n/**\n * Domain value that can be either a direct string value or a reference to a domain through an anchor\n * Used to establish domain context that can be resolved relative to other anchored columns\n */\nexport type ADomain = string | AnchorDomainRef;\n/**\n * Axis identifier that can be either a direct AxisId or a reference to an axis through an anchor\n * Allows referring to axes in a way that can be resolved in different contexts\n */\nexport type AAxisSelector = AxisSelector | AnchorAxisRef;\n\n/**\n * Match resolution strategy for PColumns\n * Specifies how to handle when multiple columns match the criteria\n * (default is \"expectSingle\")\n */\nexport type AnchoredColumnMatchStrategy = \"expectSingle\" | \"expectMultiple\" | \"takeFirst\";\n\n/**\n * Matcher for PColumns in an anchored context\n * Supports partial matching on axes, allowing for flexible column discovery\n */\nexport interface AnchoredPColumnSelector {\n /** Optional name of the column to match; can't be used together with namePattern */\n name?: string;\n /** Optional regexp pattern for column name matching; can't be used together with name */\n namePattern?: string;\n /** Optional value type to match. If an array is provided, matches if the column's type is any of the specified types */\n type?: ValueType | ValueType[];\n /** If specified, the domain values must be anchored to this anchor */\n domainAnchor?: string;\n /** Optional domain values to match, can include anchored references, if domainAnchor is specified,\n * interpreted as additional domains to domain from the anchor */\n domain?: Record<string, ADomain>;\n /** If specified, the context domain values must be anchored to this anchor */\n contextDomainAnchor?: string;\n /** Optional context domain values to match, can include anchored references, if contextDomainAnchor is specified,\n * interpreted as additional context domains to context domain from the anchor */\n contextDomain?: Record<string, ADomain>;\n /** Optional axes to match, can include anchored references */\n axes?: AAxisSelector[];\n /** When true, allows matching if only a subset of axes match */\n partialAxesMatch?: boolean;\n /** Optional annotations to match with exact values */\n annotations?: Record<string, string>;\n /** Optional annotation patterns to match with regex patterns */\n annotationPatterns?: Record<string, string>;\n /** Match resolution strategy, default is \"expectSingle\" */\n matchStrategy?: AnchoredColumnMatchStrategy;\n}\n\n/**\n * Matcher for PColumns in a non-anchored context\n */\nexport interface PColumnSelector extends AnchoredPColumnSelector {\n domainAnchor?: never;\n domain?: Record<string, string>;\n contextDomainAnchor?: never;\n contextDomain?: Record<string, string>;\n axes?: AxisSelector[];\n}\n\n/**\n * Strict identifier for PColumns in an anchored context\n * Unlike APColumnMatcher, this requires exact matches on domain and axes\n */\nexport interface AnchoredPColumnId extends AnchoredPColumnSelector {\n /** Name is required for exact column identification */\n name: string;\n /** No namePattern in ID */\n namePattern?: never;\n /** Type is not used in exact column identification */\n type?: never;\n /** Full axes specification using only basic references */\n axes: AnchorAxisIdOrRefBasic[];\n /** Partial axes matching is not allowed for exact identification */\n partialAxesMatch?: never;\n /** Annotations are not used in exact column identification */\n annotations?: never;\n /** Annotation patterns are not used in exact column identification */\n annotationPatterns?: never;\n /** \"Id\" implies single match strategy */\n matchStrategy?: never;\n}\n\n/**\n * Checks if a given value is an anchored column identifier\n * @param id - The value to check\n * @returns True if the value is an anchored column identifier, false otherwise\n */\nexport function isAnchoredPColumnId(id: unknown): id is AnchoredPColumnId {\n // basic check, can be extended if needed\n return typeof id === \"object\" && id !== null && \"name\" in id && \"axes\" in id;\n}\n\n/**\n * Determines if an axis ID matches an axis selector.\n *\n * @param selector - The selector with criteria to match against\n * @param axis - The AxisId to check against the selector\n * @returns true if the AxisId matches all specified criteria in the selector, false otherwise\n */\nexport function matchAxis(selector: AxisSelector, axis: AxisId): boolean {\n // Match name if specified\n if (selector.name !== undefined && selector.name !== axis.name) return false;\n\n // Match type if specified\n if (selector.type !== undefined) {\n if (Array.isArray(selector.type)) {\n if (!selector.type.includes(axis.type)) return false;\n } else if (selector.type !== axis.type) {\n return false;\n }\n }\n\n // Match domain if specified - using existing logic from matchAxisId\n if (selector.domain !== undefined) {\n const axisDomain = axis.domain || {};\n for (const [key, value] of Object.entries(selector.domain))\n if (axisDomain[key] !== value) return false;\n }\n\n // Match contextDomain if specified\n if (selector.contextDomain !== undefined) {\n const axisContextDomain = axis.contextDomain || {};\n for (const [key, value] of Object.entries(selector.contextDomain))\n if (axisContextDomain[key] !== value) return false;\n }\n\n return true;\n}\n\n/**\n * Determines if a given PColumnSpec matches a selector.\n *\n * @param pcolumn - The PColumnSpec to check against the selector\n * @param selector - The selector criteria to match against\n * @returns true if the PColumnSpec matches all criteria in the selector, false otherwise\n */\nexport function matchPColumn(pcolumn: PColumnSpec, selector: PColumnSelector): boolean {\n // Match name if specified\n if (selector.name !== undefined && pcolumn.name !== selector.name) return false;\n\n // Match name pattern if specified\n if (selector.namePattern !== undefined && !new RegExp(selector.namePattern).test(pcolumn.name))\n return false;\n\n // Match type if specified\n if (selector.type !== undefined) {\n if (Array.isArray(selector.type)) {\n if (!selector.type.includes(pcolumn.valueType)) return false;\n } else if (selector.type !== pcolumn.valueType) {\n return false;\n }\n }\n\n // Match domain if specified\n if (selector.domain !== undefined) {\n const columnDomain = pcolumn.domain || {};\n for (const [key, value] of Object.entries(selector.domain))\n if (columnDomain[key] !== value) return false;\n }\n\n // Match contextDomain if specified\n if (selector.contextDomain !== undefined) {\n const columnContextDomain = pcolumn.contextDomain || {};\n for (const [key, value] of Object.entries(selector.contextDomain))\n if (columnContextDomain[key] !== value) return false;\n }\n\n // Match axes if specified\n if (selector.axes !== undefined) {\n const pcolumnAxes = pcolumn.axesSpec.map(getAxisId);\n\n if (selector.partialAxesMatch) {\n // For partial matching, all selector axes must match at least one column axis\n for (const selectorAxis of selector.axes)\n if (!pcolumnAxes.some((columnAxis) => matchAxis(selectorAxis, columnAxis))) return false;\n } else {\n // For exact matching, column must have the same number of axes and all must match\n if (pcolumnAxes.length !== selector.axes.length) return false;\n\n // Each selector axis must match a corresponding column axis\n for (let i = 0; i < selector.axes.length; i++)\n if (!matchAxis(selector.axes[i], pcolumnAxes[i])) return false;\n }\n }\n\n // Match annotations if specified\n if (selector.annotations !== undefined) {\n const columnAnnotations = pcolumn.annotations || {};\n for (const [key, value] of Object.entries(selector.annotations))\n if (columnAnnotations[key] !== value) return false;\n }\n\n // Match annotation patterns if specified\n if (selector.annotationPatterns !== undefined) {\n const columnAnnotations = pcolumn.annotations || {};\n for (const [key, pattern] of Object.entries(selector.annotationPatterns)) {\n const value = columnAnnotations[key];\n if (value === undefined || !new RegExp(pattern).test(value)) return false;\n }\n }\n\n return true;\n}\n\n/**\n * Convert a predicate or array of selectors to a single predicate function\n * @param predicateOrSelectors - Either a function that takes a PColumnSpec and returns a boolean,\n * or an array of PColumnSelectors, or a single PColumnSelector\n * @returns A function that takes a PColumnSpec and returns a boolean\n */\nexport function selectorsToPredicate(\n predicateOrSelectors: PColumnSelector | PColumnSelector[],\n): (spec: PObjectSpec) => boolean {\n if (Array.isArray(predicateOrSelectors))\n return (spec) =>\n predicateOrSelectors.some((selector) => isPColumnSpec(spec) && matchPColumn(spec, selector));\n else return (spec) => isPColumnSpec(spec) && matchPColumn(spec, predicateOrSelectors);\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"selectors.js","names":[],"sources":["../../../../src/drivers/pframe/spec/selectors.ts"],"sourcesContent":["import { isPColumnSpec, type PObjectSpec } from \"../../../pool\";\nimport type { AxisId, AxisValueType, Domain, PColumnSpec, ValueType } from \"./spec\";\nimport { getAxisId } from \"./spec\";\n\n/**\n * Defines a pattern for matching axes within the PFrame data model.\n *\n * AxisSelector provides a flexible way to identify axes based on their\n * properties. All fields are optional, allowing for partial matching.\n * When multiple properties are specified, all must match for an axis\n * to be selected (logical AND).\n *\n * This interface is used in various selection and matching operations\n * throughout the PFrame system, such as column queries and axis lookups.\n *\n * @deprecated This selector is part of the legacy column matching API.\n * The new Columns API (see sdk/model/src/columns/) now handles column and axis\n * selection via {@link AxisSelector} and {@link ColumnSelector}, providing\n * stricter matching semantics (StringMatcher-based) and a unified approach\n * to working with columns, including domain and annotation matching.\n */\nexport interface LegacyAxisSelector {\n /**\n * Optional value type to match against.\n * When specified, only axes with this exact type will match.\n * Can be a single type or an array of types to match against any of them.\n * Valid types include: 'Int', 'Long', 'Float', 'Double', 'String', 'Bytes'.\n */\n type?: ValueType | ValueType[];\n\n /**\n * Optional name to match against.\n * When specified, only axes with this exact name will match.\n */\n name?: string;\n\n /**\n * Optional domain key-value pairs to match against.\n * Domains provide additional context to uniquely identify an axis beyond its name and type.\n * When specified, an axis will match only if it contains all the key-value pairs defined here.\n * An axis with additional domain entries not present in this selector will still match.\n */\n domain?: Record<string, string>;\n\n /**\n * Optional context domain key-value pairs to match against.\n * Context domains are matched by kinship rules (subset/superset/overlap) rather than exact equality.\n * When specified, an axis will match only if it contains all the key-value pairs defined here.\n */\n contextDomain?: Record<string, string>;\n}\n\n/** Single axis selector */\nexport interface SingleAxisSelector {\n /** Axis name (required) */\n name: string;\n /** Axis type (optional) */\n type?: AxisValueType;\n /** Domain requirements (optional) */\n domain?: Domain;\n /** Parent axes requirements (optional) */\n parentAxes?: SingleAxisSelector[];\n}\n\n/**\n * Reference to an axis by its numerical index within the anchor column's axes array\n * Format: [anchorId, axisIndex]\n */\nexport type AnchorAxisRefByIdx = { anchor: string; idx: number };\n\n/**\n * Reference to an axis by its name within the anchor column\n * Format: [anchorId, axisName]\n */\nexport type AnchorAxisRefByName = { anchor: string; name: string };\n\n/**\n * Reference to an axis using an AxisId matcher within the anchor\n * Format: [anchorId, axisMatcher]\n */\nexport type AnchorAxisRefByMatcher = { anchor: string; id: AxisId };\n\n/**\n * Basic anchor axis reference that can be either by index or a direct AxisId\n */\nexport type AnchorAxisIdOrRefBasic = AnchorAxisRefByIdx | AxisId;\n\n/** Union of all possible ways to reference an axis in an anchored context */\nexport type AnchorAxisRef = AnchorAxisRefByIdx | AnchorAxisRefByName | AnchorAxisRefByMatcher;\n\n/** Reference to a domain value through an anchor */\nexport type AnchorDomainRef = { anchor: string };\n\n/**\n * Domain value that can be either a direct string value or a reference to a domain through an anchor\n * Used to establish domain context that can be resolved relative to other anchored columns\n */\nexport type ADomain = string | AnchorDomainRef;\n/**\n * Axis identifier that can be either a direct AxisId or a reference to an axis through an anchor\n * Allows referring to axes in a way that can be resolved in different contexts\n */\nexport type AAxisSelector = LegacyAxisSelector | AnchorAxisRef;\n\n/**\n * Match resolution strategy for PColumns\n * Specifies how to handle when multiple columns match the criteria\n * (default is \"expectSingle\")\n */\nexport type AnchoredColumnMatchStrategy = \"expectSingle\" | \"expectMultiple\" | \"takeFirst\";\n\n/**\n * Matcher for PColumns in an anchored context\n * Supports partial matching on axes, allowing for flexible column discovery\n */\nexport interface AnchoredPColumnSelector {\n /** Optional name of the column to match; can't be used together with namePattern */\n name?: string;\n /** Optional regexp pattern for column name matching; can't be used together with name */\n namePattern?: string;\n /** Optional value type to match. If an array is provided, matches if the column's type is any of the specified types */\n type?: ValueType | ValueType[];\n /** If specified, the domain values must be anchored to this anchor */\n domainAnchor?: string;\n /** Optional domain values to match, can include anchored references, if domainAnchor is specified,\n * interpreted as additional domains to domain from the anchor */\n domain?: Record<string, ADomain>;\n /** If specified, the context domain values must be anchored to this anchor */\n contextDomainAnchor?: string;\n /** Optional context domain values to match, can include anchored references, if contextDomainAnchor is specified,\n * interpreted as additional context domains to context domain from the anchor */\n contextDomain?: Record<string, ADomain>;\n /** Optional axes to match, can include anchored references */\n axes?: AAxisSelector[];\n /** When true, allows matching if only a subset of axes match */\n partialAxesMatch?: boolean;\n /** Optional annotations to match with exact values */\n annotations?: Record<string, string>;\n /** Optional annotation patterns to match with regex patterns */\n annotationPatterns?: Record<string, string>;\n /** Match resolution strategy, default is \"expectSingle\" */\n matchStrategy?: AnchoredColumnMatchStrategy;\n}\n\n/**\n * Matcher for PColumns in a non-anchored context\n */\nexport interface PColumnSelector extends AnchoredPColumnSelector {\n domainAnchor?: never;\n domain?: Record<string, string>;\n contextDomainAnchor?: never;\n contextDomain?: Record<string, string>;\n axes?: LegacyAxisSelector[];\n}\n\n/**\n * Strict identifier for PColumns in an anchored context\n * Unlike APColumnMatcher, this requires exact matches on domain and axes\n */\nexport interface AnchoredPColumnId extends AnchoredPColumnSelector {\n /** Name is required for exact column identification */\n name: string;\n /** No namePattern in ID */\n namePattern?: never;\n /** Type is not used in exact column identification */\n type?: never;\n /** Full axes specification using only basic references */\n axes: AnchorAxisIdOrRefBasic[];\n /** Partial axes matching is not allowed for exact identification */\n partialAxesMatch?: never;\n /** Annotations are not used in exact column identification */\n annotations?: never;\n /** Annotation patterns are not used in exact column identification */\n annotationPatterns?: never;\n /** \"Id\" implies single match strategy */\n matchStrategy?: never;\n}\n\n/**\n * Checks if a given value is an anchored column identifier\n * @param id - The value to check\n * @returns True if the value is an anchored column identifier, false otherwise\n */\nexport function isAnchoredPColumnId(id: unknown): id is AnchoredPColumnId {\n // basic check, can be extended if needed\n return typeof id === \"object\" && id !== null && \"name\" in id && \"axes\" in id;\n}\n\n/**\n * Determines if an axis ID matches an axis selector.\n *\n * @param selector - The selector with criteria to match against\n * @param axis - The AxisId to check against the selector\n * @returns true if the AxisId matches all specified criteria in the selector, false otherwise\n */\nexport function matchAxis(selector: LegacyAxisSelector, axis: AxisId): boolean {\n // Match name if specified\n if (selector.name !== undefined && selector.name !== axis.name) return false;\n\n // Match type if specified\n if (selector.type !== undefined) {\n if (Array.isArray(selector.type)) {\n if (!selector.type.includes(axis.type)) return false;\n } else if (selector.type !== axis.type) {\n return false;\n }\n }\n\n // Match domain if specified - using existing logic from matchAxisId\n if (selector.domain !== undefined) {\n const axisDomain = axis.domain || {};\n for (const [key, value] of Object.entries(selector.domain))\n if (axisDomain[key] !== value) return false;\n }\n\n // Match contextDomain if specified\n if (selector.contextDomain !== undefined) {\n const axisContextDomain = axis.contextDomain || {};\n for (const [key, value] of Object.entries(selector.contextDomain))\n if (axisContextDomain[key] !== value) return false;\n }\n\n return true;\n}\n\n/**\n * Determines if a given PColumnSpec matches a selector.\n *\n * @param pcolumn - The PColumnSpec to check against the selector\n * @param selector - The selector criteria to match against\n * @returns true if the PColumnSpec matches all criteria in the selector, false otherwise\n */\nexport function matchPColumn(pcolumn: PColumnSpec, selector: PColumnSelector): boolean {\n // Match name if specified\n if (selector.name !== undefined && pcolumn.name !== selector.name) return false;\n\n // Match name pattern if specified\n if (selector.namePattern !== undefined && !new RegExp(selector.namePattern).test(pcolumn.name))\n return false;\n\n // Match type if specified\n if (selector.type !== undefined) {\n if (Array.isArray(selector.type)) {\n if (!selector.type.includes(pcolumn.valueType)) return false;\n } else if (selector.type !== pcolumn.valueType) {\n return false;\n }\n }\n\n // Match domain if specified\n if (selector.domain !== undefined) {\n const columnDomain = pcolumn.domain || {};\n for (const [key, value] of Object.entries(selector.domain))\n if (columnDomain[key] !== value) return false;\n }\n\n // Match contextDomain if specified\n if (selector.contextDomain !== undefined) {\n const columnContextDomain = pcolumn.contextDomain || {};\n for (const [key, value] of Object.entries(selector.contextDomain))\n if (columnContextDomain[key] !== value) return false;\n }\n\n // Match axes if specified\n if (selector.axes !== undefined) {\n const pcolumnAxes = pcolumn.axesSpec.map(getAxisId);\n\n if (selector.partialAxesMatch) {\n // For partial matching, all selector axes must match at least one column axis\n for (const selectorAxis of selector.axes)\n if (!pcolumnAxes.some((columnAxis) => matchAxis(selectorAxis, columnAxis))) return false;\n } else {\n // For exact matching, column must have the same number of axes and all must match\n if (pcolumnAxes.length !== selector.axes.length) return false;\n\n // Each selector axis must match a corresponding column axis\n for (let i = 0; i < selector.axes.length; i++)\n if (!matchAxis(selector.axes[i], pcolumnAxes[i])) return false;\n }\n }\n\n // Match annotations if specified\n if (selector.annotations !== undefined) {\n const columnAnnotations = pcolumn.annotations || {};\n for (const [key, value] of Object.entries(selector.annotations))\n if (columnAnnotations[key] !== value) return false;\n }\n\n // Match annotation patterns if specified\n if (selector.annotationPatterns !== undefined) {\n const columnAnnotations = pcolumn.annotations || {};\n for (const [key, pattern] of Object.entries(selector.annotationPatterns)) {\n const value = columnAnnotations[key];\n if (value === undefined || !new RegExp(pattern).test(value)) return false;\n }\n }\n\n return true;\n}\n\n/**\n * Convert a predicate or array of selectors to a single predicate function\n * @param predicateOrSelectors - Either a function that takes a PColumnSpec and returns a boolean,\n * or an array of PColumnSelectors, or a single PColumnSelector\n * @returns A function that takes a PColumnSpec and returns a boolean\n */\nexport function legacyColumnSelectorsToPredicate(\n predicateOrSelectors: PColumnSelector | PColumnSelector[],\n): (spec: PObjectSpec) => boolean {\n if (Array.isArray(predicateOrSelectors))\n return (spec) =>\n predicateOrSelectors.some((selector) => isPColumnSpec(spec) && matchPColumn(spec, selector));\n else return (spec) => isPColumnSpec(spec) && matchPColumn(spec, predicateOrSelectors);\n}\n"],"mappings":"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"}
@@ -0,0 +1,127 @@
1
+ import { AxisSpec, PColumnIdAndSpec, PColumnSpec, ValueType } from "./pframe/spec/spec.js";
2
+ import { SingleAxisSelector } from "./pframe/spec/selectors.js";
3
+ import "./pframe/index.js";
4
+ import { Branded } from "@milaboratories/helpers";
5
+
6
+ //#region src/drivers/pspec.d.ts
7
+ /** Matches a string value either exactly or by regex pattern */
8
+ type StringMatcher = {
9
+ type: "exact";
10
+ value: string;
11
+ } | {
12
+ type: "regex";
13
+ value: string;
14
+ };
15
+ /** Map of key to array of string matchers (OR-ed per key, AND-ed across keys) */
16
+ type MatcherMap = Record<string, StringMatcher[]>;
17
+ /** Selector for matching axes by various criteria */
18
+ interface MultiAxisSelector {
19
+ /** Match any of the axis types listed here */
20
+ readonly type?: ValueType[];
21
+ /** Match any of the axis names listed here */
22
+ readonly name?: StringMatcher[];
23
+ /** Match requires all the domains listed here */
24
+ readonly domain?: MatcherMap;
25
+ /** Match requires all the context domains listed here */
26
+ readonly contextDomain?: MatcherMap;
27
+ /** Match requires all the annotations listed here */
28
+ readonly annotations?: MatcherMap;
29
+ }
30
+ /** Column selector for discover columns request, matching columns by various criteria.
31
+ * Multiple selectors are OR-ed: a column matches if it satisfies any selector. */
32
+ interface MultiColumnSelector {
33
+ /** Match any of the value types listed here */
34
+ readonly type?: ValueType[];
35
+ /** Match any of the names listed here */
36
+ readonly name?: StringMatcher[];
37
+ /** Match requires all the domains listed here */
38
+ readonly domain?: MatcherMap;
39
+ /** Match requires all the context domains listed here */
40
+ readonly contextDomain?: MatcherMap;
41
+ /** Match requires all the annotations listed here */
42
+ readonly annotations?: MatcherMap;
43
+ /** Match any of the axis selectors listed here */
44
+ readonly axes?: MultiAxisSelector[];
45
+ /** When true (default), allows matching if only a subset of axes match */
46
+ readonly partialAxesMatch?: boolean;
47
+ }
48
+ /** Qualification applied to a single axis to make it compatible during integration. */
49
+ interface AxisQualification {
50
+ /** Axis selector identifying which axis is qualified. */
51
+ readonly axis: SingleAxisSelector;
52
+ /** Additional context domain entries applied to the axis. */
53
+ readonly contextDomain: Record<string, string>;
54
+ }
55
+ /** Qualifications needed for both query (already-integrated) columns and the hit column. */
56
+ interface ColumnAxesWithQualifications {
57
+ /** Already integrated (query) columns with their qualifications. */
58
+ axesSpec: AxisSpec[];
59
+ /** Qualifications for each already integrated (query) column. */
60
+ qualifications: AxisQualification[];
61
+ }
62
+ /** Fine-grained constraints controlling axes matching and qualification behavior */
63
+ interface DiscoverColumnsConstraints {
64
+ /** Allow source (query) axes that have no match in the hit column */
65
+ allowFloatingSourceAxes: boolean;
66
+ /** Allow hit column axes that have no match in the source (query) */
67
+ allowFloatingHitAxes: boolean;
68
+ /** Allow source (query) axes to be qualified (contextDomain extended) */
69
+ allowSourceQualifications: boolean;
70
+ /** Allow hit column axes to be qualified (contextDomain extended) */
71
+ allowHitQualifications: boolean;
72
+ }
73
+ /** Request for discovering columns compatible with a given axes integration */
74
+ interface DiscoverColumnsRequest {
75
+ /** Column filters (OR-ed); empty array matches all columns */
76
+ columnFilter?: MultiColumnSelector[];
77
+ /** Already integrated axes with qualifications */
78
+ axes: ColumnAxesWithQualifications[];
79
+ /** Constraints controlling axes matching and qualification behavior */
80
+ constraints: DiscoverColumnsConstraints;
81
+ }
82
+ /** Qualifications info for a discover columns response mapping variant */
83
+ interface DiscoverColumnsResponseQualifications {
84
+ /** Qualifications for each query (already-integrated) column set */
85
+ forQueries: AxisQualification[][];
86
+ /** Qualifications for the hit column */
87
+ forHit: AxisQualification[];
88
+ }
89
+ /** A single mapping variant describing how a hit column can be integrated */
90
+ interface DiscoverColumnsMappingVariant {
91
+ /** Full qualifications needed for integration */
92
+ qualifications: DiscoverColumnsResponseQualifications;
93
+ /** Distinctive (minimal) qualifications needed for integration */
94
+ distinctiveQualifications: DiscoverColumnsResponseQualifications;
95
+ }
96
+ /** A single hit in the discover columns response */
97
+ interface DiscoverColumnsResponseHit {
98
+ /** The column that was found compatible */
99
+ hit: PColumnIdAndSpec;
100
+ /** Possible ways to integrate this column with the existing set */
101
+ mappingVariants: DiscoverColumnsMappingVariant[];
102
+ }
103
+ /** Response from discover columns */
104
+ interface DiscoverColumnsResponse {
105
+ /** Columns that could be integrated and possible ways to integrate them */
106
+ hits: DiscoverColumnsResponseHit[];
107
+ }
108
+ /** Handle to a spec-only PFrame (no data, synchronous operations). */
109
+ type SpecFrameHandle = Branded<string, "SpecFrameHandle">;
110
+ /**
111
+ * Synchronous driver for spec-level PFrame operations.
112
+ *
113
+ * Unlike the async PFrameDriver (which works with data), this driver
114
+ * operates on column specifications only. All methods are synchronous
115
+ * because the underlying WASM PFrame computes results immediately.
116
+ */
117
+ interface PSpecDriver {
118
+ /** Create a spec-only PFrame from column specs. Returns a handle. */
119
+ createSpecFrame(specs: Record<string, PColumnSpec>): SpecFrameHandle;
120
+ /** Discover columns compatible with given axes integration. */
121
+ specFrameDiscoverColumns(handle: SpecFrameHandle, request: DiscoverColumnsRequest): DiscoverColumnsResponse;
122
+ /** Dispose a spec frame, freeing WASM resources. */
123
+ disposeSpecFrame(handle: SpecFrameHandle): void;
124
+ }
125
+ //#endregion
126
+ export { AxisQualification, ColumnAxesWithQualifications, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, MatcherMap, MultiAxisSelector, MultiColumnSelector, PSpecDriver, SpecFrameHandle, StringMatcher };
127
+ //# sourceMappingURL=pspec.d.ts.map
package/dist/index.cjs CHANGED
@@ -34,6 +34,7 @@ const require_ref = require('./ref.cjs');
34
34
  const require_value_or_error = require('./value_or_error.cjs');
35
35
  const require_base64 = require('./base64.cjs');
36
36
  const require_httpAuth = require('./httpAuth.cjs');
37
+ const require_resource_types = require('./resource_types.cjs');
37
38
 
38
39
  exports.AbortError = require_errors.AbortError;
39
40
  exports.AllRequiresFeatureFlags = require_block_flags.AllRequiresFeatureFlags;
@@ -59,6 +60,8 @@ exports.PlIdBytes = require_plid.PlIdBytes;
59
60
  exports.PlIdLength = require_plid.PlIdLength;
60
61
  exports.PlRef = require_ref.PlRef;
61
62
  exports.RangeBytes = require_blob.RangeBytes;
63
+ exports.ResourceTypeName = require_resource_types.ResourceTypeName;
64
+ exports.ResourceTypePrefix = require_resource_types.ResourceTypePrefix;
62
65
  exports.RuntimeCapabilities = require_flag_utils.RuntimeCapabilities;
63
66
  exports.UiError = require_errors.UiError;
64
67
  exports.ValueType = require_spec.ValueType;
@@ -126,6 +129,7 @@ exports.isPTableNA = require_data_types.isPTableNA;
126
129
  exports.isPTableValueAxis = require_data_types.isPTableValueAxis;
127
130
  exports.isPartitionedDataInfoEntries = require_data_info.isPartitionedDataInfoEntries;
128
131
  exports.isPlRef = require_ref.isPlRef;
132
+ exports.legacyColumnSelectorsToPredicate = require_selectors.legacyColumnSelectorsToPredicate;
129
133
  exports.mapDataInfo = require_data_info.mapDataInfo;
130
134
  exports.mapDataInfoEntries = require_data_info.mapDataInfoEntries;
131
135
  exports.mapJoinEntry = require_table_calculate.mapJoinEntry;
@@ -155,7 +159,6 @@ exports.readMetadata = require_spec.readMetadata;
155
159
  exports.readMetadataJson = require_spec.readMetadataJson;
156
160
  exports.readMetadataJsonOrThrow = require_spec.readMetadataJsonOrThrow;
157
161
  exports.resolveAnchors = require_anchored.resolveAnchors;
158
- exports.selectorsToPredicate = require_selectors.selectorsToPredicate;
159
162
  exports.serializeError = require_errors.serializeError;
160
163
  exports.serializeHttpAuth = require_httpAuth.serializeHttpAuth;
161
164
  exports.serializeResult = require_errors.serializeResult;
package/dist/index.d.ts CHANGED
@@ -26,7 +26,7 @@ import "./pool/index.js";
26
26
  import { Annotation, AnnotationJson, AxesId, AxesSpec, AxisId, AxisSpec, AxisSpecNormalized, AxisTree, AxisValueType, ColumnValueType, Domain, DomainJson, Metadata, MetadataJson, PAxisName, PColumn, PColumnIdAndSpec, PColumnInfo, PColumnLazy, PColumnName, PColumnSpec, PColumnSpecId, PDataColumnSpec, PUniversalColumnSpec, ValueType, canonicalizeAxisId, canonicalizeAxisWithParents, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getNormalizedAxesList, getPColumnSpecId, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, isAxisId, isLabelColumn, isLinkerColumn, matchAxisId, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow } from "./drivers/pframe/spec/spec.js";
27
27
  import { ColumnFilter } from "./drivers/pframe/column_filter.js";
28
28
  import { BinaryChunk, BinaryPartitionedDataInfo, BinaryPartitionedDataInfoEntries, DataInfo, DataInfoEntries, JsonDataInfo, JsonDataInfoEntries, JsonPartitionedDataInfo, JsonPartitionedDataInfoEntries, PColumnDataEntry, PColumnKey, PColumnValue, PColumnValues, PColumnValuesEntry, ParquetChunk, ParquetChunkMapping, ParquetChunkMappingAxis, ParquetChunkMappingColumn, ParquetChunkMetadata, ParquetChunkStats, ParquetPartitionedDataInfo, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries, dataInfoToEntries, entriesToDataInfo, isDataInfo, isDataInfoEntries, isPartitionedDataInfoEntries, mapDataInfo, mapDataInfoEntries, visitDataInfo } from "./drivers/pframe/data_info.js";
29
- import { AAxisSelector, ADomain, AnchorAxisIdOrRefBasic, AnchorAxisRef, AnchorAxisRefByIdx, AnchorAxisRefByMatcher, AnchorAxisRefByName, AnchorDomainRef, AnchoredColumnMatchStrategy, AnchoredPColumnId, AnchoredPColumnSelector, AxisSelector, PColumnSelector, SingleAxisSelector, isAnchoredPColumnId, matchAxis, matchPColumn, selectorsToPredicate } from "./drivers/pframe/spec/selectors.js";
29
+ import { AAxisSelector, ADomain, AnchorAxisIdOrRefBasic, AnchorAxisRef, AnchorAxisRefByIdx, AnchorAxisRefByMatcher, AnchorAxisRefByName, AnchorDomainRef, AnchoredColumnMatchStrategy, AnchoredPColumnId, AnchoredPColumnSelector, LegacyAxisSelector, PColumnSelector, SingleAxisSelector, isAnchoredPColumnId, legacyColumnSelectorsToPredicate, matchAxis, matchPColumn } from "./drivers/pframe/spec/selectors.js";
30
30
  import { AxisFilter, AxisFilterByIdx, AxisFilterByName, AxisFilterValue, FilteredPColumn, FilteredPColumnId, isFilteredPColumn } from "./drivers/pframe/spec/filtered_column.js";
31
31
  import { SUniversalPColumnId, UniversalPColumnId, parseColumnId, stringifyColumnId } from "./drivers/pframe/spec/ids.js";
32
32
  import { FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, InferFilterSpecCommonLeaf, InferFilterSpecCommonNode, InferFilterSpecLeaf, InferFilterSpecLeafColumn, RootFilterSpec } from "./drivers/pframe/filter_spec.js";
@@ -45,6 +45,7 @@ import { collectSpecQueryColumns, isBooleanExpression, mapSpecQueryColumns, sort
45
45
  import { PFrameDriver, PFrameHandle, PTableHandle } from "./drivers/pframe/driver.js";
46
46
  import { CompositeLinkerMap, LinkerMap } from "./drivers/pframe/linker_columns.js";
47
47
  import { FileRange, ImportFileHandle, ImportFileHandleIndex, ImportFileHandleUpload, ListFilesResult, LocalImportFileHandle, LsDriver, LsEntry, OpenDialogFilter, OpenDialogOps, OpenMultipleFilesResponse, OpenSingleFileResponse, StorageEntry, StorageHandle, StorageHandleLocal, StorageHandleRemote, getFileNameFromHandle, getFilePathFromHandle, isImportFileHandleIndex, isImportFileHandleUpload } from "./drivers/ls.js";
48
+ import { AxisQualification, ColumnAxesWithQualifications, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, MatcherMap, MultiAxisSelector, MultiColumnSelector, PSpecDriver, SpecFrameHandle, StringMatcher } from "./drivers/pspec.js";
48
49
  import { ChunkedStreamReader, ChunkedStreamReaderOptions, ErrorHandlerStatus } from "./drivers/ChunkedStreamReader.js";
49
50
  import "./drivers/index.js";
50
51
  import { DriverKit } from "./driver_kit.js";
@@ -55,4 +56,5 @@ import { ValueOrError, mapValueInVOE } from "./value_or_error.js";
55
56
  import { Base64Compatible, Base64Encoded, base64Decode, base64Encode } from "./base64.js";
56
57
  import { assertNever, uniqueBy } from "./util.js";
57
58
  import { BasicHttpAuth, HttpAuth, parseHttpAuth, serializeHttpAuth } from "./httpAuth.js";
58
- export { AAxisSelector, ADomain, AbortError, AllRequiresFeatureFlags, AllSupportsFeatureFlags, AnchorAxisIdOrRefBasic, AnchorAxisRef, AnchorAxisRefByIdx, AnchorAxisRefByMatcher, AnchorAxisRefByName, AnchorDomainRef, AnchoredColumnMatchStrategy, AnchoredIdDeriver, AnchoredPColumnId, AnchoredPColumnSelector, Annotation, AnnotationJson, AnyFunction, AnyLogHandle, ArchiveFormat, ArrayTypeUnion, ArtificialColumnJoinEntry, Assert, AssertKeysEqual, AuthorMarker, AxesId, AxesSpec, AxisFilter, AxisFilterByIdx, AxisFilterByName, AxisFilterValue, AxisId, AxisSelector, AxisSpec, AxisSpecNormalized, AxisTree, AxisValueType, Base64Compatible, Base64Encoded, BasicHttpAuth, BinaryChunk, BinaryPartitionedDataInfo, BinaryPartitionedDataInfoEntries, BlobDriver, BlobHandleAndSize, BlobLike, BlobToURLDriver, BlockCodeFeatureFlags, BlockCodeKnownFeatureFlags, BlockCodeWithInfo, BlockConfigContainer, BlockConfigGeneric, BlockConfigV3Generic, BlockConfigV4Generic, BlockOutputsBase, BlockRenderingMode, BlockSection, BlockSectionDelimiter, BlockSectionLink, BlockSectionLinkAppearance, BlockState, BlockStateV3, BlockUIURL, Branded, CalculateTableDataRequest, CalculateTableDataResponse, CanonicalizedJson, ChunkedStreamReader, ChunkedStreamReaderOptions, Code, ColumnFilter, ColumnJoinEntry, ColumnValueType, CompositeLinkerMap, ConstantAxisFilter, ContentHandler, DataExprAxisRef, DataExprColumnRef, DataInfo, DataInfoEntries, DataQuery, DataQueryBooleanExpression, DataQueryColumn, DataQueryExpression, DataQueryFilter, DataQueryInlineColumn, DataQueryJoinEntry, DataQueryOuterJoin, DataQuerySliceAxes, DataQuerySort, DataQuerySparseToDenseColumn, DataQuerySymmetricJoin, DefaultNavigationState, Domain, DomainJson, DriverKit, ErrorHandlerStatus, FileLike, FileRange, FilterKeysByPrefix, FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, FilteredPColumn, FilteredPColumnId, FindColumnsRequest, FindColumnsResponse, FolderURL, FrontendDriver, FullJoin, FullPTableColumnData, GetContentOptions, HttpAuth, ImportFileHandle, ImportFileHandleIndex, ImportFileHandleUpload, ImportProgress, ImportStatus, IncompatibleFlagsError, InferFilterSpecCommonLeaf, InferFilterSpecCommonNode, InferFilterSpecLeaf, InferFilterSpecLeafColumn, InlineColumnJoinEntry, InnerJoin, Is, IsSubtypeOf, JoinEntry, JsonCompatible, JsonDataInfo, JsonDataInfoEntries, JsonPartitionedDataInfo, JsonPartitionedDataInfoEntries, JsonSerializable, LinkerMap, ListFilesResult, ListOptionBase, LiveLogHandle, LocalBlobHandle, LocalBlobHandleAndSize, LocalImportFileHandle, LogsDriver, LsDriver, LsEntry, Metadata, MetadataJson, NativePObjectId, NavigationState, OpenDialogFilter, OpenDialogOps, OpenMultipleFilesResponse, OpenSingleFileResponse, Option, OuterJoin, OutputWithStatus, PAxisName, PColumn, PColumnDataEntry, PColumnIdAndSpec, PColumnInfo, PColumnKey, PColumnLazy, PColumnName, PColumnSelector, PColumnSpec, PColumnSpecId, PColumnValue, PColumnValues, PColumnValuesEntry, PDataColumnSpec, PFrame, PFrameDef, PFrameDriver, PFrameDriverError, PFrameError, PFrameHandle, PObject, PObjectId, PObjectSpec, PSpecPredicate, PTable, PTableAbsent, PTableColumnId, PTableColumnIdAxis, PTableColumnIdColumn, PTableColumnSpec, PTableColumnSpecAxis, PTableColumnSpecColumn, PTableDef, PTableDefV2, PTableHandle, PTableNA, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableShape, PTableSorting, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PUniversalColumnSpec, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, ParquetChunk, ParquetChunkMapping, ParquetChunkMappingAxis, ParquetChunkMappingColumn, ParquetChunkMetadata, ParquetChunkStats, ParquetPartitionedDataInfo, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries, PlId, PlIdBytes, PlIdLength, PlRef, ProgressLogWithInfo, RangeBytes, ReadyLogHandle, Ref, RemoteBlobHandle, RemoteBlobHandleAndSize, ResolveAnchorsOptions, ResultCollection, ResultOrError, ResultPoolEntry, RootFilterSpec, RuntimeCapabilities, SUniversalPColumnId, SerializedError, SingleAxisSelector, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, SpecExprAxisRef, SpecExprColumnRef, SpecQuery, SpecQueryBooleanExpression, SpecQueryColumn, SpecQueryExpression, SpecQueryFilter, SpecQueryInlineColumn, SpecQueryJoinEntry, SpecQueryOuterJoin, SpecQuerySliceAxes, SpecQuerySort, SpecQuerySparseToDenseColumn, SpecQuerySymmetricJoin, StorageEntry, StorageHandle, StorageHandleLocal, StorageHandleRemote, StreamingApiResponse, StreamingApiResponseHandleOutdated, StreamingApiResponseOk, StringifiedJson, SupportedRequirement, TableRange, UiError, UniqueValuesRequest, UniqueValuesResponse, UniversalPColumnId, ValueOrError, ValueType, ValueTypeSupported, ValueWithUTag, ValueWithUTagAndAuthor, assertNever, base64Decode, base64Encode, bigintReplacer, canonicalizeAxisId, canonicalizeAxisWithParents, canonicalizeJson, checkBlockFlag, collectSpecQueryColumns, createPlRef, dataInfoToEntries, deriveNativeId, deserializeError, deserializeResult, digestPlId, ensureError, ensurePColumn, entriesToDataInfo, executePSpecPredicate, extractAllColumns, extractAllRequirements, extractAllSupports, extractCodeWithInfo, extractConfigGeneric, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getFileNameFromHandle, getFilePathFromHandle, getNormalizedAxesList, getPColumnSpecId, getPTableColumnId, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, hasAbortError, isAbortError, isAggregateError, isAnchoredPColumnId, isAxisId, isBlockUIURL, isBooleanExpression, isDataInfo, isDataInfoEntries, isFilteredPColumn, isFolderURL, isImportFileHandleIndex, isImportFileHandleUpload, isLabelColumn, isLinkerColumn, isLiveLog, isPColumn, isPColumnResult, isPColumnSpec, isPColumnSpecResult, isPFrameDriverError, isPFrameError, isPTableAbsent, isPTableNA, isPTableValueAxis, isPartitionedDataInfoEntries, isPlRef, mapDataInfo, mapDataInfoEntries, mapJoinEntry, mapPObjectData, mapPTableDef, mapPTableDefV2, mapSpecQueryColumns, mapValueInVOE, matchAxis, matchAxisId, matchPColumn, newRangeBytesOpt, pTableValue, pTableValueBranded, parseColumnId, parseHttpAuth, parseJson, plId, plRefsEqual, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, resolveAnchors, selectorsToPredicate, serializeError, serializeHttpAuth, serializeResult, sortJoinEntry, sortPTableDef, sortSpecQuery, stringifyColumnId, stringifyJson, traverseQuerySpec, uniqueBy, uniquePlId, unwrapResult, validateRangeBytes, visitDataInfo, withEnrichments, wrapAndSerialize, wrapAndSerializeAsync, wrapAsyncCallback, wrapCallback };
59
+ import { ResourceTypeName, ResourceTypePrefix } from "./resource_types.js";
60
+ export { AAxisSelector, ADomain, AbortError, AllRequiresFeatureFlags, AllSupportsFeatureFlags, AnchorAxisIdOrRefBasic, AnchorAxisRef, AnchorAxisRefByIdx, AnchorAxisRefByMatcher, AnchorAxisRefByName, AnchorDomainRef, AnchoredColumnMatchStrategy, AnchoredIdDeriver, AnchoredPColumnId, AnchoredPColumnSelector, Annotation, AnnotationJson, AnyFunction, AnyLogHandle, ArchiveFormat, ArrayTypeUnion, ArtificialColumnJoinEntry, Assert, AssertKeysEqual, AuthorMarker, AxesId, AxesSpec, AxisFilter, AxisFilterByIdx, AxisFilterByName, AxisFilterValue, AxisId, AxisQualification, AxisSpec, AxisSpecNormalized, AxisTree, AxisValueType, Base64Compatible, Base64Encoded, BasicHttpAuth, BinaryChunk, BinaryPartitionedDataInfo, BinaryPartitionedDataInfoEntries, BlobDriver, BlobHandleAndSize, BlobLike, BlobToURLDriver, BlockCodeFeatureFlags, BlockCodeKnownFeatureFlags, BlockCodeWithInfo, BlockConfigContainer, BlockConfigGeneric, BlockConfigV3Generic, BlockConfigV4Generic, BlockOutputsBase, BlockRenderingMode, BlockSection, BlockSectionDelimiter, BlockSectionLink, BlockSectionLinkAppearance, BlockState, BlockStateV3, BlockUIURL, Branded, CalculateTableDataRequest, CalculateTableDataResponse, CanonicalizedJson, ChunkedStreamReader, ChunkedStreamReaderOptions, Code, ColumnAxesWithQualifications, ColumnFilter, ColumnJoinEntry, ColumnValueType, CompositeLinkerMap, ConstantAxisFilter, ContentHandler, DataExprAxisRef, DataExprColumnRef, DataInfo, DataInfoEntries, DataQuery, DataQueryBooleanExpression, DataQueryColumn, DataQueryExpression, DataQueryFilter, DataQueryInlineColumn, DataQueryJoinEntry, DataQueryOuterJoin, DataQuerySliceAxes, DataQuerySort, DataQuerySparseToDenseColumn, DataQuerySymmetricJoin, DefaultNavigationState, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, Domain, DomainJson, DriverKit, ErrorHandlerStatus, FileLike, FileRange, FilterKeysByPrefix, FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, FilteredPColumn, FilteredPColumnId, FindColumnsRequest, FindColumnsResponse, FolderURL, FrontendDriver, FullJoin, FullPTableColumnData, GetContentOptions, HttpAuth, ImportFileHandle, ImportFileHandleIndex, ImportFileHandleUpload, ImportProgress, ImportStatus, IncompatibleFlagsError, InferFilterSpecCommonLeaf, InferFilterSpecCommonNode, InferFilterSpecLeaf, InferFilterSpecLeafColumn, InlineColumnJoinEntry, InnerJoin, Is, IsSubtypeOf, JoinEntry, JsonCompatible, JsonDataInfo, JsonDataInfoEntries, JsonPartitionedDataInfo, JsonPartitionedDataInfoEntries, JsonSerializable, LegacyAxisSelector, LinkerMap, ListFilesResult, ListOptionBase, LiveLogHandle, LocalBlobHandle, LocalBlobHandleAndSize, LocalImportFileHandle, LogsDriver, LsDriver, LsEntry, MatcherMap, Metadata, MetadataJson, MultiAxisSelector, MultiColumnSelector, NativePObjectId, NavigationState, OpenDialogFilter, OpenDialogOps, OpenMultipleFilesResponse, OpenSingleFileResponse, Option, OuterJoin, OutputWithStatus, PAxisName, PColumn, PColumnDataEntry, PColumnIdAndSpec, PColumnInfo, PColumnKey, PColumnLazy, PColumnName, PColumnSelector, PColumnSpec, PColumnSpecId, PColumnValue, PColumnValues, PColumnValuesEntry, PDataColumnSpec, PFrame, PFrameDef, PFrameDriver, PFrameDriverError, PFrameError, PFrameHandle, PObject, PObjectId, PObjectSpec, PSpecDriver, PSpecPredicate, PTable, PTableAbsent, PTableColumnId, PTableColumnIdAxis, PTableColumnIdColumn, PTableColumnSpec, PTableColumnSpecAxis, PTableColumnSpecColumn, PTableDef, PTableDefV2, PTableHandle, PTableNA, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableShape, PTableSorting, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PUniversalColumnSpec, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, ParquetChunk, ParquetChunkMapping, ParquetChunkMappingAxis, ParquetChunkMappingColumn, ParquetChunkMetadata, ParquetChunkStats, ParquetPartitionedDataInfo, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries, PlId, PlIdBytes, PlIdLength, PlRef, ProgressLogWithInfo, RangeBytes, ReadyLogHandle, Ref, RemoteBlobHandle, RemoteBlobHandleAndSize, ResolveAnchorsOptions, ResourceTypeName, ResourceTypePrefix, ResultCollection, ResultOrError, ResultPoolEntry, RootFilterSpec, RuntimeCapabilities, SUniversalPColumnId, SerializedError, SingleAxisSelector, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, SpecExprAxisRef, SpecExprColumnRef, SpecFrameHandle, SpecQuery, SpecQueryBooleanExpression, SpecQueryColumn, SpecQueryExpression, SpecQueryFilter, SpecQueryInlineColumn, SpecQueryJoinEntry, SpecQueryOuterJoin, SpecQuerySliceAxes, SpecQuerySort, SpecQuerySparseToDenseColumn, SpecQuerySymmetricJoin, StorageEntry, StorageHandle, StorageHandleLocal, StorageHandleRemote, StreamingApiResponse, StreamingApiResponseHandleOutdated, StreamingApiResponseOk, StringMatcher, StringifiedJson, SupportedRequirement, TableRange, UiError, UniqueValuesRequest, UniqueValuesResponse, UniversalPColumnId, ValueOrError, ValueType, ValueTypeSupported, ValueWithUTag, ValueWithUTagAndAuthor, assertNever, base64Decode, base64Encode, bigintReplacer, canonicalizeAxisId, canonicalizeAxisWithParents, canonicalizeJson, checkBlockFlag, collectSpecQueryColumns, createPlRef, dataInfoToEntries, deriveNativeId, deserializeError, deserializeResult, digestPlId, ensureError, ensurePColumn, entriesToDataInfo, executePSpecPredicate, extractAllColumns, extractAllRequirements, extractAllSupports, extractCodeWithInfo, extractConfigGeneric, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getFileNameFromHandle, getFilePathFromHandle, getNormalizedAxesList, getPColumnSpecId, getPTableColumnId, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, hasAbortError, isAbortError, isAggregateError, isAnchoredPColumnId, isAxisId, isBlockUIURL, isBooleanExpression, isDataInfo, isDataInfoEntries, isFilteredPColumn, isFolderURL, isImportFileHandleIndex, isImportFileHandleUpload, isLabelColumn, isLinkerColumn, isLiveLog, isPColumn, isPColumnResult, isPColumnSpec, isPColumnSpecResult, isPFrameDriverError, isPFrameError, isPTableAbsent, isPTableNA, isPTableValueAxis, isPartitionedDataInfoEntries, isPlRef, legacyColumnSelectorsToPredicate, mapDataInfo, mapDataInfoEntries, mapJoinEntry, mapPObjectData, mapPTableDef, mapPTableDefV2, mapSpecQueryColumns, mapValueInVOE, matchAxis, matchAxisId, matchPColumn, newRangeBytesOpt, pTableValue, pTableValueBranded, parseColumnId, parseHttpAuth, parseJson, plId, plRefsEqual, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, resolveAnchors, serializeError, serializeHttpAuth, serializeResult, sortJoinEntry, sortPTableDef, sortSpecQuery, stringifyColumnId, stringifyJson, traverseQuerySpec, uniqueBy, uniquePlId, unwrapResult, validateRangeBytes, visitDataInfo, withEnrichments, wrapAndSerialize, wrapAndSerializeAsync, wrapAsyncCallback, wrapCallback };
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import { AnchoredIdDeriver, resolveAnchors } from "./drivers/pframe/spec/anchore
20
20
  import { isFilteredPColumn } from "./drivers/pframe/spec/filtered_column.js";
21
21
  import { ensurePColumn, extractAllColumns, isPColumn, isPColumnResult, isPColumnSpec, isPColumnSpecResult, mapPObjectData } from "./pool/spec.js";
22
22
  import { executePSpecPredicate } from "./pool/query.js";
23
- import { isAnchoredPColumnId, matchAxis, matchPColumn, selectorsToPredicate } from "./drivers/pframe/spec/selectors.js";
23
+ import { isAnchoredPColumnId, legacyColumnSelectorsToPredicate, matchAxis, matchPColumn } from "./drivers/pframe/spec/selectors.js";
24
24
  import { deriveNativeId } from "./drivers/pframe/spec/native_id.js";
25
25
  import { LinkerMap } from "./drivers/pframe/linker_columns.js";
26
26
  import { ChunkedStreamReader } from "./drivers/ChunkedStreamReader.js";
@@ -33,5 +33,6 @@ import { PlRef, createPlRef, isPlRef, plRefsEqual, withEnrichments } from "./ref
33
33
  import { mapValueInVOE } from "./value_or_error.js";
34
34
  import { base64Decode, base64Encode } from "./base64.js";
35
35
  import { parseHttpAuth, serializeHttpAuth } from "./httpAuth.js";
36
+ import { ResourceTypeName, ResourceTypePrefix } from "./resource_types.js";
36
37
 
37
- export { AbortError, AllRequiresFeatureFlags, AllSupportsFeatureFlags, AnchoredIdDeriver, Annotation, AnnotationJson, ChunkedStreamReader, Code, DefaultNavigationState, Domain, DomainJson, IncompatibleFlagsError, LinkerMap, PAxisName, PColumnName, PFrameDriverError, PFrameError, PTableAbsent, PTableNA, PlId, PlIdBytes, PlIdLength, PlRef, RangeBytes, RuntimeCapabilities, UiError, ValueType, assertNever, base64Decode, base64Encode, bigintReplacer, canonicalizeAxisId, canonicalizeAxisWithParents, canonicalizeJson, checkBlockFlag, collectSpecQueryColumns, createPlRef, dataInfoToEntries, deriveNativeId, deserializeError, deserializeResult, digestPlId, ensureError, ensurePColumn, entriesToDataInfo, executePSpecPredicate, extractAllColumns, extractAllRequirements, extractAllSupports, extractCodeWithInfo, extractConfigGeneric, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getFileNameFromHandle, getFilePathFromHandle, getNormalizedAxesList, getPColumnSpecId, getPTableColumnId, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, hasAbortError, isAbortError, isAggregateError, isAnchoredPColumnId, isAxisId, isBlockUIURL, isBooleanExpression, isDataInfo, isDataInfoEntries, isFilteredPColumn, isFolderURL, isImportFileHandleIndex, isImportFileHandleUpload, isLabelColumn, isLinkerColumn, isLiveLog, isPColumn, isPColumnResult, isPColumnSpec, isPColumnSpecResult, isPFrameDriverError, isPFrameError, isPTableAbsent, isPTableNA, isPTableValueAxis, isPartitionedDataInfoEntries, isPlRef, mapDataInfo, mapDataInfoEntries, mapJoinEntry, mapPObjectData, mapPTableDef, mapPTableDefV2, mapSpecQueryColumns, mapValueInVOE, matchAxis, matchAxisId, matchPColumn, newRangeBytesOpt, pTableValue, pTableValueBranded, parseColumnId, parseHttpAuth, parseJson, plId, plRefsEqual, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, resolveAnchors, selectorsToPredicate, serializeError, serializeHttpAuth, serializeResult, sortJoinEntry, sortPTableDef, sortSpecQuery, stringifyColumnId, stringifyJson, traverseQuerySpec, uniqueBy, uniquePlId, unwrapResult, validateRangeBytes, visitDataInfo, withEnrichments, wrapAndSerialize, wrapAndSerializeAsync, wrapAsyncCallback, wrapCallback };
38
+ export { AbortError, AllRequiresFeatureFlags, AllSupportsFeatureFlags, AnchoredIdDeriver, Annotation, AnnotationJson, ChunkedStreamReader, Code, DefaultNavigationState, Domain, DomainJson, IncompatibleFlagsError, LinkerMap, PAxisName, PColumnName, PFrameDriverError, PFrameError, PTableAbsent, PTableNA, PlId, PlIdBytes, PlIdLength, PlRef, RangeBytes, ResourceTypeName, ResourceTypePrefix, RuntimeCapabilities, UiError, ValueType, assertNever, base64Decode, base64Encode, bigintReplacer, canonicalizeAxisId, canonicalizeAxisWithParents, canonicalizeJson, checkBlockFlag, collectSpecQueryColumns, createPlRef, dataInfoToEntries, deriveNativeId, deserializeError, deserializeResult, digestPlId, ensureError, ensurePColumn, entriesToDataInfo, executePSpecPredicate, extractAllColumns, extractAllRequirements, extractAllSupports, extractCodeWithInfo, extractConfigGeneric, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getFileNameFromHandle, getFilePathFromHandle, getNormalizedAxesList, getPColumnSpecId, getPTableColumnId, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, hasAbortError, isAbortError, isAggregateError, isAnchoredPColumnId, isAxisId, isBlockUIURL, isBooleanExpression, isDataInfo, isDataInfoEntries, isFilteredPColumn, isFolderURL, isImportFileHandleIndex, isImportFileHandleUpload, isLabelColumn, isLinkerColumn, isLiveLog, isPColumn, isPColumnResult, isPColumnSpec, isPColumnSpecResult, isPFrameDriverError, isPFrameError, isPTableAbsent, isPTableNA, isPTableValueAxis, isPartitionedDataInfoEntries, isPlRef, legacyColumnSelectorsToPredicate, mapDataInfo, mapDataInfoEntries, mapJoinEntry, mapPObjectData, mapPTableDef, mapPTableDefV2, mapSpecQueryColumns, mapValueInVOE, matchAxis, matchAxisId, matchPColumn, newRangeBytesOpt, pTableValue, pTableValueBranded, parseColumnId, parseHttpAuth, parseJson, plId, plRefsEqual, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, resolveAnchors, serializeError, serializeHttpAuth, serializeResult, sortJoinEntry, sortPTableDef, sortSpecQuery, stringifyColumnId, stringifyJson, traverseQuerySpec, uniqueBy, uniquePlId, unwrapResult, validateRangeBytes, visitDataInfo, withEnrichments, wrapAndSerialize, wrapAndSerializeAsync, wrapAsyncCallback, wrapCallback };
@@ -0,0 +1,53 @@
1
+
2
+ //#region src/resource_types.ts
3
+ /** Well-known resource type names used across the platform. */
4
+ const ResourceTypeName = {
5
+ StreamManager: "StreamManager",
6
+ StdMap: "StdMap",
7
+ StdMapSlash: "std/map",
8
+ EphStdMap: "EphStdMap",
9
+ PFrame: "PFrame",
10
+ ParquetChunk: "ParquetChunk",
11
+ BContext: "BContext",
12
+ BlockPackCustom: "BlockPackCustom",
13
+ BinaryMap: "BinaryMap",
14
+ BinaryValue: "BinaryValue",
15
+ BlobMap: "BlobMap",
16
+ BResolveSingle: "BResolveSingle",
17
+ BResolveSingleNoResult: "BResolveSingleNoResult",
18
+ BQueryResult: "BQueryResult",
19
+ TengoTemplate: "TengoTemplate",
20
+ TengoLib: "TengoLib",
21
+ SoftwareInfo: "SoftwareInfo",
22
+ Dummy: "Dummy",
23
+ JsonResourceError: "json/resourceError",
24
+ JsonObject: "json/object",
25
+ JsonGzObject: "json-gz/object",
26
+ JsonString: "json/string",
27
+ JsonArray: "json/array",
28
+ JsonNumber: "json/number",
29
+ BContextEnd: "BContextEnd",
30
+ FrontendFromUrl: "Frontend/FromUrl",
31
+ FrontendFromFolder: "Frontend/FromFolder",
32
+ BObjectSpec: "BObjectSpec",
33
+ Blob: "Blob",
34
+ Null: "Null",
35
+ Binary: "binary",
36
+ LSProvider: "LSProvider",
37
+ UserProject: "UserProject",
38
+ Projects: "Projects",
39
+ ClientRoot: "ClientRoot"
40
+ };
41
+ /** Resource type name prefix constants. */
42
+ const ResourceTypePrefix = {
43
+ Blob: "Blob/",
44
+ BlobUpload: "BlobUpload/",
45
+ BlobIndex: "BlobIndex/",
46
+ PColumnData: "PColumnData/",
47
+ StreamWorkdir: "StreamWorkdir/"
48
+ };
49
+
50
+ //#endregion
51
+ exports.ResourceTypeName = ResourceTypeName;
52
+ exports.ResourceTypePrefix = ResourceTypePrefix;
53
+ //# sourceMappingURL=resource_types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource_types.cjs","names":[],"sources":["../src/resource_types.ts"],"sourcesContent":["/** Well-known resource type names used across the platform. */\nexport const ResourceTypeName = {\n StreamManager: \"StreamManager\",\n StdMap: \"StdMap\",\n StdMapSlash: \"std/map\",\n EphStdMap: \"EphStdMap\",\n PFrame: \"PFrame\",\n ParquetChunk: \"ParquetChunk\",\n BContext: \"BContext\",\n BlockPackCustom: \"BlockPackCustom\",\n BinaryMap: \"BinaryMap\",\n BinaryValue: \"BinaryValue\",\n BlobMap: \"BlobMap\",\n BResolveSingle: \"BResolveSingle\",\n BResolveSingleNoResult: \"BResolveSingleNoResult\",\n BQueryResult: \"BQueryResult\",\n TengoTemplate: \"TengoTemplate\",\n TengoLib: \"TengoLib\",\n SoftwareInfo: \"SoftwareInfo\",\n Dummy: \"Dummy\",\n JsonResourceError: \"json/resourceError\",\n JsonObject: \"json/object\",\n JsonGzObject: \"json-gz/object\",\n JsonString: \"json/string\",\n JsonArray: \"json/array\",\n JsonNumber: \"json/number\",\n BContextEnd: \"BContextEnd\",\n FrontendFromUrl: \"Frontend/FromUrl\",\n FrontendFromFolder: \"Frontend/FromFolder\",\n BObjectSpec: \"BObjectSpec\",\n Blob: \"Blob\",\n Null: \"Null\",\n Binary: \"binary\",\n LSProvider: \"LSProvider\",\n UserProject: \"UserProject\",\n Projects: \"Projects\",\n ClientRoot: \"ClientRoot\",\n} as const;\n\n/** Resource type name prefix constants. */\nexport const ResourceTypePrefix = {\n Blob: \"Blob/\",\n BlobUpload: \"BlobUpload/\",\n BlobIndex: \"BlobIndex/\",\n PColumnData: \"PColumnData/\",\n StreamWorkdir: \"StreamWorkdir/\",\n} as const;\n"],"mappings":";;;AACA,MAAa,mBAAmB;CAC9B,eAAe;CACf,QAAQ;CACR,aAAa;CACb,WAAW;CACX,QAAQ;CACR,cAAc;CACd,UAAU;CACV,iBAAiB;CACjB,WAAW;CACX,aAAa;CACb,SAAS;CACT,gBAAgB;CAChB,wBAAwB;CACxB,cAAc;CACd,eAAe;CACf,UAAU;CACV,cAAc;CACd,OAAO;CACP,mBAAmB;CACnB,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,aAAa;CACb,iBAAiB;CACjB,oBAAoB;CACpB,aAAa;CACb,MAAM;CACN,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,aAAa;CACb,UAAU;CACV,YAAY;CACb;;AAGD,MAAa,qBAAqB;CAChC,MAAM;CACN,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CAChB"}
@@ -0,0 +1,50 @@
1
+ //#region src/resource_types.d.ts
2
+ /** Well-known resource type names used across the platform. */
3
+ declare const ResourceTypeName: {
4
+ readonly StreamManager: "StreamManager";
5
+ readonly StdMap: "StdMap";
6
+ readonly StdMapSlash: "std/map";
7
+ readonly EphStdMap: "EphStdMap";
8
+ readonly PFrame: "PFrame";
9
+ readonly ParquetChunk: "ParquetChunk";
10
+ readonly BContext: "BContext";
11
+ readonly BlockPackCustom: "BlockPackCustom";
12
+ readonly BinaryMap: "BinaryMap";
13
+ readonly BinaryValue: "BinaryValue";
14
+ readonly BlobMap: "BlobMap";
15
+ readonly BResolveSingle: "BResolveSingle";
16
+ readonly BResolveSingleNoResult: "BResolveSingleNoResult";
17
+ readonly BQueryResult: "BQueryResult";
18
+ readonly TengoTemplate: "TengoTemplate";
19
+ readonly TengoLib: "TengoLib";
20
+ readonly SoftwareInfo: "SoftwareInfo";
21
+ readonly Dummy: "Dummy";
22
+ readonly JsonResourceError: "json/resourceError";
23
+ readonly JsonObject: "json/object";
24
+ readonly JsonGzObject: "json-gz/object";
25
+ readonly JsonString: "json/string";
26
+ readonly JsonArray: "json/array";
27
+ readonly JsonNumber: "json/number";
28
+ readonly BContextEnd: "BContextEnd";
29
+ readonly FrontendFromUrl: "Frontend/FromUrl";
30
+ readonly FrontendFromFolder: "Frontend/FromFolder";
31
+ readonly BObjectSpec: "BObjectSpec";
32
+ readonly Blob: "Blob";
33
+ readonly Null: "Null";
34
+ readonly Binary: "binary";
35
+ readonly LSProvider: "LSProvider";
36
+ readonly UserProject: "UserProject";
37
+ readonly Projects: "Projects";
38
+ readonly ClientRoot: "ClientRoot";
39
+ };
40
+ /** Resource type name prefix constants. */
41
+ declare const ResourceTypePrefix: {
42
+ readonly Blob: "Blob/";
43
+ readonly BlobUpload: "BlobUpload/";
44
+ readonly BlobIndex: "BlobIndex/";
45
+ readonly PColumnData: "PColumnData/";
46
+ readonly StreamWorkdir: "StreamWorkdir/";
47
+ };
48
+ //#endregion
49
+ export { ResourceTypeName, ResourceTypePrefix };
50
+ //# sourceMappingURL=resource_types.d.ts.map
@@ -0,0 +1,51 @@
1
+ //#region src/resource_types.ts
2
+ /** Well-known resource type names used across the platform. */
3
+ const ResourceTypeName = {
4
+ StreamManager: "StreamManager",
5
+ StdMap: "StdMap",
6
+ StdMapSlash: "std/map",
7
+ EphStdMap: "EphStdMap",
8
+ PFrame: "PFrame",
9
+ ParquetChunk: "ParquetChunk",
10
+ BContext: "BContext",
11
+ BlockPackCustom: "BlockPackCustom",
12
+ BinaryMap: "BinaryMap",
13
+ BinaryValue: "BinaryValue",
14
+ BlobMap: "BlobMap",
15
+ BResolveSingle: "BResolveSingle",
16
+ BResolveSingleNoResult: "BResolveSingleNoResult",
17
+ BQueryResult: "BQueryResult",
18
+ TengoTemplate: "TengoTemplate",
19
+ TengoLib: "TengoLib",
20
+ SoftwareInfo: "SoftwareInfo",
21
+ Dummy: "Dummy",
22
+ JsonResourceError: "json/resourceError",
23
+ JsonObject: "json/object",
24
+ JsonGzObject: "json-gz/object",
25
+ JsonString: "json/string",
26
+ JsonArray: "json/array",
27
+ JsonNumber: "json/number",
28
+ BContextEnd: "BContextEnd",
29
+ FrontendFromUrl: "Frontend/FromUrl",
30
+ FrontendFromFolder: "Frontend/FromFolder",
31
+ BObjectSpec: "BObjectSpec",
32
+ Blob: "Blob",
33
+ Null: "Null",
34
+ Binary: "binary",
35
+ LSProvider: "LSProvider",
36
+ UserProject: "UserProject",
37
+ Projects: "Projects",
38
+ ClientRoot: "ClientRoot"
39
+ };
40
+ /** Resource type name prefix constants. */
41
+ const ResourceTypePrefix = {
42
+ Blob: "Blob/",
43
+ BlobUpload: "BlobUpload/",
44
+ BlobIndex: "BlobIndex/",
45
+ PColumnData: "PColumnData/",
46
+ StreamWorkdir: "StreamWorkdir/"
47
+ };
48
+
49
+ //#endregion
50
+ export { ResourceTypeName, ResourceTypePrefix };
51
+ //# sourceMappingURL=resource_types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource_types.js","names":[],"sources":["../src/resource_types.ts"],"sourcesContent":["/** Well-known resource type names used across the platform. */\nexport const ResourceTypeName = {\n StreamManager: \"StreamManager\",\n StdMap: \"StdMap\",\n StdMapSlash: \"std/map\",\n EphStdMap: \"EphStdMap\",\n PFrame: \"PFrame\",\n ParquetChunk: \"ParquetChunk\",\n BContext: \"BContext\",\n BlockPackCustom: \"BlockPackCustom\",\n BinaryMap: \"BinaryMap\",\n BinaryValue: \"BinaryValue\",\n BlobMap: \"BlobMap\",\n BResolveSingle: \"BResolveSingle\",\n BResolveSingleNoResult: \"BResolveSingleNoResult\",\n BQueryResult: \"BQueryResult\",\n TengoTemplate: \"TengoTemplate\",\n TengoLib: \"TengoLib\",\n SoftwareInfo: \"SoftwareInfo\",\n Dummy: \"Dummy\",\n JsonResourceError: \"json/resourceError\",\n JsonObject: \"json/object\",\n JsonGzObject: \"json-gz/object\",\n JsonString: \"json/string\",\n JsonArray: \"json/array\",\n JsonNumber: \"json/number\",\n BContextEnd: \"BContextEnd\",\n FrontendFromUrl: \"Frontend/FromUrl\",\n FrontendFromFolder: \"Frontend/FromFolder\",\n BObjectSpec: \"BObjectSpec\",\n Blob: \"Blob\",\n Null: \"Null\",\n Binary: \"binary\",\n LSProvider: \"LSProvider\",\n UserProject: \"UserProject\",\n Projects: \"Projects\",\n ClientRoot: \"ClientRoot\",\n} as const;\n\n/** Resource type name prefix constants. */\nexport const ResourceTypePrefix = {\n Blob: \"Blob/\",\n BlobUpload: \"BlobUpload/\",\n BlobIndex: \"BlobIndex/\",\n PColumnData: \"PColumnData/\",\n StreamWorkdir: \"StreamWorkdir/\",\n} as const;\n"],"mappings":";;AACA,MAAa,mBAAmB;CAC9B,eAAe;CACf,QAAQ;CACR,aAAa;CACb,WAAW;CACX,QAAQ;CACR,cAAc;CACd,UAAU;CACV,iBAAiB;CACjB,WAAW;CACX,aAAa;CACb,SAAS;CACT,gBAAgB;CAChB,wBAAwB;CACxB,cAAc;CACd,eAAe;CACf,UAAU;CACV,cAAc;CACd,OAAO;CACP,mBAAmB;CACnB,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,aAAa;CACb,iBAAiB;CACjB,oBAAoB;CACpB,aAAa;CACb,MAAM;CACN,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,aAAa;CACb,UAAU;CACV,YAAY;CACb;;AAGD,MAAa,qBAAqB;CAChC,MAAM;CACN,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CAChB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-model-common",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "description": "Platforma SDK Model",
5
5
  "files": [
6
6
  "./dist/**/*",
@@ -19,15 +19,16 @@
19
19
  "dependencies": {
20
20
  "canonicalize": "~2.1.0",
21
21
  "zod": "~3.23.8",
22
- "@milaboratories/pl-error-like": "1.12.9"
22
+ "@milaboratories/pl-error-like": "1.12.9",
23
+ "@milaboratories/helpers": "1.14.0"
23
24
  },
24
25
  "devDependencies": {
25
26
  "@vitest/coverage-istanbul": "^4.0.18",
26
27
  "typescript": "~5.9.3",
27
28
  "vitest": "^4.0.18",
29
+ "@milaboratories/ts-builder": "1.3.0",
28
30
  "@milaboratories/ts-configs": "1.2.2",
29
- "@milaboratories/build-configs": "1.5.2",
30
- "@milaboratories/ts-builder": "1.3.0"
31
+ "@milaboratories/build-configs": "1.5.2"
31
32
  },
32
33
  "scripts": {
33
34
  "build": "ts-builder build --target node",
@@ -1,7 +1,6 @@
1
1
  import type { ErrorLike } from "@milaboratories/pl-error-like";
2
2
 
3
3
  /** Use this as constraint instead of `Function` */
4
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
4
  export type AnyFunction = (...args: any[]) => any;
6
5
 
7
6
  export type OutputWithStatus<T> =
@@ -7,4 +7,5 @@ export * from "./log";
7
7
  export * from "./ls";
8
8
 
9
9
  export * from "./pframe";
10
+ export * from "./pspec";
10
11
  export * from "./ChunkedStreamReader";