@osdk/api 2.2.0-beta.7 → 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 (79) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/build/browser/OsdkBase.js.map +1 -1
  3. package/build/browser/OsdkObjectFrom.js.map +1 -1
  4. package/build/browser/aggregate/AggregatableKeys.js.map +1 -1
  5. package/build/browser/experimental/fetchPageByRid.js +22 -0
  6. package/build/browser/experimental/fetchPageByRid.js.map +1 -0
  7. package/build/browser/index.js.map +1 -1
  8. package/build/browser/object/FetchPageArgs.js.map +1 -1
  9. package/build/browser/object/FetchPageResult.js.map +1 -1
  10. package/build/browser/objectSet/ObjectSet.js.map +1 -1
  11. package/build/browser/objectSet/ObjectSet.test.js +2 -6
  12. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  13. package/build/browser/ontology/ObjectSpecifier.js +2 -0
  14. package/build/browser/ontology/ObjectSpecifier.js.map +1 -0
  15. package/build/browser/ontology/ObjectSpecifier.test.js +53 -0
  16. package/build/browser/ontology/ObjectSpecifier.test.js.map +1 -0
  17. package/build/browser/ontology/QueryDefinition.js.map +1 -1
  18. package/build/browser/public/unstable.js +1 -0
  19. package/build/browser/public/unstable.js.map +1 -1
  20. package/build/browser/test/EmployeeApiTest.js +21 -0
  21. package/build/browser/test/EmployeeApiTest.js.map +1 -0
  22. package/build/browser/test/FooInterfaceApiTest.js +22 -0
  23. package/build/browser/test/FooInterfaceApiTest.js.map +1 -0
  24. package/build/cjs/{FilteredPropertyKeys-DQJEjgBE.d.cts → FilteredPropertyKeys-qAMesbuN.d.cts} +21 -14
  25. package/build/cjs/index.d.cts +8 -4
  26. package/build/cjs/public/unstable.cjs +8 -0
  27. package/build/cjs/public/unstable.cjs.map +1 -1
  28. package/build/cjs/public/unstable.d.cts +8 -3
  29. package/build/esm/OsdkBase.js.map +1 -1
  30. package/build/esm/OsdkObjectFrom.js.map +1 -1
  31. package/build/esm/aggregate/AggregatableKeys.js.map +1 -1
  32. package/build/esm/experimental/fetchPageByRid.js +22 -0
  33. package/build/esm/experimental/fetchPageByRid.js.map +1 -0
  34. package/build/esm/index.js.map +1 -1
  35. package/build/esm/object/FetchPageArgs.js.map +1 -1
  36. package/build/esm/object/FetchPageResult.js.map +1 -1
  37. package/build/esm/objectSet/ObjectSet.js.map +1 -1
  38. package/build/esm/objectSet/ObjectSet.test.js +2 -6
  39. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  40. package/build/esm/ontology/ObjectSpecifier.js +2 -0
  41. package/build/esm/ontology/ObjectSpecifier.js.map +1 -0
  42. package/build/esm/ontology/ObjectSpecifier.test.js +53 -0
  43. package/build/esm/ontology/ObjectSpecifier.test.js.map +1 -0
  44. package/build/esm/ontology/QueryDefinition.js.map +1 -1
  45. package/build/esm/public/unstable.js +1 -0
  46. package/build/esm/public/unstable.js.map +1 -1
  47. package/build/esm/test/EmployeeApiTest.js +21 -0
  48. package/build/esm/test/EmployeeApiTest.js.map +1 -0
  49. package/build/esm/test/FooInterfaceApiTest.js +22 -0
  50. package/build/esm/test/FooInterfaceApiTest.js.map +1 -0
  51. package/build/types/OsdkBase.d.ts +2 -0
  52. package/build/types/OsdkBase.d.ts.map +1 -1
  53. package/build/types/OsdkObjectFrom.d.ts +12 -8
  54. package/build/types/OsdkObjectFrom.d.ts.map +1 -1
  55. package/build/types/aggregate/AggregatableKeys.d.ts +1 -1
  56. package/build/types/aggregate/AggregatableKeys.d.ts.map +1 -1
  57. package/build/types/experimental/fetchPageByRid.d.ts +15 -0
  58. package/build/types/experimental/fetchPageByRid.d.ts.map +1 -0
  59. package/build/types/index.d.ts +2 -0
  60. package/build/types/index.d.ts.map +1 -1
  61. package/build/types/object/FetchPageArgs.d.ts +6 -3
  62. package/build/types/object/FetchPageArgs.d.ts.map +1 -1
  63. package/build/types/object/FetchPageResult.d.ts +6 -4
  64. package/build/types/object/FetchPageResult.d.ts.map +1 -1
  65. package/build/types/objectSet/ObjectSet.d.ts +9 -6
  66. package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
  67. package/build/types/ontology/ObjectSpecifier.d.ts +5 -0
  68. package/build/types/ontology/ObjectSpecifier.d.ts.map +1 -0
  69. package/build/types/ontology/ObjectSpecifier.test.d.ts +1 -0
  70. package/build/types/ontology/ObjectSpecifier.test.d.ts.map +1 -0
  71. package/build/types/ontology/QueryDefinition.d.ts +5 -1
  72. package/build/types/ontology/QueryDefinition.d.ts.map +1 -1
  73. package/build/types/public/unstable.d.ts +1 -0
  74. package/build/types/public/unstable.d.ts.map +1 -1
  75. package/build/types/test/EmployeeApiTest.d.ts +64 -0
  76. package/build/types/test/EmployeeApiTest.d.ts.map +1 -0
  77. package/build/types/test/FooInterfaceApiTest.d.ts +50 -0
  78. package/build/types/test/FooInterfaceApiTest.d.ts.map +1 -0
  79. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FooInterfaceApiTest.js","names":["FooInterfaceApiTest","type","apiName","osdkMetadata"],"sources":["FooInterfaceApiTest.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 InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyDef as $PropertyDef,\n PropertyValueWireToClient as $PropType,\n} from \"../index.js\";\n\nexport type OsdkObjectLinks$FooInterface = {};\n\nexport namespace FooInterfaceApiTest {\n export type PropertyKeys = \"name\" | \"description\";\n\n export interface Props {\n readonly description: $PropType[\"string\"] | undefined;\n readonly name: $PropType[\"string\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet\n extends $ObjectSet<FooInterfaceApiTest, FooInterfaceApiTest.ObjectSet>\n {}\n\n export type OsdkInstance<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof FooInterfaceApiTest.Props = keyof FooInterfaceApiTest.Props,\n > = $Osdk.Instance<FooInterfaceApiTest, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof FooInterfaceApiTest.Props = keyof FooInterfaceApiTest.Props,\n > = OsdkInstance<OPTIONS, K>;\n}\n\nexport interface FooInterfaceApiTest extends $InterfaceDefinition {\n osdkMetadata: any;\n type: \"interface\";\n apiName: \"FooInterface\";\n __DefinitionMetadata?: {\n objectSet: FooInterfaceApiTest.ObjectSet;\n props: FooInterfaceApiTest.Props;\n linksType: OsdkObjectLinks$FooInterface;\n strictProps: FooInterfaceApiTest.StrictProps;\n apiName: \"FooInterface\";\n description: \"Its a Foo.\";\n displayName: \"Foo interface\";\n links: {};\n properties: {\n /**\n * display name: 'Description',\n * description: Description of Description\n */\n description: $PropertyDef<\"string\", \"nullable\", \"single\">;\n /**\n * display name: 'Name',\n * description: Name of Foo\n */\n name: $PropertyDef<\"string\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.interface-type.1b1b1b1b-1b1b-1b1b-1b1b-1b1b1b1b1b1b\";\n type: \"interface\";\n implementedBy: [\"Employee\"];\n };\n}\n\nexport const FooInterfaceApiTest: FooInterfaceApiTest = {\n type: \"interface\",\n apiName: \"FooInterface\",\n osdkMetadata: {},\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoEA,OAAO,MAAMA,mBAAwC,GAAG;EACtDC,IAAI,EAAE,WAAW;EACjBC,OAAO,EAAE,cAAc;EACvBC,YAAY,EAAE,CAAC;AACjB,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,14 +592,18 @@ 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
 
603
+ type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {
604
+ __apiName: Q["apiName"] | (Q extends InterfaceDefinition ? NonNullable<Q["__DefinitionMetadata"]> extends InterfaceMetadata ? NonNullable<NonNullable<Q["__DefinitionMetadata"]>["implementedBy"]>[number] : never : never);
605
+ };
606
+
602
607
  type OsdkObjectPrimaryKeyType<Q extends ObjectTypeDefinition> = PropertyValueWireToClient[CompileTimeMetadata<Q>["primaryKeyType"]];
603
608
 
604
609
  type OsdkBase<Q extends ObjectOrInterfaceDefinition> = {
@@ -606,6 +611,7 @@ type OsdkBase<Q extends ObjectOrInterfaceDefinition> = {
606
611
  readonly $objectType: string;
607
612
  readonly $primaryKey: PrimaryKeyType<Q>;
608
613
  readonly $title: string | undefined;
614
+ readonly $objectSpecifier: ObjectSpecifier<Q>;
609
615
  };
610
616
  type PrimaryKeyType<Q extends ObjectOrInterfaceDefinition> = (Q extends ObjectTypeDefinition ? OsdkObjectPrimaryKeyType<Q> : unknown) & PropertyValueWireToClient[PrimaryKeyTypes];
611
617
 
@@ -614,7 +620,7 @@ type ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> = SpecialOsdkPro
614
620
  type ApiNameAsString<T extends ObjectOrInterfaceDefinition> = CompileTimeMetadata<T>["apiName"];
615
621
  type JustProps<T extends ObjectOrInterfaceDefinition, P extends ValidOsdkPropParams<T>> = P extends "$all" ? PropertyKeys<T> : Exclude<P, SpecialOsdkPropParams>;
616
622
  type PropMapToObject<FROM extends ObjectOrInterfaceDefinition, TO extends ObjectTypeDefinition> = NonNullable<CompileTimeMetadata<TO>["interfaceMap"]>[ApiNameAsString<FROM>];
617
- 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>];
618
624
  type PropMapToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition> = NonNullable<CompileTimeMetadata<FROM>["inverseInterfaceMap"]>[ApiNameAsString<TO>];
619
625
  type MapPropNamesToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition, P extends ValidOsdkPropParams<FROM>> = PropMapToInterface<FROM, TO>[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>];
620
626
  /**
@@ -622,7 +628,7 @@ type MapPropNamesToInterface<FROM extends ObjectTypeDefinition, TO extends Inter
622
628
  * @param TO - the interface or object type to convert to
623
629
  * @param P - the property(s) to convert
624
630
  */
625
- 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;
626
632
  /** DO NOT EXPORT FROM PACKAGE */
627
633
  type ValidToFrom<FROM extends ObjectOrInterfaceDefinition> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition : InterfaceDefinition;
628
634
  type IsNever<T> = [T] extends [never] ? true : false;
@@ -634,13 +640,13 @@ type GetPropsKeys<Q extends ObjectOrInterfaceDefinition, P extends PropertyKeys<
634
640
  */
635
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>>;
636
642
  declare namespace Osdk {
637
- 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] ? {} : {
638
644
  [A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]>;
639
645
  }) & {
640
646
  readonly $link: Q extends {
641
647
  linksType?: any;
642
648
  } ? Q["linksType"] : Q extends ObjectTypeDefinition ? OsdkObjectLinksObject<Q> : never;
643
- 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>>;
644
650
  readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(updatedObject?: Osdk.Instance<Q, any, NEW_PROPS> | {
645
651
  [K in NEW_PROPS]?: CompileTimeMetadata<Q>["props"][K];
646
652
  }) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;
@@ -654,7 +660,8 @@ declare namespace Osdk {
654
660
  * Anything you throw at this that is not exactly `true` should always be `never`.
655
661
  */
656
662
  type ExtractRidOption<R extends boolean> = IsNever<R> extends true ? never : DefaultToFalse<R> extends false ? never : "$rid";
657
- 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>;
658
665
 
659
666
  type Just<Z extends keyof V, V> = {
660
667
  [k in Z]: V[k];
@@ -997,7 +1004,7 @@ interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
997
1004
 
998
1005
  * @returns a page of objects
999
1006
  */
1000
- 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, {
1001
1008
  [K in Extract<keyof RDPs, L>]: RDPs[K];
1002
1009
  }>>>;
1003
1010
  /**
@@ -1014,7 +1021,7 @@ interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
1014
1021
  }
1015
1022
  * @returns a page of objects, wrapped in a result wrapper
1016
1023
  */
1017
- 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, {
1018
1025
  [K in Extract<keyof RDPs, L>]: RDPs[K];
1019
1026
  }>>>>;
1020
1027
  }
@@ -1040,7 +1047,7 @@ interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
1040
1047
  * }
1041
1048
  * @returns an async iterator to load all objects
1042
1049
  */
1043
- 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, {
1044
1051
  [K in Extract<keyof RDPs, L>]: RDPs[K];
1045
1052
  }>>;
1046
1053
  }
@@ -1151,4 +1158,4 @@ type FilteredPropertyKeys<O extends ObjectOrInterfaceDefinition, T extends WireP
1151
1158
  [K in keyof NonNullable<O["__DefinitionMetadata"]>["properties"]]: NonNullable<O["__DefinitionMetadata"]>["properties"][K]["type"] extends T ? K : never;
1152
1159
  }[keyof NonNullable<O["__DefinitionMetadata"]>["properties"]];
1153
1160
 
1154
- export { ObjectMetadata as $, type Attachment as A, type SelectArgToKeys as B, type FetchPageResult as C, DistanceUnitMapping as D, type SingleOsdkResult as E, type FetchPageArgs as F, type GeoFilterOptions as G, type Media as H, type InterfaceDefinition as I, type MediaMetadata as J, isOk as K, type Result as L, type MediaReference as M, NullabilityAdherence as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, type BaseObjectSet as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, ObjectSetSubscription as T, type FilteredPropertyKeys as U, type ValidAggregationKeys as V, type WhereClause as W, type InterfaceMetadata as X, type ObjectOrInterfaceDefinition as Y, type PropertyKeys as Z, type CompileTimeMetadata as _, type AttachmentUpload as a, type PropertyDef as a0, type VersionBound as a1, type BaseWirePropertyTypes as a2, type WirePropertyTypes as a3, type PrimaryKeyType as a4, type ConvertProps as a5, Osdk as a6, type PageResult as a7, TimeseriesDurationMapping as a8, type GeotimeSeriesProperty as a9, type TimeSeriesPoint as aa, type TimeSeriesProperty as ab, type TimeSeriesQuery as ac, type LinkedType as ad, type LinkNames as ae, type ExtractOptions as af, type MinimalObjectSet as ag, type OsdkBase as b, type OsdkObjectPrimaryKeyType as c, type ObjectSet as d, type OsdkMetadata as e, type PrimaryKeyTypes as f, type AggregateOpts as g, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as h, type AggregationResultsWithGroups as i, type AggregationResultsWithoutGroups as j, type AggregationClause as k, type AggregationsResults as l, type GeoFilter_Intersects as m, type GeoFilter_Within as n, type PossibleWhereClauseFilters as o, type OsdkObjectPropertyType as p, type OsdkObjectLinksObject as q, DerivedProperty as r, DurationMapping as s, type AllGroupByValues as t, type GroupByClause as u, type GroupByRange as v, type AsyncIterArgs as w, type Augment as x, type Augments as y, type SelectArg as z };
1161
+ export { type CompileTimeMetadata as $, type Attachment as A, type SelectArgToKeys as B, type FetchPageResult as C, DistanceUnitMapping as D, type SingleOsdkResult as E, type FetchPageArgs as F, type GeoFilterOptions as G, type Media as H, type InterfaceDefinition as I, type MediaMetadata as J, isOk as K, type Result as L, type MediaReference as M, NullabilityAdherence as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, type BaseObjectSet as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, ObjectSetSubscription as T, type FilteredPropertyKeys as U, type ValidAggregationKeys as V, type WhereClause as W, type InterfaceMetadata as X, type ObjectOrInterfaceDefinition as Y, type PropertyKeys as Z, type ObjectSpecifier as _, type AttachmentUpload as a, ObjectMetadata as a0, type PropertyDef as a1, type VersionBound as a2, type BaseWirePropertyTypes as a3, type WirePropertyTypes as a4, type PrimaryKeyType as a5, type ConvertProps as a6, Osdk as a7, type PageResult as a8, TimeseriesDurationMapping as a9, type GeotimeSeriesProperty as aa, type TimeSeriesPoint as ab, type TimeSeriesProperty as ac, type TimeSeriesQuery as ad, type LinkedType as ae, type LinkNames as af, type ExtractOptions as ag, type MinimalObjectSet as ah, type OsdkBase as b, type OsdkObjectPrimaryKeyType as c, type ObjectSet as d, type OsdkMetadata as e, type PrimaryKeyTypes as f, type AggregateOpts as g, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as h, type AggregationResultsWithGroups as i, type AggregationResultsWithoutGroups as j, type AggregationClause as k, type AggregationsResults as l, type GeoFilter_Intersects as m, type GeoFilter_Within as n, type PossibleWhereClauseFilters as o, type OsdkObjectPropertyType as p, type OsdkObjectLinksObject as q, DerivedProperty as r, DurationMapping as s, type AllGroupByValues as t, type GroupByClause as u, type GroupByRange as v, type AsyncIterArgs as w, type Augment as x, type Augments as y, type SelectArg as z };
@@ -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-DQJEjgBE.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, a2 as BaseWirePropertyTypes, _ as CompileTimeMetadata, a5 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, a9 as GeotimeSeriesProperty, u as GroupByClause, v as GroupByRange, X as InterfaceMetadata, ae as LinkNames, ad as LinkedType, H as Media, J as MediaMetadata, N as NullabilityAdherence, $ as ObjectMetadata, Y as ObjectOrInterfaceDefinition, T as ObjectSetSubscription, a6 as Osdk, q as OsdkObjectLinksObject, p as OsdkObjectPropertyType, a7 as PageResult, o as PossibleWhereClauseFilters, a4 as PrimaryKeyType, a0 as PropertyDef, Z as PropertyKeys, L as Result, z as SelectArg, B as SelectArgToKeys, S as SingleLinkAccessor, E as SingleOsdkResult, aa as TimeSeriesPoint, ab as TimeSeriesProperty, ac as TimeSeriesQuery, a8 as TimeseriesDurationMapping, V as ValidAggregationKeys, a1 as VersionBound, W as WhereClause, a3 as WirePropertyTypes, K as isOk } from './FilteredPropertyKeys-DQJEjgBE.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
 
@@ -295,7 +295,7 @@ interface QueryDefinition<T = any> {
295
295
  type QueryParameterDefinition<T_Target extends ObjectTypeDefinition = any> = {
296
296
  description?: string;
297
297
  } & QueryDataTypeDefinition<T_Target>;
298
- type QueryDataTypeDefinition<T_Target extends ObjectTypeDefinition = any> = PrimitiveDataType | ObjectQueryDataType<T_Target> | ObjectSetQueryDataType<T_Target> | SetQueryDataType | UnionQueryDataType | StructQueryDataType | TwoDimensionalAggregationDataType | ThreeDimensionalAggregationDataType;
298
+ type QueryDataTypeDefinition<T_Target extends ObjectTypeDefinition = any> = PrimitiveDataType | ObjectQueryDataType<T_Target> | ObjectSetQueryDataType<T_Target> | SetQueryDataType | UnionQueryDataType | StructQueryDataType | TwoDimensionalAggregationDataType | ThreeDimensionalAggregationDataType | MapDataType;
299
299
  type BaseQueryDataTypeDefinition<T extends string> = {
300
300
  multiplicity?: boolean;
301
301
  nullable?: boolean;
@@ -326,6 +326,10 @@ interface TwoDimensionalAggregationDataType extends BaseQueryDataTypeDefinition<
326
326
  interface ThreeDimensionalAggregationDataType extends BaseQueryDataTypeDefinition<"threeDimensionalAggregation"> {
327
327
  threeDimensionalAggregation: ThreeDimensionalQueryAggregationDefinition;
328
328
  }
329
+ interface MapDataType extends BaseQueryDataTypeDefinition<"map"> {
330
+ keyType: QueryDataTypeDefinition;
331
+ valueType: QueryDataTypeDefinition;
332
+ }
329
333
  type AggregationKeyDataType<V = any> = SimpleAggregationKeyDataType<V> | RangeAggregationKeyDataType<V>;
330
334
  interface SimpleAggregationKeyDataType<V = any> {
331
335
  keyType: Exclude<AggregationKeyTypes, "range">;
@@ -417,4 +421,4 @@ declare namespace QueryResult {
417
421
  type ThreeDimensionalAggregationType<OUT extends AggregationKeyTypes | RangeKey<any>, IN extends AggregationKeyTypes | RangeKey<any>, V extends AggregationValueTypes> = ThreeDimensionalAggregation<OUT extends AggregationKeyTypes ? AggKeyWireToClient<OUT> : OUT, IN extends AggregationKeyTypes ? AggKeyWireToClient<IN> : IN, AggValueWireToClient<V>>;
418
422
  }
419
423
 
420
- export { type ActionDefinition, type ActionEditResponse, ActionMetadata, ActionParam, type ActionReturnTypeForOptions, type ActionValidationResponse, type AllowedBucketKeyTypes$1 as AllowedBucketKeyTypes, type AllowedBucketTypes$1 as AllowedBucketTypes, type ApplyActionOptions, type ApplyBatchActionOptions, Attachment, AttachmentUpload, type DataValueClientToWire, type DataValueWireToClient, InterfaceDefinition, MediaReference, type ObjectQueryDataType, type ObjectSet, type ObjectSetQueryDataType, ObjectTypeDefinition, type OntologyMetadata, OsdkBase, type OsdkObject, PrimaryKeyTypes, PropertyValueWireToClient, type QueryDataTypeDefinition, type QueryDefinition, type QueryMetadata, QueryParam, type QueryParameterDefinition, QueryResult, type ThreeDimensionalQueryAggregationDefinition, type TwoDimensionalQueryAggregationDefinition };
424
+ export { type ActionDefinition, type ActionEditResponse, ActionMetadata, ActionParam, type ActionReturnTypeForOptions, type ActionValidationResponse, type AllowedBucketKeyTypes$1 as AllowedBucketKeyTypes, type AllowedBucketTypes$1 as AllowedBucketTypes, type ApplyActionOptions, type ApplyBatchActionOptions, Attachment, AttachmentUpload, type DataValueClientToWire, type DataValueWireToClient, InterfaceDefinition, MediaReference, type ObjectQueryDataType, type ObjectSet, type ObjectSetQueryDataType, ObjectTypeDefinition, type OntologyMetadata, OsdkBase, type OsdkObject, PrimaryKeyTypes, PropertyValueWireToClient, type QueryDataTypeDefinition, type QueryDefinition, type QueryMetadata, QueryParam, type QueryParameterDefinition, QueryResult, type Range, type ThreeDimensionalAggregation, type ThreeDimensionalQueryAggregationDefinition, type TwoDimensionalAggregation, type TwoDimensionalQueryAggregationDefinition };
@@ -14,6 +14,13 @@ var __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid = {
14
14
  version: "2.1.0"
15
15
  };
16
16
 
17
+ // src/experimental/fetchPageByRid.ts
18
+ var __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = {
19
+ name: "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid",
20
+ type: "experiment",
21
+ version: "2.2.0"
22
+ };
23
+
17
24
  // src/experimental/getBulkLinks.ts
18
25
  var __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = {
19
26
  name: "__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks",
@@ -23,6 +30,7 @@ var __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = {
23
30
 
24
31
  exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference = __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference;
25
32
  exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid = __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid;
33
+ exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid;
26
34
  exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks;
27
35
  //# sourceMappingURL=unstable.cjs.map
28
36
  //# sourceMappingURL=unstable.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/experimental/createMediaReference.ts","../../../src/experimental/fetchOneByRid.ts","../../../src/experimental/getBulkLinks.ts"],"names":[],"mappings":";;;AA6BO,IAAM,uDAA0D,GAAA;AAAA,EACrE,IAAM,EAAA,yDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACjBO,IAAM,gDAAmD,GAAA;AAAA,EAC9D,IAAM,EAAA,kDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACJO,IAAM,+CAAkD,GAAA;AAAA,EAC7D,IAAM,EAAA,iDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX","file":"unstable.cjs","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\n/**\n * @experimental This feature is experimental and might change in the future.\n *\n * Uploads a media item to the media property of the specified object type.\n *\n * @param data - Data to upload as media item\n * @param fileName - Name that will be assigned as path to the uploaded media item.\n * @param objectType - Object type to which the media item will be uploaded.\n * @param propertyType - Media reference property of the corresponding object type to which the media item will be uploaded.\n *\n * @returns media reference of the uploaded media item.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks\",\n type: \"experiment\",\n version: \"2.0.8\"\n};"]}
1
+ {"version":3,"sources":["../../../src/experimental/createMediaReference.ts","../../../src/experimental/fetchOneByRid.ts","../../../src/experimental/fetchPageByRid.ts","../../../src/experimental/getBulkLinks.ts"],"names":[],"mappings":";;;AA6BO,IAAM,uDAA0D,GAAA;AAAA,EACrE,IAAM,EAAA,yDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACjBO,IAAM,gDAAmD,GAAA;AAAA,EAC9D,IAAM,EAAA,kDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACJO,IAAM,iDAAoD,GAAA;AAAA,EAC/D,IAAM,EAAA,mDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACJO,IAAM,+CAAkD,GAAA;AAAA,EAC7D,IAAM,EAAA,iDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX","file":"unstable.cjs","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\n/**\n * @experimental This feature is experimental and might change in the future.\n *\n * Uploads a media item to the media property of the specified object type.\n *\n * @param data - Data to upload as media item\n * @param fileName - Name that will be assigned as path to the uploaded media item.\n * @param objectType - Object type to which the media item will be uploaded.\n * @param propertyType - Media reference property of the corresponding object type to which the media item will be uploaded.\n *\n * @returns media reference of the uploaded media item.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks\",\n type: \"experiment\",\n version: \"2.0.8\"\n};"]}
@@ -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, a6 as Osdk, af as ExtractOptions, b as OsdkBase } from '../FilteredPropertyKeys-DQJEjgBE.cjs';
2
- export { ag as MinimalObjectSet } from '../FilteredPropertyKeys-DQJEjgBE.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,6 +38,11 @@ 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, const T extends boolean>(objectType: Q, rids: string[], options?: FetchPageArgs<Q, L, R, any, S>) => Promise<FetchPageResult<Q, L, R, S, T>>;
42
+ declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<"2.2.0", "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid", {
43
+ fetchPageByRid: fetchPageByRidFn;
44
+ }>;
45
+
41
46
  interface EXPERIMENTAL_BulkLinkResult {
42
47
  object: OsdkBase<any>;
43
48
  linkApiName: string;
@@ -50,4 +55,4 @@ declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks: Experiment<"2.0.8
50
55
  getBulkLinks: getBulkLinksFn;
51
56
  }>;
52
57
 
53
- export { type EXPERIMENTAL_BulkLinkResult, type Experiment, type ExperimentFns, __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference, __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid, __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks };
58
+ export { type EXPERIMENTAL_BulkLinkResult, type Experiment, type ExperimentFns, __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference, __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid, __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid, __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks };
@@ -1 +1 @@
1
- {"version":3,"file":"OsdkBase.js","names":[],"sources":["OsdkBase.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 { PropertyValueWireToClient } from \"./mapping/PropertyValueMapping.js\";\nimport type { ObjectOrInterfaceDefinition } from \"./ontology/ObjectOrInterface.js\";\nimport type { ObjectTypeDefinition } from \"./ontology/ObjectTypeDefinition.js\";\nimport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"./OsdkObjectPrimaryKeyType.js\";\n\nexport type OsdkBase<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly $apiName: Q[\"apiName\"];\n\n readonly $objectType: string;\n\n readonly $primaryKey: PrimaryKeyType<Q>;\n\n readonly $title: string | undefined;\n};\n\nexport type PrimaryKeyType<Q extends ObjectOrInterfaceDefinition> =\n & (Q extends ObjectTypeDefinition ? OsdkObjectPrimaryKeyType<Q>\n : unknown)\n // if the type is `unknown` then the next line will\n // restrict it down to all valid primary key types\n & PropertyValueWireToClient[PrimaryKeyTypes];\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"OsdkBase.js","names":[],"sources":["OsdkBase.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 { PropertyValueWireToClient } from \"./mapping/PropertyValueMapping.js\";\nimport type { ObjectOrInterfaceDefinition } from \"./ontology/ObjectOrInterface.js\";\nimport type { ObjectSpecifier } from \"./ontology/ObjectSpecifier.js\";\nimport type { ObjectTypeDefinition } from \"./ontology/ObjectTypeDefinition.js\";\nimport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"./OsdkObjectPrimaryKeyType.js\";\n\nexport type OsdkBase<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly $apiName: Q[\"apiName\"];\n\n readonly $objectType: string;\n\n readonly $primaryKey: PrimaryKeyType<Q>;\n\n readonly $title: string | undefined;\n\n readonly $objectSpecifier: ObjectSpecifier<Q>;\n};\n\nexport type PrimaryKeyType<Q extends ObjectOrInterfaceDefinition> =\n & (Q extends ObjectTypeDefinition ? OsdkObjectPrimaryKeyType<Q>\n : unknown)\n // if the type is `unknown` then the next line will\n // restrict it down to all valid primary key types\n & PropertyValueWireToClient[PrimaryKeyTypes];\n"],"mappings":"","ignoreList":[]}
@@ -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":[]}
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = {
18
+ name: "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid",
19
+ type: "experiment",
20
+ version: "2.2.0"
21
+ };
22
+ //# sourceMappingURL=fetchPageByRid.js.map
@@ -0,0 +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 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":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.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\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n GeoFilter_Intersects,\n GeoFilter_Within,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type { OsdkObjectPropertyType } from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport type { DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type { Media, MediaMetadata, MediaReference } from \"./object/Media.js\";\nexport { isOk } from \"./object/Result.js\";\nexport type { Result } from \"./object/Result.js\";\nexport type { BaseObjectSet } from \"./objectSet/BaseObjectSet.js\";\nexport type { ObjectSet } from \"./objectSet/ObjectSet.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.js\";\nexport type { FilteredPropertyKeys } from \"./ontology/FilteredPropertyKeys.js\";\nexport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nexport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nexport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n PropertyDef,\n VersionBound,\n} from \"./ontology/ObjectTypeDefinition.js\";\nexport type { OntologyMetadata } from \"./ontology/OntologyMetadata.js\";\nexport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nexport type {\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type { OsdkBase, PrimaryKeyType } from \"./OsdkBase.js\";\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, Osdk } from \"./OsdkObjectFrom.js\";\nexport type { PageResult } from \"./PageResult.js\";\nexport type { QueryParam, QueryResult } from \"./queries/Queries.js\";\nexport { TimeseriesDurationMapping } from \"./timeseries/timeseries.js\";\nexport type {\n GeotimeSeriesProperty,\n TimeSeriesPoint,\n TimeSeriesProperty,\n TimeSeriesQuery,\n} from \"./timeseries/timeseries.js\";\nexport type { LinkedType, LinkNames } from \"./util/LinkUtils.js\";\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAahE,SAASC,eAAe,QAAQ,4BAA4B;AA8B5D,SAASC,IAAI,QAAQ,oBAAoB;AA8CzC,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.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\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n GeoFilter_Intersects,\n GeoFilter_Within,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type { OsdkObjectPropertyType } from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport type { DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type { Media, MediaMetadata, MediaReference } from \"./object/Media.js\";\nexport { isOk } from \"./object/Result.js\";\nexport type { Result } from \"./object/Result.js\";\nexport type { BaseObjectSet } from \"./objectSet/BaseObjectSet.js\";\nexport type { ObjectSet } from \"./objectSet/ObjectSet.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.js\";\nexport type { FilteredPropertyKeys } from \"./ontology/FilteredPropertyKeys.js\";\nexport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nexport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nexport type { ObjectSpecifier } from \"./ontology/ObjectSpecifier.js\";\nexport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n PropertyDef,\n VersionBound,\n} from \"./ontology/ObjectTypeDefinition.js\";\nexport type { OntologyMetadata } from \"./ontology/OntologyMetadata.js\";\nexport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nexport type {\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type { OsdkBase, PrimaryKeyType } from \"./OsdkBase.js\";\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, Osdk } from \"./OsdkObjectFrom.js\";\nexport type { PageResult } from \"./PageResult.js\";\nexport type {\n Range,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"./queries/Aggregations.js\";\nexport type { QueryParam, QueryResult } from \"./queries/Queries.js\";\nexport { TimeseriesDurationMapping } from \"./timeseries/timeseries.js\";\nexport type {\n GeotimeSeriesProperty,\n TimeSeriesPoint,\n TimeSeriesProperty,\n TimeSeriesQuery,\n} from \"./timeseries/timeseries.js\";\nexport type { LinkedType, LinkNames } from \"./util/LinkUtils.js\";\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAahE,SAASC,eAAe,QAAQ,4BAA4B;AA8B5D,SAASC,IAAI,QAAQ,oBAAoB;AAoDzC,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","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":[]}
@@ -15,10 +15,6 @@
15
15
  */
16
16
 
17
17
  import { describe, expectTypeOf, it, test, vi } from "vitest";
18
- const Employee = {
19
- type: "object",
20
- apiName: "Employee"
21
- };
22
18
  describe("ObjectSet", () => {
23
19
  const fauxObjectSet = {
24
20
  where: vi.fn(() => {
@@ -95,7 +91,7 @@ describe("ObjectSet", () => {
95
91
  const withAggregations = fauxObjectSet.withProperties({
96
92
  "collectSet": base => base.pivotTo("lead").aggregate("class:collectSet"),
97
93
  "select": base => base.pivotTo("lead").selectProperty("fullName"),
98
- "collectList": base => base.pivotTo("lead").aggregate("class:collectList"),
94
+ "collectList": base => base.pivotTo("lead").aggregate("booleanProp:collectSet"),
99
95
  "min": base => base.pivotTo("lead").aggregate("employeeId:max"),
100
96
  "max": base => base.pivotTo("lead").aggregate("employeeId:min"),
101
97
  "sum": base => base.pivotTo("lead").aggregate("employeeId:sum"),
@@ -143,7 +139,7 @@ describe("ObjectSet", () => {
143
139
  });
144
140
  it("Works with selecting all non-RDP's", async () => {
145
141
  await withFamily.fetchPage({
146
- $select: ["class", "fullName", "employeeId"]
142
+ $select: ["class", "fullName", "employeeId", "booleanProp"]
147
143
  });
148
144
  expectTypeOf().toEqualTypeOf();
149
145
  expectTypeOf().toEqualTypeOf();