@osdk/api 2.3.1 → 2.4.0-beta.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/CHANGELOG.md +25 -15
- package/build/browser/OsdkObjectFrom.js.map +1 -1
- package/build/browser/actions/Actions.js.map +1 -1
- package/build/browser/actions/NullValue.js +18 -0
- package/build/browser/actions/NullValue.js.map +1 -0
- package/build/browser/aggregate/AggregateOptsThatErrors.js.map +1 -1
- package/build/browser/aggregate/AggregationResultsWithGroups.js.map +1 -1
- package/build/browser/derivedProperties/DerivedProperty.js +1 -16
- package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/browser/derivedProperties/Expressions.js +2 -0
- package/build/browser/derivedProperties/Expressions.js.map +1 -0
- package/build/browser/groupby/GroupByClause.js.map +1 -1
- package/build/browser/index.js +1 -0
- package/build/browser/index.js.map +1 -1
- package/build/browser/mapping/DataValueMapping.js.map +1 -1
- package/build/browser/mapping/PropertyValueMapping.js.map +1 -1
- package/build/browser/object/Media.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +240 -8
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
- package/build/browser/ontology/WirePropertyTypes.js.map +1 -1
- package/build/browser/test/EmployeeApiTest.js.map +1 -1
- package/build/cjs/{ObjectSet-DwxUt6uD.d.cts → ObjectSet-DmnkezS6.d.cts} +112 -15
- package/build/cjs/index.cjs +4 -0
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +13 -4
- package/build/cjs/public/unstable.d.cts +2 -2
- package/build/esm/OsdkObjectFrom.js.map +1 -1
- package/build/esm/actions/Actions.js.map +1 -1
- package/build/esm/actions/NullValue.js +18 -0
- package/build/esm/actions/NullValue.js.map +1 -0
- package/build/esm/aggregate/AggregateOptsThatErrors.js.map +1 -1
- package/build/esm/aggregate/AggregationResultsWithGroups.js.map +1 -1
- package/build/esm/derivedProperties/DerivedProperty.js +1 -16
- package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/esm/derivedProperties/Expressions.js +2 -0
- package/build/esm/derivedProperties/Expressions.js.map +1 -0
- package/build/esm/groupby/GroupByClause.js.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/mapping/DataValueMapping.js.map +1 -1
- package/build/esm/mapping/PropertyValueMapping.js.map +1 -1
- package/build/esm/object/Media.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +240 -8
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
- package/build/esm/ontology/WirePropertyTypes.js.map +1 -1
- package/build/esm/test/EmployeeApiTest.js.map +1 -1
- package/build/types/OsdkObjectFrom.d.ts +8 -2
- package/build/types/OsdkObjectFrom.d.ts.map +1 -1
- package/build/types/actions/Actions.d.ts +2 -0
- package/build/types/actions/Actions.d.ts.map +1 -1
- package/build/types/actions/NullValue.d.ts +3 -0
- package/build/types/actions/NullValue.d.ts.map +1 -0
- package/build/types/aggregate/AggregateOptsThatErrors.d.ts +9 -1
- package/build/types/aggregate/AggregateOptsThatErrors.d.ts.map +1 -1
- package/build/types/aggregate/AggregationResultsWithGroups.d.ts +10 -1
- package/build/types/aggregate/AggregationResultsWithGroups.d.ts.map +1 -1
- package/build/types/derivedProperties/DerivedProperty.d.ts +32 -6
- package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
- package/build/types/derivedProperties/Expressions.d.ts +53 -0
- package/build/types/derivedProperties/Expressions.d.ts.map +1 -0
- package/build/types/groupby/GroupByClause.d.ts +10 -2
- package/build/types/groupby/GroupByClause.d.ts.map +1 -1
- package/build/types/index.d.ts +3 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/mapping/DataValueMapping.d.ts +2 -2
- package/build/types/mapping/DataValueMapping.d.ts.map +1 -1
- package/build/types/mapping/PropertyValueMapping.d.ts +2 -0
- package/build/types/mapping/PropertyValueMapping.d.ts.map +1 -1
- package/build/types/object/Media.d.ts +7 -0
- package/build/types/object/Media.d.ts.map +1 -1
- package/build/types/objectSet/ObjectSet.d.ts +16 -1
- package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
- package/build/types/objectSet/ObjectSet.test.d.ts.map +1 -1
- package/build/types/ontology/WirePropertyTypes.d.ts +1 -1
- package/build/types/ontology/WirePropertyTypes.d.ts.map +1 -1
- package/build/types/test/EmployeeApiTest.d.ts +5 -1
- package/build/types/test/EmployeeApiTest.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployeeApiTest.js","names":["EmployeeApiTest","type","apiName"],"sources":["EmployeeApiTest.ts"],"sourcesContent":["/*\n * Copyright 2025 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 {\n ObjectMetadata as $ObjectMetadata,\n ObjectSet as $ObjectSet,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n PropertyDef as $PropertyDef,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n} from \"../index.js\";\n\nexport namespace EmployeeApiTest {\n export type PropertyKeys =\n | \"employeeId\"\n | \"fullName\"\n | \"class\"\n | \"attachment\"\n | \"geopoint\"\n | \"timeseries\"\n | \"mediaReference\"\n | \"geotimeSeriesReference\"\n | \"isActive\"\n | \"yearsOfExperience\"\n | \"rank\"\n | \"performanceScore\"\n | \"hourlyRate\"\n | \"dateOfJoining\"\n | \"lastUpdated\";\n\n export interface Links {\n readonly lead: $SingleLinkAccessor<EmployeeApiTest>;\n readonly peeps: EmployeeApiTest.ObjectSet;\n }\n\n export interface Props {\n readonly class: $PropType[\"string\"] | undefined;\n readonly fullName: $PropType[\"string\"] | undefined;\n readonly employeeId: $PropType[\"integer\"] | undefined;\n readonly attachment: $PropType[\"attachment\"] | undefined;\n readonly geopoint: $PropType[\"geopoint\"] | undefined;\n readonly timeseries: $PropType[\"numericTimeseries\"] | undefined;\n readonly mediaReference: $PropType[\"mediaReference\"] | undefined;\n readonly geotimeSeriesReference:\n | $PropType[\"geotimeSeriesReference\"]\n | undefined;\n readonly isActive: $PropType[\"boolean\"] | undefined;\n readonly yearsOfExperience: $PropType[\"long\"] | undefined;\n readonly rank: $PropType[\"short\"] | undefined;\n readonly performanceScore: $PropType[\"double\"] | undefined;\n readonly hourlyRate: $PropType[\"float\"] | undefined;\n readonly dateOfJoining: $PropType[\"datetime\"] | undefined;\n readonly lastUpdated: $PropType[\"timestamp\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet\n extends $ObjectSet<EmployeeApiTest, EmployeeApiTest.ObjectSet>\n {}\n}\n\nexport interface EmployeeApiTest extends $ObjectTypeDefinition {\n type: \"object\";\n apiName: \"Employee\";\n __DefinitionMetadata?: {\n objectSet: EmployeeApiTest.ObjectSet;\n props: EmployeeApiTest.Props;\n linksType: EmployeeApiTest.Links;\n strictProps: EmployeeApiTest.StrictProps;\n apiName: \"Employee\";\n description: \"A full-time or part-time \\n\\n employee of our firm\";\n displayName: \"Employee\";\n icon: {\n type: \"blueprint\";\n color: \"blue\";\n name: \"person\";\n };\n implements: [\"FooInterface\"];\n interfaceMap: {\n FooInterface: {\n fooSpt: \"fullName\";\n };\n };\n inverseInterfaceMap: {\n FooInterface: {\n fullName: \"fooSpt\";\n };\n };\n links: {\n lead: $ObjectMetadata.Link<EmployeeApiTest, false>;\n peeps: $ObjectMetadata.Link<EmployeeApiTest, true>;\n };\n pluralDisplayName: \"Employees\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n properties: {\n class: $PropertyDef<\"string\", \"nullable\", \"single\">;\n fullName: $PropertyDef<\"string\", \"nullable\", \"single\">;\n employeeId: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n attachment: $PropertyDef<\"attachment\", \"nullable\", \"single\">;\n geopoint: $PropertyDef<\"geopoint\", \"nullable\", \"single\">;\n timeseries: $PropertyDef<\"numericTimeseries\", \"nullable\", \"single\">;\n mediaReference: $PropertyDef<\"mediaReference\", \"nullable\", \"single\">;\n geotimeSeriesReference: $PropertyDef<\n \"geotimeSeriesReference\",\n \"nullable\",\n \"single\"\n >;\n isActive: $PropertyDef<\"boolean\", \"nullable\", \"single\">;\n yearsOfExperience: $PropertyDef<\"long\", \"nullable\", \"single\">;\n rank: $PropertyDef<\"short\", \"nullable\", \"single\">;\n performanceScore: $PropertyDef<\"double\", \"nullable\", \"single\">;\n hourlyRate: $PropertyDef<\"float\", \"nullable\", \"single\">;\n dateOfJoining: $PropertyDef<\"datetime\", \"nullable\", \"single\">;\n lastUpdated: $PropertyDef<\"timestamp\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\";\n status: \"ACTIVE\";\n titleProperty: \"fullName\";\n type: \"object\";\n visibility: \"NORMAL\";\n };\n}\n\nexport const EmployeeApiTest: EmployeeApiTest = {\n type: \"object\",\n apiName: \"Employee\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"file":"EmployeeApiTest.js","names":["EmployeeApiTest","type","apiName"],"sources":["EmployeeApiTest.ts"],"sourcesContent":["/*\n * Copyright 2025 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 {\n ObjectMetadata as $ObjectMetadata,\n ObjectSet as $ObjectSet,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n PropertyDef as $PropertyDef,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n} from \"../index.js\";\n\nexport namespace EmployeeApiTest {\n export type PropertyKeys =\n | \"employeeId\"\n | \"fullName\"\n | \"class\"\n | \"attachment\"\n | \"geopoint\"\n | \"timeseries\"\n | \"mediaReference\"\n | \"geotimeSeriesReference\"\n | \"isActive\"\n | \"yearsOfExperience\"\n | \"rank\"\n | \"performanceScore\"\n | \"hourlyRate\"\n | \"dateOfJoining\"\n | \"lastUpdated\"\n | \"skillSet\"\n | \"skillSetEmbedding\";\n\n export interface Links {\n readonly lead: $SingleLinkAccessor<EmployeeApiTest>;\n readonly peeps: EmployeeApiTest.ObjectSet;\n }\n\n export interface Props {\n readonly class: $PropType[\"string\"] | undefined;\n readonly fullName: $PropType[\"string\"] | undefined;\n readonly employeeId: $PropType[\"integer\"] | undefined;\n readonly attachment: $PropType[\"attachment\"] | undefined;\n readonly geopoint: $PropType[\"geopoint\"] | undefined;\n readonly timeseries: $PropType[\"numericTimeseries\"] | undefined;\n readonly mediaReference: $PropType[\"mediaReference\"] | undefined;\n readonly geotimeSeriesReference:\n | $PropType[\"geotimeSeriesReference\"]\n | undefined;\n readonly isActive: $PropType[\"boolean\"] | undefined;\n readonly yearsOfExperience: $PropType[\"long\"] | undefined;\n readonly rank: $PropType[\"short\"] | undefined;\n readonly performanceScore: $PropType[\"double\"] | undefined;\n readonly hourlyRate: $PropType[\"float\"] | undefined;\n readonly dateOfJoining: $PropType[\"datetime\"] | undefined;\n readonly lastUpdated: $PropType[\"timestamp\"] | undefined;\n readonly skillSet: $PropType[\"string\"] | undefined;\n readonly skillSetEmbedding: $PropType[\"vector\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet\n extends $ObjectSet<EmployeeApiTest, EmployeeApiTest.ObjectSet>\n {}\n}\n\nexport interface EmployeeApiTest extends $ObjectTypeDefinition {\n type: \"object\";\n apiName: \"Employee\";\n __DefinitionMetadata?: {\n objectSet: EmployeeApiTest.ObjectSet;\n props: EmployeeApiTest.Props;\n linksType: EmployeeApiTest.Links;\n strictProps: EmployeeApiTest.StrictProps;\n apiName: \"Employee\";\n description: \"A full-time or part-time \\n\\n employee of our firm\";\n displayName: \"Employee\";\n icon: {\n type: \"blueprint\";\n color: \"blue\";\n name: \"person\";\n };\n implements: [\"FooInterface\"];\n interfaceMap: {\n FooInterface: {\n fooSpt: \"fullName\";\n };\n };\n inverseInterfaceMap: {\n FooInterface: {\n fullName: \"fooSpt\";\n };\n };\n links: {\n lead: $ObjectMetadata.Link<EmployeeApiTest, false>;\n peeps: $ObjectMetadata.Link<EmployeeApiTest, true>;\n };\n pluralDisplayName: \"Employees\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n properties: {\n class: $PropertyDef<\"string\", \"nullable\", \"single\">;\n fullName: $PropertyDef<\"string\", \"nullable\", \"single\">;\n employeeId: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n attachment: $PropertyDef<\"attachment\", \"nullable\", \"single\">;\n geopoint: $PropertyDef<\"geopoint\", \"nullable\", \"single\">;\n timeseries: $PropertyDef<\"numericTimeseries\", \"nullable\", \"single\">;\n mediaReference: $PropertyDef<\"mediaReference\", \"nullable\", \"single\">;\n geotimeSeriesReference: $PropertyDef<\n \"geotimeSeriesReference\",\n \"nullable\",\n \"single\"\n >;\n isActive: $PropertyDef<\"boolean\", \"nullable\", \"single\">;\n yearsOfExperience: $PropertyDef<\"long\", \"nullable\", \"single\">;\n rank: $PropertyDef<\"short\", \"nullable\", \"single\">;\n performanceScore: $PropertyDef<\"double\", \"nullable\", \"single\">;\n hourlyRate: $PropertyDef<\"float\", \"nullable\", \"single\">;\n dateOfJoining: $PropertyDef<\"datetime\", \"nullable\", \"single\">;\n lastUpdated: $PropertyDef<\"timestamp\", \"nullable\", \"single\">;\n skillSet: $PropertyDef<\"string\", \"nullable\", \"single\">;\n skillSetEmbedding: $PropertyDef<\"vector\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\";\n status: \"ACTIVE\";\n titleProperty: \"fullName\";\n type: \"object\";\n visibility: \"NORMAL\";\n };\n}\n\nexport const EmployeeApiTest: EmployeeApiTest = {\n type: \"object\",\n apiName: \"Employee\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiIA,OAAO,MAAMA,eAAgC,GAAG;EAC9CC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
|
|
@@ -52,6 +52,13 @@ interface MediaReference {
|
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Object for uploading Media
|
|
57
|
+
*/
|
|
58
|
+
interface MediaUpload {
|
|
59
|
+
readonly path: string;
|
|
60
|
+
readonly data: Blob;
|
|
61
|
+
}
|
|
55
62
|
/**
|
|
56
63
|
* Metadata of a media item
|
|
57
64
|
*/
|
|
@@ -217,6 +224,7 @@ interface PropertyValueWireToClient {
|
|
|
217
224
|
stringTimeseries: TimeSeriesProperty<string>;
|
|
218
225
|
sensorTimeseries: TimeSeriesProperty<string | number>;
|
|
219
226
|
geotimeSeriesReference: GeotimeSeriesProperty<GeoJSON.Point>;
|
|
227
|
+
vector: number[];
|
|
220
228
|
}
|
|
221
229
|
type GetClientPropertyValueFromWire<T extends keyof PropertyValueWireToClient | Record<string, keyof PropertyValueWireToClient>> = T extends keyof PropertyValueWireToClient ? PropertyValueWireToClient[T] : T extends Record<string, keyof PropertyValueWireToClient> ? {
|
|
222
230
|
[K in keyof T]: PropertyValueWireToClient[T[K]];
|
|
@@ -247,6 +255,7 @@ interface PropertyValueClientToWire {
|
|
|
247
255
|
stringTimeseries: TimeSeriesProperty<string>;
|
|
248
256
|
sensorTimeseries: TimeSeriesProperty<string | number>;
|
|
249
257
|
geotimeSeriesReference: GeotimeSeriesProperty<GeoJSON.Point>;
|
|
258
|
+
vector: number[];
|
|
250
259
|
}
|
|
251
260
|
type GetWirePropertyValueFromClient<T extends keyof PropertyValueClientToWire | Record<string, keyof PropertyValueClientToWire>> = T extends keyof PropertyValueClientToWire ? PropertyValueClientToWire[T] : T extends Record<string, keyof PropertyValueClientToWire> ? {
|
|
252
261
|
[K in keyof T]: PropertyValueClientToWire[T[K]];
|
|
@@ -291,7 +300,7 @@ type PrimaryKeyTypes = "string" | "datetime" | "double" | "integer" | "timestamp
|
|
|
291
300
|
type VersionString<Major extends number, Minor extends number, Patch extends number> = `${Major}.${Minor}.${Patch}`;
|
|
292
301
|
|
|
293
302
|
type WirePropertyTypes = BaseWirePropertyTypes | Record<string, BaseWirePropertyTypes>;
|
|
294
|
-
type BaseWirePropertyTypes = "string" | "datetime" | "double" | "boolean" | "integer" | "timestamp" | "short" | "long" | "float" | "decimal" | "byte" | "marking" | "mediaReference" | "numericTimeseries" | "stringTimeseries" | "sensorTimeseries" | "attachment" | "geopoint" | "geoshape" | "geotimeSeriesReference";
|
|
303
|
+
type BaseWirePropertyTypes = "string" | "datetime" | "double" | "boolean" | "integer" | "timestamp" | "short" | "long" | "float" | "decimal" | "byte" | "marking" | "mediaReference" | "numericTimeseries" | "stringTimeseries" | "sensorTimeseries" | "attachment" | "geopoint" | "geoshape" | "geotimeSeriesReference" | "vector";
|
|
295
304
|
|
|
296
305
|
type CompileTimeMetadata<T extends {
|
|
297
306
|
__DefinitionMetadata?: {};
|
|
@@ -450,8 +459,16 @@ type BaseGroupByValue = "exact" | {
|
|
|
450
459
|
type ExactGroupByWithOptions = {
|
|
451
460
|
$exact: {
|
|
452
461
|
$limit?: number;
|
|
453
|
-
|
|
454
|
-
|
|
462
|
+
} & ({
|
|
463
|
+
$defaultValue?: undefined;
|
|
464
|
+
$includeNullValue?: false;
|
|
465
|
+
} | {
|
|
466
|
+
$defaultValue: string;
|
|
467
|
+
$includeNullValue?: false;
|
|
468
|
+
} | {
|
|
469
|
+
$defaultValue?: never;
|
|
470
|
+
$includeNullValue: true;
|
|
471
|
+
});
|
|
455
472
|
};
|
|
456
473
|
type GroupByRange<T> = [T, T];
|
|
457
474
|
type StringGroupByValue = BaseGroupByValue;
|
|
@@ -528,10 +545,20 @@ type AggregateOpts<Q extends ObjectOrInterfaceDefinition> = {
|
|
|
528
545
|
$groupBy?: GroupByClause<Q>;
|
|
529
546
|
};
|
|
530
547
|
|
|
531
|
-
type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> =
|
|
548
|
+
type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> = ContainsExactMatchWithNull<AO["$groupBy"]> extends true ? {
|
|
549
|
+
$groupBy: AO["$groupBy"];
|
|
550
|
+
$select: UnorderedAggregationClause<Q>;
|
|
551
|
+
} : SingleKeyObject<AO["$groupBy"]> extends never ? (AO["$select"] extends UnorderedAggregationClause<Q> ? AggregateOptsThatErrors<Q, AO> : {} extends AO["$groupBy"] ? AggregateOptsThatErrors<Q, AO> : {
|
|
532
552
|
$groupBy: AO["$groupBy"];
|
|
533
553
|
$select: UnorderedAggregationClause<Q>;
|
|
534
554
|
}) : AggregateOptsThatErrors<Q, AO>;
|
|
555
|
+
type ContainsExactMatchWithNull<GB extends GroupByClause<any> | undefined> = undefined extends GB ? false : {} extends GB ? false : {
|
|
556
|
+
[P in keyof GB]: GB[P] extends {
|
|
557
|
+
$exact: {
|
|
558
|
+
$includeNullValue: true;
|
|
559
|
+
};
|
|
560
|
+
} ? true : false;
|
|
561
|
+
}[keyof GB];
|
|
535
562
|
type AggregateOptsThatErrors<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> = AO & {
|
|
536
563
|
$select: Pick<AO["$select"], keyof AggregateOpts<Q>["$select"] & keyof AO["$select"]> & Record<Exclude<keyof AO["$select"], keyof AggregateOpts<Q>["$select"]>, never>;
|
|
537
564
|
} & (unknown extends AO["$groupBy"] ? {} : Exclude<AO["$groupBy"], undefined> extends never ? {} : {
|
|
@@ -541,18 +568,18 @@ type AggregateOptsThatErrors<Q extends ObjectOrInterfaceDefinition, AO extends A
|
|
|
541
568
|
type MaybeArray<T extends {
|
|
542
569
|
multiplicity?: boolean | undefined;
|
|
543
570
|
}, U> = T["multiplicity"] extends true ? Array<U> : U;
|
|
544
|
-
type MaybeNullable<T extends ObjectMetadata.Property, U> = T["nullable"] extends true ? U | undefined : U;
|
|
571
|
+
type MaybeNullable$1<T extends ObjectMetadata.Property, U> = T["nullable"] extends true ? U | undefined : U;
|
|
545
572
|
type Converted<T> = T extends Array<any> ? T[1] : T;
|
|
546
573
|
/**
|
|
547
574
|
* @param {T} ObjectMetadata.Property in literal form
|
|
548
575
|
* @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`
|
|
549
576
|
*/
|
|
550
|
-
type OsdkObjectPropertyType<T extends ObjectMetadata.Property, STRICTLY_ENFORCE_NULLABLE extends boolean = true> = STRICTLY_ENFORCE_NULLABLE extends false ? MaybeArray<T, Converted<GetClientPropertyValueFromWire<T["type"]>>> | undefined : MaybeNullable<T, MaybeArray<T, Converted<GetClientPropertyValueFromWire<T["type"]>>>>;
|
|
577
|
+
type OsdkObjectPropertyType<T extends ObjectMetadata.Property, STRICTLY_ENFORCE_NULLABLE extends boolean = true> = STRICTLY_ENFORCE_NULLABLE extends false ? MaybeArray<T, Converted<GetClientPropertyValueFromWire<T["type"]>>> | undefined : MaybeNullable$1<T, MaybeArray<T, Converted<GetClientPropertyValueFromWire<T["type"]>>>>;
|
|
551
578
|
/**
|
|
552
579
|
* @param {T} ObjectMetadata.Property in literal form
|
|
553
580
|
* @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`
|
|
554
581
|
*/
|
|
555
|
-
type OsdkObjectCreatePropertyType<T extends ObjectMetadata.Property, STRICTLY_ENFORCE_NULLABLE extends boolean = true> = STRICTLY_ENFORCE_NULLABLE extends false ? MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T["type"]>>> | undefined : MaybeNullable<T, MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T["type"]>>>>;
|
|
582
|
+
type OsdkObjectCreatePropertyType<T extends ObjectMetadata.Property, STRICTLY_ENFORCE_NULLABLE extends boolean = true> = STRICTLY_ENFORCE_NULLABLE extends false ? MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T["type"]>>> | undefined : MaybeNullable$1<T, MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T["type"]>>>>;
|
|
556
583
|
|
|
557
584
|
type ExtractPropName<T extends string> = T extends `${infer PropName}:${string}` ? PropName : T extends "$count" ? T : never;
|
|
558
585
|
type ExtractMetricNameForPropName<T, PropName extends string> = T extends `${PropName}:${infer MetricName}` ? MetricName : never;
|
|
@@ -569,9 +596,14 @@ type AggregationResultsWithGroups<Q extends ObjectOrInterfaceDefinition, A exten
|
|
|
569
596
|
} ? {
|
|
570
597
|
startValue: T;
|
|
571
598
|
endValue: T;
|
|
572
|
-
} : OsdkObjectPropertyType<CompileTimeMetadata<Q>["properties"][P], true
|
|
599
|
+
} : MaybeNullable<G[P], OsdkObjectPropertyType<CompileTimeMetadata<Q>["properties"][P], true>>;
|
|
573
600
|
};
|
|
574
601
|
} & AggregationResultsWithoutGroups<Q, A>)[];
|
|
602
|
+
type MaybeNullable<GROUP, VALUE> = GROUP extends {
|
|
603
|
+
$exact: {
|
|
604
|
+
$includeNullValue: true;
|
|
605
|
+
};
|
|
606
|
+
} ? VALUE | null : VALUE;
|
|
575
607
|
|
|
576
608
|
type AggregationsResults<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> = Exclude<keyof AO["$select"], ValidAggregationKeys<Q>> extends never ? unknown extends AO["$groupBy"] ? AggregationResultsWithoutGroups<Q, AO["$select"]> : Exclude<AO["$groupBy"], undefined> extends never ? AggregationResultsWithoutGroups<Q, AO["$select"]> : Exclude<keyof AO["$groupBy"], AggregatableKeys<Q>> extends never ? AggregationResultsWithGroups<Q, AO["$select"], AO["$groupBy"]> : `Sorry, the following are not valid groups for an aggregation: ${Exclude<keyof AO["$groupBy"] & string, AggregatableKeys<Q>>}` : `Sorry, the following are not valid selectors for an aggregation: ${Exclude<keyof AO["$select"] & string, ValidAggregationKeys<Q>>}`;
|
|
577
609
|
|
|
@@ -722,6 +754,12 @@ declare namespace Osdk {
|
|
|
722
754
|
readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(updatedObject?: Osdk.Instance<Q, any, NEW_PROPS> | {
|
|
723
755
|
[K in NEW_PROPS]?: CompileTimeMetadata<Q>["props"][K];
|
|
724
756
|
}) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;
|
|
757
|
+
readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata: Q extends ObjectTypeDefinition ? {
|
|
758
|
+
ObjectMetadata: Q;
|
|
759
|
+
} : {
|
|
760
|
+
ObjectMetadata: ObjectMetadata;
|
|
761
|
+
InterfaceMetadata: InterfaceMetadata;
|
|
762
|
+
};
|
|
725
763
|
} & (IsNever<OPTIONS> extends true ? {} : IsAny<OPTIONS> extends true ? {} : "$rid" extends OPTIONS ? {
|
|
726
764
|
readonly $rid: string;
|
|
727
765
|
} : {});
|
|
@@ -982,36 +1020,80 @@ type WhereClause<T extends ObjectOrInterfaceDefinition> = OrWhereClause<T> | And
|
|
|
982
1020
|
type LinkNames<Q extends ObjectOrInterfaceDefinition> = keyof CompileTimeMetadata<Q>["links"] & string;
|
|
983
1021
|
type LinkedType<Q extends ObjectOrInterfaceDefinition, L extends LinkNames<Q>> = NonNullable<CompileTimeMetadata<Q>["links"][L]["__OsdkLinkTargetType"]>;
|
|
984
1022
|
|
|
1023
|
+
type WithPropertiesNumerics = "integer" | "double" | "float" | "short" | "long";
|
|
1024
|
+
type WithPropertiesDatetime = "datetime" | "timestamp";
|
|
1025
|
+
type DefinitionForType<Q extends ObjectOrInterfaceDefinition, T extends SimplePropertyDef> = SimplePropertyDef.ExtractMultiplicity<T> extends "array" ? DerivedProperty.Definition<T, Q> : SimplePropertyDef.ExtractWirePropertyType<T> extends WithPropertiesNumerics ? DerivedProperty.NumericPropertyDefinition<T, Q> : SimplePropertyDef.ExtractWirePropertyType<T> extends WithPropertiesDatetime ? DerivedProperty.DatetimePropertyDefinition<T, Q> : DerivedProperty.Definition<T, Q>;
|
|
1026
|
+
type NumericExpressionArg<Q extends ObjectOrInterfaceDefinition> = number | DerivedProperty.NumericPropertyDefinition<any, Q>;
|
|
1027
|
+
type ReturnTypeForNumericMethod<Q extends ObjectOrInterfaceDefinition, LEFT extends WirePropertyTypes, RIGHT extends WirePropertyTypes> = "double" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q> : "float" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q> : "long" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q> : DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>;
|
|
1028
|
+
type ReturnTypeForDatetimeMethod<Q extends ObjectOrInterfaceDefinition, LEFT extends WirePropertyTypes, RIGHT extends WirePropertyTypes> = "timestamp" extends (LEFT | RIGHT) ? DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q> : DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>;
|
|
1029
|
+
type ExtractWirePropertyTypeFromNumericArg<Q extends ObjectOrInterfaceDefinition, ARG extends NumericExpressionArg<Q>> = ARG extends number ? "double" : ARG extends DerivedProperty.NumericPropertyDefinition<infer T, Q> ? T extends SimplePropertyDef ? SimplePropertyDef.ExtractWirePropertyType<T> : never : ARG extends PropertyKeys.Filtered<Q, WithPropertiesNumerics> ? NonNullable<CompileTimeMetadata<Q>["properties"][ARG]["type"]> : never;
|
|
1030
|
+
type NumericExpressions<Q extends ObjectOrInterfaceDefinition, LEFT_PROPERTY_TYPE extends SimplePropertyDef> = {
|
|
1031
|
+
readonly add: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
1032
|
+
readonly subtract: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
1033
|
+
readonly multiply: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
1034
|
+
readonly divide: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
1035
|
+
readonly abs: () => DerivedProperty.NumericPropertyDefinition<LEFT_PROPERTY_TYPE, Q>;
|
|
1036
|
+
readonly negate: () => DerivedProperty.NumericPropertyDefinition<LEFT_PROPERTY_TYPE, Q>;
|
|
1037
|
+
readonly max: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
1038
|
+
readonly min: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
1039
|
+
};
|
|
1040
|
+
type DatetimeExpressionArg<Q extends ObjectOrInterfaceDefinition> = DerivedProperty.DatetimePropertyDefinition<any, Q>;
|
|
1041
|
+
type ExtractPropertyTypeFromDatetimeArg<Q extends ObjectOrInterfaceDefinition, ARG extends DatetimeExpressionArg<Q>> = ARG extends DerivedProperty.DatetimePropertyDefinition<infer T, Q> ? T extends SimplePropertyDef ? SimplePropertyDef.ExtractWirePropertyType<T> : never : ARG extends PropertyKeys.Filtered<Q, WithPropertiesDatetime> ? NonNullable<CompileTimeMetadata<Q>["properties"][ARG]["type"]> : never;
|
|
1042
|
+
type DatetimeExpressions<Q extends ObjectOrInterfaceDefinition, LEFT_PROPERTY_TYPE extends SimplePropertyDef> = {
|
|
1043
|
+
readonly min: <A extends DatetimeExpressionArg<Q>>(value: A) => ReturnTypeForDatetimeMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractPropertyTypeFromDatetimeArg<Q, A>>;
|
|
1044
|
+
readonly max: (value: DatetimeExpressionArg<Q>) => ReturnTypeForDatetimeMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractPropertyTypeFromDatetimeArg<Q, typeof value>>;
|
|
1045
|
+
readonly extractPart: (value: DerivedProperty.ValidParts) => DerivedProperty.Definition<SimplePropertyDef.Make<"string", "non-nullable", "single">, Q>;
|
|
1046
|
+
};
|
|
1047
|
+
|
|
985
1048
|
declare const DerivedPropertyDefinitionBrand: unique symbol;
|
|
986
1049
|
declare namespace DerivedProperty {
|
|
987
1050
|
export interface Definition<T extends SimplePropertyDef, Q extends ObjectOrInterfaceDefinition> {
|
|
988
1051
|
readonly [DerivedPropertyDefinitionBrand]: true;
|
|
989
1052
|
}
|
|
1053
|
+
export interface NumericPropertyDefinition<T extends SimplePropertyDef, Q extends ObjectOrInterfaceDefinition> extends Definition<T, Q>, NumericExpressions<Q, T> {
|
|
1054
|
+
}
|
|
1055
|
+
export interface DatetimePropertyDefinition<T extends SimplePropertyDef, Q extends ObjectOrInterfaceDefinition> extends Definition<T, Q>, DatetimeExpressions<Q, T> {
|
|
1056
|
+
}
|
|
990
1057
|
export type Clause<Q extends ObjectOrInterfaceDefinition> = {
|
|
991
1058
|
[key: string]: DerivedPropertyCreator<Q, SimplePropertyDef>;
|
|
992
1059
|
};
|
|
993
1060
|
interface BaseBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {
|
|
994
1061
|
}
|
|
995
|
-
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED> {
|
|
1062
|
+
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q>, Constant<Q> {
|
|
996
1063
|
}
|
|
997
1064
|
export interface AggregateBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {
|
|
998
1065
|
}
|
|
1066
|
+
export interface SelectPropertyBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {
|
|
1067
|
+
}
|
|
1068
|
+
export type ValidParts = "DAYS" | "MONTHS" | "QUARTERS" | "YEARS";
|
|
999
1069
|
export { };
|
|
1000
1070
|
}
|
|
1001
|
-
type DerivedPropertyCreator<Q extends ObjectOrInterfaceDefinition, T extends SimplePropertyDef> = (baseObjectSet: DerivedProperty.Builder<Q, false>) => DerivedProperty.Definition<T, Q>;
|
|
1002
|
-
type BuilderTypeFromConstraint<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true> : DerivedProperty.
|
|
1071
|
+
type DerivedPropertyCreator<Q extends ObjectOrInterfaceDefinition, T extends SimplePropertyDef> = (baseObjectSet: DerivedProperty.Builder<Q, false>) => DerivedProperty.Definition<T, Q> | DerivedProperty.NumericPropertyDefinition<T, Q> | DerivedProperty.DatetimePropertyDefinition<T, Q>;
|
|
1072
|
+
type BuilderTypeFromConstraint<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true> : DerivedProperty.SelectPropertyBuilder<Q, false>;
|
|
1003
1073
|
type Filterable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
|
|
1004
1074
|
readonly where: (clause: WhereClause<Q>) => BuilderTypeFromConstraint<Q, CONSTRAINED>;
|
|
1005
1075
|
};
|
|
1006
1076
|
type Pivotable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
|
|
1007
|
-
readonly pivotTo: <L extends LinkNames<Q>>(type: L) => CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : NonNullable<CompileTimeMetadata<Q>["links"][L]["multiplicity"]> extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : DerivedProperty.
|
|
1077
|
+
readonly pivotTo: <L extends LinkNames<Q>>(type: L) => CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : NonNullable<CompileTimeMetadata<Q>["links"][L]["multiplicity"]> extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;
|
|
1078
|
+
};
|
|
1079
|
+
type Constant<Q extends ObjectOrInterfaceDefinition> = {
|
|
1080
|
+
readonly constant: {
|
|
1081
|
+
readonly double: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q>;
|
|
1082
|
+
readonly integer: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>;
|
|
1083
|
+
readonly long: (value: string) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q>;
|
|
1084
|
+
readonly datetime: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>;
|
|
1085
|
+
readonly timestamp: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q>;
|
|
1086
|
+
};
|
|
1008
1087
|
};
|
|
1009
1088
|
type Aggregatable<Q extends ObjectOrInterfaceDefinition> = {
|
|
1010
1089
|
readonly aggregate: <V extends ValidAggregationKeys<Q, "withPropertiesAggregate">>(aggregationSpecifier: V, opts?: V extends `${any}:${infer P}` ? P extends CollectWithPropAggregations ? {
|
|
1011
1090
|
limit: number;
|
|
1012
1091
|
} : P extends "approximatePercentile" ? {
|
|
1013
1092
|
percentile: number;
|
|
1014
|
-
} : never : never) =>
|
|
1093
|
+
} : never : never) => DefinitionForType<Q, V extends `${infer N}:${infer P}` ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<CompileTimeMetadata<Q>["properties"][N]["type"], "nullable", "array"> : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<CompileTimeMetadata<Q>["properties"][N]["type"], "nullable", "single"> : P extends "approximateDistinct" | "exactDistinct" ? SimplePropertyDef.Make<"integer", "non-nullable", "single"> : SimplePropertyDef.Make<"double", "nullable", "single"> : V extends "$count" ? SimplePropertyDef.Make<"integer", "non-nullable", "single"> : never>;
|
|
1094
|
+
};
|
|
1095
|
+
type Selectable<Q extends ObjectOrInterfaceDefinition> = {
|
|
1096
|
+
readonly selectProperty: <R extends PropertyKeys<Q>>(propertyName: R) => DefinitionForType<Q, SimplePropertyDef.Make<CompileTimeMetadata<Q>["properties"][R]["type"], CompileTimeMetadata<Q>["properties"][R]["nullable"] extends true ? "nullable" : "non-nullable", CompileTimeMetadata<Q>["properties"][R]["multiplicity"] extends true ? "array" : "single">>;
|
|
1015
1097
|
};
|
|
1016
1098
|
|
|
1017
1099
|
interface BaseObjectSet<Q extends ObjectOrInterfaceDefinition> {
|
|
@@ -1094,6 +1176,21 @@ interface FetchPageSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends
|
|
|
1094
1176
|
*/
|
|
1095
1177
|
<L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false>(args?: FetchPageArgs<Q, L, R, A, S, T>): Promise<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>>>;
|
|
1096
1178
|
}
|
|
1179
|
+
interface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {
|
|
1180
|
+
/**
|
|
1181
|
+
* Finds the nearest neighbors for a given text or vector within the object set.
|
|
1182
|
+
*
|
|
1183
|
+
* @param query - Queries support either a vector matching the embedding model defined on the property, or text that is
|
|
1184
|
+
automatically embedded.
|
|
1185
|
+
* @param numNeighbors - The number of objects to return. If the number of documents in the objectType is less than the provided
|
|
1186
|
+
value, all objects will be returned. This value is limited to 1 ≤ numNeighbors ≥ 500.
|
|
1187
|
+
* @param property - The property key with a defined embedding model to search over.
|
|
1188
|
+
*
|
|
1189
|
+
* @returns An object set containing the `numNeighbors` nearest neighbors. To return the objects ordered by relevance and each
|
|
1190
|
+
* objects associated score, specify "relevance" in the orderBy.
|
|
1191
|
+
*/
|
|
1192
|
+
readonly nearestNeighbors: (query: string | number[], numNeighbors: number, property: PropertyKeys.Filtered<Q, "vector">) => this;
|
|
1193
|
+
}
|
|
1097
1194
|
interface FetchPageWithErrorsSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1098
1195
|
/**
|
|
1099
1196
|
* Gets a page of objects of this type, with a result wrapper
|
|
@@ -1257,7 +1354,7 @@ interface Subscribe<Q extends ObjectOrInterfaceDefinition> {
|
|
|
1257
1354
|
unsubscribe: () => void;
|
|
1258
1355
|
};
|
|
1259
1356
|
}
|
|
1260
|
-
interface ObjectSetCleanedTypes<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef>, MERGED extends ObjectOrInterfaceDefinition & Q> extends MinimalObjectSet<Q, D>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<Q>, FetchOne<Q, D>, Subscribe<MERGED> {
|
|
1357
|
+
interface ObjectSetCleanedTypes<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef>, MERGED extends ObjectOrInterfaceDefinition & Q> extends MinimalObjectSet<Q, D>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<Q>, FetchOne<Q, D>, Subscribe<MERGED>, NearestNeighbors<Q> {
|
|
1261
1358
|
}
|
|
1262
1359
|
|
|
1263
|
-
export {
|
|
1360
|
+
export { type InterfaceMetadata as $, type AttachmentUpload as A, type Augment as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type Augments as E, type FetchPageArgs as F, type GeoFilterOptions as G, ObjectSetArgs as H, type InterfaceDefinition as I, type SelectArg as J, type SelectArgToKeys as K, type FetchPageResult as L, type MediaReference as M, NullabilityAdherence as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, type SingleOsdkResult as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, type Media as T, type MediaMetadata as U, type ValidAggregationKeys as V, type WhereClause as W, isOk as X, type Result as Y, type BaseObjectSet as Z, ObjectSetSubscription as _, type MediaUpload as a, type ObjectOrInterfaceDefinition as a0, PropertyKeys as a1, type ObjectSpecifier as a2, ObjectMetadata as a3, type PropertyDef as a4, type VersionBound as a5, type BaseWirePropertyTypes as a6, type WirePropertyTypes as a7, type PrimaryKeyType as a8, type ConvertProps as a9, Osdk as aa, type PageResult as ab, TimeseriesDurationMapping as ac, type GeotimeSeriesProperty as ad, type TimeSeriesPoint as ae, type TimeSeriesProperty as af, type TimeSeriesQuery as ag, type LinkedType as ah, type LinkNames as ai, type ExtractOptions as aj, type MinimalObjectSet as ak, type Attachment as b, type ObjectIdentifiers as c, type OsdkObjectPrimaryKeyType as d, type ObjectSet as e, type OsdkMetadata as f, type PrimaryKeyTypes as g, type OsdkBase as h, type AggregateOpts as i, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as j, type AggregationResultsWithGroups as k, type AggregationResultsWithoutGroups as l, type AggregationClause as m, type AggregationsResults as n, type GeoFilter_Intersects as o, type GeoFilter_Within as p, type PossibleWhereClauseFilters as q, type OsdkObjectCreatePropertyType as r, type OsdkObjectPropertyType as s, type OsdkObjectLinksObject as t, DerivedProperty as u, DurationMapping as v, type AllGroupByValues as w, type GroupByClause as x, type GroupByRange as y, type AsyncIterArgs as z };
|
package/build/cjs/index.cjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
// src/actions/NullValue.ts
|
|
4
|
+
var NULL_VALUE = Symbol.for("NULL_VALUE");
|
|
5
|
+
|
|
3
6
|
// src/aggregate/WhereClause.ts
|
|
4
7
|
var DistanceUnitMapping = {
|
|
5
8
|
"centimeter": "CENTIMETERS",
|
|
@@ -69,6 +72,7 @@ var TimeseriesDurationMapping = {
|
|
|
69
72
|
|
|
70
73
|
exports.DistanceUnitMapping = DistanceUnitMapping;
|
|
71
74
|
exports.DurationMapping = DurationMapping;
|
|
75
|
+
exports.NULL_VALUE = NULL_VALUE;
|
|
72
76
|
exports.TimeseriesDurationMapping = TimeseriesDurationMapping;
|
|
73
77
|
exports.isOk = isOk;
|
|
74
78
|
//# sourceMappingURL=index.cjs.map
|
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":";;;
|
|
1
|
+
{"version":3,"sources":["../../src/actions/NullValue.ts","../../src/aggregate/WhereClause.ts","../../src/mapping/DurationMapping.ts","../../src/groupby/GroupByClause.ts","../../src/object/Result.ts","../../src/timeseries/timeseries.ts"],"names":[],"mappings":";;;AAgBa,IAAA,UAAA,GAAa,MAAO,CAAA,GAAA,CAAI,YAAY;;;ACE1C,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 2025 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 NULL_VALUE = Symbol.for(\"NULL_VALUE\");","/*\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// FIXME we need to represent all 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 Attachment, O as ObjectTypeDefinition,
|
|
2
|
-
export {
|
|
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, P as PropertyValueWireToClient, g as PrimaryKeyTypes, h as OsdkBase } from './ObjectSet-DmnkezS6.cjs';
|
|
2
|
+
export { i as AggregateOpts, j as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, m as AggregationClause, k as AggregationResultsWithGroups, l as AggregationResultsWithoutGroups, n as AggregationsResults, w as AllGroupByValues, z as AsyncIterArgs, B as Augment, E as Augments, Z as BaseObjectSet, a6 as BaseWirePropertyTypes, a9 as ConvertProps, u as DerivedProperty, D as DistanceUnitMapping, v as DurationMapping, F as FetchPageArgs, L as FetchPageResult, G as GeoFilterOptions, o as GeoFilter_Intersects, p as GeoFilter_Within, ad as GeotimeSeriesProperty, x as GroupByClause, y as GroupByRange, $ as InterfaceMetadata, ai as LinkNames, ah as LinkedType, T as Media, U as MediaMetadata, N as NullabilityAdherence, a3 as ObjectMetadata, a0 as ObjectOrInterfaceDefinition, H as ObjectSetArgs, _ as ObjectSetSubscription, a2 as ObjectSpecifier, aa as Osdk, r as OsdkObjectCreatePropertyType, t as OsdkObjectLinksObject, s as OsdkObjectPropertyType, ab as PageResult, q as PossibleWhereClauseFilters, a8 as PrimaryKeyType, a4 as PropertyDef, a1 as PropertyKeys, Y as Result, J as SelectArg, K as SelectArgToKeys, S as SingleLinkAccessor, Q as SingleOsdkResult, ae as TimeSeriesPoint, af as TimeSeriesProperty, ag as TimeSeriesQuery, ac as TimeseriesDurationMapping, V as ValidAggregationKeys, a5 as VersionBound, W as WhereClause, a7 as WirePropertyTypes, X as isOk } from './ObjectSet-DmnkezS6.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -62,7 +62,7 @@ interface DataValueClientToWire {
|
|
|
62
62
|
string: string;
|
|
63
63
|
timestamp: string;
|
|
64
64
|
set: Set<any>;
|
|
65
|
-
mediaReference: MediaReference;
|
|
65
|
+
mediaReference: MediaReference | MediaUpload;
|
|
66
66
|
twoDimensionalAggregation: {
|
|
67
67
|
key: AllowedBucketKeyTypes$1;
|
|
68
68
|
value: AllowedBucketTypes$1;
|
|
@@ -169,6 +169,10 @@ type ParameterEvaluatedConstraint = {
|
|
|
169
169
|
type: "unevaluable";
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
+
declare const NULL_VALUE: symbol & {
|
|
173
|
+
__type: "NULL_VALUE";
|
|
174
|
+
};
|
|
175
|
+
|
|
172
176
|
type ApplyActionOptions = {
|
|
173
177
|
$returnEdits?: true;
|
|
174
178
|
$validateOnly?: false;
|
|
@@ -207,6 +211,11 @@ declare namespace ActionParam {
|
|
|
207
211
|
type StructType<T extends Record<string, keyof DataValueClientToWire>> = {
|
|
208
212
|
[K in keyof T]: DataValueClientToWire[T[K]];
|
|
209
213
|
};
|
|
214
|
+
/**
|
|
215
|
+
* Type of the symbol that indicates that a "null" value should be passed for the action parameter.
|
|
216
|
+
* For any autogenerated modify actions, this will cause the action to clear the value of the parameter.
|
|
217
|
+
*/
|
|
218
|
+
type NullValueType = typeof NULL_VALUE;
|
|
210
219
|
}
|
|
211
220
|
type ActionEditResponse = ActionResults;
|
|
212
221
|
type ActionValidationResponse = ValidateActionResponseV2;
|
|
@@ -447,4 +456,4 @@ declare namespace Logger {
|
|
|
447
456
|
}
|
|
448
457
|
}
|
|
449
458
|
|
|
450
|
-
export { type ActionDefinition, type ActionEditResponse, ActionMetadata, ActionParam, type ActionReturnTypeForOptions, type ActionValidationResponse, type AllowedBucketKeyTypes$1 as AllowedBucketKeyTypes, type AllowedBucketTypes$1 as AllowedBucketTypes, type ApplyActionOptions, type ApplyBatchActionOptions, Attachment, AttachmentUpload, CompileTimeMetadata, type DataValueClientToWire, type DataValueWireToClient, InterfaceDefinition, Logger, MediaReference, ObjectIdentifiers, type ObjectQueryDataType, type ObjectSet, type ObjectSetQueryDataType, ObjectTypeDefinition, type OntologyMetadata, OsdkBase, type OsdkObject, PrimaryKeyTypes, PropertyValueWireToClient, type QueryDataTypeDefinition, type QueryDefinition, type QueryMetadata, QueryParam, type QueryParameterDefinition, QueryResult, type Range, type ThreeDimensionalAggregation, type ThreeDimensionalQueryAggregationDefinition, type TwoDimensionalAggregation, type TwoDimensionalQueryAggregationDefinition };
|
|
459
|
+
export { type ActionDefinition, type ActionEditResponse, ActionMetadata, ActionParam, type ActionReturnTypeForOptions, type ActionValidationResponse, type AllowedBucketKeyTypes$1 as AllowedBucketKeyTypes, type AllowedBucketTypes$1 as AllowedBucketTypes, type ApplyActionOptions, type ApplyBatchActionOptions, Attachment, AttachmentUpload, CompileTimeMetadata, type DataValueClientToWire, type DataValueWireToClient, InterfaceDefinition, Logger, MediaReference, MediaUpload, NULL_VALUE, ObjectIdentifiers, type ObjectQueryDataType, type ObjectSet, type ObjectSetQueryDataType, ObjectTypeDefinition, type OntologyMetadata, OsdkBase, type OsdkObject, PrimaryKeyTypes, PropertyValueWireToClient, type QueryDataTypeDefinition, type QueryDefinition, type QueryMetadata, QueryParam, type QueryParameterDefinition, QueryResult, type Range, type ThreeDimensionalAggregation, type ThreeDimensionalQueryAggregationDefinition, type TwoDimensionalAggregation, type TwoDimensionalQueryAggregationDefinition };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a0 as ObjectOrInterfaceDefinition, a1 as PropertyKeys, M as MediaReference, O as ObjectTypeDefinition, N as NullabilityAdherence, J as SelectArg, aa as Osdk, aj as ExtractOptions, F as FetchPageArgs, L as FetchPageResult, h as OsdkBase } from '../ObjectSet-DmnkezS6.cjs';
|
|
2
|
+
export { ak as MinimalObjectSet } from '../ObjectSet-DmnkezS6.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OsdkObjectFrom.js","names":["Osdk"],"sources":["OsdkObjectFrom.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 {\n DefaultToFalse,\n OsdkObjectLinksObject,\n} from \"./definitions/LinkDefinitions.js\";\nimport type { NullabilityAdherence } from \"./object/FetchPageArgs.js\";\nimport type { UnionIfTrue } from \"./object/FetchPageResult.js\";\nimport type {
|
|
1
|
+
{"version":3,"file":"OsdkObjectFrom.js","names":["Osdk"],"sources":["OsdkObjectFrom.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 {\n DefaultToFalse,\n OsdkObjectLinksObject,\n} from \"./definitions/LinkDefinitions.js\";\nimport type { NullabilityAdherence } from \"./object/FetchPageArgs.js\";\nimport type { UnionIfTrue } from \"./object/FetchPageResult.js\";\nimport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n} from \"./ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nimport type { OsdkBase } from \"./OsdkBase.js\";\n\ntype DropDollarOptions<T extends string> = Exclude<\n T,\n \"$rid\" | \"$all\" | \"$notStrict\"\n>;\n\ntype DropDollarAll<T extends string> = Exclude<\n T,\n \"$all\"\n>;\n\ntype SpecialOsdkPropParams =\n | \"$all\"\n | \"$rid\"\n | \"$strict\"\n | \"$notStrict\";\n\ntype ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> =\n | SpecialOsdkPropParams\n | PropertyKeys<Q>;\n\nexport type ApiNameAsString<\n T extends ObjectOrInterfaceDefinition,\n> = CompileTimeMetadata<T>[\"apiName\"];\n\nexport type JustProps<\n T extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<T>,\n> = P extends \"$all\" ? PropertyKeys<T>\n : Exclude<P, SpecialOsdkPropParams>;\n\nexport type PropMapToObject<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n> = NonNullable<CompileTimeMetadata<TO>[\"interfaceMap\"]>[ApiNameAsString<FROM>];\n\nexport type MapPropNamesToObjectType<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = \"$allBaseProperties\" extends OPTIONS\n ? PropertyKeys<FROM> extends P ? PropertyKeys<TO>\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>]\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];\n\nexport type PropMapToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n> = NonNullable<\n CompileTimeMetadata<FROM>[\"inverseInterfaceMap\"]\n>[ApiNameAsString<TO>];\n\nexport type MapPropNamesToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n P extends ValidOsdkPropParams<FROM>,\n> = PropMapToInterface<\n FROM,\n TO\n>[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>];\n/**\n * Older version of this helper that allows for `$rid` and co in\n * the properties field.\n * @param FROM - the interface or object type to convert from\n * @param TO - the interface or object type to convert to\n * @param P - the property(s) to convert\n */\nexport type ConvertProps<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ValidToFrom<FROM>,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = TO extends FROM ? P\n : TO extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToObjectType<FROM, TO, P, OPTIONS>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToInterface<FROM, TO, P>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : never\n : never;\n\n/** DO NOT EXPORT FROM PACKAGE */\nexport type ValidToFrom<\n FROM extends ObjectOrInterfaceDefinition,\n> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition\n : InterfaceDefinition;\n\nexport type IsNever<T> = [T] extends [never] ? true : false;\n\ntype ExtractPropsKeysFromOldPropsStyle<\n Q extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<Q>,\n> = P extends \"$all\" ? PropertyKeys<Q>\n : Exclude<P, \"$strict\" | \"$notStrict\" | \"$rid\">;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n\nexport type GetPropsKeys<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n N extends boolean = false,\n> = IsNever<P> extends true ? N extends true ? never : PropertyKeys<Q>\n : IsAny<P> extends true ? PropertyKeys<Q>\n : P;\n\n/**\n * Use `Osdk.Instance` or `YourType.OsdkInstance`\n */\nexport type Osdk<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends string = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n> =\n // no middle options is simplest\n IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n // Options only includes the two allowed in the new style\n : (IsNever<Exclude<OPTIONS, \"$rid\">>) extends true\n ? Osdk.Instance<Q, OPTIONS & \"$rid\", P>\n // else we are in the old style which was just Q and OPTIONS\n // and OPTIONS was $things + prop names\n : Osdk.Instance<\n Q,\n (\"$rid\" extends OPTIONS ? \"$rid\" : never),\n ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>\n >;\n\nexport namespace Osdk {\n export type Instance<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends Record<string, SimplePropertyDef> = {},\n > =\n & OsdkBase<Q>\n & Pick<\n CompileTimeMetadata<Q>[\"props\"],\n // If there aren't any additional properties, then we want GetPropsKeys to default to PropertyKeys<Q>\n GetPropsKeys<Q, P, [R] extends [{}] ? false : true>\n >\n & ([R] extends [never] ? {}\n : { [A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]> })\n & {\n readonly $link: Q extends { linksType?: any } ? Q[\"linksType\"]\n : Q extends ObjectTypeDefinition ? OsdkObjectLinksObject<Q>\n : never;\n\n readonly $as: <NEW_Q extends ValidToFrom<Q>>(\n type: NEW_Q | string,\n ) => Osdk.Instance<\n NEW_Q,\n OPTIONS,\n ConvertProps<Q, NEW_Q, P, OPTIONS>\n >;\n\n readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(\n updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n },\n ) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata: Q extends\n ObjectTypeDefinition ? {\n ObjectMetadata: Q;\n }\n : {\n ObjectMetadata: ObjectMetadata;\n InterfaceMetadata: InterfaceMetadata;\n };\n }\n // We are hiding the $rid field if it wasn't requested as we want to discourage its use\n & (IsNever<OPTIONS> extends true ? {}\n : IsAny<OPTIONS> extends true ? {}\n : \"$rid\" extends OPTIONS ? { readonly $rid: string }\n : {});\n}\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not `false` should always be `never`.\n *\n * This is structured in a way that it should always short circuit to never early.\n */\nexport type ExtractStrictOption<S extends NullabilityAdherence> =\n IsNever<S> extends true ? never\n : \"throw\" extends S ? never // catches any time \"throw\" still exists (including any)\n : \"drop\" extends S ? never // catches any time \"drop\" still exists (including any)\n : \"$notStrict\";\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not exactly `true` should always be `never`.\n */\nexport type ExtractRidOption<R extends boolean> = // comment for readability\n IsNever<R> extends true ? never\n : DefaultToFalse<R> extends false ? never\n : \"$rid\";\n\nexport type ExtractAllPropertiesOption<T extends boolean> = // comment for readability\n IsNever<T> extends true ? never\n : DefaultToFalse<T> extends false ? never\n : \"$allBaseProperties\";\n\n// not exported from package\nexport type ExtractOptions<\n R extends boolean,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n> = ExtractRidOption<R> | ExtractAllPropertiesOption<T>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0FA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;AA0BA;AACA;AACA;AAFA,WAsBiBA,IAAI;AAsDrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAWA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.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 { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ObjectIdentifiers } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\n\nexport type ApplyActionOptions =\n | { $returnEdits?: true; $validateOnly?: false }\n | {\n $validateOnly?: true;\n $returnEdits?: false;\n };\n\nexport type ApplyBatchActionOptions = { $returnEdits?: boolean };\n\n/**\n * Helper types for converting action definition parameter types to typescript types\n */\nexport namespace ActionParam {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueClientToWire[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> =\n | ObjectIdentifiers<T>\n | OsdkObjectPrimaryKeyType<T>;\n\n /**\n * Helper type to convert action definition parameter object sets to typescript types\n */\n export type ObjectSetType<T extends ObjectTypeDefinition> = ObjectSet<T>;\n\n /**\n * Helper type to convert action definition parameter interface types to typescript types\n */\n export type InterfaceType<T extends InterfaceDefinition> = {\n $objectType: CompileTimeMetadata<T> extends { implementedBy: infer U }\n ? (U extends ReadonlyArray<never> ? string\n : U extends ReadonlyArray<string> ? U[number]\n : string)\n : string;\n $primaryKey: string | number;\n };\n\n export type StructType<\n T extends Record<string, keyof DataValueClientToWire>,\n > = { [K in keyof T]: DataValueClientToWire[T[K]] };\n}\n\nexport type ActionEditResponse = ActionResults;\nexport type ActionValidationResponse = ValidateActionResponseV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.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 { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ObjectIdentifiers } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\nimport type { NULL_VALUE } from \"./NullValue.js\";\n\nexport type ApplyActionOptions =\n | { $returnEdits?: true; $validateOnly?: false }\n | {\n $validateOnly?: true;\n $returnEdits?: false;\n };\n\nexport type ApplyBatchActionOptions = { $returnEdits?: boolean };\n\n/**\n * Helper types for converting action definition parameter types to typescript types\n */\nexport namespace ActionParam {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueClientToWire[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> =\n | ObjectIdentifiers<T>\n | OsdkObjectPrimaryKeyType<T>;\n\n /**\n * Helper type to convert action definition parameter object sets to typescript types\n */\n export type ObjectSetType<T extends ObjectTypeDefinition> = ObjectSet<T>;\n\n /**\n * Helper type to convert action definition parameter interface types to typescript types\n */\n export type InterfaceType<T extends InterfaceDefinition> = {\n $objectType: CompileTimeMetadata<T> extends { implementedBy: infer U }\n ? (U extends ReadonlyArray<never> ? string\n : U extends ReadonlyArray<string> ? U[number]\n : string)\n : string;\n $primaryKey: string | number;\n };\n\n export type StructType<\n T extends Record<string, keyof DataValueClientToWire>,\n > = { [K in keyof T]: DataValueClientToWire[T[K]] };\n\n /**\n * Type of the symbol that indicates that a \"null\" value should be passed for the action parameter.\n * For any autogenerated modify actions, this will cause the action to clear the value of the parameter.\n */\n export type NullValueType = typeof NULL_VALUE;\n}\n\nexport type ActionEditResponse = ActionResults;\nexport type ActionValidationResponse = ValidateActionResponseV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA2BA;AACA;AACA;AAFA,WAGiBA,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export const NULL_VALUE = Symbol.for("NULL_VALUE");
|
|
18
|
+
//# sourceMappingURL=NullValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NullValue.js","names":["NULL_VALUE","Symbol","for"],"sources":["NullValue.ts"],"sourcesContent":["/*\n * Copyright 2025 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 NULL_VALUE: symbol & { __type: \"NULL_VALUE\" } = Symbol.for(\n \"NULL_VALUE\",\n) as symbol & { __type: \"NULL_VALUE\" };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,UAA6C,GAAGC,MAAM,CAACC,GAAG,CACrE,YACF,CAAsC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AggregateOptsThatErrors.js","names":[],"sources":["AggregateOptsThatErrors.ts"],"sourcesContent":["/*\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 type { SingleKeyObject } from \"type-fest\";\nimport type { GroupByClause } from \"../groupby/GroupByClause.js\";\nimport type { ObjectOrInterfaceDefinition } from \"../ontology/ObjectOrInterface.js\";\nimport type { AggregateOpts } from \"./AggregateOpts.js\";\nimport type { UnorderedAggregationClause } from \"./AggregationsClause.js\";\n\nexport type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<\n Q extends ObjectOrInterfaceDefinition,\n AO extends AggregateOpts<Q>,\n> = SingleKeyObject<AO[\"$groupBy\"]> extends never ? (\n
|
|
1
|
+
{"version":3,"file":"AggregateOptsThatErrors.js","names":[],"sources":["AggregateOptsThatErrors.ts"],"sourcesContent":["/*\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 type { SingleKeyObject } from \"type-fest\";\nimport type { GroupByClause } from \"../groupby/GroupByClause.js\";\nimport type { ObjectOrInterfaceDefinition } from \"../ontology/ObjectOrInterface.js\";\nimport type { AggregateOpts } from \"./AggregateOpts.js\";\nimport type { UnorderedAggregationClause } from \"./AggregationsClause.js\";\n\nexport type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<\n Q extends ObjectOrInterfaceDefinition,\n AO extends AggregateOpts<Q>,\n> = ContainsExactMatchWithNull<AO[\"$groupBy\"]> extends true ? {\n $groupBy: AO[\"$groupBy\"];\n $select: UnorderedAggregationClause<Q>;\n }\n : SingleKeyObject<AO[\"$groupBy\"]> extends never ? (\n AO[\"$select\"] extends UnorderedAggregationClause<Q>\n ? AggregateOptsThatErrors<Q, AO>\n : {} extends AO[\"$groupBy\"] ? AggregateOptsThatErrors<Q, AO>\n : {\n $groupBy: AO[\"$groupBy\"];\n $select: UnorderedAggregationClause<Q>;\n }\n )\n : AggregateOptsThatErrors<Q, AO>;\n\ntype ContainsExactMatchWithNull<GB extends GroupByClause<any> | undefined> =\n undefined extends GB ? false : {} extends GB ? false : {\n [P in keyof GB]: GB[P] extends { $exact: { $includeNullValue: true } }\n ? true\n : false;\n }[keyof GB];\n\ntype AggregateOptsThatErrors<\n Q extends ObjectOrInterfaceDefinition,\n AO extends AggregateOpts<Q>,\n> =\n & AO\n & {\n $select:\n & Pick<\n AO[\"$select\"],\n keyof AggregateOpts<Q>[\"$select\"] & keyof AO[\"$select\"]\n >\n & Record<\n Exclude<keyof AO[\"$select\"], keyof AggregateOpts<Q>[\"$select\"]>,\n never\n >;\n }\n & (unknown extends AO[\"$groupBy\"] ? {}\n : Exclude<AO[\"$groupBy\"], undefined> extends never ? {}\n : {\n $groupBy:\n & Pick<\n AO[\"$groupBy\"],\n keyof GroupByClause<Q> & keyof AO[\"$groupBy\"]\n >\n & Record<\n Exclude<keyof AO[\"$groupBy\"], keyof GroupByClause<Q>>,\n never\n >;\n });\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AggregationResultsWithGroups.js","names":[],"sources":["AggregationResultsWithGroups.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 { OsdkObjectPropertyType } from \"../Definitions.js\";\nimport type { GroupByClause, GroupByRange } from \"../groupby/GroupByClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { AggregationResultsWithoutGroups } from \"./AggregationResultsWithoutGroups.js\";\nimport type {\n OrderedAggregationClause,\n UnorderedAggregationClause,\n} from \"./AggregationsClause.js\";\n\nexport type AggregationResultsWithGroups<\n Q extends ObjectOrInterfaceDefinition,\n A extends UnorderedAggregationClause<Q> | OrderedAggregationClause<Q>,\n G extends GroupByClause<Q> | undefined,\n> = (\n & {\n $group: {\n [P in keyof G & PropertyKeys<Q>]: G[P] extends\n { $ranges: GroupByRange<infer T>[] } ? { startValue: T; endValue: T }\n : OsdkObjectPropertyType
|
|
1
|
+
{"version":3,"file":"AggregationResultsWithGroups.js","names":[],"sources":["AggregationResultsWithGroups.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 { OsdkObjectPropertyType } from \"../Definitions.js\";\nimport type { GroupByClause, GroupByRange } from \"../groupby/GroupByClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { AggregationResultsWithoutGroups } from \"./AggregationResultsWithoutGroups.js\";\nimport type {\n OrderedAggregationClause,\n UnorderedAggregationClause,\n} from \"./AggregationsClause.js\";\n\nexport type AggregationResultsWithGroups<\n Q extends ObjectOrInterfaceDefinition,\n A extends UnorderedAggregationClause<Q> | OrderedAggregationClause<Q>,\n G extends GroupByClause<Q> | undefined,\n> = (\n & {\n $group: {\n [P in keyof G & PropertyKeys<Q>]: G[P] extends\n { $ranges: GroupByRange<infer T>[] } ? { startValue: T; endValue: T }\n : MaybeNullable<\n G[P],\n OsdkObjectPropertyType<\n CompileTimeMetadata<Q>[\"properties\"][P],\n true\n >\n >;\n };\n }\n & AggregationResultsWithoutGroups<Q, A>\n)[];\n\ntype MaybeNullable<GROUP, VALUE> = GROUP extends {\n $exact: { $includeNullValue: true };\n} ? VALUE | null\n : VALUE;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -13,20 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export let DerivedProperty;
|
|
17
|
-
// readonly selectProperty: <R extends PropertyKeys<Q>>(
|
|
18
|
-
// propertyName: R,
|
|
19
|
-
// ) => DefinitionForType<
|
|
20
|
-
// Q,
|
|
21
|
-
// SimplePropertyDef.Make<
|
|
22
|
-
// CompileTimeMetadata<Q>["properties"][R]["type"],
|
|
23
|
-
// CompileTimeMetadata<Q>["properties"][R]["nullable"] extends true
|
|
24
|
-
// ? "nullable"
|
|
25
|
-
// : "non-nullable",
|
|
26
|
-
// CompileTimeMetadata<Q>["properties"][R]["multiplicity"] extends true
|
|
27
|
-
// ? "array"
|
|
28
|
-
// : "single"
|
|
29
|
-
// >
|
|
30
|
-
// >;
|
|
31
|
-
// };
|
|
16
|
+
export let DerivedProperty;
|
|
32
17
|
//# sourceMappingURL=DerivedProperty.js.map
|