@osdk/api 2.2.0-beta.8 → 2.2.0-beta.9

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/browser/OsdkObjectFrom.js.map +1 -1
  3. package/build/browser/aggregate/AggregatableKeys.js.map +1 -1
  4. package/build/browser/experimental/fetchPageByRid.js.map +1 -1
  5. package/build/browser/object/FetchPageArgs.js.map +1 -1
  6. package/build/browser/object/FetchPageResult.js.map +1 -1
  7. package/build/browser/objectSet/ObjectSet.js.map +1 -1
  8. package/build/browser/objectSet/ObjectSet.test.js +2 -2
  9. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  10. package/build/browser/test/EmployeeApiTest.js.map +1 -1
  11. package/build/cjs/{FilteredPropertyKeys-D4ZQUqjG.d.cts → FilteredPropertyKeys-qAMesbuN.d.cts} +15 -13
  12. package/build/cjs/index.d.cts +2 -2
  13. package/build/cjs/public/unstable.d.cts +3 -3
  14. package/build/esm/OsdkObjectFrom.js.map +1 -1
  15. package/build/esm/aggregate/AggregatableKeys.js.map +1 -1
  16. package/build/esm/experimental/fetchPageByRid.js.map +1 -1
  17. package/build/esm/object/FetchPageArgs.js.map +1 -1
  18. package/build/esm/object/FetchPageResult.js.map +1 -1
  19. package/build/esm/objectSet/ObjectSet.js.map +1 -1
  20. package/build/esm/objectSet/ObjectSet.test.js +2 -2
  21. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  22. package/build/esm/test/EmployeeApiTest.js.map +1 -1
  23. package/build/types/OsdkObjectFrom.d.ts +12 -8
  24. package/build/types/OsdkObjectFrom.d.ts.map +1 -1
  25. package/build/types/aggregate/AggregatableKeys.d.ts +1 -1
  26. package/build/types/aggregate/AggregatableKeys.d.ts.map +1 -1
  27. package/build/types/experimental/fetchPageByRid.d.ts +3 -2
  28. package/build/types/experimental/fetchPageByRid.d.ts.map +1 -1
  29. package/build/types/object/FetchPageArgs.d.ts +6 -3
  30. package/build/types/object/FetchPageArgs.d.ts.map +1 -1
  31. package/build/types/object/FetchPageResult.d.ts +6 -4
  32. package/build/types/object/FetchPageResult.d.ts.map +1 -1
  33. package/build/types/objectSet/ObjectSet.d.ts +9 -6
  34. package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
  35. package/build/types/test/EmployeeApiTest.d.ts +3 -1
  36. package/build/types/test/EmployeeApiTest.d.ts.map +1 -1
  37. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @osdk/api
2
2
 
3
+ ## 2.2.0-beta.9
4
+
5
+ ### Minor Changes
6
+
7
+ - 12843cb: Add ability to load all underlying properties of an interface.
8
+ - f82767c: Allow using aggregation operations for boolean property types
9
+
3
10
  ## 2.2.0-beta.8
4
11
 
5
12
  ### Minor Changes
@@ -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 { InterfaceDefinition } from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\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> = 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 * @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> = TO extends FROM ? P\n : TO extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToObjectType<FROM, TO, P>,\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\n/**\n * @param P The properties to add from Q\n * @param Z The existing underlying properties\n */\ntype UnderlyingProps<\n Q extends ObjectOrInterfaceDefinition,\n P extends string,\n Z extends string,\n NEW_Q extends ValidToFrom<Q>,\n> =\n & Z\n & Q extends InterfaceDefinition\n ? NEW_Q extends ObjectTypeDefinition ? ConvertProps<Q, NEW_Q, P>\n : Z\n : Z;\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\" = 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>\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 // 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\n// not exported from package\nexport type ExtractOptions<\n R extends boolean,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n> = ExtractRidOption<R>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA+EA;AACA;AACA;AACA;AACA;AAuBA;AAMA;AACA;AACA;AACA;AAiCA;AACA;AACA;AAFA,WAsBiBA,IAAI;AA6CrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAMA","ignoreList":[]}
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 { InterfaceDefinition } from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\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 * @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\n/**\n * @param P The properties to add from Q\n * @param Z The existing underlying properties\n */\ntype UnderlyingProps<\n Q extends ObjectOrInterfaceDefinition,\n P extends string,\n Z extends string,\n NEW_Q extends ValidToFrom<Q>,\n> =\n & Z\n & Q extends InterfaceDefinition\n ? NEW_Q extends ObjectTypeDefinition ? ConvertProps<Q, NEW_Q, P>\n : Z\n : Z;\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 // 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;AAsFA;AACA;AACA;AACA;AACA;AAwBA;AAMA;AACA;AACA;AACA;AAiCA;AACA;AACA;AAFA,WAsBiBA,IAAI;AA6CrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAWA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"AggregatableKeys.js","names":[],"sources":["AggregatableKeys.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 NumericWithPropAggregateOption,\n StringWithPropAggregateOption,\n} from \"../derivedProperties/WithPropertiesAggregationOptions.js\";\nimport type {\n GetWirePropertyValueFromClient,\n} from \"../mapping/PropertyValueMapping.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type StringAggregateOption = \"approximateDistinct\" | \"exactDistinct\";\nexport type NumericAggregateOption =\n | \"min\"\n | \"max\"\n | \"sum\"\n | \"avg\"\n | \"approximateDistinct\"\n | \"exactDistinct\";\n\ntype AGG_FOR_TYPE<T, U extends boolean> = number extends T\n ? U extends true ? NumericAggregateOption : NumericWithPropAggregateOption\n : string extends T\n ? U extends true ? StringAggregateOption : StringWithPropAggregateOption\n : never;\n\nexport type ValidAggregationKeys<\n Q extends ObjectOrInterfaceDefinition,\n R extends \"aggregate\" | \"withPropertiesAggregate\" = \"aggregate\",\n> = keyof (\n & {\n [\n KK in AggregatableKeys<Q> as `${KK & string}:${AGG_FOR_TYPE<\n GetWirePropertyValueFromClient<\n CompileTimeMetadata<Q>[\"properties\"][KK][\"type\"]\n >,\n R extends \"aggregate\" ? true : false\n >}`\n ]?: any;\n }\n & { $count?: any }\n);\n\nexport type AggregatableKeys<\n Q extends ObjectOrInterfaceDefinition,\n> = keyof {\n [P in PropertyKeys<Q>]: any;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"AggregatableKeys.js","names":[],"sources":["AggregatableKeys.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 NumericWithPropAggregateOption,\n StringWithPropAggregateOption,\n} from \"../derivedProperties/WithPropertiesAggregationOptions.js\";\nimport type {\n GetWirePropertyValueFromClient,\n} from \"../mapping/PropertyValueMapping.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type StringAggregateOption = \"approximateDistinct\" | \"exactDistinct\";\nexport type NumericAggregateOption =\n | \"min\"\n | \"max\"\n | \"sum\"\n | \"avg\"\n | \"approximateDistinct\"\n | \"exactDistinct\";\n\ntype AGG_FOR_TYPE<T, U extends boolean> = number extends T\n ? U extends true ? NumericAggregateOption : NumericWithPropAggregateOption\n : string extends T\n ? U extends true ? StringAggregateOption : StringWithPropAggregateOption\n : boolean extends T ? U extends true ? never : StringWithPropAggregateOption\n : never;\n\nexport type ValidAggregationKeys<\n Q extends ObjectOrInterfaceDefinition,\n R extends \"aggregate\" | \"withPropertiesAggregate\" = \"aggregate\",\n> = keyof (\n & {\n [\n KK in AggregatableKeys<Q> as `${KK & string}:${AGG_FOR_TYPE<\n GetWirePropertyValueFromClient<\n CompileTimeMetadata<Q>[\"properties\"][KK][\"type\"]\n >,\n R extends \"aggregate\" ? true : false\n >}`\n ]?: any;\n }\n & { $count?: any }\n);\n\nexport type AggregatableKeys<\n Q extends ObjectOrInterfaceDefinition,\n> = keyof {\n [P in PropertyKeys<Q>]: any;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"fetchPageByRid.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","name","type","version"],"sources":["fetchPageByRid.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 {\n FetchPageArgs,\n NullabilityAdherence,\n} from \"../object/FetchPageArgs.js\";\nimport type { FetchPageResult } from \"../object/FetchPageResult.js\";\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { Experiment } from \"./Experiment.js\";\n\ntype fetchPageByRidFn = <\n Q extends ObjectOrInterfaceDefinition,\n const L extends PropertyKeys<Q>,\n const R extends boolean,\n const S extends NullabilityAdherence,\n>(\n objectType: Q,\n rids: string[],\n options?: FetchPageArgs<Q, L, R, any, S>,\n) => Promise<FetchPageResult<Q, L, R, S>>;\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<\n \"2.2.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n { fetchPageByRid: fetchPageByRidFn }\n> = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBA,OAAO,MAAMA,iDAIZ,GAAG;EACFC,IAAI,EAAE,mDAAmD;EACzDC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"fetchPageByRid.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","name","type","version"],"sources":["fetchPageByRid.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 {\n FetchPageArgs,\n NullabilityAdherence,\n} from \"../object/FetchPageArgs.js\";\nimport type { FetchPageResult } from \"../object/FetchPageResult.js\";\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { Experiment } from \"./Experiment.js\";\n\ntype fetchPageByRidFn = <\n Q extends ObjectOrInterfaceDefinition,\n const L extends PropertyKeys<Q>,\n const R extends boolean,\n const S extends NullabilityAdherence,\n const T extends boolean,\n>(\n objectType: Q,\n rids: string[],\n options?: FetchPageArgs<Q, L, R, any, S>,\n) => Promise<FetchPageResult<Q, L, R, S, T>>;\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<\n \"2.2.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n { fetchPageByRid: fetchPageByRidFn }\n> = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA,OAAO,MAAMA,iDAIZ,GAAG;EACFC,IAAI,EAAE,mDAAmD;EACzDC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence"],"sources":["FetchPageArgs.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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n> {\n $select?: readonly L[];\n $includeRid?: R;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> = PropertyKeys<Q>,\n> {\n $orderBy?: {\n [K in L]?: \"asc\" | \"desc\";\n };\n}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> = A extends SelectArg<Q, never> ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[] ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n> extends AsyncIterArgs<Q, K, R, A, S> {\n $nextPageToken?: string;\n $pageSize?: number;\n}\n\nexport interface AsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n> extends SelectArg<Q, K, R, S>, OrderByArg<Q, PropertyKeys<Q>> {\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n}\n\nexport type Augment<\n X extends ObjectOrInterfaceDefinition,\n T extends string,\n> = { [K in CompileTimeMetadata<X>[\"apiName\"]]: T[] };\n\nexport type Augments = Record<string, string[]>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAuBiBA,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence"],"sources":["FetchPageArgs.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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n> {\n $select?: readonly L[];\n $includeRid?: R;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> = PropertyKeys<Q>,\n> {\n $orderBy?: {\n [K in L]?: \"asc\" | \"desc\";\n };\n}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> = A extends SelectArg<Q, never> ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[] ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n> extends AsyncIterArgs<Q, K, R, A, S, T> {\n $nextPageToken?: string;\n $pageSize?: number;\n}\n\nexport interface AsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n> extends SelectArg<Q, K, R, S>, OrderByArg<Q, PropertyKeys<Q>> {\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: T;\n}\n\nexport type Augment<\n X extends ObjectOrInterfaceDefinition,\n T extends string,\n> = { [K in CompileTimeMetadata<X>[\"apiName\"]]: T[] };\n\nexport type Augments = Record<string, string[]>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAuBiBA,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FetchPageResult.js","names":[],"sources":["FetchPageResult.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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { ExtractOptions, IsNever, Osdk } from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { NullabilityAdherence } from \"./FetchPageArgs.js\";\n\n/** exposed for a test */\nexport type RespectNullability<S extends NullabilityAdherence> = S extends false\n ? false\n : true;\n\n/** exposed for a test */\nexport type UnionIfFalse<S extends string, JUST_S_IF_TRUE extends boolean, E> =\n IsNever<S> extends true ? never\n : JUST_S_IF_TRUE extends true ? S\n : S | E;\n\n/** exposed for a test */\nexport type UnionIfTrue<\n S extends string,\n UNION_IF_TRUE extends boolean,\n E extends string,\n> = IsNever<S> extends true ? never\n : UNION_IF_TRUE extends true ? S | E\n : S;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type FetchPageResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n> = PageResult<\n PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S>>\n : Osdk.Instance<Q, ExtractOptions<R, S>, L>\n>;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type SingleOsdkResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> | (keyof RDPs & string),\n R extends boolean,\n S extends NullabilityAdherence,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n>;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"FetchPageResult.js","names":[],"sources":["FetchPageResult.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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { ExtractOptions, IsNever, Osdk } from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { NullabilityAdherence } from \"./FetchPageArgs.js\";\n\n/** exposed for a test */\nexport type RespectNullability<S extends NullabilityAdherence> = S extends false\n ? false\n : true;\n\n/** exposed for a test */\nexport type UnionIfFalse<S extends string, JUST_S_IF_TRUE extends boolean, E> =\n IsNever<S> extends true ? never\n : JUST_S_IF_TRUE extends true ? S\n : S | E;\n\n/** exposed for a test */\nexport type UnionIfTrue<\n S extends string,\n UNION_IF_TRUE extends boolean,\n E extends string,\n> = IsNever<S> extends true ? never\n : UNION_IF_TRUE extends true ? S | E\n : S;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type FetchPageResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n T extends boolean,\n> = PageResult<\n PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S, T>>\n : Osdk.Instance<Q, ExtractOptions<R, S, T>, L>\n>;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type SingleOsdkResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> | (keyof RDPs & string),\n R extends boolean,\n S extends NullabilityAdherence,\n RDPs extends Record<string, SimplePropertyDef> = {},\n T extends boolean = false,\n> = Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n>;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSet.js","names":[],"sources":["ObjectSet.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 { AggregateOpts } from \"../aggregate/AggregateOpts.js\";\nimport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"../aggregate/AggregateOptsThatErrors.js\";\nimport type { AggregationsResults } from \"../aggregate/AggregationsResults.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type { DerivedProperty } from \"../derivedProperties/DerivedProperty.js\";\nimport type {\n AsyncIterArgs,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { PrimaryKeyType } from \"../OsdkBase.js\";\nimport type { ExtractOptions, Osdk } from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type { BaseObjectSet } from \"./BaseObjectSet.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends ObjectSet<Q> | Record<string, SimplePropertyDef> = {},\n> = D extends Record<string, SimplePropertyDef>\n ? DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>\n : Q;\n\ntype ExtractRdp<\n D extends ObjectSet<any, any> | Record<string, SimplePropertyDef>,\n> = D extends Record<string, SimplePropertyDef> ? D : {};\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs>,\n Where<Q, RDPs>\n{\n}\n\n// TODO MOVE THIS\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n const myObjsResult = myObjs.data;\n\n * @returns a page of objects\n */\n readonly fetchPage: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n >(\n args?: FetchPageArgs<Q, L, R, A, S>,\n ) => Promise<\n PageResult<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >;\n\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n\n if(isOk(myObjs)){\n const myObjsResult = myObjs.value.data;\n }\n * @returns a page of objects, wrapped in a result wrapper\n */\n readonly fetchPageWithErrors: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n >(\n args?: FetchPageArgs<Q, L, R, A, S>,\n ) => Promise<\n Result<\n PageResult<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * await client(Office).where({\n meetingRooms: { $contains: \"Grand Central\" },\n meetingRoomCapacities: { $contains: 30 },\n});\n* @returns an objectSet\n */\n readonly where: (\n clause: WhereClause<MergeObjectSet<Q, RDPs>>,\n ) => this;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n readonly asyncIter: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n >(\n args?: AsyncIterArgs<Q, L, R, A, S>,\n ) => AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >;\n}\n\ninterface InterfaceObjectSet<\n Q extends InterfaceDefinition,\n> extends MinimalObjectSet<Q> {\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(\n clause: { [K in keyof NEW]: DerivedProperty.Selector<Q, NEW[K]> },\n ) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW ? NEW[NN]\n : NN extends keyof RDPs ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends ObjectSet<Q, any> | Record<string, SimplePropertyDef> =\n ObjectSet<Q, any>,\n> extends\n ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, UNUSED_OR_RDP>\n >\n{\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n .aggregate({\n $select: {\n $count: \"unordered\",\n \"latitude:max\": \"unordered\",\n \"latitude:min\": \"unordered\",\n \"latitude:avg\": \"unordered\",\n },\n $groupBy: {\n usState: \"exact\",\n longitude: {\n $fixedWidth: 10,\n },\n },\n });\n\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CompileTimeMetadata<LinkedType<Q, L>>[\"objectSet\"]; // ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n */\n readonly fetchOne: Q extends ObjectTypeDefinition ? <\n const L extends PropertyKeys<Q, RDPs>,\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ) => Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n : never;\n\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n */\n readonly fetchOneWithErrors: Q extends ObjectTypeDefinition ? <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ) => Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n >(\n listener: ObjectSetSubscription.Listener<Q, P>,\n opts?: ObjectSetSubscription.Options<Q, P>,\n ) => { unsubscribe: () => void };\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition,\n> extends\n MinimalObjectSet<Q, D>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<MERGED>,\n FetchOne<Q, D>,\n Subscribe<MERGED>\n{\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ObjectSet.js","names":[],"sources":["ObjectSet.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 { AggregateOpts } from \"../aggregate/AggregateOpts.js\";\nimport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"../aggregate/AggregateOptsThatErrors.js\";\nimport type { AggregationsResults } from \"../aggregate/AggregationsResults.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type { DerivedProperty } from \"../derivedProperties/DerivedProperty.js\";\nimport type {\n AsyncIterArgs,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { PrimaryKeyType } from \"../OsdkBase.js\";\nimport type { ExtractOptions, Osdk } from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type { BaseObjectSet } from \"./BaseObjectSet.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends ObjectSet<Q> | Record<string, SimplePropertyDef> = {},\n> = D extends Record<string, SimplePropertyDef>\n ? DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>\n : Q;\n\ntype ExtractRdp<\n D extends ObjectSet<any, any> | Record<string, SimplePropertyDef>,\n> = D extends Record<string, SimplePropertyDef> ? D : {};\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs>,\n Where<Q, RDPs>\n{\n}\n\n// TODO MOVE THIS\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n const myObjsResult = myObjs.data;\n\n * @returns a page of objects\n */\n readonly fetchPage: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T>,\n ) => Promise<\n PageResult<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >;\n\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n\n if(isOk(myObjs)){\n const myObjsResult = myObjs.value.data;\n }\n * @returns a page of objects, wrapped in a result wrapper\n */\n readonly fetchPageWithErrors: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T>,\n ) => Promise<\n Result<\n PageResult<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * await client(Office).where({\n meetingRooms: { $contains: \"Grand Central\" },\n meetingRoomCapacities: { $contains: 30 },\n});\n* @returns an objectSet\n */\n readonly where: (\n clause: WhereClause<MergeObjectSet<Q, RDPs>>,\n ) => this;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n readonly asyncIter: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n >(\n args?: AsyncIterArgs<Q, L, R, A, S, T>,\n ) => AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >;\n}\n\ninterface InterfaceObjectSet<\n Q extends InterfaceDefinition,\n> extends MinimalObjectSet<Q> {\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(\n clause: { [K in keyof NEW]: DerivedProperty.Selector<Q, NEW[K]> },\n ) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW ? NEW[NN]\n : NN extends keyof RDPs ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends ObjectSet<Q, any> | Record<string, SimplePropertyDef> =\n ObjectSet<Q, any>,\n> extends\n ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, UNUSED_OR_RDP>\n >\n{\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n .aggregate({\n $select: {\n $count: \"unordered\",\n \"latitude:max\": \"unordered\",\n \"latitude:min\": \"unordered\",\n \"latitude:avg\": \"unordered\",\n },\n $groupBy: {\n usState: \"exact\",\n longitude: {\n $fixedWidth: 10,\n },\n },\n });\n\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CompileTimeMetadata<LinkedType<Q, L>>[\"objectSet\"]; // ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n */\n readonly fetchOne: Q extends ObjectTypeDefinition ? <\n const L extends PropertyKeys<Q, RDPs>,\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ) => Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n : never;\n\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n */\n readonly fetchOneWithErrors: Q extends ObjectTypeDefinition ? <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ) => Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n >(\n listener: ObjectSetSubscription.Listener<Q, P>,\n opts?: ObjectSetSubscription.Options<Q, P>,\n ) => { unsubscribe: () => void };\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition,\n> extends\n MinimalObjectSet<Q, D>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<MERGED>,\n FetchOne<Q, D>,\n Subscribe<MERGED>\n{\n}\n"],"mappings":"","ignoreList":[]}
@@ -91,7 +91,7 @@ describe("ObjectSet", () => {
91
91
  const withAggregations = fauxObjectSet.withProperties({
92
92
  "collectSet": base => base.pivotTo("lead").aggregate("class:collectSet"),
93
93
  "select": base => base.pivotTo("lead").selectProperty("fullName"),
94
- "collectList": base => base.pivotTo("lead").aggregate("class:collectList"),
94
+ "collectList": base => base.pivotTo("lead").aggregate("booleanProp:collectSet"),
95
95
  "min": base => base.pivotTo("lead").aggregate("employeeId:max"),
96
96
  "max": base => base.pivotTo("lead").aggregate("employeeId:min"),
97
97
  "sum": base => base.pivotTo("lead").aggregate("employeeId:sum"),
@@ -139,7 +139,7 @@ describe("ObjectSet", () => {
139
139
  });
140
140
  it("Works with selecting all non-RDP's", async () => {
141
141
  await withFamily.fetchPage({
142
- $select: ["class", "fullName", "employeeId"]
142
+ $select: ["class", "fullName", "employeeId", "booleanProp"]
143
143
  });
144
144
  expectTypeOf().toEqualTypeOf();
145
145
  expectTypeOf().toEqualTypeOf();
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSet.test.js","names":["describe","expectTypeOf","it","test","vi","fauxObjectSet","where","fn","withProperties","fetchPage","Promise","resolve","asyncIter","toEqualTypeOf","withA","base","pivotTo","aggregate","withFamily","selectProperty","withMom","withParents","todo","withAggregations","$select"],"sources":["ObjectSet.test.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 { describe, expectTypeOf, it, test, vi } from \"vitest\";\n\nimport type { ObjectSet as $ObjectSet, Osdk, PropertyKeys } from \"../index.js\";\nimport type { EmployeeApiTest } from \"../test/EmployeeApiTest.js\";\n\ndescribe(\"ObjectSet\", () => {\n const fauxObjectSet = {\n where: vi.fn(() => {\n return fauxObjectSet;\n }),\n withProperties: vi.fn(() => {\n return fauxObjectSet;\n }),\n fetchPage: vi.fn(() => Promise.resolve()),\n asyncIter: vi.fn(() => {\n return {};\n }),\n } as any as EmployeeApiTest.ObjectSet;\n\n describe(\"normal\", () => {\n test(\"select none\", async () => {\n const result = await fauxObjectSet.fetchPage();\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never>\n >();\n });\n\n test(\"select one\", async () => {\n const result = await fauxObjectSet.fetchPage({ \"$select\": [\"fullName\"] });\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"fullName\">\n >();\n });\n });\n\n describe(\".withProperties\", () => {\n test(\"single property\", async () => {\n const withA = fauxObjectSet.withProperties({\n \"a\": (base) => {\n return base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\");\n },\n });\n\n expectTypeOf(withA).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n a: \"integer\";\n }>\n >();\n\n const withAResults = await withA.fetchPage();\n\n expectTypeOf<typeof withAResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n a: \"integer\";\n }>\n >();\n\n expectTypeOf<typeof withAResults[\"data\"][0][\"a\"]>()\n .toEqualTypeOf<number>();\n });\n\n test(\"multiple properties\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n expectTypeOf(withFamily).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"dad\"]>()\n .toEqualTypeOf<string | undefined>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"sister\"]>()\n .toEqualTypeOf<string[] | undefined>();\n });\n\n describe(\"called in succession\", () => {\n test(\"independently\", () => {\n const withMom = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n const withParents = withMom.withProperties({\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n });\n\n expectTypeOf(withParents).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n }>\n >();\n });\n\n test.todo(\"with calculated properties\");\n });\n\n describe(\"nullability\", () => {\n it(\"count, exactDistinct, and approximateDistinct aren't nullable\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\"),\n \"sis\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:approximateDistinct\"),\n });\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"integer\";\n sis: \"integer\";\n }>\n >();\n });\n\n it(\n \"collectToSet, collectToList, selectProperty, and numeric aggregations are nullable\",\n async () => {\n const withAggregations = fauxObjectSet.withProperties({\n \"collectSet\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectSet\"),\n \"select\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"collectList\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n \"min\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:max\"),\n \"max\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:min\"),\n \"sum\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:sum\"),\n \"avg\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:avg\"),\n \"approximatePercentile\": (base) =>\n base.pivotTo(\"lead\").aggregate(\n \"employeeId:approximatePercentile\",\n ),\n });\n\n const withAggregationResults = await withAggregations.fetchPage();\n\n expectTypeOf<typeof withAggregationResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n collectSet: \"string\"[] | undefined;\n select: \"string\" | undefined;\n collectList: \"string\"[] | undefined;\n min: \"double\" | undefined;\n max: \"double\" | undefined;\n sum: \"double\" | undefined;\n avg: \"double\" | undefined;\n approximatePercentile: \"double\" | undefined;\n }\n >\n >();\n },\n );\n });\n\n describe(\"fetch functions return correct Osdk.Instance\", () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n\n it(\"works with .where\", async () => {\n const where = withFamily.where({ \"mom\": 1 });\n const whereResults = await where.fetchPage();\n\n expectTypeOf<typeof where>().toEqualTypeOf<typeof withFamily>();\n expectTypeOf<typeof whereResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"works with .async\", () => {\n const asyncIter = withFamily.asyncIter();\n expectTypeOf<typeof asyncIter>().toEqualTypeOf<\n AsyncIterableIterator<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >\n >();\n });\n\n it(\"Works with no select\", async () => {\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"Works with selecting all RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\", \"dad\", \"sister\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n });\n\n it(\"Works with selecting some RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n }>\n >();\n });\n\n it(\"Works with selecting all non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"fullName\", \"employeeId\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {}\n >\n >();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"class\"]>()\n .toEqualTypeOf<\n string | undefined\n >();\n });\n\n it(\"Works with selecting some non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"class\", {}>\n >();\n });\n\n it(\"Works with selecting a mix\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n \"class\",\n { mom: \"integer\" }\n >\n >();\n });\n });\n\n it(\"allows extracting the type\", () => {\n const objectSet = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n type ObjectSetType = typeof objectSet;\n\n expectTypeOf<ObjectSetType>().toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n }>\n >();\n\n const objectSet2 = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n\n it(\"Defining the Type\", () => {\n type ObjectSetType = $ObjectSet<\n EmployeeApiTest,\n {\n mom: \"integer\" | undefined;\n }\n >;\n\n fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) sat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,CAAC,CAAC;MAEFX,EAAE,CAAC,qCAAqC,EAAE,YAAY;QAC1B,MAAMgB,UAAU,CAACT,SAAS,CAAC;UACnDe,OAAO,EAAE,CAAC,OAAO;QACnB,CAAC,CAAC;QAEFvB,YAAY,CAAsC,CAAC,CAChDY,aAAa,CAEZ,CAAC;MACP,CAAC,CAAC;MAEFX,EAAE,CAAC,4BAA4B,EAAE,YAAY;QACjB,MAAMgB,UAAU,CAACT,SAAS,CAAC;UACnDe,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK;QAC1B,CAAC,CAAC;QAEFvB,YAAY,CAAsC,CAAC,CAChDY,aAAa,CAOZ,CAAC;MACP,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFX,EAAE,CAAC,4BAA4B,EAAE,MAAM;MACnBG,aAAa,CAACG,cAAc,CAAC;QAC7C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;MAIFhB,YAAY,CAAgB,CAAC,CAACY,aAAa,CAIzC,CAAC;MAEgBR,aAAa,CAACG,cAAc,CAAC;QAC9C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFf,EAAE,CAAC,mBAAmB,EAAE,MAAM;MAQ5BG,aAAa,CAACG,cAAc,CAAC;QAC3B,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ObjectSet.test.js","names":["describe","expectTypeOf","it","test","vi","fauxObjectSet","where","fn","withProperties","fetchPage","Promise","resolve","asyncIter","toEqualTypeOf","withA","base","pivotTo","aggregate","withFamily","selectProperty","withMom","withParents","todo","withAggregations","$select"],"sources":["ObjectSet.test.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 { describe, expectTypeOf, it, test, vi } from \"vitest\";\n\nimport type { ObjectSet as $ObjectSet, Osdk, PropertyKeys } from \"../index.js\";\nimport type { EmployeeApiTest } from \"../test/EmployeeApiTest.js\";\n\ndescribe(\"ObjectSet\", () => {\n const fauxObjectSet = {\n where: vi.fn(() => {\n return fauxObjectSet;\n }),\n withProperties: vi.fn(() => {\n return fauxObjectSet;\n }),\n fetchPage: vi.fn(() => Promise.resolve()),\n asyncIter: vi.fn(() => {\n return {};\n }),\n } as any as EmployeeApiTest.ObjectSet;\n\n describe(\"normal\", () => {\n test(\"select none\", async () => {\n const result = await fauxObjectSet.fetchPage();\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never>\n >();\n });\n\n test(\"select one\", async () => {\n const result = await fauxObjectSet.fetchPage({ \"$select\": [\"fullName\"] });\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"fullName\">\n >();\n });\n });\n\n describe(\".withProperties\", () => {\n test(\"single property\", async () => {\n const withA = fauxObjectSet.withProperties({\n \"a\": (base) => {\n return base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\");\n },\n });\n\n expectTypeOf(withA).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n a: \"integer\";\n }>\n >();\n\n const withAResults = await withA.fetchPage();\n\n expectTypeOf<typeof withAResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n a: \"integer\";\n }>\n >();\n\n expectTypeOf<typeof withAResults[\"data\"][0][\"a\"]>()\n .toEqualTypeOf<number>();\n });\n\n test(\"multiple properties\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n expectTypeOf(withFamily).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"dad\"]>()\n .toEqualTypeOf<string | undefined>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"sister\"]>()\n .toEqualTypeOf<string[] | undefined>();\n });\n\n describe(\"called in succession\", () => {\n test(\"independently\", () => {\n const withMom = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n const withParents = withMom.withProperties({\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n });\n\n expectTypeOf(withParents).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n }>\n >();\n });\n\n test.todo(\"with calculated properties\");\n });\n\n describe(\"nullability\", () => {\n it(\"count, exactDistinct, and approximateDistinct aren't nullable\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\"),\n \"sis\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:approximateDistinct\"),\n });\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"integer\";\n sis: \"integer\";\n }>\n >();\n });\n\n it(\n \"collectToSet, collectToList, selectProperty, and numeric aggregations are nullable\",\n async () => {\n const withAggregations = fauxObjectSet.withProperties({\n \"collectSet\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectSet\"),\n \"select\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"collectList\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"booleanProp:collectSet\"),\n \"min\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:max\"),\n \"max\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:min\"),\n \"sum\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:sum\"),\n \"avg\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:avg\"),\n \"approximatePercentile\": (base) =>\n base.pivotTo(\"lead\").aggregate(\n \"employeeId:approximatePercentile\",\n ),\n });\n\n const withAggregationResults = await withAggregations.fetchPage();\n\n expectTypeOf<typeof withAggregationResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n collectSet: \"string\"[] | undefined;\n select: \"string\" | undefined;\n collectList: \"boolean\"[] | undefined;\n min: \"double\" | undefined;\n max: \"double\" | undefined;\n sum: \"double\" | undefined;\n avg: \"double\" | undefined;\n approximatePercentile: \"double\" | undefined;\n }\n >\n >();\n },\n );\n });\n\n describe(\"fetch functions return correct Osdk.Instance\", () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n\n it(\"works with .where\", async () => {\n const where = withFamily.where({ \"mom\": 1 });\n const whereResults = await where.fetchPage();\n\n expectTypeOf<typeof where>().toEqualTypeOf<typeof withFamily>();\n expectTypeOf<typeof whereResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"works with .async\", () => {\n const asyncIter = withFamily.asyncIter();\n expectTypeOf<typeof asyncIter>().toEqualTypeOf<\n AsyncIterableIterator<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >\n >();\n });\n\n it(\"Works with no select\", async () => {\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"Works with selecting all RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\", \"dad\", \"sister\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n });\n\n it(\"Works with selecting some RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n }>\n >();\n });\n\n it(\"Works with selecting all non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"fullName\", \"employeeId\", \"booleanProp\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {}\n >\n >();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"class\"]>()\n .toEqualTypeOf<\n string | undefined\n >();\n });\n\n it(\"Works with selecting some non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"class\", {}>\n >();\n });\n\n it(\"Works with selecting a mix\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n \"class\",\n { mom: \"integer\" }\n >\n >();\n });\n });\n\n it(\"allows extracting the type\", () => {\n const objectSet = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n type ObjectSetType = typeof objectSet;\n\n expectTypeOf<ObjectSetType>().toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n }>\n >();\n\n const objectSet2 = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n\n it(\"Defining the Type\", () => {\n type ObjectSetType = $ObjectSet<\n EmployeeApiTest,\n {\n mom: \"integer\" | undefined;\n }\n >;\n\n fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAK7DJ,QAAQ,CAAC,WAAW,EAAE,MAAM;EAC1B,MAAMK,aAAa,GAAG;IACpBC,KAAK,EAAEF,EAAE,CAACG,EAAE,CAAC,MAAM;MACjB,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFG,cAAc,EAAEJ,EAAE,CAACG,EAAE,CAAC,MAAM;MAC1B,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFI,SAAS,EAAEL,EAAE,CAACG,EAAE,CAAC,MAAMG,OAAO,CAACC,OAAO,CAAC,CAAC,CAAC;IACzCC,SAAS,EAAER,EAAE,CAACG,EAAE,CAAC,MAAM;MACrB,OAAO,CAAC,CAAC;IACX,CAAC;EACH,CAAqC;EAErCP,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACvBG,IAAI,CAAC,aAAa,EAAE,YAAY;MACf,MAAME,aAAa,CAACI,SAAS,CAAC,CAAC;MAC9CR,YAAY,CAAwB,CAAC,CAACY,aAAa,CAEjD,CAAC;IACL,CAAC,CAAC;IAEFV,IAAI,CAAC,YAAY,EAAE,YAAY;MACd,MAAME,aAAa,CAACI,SAAS,CAAC;QAAE,SAAS,EAAE,CAAC,UAAU;MAAE,CAAC,CAAC;MACzER,YAAY,CAAwB,CAAC,CAACY,aAAa,CAEjD,CAAC;IACL,CAAC,CAAC;EACJ,CAAC,CAA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AAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -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\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 }\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 };\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;;AAiFA,OAAO,MAAMA,eAAgC,GAAG;EAC9CC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
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 | \"booleanProp\";\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 booleanProp: $PropType[\"boolean\"] | 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 booleanProp: $PropertyDef<\"boolean\", \"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;;AAoFA,OAAO,MAAMA,eAAgC,GAAG;EAC9CC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -371,7 +371,7 @@ type PropertyKeys<O extends ObjectOrInterfaceDefinition, RDPs extends Record<str
371
371
 
372
372
  type StringAggregateOption = "approximateDistinct" | "exactDistinct";
373
373
  type NumericAggregateOption = "min" | "max" | "sum" | "avg" | "approximateDistinct" | "exactDistinct";
374
- type AGG_FOR_TYPE<T, U extends boolean> = number extends T ? U extends true ? NumericAggregateOption : NumericWithPropAggregateOption : string extends T ? U extends true ? StringAggregateOption : StringWithPropAggregateOption : never;
374
+ type AGG_FOR_TYPE<T, U extends boolean> = number extends T ? U extends true ? NumericAggregateOption : NumericWithPropAggregateOption : string extends T ? U extends true ? StringAggregateOption : StringWithPropAggregateOption : boolean extends T ? U extends true ? never : StringWithPropAggregateOption : never;
375
375
  type ValidAggregationKeys<Q extends ObjectOrInterfaceDefinition, R extends "aggregate" | "withPropertiesAggregate" = "aggregate"> = keyof ({
376
376
  [KK in AggregatableKeys<Q> as `${KK & string}:${AGG_FOR_TYPE<GetWirePropertyValueFromClient<CompileTimeMetadata<Q>["properties"][KK]["type"]>, R extends "aggregate" ? true : false>}`]?: any;
377
377
  } & {
@@ -537,12 +537,13 @@ interface OrderByArg<Q extends ObjectOrInterfaceDefinition, L extends PropertyKe
537
537
  };
538
538
  }
539
539
  type SelectArgToKeys<Q extends ObjectOrInterfaceDefinition, A extends SelectArg<Q, any, any>> = A extends SelectArg<Q, never> ? PropertyKeys<Q> : A["$select"] extends readonly string[] ? A["$select"][number] : PropertyKeys<Q>;
540
- interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default> extends AsyncIterArgs<Q, K, R, A, S> {
540
+ interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false> extends AsyncIterArgs<Q, K, R, A, S, T> {
541
541
  $nextPageToken?: string;
542
542
  $pageSize?: number;
543
543
  }
544
- interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default> extends SelectArg<Q, K, R, S>, OrderByArg<Q, PropertyKeys<Q>> {
544
+ interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false> extends SelectArg<Q, K, R, S>, OrderByArg<Q, PropertyKeys<Q>> {
545
545
  $__UNSTABLE_useOldInterfaceApis?: boolean;
546
+ $includeAllBaseObjectProperties?: T;
546
547
  }
547
548
  type Augment<X extends ObjectOrInterfaceDefinition, T extends string> = {
548
549
  [K in CompileTimeMetadata<X>["apiName"]]: T[];
@@ -591,11 +592,11 @@ type UnionIfTrue<S extends string, UNION_IF_TRUE extends boolean, E extends stri
591
592
  /**
592
593
  * Helper type for converting fetch options into an Osdk object
593
594
  */
594
- type FetchPageResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q>, R extends boolean, S extends NullabilityAdherence> = PageResult<PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S>> : Osdk.Instance<Q, ExtractOptions<R, S>, L>>;
595
+ type FetchPageResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q>, R extends boolean, S extends NullabilityAdherence, T extends boolean> = PageResult<PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S, T>> : Osdk.Instance<Q, ExtractOptions<R, S, T>, L>>;
595
596
  /**
596
597
  * Helper type for converting fetch options into an Osdk object
597
598
  */
598
- type SingleOsdkResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q> | (keyof RDPs & string), R extends boolean, S extends NullabilityAdherence, RDPs extends Record<string, SimplePropertyDef> = {}> = Osdk.Instance<Q, ExtractOptions<R, S>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, {
599
+ type SingleOsdkResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q> | (keyof RDPs & string), R extends boolean, S extends NullabilityAdherence, RDPs extends Record<string, SimplePropertyDef> = {}, T extends boolean = false> = Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, {
599
600
  [K in Extract<keyof RDPs, L>]: RDPs[K];
600
601
  }>;
601
602
 
@@ -619,7 +620,7 @@ type ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> = SpecialOsdkPro
619
620
  type ApiNameAsString<T extends ObjectOrInterfaceDefinition> = CompileTimeMetadata<T>["apiName"];
620
621
  type JustProps<T extends ObjectOrInterfaceDefinition, P extends ValidOsdkPropParams<T>> = P extends "$all" ? PropertyKeys<T> : Exclude<P, SpecialOsdkPropParams>;
621
622
  type PropMapToObject<FROM extends ObjectOrInterfaceDefinition, TO extends ObjectTypeDefinition> = NonNullable<CompileTimeMetadata<TO>["interfaceMap"]>[ApiNameAsString<FROM>];
622
- type MapPropNamesToObjectType<FROM extends ObjectOrInterfaceDefinition, TO extends ObjectTypeDefinition, P extends ValidOsdkPropParams<FROM>> = PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];
623
+ type MapPropNamesToObjectType<FROM extends ObjectOrInterfaceDefinition, TO extends ObjectTypeDefinition, P extends ValidOsdkPropParams<FROM>, OPTIONS extends never | "$rid" | "$allBaseProperties" = never> = "$allBaseProperties" extends OPTIONS ? PropertyKeys<FROM> extends P ? PropertyKeys<TO> : PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>] : PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];
623
624
  type PropMapToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition> = NonNullable<CompileTimeMetadata<FROM>["inverseInterfaceMap"]>[ApiNameAsString<TO>];
624
625
  type MapPropNamesToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition, P extends ValidOsdkPropParams<FROM>> = PropMapToInterface<FROM, TO>[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>];
625
626
  /**
@@ -627,7 +628,7 @@ type MapPropNamesToInterface<FROM extends ObjectTypeDefinition, TO extends Inter
627
628
  * @param TO - the interface or object type to convert to
628
629
  * @param P - the property(s) to convert
629
630
  */
630
- type ConvertProps<FROM extends ObjectOrInterfaceDefinition, TO extends ValidToFrom<FROM>, P extends ValidOsdkPropParams<FROM>> = TO extends FROM ? P : TO extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToObjectType<FROM, TO, P>, P extends "$rid" ? true : false, "$rid">) : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToInterface<FROM, TO, P>, P extends "$rid" ? true : false, "$rid">) : never : never;
631
+ type ConvertProps<FROM extends ObjectOrInterfaceDefinition, TO extends ValidToFrom<FROM>, P extends ValidOsdkPropParams<FROM>, OPTIONS extends never | "$rid" | "$allBaseProperties" = never> = TO extends FROM ? P : TO extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToObjectType<FROM, TO, P, OPTIONS>, P extends "$rid" ? true : false, "$rid">) : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToInterface<FROM, TO, P>, P extends "$rid" ? true : false, "$rid">) : never : never;
631
632
  /** DO NOT EXPORT FROM PACKAGE */
632
633
  type ValidToFrom<FROM extends ObjectOrInterfaceDefinition> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition : InterfaceDefinition;
633
634
  type IsNever<T> = [T] extends [never] ? true : false;
@@ -639,13 +640,13 @@ type GetPropsKeys<Q extends ObjectOrInterfaceDefinition, P extends PropertyKeys<
639
640
  */
640
641
  type Osdk<Q extends ObjectOrInterfaceDefinition, OPTIONS extends string = never, P extends PropertyKeys<Q> = PropertyKeys<Q>> = IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P> : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P> : (IsNever<Exclude<OPTIONS, "$rid">>) extends true ? Osdk.Instance<Q, OPTIONS & "$rid", P> : Osdk.Instance<Q, ("$rid" extends OPTIONS ? "$rid" : never), ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>>;
641
642
  declare namespace Osdk {
642
- type Instance<Q extends ObjectOrInterfaceDefinition, OPTIONS extends never | "$rid" = never, P extends PropertyKeys<Q> = PropertyKeys<Q>, R extends Record<string, SimplePropertyDef> = {}> = OsdkBase<Q> & Pick<CompileTimeMetadata<Q>["props"], GetPropsKeys<Q, P, [R] extends [{}] ? false : true>> & ([R] extends [never] ? {} : {
643
+ type Instance<Q extends ObjectOrInterfaceDefinition, OPTIONS extends never | "$rid" | "$allBaseProperties" = never, P extends PropertyKeys<Q> = PropertyKeys<Q>, R extends Record<string, SimplePropertyDef> = {}> = OsdkBase<Q> & Pick<CompileTimeMetadata<Q>["props"], GetPropsKeys<Q, P, [R] extends [{}] ? false : true>> & ([R] extends [never] ? {} : {
643
644
  [A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]>;
644
645
  }) & {
645
646
  readonly $link: Q extends {
646
647
  linksType?: any;
647
648
  } ? Q["linksType"] : Q extends ObjectTypeDefinition ? OsdkObjectLinksObject<Q> : never;
648
- readonly $as: <NEW_Q extends ValidToFrom<Q>>(type: NEW_Q | string) => Osdk.Instance<NEW_Q, OPTIONS, ConvertProps<Q, NEW_Q, P>>;
649
+ readonly $as: <NEW_Q extends ValidToFrom<Q>>(type: NEW_Q | string) => Osdk.Instance<NEW_Q, OPTIONS, ConvertProps<Q, NEW_Q, P, OPTIONS>>;
649
650
  readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(updatedObject?: Osdk.Instance<Q, any, NEW_PROPS> | {
650
651
  [K in NEW_PROPS]?: CompileTimeMetadata<Q>["props"][K];
651
652
  }) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;
@@ -659,7 +660,8 @@ declare namespace Osdk {
659
660
  * Anything you throw at this that is not exactly `true` should always be `never`.
660
661
  */
661
662
  type ExtractRidOption<R extends boolean> = IsNever<R> extends true ? never : DefaultToFalse<R> extends false ? never : "$rid";
662
- type ExtractOptions<R extends boolean, S extends NullabilityAdherence = NullabilityAdherence.Default> = ExtractRidOption<R>;
663
+ type ExtractAllPropertiesOption<T extends boolean> = IsNever<T> extends true ? never : DefaultToFalse<T> extends false ? never : "$allBaseProperties";
664
+ type ExtractOptions<R extends boolean, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false> = ExtractRidOption<R> | ExtractAllPropertiesOption<T>;
663
665
 
664
666
  type Just<Z extends keyof V, V> = {
665
667
  [k in Z]: V[k];
@@ -1002,7 +1004,7 @@ interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
1002
1004
 
1003
1005
  * @returns a page of objects
1004
1006
  */
1005
- readonly fetchPage: <L extends PropertyKeys<Q, RDPs>, R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default>(args?: FetchPageArgs<Q, L, R, A, S>) => Promise<PageResult<Osdk.Instance<Q, ExtractOptions<R, S>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, {
1007
+ readonly fetchPage: <L extends PropertyKeys<Q, 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>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, {
1006
1008
  [K in Extract<keyof RDPs, L>]: RDPs[K];
1007
1009
  }>>>;
1008
1010
  /**
@@ -1019,7 +1021,7 @@ interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
1019
1021
  }
1020
1022
  * @returns a page of objects, wrapped in a result wrapper
1021
1023
  */
1022
- readonly fetchPageWithErrors: <L extends PropertyKeys<Q, RDPs>, R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default>(args?: FetchPageArgs<Q, L, R, A, S>) => Promise<Result<PageResult<Osdk.Instance<Q, ExtractOptions<R, S>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, {
1024
+ readonly fetchPageWithErrors: <L extends PropertyKeys<Q, 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<Result<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, {
1023
1025
  [K in Extract<keyof RDPs, L>]: RDPs[K];
1024
1026
  }>>>>;
1025
1027
  }
@@ -1045,7 +1047,7 @@ interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
1045
1047
  * }
1046
1048
  * @returns an async iterator to load all objects
1047
1049
  */
1048
- readonly asyncIter: <L extends PropertyKeys<Q, RDPs>, R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default>(args?: AsyncIterArgs<Q, L, R, A, S>) => AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions<R, S>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, {
1050
+ readonly asyncIter: <L extends PropertyKeys<Q, RDPs>, R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false>(args?: AsyncIterArgs<Q, L, R, A, S, T>) => AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, {
1049
1051
  [K in Extract<keyof RDPs, L>]: RDPs[K];
1050
1052
  }>>;
1051
1053
  }
@@ -1,5 +1,5 @@
1
- import { A as Attachment, M as MediaReference, a as AttachmentUpload, O as ObjectTypeDefinition, b as OsdkBase, c as OsdkObjectPrimaryKeyType, d as ObjectSet, I as InterfaceDefinition, R as ReleaseStatus, e as OsdkMetadata, P as PropertyValueWireToClient, f as PrimaryKeyTypes } from './FilteredPropertyKeys-D4ZQUqjG.cjs';
2
- export { g as AggregateOpts, h as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, k as AggregationClause, i as AggregationResultsWithGroups, j as AggregationResultsWithoutGroups, l as AggregationsResults, t as AllGroupByValues, w as AsyncIterArgs, x as Augment, y as Augments, Q as BaseObjectSet, a3 as BaseWirePropertyTypes, $ as CompileTimeMetadata, a6 as ConvertProps, r as DerivedProperty, D as DistanceUnitMapping, s as DurationMapping, F as FetchPageArgs, C as FetchPageResult, U as FilteredPropertyKeys, G as GeoFilterOptions, m as GeoFilter_Intersects, n as GeoFilter_Within, aa as GeotimeSeriesProperty, u as GroupByClause, v as GroupByRange, X as InterfaceMetadata, af as LinkNames, ae as LinkedType, H as Media, J as MediaMetadata, N as NullabilityAdherence, a0 as ObjectMetadata, Y as ObjectOrInterfaceDefinition, T as ObjectSetSubscription, _ as ObjectSpecifier, a7 as Osdk, q as OsdkObjectLinksObject, p as OsdkObjectPropertyType, a8 as PageResult, o as PossibleWhereClauseFilters, a5 as PrimaryKeyType, a1 as PropertyDef, Z as PropertyKeys, L as Result, z as SelectArg, B as SelectArgToKeys, S as SingleLinkAccessor, E as SingleOsdkResult, ab as TimeSeriesPoint, ac as TimeSeriesProperty, ad as TimeSeriesQuery, a9 as TimeseriesDurationMapping, V as ValidAggregationKeys, a2 as VersionBound, W as WhereClause, a4 as WirePropertyTypes, K as isOk } from './FilteredPropertyKeys-D4ZQUqjG.cjs';
1
+ import { A as Attachment, M as MediaReference, a as AttachmentUpload, O as ObjectTypeDefinition, b as OsdkBase, c as OsdkObjectPrimaryKeyType, d as ObjectSet, I as InterfaceDefinition, R as ReleaseStatus, e as OsdkMetadata, P as PropertyValueWireToClient, f as PrimaryKeyTypes } from './FilteredPropertyKeys-qAMesbuN.cjs';
2
+ export { g as AggregateOpts, h as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, k as AggregationClause, i as AggregationResultsWithGroups, j as AggregationResultsWithoutGroups, l as AggregationsResults, t as AllGroupByValues, w as AsyncIterArgs, x as Augment, y as Augments, Q as BaseObjectSet, a3 as BaseWirePropertyTypes, $ as CompileTimeMetadata, a6 as ConvertProps, r as DerivedProperty, D as DistanceUnitMapping, s as DurationMapping, F as FetchPageArgs, C as FetchPageResult, U as FilteredPropertyKeys, G as GeoFilterOptions, m as GeoFilter_Intersects, n as GeoFilter_Within, aa as GeotimeSeriesProperty, u as GroupByClause, v as GroupByRange, X as InterfaceMetadata, af as LinkNames, ae as LinkedType, H as Media, J as MediaMetadata, N as NullabilityAdherence, a0 as ObjectMetadata, Y as ObjectOrInterfaceDefinition, T as ObjectSetSubscription, _ as ObjectSpecifier, a7 as Osdk, q as OsdkObjectLinksObject, p as OsdkObjectPropertyType, a8 as PageResult, o as PossibleWhereClauseFilters, a5 as PrimaryKeyType, a1 as PropertyDef, Z as PropertyKeys, L as Result, z as SelectArg, B as SelectArgToKeys, S as SingleLinkAccessor, E as SingleOsdkResult, ab as TimeSeriesPoint, ac as TimeSeriesProperty, ad as TimeSeriesQuery, a9 as TimeseriesDurationMapping, V as ValidAggregationKeys, a2 as VersionBound, W as WhereClause, a4 as WirePropertyTypes, K as isOk } from './FilteredPropertyKeys-qAMesbuN.cjs';
3
3
  import 'type-fest';
4
4
  import 'geojson';
5
5
 
@@ -1,5 +1,5 @@
1
- import { Y as ObjectOrInterfaceDefinition, U as FilteredPropertyKeys, M as MediaReference, O as ObjectTypeDefinition, Z as PropertyKeys, N as NullabilityAdherence, z as SelectArg, a7 as Osdk, ag as ExtractOptions, F as FetchPageArgs, C as FetchPageResult, b as OsdkBase } from '../FilteredPropertyKeys-D4ZQUqjG.cjs';
2
- export { ah as MinimalObjectSet } from '../FilteredPropertyKeys-D4ZQUqjG.cjs';
1
+ import { Y as ObjectOrInterfaceDefinition, U as FilteredPropertyKeys, M as MediaReference, O as ObjectTypeDefinition, Z as PropertyKeys, N as NullabilityAdherence, z as SelectArg, a7 as Osdk, ag as ExtractOptions, F as FetchPageArgs, C as FetchPageResult, b as OsdkBase } from '../FilteredPropertyKeys-qAMesbuN.cjs';
2
+ export { ah as MinimalObjectSet } from '../FilteredPropertyKeys-qAMesbuN.cjs';
3
3
  import 'type-fest';
4
4
  import 'geojson';
5
5
 
@@ -38,7 +38,7 @@ declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid: Experiment<"2.1.
38
38
  fetchOneByRid: fetchOneByRidFn;
39
39
  }>;
40
40
 
41
- type fetchPageByRidFn = <Q extends ObjectOrInterfaceDefinition, const L extends PropertyKeys<Q>, const R extends boolean, const S extends NullabilityAdherence>(objectType: Q, rids: string[], options?: FetchPageArgs<Q, L, R, any, S>) => Promise<FetchPageResult<Q, L, R, S>>;
41
+ type fetchPageByRidFn = <Q extends ObjectOrInterfaceDefinition, const L extends PropertyKeys<Q>, const R extends boolean, const S extends NullabilityAdherence, const T extends boolean>(objectType: Q, rids: string[], options?: FetchPageArgs<Q, L, R, any, S>) => Promise<FetchPageResult<Q, L, R, S, T>>;
42
42
  declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<"2.2.0", "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid", {
43
43
  fetchPageByRid: fetchPageByRidFn;
44
44
  }>;
@@ -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 { InterfaceDefinition } from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\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> = 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 * @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> = TO extends FROM ? P\n : TO extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToObjectType<FROM, TO, P>,\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\n/**\n * @param P The properties to add from Q\n * @param Z The existing underlying properties\n */\ntype UnderlyingProps<\n Q extends ObjectOrInterfaceDefinition,\n P extends string,\n Z extends string,\n NEW_Q extends ValidToFrom<Q>,\n> =\n & Z\n & Q extends InterfaceDefinition\n ? NEW_Q extends ObjectTypeDefinition ? ConvertProps<Q, NEW_Q, P>\n : Z\n : Z;\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\" = 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>\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 // 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\n// not exported from package\nexport type ExtractOptions<\n R extends boolean,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n> = ExtractRidOption<R>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA+EA;AACA;AACA;AACA;AACA;AAuBA;AAMA;AACA;AACA;AACA;AAiCA;AACA;AACA;AAFA,WAsBiBA,IAAI;AA6CrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAMA","ignoreList":[]}
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 { InterfaceDefinition } from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\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 * @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\n/**\n * @param P The properties to add from Q\n * @param Z The existing underlying properties\n */\ntype UnderlyingProps<\n Q extends ObjectOrInterfaceDefinition,\n P extends string,\n Z extends string,\n NEW_Q extends ValidToFrom<Q>,\n> =\n & Z\n & Q extends InterfaceDefinition\n ? NEW_Q extends ObjectTypeDefinition ? ConvertProps<Q, NEW_Q, P>\n : Z\n : Z;\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 // 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;AAsFA;AACA;AACA;AACA;AACA;AAwBA;AAMA;AACA;AACA;AACA;AAiCA;AACA;AACA;AAFA,WAsBiBA,IAAI;AA6CrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAWA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"AggregatableKeys.js","names":[],"sources":["AggregatableKeys.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 NumericWithPropAggregateOption,\n StringWithPropAggregateOption,\n} from \"../derivedProperties/WithPropertiesAggregationOptions.js\";\nimport type {\n GetWirePropertyValueFromClient,\n} from \"../mapping/PropertyValueMapping.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type StringAggregateOption = \"approximateDistinct\" | \"exactDistinct\";\nexport type NumericAggregateOption =\n | \"min\"\n | \"max\"\n | \"sum\"\n | \"avg\"\n | \"approximateDistinct\"\n | \"exactDistinct\";\n\ntype AGG_FOR_TYPE<T, U extends boolean> = number extends T\n ? U extends true ? NumericAggregateOption : NumericWithPropAggregateOption\n : string extends T\n ? U extends true ? StringAggregateOption : StringWithPropAggregateOption\n : never;\n\nexport type ValidAggregationKeys<\n Q extends ObjectOrInterfaceDefinition,\n R extends \"aggregate\" | \"withPropertiesAggregate\" = \"aggregate\",\n> = keyof (\n & {\n [\n KK in AggregatableKeys<Q> as `${KK & string}:${AGG_FOR_TYPE<\n GetWirePropertyValueFromClient<\n CompileTimeMetadata<Q>[\"properties\"][KK][\"type\"]\n >,\n R extends \"aggregate\" ? true : false\n >}`\n ]?: any;\n }\n & { $count?: any }\n);\n\nexport type AggregatableKeys<\n Q extends ObjectOrInterfaceDefinition,\n> = keyof {\n [P in PropertyKeys<Q>]: any;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"AggregatableKeys.js","names":[],"sources":["AggregatableKeys.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 NumericWithPropAggregateOption,\n StringWithPropAggregateOption,\n} from \"../derivedProperties/WithPropertiesAggregationOptions.js\";\nimport type {\n GetWirePropertyValueFromClient,\n} from \"../mapping/PropertyValueMapping.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type StringAggregateOption = \"approximateDistinct\" | \"exactDistinct\";\nexport type NumericAggregateOption =\n | \"min\"\n | \"max\"\n | \"sum\"\n | \"avg\"\n | \"approximateDistinct\"\n | \"exactDistinct\";\n\ntype AGG_FOR_TYPE<T, U extends boolean> = number extends T\n ? U extends true ? NumericAggregateOption : NumericWithPropAggregateOption\n : string extends T\n ? U extends true ? StringAggregateOption : StringWithPropAggregateOption\n : boolean extends T ? U extends true ? never : StringWithPropAggregateOption\n : never;\n\nexport type ValidAggregationKeys<\n Q extends ObjectOrInterfaceDefinition,\n R extends \"aggregate\" | \"withPropertiesAggregate\" = \"aggregate\",\n> = keyof (\n & {\n [\n KK in AggregatableKeys<Q> as `${KK & string}:${AGG_FOR_TYPE<\n GetWirePropertyValueFromClient<\n CompileTimeMetadata<Q>[\"properties\"][KK][\"type\"]\n >,\n R extends \"aggregate\" ? true : false\n >}`\n ]?: any;\n }\n & { $count?: any }\n);\n\nexport type AggregatableKeys<\n Q extends ObjectOrInterfaceDefinition,\n> = keyof {\n [P in PropertyKeys<Q>]: any;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"fetchPageByRid.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","name","type","version"],"sources":["fetchPageByRid.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 {\n FetchPageArgs,\n NullabilityAdherence,\n} from \"../object/FetchPageArgs.js\";\nimport type { FetchPageResult } from \"../object/FetchPageResult.js\";\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { Experiment } from \"./Experiment.js\";\n\ntype fetchPageByRidFn = <\n Q extends ObjectOrInterfaceDefinition,\n const L extends PropertyKeys<Q>,\n const R extends boolean,\n const S extends NullabilityAdherence,\n>(\n objectType: Q,\n rids: string[],\n options?: FetchPageArgs<Q, L, R, any, S>,\n) => Promise<FetchPageResult<Q, L, R, S>>;\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<\n \"2.2.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n { fetchPageByRid: fetchPageByRidFn }\n> = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBA,OAAO,MAAMA,iDAIZ,GAAG;EACFC,IAAI,EAAE,mDAAmD;EACzDC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"fetchPageByRid.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","name","type","version"],"sources":["fetchPageByRid.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 {\n FetchPageArgs,\n NullabilityAdherence,\n} from \"../object/FetchPageArgs.js\";\nimport type { FetchPageResult } from \"../object/FetchPageResult.js\";\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { Experiment } from \"./Experiment.js\";\n\ntype fetchPageByRidFn = <\n Q extends ObjectOrInterfaceDefinition,\n const L extends PropertyKeys<Q>,\n const R extends boolean,\n const S extends NullabilityAdherence,\n const T extends boolean,\n>(\n objectType: Q,\n rids: string[],\n options?: FetchPageArgs<Q, L, R, any, S>,\n) => Promise<FetchPageResult<Q, L, R, S, T>>;\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<\n \"2.2.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n { fetchPageByRid: fetchPageByRidFn }\n> = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA,OAAO,MAAMA,iDAIZ,GAAG;EACFC,IAAI,EAAE,mDAAmD;EACzDC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence"],"sources":["FetchPageArgs.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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n> {\n $select?: readonly L[];\n $includeRid?: R;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> = PropertyKeys<Q>,\n> {\n $orderBy?: {\n [K in L]?: \"asc\" | \"desc\";\n };\n}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> = A extends SelectArg<Q, never> ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[] ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n> extends AsyncIterArgs<Q, K, R, A, S> {\n $nextPageToken?: string;\n $pageSize?: number;\n}\n\nexport interface AsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n> extends SelectArg<Q, K, R, S>, OrderByArg<Q, PropertyKeys<Q>> {\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n}\n\nexport type Augment<\n X extends ObjectOrInterfaceDefinition,\n T extends string,\n> = { [K in CompileTimeMetadata<X>[\"apiName\"]]: T[] };\n\nexport type Augments = Record<string, string[]>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAuBiBA,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence"],"sources":["FetchPageArgs.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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n> {\n $select?: readonly L[];\n $includeRid?: R;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> = PropertyKeys<Q>,\n> {\n $orderBy?: {\n [K in L]?: \"asc\" | \"desc\";\n };\n}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> = A extends SelectArg<Q, never> ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[] ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n> extends AsyncIterArgs<Q, K, R, A, S, T> {\n $nextPageToken?: string;\n $pageSize?: number;\n}\n\nexport interface AsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n> extends SelectArg<Q, K, R, S>, OrderByArg<Q, PropertyKeys<Q>> {\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: T;\n}\n\nexport type Augment<\n X extends ObjectOrInterfaceDefinition,\n T extends string,\n> = { [K in CompileTimeMetadata<X>[\"apiName\"]]: T[] };\n\nexport type Augments = Record<string, string[]>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAuBiBA,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FetchPageResult.js","names":[],"sources":["FetchPageResult.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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { ExtractOptions, IsNever, Osdk } from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { NullabilityAdherence } from \"./FetchPageArgs.js\";\n\n/** exposed for a test */\nexport type RespectNullability<S extends NullabilityAdherence> = S extends false\n ? false\n : true;\n\n/** exposed for a test */\nexport type UnionIfFalse<S extends string, JUST_S_IF_TRUE extends boolean, E> =\n IsNever<S> extends true ? never\n : JUST_S_IF_TRUE extends true ? S\n : S | E;\n\n/** exposed for a test */\nexport type UnionIfTrue<\n S extends string,\n UNION_IF_TRUE extends boolean,\n E extends string,\n> = IsNever<S> extends true ? never\n : UNION_IF_TRUE extends true ? S | E\n : S;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type FetchPageResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n> = PageResult<\n PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S>>\n : Osdk.Instance<Q, ExtractOptions<R, S>, L>\n>;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type SingleOsdkResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> | (keyof RDPs & string),\n R extends boolean,\n S extends NullabilityAdherence,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n>;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"FetchPageResult.js","names":[],"sources":["FetchPageResult.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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { ExtractOptions, IsNever, Osdk } from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { NullabilityAdherence } from \"./FetchPageArgs.js\";\n\n/** exposed for a test */\nexport type RespectNullability<S extends NullabilityAdherence> = S extends false\n ? false\n : true;\n\n/** exposed for a test */\nexport type UnionIfFalse<S extends string, JUST_S_IF_TRUE extends boolean, E> =\n IsNever<S> extends true ? never\n : JUST_S_IF_TRUE extends true ? S\n : S | E;\n\n/** exposed for a test */\nexport type UnionIfTrue<\n S extends string,\n UNION_IF_TRUE extends boolean,\n E extends string,\n> = IsNever<S> extends true ? never\n : UNION_IF_TRUE extends true ? S | E\n : S;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type FetchPageResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n T extends boolean,\n> = PageResult<\n PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S, T>>\n : Osdk.Instance<Q, ExtractOptions<R, S, T>, L>\n>;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type SingleOsdkResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> | (keyof RDPs & string),\n R extends boolean,\n S extends NullabilityAdherence,\n RDPs extends Record<string, SimplePropertyDef> = {},\n T extends boolean = false,\n> = Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n>;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSet.js","names":[],"sources":["ObjectSet.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 { AggregateOpts } from \"../aggregate/AggregateOpts.js\";\nimport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"../aggregate/AggregateOptsThatErrors.js\";\nimport type { AggregationsResults } from \"../aggregate/AggregationsResults.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type { DerivedProperty } from \"../derivedProperties/DerivedProperty.js\";\nimport type {\n AsyncIterArgs,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { PrimaryKeyType } from \"../OsdkBase.js\";\nimport type { ExtractOptions, Osdk } from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type { BaseObjectSet } from \"./BaseObjectSet.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends ObjectSet<Q> | Record<string, SimplePropertyDef> = {},\n> = D extends Record<string, SimplePropertyDef>\n ? DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>\n : Q;\n\ntype ExtractRdp<\n D extends ObjectSet<any, any> | Record<string, SimplePropertyDef>,\n> = D extends Record<string, SimplePropertyDef> ? D : {};\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs>,\n Where<Q, RDPs>\n{\n}\n\n// TODO MOVE THIS\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n const myObjsResult = myObjs.data;\n\n * @returns a page of objects\n */\n readonly fetchPage: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n >(\n args?: FetchPageArgs<Q, L, R, A, S>,\n ) => Promise<\n PageResult<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >;\n\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n\n if(isOk(myObjs)){\n const myObjsResult = myObjs.value.data;\n }\n * @returns a page of objects, wrapped in a result wrapper\n */\n readonly fetchPageWithErrors: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n >(\n args?: FetchPageArgs<Q, L, R, A, S>,\n ) => Promise<\n Result<\n PageResult<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * await client(Office).where({\n meetingRooms: { $contains: \"Grand Central\" },\n meetingRoomCapacities: { $contains: 30 },\n});\n* @returns an objectSet\n */\n readonly where: (\n clause: WhereClause<MergeObjectSet<Q, RDPs>>,\n ) => this;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n readonly asyncIter: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n >(\n args?: AsyncIterArgs<Q, L, R, A, S>,\n ) => AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >;\n}\n\ninterface InterfaceObjectSet<\n Q extends InterfaceDefinition,\n> extends MinimalObjectSet<Q> {\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(\n clause: { [K in keyof NEW]: DerivedProperty.Selector<Q, NEW[K]> },\n ) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW ? NEW[NN]\n : NN extends keyof RDPs ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends ObjectSet<Q, any> | Record<string, SimplePropertyDef> =\n ObjectSet<Q, any>,\n> extends\n ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, UNUSED_OR_RDP>\n >\n{\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n .aggregate({\n $select: {\n $count: \"unordered\",\n \"latitude:max\": \"unordered\",\n \"latitude:min\": \"unordered\",\n \"latitude:avg\": \"unordered\",\n },\n $groupBy: {\n usState: \"exact\",\n longitude: {\n $fixedWidth: 10,\n },\n },\n });\n\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CompileTimeMetadata<LinkedType<Q, L>>[\"objectSet\"]; // ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n */\n readonly fetchOne: Q extends ObjectTypeDefinition ? <\n const L extends PropertyKeys<Q, RDPs>,\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ) => Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n : never;\n\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n */\n readonly fetchOneWithErrors: Q extends ObjectTypeDefinition ? <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ) => Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n >(\n listener: ObjectSetSubscription.Listener<Q, P>,\n opts?: ObjectSetSubscription.Options<Q, P>,\n ) => { unsubscribe: () => void };\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition,\n> extends\n MinimalObjectSet<Q, D>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<MERGED>,\n FetchOne<Q, D>,\n Subscribe<MERGED>\n{\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ObjectSet.js","names":[],"sources":["ObjectSet.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 { AggregateOpts } from \"../aggregate/AggregateOpts.js\";\nimport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"../aggregate/AggregateOptsThatErrors.js\";\nimport type { AggregationsResults } from \"../aggregate/AggregationsResults.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type { DerivedProperty } from \"../derivedProperties/DerivedProperty.js\";\nimport type {\n AsyncIterArgs,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { PrimaryKeyType } from \"../OsdkBase.js\";\nimport type { ExtractOptions, Osdk } from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type { BaseObjectSet } from \"./BaseObjectSet.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends ObjectSet<Q> | Record<string, SimplePropertyDef> = {},\n> = D extends Record<string, SimplePropertyDef>\n ? DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>\n : Q;\n\ntype ExtractRdp<\n D extends ObjectSet<any, any> | Record<string, SimplePropertyDef>,\n> = D extends Record<string, SimplePropertyDef> ? D : {};\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs>,\n Where<Q, RDPs>\n{\n}\n\n// TODO MOVE THIS\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n const myObjsResult = myObjs.data;\n\n * @returns a page of objects\n */\n readonly fetchPage: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T>,\n ) => Promise<\n PageResult<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >;\n\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n\n if(isOk(myObjs)){\n const myObjsResult = myObjs.value.data;\n }\n * @returns a page of objects, wrapped in a result wrapper\n */\n readonly fetchPageWithErrors: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T>,\n ) => Promise<\n Result<\n PageResult<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * await client(Office).where({\n meetingRooms: { $contains: \"Grand Central\" },\n meetingRoomCapacities: { $contains: 30 },\n});\n* @returns an objectSet\n */\n readonly where: (\n clause: WhereClause<MergeObjectSet<Q, RDPs>>,\n ) => this;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n readonly asyncIter: <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n >(\n args?: AsyncIterArgs<Q, L, R, A, S, T>,\n ) => AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >;\n}\n\ninterface InterfaceObjectSet<\n Q extends InterfaceDefinition,\n> extends MinimalObjectSet<Q> {\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(\n clause: { [K in keyof NEW]: DerivedProperty.Selector<Q, NEW[K]> },\n ) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW ? NEW[NN]\n : NN extends keyof RDPs ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends ObjectSet<Q, any> | Record<string, SimplePropertyDef> =\n ObjectSet<Q, any>,\n> extends\n ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, UNUSED_OR_RDP>\n >\n{\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n .aggregate({\n $select: {\n $count: \"unordered\",\n \"latitude:max\": \"unordered\",\n \"latitude:min\": \"unordered\",\n \"latitude:avg\": \"unordered\",\n },\n $groupBy: {\n usState: \"exact\",\n longitude: {\n $fixedWidth: 10,\n },\n },\n });\n\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CompileTimeMetadata<LinkedType<Q, L>>[\"objectSet\"]; // ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n */\n readonly fetchOne: Q extends ObjectTypeDefinition ? <\n const L extends PropertyKeys<Q, RDPs>,\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ) => Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n : never;\n\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n */\n readonly fetchOneWithErrors: Q extends ObjectTypeDefinition ? <\n L extends PropertyKeys<Q, RDPs>,\n R extends boolean,\n S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ) => Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >\n >\n >\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n >(\n listener: ObjectSetSubscription.Listener<Q, P>,\n opts?: ObjectSetSubscription.Options<Q, P>,\n ) => { unsubscribe: () => void };\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition,\n> extends\n MinimalObjectSet<Q, D>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<MERGED>,\n FetchOne<Q, D>,\n Subscribe<MERGED>\n{\n}\n"],"mappings":"","ignoreList":[]}
@@ -91,7 +91,7 @@ describe("ObjectSet", () => {
91
91
  const withAggregations = fauxObjectSet.withProperties({
92
92
  "collectSet": base => base.pivotTo("lead").aggregate("class:collectSet"),
93
93
  "select": base => base.pivotTo("lead").selectProperty("fullName"),
94
- "collectList": base => base.pivotTo("lead").aggregate("class:collectList"),
94
+ "collectList": base => base.pivotTo("lead").aggregate("booleanProp:collectSet"),
95
95
  "min": base => base.pivotTo("lead").aggregate("employeeId:max"),
96
96
  "max": base => base.pivotTo("lead").aggregate("employeeId:min"),
97
97
  "sum": base => base.pivotTo("lead").aggregate("employeeId:sum"),
@@ -139,7 +139,7 @@ describe("ObjectSet", () => {
139
139
  });
140
140
  it("Works with selecting all non-RDP's", async () => {
141
141
  await withFamily.fetchPage({
142
- $select: ["class", "fullName", "employeeId"]
142
+ $select: ["class", "fullName", "employeeId", "booleanProp"]
143
143
  });
144
144
  expectTypeOf().toEqualTypeOf();
145
145
  expectTypeOf().toEqualTypeOf();
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSet.test.js","names":["describe","expectTypeOf","it","test","vi","fauxObjectSet","where","fn","withProperties","fetchPage","Promise","resolve","asyncIter","toEqualTypeOf","withA","base","pivotTo","aggregate","withFamily","selectProperty","withMom","withParents","todo","withAggregations","$select"],"sources":["ObjectSet.test.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 { describe, expectTypeOf, it, test, vi } from \"vitest\";\n\nimport type { ObjectSet as $ObjectSet, Osdk, PropertyKeys } from \"../index.js\";\nimport type { EmployeeApiTest } from \"../test/EmployeeApiTest.js\";\n\ndescribe(\"ObjectSet\", () => {\n const fauxObjectSet = {\n where: vi.fn(() => {\n return fauxObjectSet;\n }),\n withProperties: vi.fn(() => {\n return fauxObjectSet;\n }),\n fetchPage: vi.fn(() => Promise.resolve()),\n asyncIter: vi.fn(() => {\n return {};\n }),\n } as any as EmployeeApiTest.ObjectSet;\n\n describe(\"normal\", () => {\n test(\"select none\", async () => {\n const result = await fauxObjectSet.fetchPage();\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never>\n >();\n });\n\n test(\"select one\", async () => {\n const result = await fauxObjectSet.fetchPage({ \"$select\": [\"fullName\"] });\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"fullName\">\n >();\n });\n });\n\n describe(\".withProperties\", () => {\n test(\"single property\", async () => {\n const withA = fauxObjectSet.withProperties({\n \"a\": (base) => {\n return base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\");\n },\n });\n\n expectTypeOf(withA).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n a: \"integer\";\n }>\n >();\n\n const withAResults = await withA.fetchPage();\n\n expectTypeOf<typeof withAResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n a: \"integer\";\n }>\n >();\n\n expectTypeOf<typeof withAResults[\"data\"][0][\"a\"]>()\n .toEqualTypeOf<number>();\n });\n\n test(\"multiple properties\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n expectTypeOf(withFamily).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"dad\"]>()\n .toEqualTypeOf<string | undefined>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"sister\"]>()\n .toEqualTypeOf<string[] | undefined>();\n });\n\n describe(\"called in succession\", () => {\n test(\"independently\", () => {\n const withMom = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n const withParents = withMom.withProperties({\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n });\n\n expectTypeOf(withParents).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n }>\n >();\n });\n\n test.todo(\"with calculated properties\");\n });\n\n describe(\"nullability\", () => {\n it(\"count, exactDistinct, and approximateDistinct aren't nullable\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\"),\n \"sis\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:approximateDistinct\"),\n });\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"integer\";\n sis: \"integer\";\n }>\n >();\n });\n\n it(\n \"collectToSet, collectToList, selectProperty, and numeric aggregations are nullable\",\n async () => {\n const withAggregations = fauxObjectSet.withProperties({\n \"collectSet\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectSet\"),\n \"select\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"collectList\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n \"min\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:max\"),\n \"max\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:min\"),\n \"sum\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:sum\"),\n \"avg\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:avg\"),\n \"approximatePercentile\": (base) =>\n base.pivotTo(\"lead\").aggregate(\n \"employeeId:approximatePercentile\",\n ),\n });\n\n const withAggregationResults = await withAggregations.fetchPage();\n\n expectTypeOf<typeof withAggregationResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n collectSet: \"string\"[] | undefined;\n select: \"string\" | undefined;\n collectList: \"string\"[] | undefined;\n min: \"double\" | undefined;\n max: \"double\" | undefined;\n sum: \"double\" | undefined;\n avg: \"double\" | undefined;\n approximatePercentile: \"double\" | undefined;\n }\n >\n >();\n },\n );\n });\n\n describe(\"fetch functions return correct Osdk.Instance\", () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n\n it(\"works with .where\", async () => {\n const where = withFamily.where({ \"mom\": 1 });\n const whereResults = await where.fetchPage();\n\n expectTypeOf<typeof where>().toEqualTypeOf<typeof withFamily>();\n expectTypeOf<typeof whereResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"works with .async\", () => {\n const asyncIter = withFamily.asyncIter();\n expectTypeOf<typeof asyncIter>().toEqualTypeOf<\n AsyncIterableIterator<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >\n >();\n });\n\n it(\"Works with no select\", async () => {\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"Works with selecting all RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\", \"dad\", \"sister\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n });\n\n it(\"Works with selecting some RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n }>\n >();\n });\n\n it(\"Works with selecting all non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"fullName\", \"employeeId\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {}\n >\n >();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"class\"]>()\n .toEqualTypeOf<\n string | undefined\n >();\n });\n\n it(\"Works with selecting some non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"class\", {}>\n >();\n });\n\n it(\"Works with selecting a mix\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n \"class\",\n { mom: \"integer\" }\n >\n >();\n });\n });\n\n it(\"allows extracting the type\", () => {\n const objectSet = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n type ObjectSetType = typeof objectSet;\n\n expectTypeOf<ObjectSetType>().toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n }>\n >();\n\n const objectSet2 = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n\n it(\"Defining the Type\", () => {\n type ObjectSetType = $ObjectSet<\n EmployeeApiTest,\n {\n mom: \"integer\" | undefined;\n }\n >;\n\n fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAK7DJ,QAAQ,CAAC,WAAW,EAAE,MAAM;EAC1B,MAAMK,aAAa,GAAG;IACpB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AU,CAACT,SAAS,CAAC;UACnDe,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK;QAC1B,CAAC,CAAC;QAEFvB,YAAY,CAAsC,CAAC,CAChDY,aAAa,CAOZ,CAAC;MACP,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFX,EAAE,CAAC,4BAA4B,EAAE,MAAM;MACnBG,aAAa,CAACG,cAAc,CAAC;QAC7C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;MAIFhB,YAAY,CAAgB,CAAC,CAACY,aAAa,CAIzC,CAAC;MAEgBR,aAAa,CAACG,cAAc,CAAC;QAC9C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFf,EAAE,CAAC,mBAAmB,EAAE,MAAM;MAQ5BG,aAAa,CAACG,cAAc,CAAC;QAC3B,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ObjectSet.test.js","names":["describe","expectTypeOf","it","test","vi","fauxObjectSet","where","fn","withProperties","fetchPage","Promise","resolve","asyncIter","toEqualTypeOf","withA","base","pivotTo","aggregate","withFamily","selectProperty","withMom","withParents","todo","withAggregations","$select"],"sources":["ObjectSet.test.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 { describe, expectTypeOf, it, test, vi } from \"vitest\";\n\nimport type { ObjectSet as $ObjectSet, Osdk, PropertyKeys } from \"../index.js\";\nimport type { EmployeeApiTest } from \"../test/EmployeeApiTest.js\";\n\ndescribe(\"ObjectSet\", () => {\n const fauxObjectSet = {\n where: vi.fn(() => {\n return fauxObjectSet;\n }),\n withProperties: vi.fn(() => {\n return fauxObjectSet;\n }),\n fetchPage: vi.fn(() => Promise.resolve()),\n asyncIter: vi.fn(() => {\n return {};\n }),\n } as any as EmployeeApiTest.ObjectSet;\n\n describe(\"normal\", () => {\n test(\"select none\", async () => {\n const result = await fauxObjectSet.fetchPage();\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never>\n >();\n });\n\n test(\"select one\", async () => {\n const result = await fauxObjectSet.fetchPage({ \"$select\": [\"fullName\"] });\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"fullName\">\n >();\n });\n });\n\n describe(\".withProperties\", () => {\n test(\"single property\", async () => {\n const withA = fauxObjectSet.withProperties({\n \"a\": (base) => {\n return base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\");\n },\n });\n\n expectTypeOf(withA).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n a: \"integer\";\n }>\n >();\n\n const withAResults = await withA.fetchPage();\n\n expectTypeOf<typeof withAResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n a: \"integer\";\n }>\n >();\n\n expectTypeOf<typeof withAResults[\"data\"][0][\"a\"]>()\n .toEqualTypeOf<number>();\n });\n\n test(\"multiple properties\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n expectTypeOf(withFamily).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"dad\"]>()\n .toEqualTypeOf<string | undefined>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"sister\"]>()\n .toEqualTypeOf<string[] | undefined>();\n });\n\n describe(\"called in succession\", () => {\n test(\"independently\", () => {\n const withMom = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n const withParents = withMom.withProperties({\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n });\n\n expectTypeOf(withParents).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n }>\n >();\n });\n\n test.todo(\"with calculated properties\");\n });\n\n describe(\"nullability\", () => {\n it(\"count, exactDistinct, and approximateDistinct aren't nullable\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\"),\n \"sis\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:approximateDistinct\"),\n });\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"integer\";\n sis: \"integer\";\n }>\n >();\n });\n\n it(\n \"collectToSet, collectToList, selectProperty, and numeric aggregations are nullable\",\n async () => {\n const withAggregations = fauxObjectSet.withProperties({\n \"collectSet\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectSet\"),\n \"select\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"collectList\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"booleanProp:collectSet\"),\n \"min\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:max\"),\n \"max\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:min\"),\n \"sum\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:sum\"),\n \"avg\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:avg\"),\n \"approximatePercentile\": (base) =>\n base.pivotTo(\"lead\").aggregate(\n \"employeeId:approximatePercentile\",\n ),\n });\n\n const withAggregationResults = await withAggregations.fetchPage();\n\n expectTypeOf<typeof withAggregationResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n collectSet: \"string\"[] | undefined;\n select: \"string\" | undefined;\n collectList: \"boolean\"[] | undefined;\n min: \"double\" | undefined;\n max: \"double\" | undefined;\n sum: \"double\" | undefined;\n avg: \"double\" | undefined;\n approximatePercentile: \"double\" | undefined;\n }\n >\n >();\n },\n );\n });\n\n describe(\"fetch functions return correct Osdk.Instance\", () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n\n it(\"works with .where\", async () => {\n const where = withFamily.where({ \"mom\": 1 });\n const whereResults = await where.fetchPage();\n\n expectTypeOf<typeof where>().toEqualTypeOf<typeof withFamily>();\n expectTypeOf<typeof whereResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"works with .async\", () => {\n const asyncIter = withFamily.asyncIter();\n expectTypeOf<typeof asyncIter>().toEqualTypeOf<\n AsyncIterableIterator<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >\n >();\n });\n\n it(\"Works with no select\", async () => {\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"Works with selecting all RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\", \"dad\", \"sister\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n });\n\n it(\"Works with selecting some RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n }>\n >();\n });\n\n it(\"Works with selecting all non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"fullName\", \"employeeId\", \"booleanProp\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {}\n >\n >();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"class\"]>()\n .toEqualTypeOf<\n string | undefined\n >();\n });\n\n it(\"Works with selecting some non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"class\", {}>\n >();\n });\n\n it(\"Works with selecting a mix\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n \"class\",\n { mom: \"integer\" }\n >\n >();\n });\n });\n\n it(\"allows extracting the type\", () => {\n const objectSet = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n type ObjectSetType = typeof objectSet;\n\n expectTypeOf<ObjectSetType>().toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n }>\n >();\n\n const objectSet2 = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n\n it(\"Defining the Type\", () => {\n type ObjectSetType = $ObjectSet<\n EmployeeApiTest,\n {\n mom: \"integer\" | undefined;\n }\n >;\n\n fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;A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,EAAE,YAAY;QAC1B,MAAMgB,UAAU,CAACT,SAAS,CAAC;UACnDe,OAAO,EAAE,CAAC,OAAO;QACnB,CAAC,CAAC;QAEFvB,YAAY,CAAsC,CAAC,CAChDY,aAAa,CAEZ,CAAC;MACP,CAAC,CAAC;MAEFX,EAAE,CAAC,4BAA4B,EAAE,YAAY;QACjB,MAAMgB,UAAU,CAACT,SAAS,CAAC;UACnDe,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK;QAC1B,CAAC,CAAC;QAEFvB,YAAY,CAAsC,CAAC,CAChDY,aAAa,CAOZ,CAAC;MACP,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFX,EAAE,CAAC,4BAA4B,EAAE,MAAM;MACnBG,aAAa,CAACG,cAAc,CAAC;QAC7C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;MAIFhB,YAAY,CAAgB,CAAC,CAACY,aAAa,CAIzC,CAAC;MAEgBR,aAAa,CAACG,cAAc,CAAC;QAC9C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFf,EAAE,CAAC,mBAAmB,EAAE,MAAM;MAQ5BG,aAAa,CAACG,cAAc,CAAC;QAC3B,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -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\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 }\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 };\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;;AAiFA,OAAO,MAAMA,eAAgC,GAAG;EAC9CC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
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 | \"booleanProp\";\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 booleanProp: $PropType[\"boolean\"] | 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 booleanProp: $PropertyDef<\"boolean\", \"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;;AAoFA,OAAO,MAAMA,eAAgC,GAAG;EAC9CC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -20,8 +20,9 @@ export type PropMapToObject<
20
20
  export type MapPropNamesToObjectType<
21
21
  FROM extends ObjectOrInterfaceDefinition,
22
22
  TO extends ObjectTypeDefinition,
23
- P extends ValidOsdkPropParams<FROM>
24
- > = PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];
23
+ P extends ValidOsdkPropParams<FROM>,
24
+ OPTIONS extends never | "$rid" | "$allBaseProperties" = never
25
+ > = "$allBaseProperties" extends OPTIONS ? PropertyKeys<FROM> extends P ? PropertyKeys<TO> : PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>] : PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];
25
26
  export type PropMapToInterface<
26
27
  FROM extends ObjectTypeDefinition,
27
28
  TO extends InterfaceDefinition
@@ -39,8 +40,9 @@ export type MapPropNamesToInterface<
39
40
  export type ConvertProps<
40
41
  FROM extends ObjectOrInterfaceDefinition,
41
42
  TO extends ValidToFrom<FROM>,
42
- P extends ValidOsdkPropParams<FROM>
43
- > = TO extends FROM ? P : TO extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToObjectType<FROM, TO, P>, P extends "$rid" ? true : false, "$rid">) : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToInterface<FROM, TO, P>, P extends "$rid" ? true : false, "$rid">) : never : never;
43
+ P extends ValidOsdkPropParams<FROM>,
44
+ OPTIONS extends never | "$rid" | "$allBaseProperties" = never
45
+ > = TO extends FROM ? P : TO extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToObjectType<FROM, TO, P, OPTIONS>, P extends "$rid" ? true : false, "$rid">) : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToInterface<FROM, TO, P>, P extends "$rid" ? true : false, "$rid">) : never : never;
44
46
  /** DO NOT EXPORT FROM PACKAGE */
45
47
  export type ValidToFrom<FROM extends ObjectOrInterfaceDefinition> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition : InterfaceDefinition;
46
48
  export type IsNever<T> = [T] extends [never] ? true : false;
@@ -65,14 +67,14 @@ export type Osdk<
65
67
  export declare namespace Osdk {
66
68
  type Instance<
67
69
  Q extends ObjectOrInterfaceDefinition,
68
- OPTIONS extends never | "$rid" = never,
70
+ OPTIONS extends never | "$rid" | "$allBaseProperties" = never,
69
71
  P extends PropertyKeys<Q> = PropertyKeys<Q>,
70
72
  R extends Record<string, SimplePropertyDef> = {}
71
73
  > = OsdkBase<Q> & Pick<CompileTimeMetadata<Q>["props"], GetPropsKeys<Q, P, [R] extends [{}] ? false : true>> & ([R] extends [never] ? {} : { [A in keyof R] : SimplePropertyDef.ToRuntimeProperty<R[A]> }) & {
72
74
  readonly $link: Q extends {
73
75
  linksType?: any
74
76
  } ? Q["linksType"] : Q extends ObjectTypeDefinition ? OsdkObjectLinksObject<Q> : never
75
- readonly $as: <NEW_Q extends ValidToFrom<Q>>(type: NEW_Q | string) => Osdk.Instance<NEW_Q, OPTIONS, ConvertProps<Q, NEW_Q, P>>
77
+ readonly $as: <NEW_Q extends ValidToFrom<Q>>(type: NEW_Q | string) => Osdk.Instance<NEW_Q, OPTIONS, ConvertProps<Q, NEW_Q, P, OPTIONS>>
76
78
  readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(updatedObject?: Osdk.Instance<Q, any, NEW_PROPS> | { [K in NEW_PROPS]? : CompileTimeMetadata<Q>["props"][K] }) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>
77
79
  } & (IsNever<OPTIONS> extends true ? {} : IsAny<OPTIONS> extends true ? {} : "$rid" extends OPTIONS ? {
78
80
  readonly $rid: string
@@ -92,8 +94,10 @@ export type ExtractStrictOption<S extends NullabilityAdherence> = IsNever<S> ext
92
94
  * Anything you throw at this that is not exactly `true` should always be `never`.
93
95
  */
94
96
  export type ExtractRidOption<R extends boolean> = IsNever<R> extends true ? never : DefaultToFalse<R> extends false ? never : "$rid";
97
+ export type ExtractAllPropertiesOption<T extends boolean> = IsNever<T> extends true ? never : DefaultToFalse<T> extends false ? never : "$allBaseProperties";
95
98
  export type ExtractOptions<
96
99
  R extends boolean,
97
- S extends NullabilityAdherence = NullabilityAdherence.Default
98
- > = ExtractRidOption<R>;
100
+ S extends NullabilityAdherence = NullabilityAdherence.Default,
101
+ T extends boolean = false
102
+ > = ExtractRidOption<R> | ExtractAllPropertiesOption<T>;
99
103
  export {};
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,gBACA,6BACK,kCAAmC;AAC1C,cAAc,4BAA4B,2BAA4B;AACtE,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,2BAA2B,mCAAoC;AAC7E,cACE,6BACA,oBACK,iCAAkC;AACzC,cACE,qBACA,4BACK,oCAAqC;AAC5C,cAAc,yBAAyB,iCAAkC;AACzE,cAAc,gBAAgB,eAAgB;KAYzC,wBACD,SACA,SACA,YACA;KAEC,oBAAoB,UAAU,+BAC/B,wBACA,aAAa;AAEjB,YAAY,gBACV,UAAU,+BACR,oBAAoB,GAAG;AAE3B,YAAY;CACV,UAAU;CACV,UAAU,oBAAoB;IAC5B,UAAU,SAAS,aAAa,KAChC,QAAQ,GAAG;AAEf,YAAY;CACV,aAAa;CACb,WAAW;IACT,YAAY,oBAAoB,IAAI,iBAAiB,gBAAgB;AAEzE,YAAY;CACV,aAAa;CACb,WAAW;CACX,UAAU,oBAAoB;IAC5B,gBACF,MACA,IACA,UAAU,MAAM,WAAW,gBAAgB,MAAM;AAEnD,YAAY;CACV,aAAa;CACb,WAAW;IACT,YACF,oBAAoB,MA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,QAAQ,WAE5C,qBAAqB,CAAE,OACpB,WAAW,KAAI,kBAAkB,kBAAkB,EAAE,SAC1D;WACS,OAAO,UAAU;GAAE;EAAiB,IAAG,EAAE,eAC9C,UAAU,uBAAuB,sBAAsB;WAGlD,MAAM,cAAc,YAAY,IACvCA,MAAM,mBACH,KAAK,SACR,OACA,SACA,aAAa,GAAG,OAAO;WAGhB,SAAS,kBAAkB,aAAa,IAC/CC,gBACI,KAAK,SAAS,QAAQ,gBAErB,KAAK,cAAa,oBACjB,GACA,SAAS,SAEZ,KAAK,SAAS,GAAG,SAAS,IAAI;CACpC,KAEE,QAAQ,iBAAiB,OAAO,CAAE,IACjC,MAAM,iBAAiB,OAAO,CAAE,IAChC,eAAe,UAAU;WAAW;CAAc,IAClD,CAAE;;;;;;;;;AAUV,YAAY,oBAAoB,UAAU,wBACxC,QAAQ,WAAW,eACf,gBAAgB,YAChB,eAAe,YACf;;;;;;AAON,YAAY,iBAAiB,qBAC3B,QAAQ,WAAW,eACf,eAAe,WAAW,gBAC1B;AAGN,YAAY;CACV;CACA,UAAU,uBAAuB,qBAAqB;IACpD,iBAAiB","names":["type: NEW_Q | string","updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n }"],"sources":["../../src/OsdkObjectFrom.ts"],"version":3,"file":"OsdkObjectFrom.d.ts"}
1
+ {"mappings":"AAgBA,cACE,gBACA,6BACK,kCAAmC;AAC1C,cAAc,4BAA4B,2BAA4B;AACtE,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,2BAA2B,mCAAoC;AAC7E,cACE,6BACA,oBACK,iCAAkC;AACzC,cACE,qBACA,4BACK,oCAAqC;AAC5C,cAAc,yBAAyB,iCAAkC;AACzE,cAAc,gBAAgB,eAAgB;KAYzC,wBACD,SACA,SACA,YACA;KAEC,oBAAoB,UAAU,+BAC/B,wBACA,aAAa;AAEjB,YAAY,gBACV,UAAU,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ACV;CACA,UAAU,uBAAuB,qBAAqB;CACtD,oBAAoB;IAClB,iBAAiB,KAAK,2BAA2B","names":["type: NEW_Q | string","updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n }"],"sources":["../../src/OsdkObjectFrom.ts"],"version":3,"file":"OsdkObjectFrom.d.ts"}
@@ -7,7 +7,7 @@ export type NumericAggregateOption = "min" | "max" | "sum" | "avg" | "approximat
7
7
  type AGG_FOR_TYPE<
8
8
  T,
9
9
  U extends boolean
10
- > = number extends T ? U extends true ? NumericAggregateOption : NumericWithPropAggregateOption : string extends T ? U extends true ? StringAggregateOption : StringWithPropAggregateOption : never;
10
+ > = number extends T ? U extends true ? NumericAggregateOption : NumericWithPropAggregateOption : string extends T ? U extends true ? StringAggregateOption : StringWithPropAggregateOption : boolean extends T ? U extends true ? never : StringWithPropAggregateOption : never;
11
11
  export type ValidAggregationKeys<
12
12
  Q extends ObjectOrInterfaceDefinition,
13
13
  R extends "aggregate" | "withPropertiesAggregate" = "aggregate"
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,gCACA,qCACK,0DAA2D;AAClE,cACE,sCACK,oCAAqC;AAC5C,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAE/E,YAAY,wBAAwB,wBAAwB;AAC5D,YAAY,yBACR,QACA,QACA,QACA,QACA,wBACA;KAEC;CAAa;CAAG;mBAAoC,IACrD,UAAU,OAAO,yBAAyB,gDAC3B,IACb,UAAU,OAAO,wBAAwB;AAG/C,YAAY;CACV,UAAU;CACV,UAAU,cAAc,4BAA4B;cAIhD,MAAM,iBAAiB,SAAS,eAAe,aAC7C,+BACE,oBAAoB,GAAG,cAAc,IAAI,UAE3C,UAAU,cAAc,OAAO,qBAInC;CAAE;AAAc;AAGpB,YAAY,iBACV,UAAU,wCAET,KAAK,aAAa","names":[],"sources":["../../../src/aggregate/AggregatableKeys.ts"],"version":3,"file":"AggregatableKeys.d.ts"}
1
+ {"mappings":"AAgBA,cACE,gCACA,qCACK,0DAA2D;AAClE,cACE,sCACK,oCAAqC;AAC5C,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAE/E,YAAY,wBAAwB,wBAAwB;AAC5D,YAAY,yBACR,QACA,QACA,QACA,QACA,wBACA;KAEC;CAAa;CAAG;mBAAoC,IACrD,UAAU,OAAO,yBAAyB,gDAC3B,IACb,UAAU,OAAO,wBAAwB,gDAC3B,IAAI,UAAU,eAAe;AAGjD,YAAY;CACV,UAAU;CACV,UAAU,cAAc,4BAA4B;cAIhD,MAAM,iBAAiB,SAAS,eAAe,aAC7C,+BACE,oBAAoB,GAAG,cAAc,IAAI,UAE3C,UAAU,cAAc,OAAO,qBAInC;CAAE;AAAc;AAGpB,YAAY,iBACV,UAAU,wCAET,KAAK,aAAa","names":[],"sources":["../../../src/aggregate/AggregatableKeys.ts"],"version":3,"file":"AggregatableKeys.d.ts"}
@@ -6,8 +6,9 @@ type fetchPageByRidFn = <
6
6
  Q extends ObjectOrInterfaceDefinition,
7
7
  const L extends PropertyKeys<Q>,
8
8
  const R extends boolean,
9
- const S extends NullabilityAdherence
10
- >(objectType: Q, rids: string[], options?: FetchPageArgs<Q, L, R, any, S>) => Promise<FetchPageResult<Q, L, R, S>>;
9
+ const S extends NullabilityAdherence,
10
+ const T extends boolean
11
+ >(objectType: Q, rids: string[], options?: FetchPageArgs<Q, L, R, any, S>) => Promise<FetchPageResult<Q, L, R, S, T>>;
11
12
  export declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<"2.2.0", "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid", {
12
13
  fetchPageByRid: fetchPageByRidFn
13
14
  }>;
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,eACA,4BACK,4BAA6B;AACpC,cAAc,uBAAuB,8BAA+B;AAEpE,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,kBAAkB,iBAAkB;KAE7C;CACH,UAAU;OACJ,UAAU,aAAa;OACvB;OACA,UAAU;EAEhBA,YAAY,GACZC,gBACAC,UAAU,cAAc,GAAG,GAAG,QAAQ,OACnC,QAAQ,gBAAgB,GAAG,GAAG,GAAG;AAEtC,OAAO,cAAMC,mDAAmD,WAC9D,SACA,qDACA;CAAE,gBAAgB;AAAkB","names":["objectType: Q","rids: string[]","options?: FetchPageArgs<Q, L, R, any, S>","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<\n \"2.2.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n { fetchPageByRid: fetchPageByRidFn }\n>"],"sources":["../../../src/experimental/fetchPageByRid.ts"],"version":3,"file":"fetchPageByRid.d.ts"}
1
+ {"mappings":"AAgBA,cACE,eACA,4BACK,4BAA6B;AACpC,cAAc,uBAAuB,8BAA+B;AAEpE,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,kBAAkB,iBAAkB;KAE7C;CACH,UAAU;OACJ,UAAU,aAAa;OACvB;OACA,UAAU;OACV;EAENA,YAAY,GACZC,gBACAC,UAAU,cAAc,GAAG,GAAG,QAAQ,OACnC,QAAQ,gBAAgB,GAAG,GAAG,GAAG,GAAG;AAEzC,OAAO,cAAMC,mDAAmD,WAC9D,SACA,qDACA;CAAE,gBAAgB;AAAkB","names":["objectType: Q","rids: string[]","options?: FetchPageArgs<Q, L, R, any, S>","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<\n \"2.2.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n { fetchPageByRid: fetchPageByRidFn }\n>"],"sources":["../../../src/experimental/fetchPageByRid.ts"],"version":3,"file":"fetchPageByRid.d.ts"}
@@ -28,8 +28,9 @@ export interface FetchPageArgs<
28
28
  K extends PropertyKeys<Q> = PropertyKeys<Q>,
29
29
  R extends boolean = false,
30
30
  A extends Augments = never,
31
- S extends NullabilityAdherence = NullabilityAdherence.Default
32
- > extends AsyncIterArgs<Q, K, R, A, S> {
31
+ S extends NullabilityAdherence = NullabilityAdherence.Default,
32
+ T extends boolean = false
33
+ > extends AsyncIterArgs<Q, K, R, A, S, T> {
33
34
  $nextPageToken?: string;
34
35
  $pageSize?: number;
35
36
  }
@@ -38,9 +39,11 @@ export interface AsyncIterArgs<
38
39
  K extends PropertyKeys<Q> = PropertyKeys<Q>,
39
40
  R extends boolean = false,
40
41
  A extends Augments = never,
41
- S extends NullabilityAdherence = NullabilityAdherence.Default
42
+ S extends NullabilityAdherence = NullabilityAdherence.Default,
43
+ T extends boolean = false
42
44
  > extends SelectArg<Q, K, R, S>, OrderByArg<Q, PropertyKeys<Q>> {
43
45
  $__UNSTABLE_useOldInterfaceApis?: boolean;
46
+ $includeAllBaseObjectProperties?: T;
44
47
  }
45
48
  export type Augment<
46
49
  X extends ObjectOrInterfaceDefinition,
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAE/E,YAAY,uBAAuB,QAAQ,UAAU;AACrD,yBAAiB;MACH,UAAU;;AAGxB,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;CACzC,oBAAoB;CACpB,UAAU,uBAAuB,qBAAqB;EACtD;CACA,mBAAmB;CACnB,cAAc;AACf;AAED,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;EACzC;CACA,cACG,KAAK,MAAK,QAAQ;AAEtB;AAED,YAAY;CACV,UAAU;CACV,UAAU,UAAU;IAClB,UAAU,UAAU,YAAY,aAAa,KAC7C,EAAE,uCAAuC,EAAE,qBAC3C,aAAa;AAEjB,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;CACzC,oBAAoB;CACpB,UAAU;CACV,UAAU,uBAAuB,qBAAqB;UAC9C,cAAc,GAAG,GAAG,GAAG,GAAG,GAAG;CACrC;CACA;AACD;AAED,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;CACzC,oBAAoB;CACpB,UAAU;CACV,UAAU,uBAAuB,qBAAqB;UAC9C,UAAU,GAAG,GAAG,GAAG,IAAI,WAAW,GAAG,aAAa,IAAI;CAC9D;AACD;AAED,YAAY;CACV,UAAU;CACV;OACK,KAAK,oBAAoB,GAAG,cAAa;AAEhD,YAAY,WAAW","names":[],"sources":["../../../src/object/FetchPageArgs.ts"],"version":3,"file":"FetchPageArgs.d.ts"}
1
+ {"mappings":"AAgBA,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAE/E,YAAY,uBAAuB,QAAQ,UAAU;AACrD,yBAAiB;MACH,UAAU;;AAGxB,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;CACzC,oBAAoB;CACpB,UAAU,uBAAuB,qBAAqB;EACtD;CACA,mBAAmB;CACnB,cAAc;AACf;AAED,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;EACzC;CACA,cACG,KAAK,MAAK,QAAQ;AAEtB;AAED,YAAY;CACV,UAAU;CACV,UAAU,UAAU;IAClB,UAAU,UAAU,YAAY,aAAa,KAC7C,EAAE,uCAAuC,EAAE,qBAC3C,aAAa;AAEjB,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;CACzC,oBAAoB;CACpB,UAAU;CACV,UAAU,uBAAuB,qBAAqB;CACtD,oBAAoB;UACZ,cAAc,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;CACxC;CACA;AACD;AAED,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;CACzC,oBAAoB;CACpB,UAAU;CACV,UAAU,uBAAuB,qBAAqB;CACtD,oBAAoB;UACZ,UAAU,GAAG,GAAG,GAAG,IAAI,WAAW,GAAG,aAAa,IAAI;CAC9D;CACA,kCAAkC;AACnC;AAED,YAAY;CACV,UAAU;CACV;OACK,KAAK,oBAAoB,GAAG,cAAa;AAEhD,YAAY,WAAW","names":[],"sources":["../../../src/object/FetchPageArgs.ts"],"version":3,"file":"FetchPageArgs.d.ts"}
@@ -24,8 +24,9 @@ export type FetchPageResult<
24
24
  Q extends ObjectOrInterfaceDefinition,
25
25
  L extends PropertyKeys<Q>,
26
26
  R extends boolean,
27
- S extends NullabilityAdherence
28
- > = PageResult<PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S>> : Osdk.Instance<Q, ExtractOptions<R, S>, L>>;
27
+ S extends NullabilityAdherence,
28
+ T extends boolean
29
+ > = PageResult<PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S, T>> : Osdk.Instance<Q, ExtractOptions<R, S, T>, L>>;
29
30
  /**
30
31
  * Helper type for converting fetch options into an Osdk object
31
32
  */
@@ -34,6 +35,7 @@ export type SingleOsdkResult<
34
35
  L extends PropertyKeys<Q> | (keyof RDPs & string),
35
36
  R extends boolean,
36
37
  S extends NullabilityAdherence,
37
- RDPs extends Record<string, SimplePropertyDef> = {}
38
- > = Osdk.Instance<Q, ExtractOptions<R, S>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>;
38
+ RDPs extends Record<string, SimplePropertyDef> = {},
39
+ T extends boolean = false
40
+ > = Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>;
39
41
  export type IsAny<T> = unknown extends T ? [keyof T] extends [never] ? false : true : false;
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,gBAAgB,SAAS,YAAY,sBAAuB;AAC1E,cAAc,kBAAkB,kBAAmB;AACnD,cAAc,4BAA4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AAG,eAAe,GAAG,GAAG,MAC9D,KAAK,SAAS,GAAG,eAAe,GAAG,GAAG,IAAI;;;;AAMhD,YAAY;CACV,UAAU;CACV,UAAU,aAAa,YAAY;CACnC;CACA,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;CACnD,oBAAoB;IAClB,KAAK,SACP,GACA,eAAe,GAAG,GAAG,IACrB,aAAa,WAAW,IAAI,aAAa,KAAK,aAAa,KAAK,MAC7D,KAAK,cAAc,MAAM,MAAK,KAAK;AAGxC,YAAY,MAAM,qBAAqB,WAC5B,qBAAqB,QAAQ,OACpC","names":[],"sources":["../../../src/object/FetchPageResult.ts"],"version":3,"file":"FetchPageResult.d.ts"}
@@ -43,8 +43,9 @@ interface FetchPage<
43
43
  L extends PropertyKeys<Q, RDPs>,
44
44
  R extends boolean,
45
45
  const A extends Augments,
46
- S extends NullabilityAdherence = NullabilityAdherence.Default
47
- >(args?: FetchPageArgs<Q, L, R, A, S>) => Promise<PageResult<Osdk.Instance<Q, ExtractOptions<R, S>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>>>;
46
+ S extends NullabilityAdherence = NullabilityAdherence.Default,
47
+ T extends boolean = false
48
+ >(args?: FetchPageArgs<Q, L, R, A, S, T>) => Promise<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>>>;
48
49
  /**
49
50
  * Gets a page of objects of this type, with a result wrapper
50
51
  * @param args - Args to specify next page token and page size, if applicable
@@ -63,8 +64,9 @@ interface FetchPage<
63
64
  L extends PropertyKeys<Q, RDPs>,
64
65
  R extends boolean,
65
66
  const A extends Augments,
66
- S extends NullabilityAdherence = NullabilityAdherence.Default
67
- >(args?: FetchPageArgs<Q, L, R, A, S>) => Promise<Result<PageResult<Osdk.Instance<Q, ExtractOptions<R, S>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>>>>;
67
+ S extends NullabilityAdherence = NullabilityAdherence.Default,
68
+ T extends boolean = false
69
+ >(args?: FetchPageArgs<Q, L, R, A, S, T>) => Promise<Result<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>>>>;
68
70
  }
69
71
  interface Where<
70
72
  Q extends ObjectOrInterfaceDefinition,
@@ -98,8 +100,9 @@ interface AsyncIter<
98
100
  L extends PropertyKeys<Q, RDPs>,
99
101
  R extends boolean,
100
102
  const A extends Augments,
101
- S extends NullabilityAdherence = NullabilityAdherence.Default
102
- >(args?: AsyncIterArgs<Q, L, R, A, S>) => AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions<R, S>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>>;
103
+ S extends NullabilityAdherence = NullabilityAdherence.Default,
104
+ T extends boolean = false
105
+ >(args?: AsyncIterArgs<Q, L, R, A, S, T>) => AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>>;
103
106
  }
104
107
  interface WithProperties<
105
108
  Q extends ObjectOrInterfaceDefinition = any,
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cAAc,qBAAqB,+BAAgC;AACnE,cAAc,sEAAsE,yCAA0C;AAC9H,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,uBAAuB,yCAA0C;AAC/E,cACE,eACA,UACA,eACA,sBACA,iBACK,4BAA6B;AACpC,cAAc,cAAc,qBAAsB;AAElD,cACE,oCACA,6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UAAU,aAAa,GAAG;QAC1B;QACA,UAAU,QAAQ,UAAU,qBAAqB;GAEvDC,YAAY,eAAe,IAC3BC,UAAU,UAAU,GAAG,GAAG,GAAG,OAC1B,QACH,KAAK,SACH,GACA,eAAe,GAAG,IAClB,aAAa,WAAW,IAAI,aAAa,KAAK,aAAa,KAAK,MAC7D,KAAK,cAAc,MAAM,MAAK,KAAK;;;;UAQnC,oBAAoB,UAAU;EACnC,UAAU,aAAa,GAAG;EAC1B;EACA,UAAU,QAAQ,UAAU,qBAAqB;GAEjDD,YAAY,eAAe,IAC3BC,UAAU,UAAU,GAAG,GAAG,GAAG,OAC1B,QACH,OACE,KAAK,SACH,GACA,eAAe,GAAG,IAClB,aAAa,WAAW,IAAI,aAAa,KAAK,aAAa,KAAK,MAC7D,KAAK,cAAc,MAAM,MAAK,KAAK;AAK/C;UAGS,UACR,UAAU,6BACV;;;;;;;UAOS,kBACD,UAAU,aAAa,IAE7BC,UAAU,sBAAsB,SAAS,GAAG,IAC5CC,OAAO,sBAAsB,QAAQ,GAAG,OACrC;EAAE;CAAyB;AACjC;UAES;CACR,UAAU;CACV,UAAU,eAAe;CACzB,eAAe;UAEf,iBAAiB,GAAG,IACpB,eAAe,GAAG,IAClB,UAAU,SACV,cAAc,SACd,QAAQ,SACR,SAAS,GAAG,IACZ,UAAU,QACZ,CACC","names":["args?: FetchPageArgs<Q, L, R, A, S>","clause: WhereClause<MergeObjectSet<Q, RDPs>>","args?: AsyncIterArgs<Q, L, R, A, S>","clause: { [K in keyof NEW]: DerivedProperty.Selector<Q, NEW[K]> }","req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>","type: L","primaryKey: PrimaryKeyType<Q>","options?: SelectArg<Q, L, R, S>","listener: ObjectSetSubscription.Listener<Q, P>","opts?: ObjectSetSubscription.Options<Q, P>"],"sources":["../../../src/objectSet/ObjectSet.ts"],"version":3,"file":"ObjectSet.d.ts"}
1
+ {"mappings":"AAgBA,cAAc,qBA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T>","clause: { [K in keyof NEW]: DerivedProperty.Selector<Q, NEW[K]> }","req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>","type: L","primaryKey: PrimaryKeyType<Q>","options?: SelectArg<Q, L, R, S>","listener: ObjectSetSubscription.Listener<Q, P>","opts?: ObjectSetSubscription.Options<Q, P>"],"sources":["../../../src/objectSet/ObjectSet.ts"],"version":3,"file":"ObjectSet.d.ts"}
@@ -1,6 +1,6 @@
1
1
  import type { ObjectMetadata as $ObjectMetadata, ObjectSet as $ObjectSet, ObjectTypeDefinition as $ObjectTypeDefinition, PropertyDef as $PropertyDef, PropertyValueWireToClient as $PropType, SingleLinkAccessor as $SingleLinkAccessor } from "../index.js";
2
2
  export declare namespace EmployeeApiTest {
3
- type PropertyKeys = "employeeId" | "fullName" | "class";
3
+ type PropertyKeys = "employeeId" | "fullName" | "class" | "booleanProp";
4
4
  interface Links {
5
5
  readonly lead: $SingleLinkAccessor<EmployeeApiTest>;
6
6
  readonly peeps: EmployeeApiTest.ObjectSet;
@@ -9,6 +9,7 @@ export declare namespace EmployeeApiTest {
9
9
  readonly class: $PropType["string"] | undefined;
10
10
  readonly fullName: $PropType["string"] | undefined;
11
11
  readonly employeeId: $PropType["integer"] | undefined;
12
+ readonly booleanProp: $PropType["boolean"] | undefined;
12
13
  }
13
14
  type StrictProps = Props;
14
15
  interface ObjectSet extends $ObjectSet<EmployeeApiTest, EmployeeApiTest.ObjectSet> {}
@@ -51,6 +52,7 @@ export interface EmployeeApiTest extends $ObjectTypeDefinition {
51
52
  class: $PropertyDef<"string", "nullable", "single">
52
53
  fullName: $PropertyDef<"string", "nullable", "single">
53
54
  employeeId: $PropertyDef<"integer", "nullable", "single">
55
+ booleanProp: $PropertyDef<"boolean", "nullable", "single">
54
56
  }
55
57
  rid: "ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44"
56
58
  status: "ACTIVE"
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,kBAAkB,iBAClB,aAAa,YACb,wBAAwB,uBACxB,eAAe,cACf,6BAA6B,WAC7B,sBAAsB,2BACjB,aAAc;AAErB,yBAAiB;MACH,eACR,eACA,aACA;WAEa,MAAM;WACZ,MAAM,oBAAoB;WAC1B,OAAO,gBAAgB;CACjC;WAEgB,MAAM;WACZ,OAAO,UAAU;WACjB,UAAU,UAAU;WACpB,YAAY,UAAU;CAChC;MACW,cAAc;WAET,kBACP,WAAW,iBAAiB,gBAAgB,WACtD,CAAE;;AAGJ,iBAAiB,wBAAwB,sBAAsB;CAC7D,MAAM;CACN,SAAS;CACT,uBAAuB;EACrB,WAAW,gBAAgB;EAC3B,OAAO,gBAAgB;EACvB,WAAW,gBAAgB;EAC3B,aAAa,gBAAgB;EAC7B,SAAS;EACT,aAAa;EACb,aAAa;EACb,MAAM;GACJ,MAAM;GACN,OAAO;GACP,MAAM;EACP;EACD,aAAa;EACb,cAAc;GACZ,cAAc;IACZ,QAAQ;GACT;EACF;EACD,qBAAqB;GACnB,cAAc;IACZ,UAAU;GACX;EACF;EACD,OAAO;GACL,MAAM,gBAAgB,KAAK,iBAAiB;GAC5C,OAAO,gBAAgB,KAAK,iBAAiB;EAC9C;EACD,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,YAAY;GACV,OAAO,aAAa,UAAU,YAAY;GAC1C,UAAU,aAAa,UAAU,YAAY;GAC7C,YAAY,aAAa,WAAW,YAAY;EACjD;EACD,KAAK;EACL,QAAQ;EACR,eAAe;EACf,MAAM;EACN,YAAY;CACb;AACF;AAED,OAAO,cAAMA,iBAAiB","names":["EmployeeApiTest: EmployeeApiTest"],"sources":["../../../src/test/EmployeeApiTest.ts"],"version":3,"file":"EmployeeApiTest.d.ts"}
1
+ {"mappings":"AAgBA,cACE,kBAAkB,iBAClB,aAAa,YACb,wBAAwB,uBACxB,eAAe,cACf,6BAA6B,WAC7B,sBAAsB,2BACjB,aAAc;AAErB,yBAAiB;MACH,eACR,eACA,aACA,UACA;WAEa,MAAM;WACZ,MAAM,oBAAoB;WAC1B,OAAO,gBAAgB;CACjC;WAEgB,MAAM;WACZ,OAAO,UAAU;WACjB,UAAU,UAAU;WACpB,YAAY,UAAU;WACtB,aAAa,UAAU;CACjC;MACW,cAAc;WAET,kBACP,WAAW,iBAAiB,gBAAgB,WACtD,CAAE;;AAGJ,iBAAiB,wBAAwB,sBAAsB;CAC7D,MAAM;CACN,SAAS;CACT,uBAAuB;EACrB,WAAW,gBAAgB;EAC3B,OAAO,gBAAgB;EACvB,WAAW,gBAAgB;EAC3B,aAAa,gBAAgB;EAC7B,SAAS;EACT,aAAa;EACb,aAAa;EACb,MAAM;GACJ,MAAM;GACN,OAAO;GACP,MAAM;EACP;EACD,aAAa;EACb,cAAc;GACZ,cAAc;IACZ,QAAQ;GACT;EACF;EACD,qBAAqB;GACnB,cAAc;IACZ,UAAU;GACX;EACF;EACD,OAAO;GACL,MAAM,gBAAgB,KAAK,iBAAiB;GAC5C,OAAO,gBAAgB,KAAK,iBAAiB;EAC9C;EACD,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,YAAY;GACV,OAAO,aAAa,UAAU,YAAY;GAC1C,UAAU,aAAa,UAAU,YAAY;GAC7C,YAAY,aAAa,WAAW,YAAY;GAChD,aAAa,aAAa,WAAW,YAAY;EAClD;EACD,KAAK;EACL,QAAQ;EACR,eAAe;EACf,MAAM;EACN,YAAY;CACb;AACF;AAED,OAAO,cAAMA,iBAAiB","names":["EmployeeApiTest: EmployeeApiTest"],"sources":["../../../src/test/EmployeeApiTest.ts"],"version":3,"file":"EmployeeApiTest.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/api",
3
- "version": "2.2.0-beta.8",
3
+ "version": "2.2.0-beta.9",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -48,8 +48,8 @@
48
48
  "@microsoft/api-extractor": "^7.49.1",
49
49
  "ts-expect": "^1.3.0",
50
50
  "typescript": "~5.5.4",
51
- "@osdk/monorepo.tsconfig": "~0.1.0-beta.1",
52
- "@osdk/monorepo.api-extractor": "~0.1.0-beta.1"
51
+ "@osdk/monorepo.api-extractor": "~0.1.0-beta.1",
52
+ "@osdk/monorepo.tsconfig": "~0.1.0-beta.1"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"