semanticdb-core 1.0.25 → 1.0.26
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.
|
@@ -11,7 +11,7 @@ export declare type FormatterType = {
|
|
|
11
11
|
export declare type PropertyTypeType = 'ID' | 'timestamp' | 'name' | 'humanName' | 'category' | 'string' | 'tag' | 'image' | 'file' | 'number' | 'int' | 'currency' | 'percentage' | 'duration' | 'order' | 'boolean' | 'date' | 'start_date' | 'end_date' | 'object';
|
|
12
12
|
export declare type PropertyTypePrimalType = 'string' | 'number' | 'boolean' | 'date' | 'object';
|
|
13
13
|
export interface PropertyTypeDraft {
|
|
14
|
-
_sid?: string;
|
|
14
|
+
_sid?: string | number;
|
|
15
15
|
_id?: string;
|
|
16
16
|
name: string;
|
|
17
17
|
syno?: string[];
|
|
@@ -19,7 +19,7 @@ export interface PropertyTypeDraft {
|
|
|
19
19
|
constraints?: {
|
|
20
20
|
required?: boolean;
|
|
21
21
|
unique?: boolean;
|
|
22
|
-
enum?:
|
|
22
|
+
enum?: any[] | null;
|
|
23
23
|
};
|
|
24
24
|
type: PropertyTypeType;
|
|
25
25
|
primal_type?: PropertyTypePrimalType;
|
|
@@ -27,7 +27,7 @@ export interface PropertyTypeDraft {
|
|
|
27
27
|
udf?: {
|
|
28
28
|
sql?: string;
|
|
29
29
|
dependencies: string[];
|
|
30
|
-
function
|
|
30
|
+
function?: (self: any) => any;
|
|
31
31
|
};
|
|
32
32
|
is_dynamic?: boolean;
|
|
33
33
|
is_projection_for?: string;
|
|
@@ -37,6 +37,9 @@ export interface PropertyTypeDraft {
|
|
|
37
37
|
schema?: SchemaType;
|
|
38
38
|
granularity?: 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'week' | 'year';
|
|
39
39
|
is_additive?: boolean;
|
|
40
|
+
is_comparable?: boolean;
|
|
41
|
+
is_observation?: boolean;
|
|
42
|
+
is_count?: boolean;
|
|
40
43
|
use_minus_on_mom?: boolean;
|
|
41
44
|
is_supplementary?: boolean;
|
|
42
45
|
stats?: {
|
|
@@ -44,7 +47,7 @@ export interface PropertyTypeDraft {
|
|
|
44
47
|
max?: number;
|
|
45
48
|
total?: number;
|
|
46
49
|
avg?: number;
|
|
47
|
-
distincts?:
|
|
50
|
+
distincts?: any[];
|
|
48
51
|
};
|
|
49
52
|
ui?: {
|
|
50
53
|
name?: boolean;
|
package/dist/schema/schema.d.ts
CHANGED
|
@@ -11,8 +11,10 @@ export interface SchemaTypeDraft {
|
|
|
11
11
|
name: string;
|
|
12
12
|
type: 'entity' | 'event';
|
|
13
13
|
syno?: string[];
|
|
14
|
+
db?: string;
|
|
14
15
|
properties: PropertyTypeDraft[];
|
|
15
16
|
tag?: string[];
|
|
17
|
+
alisa_rank?: number;
|
|
16
18
|
hierarchy?: [HierarchyType, ...HierarchyType[]];
|
|
17
19
|
analyzer?: {
|
|
18
20
|
drilldown?: string | GroupbyItemType[];
|
|
@@ -20,6 +22,7 @@ export interface SchemaTypeDraft {
|
|
|
20
22
|
};
|
|
21
23
|
drilldown?: GroupbyItemType[];
|
|
22
24
|
projections?: string[];
|
|
25
|
+
etl?: any;
|
|
23
26
|
}
|
|
24
27
|
export interface SchemaType extends SchemaTypeDraft {
|
|
25
28
|
properties: PropertyType[];
|
|
@@ -80,7 +80,7 @@ const findPropertyForOtherSchema = (propertyName, fromSchemaID, toSchemaID, sche
|
|
|
80
80
|
catch (error) { }
|
|
81
81
|
// 如果已经找到了,那么直接返回吧
|
|
82
82
|
if (property)
|
|
83
|
-
return property;
|
|
83
|
+
return Object.assign(Object.assign({}, property), { name: propertyName });
|
|
84
84
|
property = (0, exports.findPropertyByName)(fromSchemaID, propertyName, schemasDict);
|
|
85
85
|
if (!property)
|
|
86
86
|
throw new Error(`[schema.utils.findPropertyForOtherSchema]Property with name ${propertyName} not found in ${fromSchemaID}`);
|