@blitznocode/blitz-orm 0.11.26 → 0.12.2

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
@@ -123,12 +123,18 @@ type BormEntity = {
123
123
  defaultDBConnector: DBConnector;
124
124
  dataFields?: readonly DataField[];
125
125
  linkFields?: readonly LinkField[];
126
+ refFields?: {
127
+ [key: string]: RefField;
128
+ };
126
129
  hooks?: Hooks;
127
130
  } | {
128
131
  idFields: readonly string[];
129
132
  defaultDBConnector: DBConnector;
130
133
  dataFields?: readonly DataField[];
131
134
  linkFields?: readonly LinkField[];
135
+ refFields?: {
136
+ [key: string]: RefField;
137
+ };
132
138
  hooks?: Hooks;
133
139
  };
134
140
  type BormRelation = BormEntity & {
@@ -198,6 +204,12 @@ type RoleField = {
198
204
  cardinality: DiscreteCardinality;
199
205
  dbConnector?: DBConnector;
200
206
  };
207
+ type RefField = {
208
+ dbPath?: string;
209
+ cardinality: DiscreteCardinality;
210
+ contentType: 'REF' | 'FLEX';
211
+ dbConnector?: DBConnector;
212
+ };
201
213
  type LinkField = BormField & {
202
214
  relation: string;
203
215
  cardinality: DiscreteCardinality;
@@ -364,6 +376,9 @@ type SharedEnrichedProps = {
364
376
  fnValidatedFields: string[];
365
377
  linkFields?: EnrichedLinkField[];
366
378
  dataFields?: EnrichedDataField[];
379
+ refFields: {
380
+ [key: string]: EnrichedRefField;
381
+ };
367
382
  db: DBHandleKey;
368
383
  dbContext: AdapterContext;
369
384
  allExtends?: string[];
@@ -389,17 +404,29 @@ type EnrichedRoleField = RoleField & {
389
404
  fieldType: 'roleField';
390
405
  inherited: boolean;
391
406
  [SharedMetadata]: {
392
- inheritanceOrigin: string;
407
+ inheritanceOrigin?: string;
408
+ fieldType: 'roleField';
393
409
  };
394
410
  [SuqlMetadata]: {
395
411
  queryPath: string;
396
412
  };
397
413
  };
414
+ type EnrichedRefField = RefField & {
415
+ dbPath: string;
416
+ [SharedMetadata]: {
417
+ inheritanceOrigin?: string;
418
+ fieldType: 'refField';
419
+ };
420
+ };
398
421
  type EnrichedDataField = DataField & {
399
422
  dbPath: string;
400
423
  inherited: boolean;
401
424
  [SharedMetadata]: {
402
- inheritanceOrigin: string;
425
+ inheritanceOrigin?: string;
426
+ fieldType: 'dataField';
427
+ };
428
+ [SuqlMetadata]: {
429
+ dbPath: string;
403
430
  };
404
431
  };
405
432
  type EnrichedLinkField = LinkField & {
@@ -410,7 +437,8 @@ type EnrichedLinkField = LinkField & {
410
437
  fieldType: 'linkField';
411
438
  inherited: boolean;
412
439
  [SharedMetadata]: {
413
- inheritanceOrigin: string;
440
+ inheritanceOrigin?: string;
441
+ fieldType: 'linkField';
414
442
  };
415
443
  [SuqlMetadata]: {
416
444
  queryPath: string;
@@ -520,7 +548,20 @@ type EnrichedRoleQuery = {
520
548
  [QueryPath]: string;
521
549
  [FieldSchema]: EnrichedRoleField;
522
550
  };
523
- type EnrichedFieldQuery = EnrichedAttributeQuery | EnrichedLinkQuery | EnrichedRoleQuery;
551
+ type EnrichedRefQuery = {
552
+ $fieldType: 'ref';
553
+ $contentType: 'REF' | 'FLEX';
554
+ $path: string;
555
+ $dbPath: string;
556
+ $as: string;
557
+ $var: string;
558
+ $justId: boolean;
559
+ $id: string;
560
+ $fields?: string[];
561
+ [QueryPath]?: string;
562
+ [FieldSchema]: EnrichedRefField;
563
+ };
564
+ type EnrichedFieldQuery = EnrichedAttributeQuery | EnrichedLinkQuery | EnrichedRoleQuery | EnrichedRefQuery;
524
565
  type EnrichedEntityQuery = {
525
566
  $id?: string | string[];
526
567
  $thingType: 'entity';
@@ -736,4 +777,4 @@ declare class BormClient {
736
777
  close: () => Promise<void>;
737
778
  }
738
779
 
739
- export { type Action, type AllDbHandles, 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 };
780
+ export { type Action, type AllDbHandles, 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 EnrichedRefField, type EnrichedRefQuery, 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 RefField, 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 };