@osdk/api 2.7.0-beta.12 → 2.7.0-beta.13
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/CHANGELOG.md +6 -0
- package/build/browser/aggregate/WhereClause.js +1 -1
- package/build/browser/aggregate/WhereClause.js.map +1 -1
- package/build/cjs/{ObjectSet-MHvnoH1g.d.cts → ObjectSet-CqVqDXKn.d.cts} +2 -7
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +2 -2
- package/build/cjs/public/unstable.d.cts +2 -2
- package/build/esm/aggregate/WhereClause.js +1 -1
- package/build/esm/aggregate/WhereClause.js.map +1 -1
- package/build/types/aggregate/WhereClause.d.ts +2 -5
- package/build/types/aggregate/WhereClause.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhereClause.js","names":["DistanceUnitMapping"],"sources":["WhereClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { BBox, Point, Polygon } from \"geojson\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { BaseWirePropertyTypes } from \"../ontology/WirePropertyTypes.js\";\nimport type { IsNever } from \"../OsdkObjectFrom.js\";\nimport type { ArrayFilter } from \"./ArrayFilter.js\";\nimport type { BaseFilter } from \"./BaseFilter.js\";\nimport type { BooleanFilter } from \"./BooleanFilter.js\";\nimport type { DatetimeFilter } from \"./DatetimeFilter.js\";\nimport type { GeoFilter } from \"./GeoFilter.js\";\nimport type { Just } from \"./Just.js\";\nimport type { NumberFilter } from \"./NumberFilter.js\";\nimport type { StringFilter } from \"./StringFilter.js\";\n\nexport type PossibleWhereClauseFilters =\n | \"$gt\"\n | \"$eq\"\n | \"$ne\"\n | \"$isNull\"\n | \"$contains\"\n | \"$gte\"\n | \"$lt\"\n | \"$lte\"\n | \"$within\"\n | \"$in\"\n | \"$intersects\"\n | \"$startsWith\"\n | \"$containsAllTermsInOrder\"\n | \"$containsAnyTerm\"\n | \"$containsAllTerms\";\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping: {\n centimeter: \"CENTIMETERS\";\n centimeters: \"CENTIMETERS\";\n cm: \"CENTIMETERS\";\n meter: \"METERS\";\n meters: \"METERS\";\n m: \"METERS\";\n kilometer: \"KILOMETERS\";\n kilometers: \"KILOMETERS\";\n km: \"KILOMETERS\";\n inch: \"INCHES\";\n inches: \"INCHES\";\n foot: \"FEET\";\n feet: \"FEET\";\n yard: \"YARDS\";\n yards: \"YARDS\";\n mile: \"MILES\";\n miles: \"MILES\";\n nautical_mile: \"NAUTICAL_MILES\";\n nauticalMile: \"NAUTICAL_MILES\";\n \"nautical miles\": \"NAUTICAL_MILES\";\n} = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\",\n} satisfies Record<\n string,\n | \"CENTIMETERS\"\n | \"METERS\"\n | \"KILOMETERS\"\n | \"INCHES\"\n | \"FEET\"\n | \"YARDS\"\n | \"MILES\"\n | \"NAUTICAL_MILES\"\n>;\n\nexport type GeoFilter_Within = {\n \"$within\":\n | {\n $distance: [number, keyof typeof DistanceUnitMapping];\n $of: [number, number] | Readonly<Point>;\n $bbox?: never;\n $polygon?: never;\n }\n | {\n $bbox: BBox;\n $distance?: never;\n $of?: never;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n $distance?: never;\n $of?: never;\n }\n | Polygon;\n};\n\nexport type GeoFilter_Intersects = {\n \"$intersects\":\n | {\n $bbox: BBox;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n }\n | Polygon;\n};\n\ntype
|
|
1
|
+
{"version":3,"file":"WhereClause.js","names":["DistanceUnitMapping"],"sources":["WhereClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { BBox, Point, Polygon } from \"geojson\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { BaseWirePropertyTypes } from \"../ontology/WirePropertyTypes.js\";\nimport type { IsNever } from \"../OsdkObjectFrom.js\";\nimport type { ArrayFilter } from \"./ArrayFilter.js\";\nimport type { BaseFilter } from \"./BaseFilter.js\";\nimport type { BooleanFilter } from \"./BooleanFilter.js\";\nimport type { DatetimeFilter } from \"./DatetimeFilter.js\";\nimport type { GeoFilter } from \"./GeoFilter.js\";\nimport type { Just } from \"./Just.js\";\nimport type { NumberFilter } from \"./NumberFilter.js\";\nimport type { StringFilter } from \"./StringFilter.js\";\n\nexport type PossibleWhereClauseFilters =\n | \"$gt\"\n | \"$eq\"\n | \"$ne\"\n | \"$isNull\"\n | \"$contains\"\n | \"$gte\"\n | \"$lt\"\n | \"$lte\"\n | \"$within\"\n | \"$in\"\n | \"$intersects\"\n | \"$startsWith\"\n | \"$containsAllTermsInOrder\"\n | \"$containsAnyTerm\"\n | \"$containsAllTerms\";\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping: {\n centimeter: \"CENTIMETERS\";\n centimeters: \"CENTIMETERS\";\n cm: \"CENTIMETERS\";\n meter: \"METERS\";\n meters: \"METERS\";\n m: \"METERS\";\n kilometer: \"KILOMETERS\";\n kilometers: \"KILOMETERS\";\n km: \"KILOMETERS\";\n inch: \"INCHES\";\n inches: \"INCHES\";\n foot: \"FEET\";\n feet: \"FEET\";\n yard: \"YARDS\";\n yards: \"YARDS\";\n mile: \"MILES\";\n miles: \"MILES\";\n nautical_mile: \"NAUTICAL_MILES\";\n nauticalMile: \"NAUTICAL_MILES\";\n \"nautical miles\": \"NAUTICAL_MILES\";\n} = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\",\n} satisfies Record<\n string,\n | \"CENTIMETERS\"\n | \"METERS\"\n | \"KILOMETERS\"\n | \"INCHES\"\n | \"FEET\"\n | \"YARDS\"\n | \"MILES\"\n | \"NAUTICAL_MILES\"\n>;\n\nexport type GeoFilter_Within = {\n \"$within\":\n | {\n $distance: [number, keyof typeof DistanceUnitMapping];\n $of: [number, number] | Readonly<Point>;\n $bbox?: never;\n $polygon?: never;\n }\n | {\n $bbox: BBox;\n $distance?: never;\n $of?: never;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n $distance?: never;\n $of?: never;\n }\n | Polygon;\n};\n\nexport type GeoFilter_Intersects = {\n \"$intersects\":\n | {\n $bbox: BBox;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n }\n | Polygon;\n};\n\ntype BaseFilterFor<T> = T extends Record<string, BaseWirePropertyTypes>\n ? StructFilterOpts<T>\n : T extends \"string\" ? StringFilter\n : T extends \"geopoint\" | \"geoshape\" ? GeoFilter\n : T extends \"datetime\" | \"timestamp\" ? DatetimeFilter\n : T extends \"boolean\" ? BooleanFilter\n : T extends WhereClauseNumberPropertyTypes ? NumberFilter\n : BaseFilter<string>; // Fallback for unknown types\n\ntype FilterFor<PD extends ObjectMetadata.Property> = PD[\"multiplicity\"] extends\n true ? ArrayFilter<BaseFilterFor<PD[\"type\"]>>\n : PD[\"type\"] extends Record<string, BaseWirePropertyTypes>\n ? StructFilter<PD[\"type\"]> | BaseFilter.$isNull<string>\n : BaseFilterFor<PD[\"type\"]>;\n\ntype StructFilterOpts<ST extends Record<string, BaseWirePropertyTypes>> = {\n [K in keyof ST]?: FilterFor<{ \"type\": ST[K] }>;\n};\ntype StructFilter<ST extends Record<string, BaseWirePropertyTypes>> = {\n [K in keyof ST]: Just<K, StructFilterOpts<ST>>;\n}[keyof ST];\n\ntype WhereClauseNumberPropertyTypes =\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"decimal\"\n | \"byte\";\n\nexport type AndWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $and: WhereClause<T, RDPs>[];\n};\n\nexport type OrWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $or: WhereClause<T, RDPs>[];\n};\n\nexport type NotWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $not: WhereClause<T, RDPs>;\n};\n\nexport type PropertyWhereClause<T extends ObjectOrInterfaceDefinition> = {\n [P in keyof CompileTimeMetadata<T>[\"properties\"]]?: FilterFor<\n CompileTimeMetadata<T>[\"properties\"][P]\n >;\n};\n\ntype MergedPropertyWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = PropertyWhereClause<\n DerivedObjectOrInterfaceDefinition.WithDerivedProperties<T, RDPs>\n>;\n\nexport type WhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> =\n | OrWhereClause<T, RDPs>\n | AndWhereClause<T, RDPs>\n | NotWhereClause<T, RDPs>\n | (IsNever<keyof CompileTimeMetadata<T>[\"properties\"]> extends true\n ? Record<string, never>\n : MergedPropertyWhereClause<T, RDPs>);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwCA;AACA;AACA,OAAO,MAAMA,mBAqBZ,GAAG;EACF,YAAY,EAAE,aAAa;EAC3B,aAAa,EAAE,aAAa;EAC5B,IAAI,EAAE,aAAa;EACnB,OAAO,EAAE,QAAQ;EACjB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,QAAQ;EACb,WAAW,EAAE,YAAY;EACzB,YAAY,EAAE,YAAY;EAC1B,IAAI,EAAE,YAAY;EAClB,MAAM,EAAE,QAAQ;EAChB,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,MAAM;EACd,MAAM,EAAE,MAAM;EACd,MAAM,EAAE,OAAO;EACf,OAAO,EAAE,OAAO;EAChB,MAAM,EAAE,OAAO;EACf,OAAO,EAAE,OAAO;EAChB,eAAe,EAAE,gBAAgB;EACjC,cAAc,EAAE,gBAAgB;EAChC,gBAAgB,EAAE;AACpB,CAUC;;AA+CuB","ignoreList":[]}
|
|
@@ -1289,12 +1289,8 @@ type GeoFilter_Intersects = {
|
|
|
1289
1289
|
$bbox?: never;
|
|
1290
1290
|
} | Polygon;
|
|
1291
1291
|
};
|
|
1292
|
-
type
|
|
1293
|
-
type
|
|
1294
|
-
[K in keyof ST]?: FilterFor<{
|
|
1295
|
-
"type": ST[K];
|
|
1296
|
-
}>;
|
|
1297
|
-
};
|
|
1292
|
+
type BaseFilterFor<T> = T extends Record<string, BaseWirePropertyTypes> ? StructFilterOpts<T> : T extends "string" ? StringFilter : T extends "geopoint" | "geoshape" ? GeoFilter : T extends "datetime" | "timestamp" ? DatetimeFilter : T extends "boolean" ? BooleanFilter : T extends WhereClauseNumberPropertyTypes ? NumberFilter : BaseFilter<string>;
|
|
1293
|
+
type FilterFor<PD extends ObjectMetadata.Property> = PD["multiplicity"] extends true ? ArrayFilter<BaseFilterFor<PD["type"]>> : PD["type"] extends Record<string, BaseWirePropertyTypes> ? StructFilter<PD["type"]> | BaseFilter.$isNull<string> : BaseFilterFor<PD["type"]>;
|
|
1298
1294
|
type StructFilterOpts<ST extends Record<string, BaseWirePropertyTypes>> = {
|
|
1299
1295
|
[K in keyof ST]?: FilterFor<{
|
|
1300
1296
|
"type": ST[K];
|
|
@@ -1303,7 +1299,6 @@ type StructFilterOpts<ST extends Record<string, BaseWirePropertyTypes>> = {
|
|
|
1303
1299
|
type StructFilter<ST extends Record<string, BaseWirePropertyTypes>> = {
|
|
1304
1300
|
[K in keyof ST]: Just<K, StructFilterOpts<ST>>;
|
|
1305
1301
|
}[keyof ST];
|
|
1306
|
-
type PropertyTypesRepresentedAsStringsForArrayWhereClause = "string" | "geopoint" | "geoshape" | "datetime" | "timestamp";
|
|
1307
1302
|
type WhereClauseNumberPropertyTypes = "double" | "integer" | "long" | "float" | "decimal" | "byte";
|
|
1308
1303
|
type AndWhereClause<T extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> = {
|
|
1309
1304
|
$and: WhereClause<T, RDPs>[];
|
package/build/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/aggregate/WhereClause.ts","../../src/mapping/DurationMapping.ts","../../src/groupby/GroupByClause.ts","../../src/object/Result.ts","../../src/timeseries/timeseries.ts"],"names":[],"mappings":";;;AAkBO,IAAM,mBAAsB,GAAA;AAAA,EACjC,YAAc,EAAA,aAAA;AAAA,EACd,aAAe,EAAA,aAAA;AAAA,EACf,IAAM,EAAA,aAAA;AAAA,EACN,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,GAAK,EAAA,QAAA;AAAA,EACL,WAAa,EAAA,YAAA;AAAA,EACb,YAAc,EAAA,YAAA;AAAA,EACd,IAAM,EAAA,YAAA;AAAA,EACN,MAAQ,EAAA,QAAA;AAAA,EACR,QAAU,EAAA,QAAA;AAAA,EACV,MAAQ,EAAA,MAAA;AAAA,EACR,MAAQ,EAAA,MAAA;AAAA,EACR,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,eAAiB,EAAA,gBAAA;AAAA,EACjB,cAAgB,EAAA,gBAAA;AAAA,EAChB,gBAAkB,EAAA;AACpB;;;ACvBO,IAAM,mBAAsB,GAAA;AAAA,EACjC,KAAO,EAAA,SAAA;AAAA,EACP,SAAW,EAAA,SAAA;AAAA,EACX,KAAO,EAAA,SAAA;AAAA,EACP,QAAU,EAAA,SAAA;AAAA,EACV,SAAW,EAAA,SAAA;AAAA,EACX,IAAM,EAAA,OAAA;AAAA,EACN,KAAO,EAAA,OAAA;AAAA,EACP,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,MAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AAAA,EACR,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,QAAA;AAAA,EACP,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA;AACX,CAAA;;;ACpBO,IAAM,eAAkB,GAAA;AAAA,EAC7B,GAAG,mBAAA;AAAA,EACH,SAAW,EAAA,UAAA;AAAA,EACX,UAAY,EAAA;AACd;;;ACAO,SAAS,KAAK,CAAG,EAAA;AACtB,EAAA,OAAO,OAAW,IAAA,CAAA;AACpB;;;ACNO,IAAM,yBAA4B,GAAA;AAAA,EACvC,IAAM,EAAA,cAAA;AAAA,EACN,cAAgB,EAAA,cAAA;AAAA,EAChB,GAAG;AACL","file":"index.cjs","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\"\n};\n\n//
|
|
1
|
+
{"version":3,"sources":["../../src/aggregate/WhereClause.ts","../../src/mapping/DurationMapping.ts","../../src/groupby/GroupByClause.ts","../../src/object/Result.ts","../../src/timeseries/timeseries.ts"],"names":[],"mappings":";;;AAkBO,IAAM,mBAAsB,GAAA;AAAA,EACjC,YAAc,EAAA,aAAA;AAAA,EACd,aAAe,EAAA,aAAA;AAAA,EACf,IAAM,EAAA,aAAA;AAAA,EACN,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,GAAK,EAAA,QAAA;AAAA,EACL,WAAa,EAAA,YAAA;AAAA,EACb,YAAc,EAAA,YAAA;AAAA,EACd,IAAM,EAAA,YAAA;AAAA,EACN,MAAQ,EAAA,QAAA;AAAA,EACR,QAAU,EAAA,QAAA;AAAA,EACV,M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rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\"\n};\n\n// Fallback for unknown types","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const TimeDurationMapping = {\n \"sec\": \"SECONDS\",\n \"seconds\": \"SECONDS\",\n \"min\": \"MINUTES\",\n \"minute\": \"MINUTES\",\n \"minutes\": \"MINUTES\",\n \"hr\": \"HOURS\",\n \"hrs\": \"HOURS\",\n \"hour\": \"HOURS\",\n \"hours\": \"HOURS\",\n \"day\": \"DAYS\",\n \"days\": \"DAYS\",\n \"wk\": \"WEEKS\",\n \"week\": \"WEEKS\",\n \"weeks\": \"WEEKS\",\n \"mos\": \"MONTHS\",\n \"month\": \"MONTHS\",\n \"months\": \"MONTHS\",\n \"yr\": \"YEARS\",\n \"year\": \"YEARS\",\n \"years\": \"YEARS\"\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const DurationMapping = {\n ...TimeDurationMapping,\n \"quarter\": \"QUARTERS\",\n \"quarters\": \"QUARTERS\"\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Check if a result was successfully received\n * @param a - result wrapped value\n * @returns whether a result has a value in it\n */\nexport function isOk(a) {\n return \"value\" in a;\n}\n\n/**\n * Check if a result contains an error value\n * @param a Result wrapped value\n * @returns whether a result has an error in it\n */\nexport function isError(a) {\n return \"error\" in a;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const TimeseriesDurationMapping = {\n \"ms\": \"MILLISECONDS\",\n \"milliseconds\": \"MILLISECONDS\",\n ...TimeDurationMapping\n};"]}
|
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AttachmentUpload, M as MediaReference, a as MediaUpload, b as Attachment, O as ObjectTypeDefinition, c as ObjectIdentifiers, d as OsdkObjectPrimaryKeyType, e as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, f as OsdkMetadata, R as ReleaseStatus, g as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, h as PrimaryKeyTypes, i as OsdkBase } from './ObjectSet-
|
|
2
|
-
export { ar as Affix, j as AggregateOpts, k as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, n as AggregationClause, l as AggregationResultsWithGroups, m as AggregationResultsWithoutGroups, o as AggregationsResults, z as AllGroupByValues, p as AndWhereClause, F as AsyncIterArgs, H as Augment, J as Augments, a3 as BaseObjectSet, aS as BaseWirePropertyTypes, aV as ConvertProps, ag as DatetimeFormat, ah as DatetimeLocalizedFormat, ai as DatetimeLocalizedFormatType, aj as DatetimeStringFormat, ak as DatetimeTimezone, al as DatetimeTimezoneStatic, am as DatetimeTimezoneUser, x as DerivedProperty, D as DistanceUnitMapping, as as DurationBaseValue, at as DurationFormatStyle, y as DurationMapping, au as DurationPrecision, a4 as FetchLinksPageResult, K as FetchPageArgs, X as FetchPageResult, G as GeoFilterOptions, q as GeoFilter_Intersects, r as GeoFilter_Within, a_ as GeotimeSeriesProperty, B as GroupByClause, E as GroupByRange, av as HumanReadableFormat, a8 as InterfaceMetadata, ap as KnownType, b3 as LinkNames, a5 as LinkTypeApiNamesFor, b2 as LinkedType, aW as MaybeScore, Z as Media, _ as MediaMetadata, a6 as MinimalDirectedObjectLinkInstance, N as NotWhereClause, L as NullabilityAdherence, aw as NumberFormatAffix, ax as NumberFormatCurrency, ay as NumberFormatCurrencyStyle, az as NumberFormatCustomUnit, aA as NumberFormatDuration, aB as NumberFormatFixedValues, aC as NumberFormatNotation, aD as NumberFormatOptions, aE as NumberFormatRatio, aF as NumberFormatScale, aG as NumberFormatStandard, aH as NumberFormatStandardUnit, aI as NumberRatioType, aJ as NumberRoundingMode, aK as NumberScaleType, ab as ObjectMetadata, Q as ObjectSetArgs, a7 as ObjectSetSubscription, aa as ObjectSpecifier, s as OrWhereClause, aX as Osdk, u as OsdkObjectCreatePropertyType, w as OsdkObjectLinksObject, v as OsdkObjectPropertyType, aY as PageResult, t as PossibleWhereClauseFilters, aU as PrimaryKeyType, af as PropertyBooleanFormattingRule, an as PropertyDateFormattingRule, ac as PropertyDef, a9 as PropertyKeys, aq as PropertyKnownTypeFormattingRule, $ as PropertyMarkings, aL as PropertyNumberFormattingRule, aM as PropertyNumberFormattingRuleType, a0 as PropertySecurity, ao as PropertyTimestampFormattingRule, aP as PropertyTypeReference, aQ as PropertyTypeReferenceOrStringConstant, aO as PropertyValueFormattingRule, a2 as Result, T as SelectArg, U as SelectArgToKeys, ae as SimplePropertyDef, S as SingleLinkAccessor, Y as SingleOsdkResult, aR as StringConstant, aN as TimeCodeFormat, a$ as TimeSeriesPoint, b0 as TimeSeriesProperty, b1 as TimeSeriesQuery, aZ as TimeseriesDurationMapping, V as ValidAggregationKeys, ad as VersionBound, W as WhereClause, aT as WirePropertyTypes, a1 as isOk } from './ObjectSet-
|
|
1
|
+
import { A as AttachmentUpload, M as MediaReference, a as MediaUpload, b as Attachment, O as ObjectTypeDefinition, c as ObjectIdentifiers, d as OsdkObjectPrimaryKeyType, e as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, f as OsdkMetadata, R as ReleaseStatus, g as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, h as PrimaryKeyTypes, i as OsdkBase } from './ObjectSet-CqVqDXKn.cjs';
|
|
2
|
+
export { ar as Affix, j as AggregateOpts, k as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, n as AggregationClause, l as AggregationResultsWithGroups, m as AggregationResultsWithoutGroups, o as AggregationsResults, z as AllGroupByValues, p as AndWhereClause, F as AsyncIterArgs, H as Augment, J as Augments, a3 as BaseObjectSet, aS as BaseWirePropertyTypes, aV as ConvertProps, ag as DatetimeFormat, ah as DatetimeLocalizedFormat, ai as DatetimeLocalizedFormatType, aj as DatetimeStringFormat, ak as DatetimeTimezone, al as DatetimeTimezoneStatic, am as DatetimeTimezoneUser, x as DerivedProperty, D as DistanceUnitMapping, as as DurationBaseValue, at as DurationFormatStyle, y as DurationMapping, au as DurationPrecision, a4 as FetchLinksPageResult, K as FetchPageArgs, X as FetchPageResult, G as GeoFilterOptions, q as GeoFilter_Intersects, r as GeoFilter_Within, a_ as GeotimeSeriesProperty, B as GroupByClause, E as GroupByRange, av as HumanReadableFormat, a8 as InterfaceMetadata, ap as KnownType, b3 as LinkNames, a5 as LinkTypeApiNamesFor, b2 as LinkedType, aW as MaybeScore, Z as Media, _ as MediaMetadata, a6 as MinimalDirectedObjectLinkInstance, N as NotWhereClause, L as NullabilityAdherence, aw as NumberFormatAffix, ax as NumberFormatCurrency, ay as NumberFormatCurrencyStyle, az as NumberFormatCustomUnit, aA as NumberFormatDuration, aB as NumberFormatFixedValues, aC as NumberFormatNotation, aD as NumberFormatOptions, aE as NumberFormatRatio, aF as NumberFormatScale, aG as NumberFormatStandard, aH as NumberFormatStandardUnit, aI as NumberRatioType, aJ as NumberRoundingMode, aK as NumberScaleType, ab as ObjectMetadata, Q as ObjectSetArgs, a7 as ObjectSetSubscription, aa as ObjectSpecifier, s as OrWhereClause, aX as Osdk, u as OsdkObjectCreatePropertyType, w as OsdkObjectLinksObject, v as OsdkObjectPropertyType, aY as PageResult, t as PossibleWhereClauseFilters, aU as PrimaryKeyType, af as PropertyBooleanFormattingRule, an as PropertyDateFormattingRule, ac as PropertyDef, a9 as PropertyKeys, aq as PropertyKnownTypeFormattingRule, $ as PropertyMarkings, aL as PropertyNumberFormattingRule, aM as PropertyNumberFormattingRuleType, a0 as PropertySecurity, ao as PropertyTimestampFormattingRule, aP as PropertyTypeReference, aQ as PropertyTypeReferenceOrStringConstant, aO as PropertyValueFormattingRule, a2 as Result, T as SelectArg, U as SelectArgToKeys, ae as SimplePropertyDef, S as SingleLinkAccessor, Y as SingleOsdkResult, aR as StringConstant, aN as TimeCodeFormat, a$ as TimeSeriesPoint, b0 as TimeSeriesProperty, b1 as TimeSeriesQuery, aZ as TimeseriesDurationMapping, V as ValidAggregationKeys, ad as VersionBound, W as WhereClause, aT as WirePropertyTypes, a1 as isOk } from './ObjectSet-CqVqDXKn.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as ObjectOrInterfaceDefinition, a9 as PropertyKeys, M as MediaReference, L as NullabilityAdherence, T as SelectArg, aX as Osdk, b4 as ExtractOptions, K as FetchPageArgs, X as FetchPageResult, i as OsdkBase } from '../ObjectSet-
|
|
2
|
-
export { b5 as MinimalObjectSet } from '../ObjectSet-
|
|
1
|
+
import { g as ObjectOrInterfaceDefinition, a9 as PropertyKeys, M as MediaReference, L as NullabilityAdherence, T as SelectArg, aX as Osdk, b4 as ExtractOptions, K as FetchPageArgs, X as FetchPageResult, i as OsdkBase } from '../ObjectSet-CqVqDXKn.cjs';
|
|
2
|
+
export { b5 as MinimalObjectSet } from '../ObjectSet-CqVqDXKn.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhereClause.js","names":["DistanceUnitMapping"],"sources":["WhereClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { BBox, Point, Polygon } from \"geojson\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { BaseWirePropertyTypes } from \"../ontology/WirePropertyTypes.js\";\nimport type { IsNever } from \"../OsdkObjectFrom.js\";\nimport type { ArrayFilter } from \"./ArrayFilter.js\";\nimport type { BaseFilter } from \"./BaseFilter.js\";\nimport type { BooleanFilter } from \"./BooleanFilter.js\";\nimport type { DatetimeFilter } from \"./DatetimeFilter.js\";\nimport type { GeoFilter } from \"./GeoFilter.js\";\nimport type { Just } from \"./Just.js\";\nimport type { NumberFilter } from \"./NumberFilter.js\";\nimport type { StringFilter } from \"./StringFilter.js\";\n\nexport type PossibleWhereClauseFilters =\n | \"$gt\"\n | \"$eq\"\n | \"$ne\"\n | \"$isNull\"\n | \"$contains\"\n | \"$gte\"\n | \"$lt\"\n | \"$lte\"\n | \"$within\"\n | \"$in\"\n | \"$intersects\"\n | \"$startsWith\"\n | \"$containsAllTermsInOrder\"\n | \"$containsAnyTerm\"\n | \"$containsAllTerms\";\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping: {\n centimeter: \"CENTIMETERS\";\n centimeters: \"CENTIMETERS\";\n cm: \"CENTIMETERS\";\n meter: \"METERS\";\n meters: \"METERS\";\n m: \"METERS\";\n kilometer: \"KILOMETERS\";\n kilometers: \"KILOMETERS\";\n km: \"KILOMETERS\";\n inch: \"INCHES\";\n inches: \"INCHES\";\n foot: \"FEET\";\n feet: \"FEET\";\n yard: \"YARDS\";\n yards: \"YARDS\";\n mile: \"MILES\";\n miles: \"MILES\";\n nautical_mile: \"NAUTICAL_MILES\";\n nauticalMile: \"NAUTICAL_MILES\";\n \"nautical miles\": \"NAUTICAL_MILES\";\n} = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\",\n} satisfies Record<\n string,\n | \"CENTIMETERS\"\n | \"METERS\"\n | \"KILOMETERS\"\n | \"INCHES\"\n | \"FEET\"\n | \"YARDS\"\n | \"MILES\"\n | \"NAUTICAL_MILES\"\n>;\n\nexport type GeoFilter_Within = {\n \"$within\":\n | {\n $distance: [number, keyof typeof DistanceUnitMapping];\n $of: [number, number] | Readonly<Point>;\n $bbox?: never;\n $polygon?: never;\n }\n | {\n $bbox: BBox;\n $distance?: never;\n $of?: never;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n $distance?: never;\n $of?: never;\n }\n | Polygon;\n};\n\nexport type GeoFilter_Intersects = {\n \"$intersects\":\n | {\n $bbox: BBox;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n }\n | Polygon;\n};\n\ntype
|
|
1
|
+
{"version":3,"file":"WhereClause.js","names":["DistanceUnitMapping"],"sources":["WhereClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { BBox, Point, Polygon } from \"geojson\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { BaseWirePropertyTypes } from \"../ontology/WirePropertyTypes.js\";\nimport type { IsNever } from \"../OsdkObjectFrom.js\";\nimport type { ArrayFilter } from \"./ArrayFilter.js\";\nimport type { BaseFilter } from \"./BaseFilter.js\";\nimport type { BooleanFilter } from \"./BooleanFilter.js\";\nimport type { DatetimeFilter } from \"./DatetimeFilter.js\";\nimport type { GeoFilter } from \"./GeoFilter.js\";\nimport type { Just } from \"./Just.js\";\nimport type { NumberFilter } from \"./NumberFilter.js\";\nimport type { StringFilter } from \"./StringFilter.js\";\n\nexport type PossibleWhereClauseFilters =\n | \"$gt\"\n | \"$eq\"\n | \"$ne\"\n | \"$isNull\"\n | \"$contains\"\n | \"$gte\"\n | \"$lt\"\n | \"$lte\"\n | \"$within\"\n | \"$in\"\n | \"$intersects\"\n | \"$startsWith\"\n | \"$containsAllTermsInOrder\"\n | \"$containsAnyTerm\"\n | \"$containsAllTerms\";\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping: {\n centimeter: \"CENTIMETERS\";\n centimeters: \"CENTIMETERS\";\n cm: \"CENTIMETERS\";\n meter: \"METERS\";\n meters: \"METERS\";\n m: \"METERS\";\n kilometer: \"KILOMETERS\";\n kilometers: \"KILOMETERS\";\n km: \"KILOMETERS\";\n inch: \"INCHES\";\n inches: \"INCHES\";\n foot: \"FEET\";\n feet: \"FEET\";\n yard: \"YARDS\";\n yards: \"YARDS\";\n mile: \"MILES\";\n miles: \"MILES\";\n nautical_mile: \"NAUTICAL_MILES\";\n nauticalMile: \"NAUTICAL_MILES\";\n \"nautical miles\": \"NAUTICAL_MILES\";\n} = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\",\n} satisfies Record<\n string,\n | \"CENTIMETERS\"\n | \"METERS\"\n | \"KILOMETERS\"\n | \"INCHES\"\n | \"FEET\"\n | \"YARDS\"\n | \"MILES\"\n | \"NAUTICAL_MILES\"\n>;\n\nexport type GeoFilter_Within = {\n \"$within\":\n | {\n $distance: [number, keyof typeof DistanceUnitMapping];\n $of: [number, number] | Readonly<Point>;\n $bbox?: never;\n $polygon?: never;\n }\n | {\n $bbox: BBox;\n $distance?: never;\n $of?: never;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n $distance?: never;\n $of?: never;\n }\n | Polygon;\n};\n\nexport type GeoFilter_Intersects = {\n \"$intersects\":\n | {\n $bbox: BBox;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n }\n | Polygon;\n};\n\ntype BaseFilterFor<T> = T extends Record<string, BaseWirePropertyTypes>\n ? StructFilterOpts<T>\n : T extends \"string\" ? StringFilter\n : T extends \"geopoint\" | \"geoshape\" ? GeoFilter\n : T extends \"datetime\" | \"timestamp\" ? DatetimeFilter\n : T extends \"boolean\" ? BooleanFilter\n : T extends WhereClauseNumberPropertyTypes ? NumberFilter\n : BaseFilter<string>; // Fallback for unknown types\n\ntype FilterFor<PD extends ObjectMetadata.Property> = PD[\"multiplicity\"] extends\n true ? ArrayFilter<BaseFilterFor<PD[\"type\"]>>\n : PD[\"type\"] extends Record<string, BaseWirePropertyTypes>\n ? StructFilter<PD[\"type\"]> | BaseFilter.$isNull<string>\n : BaseFilterFor<PD[\"type\"]>;\n\ntype StructFilterOpts<ST extends Record<string, BaseWirePropertyTypes>> = {\n [K in keyof ST]?: FilterFor<{ \"type\": ST[K] }>;\n};\ntype StructFilter<ST extends Record<string, BaseWirePropertyTypes>> = {\n [K in keyof ST]: Just<K, StructFilterOpts<ST>>;\n}[keyof ST];\n\ntype WhereClauseNumberPropertyTypes =\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"decimal\"\n | \"byte\";\n\nexport type AndWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $and: WhereClause<T, RDPs>[];\n};\n\nexport type OrWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $or: WhereClause<T, RDPs>[];\n};\n\nexport type NotWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $not: WhereClause<T, RDPs>;\n};\n\nexport type PropertyWhereClause<T extends ObjectOrInterfaceDefinition> = {\n [P in keyof CompileTimeMetadata<T>[\"properties\"]]?: FilterFor<\n CompileTimeMetadata<T>[\"properties\"][P]\n >;\n};\n\ntype MergedPropertyWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = PropertyWhereClause<\n DerivedObjectOrInterfaceDefinition.WithDerivedProperties<T, RDPs>\n>;\n\nexport type WhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> =\n | OrWhereClause<T, RDPs>\n | AndWhereClause<T, RDPs>\n | NotWhereClause<T, RDPs>\n | (IsNever<keyof CompileTimeMetadata<T>[\"properties\"]> extends true\n ? Record<string, never>\n : MergedPropertyWhereClause<T, RDPs>);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwCA;AACA;AACA,OAAO,MAAMA,mBAqBZ,GAAG;EACF,YAAY,EAAE,aAAa;EAC3B,aAAa,EAAE,aAAa;EAC5B,IAAI,EAAE,aAAa;EACnB,OAAO,EAAE,QAAQ;EACjB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,QAAQ;EACb,WAAW,EAAE,YAAY;EACzB,YAAY,EAAE,YAAY;EAC1B,IAAI,EAAE,YAAY;EAClB,MAAM,EAAE,QAAQ;EAChB,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,MAAM;EACd,MAAM,EAAE,MAAM;EACd,MAAM,EAAE,OAAO;EACf,OAAO,EAAE,OAAO;EAChB,MAAM,EAAE,OAAO;EACf,OAAO,EAAE,OAAO;EAChB,eAAe,EAAE,gBAAgB;EACjC,cAAc,EAAE,gBAAgB;EAChC,gBAAgB,EAAE;AACpB,CAUC;;AA+CuB","ignoreList":[]}
|
|
@@ -62,15 +62,12 @@ export type GeoFilter_Intersects = {
|
|
|
62
62
|
$bbox?: never
|
|
63
63
|
} | Polygon
|
|
64
64
|
};
|
|
65
|
-
type
|
|
66
|
-
type
|
|
67
|
-
"type": ST[K]
|
|
68
|
-
}> };
|
|
65
|
+
type BaseFilterFor<T> = T extends Record<string, BaseWirePropertyTypes> ? StructFilterOpts<T> : T extends "string" ? StringFilter : T extends "geopoint" | "geoshape" ? GeoFilter : T extends "datetime" | "timestamp" ? DatetimeFilter : T extends "boolean" ? BooleanFilter : T extends WhereClauseNumberPropertyTypes ? NumberFilter : BaseFilter<string>;
|
|
66
|
+
type FilterFor<PD extends ObjectMetadata.Property> = PD["multiplicity"] extends true ? ArrayFilter<BaseFilterFor<PD["type"]>> : PD["type"] extends Record<string, BaseWirePropertyTypes> ? StructFilter<PD["type"]> | BaseFilter.$isNull<string> : BaseFilterFor<PD["type"]>;
|
|
69
67
|
type StructFilterOpts<ST extends Record<string, BaseWirePropertyTypes>> = { [K in keyof ST]? : FilterFor<{
|
|
70
68
|
"type": ST[K]
|
|
71
69
|
}> };
|
|
72
70
|
type StructFilter<ST extends Record<string, BaseWirePropertyTypes>> = { [K in keyof ST] : Just<K, StructFilterOpts<ST>> }[keyof ST];
|
|
73
|
-
type PropertyTypesRepresentedAsStringsForArrayWhereClause = "string" | "geopoint" | "geoshape" | "datetime" | "timestamp";
|
|
74
71
|
type WhereClauseNumberPropertyTypes = "double" | "integer" | "long" | "float" | "decimal" | "byte";
|
|
75
72
|
export type AndWhereClause<
|
|
76
73
|
T extends ObjectOrInterfaceDefinition,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,MAAM,OAAO,eAAe,SAAU;AACpD,cACE,oCACA,mCACK,kCAAmC;AAC1C,cACE,qBACA,sBACK,q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GAAG,iBAAiB,aACpC;KAEH,iCACD,WACA,YACA,SACA,UACA,YACA;AAEJ,YAAY;CACV,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;IACjD;CACF,MAAM,YAAY,GAAG;AACtB;AAED,YAAY;CACV,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;IACjD;CACF,KAAK,YAAY,GAAG;AACrB;AAED,YAAY;CACV,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;IACjD;CACF,MAAM,YAAY,GAAG;AACtB;AAED,YAAY,oBAAoB,UAAU,kCACvC,WAAW,oBAAoB,GAAG,kBAAiB,UAClD,oBAAoB,GAAG,cAAc;KAIpC;CACH,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;IACjD,oBACF,mCAAmC,sBAAsB,GAAG;AAG9D,YAAY;CACV,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;IAEjD,cAAc,GAAG,QACjB,eAAe,GAAG,QAClB,eAAe,GAAG,SACjB,cAAc,oBAAoB,GAAG,uBAAuB,OAC3D,wBACA,0BAA0B,GAAG","names":["DistanceUnitMapping: {\n centimeter: \"CENTIMETERS\";\n centimeters: \"CENTIMETERS\";\n cm: \"CENTIMETERS\";\n meter: \"METERS\";\n meters: \"METERS\";\n m: \"METERS\";\n kilometer: \"KILOMETERS\";\n kilometers: \"KILOMETERS\";\n km: \"KILOMETERS\";\n inch: \"INCHES\";\n inches: \"INCHES\";\n foot: \"FEET\";\n feet: \"FEET\";\n yard: \"YARDS\";\n yards: \"YARDS\";\n mile: \"MILES\";\n miles: \"MILES\";\n nautical_mile: \"NAUTICAL_MILES\";\n nauticalMile: \"NAUTICAL_MILES\";\n \"nautical miles\": \"NAUTICAL_MILES\";\n}"],"sources":["../../../src/aggregate/WhereClause.ts"],"version":3,"file":"WhereClause.d.ts"}
|