remult 0.10.2 → 0.10.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "description": "remult core lib",
5
5
  "homepage": "https://remult.dev/",
6
6
  "repository": {
@@ -165,10 +165,8 @@ export declare type EntityOrderBy<entityType> = {
165
165
  };
166
166
  export declare type EntityFilter<entityType> = {
167
167
  [Properties in keyof Partial<OmitEB<entityType>>]?: (Partial<OmitEB<entityType>>[Properties] extends (number | Date | undefined) ? ComparisonValueFilter<Partial<OmitEB<entityType>>[Properties]> : Partial<OmitEB<entityType>>[Properties] extends (string | undefined) ? ContainsStringValueFilter & ComparisonValueFilter<string> : Partial<OmitEB<entityType>>[Properties] extends (boolean | undefined) ? ValueFilter<boolean> : Partial<OmitEB<entityType>>[Properties] extends ({
168
- id: (number);
169
- } | undefined) ? IdFilter<number, Partial<OmitEB<entityType>>[Properties]> : Partial<OmitEB<entityType>>[Properties] extends ({
170
- id: (string);
171
- } | undefined) ? IdFilter<string, Partial<OmitEB<entityType>>[Properties]> : ValueFilter<Partial<OmitEB<entityType>>[Properties]>) & ContainsStringValueFilter;
168
+ id: (string | number);
169
+ } | undefined) ? IdFilter<Partial<OmitEB<entityType>>[Properties]> : ValueFilter<Partial<OmitEB<entityType>>[Properties]>) & ContainsStringValueFilter;
172
170
  } & {
173
171
  $or?: EntityFilter<entityType>[];
174
172
  $and?: EntityFilter<entityType>[];
@@ -190,10 +188,12 @@ export declare type ComparisonValueFilter<valueType> = ValueFilter<valueType> &
190
188
  export interface ContainsStringValueFilter {
191
189
  $contains?: string;
192
190
  }
193
- export declare type IdFilter<idType, valueType extends {
194
- id: idType;
191
+ export declare type IdFilter<valueType extends {
192
+ id: (string | number);
195
193
  }> = ValueFilter<valueType> | {
196
- $id: ValueFilter<idType>;
194
+ $id: ValueFilter<valueType extends {
195
+ id: number;
196
+ } ? number : string>;
197
197
  };
198
198
  export interface LoadOptions<entityType> {
199
199
  load?: (entity: FieldsMetadata<entityType>) => FieldMetadata[];