@blitznocode/blitz-orm 0.13.7 → 0.13.10
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.mts +50 -50
- package/dist/index.mjs +33 -33
- package/dist/index.mjs.map +1 -1
- package/dist/{magic-string.es-PQDV6FER.mjs → magic-string.es-ZVOSFRK2.mjs} +9 -9
- package/dist/magic-string.es-ZVOSFRK2.mjs.map +1 -0
- package/package.json +14 -14
- package/dist/magic-string.es-PQDV6FER.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -93,6 +93,30 @@ type AtLeastOne<T, U = {
|
|
|
93
93
|
type DBHandles = AtLeastOne<AllDbHandles>;
|
|
94
94
|
type DBHandleKey = keyof DBHandles;
|
|
95
95
|
|
|
96
|
+
type Request = {
|
|
97
|
+
rawBqlRequest: RawBQLQuery;
|
|
98
|
+
filledBqlRequest?: FilledBQLMutationBlock[] | FilledBQLMutationBlock;
|
|
99
|
+
bqlRequest?: {
|
|
100
|
+
query?: EnrichedBQLQuery;
|
|
101
|
+
mutation?: ParsedBQLMutation;
|
|
102
|
+
};
|
|
103
|
+
schema: EnrichedBormSchema;
|
|
104
|
+
config: BormConfig;
|
|
105
|
+
tqlRequest?: TQLRequest;
|
|
106
|
+
dbHandles: DBHandles;
|
|
107
|
+
enrichedBqlQuery?: any;
|
|
108
|
+
};
|
|
109
|
+
type BaseResponse = {
|
|
110
|
+
bqlRes?: BQLResponse | null;
|
|
111
|
+
};
|
|
112
|
+
type NextPipeline<Res extends BaseResponse> = {
|
|
113
|
+
req: Request;
|
|
114
|
+
res: Res;
|
|
115
|
+
pipeline: Pipeline<Res>;
|
|
116
|
+
};
|
|
117
|
+
type PipelineOperation<Res extends BaseResponse> = (req: Request, res: Res) => Promise<undefined | NextPipeline<Res>[]>;
|
|
118
|
+
type Pipeline<Res extends BaseResponse> = PipelineOperation<Res>[];
|
|
119
|
+
|
|
96
120
|
type ThingType = 'entity' | 'relation';
|
|
97
121
|
type BormMetadata = {
|
|
98
122
|
$id: string;
|
|
@@ -109,6 +133,32 @@ type BQLResponseSingle = Record<string | symbol, any>;
|
|
|
109
133
|
type BQLResponseMulti = BQLResponseSingle[];
|
|
110
134
|
type BQLResponse = BQLResponseSingle | BQLResponseMulti;
|
|
111
135
|
|
|
136
|
+
type TQLRequest = {
|
|
137
|
+
entity?: string;
|
|
138
|
+
roles?: {
|
|
139
|
+
path: string;
|
|
140
|
+
request: string;
|
|
141
|
+
owner: string;
|
|
142
|
+
}[];
|
|
143
|
+
relations?: {
|
|
144
|
+
relation: string;
|
|
145
|
+
entity: string;
|
|
146
|
+
request: string;
|
|
147
|
+
}[];
|
|
148
|
+
insertionMatches?: string;
|
|
149
|
+
deletionMatches?: string;
|
|
150
|
+
insertions?: string;
|
|
151
|
+
deletions?: string;
|
|
152
|
+
};
|
|
153
|
+
type TQLEntityMutation = {
|
|
154
|
+
entity: string;
|
|
155
|
+
relations?: {
|
|
156
|
+
relation: string;
|
|
157
|
+
entity: string;
|
|
158
|
+
request: string;
|
|
159
|
+
}[];
|
|
160
|
+
};
|
|
161
|
+
|
|
112
162
|
type BormSchema = {
|
|
113
163
|
entities: {
|
|
114
164
|
[s: string]: BormEntity;
|
|
@@ -657,32 +707,6 @@ type ParsedBQLMutation = {
|
|
|
657
707
|
edges: BQLMutationBlock[];
|
|
658
708
|
};
|
|
659
709
|
|
|
660
|
-
type TQLRequest = {
|
|
661
|
-
entity?: string;
|
|
662
|
-
roles?: {
|
|
663
|
-
path: string;
|
|
664
|
-
request: string;
|
|
665
|
-
owner: string;
|
|
666
|
-
}[];
|
|
667
|
-
relations?: {
|
|
668
|
-
relation: string;
|
|
669
|
-
entity: string;
|
|
670
|
-
request: string;
|
|
671
|
-
}[];
|
|
672
|
-
insertionMatches?: string;
|
|
673
|
-
deletionMatches?: string;
|
|
674
|
-
insertions?: string;
|
|
675
|
-
deletions?: string;
|
|
676
|
-
};
|
|
677
|
-
type TQLEntityMutation = {
|
|
678
|
-
entity: string;
|
|
679
|
-
relations?: {
|
|
680
|
-
relation: string;
|
|
681
|
-
entity: string;
|
|
682
|
-
request: string;
|
|
683
|
-
}[];
|
|
684
|
-
};
|
|
685
|
-
|
|
686
710
|
type ContentTypeToType<C extends keyof ContentTypeMapping> = ContentTypeMapping[C];
|
|
687
711
|
type HandleCardinality<T, C extends 'ONE' | 'MANY'> = C extends 'MANY' ? T[] : T;
|
|
688
712
|
type ContentTypeAndCardinality = {
|
|
@@ -731,30 +755,6 @@ type ExtractRoles<S> = 'roles' extends keyof S ? {
|
|
|
731
755
|
} : Record<string, never>;
|
|
732
756
|
type TypeGen<S extends BaseSchema> = ExtractDataFields<S> & ExtractLinkFields<S> & ExtractRoles<S>;
|
|
733
757
|
|
|
734
|
-
type Request = {
|
|
735
|
-
rawBqlRequest: RawBQLQuery;
|
|
736
|
-
filledBqlRequest?: FilledBQLMutationBlock[] | FilledBQLMutationBlock;
|
|
737
|
-
bqlRequest?: {
|
|
738
|
-
query?: EnrichedBQLQuery;
|
|
739
|
-
mutation?: ParsedBQLMutation;
|
|
740
|
-
};
|
|
741
|
-
schema: EnrichedBormSchema;
|
|
742
|
-
config: BormConfig;
|
|
743
|
-
tqlRequest?: TQLRequest;
|
|
744
|
-
dbHandles: DBHandles;
|
|
745
|
-
enrichedBqlQuery?: any;
|
|
746
|
-
};
|
|
747
|
-
type BaseResponse = {
|
|
748
|
-
bqlRes?: BQLResponse | null;
|
|
749
|
-
};
|
|
750
|
-
type NextPipeline<Res extends BaseResponse> = {
|
|
751
|
-
req: Request;
|
|
752
|
-
res: Res;
|
|
753
|
-
pipeline: Pipeline<Res>;
|
|
754
|
-
};
|
|
755
|
-
type PipelineOperation<Res extends BaseResponse> = (req: Request, res: Res) => Promise<undefined | NextPipeline<Res>[]>;
|
|
756
|
-
type Pipeline<Res extends BaseResponse> = PipelineOperation<Res>[];
|
|
757
|
-
|
|
758
758
|
type BormProps = {
|
|
759
759
|
schema: BormSchema;
|
|
760
760
|
config: BormConfig;
|