@syntropix/database 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/dataClient.js +3 -0
- package/dist/core/syntropix.d.ts +1 -1
- package/dist/core/syntropix.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types/basemodel.d.ts +4 -3
- package/dist/types/basemodel.js +36 -35
- package/dist/types/common.d.ts +32 -28
- package/dist/types/common.js +11 -12
- package/dist/types/data-type.d.ts +48 -38
- package/dist/types/data-type.js +17 -18
- package/dist/types/dto/table.d.ts +6 -6
- package/dist/types/field.d.ts +60 -41
- package/dist/types/field.js +35 -32
- package/dist/types/filter.d.ts +43 -44
- package/dist/types/filter.js +56 -41
- package/dist/types/requests.d.ts +25 -14
- package/dist/types/requests.js +6 -1
- package/package.json +5 -2
- package/.editorconfig +0 -8
- package/.env +0 -2
- package/.gitattributes +0 -4
- package/.husky/pre-commit +0 -1
- package/.prettierrc +0 -8
- package/.vscode/settings.json +0 -1
- package/.yarnrc.yml +0 -1
- package/eslint.config.mjs +0 -23
- package/examples/advanced-usage.ts +0 -214
- package/examples/tsconfig.json +0 -13
- package/examples/usage.ts +0 -94
- package/jest.config.ts +0 -9
- package/src/core/client.ts +0 -41
- package/src/core/config.ts +0 -29
- package/src/core/dataClient.ts +0 -78
- package/src/core/syntropix.ts +0 -27
- package/src/core/tableClient.ts +0 -86
- package/src/index.ts +0 -10
- package/src/types/basemodel.ts +0 -558
- package/src/types/common.ts +0 -83
- package/src/types/data-type.ts +0 -23
- package/src/types/dto/base.ts +0 -4
- package/src/types/dto/table.ts +0 -21
- package/src/types/field.ts +0 -277
- package/src/types/filter.ts +0 -281
- package/src/types/requests.ts +0 -91
- package/test.json +0 -48
- package/tests/basic.test.ts +0 -141
- package/tests/tsconfig.json +0 -8
- package/tsconfig.json +0 -18
package/dist/types/field.d.ts
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { Column, ForeignKeyAction } from './common';
|
|
2
2
|
import { ColumnType } from './data-type';
|
|
3
|
+
import { SyntropixDBAccessType } from './requests';
|
|
3
4
|
export declare abstract class Field {
|
|
4
5
|
name: string;
|
|
5
6
|
description: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
columnType: ColumnType;
|
|
8
|
+
isPrimaryKey: boolean;
|
|
9
|
+
isNullable: boolean;
|
|
10
|
+
autoIncrement: boolean;
|
|
10
11
|
default?: any;
|
|
12
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
11
13
|
constructor(column_type: ColumnType, options?: {
|
|
12
14
|
name?: string;
|
|
13
15
|
description?: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
isPrimaryKey?: boolean;
|
|
17
|
+
isNullable?: boolean;
|
|
18
|
+
autoIncrement?: boolean;
|
|
17
19
|
default?: any;
|
|
20
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
18
21
|
});
|
|
19
22
|
into(): Column;
|
|
20
23
|
}
|
|
@@ -23,133 +26,149 @@ export declare class ForeignKeyField extends Field {
|
|
|
23
26
|
columnName: string;
|
|
24
27
|
onDelete: ForeignKeyAction;
|
|
25
28
|
onUpdate: ForeignKeyAction;
|
|
26
|
-
constructor(
|
|
29
|
+
constructor(columnType: ColumnType, tableName: string, columnName: string, options?: {
|
|
27
30
|
onDelete?: ForeignKeyAction;
|
|
28
31
|
onUpdate?: ForeignKeyAction;
|
|
29
32
|
description?: string;
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
isPrimaryKey?: boolean;
|
|
34
|
+
isNullable?: boolean;
|
|
32
35
|
default?: any;
|
|
36
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
33
37
|
});
|
|
34
38
|
}
|
|
35
39
|
export declare class StringField extends Field {
|
|
36
40
|
constructor(maxLength: number, options?: {
|
|
37
41
|
description?: string;
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
isPrimaryKey?: boolean;
|
|
43
|
+
isNullable?: boolean;
|
|
40
44
|
default?: string;
|
|
45
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
41
46
|
});
|
|
42
47
|
}
|
|
43
48
|
export declare class TextField extends Field {
|
|
44
49
|
constructor(options?: {
|
|
45
50
|
description?: string;
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
isPrimaryKey?: boolean;
|
|
52
|
+
isNullable?: boolean;
|
|
48
53
|
default?: string;
|
|
54
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
49
55
|
});
|
|
50
56
|
}
|
|
51
57
|
export declare class IntegerField extends Field {
|
|
52
58
|
constructor(options?: {
|
|
53
59
|
description?: string;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
isPrimaryKey?: boolean;
|
|
61
|
+
isNullable?: boolean;
|
|
62
|
+
autoIncrement?: boolean;
|
|
57
63
|
default?: number;
|
|
64
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
58
65
|
});
|
|
59
66
|
}
|
|
60
67
|
export declare class BooleanField extends Field {
|
|
61
68
|
constructor(options?: {
|
|
62
69
|
description?: string;
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
isPrimaryKey?: boolean;
|
|
71
|
+
isNullable?: boolean;
|
|
65
72
|
default?: boolean;
|
|
73
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
66
74
|
});
|
|
67
75
|
}
|
|
68
76
|
export declare class DateTimeField extends Field {
|
|
69
77
|
constructor(options?: {
|
|
70
78
|
description?: string;
|
|
71
|
-
|
|
72
|
-
|
|
79
|
+
isPrimaryKey?: boolean;
|
|
80
|
+
isNullable?: boolean;
|
|
73
81
|
default?: Date;
|
|
82
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
74
83
|
});
|
|
75
84
|
}
|
|
76
85
|
export declare class TimestampField extends Field {
|
|
77
86
|
constructor(options?: {
|
|
78
87
|
description?: string;
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
isPrimaryKey?: boolean;
|
|
89
|
+
isNullable?: boolean;
|
|
81
90
|
default?: Date;
|
|
91
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
82
92
|
});
|
|
83
93
|
}
|
|
84
94
|
export declare class DateField extends Field {
|
|
85
95
|
constructor(options?: {
|
|
86
96
|
description?: string;
|
|
87
|
-
|
|
88
|
-
|
|
97
|
+
isPrimaryKey?: boolean;
|
|
98
|
+
isNullable?: boolean;
|
|
89
99
|
default?: Date;
|
|
100
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
90
101
|
});
|
|
91
102
|
}
|
|
92
103
|
export declare class JsonField extends Field {
|
|
93
104
|
constructor(options?: {
|
|
94
105
|
description?: string;
|
|
95
|
-
|
|
96
|
-
|
|
106
|
+
isPrimaryKey?: boolean;
|
|
107
|
+
isNullable?: boolean;
|
|
97
108
|
default?: Record<string, any>;
|
|
109
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
98
110
|
});
|
|
99
111
|
}
|
|
100
112
|
export declare class UuidField extends Field {
|
|
101
113
|
constructor(options?: {
|
|
102
114
|
description?: string;
|
|
103
|
-
|
|
104
|
-
|
|
115
|
+
isPrimaryKey?: boolean;
|
|
116
|
+
isNullable?: boolean;
|
|
105
117
|
default?: string;
|
|
118
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
106
119
|
});
|
|
107
120
|
}
|
|
108
121
|
export declare class VectorField extends Field {
|
|
109
122
|
constructor(dimensions: number, options?: {
|
|
110
123
|
description?: string;
|
|
111
|
-
|
|
112
|
-
|
|
124
|
+
isPrimaryKey?: boolean;
|
|
125
|
+
isNullable?: boolean;
|
|
113
126
|
default?: number[];
|
|
127
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
114
128
|
});
|
|
115
129
|
}
|
|
116
130
|
export declare class ArrayField extends Field {
|
|
117
131
|
constructor(dataType: ColumnType, options?: {
|
|
118
132
|
description?: string;
|
|
119
|
-
|
|
120
|
-
|
|
133
|
+
isPrimaryKey?: boolean;
|
|
134
|
+
isNullable?: boolean;
|
|
121
135
|
default?: any[];
|
|
136
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
122
137
|
});
|
|
123
138
|
}
|
|
124
139
|
export declare class EnumField extends Field {
|
|
125
140
|
constructor(name: string, variants: string[], options?: {
|
|
126
141
|
description?: string;
|
|
127
|
-
|
|
128
|
-
|
|
142
|
+
isPrimaryKey?: boolean;
|
|
143
|
+
isNullable?: boolean;
|
|
129
144
|
default?: string;
|
|
145
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
130
146
|
});
|
|
131
147
|
}
|
|
132
148
|
export declare class MoneyField extends Field {
|
|
133
149
|
constructor(precision: number, scale: number, options?: {
|
|
134
150
|
description?: string;
|
|
135
|
-
|
|
136
|
-
|
|
151
|
+
isPrimaryKey?: boolean;
|
|
152
|
+
isNullable?: boolean;
|
|
137
153
|
default?: number;
|
|
154
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
138
155
|
});
|
|
139
156
|
}
|
|
140
157
|
export declare class DecimalField extends Field {
|
|
141
158
|
constructor(precision: number, scale: number, options?: {
|
|
142
159
|
description?: string;
|
|
143
|
-
|
|
144
|
-
|
|
160
|
+
isPrimaryKey?: boolean;
|
|
161
|
+
isNullable?: boolean;
|
|
145
162
|
default?: number;
|
|
163
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
146
164
|
});
|
|
147
165
|
}
|
|
148
166
|
export declare class DoubleField extends Field {
|
|
149
167
|
constructor(options?: {
|
|
150
168
|
description?: string;
|
|
151
|
-
|
|
152
|
-
|
|
169
|
+
isPrimaryKey?: boolean;
|
|
170
|
+
isNullable?: boolean;
|
|
153
171
|
default?: number;
|
|
172
|
+
defaultAccess?: SyntropixDBAccessType;
|
|
154
173
|
});
|
|
155
174
|
}
|
package/dist/types/field.js
CHANGED
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
// Field definitions for ORM
|
|
2
2
|
import { ForeignKeyAction } from './common';
|
|
3
|
-
import {
|
|
3
|
+
import { ColumnType } from './data-type';
|
|
4
4
|
export class Field {
|
|
5
5
|
name = '';
|
|
6
6
|
description = '';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
columnType;
|
|
8
|
+
isPrimaryKey = false;
|
|
9
|
+
isNullable = false;
|
|
10
|
+
autoIncrement = false;
|
|
11
11
|
default;
|
|
12
|
+
defaultAccess;
|
|
12
13
|
constructor(column_type, options = {}) {
|
|
13
|
-
this.
|
|
14
|
+
this.columnType = column_type;
|
|
14
15
|
this.name = options.name?.toLowerCase() || '';
|
|
15
16
|
this.description = options.description || '';
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
17
|
+
this.isPrimaryKey = options.isPrimaryKey || false;
|
|
18
|
+
this.isNullable = options.isNullable || false;
|
|
19
|
+
this.autoIncrement = options.autoIncrement || false;
|
|
19
20
|
this.default = options.default;
|
|
21
|
+
this.defaultAccess = options.defaultAccess;
|
|
20
22
|
}
|
|
21
23
|
into() {
|
|
22
24
|
return {
|
|
23
25
|
name: this.name,
|
|
24
|
-
|
|
26
|
+
columnType: this.columnType,
|
|
25
27
|
description: this.description,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
isPrimaryKey: this.isPrimaryKey,
|
|
29
|
+
isNullable: this.isNullable,
|
|
30
|
+
autoIncrement: this.autoIncrement,
|
|
29
31
|
default: this.default,
|
|
32
|
+
defaultAccess: this.defaultAccess,
|
|
30
33
|
};
|
|
31
34
|
}
|
|
32
35
|
}
|
|
@@ -35,86 +38,86 @@ export class ForeignKeyField extends Field {
|
|
|
35
38
|
columnName;
|
|
36
39
|
onDelete;
|
|
37
40
|
onUpdate;
|
|
38
|
-
constructor(
|
|
39
|
-
super(
|
|
41
|
+
constructor(columnType, tableName, columnName, options = {}) {
|
|
42
|
+
super(columnType, options);
|
|
40
43
|
this.tableName = tableName;
|
|
41
44
|
this.columnName = columnName;
|
|
42
|
-
this.onDelete = options.onDelete || ForeignKeyAction.
|
|
43
|
-
this.onUpdate = options.onUpdate || ForeignKeyAction.
|
|
45
|
+
this.onDelete = options.onDelete || ForeignKeyAction.Cascade;
|
|
46
|
+
this.onUpdate = options.onUpdate || ForeignKeyAction.Cascade;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
export class StringField extends Field {
|
|
47
50
|
constructor(maxLength, options = {}) {
|
|
48
|
-
super(
|
|
51
|
+
super(ColumnType.String(maxLength), options);
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
export class TextField extends Field {
|
|
52
55
|
constructor(options = {}) {
|
|
53
|
-
super(
|
|
56
|
+
super(ColumnType.Text, options);
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
59
|
export class IntegerField extends Field {
|
|
57
60
|
constructor(options = {}) {
|
|
58
|
-
super(
|
|
61
|
+
super(ColumnType.Integer, options);
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
64
|
export class BooleanField extends Field {
|
|
62
65
|
constructor(options = {}) {
|
|
63
|
-
super(
|
|
66
|
+
super(ColumnType.Boolean, options);
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
export class DateTimeField extends Field {
|
|
67
70
|
constructor(options = {}) {
|
|
68
|
-
super(
|
|
71
|
+
super(ColumnType.DateTime, options);
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
74
|
export class TimestampField extends Field {
|
|
72
75
|
constructor(options = {}) {
|
|
73
|
-
super(
|
|
76
|
+
super(ColumnType.Timestamp, options);
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
79
|
export class DateField extends Field {
|
|
77
80
|
constructor(options = {}) {
|
|
78
|
-
super(
|
|
81
|
+
super(ColumnType.Date, options);
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
export class JsonField extends Field {
|
|
82
85
|
constructor(options = {}) {
|
|
83
|
-
super(
|
|
86
|
+
super(ColumnType.Json, options);
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
89
|
export class UuidField extends Field {
|
|
87
90
|
constructor(options = {}) {
|
|
88
|
-
super(
|
|
91
|
+
super(ColumnType.Uuid, options);
|
|
89
92
|
}
|
|
90
93
|
}
|
|
91
94
|
export class VectorField extends Field {
|
|
92
95
|
constructor(dimensions, options = {}) {
|
|
93
|
-
super(
|
|
96
|
+
super(ColumnType.Vector(dimensions), options);
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
99
|
export class ArrayField extends Field {
|
|
97
100
|
constructor(dataType, options = {}) {
|
|
98
|
-
super(
|
|
101
|
+
super(ColumnType.Array(dataType), options);
|
|
99
102
|
}
|
|
100
103
|
}
|
|
101
104
|
export class EnumField extends Field {
|
|
102
105
|
constructor(name, variants, options = {}) {
|
|
103
|
-
super(
|
|
106
|
+
super(ColumnType.Enum(name, variants), options);
|
|
104
107
|
}
|
|
105
108
|
}
|
|
106
109
|
export class MoneyField extends Field {
|
|
107
110
|
constructor(precision, scale, options = {}) {
|
|
108
|
-
super(
|
|
111
|
+
super(ColumnType.Money(precision, scale), options);
|
|
109
112
|
}
|
|
110
113
|
}
|
|
111
114
|
export class DecimalField extends Field {
|
|
112
115
|
constructor(precision, scale, options = {}) {
|
|
113
|
-
super(
|
|
116
|
+
super(ColumnType.Decimal(precision, scale), options);
|
|
114
117
|
}
|
|
115
118
|
}
|
|
116
119
|
export class DoubleField extends Field {
|
|
117
120
|
constructor(options = {}) {
|
|
118
|
-
super(
|
|
121
|
+
super(ColumnType.Double, options);
|
|
119
122
|
}
|
|
120
123
|
}
|
package/dist/types/filter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare enum SortType {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
Descending = "Descending",
|
|
3
|
+
Ascending = "Ascending"
|
|
4
4
|
}
|
|
5
5
|
export interface SimilarityOptions {
|
|
6
6
|
threshold: number;
|
|
@@ -35,49 +35,48 @@ export declare enum FilterOperation {
|
|
|
35
35
|
NegativeInnerProduct = "NegativeInnerProduct",
|
|
36
36
|
CosineDistance = "CosineDistance"
|
|
37
37
|
}
|
|
38
|
-
export interface
|
|
38
|
+
export interface FilterItem {
|
|
39
39
|
column: string;
|
|
40
40
|
operator: FilterOperation;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
staticValue?: any;
|
|
42
|
+
columnValue?: string;
|
|
43
|
+
simiarityOptions?: SimilarityOptions;
|
|
44
44
|
}
|
|
45
|
-
export type
|
|
46
|
-
export type
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export declare const
|
|
50
|
-
export declare const
|
|
51
|
-
export declare const
|
|
52
|
-
export declare const
|
|
53
|
-
export declare const
|
|
54
|
-
export declare const
|
|
55
|
-
export declare const
|
|
56
|
-
export declare const
|
|
57
|
-
export declare const
|
|
58
|
-
export declare const
|
|
59
|
-
export declare const
|
|
60
|
-
export declare const
|
|
61
|
-
export declare const
|
|
62
|
-
export declare const
|
|
63
|
-
export declare const
|
|
64
|
-
export declare const
|
|
65
|
-
export declare const
|
|
66
|
-
export declare const
|
|
67
|
-
export declare const
|
|
68
|
-
export declare const
|
|
69
|
-
export declare const
|
|
70
|
-
export declare const
|
|
71
|
-
export declare const
|
|
72
|
-
export declare const
|
|
73
|
-
export declare const
|
|
74
|
-
export declare const
|
|
75
|
-
export declare const
|
|
76
|
-
export declare const
|
|
77
|
-
export declare const
|
|
78
|
-
export declare const
|
|
79
|
-
export declare const
|
|
80
|
-
export declare const
|
|
81
|
-
export declare const NEGATIVE_INNER_PRODUCT: (field: string, value: any, options: SimilarityOptions) => SyntropixDBFilterItem;
|
|
82
|
-
export declare const COSINE_DISTANCE: (field: string, value: any, options: SimilarityOptions) => SyntropixDBFilterItem;
|
|
45
|
+
export type FilterGroup = FilterItem[];
|
|
46
|
+
export type Filter = FilterGroup[];
|
|
47
|
+
export declare const AND: (...conditions: FilterItem[]) => FilterGroup;
|
|
48
|
+
export declare const OR: (...conditions: FilterGroup[]) => Filter;
|
|
49
|
+
export declare const EQ: (field: string, value: any) => FilterItem;
|
|
50
|
+
export declare const NE: (field: string, value: any) => FilterItem;
|
|
51
|
+
export declare const GT: (field: string, value: any) => FilterItem;
|
|
52
|
+
export declare const GTE: (field: string, value: any) => FilterItem;
|
|
53
|
+
export declare const LT: (field: string, value: any) => FilterItem;
|
|
54
|
+
export declare const LTE: (field: string, value: any) => FilterItem;
|
|
55
|
+
export declare const IN: (field: string, values: any[]) => FilterItem;
|
|
56
|
+
export declare const CONTAINS: (field: string, value: any) => FilterItem;
|
|
57
|
+
export declare const OVERLAP: (field: string, value: any) => FilterItem;
|
|
58
|
+
export declare const I_LIKE: (field: string, pattern: string) => FilterItem;
|
|
59
|
+
export declare const NOT_I_LIKE: (field: string, pattern: string) => FilterItem;
|
|
60
|
+
export declare const NOT_IN: (field: string, values: any[]) => FilterItem;
|
|
61
|
+
export declare const LIKE: (field: string, pattern: string) => FilterItem;
|
|
62
|
+
export declare const NOT_LIKE: (field: string, pattern: string) => FilterItem;
|
|
63
|
+
export declare const IS_NULL: (field: string) => FilterItem;
|
|
64
|
+
export declare const IS_NOT_NULL: (field: string) => FilterItem;
|
|
65
|
+
export declare const BETWEEN: (field: string, min: any, max: any) => FilterItem;
|
|
66
|
+
export declare const EQ_COL: (field: string, otherField: string) => FilterItem;
|
|
67
|
+
export declare const NE_COL: (field: string, otherField: string) => FilterItem;
|
|
68
|
+
export declare const GT_COL: (field: string, otherField: string) => FilterItem;
|
|
69
|
+
export declare const GTE_COL: (field: string, otherField: string) => FilterItem;
|
|
70
|
+
export declare const LT_COL: (field: string, otherField: string) => FilterItem;
|
|
71
|
+
export declare const LTE_COL: (field: string, otherField: string) => FilterItem;
|
|
72
|
+
export declare const SIMILARITY: (field: string, value: any, options: SimilarityOptions) => FilterItem;
|
|
73
|
+
export declare const SIMILARITY_DISTANCE: (field: string, value: any, options: SimilarityOptions) => FilterItem;
|
|
74
|
+
export declare const WORD_SIMILARITY: (field: string, value: any, options: SimilarityOptions) => FilterItem;
|
|
75
|
+
export declare const WORD_SIMILARITY_DISTANCE: (field: string, value: any, options: SimilarityOptions) => FilterItem;
|
|
76
|
+
export declare const STRICT_WORD_SIMILARITY: (field: string, value: any, options: SimilarityOptions) => FilterItem;
|
|
77
|
+
export declare const STRICT_WORD_SIMILARITY_DISTANCE: (field: string, value: any, options: SimilarityOptions) => FilterItem;
|
|
78
|
+
export declare const EUCLIDEAN_DISTANCE: (field: string, value: any, options: SimilarityOptions) => FilterItem;
|
|
79
|
+
export declare const NEGATIVE_INNER_PRODUCT: (field: string, value: any, options: SimilarityOptions) => FilterItem;
|
|
80
|
+
export declare const COSINE_DISTANCE: (field: string, value: any, options: SimilarityOptions) => FilterItem;
|
|
83
81
|
export declare const Value: (value: any) => any;
|
|
82
|
+
export declare function FilterWrapper(filter: Filter | FilterGroup | FilterItem | undefined): Filter | undefined;
|