@mavenmachines/event-handler-lib 1.5.1-rc.4 → 1.5.1-rc.6

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.
@@ -32,6 +32,8 @@ export type GeopointQuery = {
32
32
  right: number;
33
33
  };
34
34
  export type LegalGeopointNames = "latLon" | "latLong";
35
+ export type NonOptional<T> = Exclude<T, undefined>;
36
+ export type InterfaceEquals<T, U> = [T] extends [U] ? [U] extends [T] ? true : false : false;
35
37
  export type SearchRequest<T extends Projection> = CompanyIdRequest & {
36
38
  query: DeepSearchable<T>;
37
39
  limit?: number;
@@ -41,7 +43,7 @@ export type SearchRequest<T extends Projection> = CompanyIdRequest & {
41
43
  pointInTime?: boolean;
42
44
  };
43
45
  export type DeepSearchable<T extends object> = {
44
- [P in keyof T]?: Geopoint extends T[P] ? GeopointQuery : T[P] extends LegalGeopointNames ? GeopointQuery : T[P] extends object ? DeepSearchable<T[P]> : T[P];
46
+ [P in keyof T]?: InterfaceEquals<NonOptional<T[P]>, Geopoint> extends true ? GeopointQuery : P extends LegalGeopointNames ? GeopointQuery : T[P] extends Record<string, any> ? DeepSearchable<T[P]> : T[P];
45
47
  };
46
48
  export declare class LatLon {
47
49
  lat: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/handlers/crud/types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAQ3C,MAAa,YAAY;CAExB;AAFD,oCAEC;AAED,MAAa,gBAAgB;CAG5B;AAHD,4CAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;mDACQ;AAcR,QAAA,cAAc,GAAoB;IAC7C,OAAO;IACP,OAAO;IACP,MAAM;IACN,QAAQ;IACR,YAAY;CACb,CAAC;AA6CF,MAAa,MAAM;CAMlB;AAND,wBAMC;AAJC;IADC,IAAA,0BAAQ,GAAE;;mCACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;mCACE"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/handlers/crud/types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAQ3C,MAAa,YAAY;CAExB;AAFD,oCAEC;AAED,MAAa,gBAAgB;CAG5B;AAHD,4CAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;mDACQ;AAcR,QAAA,cAAc,GAAoB;IAC7C,OAAO;IACP,OAAO;IACP,MAAM;IACN,QAAQ;IACR,YAAY;CACb,CAAC;AAsDF,MAAa,MAAM;CAMlB;AAND,wBAMC;AAJC;IADC,IAAA,0BAAQ,GAAE;;mCACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;mCACE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mavenmachines/event-handler-lib",
3
- "version": "1.5.1-rc.4",
3
+ "version": "1.5.1-rc.6",
4
4
  "description": "Helper libraries for creating an Event Handler",
5
5
  "module": "./dist/src/index.mjs",
6
6
  "types": "./dist/src/index.d.ts",