@osdk/api 2.4.2 → 2.5.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +26 -21
  2. package/build/browser/Definitions.js.map +1 -1
  3. package/build/browser/OsdkObjectFrom.js.map +1 -1
  4. package/build/browser/OsdkObjectFrom.test.js +7 -0
  5. package/build/browser/OsdkObjectFrom.test.js.map +1 -1
  6. package/build/browser/actions/Actions.js.map +1 -1
  7. package/build/browser/aggregate/AggregationResultsWithGroups.js.map +1 -1
  8. package/build/browser/definitions/LinkDefinitions.js.map +1 -1
  9. package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
  10. package/build/browser/experimental/fetchPageByRid.js.map +1 -1
  11. package/build/browser/index.js +4 -0
  12. package/build/browser/index.js.map +1 -1
  13. package/build/browser/mapping/DataValueMapping.js.map +1 -1
  14. package/build/browser/object/FetchPageArgs.js.map +1 -1
  15. package/build/browser/object/FetchPageResult.js.map +1 -1
  16. package/build/browser/object/Media.js.map +1 -1
  17. package/build/browser/objectSet/ObjectSet.js.map +1 -1
  18. package/build/browser/objectSet/ObjectSet.test.js +73 -0
  19. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  20. package/build/browser/ontology/ObjectTypeDefinition.js.map +1 -1
  21. package/build/browser/public/unstable.js.map +1 -1
  22. package/build/cjs/{ObjectSet-BdIHDSBH.d.cts → ObjectSet-DKpF7Bpm.d.cts} +59 -32
  23. package/build/cjs/index.cjs +4 -0
  24. package/build/cjs/index.cjs.map +1 -1
  25. package/build/cjs/index.d.cts +33 -24
  26. package/build/cjs/public/unstable.d.cts +8 -5
  27. package/build/esm/Definitions.js.map +1 -1
  28. package/build/esm/OsdkObjectFrom.js.map +1 -1
  29. package/build/esm/OsdkObjectFrom.test.js +7 -0
  30. package/build/esm/OsdkObjectFrom.test.js.map +1 -1
  31. package/build/esm/actions/Actions.js.map +1 -1
  32. package/build/esm/aggregate/AggregationResultsWithGroups.js.map +1 -1
  33. package/build/esm/definitions/LinkDefinitions.js.map +1 -1
  34. package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
  35. package/build/esm/experimental/fetchPageByRid.js.map +1 -1
  36. package/build/esm/index.js +4 -0
  37. package/build/esm/index.js.map +1 -1
  38. package/build/esm/mapping/DataValueMapping.js.map +1 -1
  39. package/build/esm/object/FetchPageArgs.js.map +1 -1
  40. package/build/esm/object/FetchPageResult.js.map +1 -1
  41. package/build/esm/object/Media.js.map +1 -1
  42. package/build/esm/objectSet/ObjectSet.js.map +1 -1
  43. package/build/esm/objectSet/ObjectSet.test.js +73 -0
  44. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  45. package/build/esm/ontology/ObjectTypeDefinition.js.map +1 -1
  46. package/build/esm/public/unstable.js.map +1 -1
  47. package/build/types/Definitions.d.ts +4 -0
  48. package/build/types/Definitions.d.ts.map +1 -1
  49. package/build/types/OsdkObjectFrom.d.ts +15 -4
  50. package/build/types/OsdkObjectFrom.d.ts.map +1 -1
  51. package/build/types/actions/Actions.d.ts +2 -0
  52. package/build/types/actions/Actions.d.ts.map +1 -1
  53. package/build/types/aggregate/AggregationResultsWithGroups.d.ts +2 -2
  54. package/build/types/aggregate/AggregationResultsWithGroups.d.ts.map +1 -1
  55. package/build/types/definitions/LinkDefinitions.d.ts +5 -4
  56. package/build/types/definitions/LinkDefinitions.d.ts.map +1 -1
  57. package/build/types/derivedProperties/DerivedProperty.d.ts +10 -1
  58. package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
  59. package/build/types/experimental/fetchPageByRid.d.ts +9 -2
  60. package/build/types/experimental/fetchPageByRid.d.ts.map +1 -1
  61. package/build/types/index.d.ts +5 -4
  62. package/build/types/index.d.ts.map +1 -1
  63. package/build/types/mapping/DataValueMapping.d.ts +2 -2
  64. package/build/types/mapping/DataValueMapping.d.ts.map +1 -1
  65. package/build/types/object/FetchPageArgs.d.ts +21 -12
  66. package/build/types/object/FetchPageArgs.d.ts.map +1 -1
  67. package/build/types/object/FetchPageResult.d.ts +8 -6
  68. package/build/types/object/FetchPageResult.d.ts.map +1 -1
  69. package/build/types/object/Media.d.ts +7 -0
  70. package/build/types/object/Media.d.ts.map +1 -1
  71. package/build/types/objectSet/ObjectSet.d.ts +26 -18
  72. package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
  73. package/build/types/ontology/ObjectTypeDefinition.d.ts +2 -1
  74. package/build/types/ontology/ObjectTypeDefinition.d.ts.map +1 -1
  75. package/build/types/public/unstable.d.ts +1 -1
  76. package/build/types/public/unstable.d.ts.map +1 -1
  77. package/package.json +8 -8
@@ -52,6 +52,13 @@ interface MediaReference {
52
52
  };
53
53
  };
54
54
  }
55
+ /**
56
+ * Object for uploading Media
57
+ */
58
+ interface MediaUpload {
59
+ readonly path: string;
60
+ readonly data: Blob;
61
+ }
55
62
  /**
56
63
  * Metadata of a media item
57
64
  */
@@ -343,6 +350,7 @@ declare namespace ObjectMetadata {
343
350
  type: WirePropertyTypes;
344
351
  multiplicity?: boolean;
345
352
  nullable?: boolean;
353
+ valueTypeApiName?: string;
346
354
  }
347
355
  interface Link<Q extends ObjectTypeDefinition, M extends boolean> {
348
356
  __OsdkLinkTargetType?: Q;
@@ -356,7 +364,7 @@ interface ObjectTypeDefinition {
356
364
  osdkMetadata?: OsdkMetadata;
357
365
  __DefinitionMetadata?: ObjectMetadata & ObjectInterfaceCompileDefinition;
358
366
  }
359
- type ObjectTypeLinkKeysFrom2<Q extends ObjectTypeDefinition> = keyof CompileTimeMetadata<Q>["links"] & string;
367
+ type ObjectTypeLinkKeysFrom2<Q extends ObjectOrInterfaceDefinition> = keyof CompileTimeMetadata<Q>["links"] & string;
360
368
  interface PropertyDef<T extends WirePropertyTypes, N extends "nullable" | "non-nullable" = "nullable", M extends "array" | "single" = "single"> extends ObjectMetadata.Property {
361
369
  type: T;
362
370
  multiplicity: M extends "array" ? true : false;
@@ -577,6 +585,10 @@ type Converted<T> = T extends Array<any> ? T[1] : T;
577
585
  * @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`
578
586
  */
579
587
  type OsdkObjectPropertyType<T extends ObjectMetadata.Property, STRICTLY_ENFORCE_NULLABLE extends boolean = true> = STRICTLY_ENFORCE_NULLABLE extends false ? MaybeArray<T, Converted<GetClientPropertyValueFromWire<T["type"]>>> | undefined : MaybeNullable$1<T, MaybeArray<T, Converted<GetClientPropertyValueFromWire<T["type"]>>>>;
588
+ /**
589
+ * @param {T} ObjectMetadata.Property in literal form
590
+ */
591
+ type OsdkObjectPropertyTypeNotUndefined<T extends ObjectMetadata.Property> = MaybeArray<T, Converted<GetClientPropertyValueFromWire<T["type"]>>>;
580
592
  /**
581
593
  * @param {T} ObjectMetadata.Property in literal form
582
594
  * @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`
@@ -598,7 +610,7 @@ type AggregationResultsWithGroups<Q extends ObjectOrInterfaceDefinition, A exten
598
610
  } ? {
599
611
  startValue: T;
600
612
  endValue: T;
601
- } : MaybeNullable<G[P], OsdkObjectPropertyType<CompileTimeMetadata<Q>["properties"][P], true>>;
613
+ } : MaybeNullable<G[P], OsdkObjectPropertyTypeNotUndefined<CompileTimeMetadata<Q>["properties"][P]>>;
602
614
  };
603
615
  } & AggregationResultsWithoutGroups<Q, A>)[];
604
616
  type MaybeNullable<GROUP, VALUE> = GROUP extends {
@@ -618,16 +630,17 @@ declare namespace ObjectSetArgs {
618
630
  $select?: readonly (OBJECT_KEYS | RDP_KEYS)[];
619
631
  $includeRid?: boolean;
620
632
  }
621
- interface OrderBy<L extends string = never> {
622
- $orderBy?: {
623
- [K in L]?: "asc" | "desc";
624
- };
633
+ type OrderByOptions<L extends string> = {
634
+ [K in L]?: "asc" | "desc";
635
+ } | "relevance";
636
+ interface OrderBy<ORDER_BY_OPTIONS extends OrderByOptions<L>, L extends string = never> {
637
+ $orderBy?: ORDER_BY_OPTIONS;
625
638
  }
626
- interface AsyncIter<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = never, T extends boolean = false, RDP_KEYS extends string = never> extends Select<K, RDP_KEYS>, OrderBy<K> {
639
+ interface AsyncIter<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = never, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never> extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {
627
640
  $__UNSTABLE_useOldInterfaceApis?: boolean;
628
641
  $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;
629
642
  }
630
- interface FetchPage<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = never, T extends boolean = false, RDP_KEYS extends string = never> extends AsyncIter<Q, K, T, RDP_KEYS> {
643
+ interface FetchPage<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = never, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never> extends AsyncIter<Q, K, T, RDP_KEYS, ORDER_BY_OPTIONS> {
631
644
  $nextPageToken?: string;
632
645
  $pageSize?: number;
633
646
  }
@@ -636,14 +649,14 @@ interface SelectArg<Q extends ObjectOrInterfaceDefinition, L extends string = Pr
636
649
  $select?: readonly L[];
637
650
  $includeRid?: R;
638
651
  }
639
- interface OrderByArg<Q extends ObjectOrInterfaceDefinition, L extends string = PropertyKeys<Q>> extends ObjectSetArgs.OrderBy<L> {
652
+ interface OrderByArg<Q extends ObjectOrInterfaceDefinition, L extends string = PropertyKeys<Q>, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = never> extends ObjectSetArgs.OrderBy<ORDER_BY_OPTIONS, L> {
640
653
  }
641
654
  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>;
642
- interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS> {
655
+ interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {}> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS, ORDER_BY_OPTIONS> {
643
656
  $nextPageToken?: string;
644
657
  $pageSize?: number;
645
658
  }
646
- interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never> extends SelectArg<Q, K, R, S, RDP_KEYS>, OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS> {
659
+ interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never> extends SelectArg<Q, K, R, S, RDP_KEYS>, OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS> {
647
660
  $__UNSTABLE_useOldInterfaceApis?: boolean;
648
661
  $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;
649
662
  }
@@ -669,10 +682,10 @@ type Result<V> = OkResult<V> | ErrorResult;
669
682
  declare function isOk<X>(a: Result<X>): a is OkResult<X>;
670
683
 
671
684
  /** The $link container to get from one object type to its linked objects */
672
- type OsdkObjectLinksObject<O extends ObjectTypeDefinition> = ObjectTypeLinkKeysFrom2<O> extends never ? never : {
685
+ type OsdkObjectLinksObject<O extends ObjectOrInterfaceDefinition> = ObjectTypeLinkKeysFrom2<O> extends never ? never : {
673
686
  readonly [L in ObjectTypeLinkKeysFrom2<O>]: OsdkObjectLinksEntry<O, L>;
674
687
  };
675
- type OsdkObjectLinksEntry<Q extends ObjectTypeDefinition, L extends ObjectTypeLinkKeysFrom2<Q>> = CompileTimeMetadata<Q>["links"][L] extends ObjectMetadata.Link<infer T, infer M> ? (M extends false ? SingleLinkAccessor<T> : ObjectSet<T>) : never;
688
+ type OsdkObjectLinksEntry<Q extends ObjectOrInterfaceDefinition, L extends ObjectTypeLinkKeysFrom2<Q>> = CompileTimeMetadata<Q>["links"][L] extends ObjectMetadata.Link<infer T, infer M> ? (M extends false ? SingleLinkAccessor<T> : ObjectSet<T>) : CompileTimeMetadata<Q>["links"][L] extends InterfaceMetadata.Link<infer T, infer M> ? ObjectSet<T> : never;
676
689
  type DefaultToFalse<B extends boolean | undefined> = false extends B ? false : undefined extends B ? false : true;
677
690
  interface SingleLinkAccessor<T extends ObjectTypeDefinition> {
678
691
  /** Load the linked object
@@ -694,13 +707,13 @@ type UnionIfTrue<S extends string, UNION_IF_TRUE extends boolean, E extends stri
694
707
  /**
695
708
  * Helper type for converting fetch options into an Osdk object
696
709
  */
697
- type FetchPageResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q>, R extends boolean, S extends NullabilityAdherence, T extends boolean = false> = PageResult<PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S, T>> : Osdk.Instance<Q, ExtractOptions<R, S, T>, L>>;
710
+ type FetchPageResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q>, R extends boolean, S extends NullabilityAdherence, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}> = PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? never : L>, ORDER_BY_OPTIONS>>;
698
711
  /**
699
712
  * Helper type for converting fetch options into an Osdk object
700
713
  */
701
- 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, {
714
+ 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, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}> = MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, {
702
715
  [K in Extract<keyof RDPs, L>]: RDPs[K];
703
- }>;
716
+ }>, ORDER_BY_OPTIONS>;
704
717
 
705
718
  type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {
706
719
  __apiName: Q["apiName"] | (Q extends InterfaceDefinition ? CompileTimeMetadata<Q> extends InterfaceMetadata ? NonNullable<CompileTimeMetadata<Q>["implementedBy"]>[number] : never : never);
@@ -725,8 +738,10 @@ type ApiNameAsString<T extends ObjectOrInterfaceDefinition> = CompileTimeMetadat
725
738
  type JustProps<T extends ObjectOrInterfaceDefinition, P extends ValidOsdkPropParams<T>> = P extends "$all" ? PropertyKeys<T> : Exclude<P, SpecialOsdkPropParams>;
726
739
  type PropMapToObject<FROM extends ObjectOrInterfaceDefinition, TO extends ObjectTypeDefinition> = NonNullable<CompileTimeMetadata<TO>["interfaceMap"]>[ApiNameAsString<FROM>];
727
740
  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>];
741
+ type NamespaceOf<S extends string> = S extends `${infer Before}.${infer After}` ? After extends `${string}.${string}` ? `${Before}.${NamespaceOf<After>}` : Before : never;
742
+ type MaybeStripNamespaces<S extends string, TO extends InterfaceDefinition> = S extends `${NamespaceOf<S>}.${infer Rest}` ? NamespaceOf<S> extends NamespaceOf<ApiNameAsString<TO>> ? Rest : S : S;
728
743
  type PropMapToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition> = NonNullable<CompileTimeMetadata<FROM>["inverseInterfaceMap"]>[ApiNameAsString<TO>];
729
- type MapPropNamesToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition, P extends ValidOsdkPropParams<FROM>> = PropMapToInterface<FROM, TO>[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>];
744
+ type MapPropNamesToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition, P extends ValidOsdkPropParams<FROM>> = MaybeStripNamespaces<PropMapToInterface<FROM, TO>[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>], TO>;
730
745
  /**
731
746
  * Older version of this helper that allows for `$rid` and co in
732
747
  * the properties field.
@@ -741,6 +756,9 @@ type IsNever<T> = [T] extends [never] ? true : false;
741
756
  type ExtractPropsKeysFromOldPropsStyle<Q extends ObjectOrInterfaceDefinition, P extends ValidOsdkPropParams<Q>> = P extends "$all" ? PropertyKeys<Q> : Exclude<P, "$strict" | "$notStrict" | "$rid">;
742
757
  type IsAny<T> = unknown extends T ? [keyof T] extends [never] ? false : true : false;
743
758
  type GetPropsKeys<Q extends ObjectOrInterfaceDefinition, P extends PropertyKeys<Q>, N extends boolean = false> = IsNever<P> extends true ? N extends true ? never : PropertyKeys<Q> : IsAny<P> extends true ? PropertyKeys<Q> : P;
759
+ type MaybeScore<T extends Osdk.Instance<any>, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<any>> = ORDER_BY_OPTIONS extends "relevance" ? T & {
760
+ $score: number;
761
+ } : T;
744
762
  /**
745
763
  * Use `Osdk.Instance` or `YourType.OsdkInstance`
746
764
  */
@@ -751,13 +769,13 @@ declare namespace Osdk {
751
769
  }) & {
752
770
  readonly $link: Q extends {
753
771
  linksType?: any;
754
- } ? Q["linksType"] : Q extends ObjectTypeDefinition ? OsdkObjectLinksObject<Q> : never;
772
+ } ? Q["linksType"] : Q extends ObjectOrInterfaceDefinition ? OsdkObjectLinksObject<Q> : never;
755
773
  readonly $as: <NEW_Q extends ValidToFrom<Q>>(type: NEW_Q | string) => Osdk.Instance<NEW_Q, OPTIONS, ConvertProps<Q, NEW_Q, P, OPTIONS>>;
756
774
  readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(updatedObject?: Osdk.Instance<Q, any, NEW_PROPS> | {
757
775
  [K in NEW_PROPS]?: CompileTimeMetadata<Q>["props"][K];
758
776
  }) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;
759
777
  readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata: Q extends ObjectTypeDefinition ? {
760
- ObjectMetadata: Q;
778
+ ObjectMetadata: ObjectMetadata;
761
779
  } : {
762
780
  ObjectMetadata: ObjectMetadata;
763
781
  InterfaceMetadata: InterfaceMetadata;
@@ -1061,7 +1079,7 @@ declare namespace DerivedProperty {
1061
1079
  };
1062
1080
  interface BaseBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {
1063
1081
  }
1064
- export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {
1082
+ export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q>, Constant<Q> {
1065
1083
  }
1066
1084
  export interface AggregateBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {
1067
1085
  }
@@ -1078,6 +1096,15 @@ type Filterable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boole
1078
1096
  type Pivotable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
1079
1097
  readonly pivotTo: <L extends LinkNames<Q>>(type: L) => CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : NonNullable<CompileTimeMetadata<Q>["links"][L]["multiplicity"]> extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;
1080
1098
  };
1099
+ type Constant<Q extends ObjectOrInterfaceDefinition> = {
1100
+ readonly constant: {
1101
+ readonly double: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q>;
1102
+ readonly integer: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>;
1103
+ readonly long: (value: string) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q>;
1104
+ readonly datetime: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>;
1105
+ readonly timestamp: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q>;
1106
+ };
1107
+ };
1081
1108
  type Aggregatable<Q extends ObjectOrInterfaceDefinition> = {
1082
1109
  readonly aggregate: <V extends ValidAggregationKeys<Q, "withPropertiesAggregate">>(aggregationSpecifier: V, opts?: V extends `${any}:${infer P}` ? P extends CollectWithPropAggregations ? {
1083
1110
  limit: number;
@@ -1140,11 +1167,11 @@ type SubSelectKeys<Q extends ObjectOrInterfaceDefinition, X extends SelectArg<Q,
1140
1167
  type NOOP<T> = T extends (...args: any[]) => any ? T : T extends abstract new (...args: any[]) => any ? T : {
1141
1168
  [K in keyof T]: T[K];
1142
1169
  };
1143
- type SubSelectRDPsHelper<X extends ValidFetchPageArgs<any, any> | ValidAsyncIterArgs<any, any>, DEFAULT extends string> = [X] extends [never] ? DEFAULT : (X["$select"] & string[])[number] & DEFAULT;
1144
- type SubSelectRDPs<RDPs extends Record<string, SimplePropertyDef>, X extends ValidFetchPageArgs<any, RDPs> | ValidAsyncIterArgs<any, RDPs>> = [RDPs] extends [never] ? never : NOOP<{
1170
+ type SubSelectRDPsHelper<X extends ValidFetchPageArgs<any, any, any> | ValidAsyncIterArgs<any, any>, DEFAULT extends string> = [X] extends [never] ? DEFAULT : (X["$select"] & string[])[number] & DEFAULT;
1171
+ type SubSelectRDPs<RDPs extends Record<string, SimplePropertyDef>, X extends ValidFetchPageArgs<any, RDPs, any> | ValidAsyncIterArgs<any, RDPs>> = [RDPs] extends [never] ? never : NOOP<{
1145
1172
  [K in SubSelectRDPsHelper<X, string & keyof RDPs>]: RDPs[K];
1146
1173
  }>;
1147
- interface MinimalObjectSet<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> extends BaseObjectSet<Q>, FetchPage<Q, RDPs>, AsyncIter<Q, RDPs>, Where<Q, RDPs> {
1174
+ interface MinimalObjectSet<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}> extends BaseObjectSet<Q>, FetchPage<Q, RDPs>, AsyncIter<Q, RDPs, ORDER_BY_OPTIONS>, Where<Q, RDPs> {
1148
1175
  }
1149
1176
  type ExtractOptions2<X extends FetchPageArgs<any, any, any, any, any, any, any>> = [X] extends [never] ? never : ExtractRidOption<X["$includeRid"] extends true ? true : false> | ExtractAllPropertiesOption<X["$includeAllBaseObjectProperties"] extends true ? true : false>;
1150
1177
  type Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<X["$select"]>[number];
@@ -1152,7 +1179,7 @@ interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
1152
1179
  readonly fetchPage: FetchPageSignature<Q, RDPs>;
1153
1180
  readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;
1154
1181
  }
1155
- type ValidFetchPageArgs<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>> = ObjectSetArgs.FetchPage<Q, PropertyKeys<Q>, boolean, string & keyof RDPs>;
1182
+ type ValidFetchPageArgs<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>>> = ObjectSetArgs.FetchPage<Q, PropertyKeys<Q>, boolean, string & keyof RDPs, ORDER_BY_OPTIONS>;
1156
1183
  type ValidAsyncIterArgs<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>> = ObjectSetArgs.AsyncIter<Q, PropertyKeys<Q>, false, string & keyof RDPs> | AsyncIterArgs<Q, never, any, any, any, true, string & keyof RDPs>;
1157
1184
  interface FetchPageSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
1158
1185
  /**
@@ -1167,7 +1194,7 @@ interface FetchPageSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends
1167
1194
 
1168
1195
  * @returns a page of objects
1169
1196
  */
1170
- <L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false>(args?: FetchPageArgs<Q, L, R, A, S, T>): Promise<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>>>;
1197
+ <L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}>(args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>): Promise<PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>>;
1171
1198
  }
1172
1199
  interface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {
1173
1200
  /**
@@ -1199,7 +1226,7 @@ interface FetchPageWithErrorsSignature<Q extends ObjectOrInterfaceDefinition, RD
1199
1226
  }
1200
1227
  * @returns a page of objects, wrapped in a result wrapper
1201
1228
  */
1202
- <L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false>(args?: FetchPageArgs<Q, L, R, A, S, T>): Promise<Result<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>>>>;
1229
+ <L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}>(args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>): Promise<Result<PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>>>;
1203
1230
  }
1204
1231
  interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
1205
1232
  /**
@@ -1214,7 +1241,7 @@ interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<strin
1214
1241
  */
1215
1242
  readonly where: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => this;
1216
1243
  }
1217
- interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
1244
+ interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}> {
1218
1245
  /**
1219
1246
  * Returns an async iterator to load all objects of this type
1220
1247
  * @example
@@ -1232,10 +1259,10 @@ interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends
1232
1259
  * }
1233
1260
  * @returns an async iterator to load all objects
1234
1261
  */
1235
- <L extends PropertyKeys<Q> | (string & keyof 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>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>>;
1262
+ <L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}>(args?: AsyncIterArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>): AsyncIterableIterator<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>;
1236
1263
  }
1237
- interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
1238
- asyncIter: AsyncIterSignature<Q, RDPs>;
1264
+ interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}> {
1265
+ asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;
1239
1266
  }
1240
1267
  interface WithProperties<Q extends ObjectOrInterfaceDefinition = any, RDPs extends Record<string, SimplePropertyDef> = {}> {
1241
1268
  readonly withProperties: <NEW extends Record<string, SimplePropertyDef>>(clause: {
@@ -1347,7 +1374,7 @@ interface Subscribe<Q extends ObjectOrInterfaceDefinition> {
1347
1374
  unsubscribe: () => void;
1348
1375
  };
1349
1376
  }
1350
- interface ObjectSetCleanedTypes<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef>, MERGED extends ObjectOrInterfaceDefinition & Q> extends MinimalObjectSet<Q, D>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<Q>, FetchOne<Q, D>, Subscribe<MERGED>, NearestNeighbors<Q> {
1377
+ interface ObjectSetCleanedTypes<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef>, MERGED extends ObjectOrInterfaceDefinition & Q, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}> extends MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<Q>, FetchOne<Q, D>, Subscribe<MERGED>, NearestNeighbors<Q> {
1351
1378
  }
1352
1379
 
1353
- export { PropertyKeys as $, type AttachmentUpload as A, type Augment as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type Augments as E, type FetchPageArgs as F, type GeoFilterOptions as G, type SelectArg as H, type InterfaceDefinition as I, type SelectArgToKeys as J, type FetchPageResult as K, type SingleOsdkResult as L, type MediaReference as M, NullabilityAdherence as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, type Media as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, type MediaMetadata as T, isOk as U, type ValidAggregationKeys as V, type WhereClause as W, type Result as X, type BaseObjectSet as Y, ObjectSetSubscription as Z, InterfaceMetadata as _, type Attachment as a, type ObjectSpecifier as a0, ObjectMetadata as a1, type PropertyDef as a2, type VersionBound as a3, type BaseWirePropertyTypes as a4, type WirePropertyTypes as a5, type PrimaryKeyType as a6, type ConvertProps as a7, Osdk as a8, type PageResult as a9, TimeseriesDurationMapping as aa, type GeotimeSeriesProperty as ab, type TimeSeriesPoint as ac, type TimeSeriesProperty as ad, type TimeSeriesQuery as ae, type LinkedType as af, type LinkNames as ag, type ExtractOptions as ah, type MinimalObjectSet as ai, type ObjectIdentifiers as b, type OsdkObjectPrimaryKeyType as c, type ObjectSet as d, type OsdkMetadata as e, type ObjectOrInterfaceDefinition as f, type PrimaryKeyTypes as g, type OsdkBase as h, type AggregateOpts as i, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as j, type AggregationResultsWithGroups as k, type AggregationResultsWithoutGroups as l, type AggregationClause as m, type AggregationsResults as n, type GeoFilter_Intersects as o, type GeoFilter_Within as p, type PossibleWhereClauseFilters as q, type OsdkObjectCreatePropertyType as r, type OsdkObjectPropertyType as s, type OsdkObjectLinksObject as t, DerivedProperty as u, DurationMapping as v, type AllGroupByValues as w, type GroupByClause as x, type GroupByRange as y, type AsyncIterArgs as z };
1380
+ export { ObjectSetSubscription as $, type AttachmentUpload as A, type AsyncIterArgs as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type Augment as E, type Augments as F, type GeoFilterOptions as G, type FetchPageArgs as H, type InterfaceDefinition as I, ObjectSetArgs as J, type SelectArg as K, type SelectArgToKeys as L, type MediaReference as M, NullabilityAdherence as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, type FetchPageResult as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, type SingleOsdkResult as T, type Media as U, type ValidAggregationKeys as V, type WhereClause as W, type MediaMetadata as X, isOk as Y, type Result as Z, type BaseObjectSet as _, type MediaUpload as a, InterfaceMetadata as a0, PropertyKeys as a1, type ObjectSpecifier as a2, ObjectMetadata as a3, type PropertyDef as a4, type VersionBound as a5, type BaseWirePropertyTypes as a6, type WirePropertyTypes as a7, type PrimaryKeyType as a8, type ConvertProps as a9, type MaybeScore as aa, Osdk as ab, type PageResult as ac, TimeseriesDurationMapping as ad, type GeotimeSeriesProperty as ae, type TimeSeriesPoint as af, type TimeSeriesProperty as ag, type TimeSeriesQuery as ah, type LinkedType as ai, type LinkNames as aj, type ExtractOptions as ak, type MinimalObjectSet as al, type Attachment as b, type ObjectIdentifiers as c, type OsdkObjectPrimaryKeyType as d, type ObjectSet as e, type OsdkMetadata as f, type ObjectOrInterfaceDefinition as g, type PrimaryKeyTypes as h, type OsdkBase as i, type AggregateOpts as j, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as k, type AggregationResultsWithGroups as l, type AggregationResultsWithoutGroups as m, type AggregationClause as n, type AggregationsResults as o, type GeoFilter_Intersects as p, type GeoFilter_Within as q, type PossibleWhereClauseFilters as r, type OsdkObjectCreatePropertyType as s, type OsdkObjectPropertyType as t, type OsdkObjectLinksObject as u, DerivedProperty as v, DurationMapping as w, type AllGroupByValues as x, type GroupByClause as y, type GroupByRange as z };
@@ -1,5 +1,8 @@
1
1
  'use strict';
2
2
 
3
+ // src/actions/NullValue.ts
4
+ var NULL_VALUE = Symbol.for("NULL_VALUE");
5
+
3
6
  // src/aggregate/WhereClause.ts
4
7
  var DistanceUnitMapping = {
5
8
  "centimeter": "CENTIMETERS",
@@ -69,6 +72,7 @@ var TimeseriesDurationMapping = {
69
72
 
70
73
  exports.DistanceUnitMapping = DistanceUnitMapping;
71
74
  exports.DurationMapping = DurationMapping;
75
+ exports.NULL_VALUE = NULL_VALUE;
72
76
  exports.TimeseriesDurationMapping = TimeseriesDurationMapping;
73
77
  exports.isOk = isOk;
74
78
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/aggregate/WhereClause.ts","../../src/mapping/DurationMapping.ts","../../src/groupby/GroupByClause.ts","../../src/object/Result.ts","../../src/timeseries/timeseries.ts"],"names":[],"mappings":";;;AAkBO,IAAM,mBAAsB,GAAA;AAAA,EACjC,YAAc,EAAA,aAAA;AAAA,EACd,aAAe,EAAA,aAAA;AAAA,EACf,IAAM,EAAA,aAAA;AAAA,EACN,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,GAAK,EAAA,QAAA;AAAA,EACL,WAAa,EAAA,YAAA;AAAA,EACb,YAAc,EAAA,YAAA;AAAA,EACd,IAAM,EAAA,YAAA;AAAA,EACN,MAAQ,EAAA,QAAA;AAAA,EACR,QAAU,EAAA,QAAA;AAAA,EACV,MAAQ,EAAA,MAAA;AAAA,EACR,MAAQ,EAAA,MAAA;AAAA,EACR,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,eAAiB,EAAA,gBAAA;AAAA,EACjB,cAAgB,EAAA,gBAAA;AAAA,EAChB,gBAAkB,EAAA;AACpB;;;ACvBO,IAAM,mBAAsB,GAAA;AAAA,EACjC,KAAO,EAAA,SAAA;AAAA,EACP,SAAW,EAAA,SAAA;AAAA,EACX,KAAO,EAAA,SAAA;AAAA,EACP,QAAU,EAAA,SAAA;AAAA,EACV,SAAW,EAAA,SAAA;AAAA,EACX,IAAM,EAAA,OAAA;AAAA,EACN,KAAO,EAAA,OAAA;AAAA,EACP,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,MAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AAAA,EACR,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,QAAA;AAAA,EACP,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA;AACX,CAAA;;;ACpBO,IAAM,eAAkB,GAAA;AAAA,EAC7B,GAAG,mBAAA;AAAA,EACH,SAAW,EAAA,UAAA;AAAA,EACX,UAAY,EAAA;AACd;;;ACAO,SAAS,KAAK,CAAG,EAAA;AACtB,EAAA,OAAO,OAAW,IAAA,CAAA;AACpB;;;ACNO,IAAM,yBAA4B,GAAA;AAAA,EACvC,IAAM,EAAA,cAAA;AAAA,EACN,cAAgB,EAAA,cAAA;AAAA,EAChB,GAAG;AACL","file":"index.cjs","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\"\n};\n\n// FIXME we need to represent all types","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const TimeDurationMapping = {\n \"sec\": \"SECONDS\",\n \"seconds\": \"SECONDS\",\n \"min\": \"MINUTES\",\n \"minute\": \"MINUTES\",\n \"minutes\": \"MINUTES\",\n \"hr\": \"HOURS\",\n \"hrs\": \"HOURS\",\n \"hour\": \"HOURS\",\n \"hours\": \"HOURS\",\n \"day\": \"DAYS\",\n \"days\": \"DAYS\",\n \"wk\": \"WEEKS\",\n \"week\": \"WEEKS\",\n \"weeks\": \"WEEKS\",\n \"mos\": \"MONTHS\",\n \"month\": \"MONTHS\",\n \"months\": \"MONTHS\",\n \"yr\": \"YEARS\",\n \"year\": \"YEARS\",\n \"years\": \"YEARS\"\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const DurationMapping = {\n ...TimeDurationMapping,\n \"quarter\": \"QUARTERS\",\n \"quarters\": \"QUARTERS\"\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Check if a result was successfully received\n * @param a - result wrapped value\n * @returns whether a result has a value in it\n */\nexport function isOk(a) {\n return \"value\" in a;\n}\n\n/**\n * Check if a result contains an error value\n * @param a Result wrapped value\n * @returns whether a result has an error in it\n */\nexport function isError(a) {\n return \"error\" in a;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const TimeseriesDurationMapping = {\n \"ms\": \"MILLISECONDS\",\n \"milliseconds\": \"MILLISECONDS\",\n ...TimeDurationMapping\n};"]}
1
+ {"version":3,"sources":["../../src/actions/NullValue.ts","../../src/aggregate/WhereClause.ts","../../src/mapping/DurationMapping.ts","../../src/groupby/GroupByClause.ts","../../src/object/Result.ts","../../src/timeseries/timeseries.ts"],"names":[],"mappings":";;;AAgBa,IAAA,UAAA,GAAa,MAAO,CAAA,GAAA,CAAI,YAAY;;;ACE1C,IAAM,mBAAsB,GAAA;AAAA,EACjC,YAAc,EAAA,aAAA;AAAA,EACd,aAAe,EAAA,aAAA;AAAA,EACf,IAAM,EAAA,aAAA;AAAA,EACN,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,GAAK,EAAA,QAAA;AAAA,EACL,WAAa,EAAA,YAAA;AAAA,EACb,YAAc,EAAA,YAAA;AAAA,EACd,IAAM,EAAA,YAAA;AAAA,EACN,MAAQ,EAAA,QAAA;AAAA,EACR,QAAU,EAAA,QAAA;AAAA,EACV,MAAQ,EAAA,MAAA;AAAA,EACR,MAAQ,EAAA,MAAA;AAAA,EACR,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,eAAiB,EAAA,gBAAA;AAAA,EACjB,cAAgB,EAAA,gBAAA;AAAA,EAChB,gBAAkB,EAAA;AACpB;;;ACvBO,IAAM,mBAAsB,GAAA;AAAA,EACjC,KAAO,EAAA,SAAA;AAAA,EACP,SAAW,EAAA,SAAA;AAAA,EACX,KAAO,EAAA,SAAA;AAAA,EACP,QAAU,EAAA,SAAA;AAAA,EACV,SAAW,EAAA,SAAA;AAAA,EACX,IAAM,EAAA,OAAA;AAAA,EACN,KAAO,EAAA,OAAA;AAAA,EACP,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,MAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AAAA,EACR,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,QAAA;AAAA,EACP,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA;AACX,CAAA;;;ACpBO,IAAM,eAAkB,GAAA;AAAA,EAC7B,GAAG,mBAAA;AAAA,EACH,SAAW,EAAA,UAAA;AAAA,EACX,UAAY,EAAA;AACd;;;ACAO,SAAS,KAAK,CAAG,EAAA;AACtB,EAAA,OAAO,OAAW,IAAA,CAAA;AACpB;;;ACNO,IAAM,yBAA4B,GAAA;AAAA,EACvC,IAAM,EAAA,cAAA;AAAA,EACN,cAAgB,EAAA,cAAA;AAAA,EAChB,GAAG;AACL","file":"index.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const NULL_VALUE = Symbol.for(\"NULL_VALUE\");","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\"\n};\n\n// FIXME we need to represent all types","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const TimeDurationMapping = {\n \"sec\": \"SECONDS\",\n \"seconds\": \"SECONDS\",\n \"min\": \"MINUTES\",\n \"minute\": \"MINUTES\",\n \"minutes\": \"MINUTES\",\n \"hr\": \"HOURS\",\n \"hrs\": \"HOURS\",\n \"hour\": \"HOURS\",\n \"hours\": \"HOURS\",\n \"day\": \"DAYS\",\n \"days\": \"DAYS\",\n \"wk\": \"WEEKS\",\n \"week\": \"WEEKS\",\n \"weeks\": \"WEEKS\",\n \"mos\": \"MONTHS\",\n \"month\": \"MONTHS\",\n \"months\": \"MONTHS\",\n \"yr\": \"YEARS\",\n \"year\": \"YEARS\",\n \"years\": \"YEARS\"\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const DurationMapping = {\n ...TimeDurationMapping,\n \"quarter\": \"QUARTERS\",\n \"quarters\": \"QUARTERS\"\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Check if a result was successfully received\n * @param a - result wrapped value\n * @returns whether a result has a value in it\n */\nexport function isOk(a) {\n return \"value\" in a;\n}\n\n/**\n * Check if a result contains an error value\n * @param a Result wrapped value\n * @returns whether a result has an error in it\n */\nexport function isError(a) {\n return \"error\" in a;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const TimeseriesDurationMapping = {\n \"ms\": \"MILLISECONDS\",\n \"milliseconds\": \"MILLISECONDS\",\n ...TimeDurationMapping\n};"]}
@@ -1,5 +1,5 @@
1
- import { A as AttachmentUpload, M as MediaReference, a as Attachment, O as ObjectTypeDefinition, b as ObjectIdentifiers, c as OsdkObjectPrimaryKeyType, d as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, e as OsdkMetadata, R as ReleaseStatus, f as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, g as PrimaryKeyTypes, h as OsdkBase } from './ObjectSet-BdIHDSBH.cjs';
2
- export { i as AggregateOpts, j as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, m as AggregationClause, k as AggregationResultsWithGroups, l as AggregationResultsWithoutGroups, n as AggregationsResults, w as AllGroupByValues, z as AsyncIterArgs, B as Augment, E as Augments, Y as BaseObjectSet, a4 as BaseWirePropertyTypes, a7 as ConvertProps, u as DerivedProperty, D as DistanceUnitMapping, v as DurationMapping, F as FetchPageArgs, K as FetchPageResult, G as GeoFilterOptions, o as GeoFilter_Intersects, p as GeoFilter_Within, ab as GeotimeSeriesProperty, x as GroupByClause, y as GroupByRange, _ as InterfaceMetadata, ag as LinkNames, af as LinkedType, Q as Media, T as MediaMetadata, N as NullabilityAdherence, a1 as ObjectMetadata, Z as ObjectSetSubscription, a0 as ObjectSpecifier, a8 as Osdk, r as OsdkObjectCreatePropertyType, t as OsdkObjectLinksObject, s as OsdkObjectPropertyType, a9 as PageResult, q as PossibleWhereClauseFilters, a6 as PrimaryKeyType, a2 as PropertyDef, $ as PropertyKeys, X as Result, H as SelectArg, J as SelectArgToKeys, S as SingleLinkAccessor, L as SingleOsdkResult, ac as TimeSeriesPoint, ad as TimeSeriesProperty, ae as TimeSeriesQuery, aa as TimeseriesDurationMapping, V as ValidAggregationKeys, a3 as VersionBound, W as WhereClause, a5 as WirePropertyTypes, U as isOk } from './ObjectSet-BdIHDSBH.cjs';
1
+ import { A as AttachmentUpload, M as MediaReference, a as MediaUpload, b as Attachment, O as ObjectTypeDefinition, c as ObjectIdentifiers, d as OsdkObjectPrimaryKeyType, e as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, f as OsdkMetadata, R as ReleaseStatus, g as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, h as PrimaryKeyTypes, i as OsdkBase } from './ObjectSet-DKpF7Bpm.cjs';
2
+ export { j as AggregateOpts, k as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, n as AggregationClause, l as AggregationResultsWithGroups, m as AggregationResultsWithoutGroups, o as AggregationsResults, x as AllGroupByValues, B as AsyncIterArgs, E as Augment, F as Augments, _ as BaseObjectSet, a6 as BaseWirePropertyTypes, a9 as ConvertProps, v as DerivedProperty, D as DistanceUnitMapping, w as DurationMapping, H as FetchPageArgs, Q as FetchPageResult, G as GeoFilterOptions, p as GeoFilter_Intersects, q as GeoFilter_Within, ae as GeotimeSeriesProperty, y as GroupByClause, z as GroupByRange, a0 as InterfaceMetadata, aj as LinkNames, ai as LinkedType, aa as MaybeScore, U as Media, X as MediaMetadata, N as NullabilityAdherence, a3 as ObjectMetadata, J as ObjectSetArgs, $ as ObjectSetSubscription, a2 as ObjectSpecifier, ab as Osdk, s as OsdkObjectCreatePropertyType, u as OsdkObjectLinksObject, t as OsdkObjectPropertyType, ac as PageResult, r as PossibleWhereClauseFilters, a8 as PrimaryKeyType, a4 as PropertyDef, a1 as PropertyKeys, Z as Result, K as SelectArg, L as SelectArgToKeys, S as SingleLinkAccessor, T as SingleOsdkResult, af as TimeSeriesPoint, ag as TimeSeriesProperty, ah as TimeSeriesQuery, ad as TimeseriesDurationMapping, V as ValidAggregationKeys, a5 as VersionBound, W as WhereClause, a7 as WirePropertyTypes, Y as isOk } from './ObjectSet-DKpF7Bpm.cjs';
3
3
  import 'type-fest';
4
4
  import 'geojson';
5
5
 
@@ -62,7 +62,7 @@ interface DataValueClientToWire {
62
62
  string: string;
63
63
  timestamp: string;
64
64
  set: Set<any>;
65
- mediaReference: MediaReference;
65
+ mediaReference: MediaReference | MediaUpload;
66
66
  twoDimensionalAggregation: {
67
67
  key: AllowedBucketKeyTypes$1;
68
68
  value: AllowedBucketTypes$1;
@@ -169,6 +169,10 @@ type ParameterEvaluatedConstraint = {
169
169
  type: "unevaluable";
170
170
  };
171
171
 
172
+ declare const NULL_VALUE: symbol & {
173
+ __type: "NULL_VALUE";
174
+ };
175
+
172
176
  type ApplyActionOptions = {
173
177
  $returnEdits?: true;
174
178
  $validateOnly?: false;
@@ -207,6 +211,11 @@ declare namespace ActionParam {
207
211
  type StructType<T extends Record<string, keyof DataValueClientToWire>> = {
208
212
  [K in keyof T]: DataValueClientToWire[T[K]];
209
213
  };
214
+ /**
215
+ * Type of the symbol that indicates that a "null" value should be passed for the action parameter.
216
+ * For any autogenerated modify actions, this will cause the action to clear the value of the parameter.
217
+ */
218
+ type NullValueType = typeof NULL_VALUE;
210
219
  }
211
220
  type ActionEditResponse = ActionResults;
212
221
  type ActionValidationResponse = ValidateActionResponseV2;
@@ -217,6 +226,26 @@ type ActionReturnTypeForOptions<Op extends ApplyActionOptions | ApplyBatchAction
217
226
  $returnEdits: true;
218
227
  } ? ActionEditResponse : undefined;
219
228
 
229
+ interface Logger {
230
+ trace: Logger.LogFn;
231
+ debug: Logger.LogFn;
232
+ fatal: Logger.LogFn;
233
+ error: Logger.LogFn;
234
+ warn: Logger.LogFn;
235
+ info: Logger.LogFn;
236
+ isLevelEnabled(level: string): boolean;
237
+ child(bindings: Record<string, any>, options?: {
238
+ level?: string;
239
+ msgPrefix?: string;
240
+ }): Logger;
241
+ }
242
+ declare namespace Logger {
243
+ interface LogFn {
244
+ (obj: unknown, msg?: string, ...args: any[]): void;
245
+ (msg: string, ...args: any[]): void;
246
+ }
247
+ }
248
+
220
249
  interface ActionMetadata {
221
250
  type: "action";
222
251
  apiName: string;
@@ -450,24 +479,4 @@ declare namespace QueryResult {
450
479
  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>>;
451
480
  }
452
481
 
453
- interface Logger {
454
- trace: Logger.LogFn;
455
- debug: Logger.LogFn;
456
- fatal: Logger.LogFn;
457
- error: Logger.LogFn;
458
- warn: Logger.LogFn;
459
- info: Logger.LogFn;
460
- isLevelEnabled(level: string): boolean;
461
- child(bindings: Record<string, any>, options?: {
462
- level?: string;
463
- msgPrefix?: string;
464
- }): Logger;
465
- }
466
- declare namespace Logger {
467
- interface LogFn {
468
- (obj: unknown, msg?: string, ...args: any[]): void;
469
- (msg: string, ...args: any[]): void;
470
- }
471
- }
472
-
473
- export { type ActionDefinition, type ActionEditResponse, ActionMetadata, ActionParam, type ActionReturnTypeForOptions, type ActionValidationResponse, type AllowedBucketKeyTypes$1 as AllowedBucketKeyTypes, type AllowedBucketTypes$1 as AllowedBucketTypes, type ApplyActionOptions, type ApplyBatchActionOptions, Attachment, AttachmentUpload, CompileTimeMetadata, type DataValueClientToWire, type DataValueWireToClient, InterfaceDefinition, type InterfaceQueryDataType, Logger, MediaReference, ObjectIdentifiers, ObjectOrInterfaceDefinition, 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 };
482
+ export { type ActionDefinition, type ActionEditResponse, ActionMetadata, ActionParam, type ActionReturnTypeForOptions, type ActionValidationResponse, type AllowedBucketKeyTypes$1 as AllowedBucketKeyTypes, type AllowedBucketTypes$1 as AllowedBucketTypes, type ApplyActionOptions, type ApplyBatchActionOptions, Attachment, AttachmentUpload, CompileTimeMetadata, type DataValueClientToWire, type DataValueWireToClient, InterfaceDefinition, type InterfaceQueryDataType, Logger, MediaReference, MediaUpload, NULL_VALUE, ObjectIdentifiers, ObjectOrInterfaceDefinition, type ObjectQueryDataType, type ObjectSet, type ObjectSetQueryDataType, ObjectTypeDefinition, type OntologyMetadata, OsdkBase, type OsdkObject, PrimaryKeyTypes, PropertyValueWireToClient, type QueryDataTypeDefinition, type QueryDefinition, type QueryMetadata, QueryParam, type QueryParameterDefinition, QueryResult, type Range, type ThreeDimensionalAggregation, type ThreeDimensionalQueryAggregationDefinition, type TwoDimensionalAggregation, type TwoDimensionalQueryAggregationDefinition };
@@ -1,5 +1,5 @@
1
- import { f as ObjectOrInterfaceDefinition, $ as PropertyKeys, M as MediaReference, O as ObjectTypeDefinition, N as NullabilityAdherence, H as SelectArg, a8 as Osdk, ah as ExtractOptions, F as FetchPageArgs, K as FetchPageResult, h as OsdkBase } from '../ObjectSet-BdIHDSBH.cjs';
2
- export { ai as MinimalObjectSet } from '../ObjectSet-BdIHDSBH.cjs';
1
+ import { g as ObjectOrInterfaceDefinition, a1 as PropertyKeys, M as MediaReference, O as ObjectTypeDefinition, N as NullabilityAdherence, K as SelectArg, ab as Osdk, ak as ExtractOptions, H as FetchPageArgs, Q as FetchPageResult, i as OsdkBase } from '../ObjectSet-DKpF7Bpm.cjs';
2
+ export { al as MinimalObjectSet } from '../ObjectSet-DKpF7Bpm.cjs';
3
3
  import 'type-fest';
4
4
  import 'geojson';
5
5
 
@@ -39,9 +39,12 @@ declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid: Experiment<"2.1.
39
39
  }>;
40
40
 
41
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, T>) => Promise<FetchPageResult<Q, L, R, S, T>>;
42
- declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<"2.2.0", "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid", {
42
+ type FetchPageByRidPayload = {
43
43
  fetchPageByRid: fetchPageByRidFn;
44
- }>;
44
+ fetchPageByRidNoType: fetchPageByRidNoTypeFn;
45
+ };
46
+ type fetchPageByRidNoTypeFn = <const R extends boolean, const S extends NullabilityAdherence, const T extends boolean>(rids: readonly string[], options?: FetchPageArgs<ObjectOrInterfaceDefinition, any, R, any, S, T>) => Promise<FetchPageResult<ObjectOrInterfaceDefinition, any, R, S, T>>;
47
+ declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<"2.2.0", "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid", FetchPageByRidPayload>;
45
48
 
46
49
  interface EXPERIMENTAL_BulkLinkResult {
47
50
  object: OsdkBase<any>;
@@ -55,4 +58,4 @@ declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks: Experiment<"2.0.8
55
58
  getBulkLinks: getBulkLinksFn;
56
59
  }>;
57
60
 
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 };
61
+ export { type EXPERIMENTAL_BulkLinkResult, type Experiment, type ExperimentFns, type FetchPageByRidPayload, __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":"Definitions.js","names":[],"sources":["Definitions.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 GetClientPropertyValueFromWire,\n GetCreatePropertyValueFromWire,\n} from \"./mapping/PropertyValueMapping.js\";\nimport type { ObjectMetadata } from \"./ontology/ObjectTypeDefinition.js\";\n\ntype MaybeArray<T extends { multiplicity?: boolean | undefined }, U> =\n T[\"multiplicity\"] extends true ? Array<U> : U;\n\ntype MaybeNullable<T extends ObjectMetadata.Property, U> = T[\"nullable\"] extends\n true ? U | undefined\n : U;\n\ntype Raw<T> = T extends Array<any> ? T[0] : T;\ntype Converted<T> = T extends Array<any> ? T[1] : T;\n\n/**\n * @param {T} ObjectMetadata.Property in literal form\n * @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`\n */\nexport type OsdkObjectPropertyType<\n T extends ObjectMetadata.Property,\n STRICTLY_ENFORCE_NULLABLE extends boolean = true,\n> = STRICTLY_ENFORCE_NULLABLE extends false ?\n | MaybeArray<T, Converted<GetClientPropertyValueFromWire<T[\"type\"]>>>\n | undefined\n : MaybeNullable<\n T,\n MaybeArray<T, Converted<GetClientPropertyValueFromWire<T[\"type\"]>>>\n >;\n\n/**\n * @param {T} ObjectMetadata.Property in literal form\n * @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`\n */\nexport type OsdkObjectCreatePropertyType<\n T extends ObjectMetadata.Property,\n STRICTLY_ENFORCE_NULLABLE extends boolean = true,\n> = STRICTLY_ENFORCE_NULLABLE extends false ?\n | MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T[\"type\"]>>>\n | undefined\n : MaybeNullable<\n T,\n MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T[\"type\"]>>>\n >;\n\nexport type OsdkObjectRawPropertyType<T extends ObjectMetadata.Property> =\n MaybeNullable<\n T,\n MaybeArray<T, Raw<GetClientPropertyValueFromWire<T[\"type\"]>>>\n >;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"Definitions.js","names":[],"sources":["Definitions.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 GetClientPropertyValueFromWire,\n GetCreatePropertyValueFromWire,\n} from \"./mapping/PropertyValueMapping.js\";\nimport type { ObjectMetadata } from \"./ontology/ObjectTypeDefinition.js\";\n\ntype MaybeArray<T extends { multiplicity?: boolean | undefined }, U> =\n T[\"multiplicity\"] extends true ? Array<U> : U;\n\ntype MaybeNullable<T extends ObjectMetadata.Property, U> = T[\"nullable\"] extends\n true ? U | undefined\n : U;\n\ntype Raw<T> = T extends Array<any> ? T[0] : T;\ntype Converted<T> = T extends Array<any> ? T[1] : T;\n\n/**\n * @param {T} ObjectMetadata.Property in literal form\n * @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`\n */\nexport type OsdkObjectPropertyType<\n T extends ObjectMetadata.Property,\n STRICTLY_ENFORCE_NULLABLE extends boolean = true,\n> = STRICTLY_ENFORCE_NULLABLE extends false ?\n | MaybeArray<T, Converted<GetClientPropertyValueFromWire<T[\"type\"]>>>\n | undefined\n : MaybeNullable<\n T,\n MaybeArray<T, Converted<GetClientPropertyValueFromWire<T[\"type\"]>>>\n >;\n\n/**\n * @param {T} ObjectMetadata.Property in literal form\n */\nexport type OsdkObjectPropertyTypeNotUndefined<\n T extends ObjectMetadata.Property,\n> = MaybeArray<T, Converted<GetClientPropertyValueFromWire<T[\"type\"]>>>;\n\n/**\n * @param {T} ObjectMetadata.Property in literal form\n * @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`\n */\nexport type OsdkObjectCreatePropertyType<\n T extends ObjectMetadata.Property,\n STRICTLY_ENFORCE_NULLABLE extends boolean = true,\n> = STRICTLY_ENFORCE_NULLABLE extends false ?\n | MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T[\"type\"]>>>\n | undefined\n : MaybeNullable<\n T,\n MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T[\"type\"]>>>\n >;\n\nexport type OsdkObjectRawPropertyType<T extends ObjectMetadata.Property> =\n MaybeNullable<\n T,\n MaybeArray<T, Raw<GetClientPropertyValueFromWire<T[\"type\"]>>>\n >;\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 {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n} from \"./ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nimport type { OsdkBase } from \"./OsdkBase.js\";\n\ntype DropDollarOptions<T extends string> = Exclude<\n T,\n \"$rid\" | \"$all\" | \"$notStrict\"\n>;\n\ntype DropDollarAll<T extends string> = Exclude<\n T,\n \"$all\"\n>;\n\ntype SpecialOsdkPropParams =\n | \"$all\"\n | \"$rid\"\n | \"$strict\"\n | \"$notStrict\";\n\ntype ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> =\n | SpecialOsdkPropParams\n | PropertyKeys<Q>;\n\nexport type ApiNameAsString<\n T extends ObjectOrInterfaceDefinition,\n> = CompileTimeMetadata<T>[\"apiName\"];\n\nexport type JustProps<\n T extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<T>,\n> = P extends \"$all\" ? PropertyKeys<T>\n : Exclude<P, SpecialOsdkPropParams>;\n\nexport type PropMapToObject<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n> = NonNullable<CompileTimeMetadata<TO>[\"interfaceMap\"]>[ApiNameAsString<FROM>];\n\nexport type MapPropNamesToObjectType<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = \"$allBaseProperties\" extends OPTIONS\n ? PropertyKeys<FROM> extends P ? PropertyKeys<TO>\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>]\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];\n\nexport type PropMapToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n> = NonNullable<\n CompileTimeMetadata<FROM>[\"inverseInterfaceMap\"]\n>[ApiNameAsString<TO>];\n\nexport type MapPropNamesToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n P extends ValidOsdkPropParams<FROM>,\n> = PropMapToInterface<\n FROM,\n TO\n>[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>];\n/**\n * Older version of this helper that allows for `$rid` and co in\n * the properties field.\n * @param FROM - the interface or object type to convert from\n * @param TO - the interface or object type to convert to\n * @param P - the property(s) to convert\n */\nexport type ConvertProps<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ValidToFrom<FROM>,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = TO extends FROM ? P\n : TO extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToObjectType<FROM, TO, P, OPTIONS>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToInterface<FROM, TO, P>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : never\n : never;\n\n/** DO NOT EXPORT FROM PACKAGE */\nexport type ValidToFrom<\n FROM extends ObjectOrInterfaceDefinition,\n> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition\n : InterfaceDefinition;\n\nexport type IsNever<T> = [T] extends [never] ? true : false;\n\ntype ExtractPropsKeysFromOldPropsStyle<\n Q extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<Q>,\n> = P extends \"$all\" ? PropertyKeys<Q>\n : Exclude<P, \"$strict\" | \"$notStrict\" | \"$rid\">;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n\nexport type GetPropsKeys<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n N extends boolean = false,\n> = IsNever<P> extends true ? N extends true ? never : PropertyKeys<Q>\n : IsAny<P> extends true ? PropertyKeys<Q>\n : P;\n\n/**\n * Use `Osdk.Instance` or `YourType.OsdkInstance`\n */\nexport type Osdk<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends string = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n> =\n // no middle options is simplest\n IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n // Options only includes the two allowed in the new style\n : (IsNever<Exclude<OPTIONS, \"$rid\">>) extends true\n ? Osdk.Instance<Q, OPTIONS & \"$rid\", P>\n // else we are in the old style which was just Q and OPTIONS\n // and OPTIONS was $things + prop names\n : Osdk.Instance<\n Q,\n (\"$rid\" extends OPTIONS ? \"$rid\" : never),\n ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>\n >;\n\nexport namespace Osdk {\n export type Instance<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends Record<string, SimplePropertyDef> = {},\n > =\n & OsdkBase<Q>\n & Pick<\n CompileTimeMetadata<Q>[\"props\"],\n // If there aren't any additional properties, then we want GetPropsKeys to default to PropertyKeys<Q>\n GetPropsKeys<Q, P, [R] extends [{}] ? false : true>\n >\n & ([R] extends [never] ? {}\n : { [A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]> })\n & {\n readonly $link: Q extends { linksType?: any } ? Q[\"linksType\"]\n : Q extends ObjectTypeDefinition ? OsdkObjectLinksObject<Q>\n : never;\n\n readonly $as: <NEW_Q extends ValidToFrom<Q>>(\n type: NEW_Q | string,\n ) => Osdk.Instance<\n NEW_Q,\n OPTIONS,\n ConvertProps<Q, NEW_Q, P, OPTIONS>\n >;\n\n readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(\n updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n },\n ) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata: Q extends\n ObjectTypeDefinition ? {\n ObjectMetadata: Q;\n }\n : {\n ObjectMetadata: ObjectMetadata;\n InterfaceMetadata: InterfaceMetadata;\n };\n }\n // We are hiding the $rid field if it wasn't requested as we want to discourage its use\n & (IsNever<OPTIONS> extends true ? {}\n : IsAny<OPTIONS> extends true ? {}\n : \"$rid\" extends OPTIONS ? { readonly $rid: string }\n : {});\n}\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not `false` should always be `never`.\n *\n * This is structured in a way that it should always short circuit to never early.\n */\nexport type ExtractStrictOption<S extends NullabilityAdherence> =\n IsNever<S> extends true ? never\n : \"throw\" extends S ? never // catches any time \"throw\" still exists (including any)\n : \"drop\" extends S ? never // catches any time \"drop\" still exists (including any)\n : \"$notStrict\";\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not exactly `true` should always be `never`.\n */\nexport type ExtractRidOption<R extends boolean> = // comment for readability\n IsNever<R> extends true ? never\n : DefaultToFalse<R> extends false ? never\n : \"$rid\";\n\nexport type ExtractAllPropertiesOption<T extends boolean> = // comment for readability\n IsNever<T> extends true ? never\n : DefaultToFalse<T> extends false ? never\n : \"$allBaseProperties\";\n\n// not exported from package\nexport type ExtractOptions<\n R extends boolean,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n> = ExtractRidOption<R> | ExtractAllPropertiesOption<T>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0FA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;AA0BA;AACA;AACA;AAFA,WAsBiBA,IAAI;AAsDrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAWA","ignoreList":[]}
1
+ {"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 {\n NullabilityAdherence,\n ObjectSetArgs,\n} from \"./object/FetchPageArgs.js\";\nimport type { UnionIfTrue } from \"./object/FetchPageResult.js\";\nimport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n} from \"./ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nimport type { OsdkBase } from \"./OsdkBase.js\";\n\ntype DropDollarOptions<T extends string> = Exclude<\n T,\n \"$rid\" | \"$all\" | \"$notStrict\"\n>;\n\ntype DropDollarAll<T extends string> = Exclude<\n T,\n \"$all\"\n>;\n\ntype SpecialOsdkPropParams =\n | \"$all\"\n | \"$rid\"\n | \"$strict\"\n | \"$notStrict\";\n\ntype ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> =\n | SpecialOsdkPropParams\n | PropertyKeys<Q>;\n\nexport type ApiNameAsString<\n T extends ObjectOrInterfaceDefinition,\n> = CompileTimeMetadata<T>[\"apiName\"];\n\nexport type JustProps<\n T extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<T>,\n> = P extends \"$all\" ? PropertyKeys<T>\n : Exclude<P, SpecialOsdkPropParams>;\n\nexport type PropMapToObject<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n> = NonNullable<CompileTimeMetadata<TO>[\"interfaceMap\"]>[ApiNameAsString<FROM>];\n\nexport type MapPropNamesToObjectType<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = \"$allBaseProperties\" extends OPTIONS\n ? PropertyKeys<FROM> extends P ? PropertyKeys<TO>\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>]\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];\n\ntype NamespaceOf<S extends string> = S extends `${infer Before}.${infer After}`\n ? After extends `${string}.${string}` ? `${Before}.${NamespaceOf<After>}`\n : Before\n : never;\n\ntype MaybeStripNamespaces<S extends string, TO extends InterfaceDefinition> =\n S extends `${NamespaceOf<S>}.${infer Rest}`\n ? NamespaceOf<S> extends NamespaceOf<ApiNameAsString<TO>> ? Rest : S\n : S;\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> = MaybeStripNamespaces<\n PropMapToInterface<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>],\n TO\n>;\n/**\n * Older version of this helper that allows for `$rid` and co in\n * the properties field.\n * @param FROM - the interface or object type to convert from\n * @param TO - the interface or object type to convert to\n * @param P - the property(s) to convert\n */\nexport type ConvertProps<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ValidToFrom<FROM>,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = TO extends FROM ? P\n : TO extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToObjectType<FROM, TO, P, OPTIONS>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToInterface<FROM, TO, P>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : never\n : never;\n\n/** DO NOT EXPORT FROM PACKAGE */\nexport type ValidToFrom<\n FROM extends ObjectOrInterfaceDefinition,\n> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition\n : InterfaceDefinition;\n\nexport type IsNever<T> = [T] extends [never] ? true : false;\n\ntype ExtractPropsKeysFromOldPropsStyle<\n Q extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<Q>,\n> = P extends \"$all\" ? PropertyKeys<Q>\n : Exclude<P, \"$strict\" | \"$notStrict\" | \"$rid\">;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n\nexport type GetPropsKeys<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n N extends boolean = false,\n> = IsNever<P> extends true ? N extends true ? never : PropertyKeys<Q>\n : IsAny<P> extends true ? PropertyKeys<Q>\n : P;\n\n/**\n * Use `Osdk.Instance` or `YourType.OsdkInstance`\n */\nexport type Osdk<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends string = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n> =\n // no middle options is simplest\n IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n // Options only includes the two allowed in the new style\n : (IsNever<Exclude<OPTIONS, \"$rid\">>) extends true\n ? Osdk.Instance<Q, OPTIONS & \"$rid\", P>\n // else we are in the old style which was just Q and OPTIONS\n // and OPTIONS was $things + prop names\n : Osdk.Instance<\n Q,\n (\"$rid\" extends OPTIONS ? \"$rid\" : never),\n ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>\n >;\n\nexport type MaybeScore<\n T extends Osdk.Instance<any>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<any>,\n> = ORDER_BY_OPTIONS extends \"relevance\" ? T & { $score: number } : T;\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 ObjectOrInterfaceDefinition ? OsdkObjectLinksObject<Q>\n : never;\n\n readonly $as: <NEW_Q extends ValidToFrom<Q>>(\n type: NEW_Q | string,\n ) => Osdk.Instance<\n NEW_Q,\n OPTIONS,\n ConvertProps<Q, NEW_Q, P, OPTIONS>\n >;\n\n readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(\n updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n },\n ) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata: Q extends\n ObjectTypeDefinition ? {\n ObjectMetadata: ObjectMetadata;\n }\n : {\n ObjectMetadata: ObjectMetadata;\n InterfaceMetadata: InterfaceMetadata;\n };\n }\n // We are hiding the $rid field if it wasn't requested as we want to discourage its use\n & (IsNever<OPTIONS> extends true ? {}\n : IsAny<OPTIONS> extends true ? {}\n : \"$rid\" extends OPTIONS ? { readonly $rid: string }\n : {});\n}\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not `false` should always be `never`.\n *\n * This is structured in a way that it should always short circuit to never early.\n */\nexport type ExtractStrictOption<S extends NullabilityAdherence> =\n IsNever<S> extends true ? never\n : \"throw\" extends S ? never // catches any time \"throw\" still exists (including any)\n : \"drop\" extends S ? never // catches any time \"drop\" still exists (including any)\n : \"$notStrict\";\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not exactly `true` should always be `never`.\n */\nexport type ExtractRidOption<R extends boolean> = // comment for readability\n IsNever<R> extends true ? never\n : DefaultToFalse<R> extends false ? never\n : \"$rid\";\n\nexport type ExtractAllPropertiesOption<T extends boolean> = // comment for readability\n IsNever<T> extends true ? never\n : DefaultToFalse<T> extends false ? never\n : \"$allBaseProperties\";\n\n// not exported from package\nexport type ExtractOptions<\n R extends boolean,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n> = ExtractRidOption<R> | ExtractAllPropertiesOption<T>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0GA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;AA0BA;AACA;AACA;AAFA,WA2BiBA,IAAI;AAsDrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAWA","ignoreList":[]}
@@ -193,5 +193,12 @@ describe("ExtractOptions", () => {
193
193
  expectTypeOf().branded.toEqualTypeOf();
194
194
  });
195
195
  });
196
+ describe("Interface casting works as intended", () => {
197
+ it("mapping as with fqn property names works", async () => {
198
+ expectTypeOf().toEqualTypeOf;
199
+ expectTypeOf().toEqualTypeOf;
200
+ expectTypeOf().toExtend();
201
+ });
202
+ });
196
203
  });
197
204
  //# sourceMappingURL=OsdkObjectFrom.test.js.map