@blitznocode/blitz-orm 0.11.0 → 0.11.1
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/index.d.mts +25 -6
- package/dist/index.mjs +107 -40
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
- package/readme.md +22 -3
package/dist/index.d.mts
CHANGED
|
@@ -184,6 +184,10 @@ type LinkField = BormField & {
|
|
|
184
184
|
cardinality: DiscreteCardinality;
|
|
185
185
|
plays: string;
|
|
186
186
|
isVirtual?: boolean;
|
|
187
|
+
dbValue?: {
|
|
188
|
+
surrealDB?: string;
|
|
189
|
+
typeDB?: string;
|
|
190
|
+
};
|
|
187
191
|
} & ({
|
|
188
192
|
target: 'role';
|
|
189
193
|
filter?: Filter | Filter[];
|
|
@@ -193,6 +197,7 @@ type LinkField = BormField & {
|
|
|
193
197
|
type LinkedFieldWithThing = LinkField & {
|
|
194
198
|
thing: string;
|
|
195
199
|
thingType: ThingType;
|
|
200
|
+
pathToRelation: string;
|
|
196
201
|
};
|
|
197
202
|
type MultiField = BormField & {
|
|
198
203
|
contentType: 'FLEX';
|
|
@@ -268,14 +273,20 @@ type BooleanField = BormField & {
|
|
|
268
273
|
};
|
|
269
274
|
};
|
|
270
275
|
type AllDataField = StringField | NumberField | DateField | BooleanField | MultiField;
|
|
276
|
+
type Validations = {
|
|
277
|
+
required?: boolean;
|
|
278
|
+
unique?: boolean;
|
|
279
|
+
enum?: unknown[];
|
|
280
|
+
};
|
|
271
281
|
type DataField = BormField & {
|
|
272
282
|
cardinality?: Cardinality;
|
|
273
283
|
shared?: boolean;
|
|
274
|
-
validations?:
|
|
275
|
-
required?: boolean;
|
|
276
|
-
unique?: boolean;
|
|
277
|
-
};
|
|
284
|
+
validations?: Validations;
|
|
278
285
|
isVirtual?: boolean;
|
|
286
|
+
dbValue?: {
|
|
287
|
+
surrealDB?: string;
|
|
288
|
+
typeDB?: string;
|
|
289
|
+
};
|
|
279
290
|
dbConnectors?: [DBConnector, ...DBConnector[]];
|
|
280
291
|
} & AllDataField;
|
|
281
292
|
type ContentType = keyof ContentTypeMapping;
|
|
@@ -354,8 +365,10 @@ type EnrichedBormRelation = Omit<BormRelation, 'linkFields' | 'dataFields'> & {
|
|
|
354
365
|
type EnrichedRoleField = RoleField & {
|
|
355
366
|
path: string;
|
|
356
367
|
playedBy?: LinkedFieldWithThing[];
|
|
368
|
+
impactedLinkFields?: LinkedFieldWithThing[];
|
|
357
369
|
$things: string[];
|
|
358
370
|
fieldType: 'roleField';
|
|
371
|
+
inherited: boolean;
|
|
359
372
|
[SharedMetadata]: {
|
|
360
373
|
inheritanceOrigin: string;
|
|
361
374
|
};
|
|
@@ -365,6 +378,7 @@ type EnrichedRoleField = RoleField & {
|
|
|
365
378
|
};
|
|
366
379
|
type EnrichedDataField = DataField & {
|
|
367
380
|
dbPath: string;
|
|
381
|
+
inherited: boolean;
|
|
368
382
|
[SharedMetadata]: {
|
|
369
383
|
inheritanceOrigin: string;
|
|
370
384
|
};
|
|
@@ -375,6 +389,7 @@ type EnrichedLinkField = LinkField & {
|
|
|
375
389
|
plays: string;
|
|
376
390
|
$things: string[];
|
|
377
391
|
fieldType: 'linkField';
|
|
392
|
+
inherited: boolean;
|
|
378
393
|
[SharedMetadata]: {
|
|
379
394
|
inheritanceOrigin: string;
|
|
380
395
|
};
|
|
@@ -384,6 +399,7 @@ type EnrichedLinkField = LinkField & {
|
|
|
384
399
|
} & ({
|
|
385
400
|
target: 'role';
|
|
386
401
|
targetRoles?: string[];
|
|
402
|
+
pathToRelation: string;
|
|
387
403
|
oppositeLinkFieldsPlayedBy: LinkedFieldWithThing[];
|
|
388
404
|
} | {
|
|
389
405
|
target: 'relation';
|
|
@@ -690,10 +706,13 @@ declare class BormClient {
|
|
|
690
706
|
getDbHandles: () => DBHandles | undefined;
|
|
691
707
|
init: () => Promise<void>;
|
|
692
708
|
introspect: () => Promise<BormSchema>;
|
|
693
|
-
define: () => Promise<
|
|
709
|
+
define: () => Promise<{
|
|
710
|
+
typeDB: Map<string | undefined, string | undefined>;
|
|
711
|
+
surrealDB: Map<string, string>;
|
|
712
|
+
}>;
|
|
694
713
|
query: (query: RawBQLQuery | RawBQLQuery[], queryConfig?: QueryConfig) => Promise<BQLResponseSingle | BQLResponse[]>;
|
|
695
714
|
mutate: (mutation: BQLMutation, mutationConfig?: MutationConfig) => Promise<BQLResponseMulti>;
|
|
696
715
|
close: () => Promise<void>;
|
|
697
716
|
}
|
|
698
717
|
|
|
699
|
-
export { type Action, type BQLField, type BQLFieldObj, type BQLMutation, type BQLMutationBlock, type BQLResponse, type BQLResponseMulti, type BQLResponseSingle, type BaseResponse, type BormConfig, type BormEntity, type BormField, type BormMetadata, type BormOperation, type BormRelation, type BormSchema, type BormTrigger, type Cardinality, type CommonProvider, type ContentType, type ContentTypeMapping, type DBConnector, type DBHandleKey, type DBHandles, type DataField, type DiscreteCardinality, type EnrichedAttributeQuery, type EnrichedBQLMutationBlock, type EnrichedBQLQuery, type EnrichedBormEntity, type EnrichedBormRelation, type EnrichedBormSchema, type EnrichedDataField, type EnrichedEntityQuery, type EnrichedFieldQuery, type EnrichedLinkField, type EnrichedLinkQuery, type EnrichedRelationQuery, type EnrichedRoleField, type EnrichedRoleQuery, type FilledBQLMutationBlock, type Filter, type FilterValue, type Hooks, type LinkField, type LinkedFieldWithThing, type MutationConfig, type NegativeFilter, type NodeFunctionParams, type ParsedBQLMutation, type Pipeline, type PipelineOperation, type PlayedBy, type PositiveFilter, type PreHook, type Provider, type QueryConfig, type RawBQLMutation, type RawBQLQuery, type Request, type RightType, type RoleField, type RootBQLMutationBlock, type Sorter, type TQLEntityMutation, type TQLRequest, type ThingType, type TransFormAction, type TypeDBClusterProvider, type TypeDBHandles, type TypeDBProvider, type TypeGen, type ValidateAction, type WithBormMetadata, BormClient as default };
|
|
718
|
+
export { type Action, type BQLField, type BQLFieldObj, type BQLMutation, type BQLMutationBlock, type BQLResponse, type BQLResponseMulti, type BQLResponseSingle, type BaseResponse, type BormConfig, type BormEntity, type BormField, type BormMetadata, type BormOperation, type BormRelation, type BormSchema, type BormTrigger, type Cardinality, type CommonProvider, type ContentType, type ContentTypeMapping, type DBConnector, type DBHandleKey, type DBHandles, type DataField, type DiscreteCardinality, type EnrichedAttributeQuery, type EnrichedBQLMutationBlock, type EnrichedBQLQuery, type EnrichedBormEntity, type EnrichedBormRelation, type EnrichedBormSchema, type EnrichedDataField, type EnrichedEntityQuery, type EnrichedFieldQuery, type EnrichedLinkField, type EnrichedLinkQuery, type EnrichedRelationQuery, type EnrichedRoleField, type EnrichedRoleQuery, type FilledBQLMutationBlock, type Filter, type FilterValue, type Hooks, type LinkField, type LinkedFieldWithThing, type MutationConfig, type NegativeFilter, type NodeFunctionParams, type ParsedBQLMutation, type Pipeline, type PipelineOperation, type PlayedBy, type PositiveFilter, type PreHook, type Provider, type QueryConfig, type RawBQLMutation, type RawBQLQuery, type Request, type RightType, type RoleField, type RootBQLMutationBlock, type Sorter, type TQLEntityMutation, type TQLRequest, type ThingType, type TransFormAction, type TypeDBClusterProvider, type TypeDBHandles, type TypeDBProvider, type TypeGen, type ValidateAction, type Validations, type WithBormMetadata, BormClient as default };
|