semanticdb-v2 2.0.0-alpha.5 → 2.0.0-alpha.7
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/README.md +272 -7
- package/dist/cache/redis-query-cache.esm.js +1 -1
- package/dist/cache/redis-query-cache.js +1 -1
- package/dist/cache/types.d.ts +2 -0
- package/dist/executor/connection-registry.d.ts +1 -12
- package/dist/executor/execute-query.d.ts +6 -1
- package/dist/executor/federated-execution.d.ts +37 -0
- package/dist/executor/fetch-entities.d.ts +3 -1
- package/dist/executor/result-hydrator/types.d.ts +2 -0
- package/dist/executor/total.d.ts +11 -0
- package/dist/executor/types.d.ts +33 -4
- package/dist/index.d.ts +9 -7
- package/dist/logicform-types.d.ts +44 -12
- package/dist/normalizer/core.d.ts +9 -0
- package/dist/normalizer/pred-expression.d.ts +6 -0
- package/dist/operators/builtins/query-expression.d.ts +3 -0
- package/dist/operators/index.d.ts +1 -1
- package/dist/operators/types.d.ts +39 -8
- package/dist/physical/clickhouse-provider.d.ts +20 -2
- package/dist/physical/connection-registry.d.ts +13 -0
- package/dist/physical/connection.d.ts +57 -15
- package/dist/physical/dameng-provider.d.ts +66 -0
- package/dist/physical/databricks-provider.d.ts +88 -0
- package/dist/physical/db-connector.d.ts +23 -0
- package/dist/physical/display-query.d.ts +3 -0
- package/dist/physical/doris-provider.d.ts +2 -1
- package/dist/physical/duckdb-coordinator-provider.d.ts +37 -0
- package/dist/physical/gbase-provider.d.ts +11 -0
- package/dist/physical/index.d.ts +24 -9
- package/dist/physical/load-driver.d.ts +1 -0
- package/dist/physical/maxcompute-provider.d.ts +44 -0
- package/dist/physical/mysql-protocol-provider.d.ts +24 -6
- package/dist/physical/mysql-provider.d.ts +2 -1
- package/dist/physical/oracle-provider.d.ts +20 -4
- package/dist/physical/postgresql-provider.d.ts +23 -4
- package/dist/physical/provider.d.ts +57 -1
- package/dist/physical/snowflake-provider.d.ts +19 -3
- package/dist/physical/sqlserver-provider.d.ts +69 -0
- package/dist/physical/starrocks-provider.d.ts +2 -1
- package/dist/physical/table-description.d.ts +5 -0
- package/dist/physical/table-discovery.d.ts +10 -0
- package/dist/planner/build-lineage.d.ts +1 -1
- package/dist/planner/create-logical-plan.d.ts +7 -0
- package/dist/planner/index.d.ts +4 -2
- package/dist/planner/mapping-granularity.d.ts +7 -0
- package/dist/planner/rewrite-nested-components.d.ts +8 -0
- package/dist/planner/select-schema-mapping.d.ts +16 -2
- package/dist/planner/semantics/index.d.ts +0 -4
- package/dist/planner/semantics/periods.d.ts +13 -0
- package/dist/planner/semantics/registry-defaults.d.ts +2 -1
- package/dist/planner/types.d.ts +71 -34
- package/dist/plugins/hierarchy/index.d.ts +1 -1
- package/dist/plugins/hierarchy/mapping-granularity.d.ts +4 -0
- package/dist/plugins/hierarchy/types.d.ts +17 -0
- package/dist/plugins/index.d.ts +10 -1
- package/dist/{planner/semantics → plugins}/observation/classification.d.ts +1 -1
- package/dist/plugins/observation/index.d.ts +17 -0
- package/dist/{planner/semantics → plugins}/observation/operator-policy.d.ts +2 -3
- package/dist/{planner/semantics → plugins}/observation/periods.d.ts +2 -3
- package/dist/{planner/semantics → plugins}/observation/rule.d.ts +1 -1
- package/dist/{planner/semantics → plugins}/observation/types.d.ts +1 -1
- package/dist/plugins/property-hierarchy/index.d.ts +11 -0
- package/dist/plugins/recursive/index.d.ts +26 -0
- package/dist/plugins/temporal/index.d.ts +13 -0
- package/dist/plugins/types.d.ts +165 -1
- package/dist/plugins/validity/classification.d.ts +5 -0
- package/dist/{planner/semantics → plugins}/validity/index.d.ts +9 -0
- package/dist/{planner/semantics → plugins}/validity/periods.d.ts +2 -3
- package/dist/{planner/semantics → plugins}/validity/query-policy.d.ts +1 -2
- package/dist/{planner/semantics → plugins}/validity/rule.d.ts +1 -1
- package/dist/plugins/validity/semantic-types.d.ts +3 -0
- package/dist/schema-mappings/freshness.d.ts +1 -1
- package/dist/schema-mappings/granularity.d.ts +5 -0
- package/dist/schema-mappings/index.d.ts +2 -1
- package/dist/schema-mappings/registry.d.ts +5 -3
- package/dist/schema-mappings/types.d.ts +43 -0
- package/dist/schema-mappings/yiask.d.ts +6 -2
- package/dist/semantic-types/index.d.ts +5 -3
- package/dist/semantic-types/registry.d.ts +2 -0
- package/dist/semantic-types/resolve-schema.d.ts +1 -1
- package/dist/semantic-types/types.d.ts +0 -14
- package/dist/semantic-types/validate-resolved-schema.d.ts +2 -5
- package/dist/semanticdb.esm.js +5 -3
- package/dist/semanticdb.js +5 -3
- package/package.json +46 -5
- package/dist/planner/semantics/annual-periods.d.ts +0 -11
- package/dist/planner/semantics/lifecycle/classification.d.ts +0 -5
- package/dist/planner/semantics/lifecycle/index.d.ts +0 -3
- package/dist/planner/semantics/lifecycle/query-policy.d.ts +0 -2
- package/dist/planner/semantics/lifecycle/rule.d.ts +0 -2
- package/dist/planner/semantics/observation/index.d.ts +0 -6
- package/dist/planner/semantics/validity/classification.d.ts +0 -14
- package/dist/semantic-types/builtins/end-date.d.ts +0 -2
- package/dist/semantic-types/builtins/start-date.d.ts +0 -2
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import type { SemanticDBPlugin } from '../types';
|
|
2
|
+
declare module '../../operators/types' {
|
|
3
|
+
interface ResultPropertyTemporalMetadataExtensions {
|
|
4
|
+
readonly validity: {
|
|
5
|
+
readonly kind: 'validity';
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
}
|
|
1
9
|
export { resolveValidityProperties } from './classification';
|
|
2
10
|
export type { ValidityProperties } from './classification';
|
|
3
11
|
export { applyValidityQuery } from './query-policy';
|
|
4
12
|
export { hasValidityTimeGroup, removeValidityTimeCondition, resolveValidityPeriodSpec, } from './periods';
|
|
5
13
|
export type { ValidityPeriod, ValidityPeriodSpec } from './periods';
|
|
6
14
|
export { validitySemanticRule } from './rule';
|
|
15
|
+
export declare const validityPlugin: SemanticDBPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LogicformType, PredItemType, QueryType } from '
|
|
2
|
-
import type { TimeGranularity } from '
|
|
1
|
+
import type { LogicformType, PredItemType, QueryType } from '../../logicform-types';
|
|
2
|
+
import type { TimeGranularity } from '../../semantic-types/index';
|
|
3
3
|
import type { ValidityProperties } from './classification';
|
|
4
4
|
export interface ValidityPeriod {
|
|
5
5
|
readonly label: string;
|
|
@@ -12,5 +12,4 @@ export interface ValidityPeriodSpec {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const hasValidityTimeGroup: (logicform: LogicformType, properties: ValidityProperties) => boolean;
|
|
14
14
|
export declare const removeValidityTimeCondition: (query: QueryType | undefined, properties: ValidityProperties) => QueryType | undefined;
|
|
15
|
-
/** Resolve a bounded virtual-time grouping into explicit period-end instants. */
|
|
16
15
|
export declare const resolveValidityPeriodSpec: (logicform: LogicformType, properties: ValidityProperties) => ValidityPeriodSpec | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { QueryType } from '
|
|
1
|
+
import type { QueryType } from '../../logicform-types';
|
|
2
2
|
import type { ValidityProperties } from './classification';
|
|
3
|
-
/** Rewrite a public time-axis condition to the half-open validity interval [start, end). */
|
|
4
3
|
export declare const applyValidityQuery: (query: QueryType | undefined, properties: ValidityProperties) => QueryType | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PlannerSemanticRule } from '
|
|
1
|
+
import type { PlannerSemanticRule } from '../../planner/index';
|
|
2
2
|
export declare const validitySemanticRule: PlannerSemanticRule;
|
|
@@ -4,4 +4,4 @@ export declare const parseDailyExpireAt: (value: string) => {
|
|
|
4
4
|
readonly minute: number;
|
|
5
5
|
readonly second: number;
|
|
6
6
|
} | undefined;
|
|
7
|
-
export declare const validateSourceFreshness: (definition: SchemaMappingDefinition) => void;
|
|
7
|
+
export declare const validateSourceFreshness: (definition: Pick<SchemaMappingDefinition, "freshness">) => void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SemanticDBPlugin } from '../plugins/types';
|
|
2
|
+
import type { TimeGranularity } from '../semantic-types/index';
|
|
3
|
+
import type { SchemaMappingGranularity } from './types';
|
|
4
|
+
export declare const isMappingTimeGranularity: (value: unknown) => value is TimeGranularity;
|
|
5
|
+
export declare const isSchemaMappingGranularity: (value: unknown, plugins?: readonly SemanticDBPlugin[]) => value is SchemaMappingGranularity;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { SchemaMappingRegistry } from './registry';
|
|
2
2
|
export { parseDailyExpireAt } from './freshness';
|
|
3
|
-
export
|
|
3
|
+
export { isMappingTimeGranularity, isSchemaMappingGranularity, } from './granularity';
|
|
4
|
+
export type { SchemaMappingDefinition, SchemaMappingEnrichmentDefinition, SchemaMappingEnrichmentKey, SchemaMappingItem, SchemaMappingGranularity, SchemaMappingGranularityExtensions, SchemaMappingPointTemporalDefinition, SchemaMappingSelection, RejectedSchemaMapping, SourceFreshnessPolicy, } from './types';
|
|
4
5
|
export type { SchemaMappingPredDefinition, SchemaMappingPredMatch, } from './types';
|
|
5
6
|
export { fromYiAskSchemaMapping } from './yiask';
|
|
6
7
|
export type { YiAskSchemaMappingItem, YiAskSchemaMappingRecord } from './yiask';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { SemanticDBPlugin } from '../plugins/index';
|
|
1
2
|
import type { SchemaMappingDefinition } from './types';
|
|
2
3
|
export declare class SchemaMappingRegistry {
|
|
3
4
|
#private;
|
|
4
|
-
|
|
5
|
+
readonly plugins: readonly SemanticDBPlugin[];
|
|
6
|
+
constructor(definitions?: readonly SchemaMappingDefinition[], plugins?: readonly SemanticDBPlugin[]);
|
|
5
7
|
register(definition: SchemaMappingDefinition): this;
|
|
6
|
-
get(schemaId: string): SchemaMappingDefinition;
|
|
8
|
+
get(schemaId: string, connectionId?: string): SchemaMappingDefinition;
|
|
7
9
|
list(schemaId: string): readonly SchemaMappingDefinition[];
|
|
8
|
-
findSource(schemaId: string, source: string): SchemaMappingDefinition | undefined;
|
|
10
|
+
findSource(schemaId: string, source: string, connectionId?: string): SchemaMappingDefinition | undefined;
|
|
9
11
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { PredItemType, QueryType } from '../logicform-types';
|
|
2
|
+
import type { TimeGranularity } from '../semantic-types/index';
|
|
3
|
+
/** Plugin-owned physical grains extend this interface through module augmentation. */
|
|
4
|
+
export interface SchemaMappingGranularityExtensions {
|
|
5
|
+
}
|
|
6
|
+
/** Finest physical grain represented by one mapped Property column. */
|
|
7
|
+
export type SchemaMappingGranularity = TimeGranularity | SchemaMappingGranularityExtensions[keyof SchemaMappingGranularityExtensions];
|
|
2
8
|
export type SourceFreshnessPolicy = {
|
|
3
9
|
readonly mode: 'ttl';
|
|
4
10
|
readonly ttlSeconds: number;
|
|
@@ -24,9 +30,34 @@ export interface SchemaMappingPredDefinition {
|
|
|
24
30
|
}
|
|
25
31
|
export interface SchemaMappingItem {
|
|
26
32
|
readonly sourceColumn?: string;
|
|
33
|
+
/** Enrichment id that owns sourceColumn. Missing means the mapping's base source. */
|
|
34
|
+
readonly sourceRef?: string;
|
|
27
35
|
readonly mappingType?: 'property' | 'predItem' | 'ignored';
|
|
28
36
|
readonly propertyTarget?: readonly string[];
|
|
29
37
|
readonly predItem?: PredItemType;
|
|
38
|
+
/** Finest physical grain of a mapped Property. */
|
|
39
|
+
readonly granularity?: SchemaMappingGranularity;
|
|
40
|
+
}
|
|
41
|
+
export interface SchemaMappingEnrichmentKey {
|
|
42
|
+
/** Physical column on the mapping's base source. */
|
|
43
|
+
readonly baseColumn: string;
|
|
44
|
+
/** Physical entity-id column on the enrichment source. */
|
|
45
|
+
readonly targetColumn: string;
|
|
46
|
+
}
|
|
47
|
+
export interface SchemaMappingPointTemporalDefinition {
|
|
48
|
+
readonly kind: 'point';
|
|
49
|
+
/** Point whose containing base-source interval owns the feature row. */
|
|
50
|
+
readonly pointColumn: string;
|
|
51
|
+
}
|
|
52
|
+
/** A same-connection physical extension of one logical Schema. */
|
|
53
|
+
export interface SchemaMappingEnrichmentDefinition {
|
|
54
|
+
readonly id: string;
|
|
55
|
+
readonly source: string;
|
|
56
|
+
readonly sourceSql?: string;
|
|
57
|
+
readonly on: readonly SchemaMappingEnrichmentKey[];
|
|
58
|
+
readonly temporal?: SchemaMappingPointTemporalDefinition;
|
|
59
|
+
/** Missing means queries depending on this enrichment are not cached. */
|
|
60
|
+
readonly freshness?: SourceFreshnessPolicy;
|
|
30
61
|
}
|
|
31
62
|
export interface SchemaMappingDefinition {
|
|
32
63
|
/** Stable identity when a Schema has multiple physical mappings. */
|
|
@@ -38,6 +69,8 @@ export interface SchemaMappingDefinition {
|
|
|
38
69
|
readonly source: string;
|
|
39
70
|
/** Optional trusted query compiled as a derived-table source instead of reading source directly. */
|
|
40
71
|
readonly sourceSql?: string;
|
|
72
|
+
/** Optional physical tables that extend base rows without becoming logical Schema relations. */
|
|
73
|
+
readonly enrichments?: readonly SchemaMappingEnrichmentDefinition[];
|
|
41
74
|
/** Unified logical-to-physical mappings for properties and conditional PredItems. */
|
|
42
75
|
readonly mappings?: readonly SchemaMappingItem[];
|
|
43
76
|
/** Higher values win when multiple candidates cover the same LogicForm. */
|
|
@@ -45,3 +78,13 @@ export interface SchemaMappingDefinition {
|
|
|
45
78
|
/** Missing means queries depending on this physical source are not cached. */
|
|
46
79
|
readonly freshness?: SourceFreshnessPolicy;
|
|
47
80
|
}
|
|
81
|
+
export interface RejectedSchemaMapping {
|
|
82
|
+
readonly mappingId: string;
|
|
83
|
+
readonly reason: string;
|
|
84
|
+
}
|
|
85
|
+
/** Planner diagnostics for one physical Schema mapping decision. */
|
|
86
|
+
export interface SchemaMappingSelection {
|
|
87
|
+
readonly schemaId: string;
|
|
88
|
+
readonly selectedMappingId: string;
|
|
89
|
+
readonly rejectedMappings: readonly RejectedSchemaMapping[];
|
|
90
|
+
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { SemanticDBPlugin } from '../plugins/index';
|
|
1
2
|
import type { PredItemType } from '../logicform-types';
|
|
2
|
-
import type { SchemaMappingDefinition } from './types';
|
|
3
|
+
import type { SchemaMappingDefinition, SchemaMappingEnrichmentDefinition, SchemaMappingGranularity } from './types';
|
|
3
4
|
export interface YiAskSchemaMappingItem {
|
|
4
5
|
readonly sourceColumn?: string;
|
|
6
|
+
readonly sourceRef?: string;
|
|
5
7
|
readonly mappingType?: 'property' | 'predItem' | 'ignored';
|
|
6
8
|
readonly propertyTarget?: readonly string[];
|
|
7
9
|
readonly predItem?: PredItemType;
|
|
10
|
+
readonly granularity?: SchemaMappingGranularity;
|
|
8
11
|
}
|
|
9
12
|
export interface YiAskSchemaMappingRecord {
|
|
10
13
|
readonly id: string | number;
|
|
@@ -16,7 +19,8 @@ export interface YiAskSchemaMappingRecord {
|
|
|
16
19
|
readonly physicalDatabase?: string;
|
|
17
20
|
readonly physicalSchema?: string;
|
|
18
21
|
readonly physicalTable?: string;
|
|
22
|
+
readonly enrichments?: readonly SchemaMappingEnrichmentDefinition[];
|
|
19
23
|
readonly mappings: readonly YiAskSchemaMappingItem[];
|
|
20
24
|
readonly enabled?: boolean;
|
|
21
25
|
}
|
|
22
|
-
export declare const fromYiAskSchemaMapping: (record: YiAskSchemaMappingRecord) => SchemaMappingDefinition;
|
|
26
|
+
export declare const fromYiAskSchemaMapping: (record: YiAskSchemaMappingRecord, plugins?: readonly SemanticDBPlugin[]) => SchemaMappingDefinition;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { SemanticDBPlugin } from '../plugins/index';
|
|
1
2
|
import { SemanticTypeRegistry } from './registry';
|
|
2
3
|
export { builtinSemanticTypes } from './builtins/index';
|
|
3
4
|
export { SemanticTypeRegistry } from './registry';
|
|
4
5
|
export { resolveSchema } from './resolve-schema';
|
|
5
6
|
export { validateResolvedSchema } from './validate-resolved-schema';
|
|
6
7
|
export { normalizePrimalQuery } from './primal-types/index';
|
|
7
|
-
export type { ComparableCategoryDefinition, PropertyHierarchyDefinition, PropertySqlDefinition, PrimalType, ResolvedSemanticProperty, ResolvedSemanticSchema, LegacySemanticSchemaMetadata, ResolvedSemanticSchemaMetadata, SemanticSchemaMetadata, SemanticTypeNormalizeContext, SemanticPeriodEvaluationContext, SemanticTypeResultContext, SemanticTypeResultProperty, SemanticPropertyDraft, SemanticSchemaDraft, SemanticTypeDefinition, TimeGranularity,
|
|
8
|
-
export
|
|
9
|
-
|
|
8
|
+
export type { ComparableCategoryDefinition, PropertyHierarchyDefinition, PropertySqlDefinition, PrimalType, ResolvedSemanticProperty, ResolvedSemanticSchema, LegacySemanticSchemaMetadata, ResolvedSemanticSchemaMetadata, SemanticSchemaMetadata, SemanticTypeNormalizeContext, SemanticPeriodEvaluationContext, SemanticTypeResultContext, SemanticTypeResultProperty, SemanticPropertyDraft, SemanticSchemaDraft, SemanticTypeDefinition, TimeGranularity, TimeWatermarkPolicy, } from './types';
|
|
9
|
+
export declare const createSemanticTypeRegistry: (plugins?: readonly SemanticDBPlugin[]) => SemanticTypeRegistry;
|
|
10
|
+
/** Copies a caller-owned Registry and appends plugin types without mutating the input. */
|
|
11
|
+
export declare const addPluginSemanticTypes: (registry: SemanticTypeRegistry, plugins: readonly SemanticDBPlugin[]) => SemanticTypeRegistry;
|
|
@@ -5,6 +5,8 @@ export declare class SemanticTypeRegistry {
|
|
|
5
5
|
constructor(definitions?: readonly SemanticTypeDefinition[]);
|
|
6
6
|
register(definition: SemanticTypeDefinition): this;
|
|
7
7
|
get(name: string): SemanticTypeDefinition;
|
|
8
|
+
has(name: string): boolean;
|
|
9
|
+
definitions(): readonly SemanticTypeDefinition[];
|
|
8
10
|
requiresPerPeriodEvaluation(context: {
|
|
9
11
|
readonly logicform: LogicformType;
|
|
10
12
|
readonly pred: PredItemType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SemanticDBPlugin } from '../plugins/index';
|
|
2
2
|
import type { SemanticTypeRegistry } from './registry';
|
|
3
3
|
import type { ResolvedSemanticSchema, SemanticSchemaDraft } from './types';
|
|
4
|
-
export declare const resolveSchema: (
|
|
4
|
+
export declare const resolveSchema: (inputSchema: SemanticSchemaDraft, registry: SemanticTypeRegistry, externalPlugins?: readonly SemanticDBPlugin[]) => ResolvedSemanticSchema;
|
|
@@ -3,7 +3,6 @@ import type { LogicformType, PredItemType } from '../logicform-types';
|
|
|
3
3
|
/** Canonical primitive types use `entity`; `object` remains a legacy input alias. */
|
|
4
4
|
export type PrimalType = 'string' | 'number' | 'boolean' | 'date' | 'entity' | 'object';
|
|
5
5
|
export type TimeGranularity = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
6
|
-
export type TemporalSemantics = 'normal' | 'snapshot';
|
|
7
6
|
export type TimeWatermarkPolicy = {
|
|
8
7
|
readonly type: 'database_latest';
|
|
9
8
|
} | {
|
|
@@ -37,15 +36,10 @@ export interface SemanticPropertyDraft extends Omit<PropertyTypeDraft, '_id' | '
|
|
|
37
36
|
readonly primal_type?: PrimalType;
|
|
38
37
|
readonly isArray?: boolean;
|
|
39
38
|
readonly granularity?: TimeGranularity;
|
|
40
|
-
/** Default hierarchy level when this Property references a hierarchy Entity. */
|
|
41
|
-
readonly level?: string;
|
|
42
39
|
/** Derived during schema resolution from whether the property has udf.sql. */
|
|
43
40
|
readonly is_dynamic?: boolean;
|
|
44
41
|
readonly udf?: PropertySqlDefinition;
|
|
45
42
|
readonly comparable?: ComparableCategoryDefinition;
|
|
46
|
-
readonly timeWatermark?: TimeWatermarkPolicy;
|
|
47
|
-
/** Same-Schema drill relationship. `up` identifies the single-valued parent Property. */
|
|
48
|
-
readonly hierarchy?: PropertyHierarchyDefinition;
|
|
49
43
|
}
|
|
50
44
|
export interface ResolvedSemanticProperty extends Omit<SemanticPropertyDraft, 'id' | 'primal_type' | 'isArray' | 'is_dynamic'> {
|
|
51
45
|
readonly id: string;
|
|
@@ -57,19 +51,11 @@ export interface SemanticSchemaDraft extends Omit<SchemaTypeDraft, '_id' | 'id'
|
|
|
57
51
|
readonly [key: string]: unknown;
|
|
58
52
|
readonly id: string;
|
|
59
53
|
readonly properties: readonly SemanticPropertyDraft[];
|
|
60
|
-
readonly temporalSemantics?: TemporalSemantics;
|
|
61
|
-
readonly timeWatermark?: TimeWatermarkPolicy;
|
|
62
|
-
/** Property that stores the parent node id for recursive tree queries. */
|
|
63
|
-
readonly parentProperty?: string;
|
|
64
54
|
}
|
|
65
55
|
export interface ResolvedSemanticSchema extends Omit<SchemaTypeDraft, '_id' | 'id' | 'sid' | 'properties' | 'db' | 'from' | 'fromSQL' | 'projections' | keyof SemanticSchemaMetadata | keyof LegacySemanticSchemaMetadata>, ResolvedSemanticSchemaMetadata {
|
|
66
56
|
readonly [key: string]: unknown;
|
|
67
57
|
readonly id: string;
|
|
68
58
|
readonly properties: readonly ResolvedSemanticProperty[];
|
|
69
|
-
readonly temporalSemantics?: TemporalSemantics;
|
|
70
|
-
readonly timeWatermark?: TimeWatermarkPolicy;
|
|
71
|
-
/** Canonical logical name of the parent Property used by recursive tree queries. */
|
|
72
|
-
readonly parentProperty?: string;
|
|
73
59
|
}
|
|
74
60
|
export interface SemanticTypeNormalizeContext {
|
|
75
61
|
readonly schema: ResolvedSemanticSchema;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type { ResolvedSemanticProperty
|
|
1
|
+
import type { ResolvedSemanticProperty } from './types';
|
|
2
2
|
/** Validates invariants that require the complete set of resolved Properties. */
|
|
3
|
-
export declare const validateResolvedSchema: (properties: readonly ResolvedSemanticProperty[]
|
|
4
|
-
readonly temporalSemantics?: TemporalSemantics;
|
|
5
|
-
readonly schemaId?: string;
|
|
6
|
-
}) => void;
|
|
3
|
+
export declare const validateResolvedSchema: (properties: readonly ResolvedSemanticProperty[]) => void;
|