@blitznocode/blitz-orm 0.0.41 → 0.0.43
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/LICENSE +661 -661
- package/dist/index.d.ts +243 -243
- package/dist/index.js +22 -75
- package/package.json +4 -5
- package/readme.md +50 -44
package/dist/index.d.ts
CHANGED
|
@@ -1,250 +1,250 @@
|
|
|
1
1
|
import { TypeDBClient, TypeDBSession } from 'typedb-client';
|
|
2
2
|
|
|
3
|
-
type BormConfig = {
|
|
4
|
-
server: {
|
|
5
|
-
provider: 'blitz-orm-js';
|
|
6
|
-
};
|
|
7
|
-
query?: {
|
|
8
|
-
noMetadata?: boolean;
|
|
9
|
-
simplifiedLinks?: boolean;
|
|
10
|
-
};
|
|
11
|
-
mutation?: {
|
|
12
|
-
noMetadata?: boolean;
|
|
13
|
-
};
|
|
14
|
-
dbConnectors: [ProviderObject, ...ProviderObject[]];
|
|
15
|
-
};
|
|
16
|
-
type ProviderObject = {
|
|
17
|
-
id: string;
|
|
18
|
-
provider: 'typeDB';
|
|
19
|
-
dbName: string;
|
|
20
|
-
url: string;
|
|
21
|
-
};
|
|
22
|
-
type DBConnector = {
|
|
23
|
-
id: string;
|
|
24
|
-
subs?: string;
|
|
25
|
-
path?: string;
|
|
26
|
-
as?: string;
|
|
27
|
-
};
|
|
28
|
-
type TypeDBHandles = Map<string, {
|
|
29
|
-
client: TypeDBClient;
|
|
30
|
-
session: TypeDBSession;
|
|
31
|
-
}>;
|
|
32
|
-
type DBHandles = {
|
|
33
|
-
typeDB: TypeDBHandles;
|
|
34
|
-
};
|
|
35
|
-
type BormSchema = {
|
|
36
|
-
entities: {
|
|
37
|
-
[s: string]: BormEntity;
|
|
38
|
-
};
|
|
39
|
-
relations: {
|
|
40
|
-
[s: string]: BormRelation;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
type EnrichedBormSchema = {
|
|
44
|
-
entities: {
|
|
45
|
-
[s: string]: EnrichedBormEntity;
|
|
46
|
-
};
|
|
47
|
-
relations: {
|
|
48
|
-
[s: string]: EnrichedBormRelation;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
type BormEntity = {
|
|
52
|
-
extends: string;
|
|
53
|
-
idFields?: string[];
|
|
54
|
-
defaultDBConnector: DBConnector;
|
|
55
|
-
dataFields?: DataField[];
|
|
56
|
-
linkFields?: LinkField[];
|
|
57
|
-
} | {
|
|
58
|
-
extends?: string;
|
|
59
|
-
idFields: string[];
|
|
60
|
-
defaultDBConnector: DBConnector;
|
|
61
|
-
dataFields?: DataField[];
|
|
62
|
-
linkFields?: LinkField[];
|
|
63
|
-
};
|
|
64
|
-
type BormRelation = BormEntity & {
|
|
65
|
-
roles?: {
|
|
66
|
-
[key: string]: RoleField;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
type EnrichedBormEntity = Omit<BormEntity, 'linkFields' | 'idFields'> & {
|
|
70
|
-
extends?: string;
|
|
71
|
-
idFields: string[];
|
|
72
|
-
thingType: 'entity';
|
|
73
|
-
name: string;
|
|
74
|
-
computedFields: string[];
|
|
75
|
-
linkFields?: EnrichedLinkField[];
|
|
76
|
-
};
|
|
77
|
-
type EnrichedBormRelation = Omit<BormRelation, 'linkFields'> & {
|
|
78
|
-
thingType: 'relation';
|
|
79
|
-
name: string;
|
|
80
|
-
computedFields: string[];
|
|
81
|
-
linkFields?: EnrichedLinkField[];
|
|
82
|
-
roles: {
|
|
83
|
-
[key: string]: EnrichedRoleField;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
type LinkField = BormField & {
|
|
87
|
-
relation: string;
|
|
88
|
-
plays: string;
|
|
89
|
-
} & ({
|
|
90
|
-
target: 'role';
|
|
91
|
-
filter?: Filter | Filter[];
|
|
92
|
-
} | {
|
|
93
|
-
target: 'relation';
|
|
94
|
-
});
|
|
95
|
-
type LinkedFieldWithThing = LinkField & {
|
|
96
|
-
thing: string;
|
|
97
|
-
thingType: ThingType;
|
|
98
|
-
};
|
|
99
|
-
type RequireAtLeastOne<T> = {
|
|
100
|
-
[K in keyof T]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<keyof T, K>>>;
|
|
101
|
-
}[keyof T];
|
|
102
|
-
type LinkFilter = {
|
|
103
|
-
$thing?: string;
|
|
104
|
-
$thingType?: string;
|
|
105
|
-
$role?: string;
|
|
106
|
-
[key: string]: string | number | Filter | undefined;
|
|
107
|
-
};
|
|
108
|
-
type Filter = DataFilter | LinkFilter | MiddleFilter;
|
|
109
|
-
type MiddleFilter = {
|
|
110
|
-
$and?: Filter[];
|
|
111
|
-
$or?: Filter[];
|
|
112
|
-
};
|
|
113
|
-
type DataFilter = RequireAtLeastOne<{
|
|
114
|
-
$eq?: any;
|
|
115
|
-
$ge?: number | string;
|
|
116
|
-
}>;
|
|
117
|
-
type EnrichedLinkField = BormField & {
|
|
118
|
-
name: string;
|
|
119
|
-
relation: string;
|
|
120
|
-
plays: string;
|
|
121
|
-
} & ({
|
|
122
|
-
target: 'role';
|
|
123
|
-
filter?: Filter | Filter[];
|
|
124
|
-
oppositeLinkFieldsPlayedBy: LinkedFieldWithThing[];
|
|
125
|
-
} | {
|
|
126
|
-
target: 'relation';
|
|
127
|
-
oppositeLinkFieldsPlayedBy: Pick<LinkedFieldWithThing, 'thing' | 'thingType' | 'plays'>[];
|
|
128
|
-
});
|
|
129
|
-
type BormField = {
|
|
130
|
-
path: string;
|
|
131
|
-
cardinality: CardinalityType;
|
|
132
|
-
ordered?: boolean;
|
|
133
|
-
embedded?: boolean;
|
|
134
|
-
rights?: RightType[];
|
|
135
|
-
};
|
|
136
|
-
type RoleField = {
|
|
137
|
-
cardinality: CardinalityType;
|
|
138
|
-
dbConnector?: DBConnector;
|
|
139
|
-
};
|
|
140
|
-
type EnrichedRoleField = RoleField & {
|
|
141
|
-
playedBy?: LinkedFieldWithThing[];
|
|
142
|
-
};
|
|
143
|
-
type DataField = BormField & {
|
|
144
|
-
shared?: boolean;
|
|
145
|
-
default?: any;
|
|
146
|
-
contentType: ContentType;
|
|
147
|
-
validations?: any;
|
|
148
|
-
dbConnectors?: [DBConnector, ...DBConnector[]];
|
|
149
|
-
};
|
|
150
|
-
type ThingType = 'entity' | 'relation' | 'attribute';
|
|
151
|
-
type RightType = 'CREATE' | 'DELETE' | 'UPDATE' | 'LINK' | 'UNLINK';
|
|
152
|
-
type ContentType = 'ID' | 'JSON' | 'COLOR' | 'BOOLEAN' | 'POINT' | 'FILE' | 'EMAIL' | 'PHONE' | 'WEEK_DAY' | 'DURATION' | 'HOUR' | 'TIME' | 'DATE' | 'RATING' | 'CURRENCY' | 'PERCENTAGE' | 'NUMBER_DECIMAL' | 'NUMBER' | 'URL' | 'PASSWORD' | 'LANGUAGE_TEXT' | 'RICH_TEXT' | 'TEXT';
|
|
153
|
-
type CardinalityType = 'ONE' | 'MANY' | 'INTERVAL';
|
|
154
|
-
type RelationClassType = 'SYMMETRICAL' | 'OWNED';
|
|
155
|
-
type RequiredKey<T, K extends keyof T> = T & {
|
|
156
|
-
[P in K]-?: T[P];
|
|
157
|
-
};
|
|
158
|
-
type WithRequired<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>> & RequiredKey<T, K>;
|
|
159
|
-
type BQLMutationBlock = {
|
|
160
|
-
[key: string]: any;
|
|
161
|
-
$id?: string | string[];
|
|
162
|
-
$filter?: Filter | Filter[];
|
|
163
|
-
$tempId?: string;
|
|
164
|
-
$op?: string;
|
|
165
|
-
} & ({
|
|
166
|
-
$entity: string;
|
|
167
|
-
} | {
|
|
168
|
-
$relation: string;
|
|
169
|
-
});
|
|
170
|
-
type FilledBQLMutationBlock = WithRequired<BQLMutationBlock, '$tempId' | '$op'>;
|
|
171
|
-
type BQLFieldObj = {
|
|
172
|
-
$path: string;
|
|
173
|
-
} & Omit<RawBQLQuery, '$entity' | '$relation'>;
|
|
174
|
-
type BQLField = string | BQLFieldObj;
|
|
175
|
-
type RawBQLQuery = {
|
|
176
|
-
$id?: string | string[];
|
|
177
|
-
$filter?: Record<string, any>;
|
|
178
|
-
$fields?: BQLField[];
|
|
179
|
-
} & ({
|
|
180
|
-
$entity: string;
|
|
181
|
-
} | {
|
|
182
|
-
$relation: string;
|
|
183
|
-
});
|
|
184
|
-
type RawBQLMutation = ({
|
|
185
|
-
$entity: string;
|
|
186
|
-
} | {
|
|
187
|
-
$relation: string;
|
|
188
|
-
}) & Record<string, any>;
|
|
189
|
-
type ParsedBQLQuery = Omit<RawBQLQuery, '$entity' | '$relation'> & {
|
|
190
|
-
$localFilters?: Record<string, any>;
|
|
191
|
-
$nestedFilters?: Record<string, any>;
|
|
192
|
-
} & ({
|
|
193
|
-
$entity: EnrichedBormEntity;
|
|
194
|
-
} | {
|
|
195
|
-
$relation: EnrichedBormRelation;
|
|
196
|
-
});
|
|
197
|
-
type ParsedBQLMutation = {
|
|
198
|
-
things: BQLMutationBlock[];
|
|
199
|
-
edges: BQLMutationBlock[];
|
|
200
|
-
};
|
|
201
|
-
type TQLRequest = {
|
|
202
|
-
entity?: string;
|
|
203
|
-
roles?: {
|
|
204
|
-
path: string;
|
|
205
|
-
request: string;
|
|
206
|
-
owner: string;
|
|
207
|
-
}[];
|
|
208
|
-
relations?: {
|
|
209
|
-
relation: string;
|
|
210
|
-
entity: string;
|
|
211
|
-
request: string;
|
|
212
|
-
}[];
|
|
213
|
-
insertionMatches?: string;
|
|
214
|
-
deletionMatches?: string;
|
|
215
|
-
insertions?: string;
|
|
216
|
-
deletions?: string;
|
|
217
|
-
};
|
|
218
|
-
type TQLEntityMutation = {
|
|
219
|
-
entity: string;
|
|
220
|
-
relations?: {
|
|
221
|
-
relation: string;
|
|
222
|
-
entity: string;
|
|
223
|
-
request: string;
|
|
224
|
-
}[];
|
|
225
|
-
};
|
|
226
|
-
type BQLResponseSingle = (({
|
|
227
|
-
$entity: string;
|
|
228
|
-
$id: string;
|
|
229
|
-
} | undefined) & Record<string, any>) | string | null;
|
|
230
|
-
type BQLResponseMulti = BQLResponseSingle[];
|
|
3
|
+
type BormConfig = {
|
|
4
|
+
server: {
|
|
5
|
+
provider: 'blitz-orm-js';
|
|
6
|
+
};
|
|
7
|
+
query?: {
|
|
8
|
+
noMetadata?: boolean;
|
|
9
|
+
simplifiedLinks?: boolean;
|
|
10
|
+
};
|
|
11
|
+
mutation?: {
|
|
12
|
+
noMetadata?: boolean;
|
|
13
|
+
};
|
|
14
|
+
dbConnectors: [ProviderObject, ...ProviderObject[]];
|
|
15
|
+
};
|
|
16
|
+
type ProviderObject = {
|
|
17
|
+
id: string;
|
|
18
|
+
provider: 'typeDB';
|
|
19
|
+
dbName: string;
|
|
20
|
+
url: string;
|
|
21
|
+
};
|
|
22
|
+
type DBConnector = {
|
|
23
|
+
id: string;
|
|
24
|
+
subs?: string;
|
|
25
|
+
path?: string;
|
|
26
|
+
as?: string;
|
|
27
|
+
};
|
|
28
|
+
type TypeDBHandles = Map<string, {
|
|
29
|
+
client: TypeDBClient;
|
|
30
|
+
session: TypeDBSession;
|
|
31
|
+
}>;
|
|
32
|
+
type DBHandles = {
|
|
33
|
+
typeDB: TypeDBHandles;
|
|
34
|
+
};
|
|
35
|
+
type BormSchema = {
|
|
36
|
+
entities: {
|
|
37
|
+
[s: string]: BormEntity;
|
|
38
|
+
};
|
|
39
|
+
relations: {
|
|
40
|
+
[s: string]: BormRelation;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
type EnrichedBormSchema = {
|
|
44
|
+
entities: {
|
|
45
|
+
[s: string]: EnrichedBormEntity;
|
|
46
|
+
};
|
|
47
|
+
relations: {
|
|
48
|
+
[s: string]: EnrichedBormRelation;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
type BormEntity = {
|
|
52
|
+
extends: string;
|
|
53
|
+
idFields?: string[];
|
|
54
|
+
defaultDBConnector: DBConnector;
|
|
55
|
+
dataFields?: DataField[];
|
|
56
|
+
linkFields?: LinkField[];
|
|
57
|
+
} | {
|
|
58
|
+
extends?: string;
|
|
59
|
+
idFields: string[];
|
|
60
|
+
defaultDBConnector: DBConnector;
|
|
61
|
+
dataFields?: DataField[];
|
|
62
|
+
linkFields?: LinkField[];
|
|
63
|
+
};
|
|
64
|
+
type BormRelation = BormEntity & {
|
|
65
|
+
roles?: {
|
|
66
|
+
[key: string]: RoleField;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
type EnrichedBormEntity = Omit<BormEntity, 'linkFields' | 'idFields'> & {
|
|
70
|
+
extends?: string;
|
|
71
|
+
idFields: string[];
|
|
72
|
+
thingType: 'entity';
|
|
73
|
+
name: string;
|
|
74
|
+
computedFields: string[];
|
|
75
|
+
linkFields?: EnrichedLinkField[];
|
|
76
|
+
};
|
|
77
|
+
type EnrichedBormRelation = Omit<BormRelation, 'linkFields'> & {
|
|
78
|
+
thingType: 'relation';
|
|
79
|
+
name: string;
|
|
80
|
+
computedFields: string[];
|
|
81
|
+
linkFields?: EnrichedLinkField[];
|
|
82
|
+
roles: {
|
|
83
|
+
[key: string]: EnrichedRoleField;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
type LinkField = BormField & {
|
|
87
|
+
relation: string;
|
|
88
|
+
plays: string;
|
|
89
|
+
} & ({
|
|
90
|
+
target: 'role';
|
|
91
|
+
filter?: Filter | Filter[];
|
|
92
|
+
} | {
|
|
93
|
+
target: 'relation';
|
|
94
|
+
});
|
|
95
|
+
type LinkedFieldWithThing = LinkField & {
|
|
96
|
+
thing: string;
|
|
97
|
+
thingType: ThingType;
|
|
98
|
+
};
|
|
99
|
+
type RequireAtLeastOne<T> = {
|
|
100
|
+
[K in keyof T]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<keyof T, K>>>;
|
|
101
|
+
}[keyof T];
|
|
102
|
+
type LinkFilter = {
|
|
103
|
+
$thing?: string;
|
|
104
|
+
$thingType?: string;
|
|
105
|
+
$role?: string;
|
|
106
|
+
[key: string]: string | number | Filter | undefined;
|
|
107
|
+
};
|
|
108
|
+
type Filter = DataFilter | LinkFilter | MiddleFilter;
|
|
109
|
+
type MiddleFilter = {
|
|
110
|
+
$and?: Filter[];
|
|
111
|
+
$or?: Filter[];
|
|
112
|
+
};
|
|
113
|
+
type DataFilter = RequireAtLeastOne<{
|
|
114
|
+
$eq?: any;
|
|
115
|
+
$ge?: number | string;
|
|
116
|
+
}>;
|
|
117
|
+
type EnrichedLinkField = BormField & {
|
|
118
|
+
name: string;
|
|
119
|
+
relation: string;
|
|
120
|
+
plays: string;
|
|
121
|
+
} & ({
|
|
122
|
+
target: 'role';
|
|
123
|
+
filter?: Filter | Filter[];
|
|
124
|
+
oppositeLinkFieldsPlayedBy: LinkedFieldWithThing[];
|
|
125
|
+
} | {
|
|
126
|
+
target: 'relation';
|
|
127
|
+
oppositeLinkFieldsPlayedBy: Pick<LinkedFieldWithThing, 'thing' | 'thingType' | 'plays'>[];
|
|
128
|
+
});
|
|
129
|
+
type BormField = {
|
|
130
|
+
path: string;
|
|
131
|
+
cardinality: CardinalityType;
|
|
132
|
+
ordered?: boolean;
|
|
133
|
+
embedded?: boolean;
|
|
134
|
+
rights?: RightType[];
|
|
135
|
+
};
|
|
136
|
+
type RoleField = {
|
|
137
|
+
cardinality: CardinalityType;
|
|
138
|
+
dbConnector?: DBConnector;
|
|
139
|
+
};
|
|
140
|
+
type EnrichedRoleField = RoleField & {
|
|
141
|
+
playedBy?: LinkedFieldWithThing[];
|
|
142
|
+
};
|
|
143
|
+
type DataField = BormField & {
|
|
144
|
+
shared?: boolean;
|
|
145
|
+
default?: any;
|
|
146
|
+
contentType: ContentType;
|
|
147
|
+
validations?: any;
|
|
148
|
+
dbConnectors?: [DBConnector, ...DBConnector[]];
|
|
149
|
+
};
|
|
150
|
+
type ThingType = 'entity' | 'relation' | 'attribute';
|
|
151
|
+
type RightType = 'CREATE' | 'DELETE' | 'UPDATE' | 'LINK' | 'UNLINK';
|
|
152
|
+
type ContentType = 'ID' | 'JSON' | 'COLOR' | 'BOOLEAN' | 'POINT' | 'FILE' | 'EMAIL' | 'PHONE' | 'WEEK_DAY' | 'DURATION' | 'HOUR' | 'TIME' | 'DATE' | 'RATING' | 'CURRENCY' | 'PERCENTAGE' | 'NUMBER_DECIMAL' | 'NUMBER' | 'URL' | 'PASSWORD' | 'LANGUAGE_TEXT' | 'RICH_TEXT' | 'TEXT';
|
|
153
|
+
type CardinalityType = 'ONE' | 'MANY' | 'INTERVAL';
|
|
154
|
+
type RelationClassType = 'SYMMETRICAL' | 'OWNED';
|
|
155
|
+
type RequiredKey<T, K extends keyof T> = T & {
|
|
156
|
+
[P in K]-?: T[P];
|
|
157
|
+
};
|
|
158
|
+
type WithRequired<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>> & RequiredKey<T, K>;
|
|
159
|
+
type BQLMutationBlock = {
|
|
160
|
+
[key: string]: any;
|
|
161
|
+
$id?: string | string[];
|
|
162
|
+
$filter?: Filter | Filter[];
|
|
163
|
+
$tempId?: string;
|
|
164
|
+
$op?: string;
|
|
165
|
+
} & ({
|
|
166
|
+
$entity: string;
|
|
167
|
+
} | {
|
|
168
|
+
$relation: string;
|
|
169
|
+
});
|
|
170
|
+
type FilledBQLMutationBlock = WithRequired<BQLMutationBlock, '$tempId' | '$op'>;
|
|
171
|
+
type BQLFieldObj = {
|
|
172
|
+
$path: string;
|
|
173
|
+
} & Omit<RawBQLQuery, '$entity' | '$relation'>;
|
|
174
|
+
type BQLField = string | BQLFieldObj;
|
|
175
|
+
type RawBQLQuery = {
|
|
176
|
+
$id?: string | string[];
|
|
177
|
+
$filter?: Record<string, any>;
|
|
178
|
+
$fields?: BQLField[];
|
|
179
|
+
} & ({
|
|
180
|
+
$entity: string;
|
|
181
|
+
} | {
|
|
182
|
+
$relation: string;
|
|
183
|
+
});
|
|
184
|
+
type RawBQLMutation = ({
|
|
185
|
+
$entity: string;
|
|
186
|
+
} | {
|
|
187
|
+
$relation: string;
|
|
188
|
+
}) & Record<string, any>;
|
|
189
|
+
type ParsedBQLQuery = Omit<RawBQLQuery, '$entity' | '$relation'> & {
|
|
190
|
+
$localFilters?: Record<string, any>;
|
|
191
|
+
$nestedFilters?: Record<string, any>;
|
|
192
|
+
} & ({
|
|
193
|
+
$entity: EnrichedBormEntity;
|
|
194
|
+
} | {
|
|
195
|
+
$relation: EnrichedBormRelation;
|
|
196
|
+
});
|
|
197
|
+
type ParsedBQLMutation = {
|
|
198
|
+
things: BQLMutationBlock[];
|
|
199
|
+
edges: BQLMutationBlock[];
|
|
200
|
+
};
|
|
201
|
+
type TQLRequest = {
|
|
202
|
+
entity?: string;
|
|
203
|
+
roles?: {
|
|
204
|
+
path: string;
|
|
205
|
+
request: string;
|
|
206
|
+
owner: string;
|
|
207
|
+
}[];
|
|
208
|
+
relations?: {
|
|
209
|
+
relation: string;
|
|
210
|
+
entity: string;
|
|
211
|
+
request: string;
|
|
212
|
+
}[];
|
|
213
|
+
insertionMatches?: string;
|
|
214
|
+
deletionMatches?: string;
|
|
215
|
+
insertions?: string;
|
|
216
|
+
deletions?: string;
|
|
217
|
+
};
|
|
218
|
+
type TQLEntityMutation = {
|
|
219
|
+
entity: string;
|
|
220
|
+
relations?: {
|
|
221
|
+
relation: string;
|
|
222
|
+
entity: string;
|
|
223
|
+
request: string;
|
|
224
|
+
}[];
|
|
225
|
+
};
|
|
226
|
+
type BQLResponseSingle = (({
|
|
227
|
+
$entity: string;
|
|
228
|
+
$id: string;
|
|
229
|
+
} | undefined) & Record<string, any>) | string | null;
|
|
230
|
+
type BQLResponseMulti = BQLResponseSingle[];
|
|
231
231
|
type BQLResponse = BQLResponseSingle | BQLResponseMulti;
|
|
232
232
|
|
|
233
|
-
type BormProps = {
|
|
234
|
-
schema: BormSchema;
|
|
235
|
-
config: BormConfig;
|
|
236
|
-
};
|
|
237
|
-
declare class BormClient {
|
|
238
|
-
#private;
|
|
239
|
-
private schema;
|
|
240
|
-
private config;
|
|
241
|
-
private dbHandles?;
|
|
242
|
-
constructor({ schema, config }: BormProps);
|
|
243
|
-
init: () => Promise<void>;
|
|
244
|
-
introspect: () => Promise<BormSchema>;
|
|
245
|
-
query: (query: RawBQLQuery, queryConfig?: any) => Promise<void | BQLResponse>;
|
|
246
|
-
mutate: (mutation: RawBQLMutation | RawBQLMutation[], mutationConfig?: any) => Promise<void | BQLResponse>;
|
|
247
|
-
close: () => Promise<void>;
|
|
233
|
+
type BormProps = {
|
|
234
|
+
schema: BormSchema;
|
|
235
|
+
config: BormConfig;
|
|
236
|
+
};
|
|
237
|
+
declare class BormClient {
|
|
238
|
+
#private;
|
|
239
|
+
private schema;
|
|
240
|
+
private config;
|
|
241
|
+
private dbHandles?;
|
|
242
|
+
constructor({ schema, config }: BormProps);
|
|
243
|
+
init: () => Promise<void>;
|
|
244
|
+
introspect: () => Promise<BormSchema>;
|
|
245
|
+
query: (query: RawBQLQuery, queryConfig?: any) => Promise<void | BQLResponse>;
|
|
246
|
+
mutate: (mutation: RawBQLMutation | RawBQLMutation[], mutationConfig?: any) => Promise<void | BQLResponse>;
|
|
247
|
+
close: () => Promise<void>;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
export { BQLField, BQLFieldObj, BQLMutationBlock, BQLResponse, BQLResponseMulti, BQLResponseSingle, BormConfig, BormEntity, BormField, BormRelation, BormSchema, CardinalityType, ContentType, DBConnector, DBHandles, DataField, DataFilter, EnrichedBormEntity, EnrichedBormRelation, EnrichedBormSchema, EnrichedLinkField, EnrichedRoleField, FilledBQLMutationBlock, Filter, LinkField, LinkFilter, LinkedFieldWithThing, MiddleFilter, ParsedBQLMutation, ParsedBQLQuery, ProviderObject, RawBQLMutation, RawBQLQuery, RelationClassType, RightType, RoleField, TQLEntityMutation, TQLRequest, ThingType, BormClient as default };
|