@blitznocode/blitz-orm 0.10.31 → 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 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;
@@ -306,6 +317,7 @@ type ContentTypeMapping = {
306
317
  LANGUAGE_TEXT: string;
307
318
  RICH_TEXT: string;
308
319
  TEXT: string;
320
+ FLEX: unknown;
309
321
  };
310
322
  type DiscreteCardinality = 'ONE' | 'MANY';
311
323
  type Cardinality = DiscreteCardinality | 'INTERVAL';
@@ -353,8 +365,10 @@ type EnrichedBormRelation = Omit<BormRelation, 'linkFields' | 'dataFields'> & {
353
365
  type EnrichedRoleField = RoleField & {
354
366
  path: string;
355
367
  playedBy?: LinkedFieldWithThing[];
368
+ impactedLinkFields?: LinkedFieldWithThing[];
356
369
  $things: string[];
357
370
  fieldType: 'roleField';
371
+ inherited: boolean;
358
372
  [SharedMetadata]: {
359
373
  inheritanceOrigin: string;
360
374
  };
@@ -364,6 +378,7 @@ type EnrichedRoleField = RoleField & {
364
378
  };
365
379
  type EnrichedDataField = DataField & {
366
380
  dbPath: string;
381
+ inherited: boolean;
367
382
  [SharedMetadata]: {
368
383
  inheritanceOrigin: string;
369
384
  };
@@ -374,6 +389,7 @@ type EnrichedLinkField = LinkField & {
374
389
  plays: string;
375
390
  $things: string[];
376
391
  fieldType: 'linkField';
392
+ inherited: boolean;
377
393
  [SharedMetadata]: {
378
394
  inheritanceOrigin: string;
379
395
  };
@@ -383,6 +399,7 @@ type EnrichedLinkField = LinkField & {
383
399
  } & ({
384
400
  target: 'role';
385
401
  targetRoles?: string[];
402
+ pathToRelation: string;
386
403
  oppositeLinkFieldsPlayedBy: LinkedFieldWithThing[];
387
404
  } | {
388
405
  target: 'relation';
@@ -689,10 +706,13 @@ declare class BormClient {
689
706
  getDbHandles: () => DBHandles | undefined;
690
707
  init: () => Promise<void>;
691
708
  introspect: () => Promise<BormSchema>;
692
- define: () => Promise<void>;
709
+ define: () => Promise<{
710
+ typeDB: Map<string | undefined, string | undefined>;
711
+ surrealDB: Map<string, string>;
712
+ }>;
693
713
  query: (query: RawBQLQuery | RawBQLQuery[], queryConfig?: QueryConfig) => Promise<BQLResponseSingle | BQLResponse[]>;
694
714
  mutate: (mutation: BQLMutation, mutationConfig?: MutationConfig) => Promise<BQLResponseMulti>;
695
715
  close: () => Promise<void>;
696
716
  }
697
717
 
698
- 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 };