@osdk/api 2.7.0-beta.9 → 2.7.0-rc.15

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 (39) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/build/browser/aggregate/WhereClause.js +1 -1
  3. package/build/browser/aggregate/WhereClause.js.map +1 -1
  4. package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
  5. package/build/browser/index.js +0 -1
  6. package/build/browser/index.js.map +1 -1
  7. package/build/browser/objectSet/ObjectSet.js.map +1 -1
  8. package/build/browser/objectSet/ObjectSet.test.js +0 -22
  9. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  10. package/build/browser/objectSet/ObjectSetListener.js.map +1 -1
  11. package/build/browser/ontology/QueryDefinition.js.map +1 -1
  12. package/build/cjs/{ObjectSet-DgucGuIA.d.cts → ObjectSet-CADY0fcl.d.cts} +28 -29
  13. package/build/cjs/index.cjs +0 -4
  14. package/build/cjs/index.cjs.map +1 -1
  15. package/build/cjs/index.d.cts +3 -7
  16. package/build/cjs/public/unstable.d.cts +2 -2
  17. package/build/esm/aggregate/WhereClause.js +1 -1
  18. package/build/esm/aggregate/WhereClause.js.map +1 -1
  19. package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
  20. package/build/esm/index.js +0 -1
  21. package/build/esm/index.js.map +1 -1
  22. package/build/esm/objectSet/ObjectSet.js.map +1 -1
  23. package/build/esm/objectSet/ObjectSet.test.js +0 -22
  24. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  25. package/build/esm/objectSet/ObjectSetListener.js.map +1 -1
  26. package/build/esm/ontology/QueryDefinition.js.map +1 -1
  27. package/build/types/aggregate/WhereClause.d.ts +2 -5
  28. package/build/types/aggregate/WhereClause.d.ts.map +1 -1
  29. package/build/types/derivedProperties/DerivedProperty.d.ts +1 -10
  30. package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
  31. package/build/types/index.d.ts +0 -2
  32. package/build/types/index.d.ts.map +1 -1
  33. package/build/types/objectSet/ObjectSet.d.ts +4 -1
  34. package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
  35. package/build/types/objectSet/ObjectSetListener.d.ts +26 -5
  36. package/build/types/objectSet/ObjectSetListener.d.ts.map +1 -1
  37. package/build/types/ontology/QueryDefinition.d.ts +0 -4
  38. package/build/types/ontology/QueryDefinition.d.ts.map +1 -1
  39. package/package.json +1 -1
@@ -1218,12 +1218,8 @@ type GeoFilter_Intersects = {
1218
1218
  $bbox?: never;
1219
1219
  } | Polygon;
1220
1220
  };
1221
- type FilterFor<PD extends ObjectMetadata.Property> = PD["multiplicity"] extends true ? (PD["type"] extends Record<string, BaseWirePropertyTypes> ? ArrayFilter<StructArrayFilterOpts<PD["type"]>> : PD["type"] extends PropertyTypesRepresentedAsStringsForArrayWhereClause ? ArrayFilter<string> : (PD["type"] extends boolean ? ArrayFilter<boolean> : ArrayFilter<number>)) : PD["type"] extends Record<string, BaseWirePropertyTypes> ? StructFilter<PD["type"]> | BaseFilter.$isNull<string> : (PD["type"] extends "string" ? StringFilter : PD["type"] extends "geopoint" | "geoshape" ? GeoFilter : PD["type"] extends "datetime" | "timestamp" ? DatetimeFilter : PD["type"] extends "boolean" ? BooleanFilter : PD["type"] extends WhereClauseNumberPropertyTypes ? NumberFilter : BaseFilter<string>);
1222
- type StructArrayFilterOpts<ST extends Record<string, BaseWirePropertyTypes>> = {
1223
- [K in keyof ST]?: FilterFor<{
1224
- "type": ST[K];
1225
- }>;
1226
- };
1221
+ type BaseFilterFor<T> = T extends Record<string, BaseWirePropertyTypes> ? StructFilterOpts<T> : T extends "string" ? StringFilter : T extends "geopoint" | "geoshape" ? GeoFilter : T extends "datetime" | "timestamp" ? DatetimeFilter : T extends "boolean" ? BooleanFilter : T extends WhereClauseNumberPropertyTypes ? NumberFilter : BaseFilter<string>;
1222
+ type FilterFor<PD extends ObjectMetadata.Property> = PD["multiplicity"] extends true ? ArrayFilter<BaseFilterFor<PD["type"]>> : PD["type"] extends Record<string, BaseWirePropertyTypes> ? StructFilter<PD["type"]> | BaseFilter.$isNull<string> : BaseFilterFor<PD["type"]>;
1227
1223
  type StructFilterOpts<ST extends Record<string, BaseWirePropertyTypes>> = {
1228
1224
  [K in keyof ST]?: FilterFor<{
1229
1225
  "type": ST[K];
@@ -1232,7 +1228,6 @@ type StructFilterOpts<ST extends Record<string, BaseWirePropertyTypes>> = {
1232
1228
  type StructFilter<ST extends Record<string, BaseWirePropertyTypes>> = {
1233
1229
  [K in keyof ST]: Just<K, StructFilterOpts<ST>>;
1234
1230
  }[keyof ST];
1235
- type PropertyTypesRepresentedAsStringsForArrayWhereClause = "string" | "geopoint" | "geoshape" | "datetime" | "timestamp";
1236
1231
  type WhereClauseNumberPropertyTypes = "double" | "integer" | "long" | "float" | "decimal" | "byte";
1237
1232
  type AndWhereClause<T extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> = {
1238
1233
  $and: WhereClause<T, RDPs>[];
@@ -1292,7 +1287,7 @@ declare namespace DerivedProperty {
1292
1287
  };
1293
1288
  interface BaseBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {
1294
1289
  }
1295
- export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q>, Constant<Q> {
1290
+ export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {
1296
1291
  }
1297
1292
  export interface AggregateBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {
1298
1293
  }
@@ -1308,15 +1303,6 @@ type Filterable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boole
1308
1303
  type Pivotable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
1309
1304
  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>;
1310
1305
  };
1311
- type Constant<Q extends ObjectOrInterfaceDefinition> = {
1312
- readonly constant: {
1313
- readonly double: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q>;
1314
- readonly integer: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>;
1315
- readonly long: (value: string) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q>;
1316
- readonly datetime: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>;
1317
- readonly timestamp: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q>;
1318
- };
1319
- };
1320
1306
  type Aggregatable<Q extends ObjectOrInterfaceDefinition> = {
1321
1307
  readonly aggregate: <V extends ValidAggregationKeys<Q, "withPropertiesAggregate">>(aggregationSpecifier: V, opts?: V extends `${any}:${infer P}` ? P extends CollectWithPropAggregations ? {
1322
1308
  limit: number;
@@ -1341,17 +1327,13 @@ type MinimalDirectedObjectLinkInstance<Q extends ObjectOrInterfaceDefinition, LI
1341
1327
  target: ObjectIdentifiers<LinkedObjectType<Q, LINK_TYPE_API_NAME>>;
1342
1328
  linkType: LINK_TYPE_API_NAME;
1343
1329
  };
1344
- type FetchLinksPageResult<Q extends ObjectOrInterfaceDefinition, LINK_TYPE extends LinkTypeApiNamesFor<Q>> = {
1345
- data: Array<MinimalDirectedObjectLinkInstance<Q, LINK_TYPE>>;
1346
- nextPageToken?: string;
1347
- };
1348
1330
 
1349
1331
  declare namespace ObjectSetSubscription {
1350
- interface Listener<O extends ObjectOrInterfaceDefinition, P extends PropertyKeys<O> = PropertyKeys<O>> {
1332
+ interface Listener<O extends ObjectOrInterfaceDefinition, P extends PropertyKeys<O> = PropertyKeys<O>, R extends boolean = false> {
1351
1333
  /**
1352
1334
  * Specific objects have changed and can be immediately updated
1353
1335
  */
1354
- onChange?: (objectUpdate: ObjectUpdate<O, P>) => void;
1336
+ onChange?: (objectUpdate: ObjectUpdate<O, P, R>) => void;
1355
1337
  /**
1356
1338
  * The subscription has been successfully established and updates can be expected to be received.
1357
1339
  */
@@ -1372,17 +1354,34 @@ declare namespace ObjectSetSubscription {
1372
1354
  /**
1373
1355
  * Options for subscribing to an ObjectSet.
1374
1356
  *
1375
- * properties - The properties to request a subscription for. Requesting specific properties limits the possible properties
1357
+ * @param properties The properties to request a subscription for. Requesting specific properties limits the possible properties
1376
1358
  * that can be returned from the subscription. If not provided, all properties will be requested and potentially be returned on updates.
1359
+ *
1360
+ * @param includeRid Whether to include the $rid property in the subscription. Defaults to false. RIDs will be returned on all updates unless the update
1361
+ * contains a new value for a geotime series reference property, in which case the RID will be undefined.
1377
1362
  */
1378
- interface Options<O extends ObjectOrInterfaceDefinition, P extends PropertyKeys<O> = PropertyKeys<O>> {
1363
+ interface Options<O extends ObjectOrInterfaceDefinition, P extends PropertyKeys<O> = PropertyKeys<O>, R extends boolean = false> {
1364
+ /**
1365
+ * The properties to request a subscription for. Requesting specific properties limits the possible properties
1366
+ * that can be returned from the subscription. If not provided, all properties will be requested and potentially be returned on updates.
1367
+ */
1379
1368
  properties?: Array<P>;
1369
+ /**
1370
+ * Whether to include the $rid property in the subscription. Defaults to false. RIDs will be returned on all updates unless the update
1371
+ * contains a new value for a geotime series reference property, in which case the RID will be undefined. RIDs will not be included
1372
+ * on the objects themselves.
1373
+ */
1374
+ includeRid?: AllFalse<PropertyTypesOnDefMatchesType<O, P, "geotimeSeriesReference">> extends true ? R : false;
1380
1375
  }
1381
1376
  }
1382
- type ObjectUpdate<O extends ObjectOrInterfaceDefinition, P extends PropertyKeys<O>> = {
1383
- object: Osdk.Instance<O, never, P>;
1377
+ type ObjectUpdate<O extends ObjectOrInterfaceDefinition, P extends PropertyKeys<O>, R extends boolean = false> = {
1378
+ object: R extends false ? Osdk.Instance<O, never, P> : Osdk.Instance<O, "$rid", P>;
1384
1379
  state: "ADDED_OR_UPDATED" | "REMOVED";
1385
1380
  };
1381
+ type PropertyTypesOnDefMatchesType<Q extends ObjectOrInterfaceDefinition, P extends PropertyKeys<Q>, T extends WirePropertyTypes> = {
1382
+ [K in P]: CompileTimeMetadata<Q>["properties"][K]["type"] extends T ? true : false;
1383
+ };
1384
+ type AllFalse<T extends Record<string, boolean>> = Exclude<T[keyof T], false> extends never ? true : false;
1386
1385
 
1387
1386
  type MergeObjectSet<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef> = {}> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;
1388
1387
  type ExtractRdp<D extends BaseObjectSet<any> | Record<string, SimplePropertyDef>> = [D] extends [never] ? {} : D extends BaseObjectSet<any> ? {} : D extends Record<string, SimplePropertyDef> ? D : {};
@@ -1594,7 +1593,7 @@ interface Subscribe<Q extends ObjectOrInterfaceDefinition> {
1594
1593
  * @param opts - Options to modify what properties are returned on subscription updates.
1595
1594
  * @returns an object containing a function to unsubscribe.
1596
1595
  */
1597
- readonly subscribe: <const P extends PropertyKeys<Q>>(listener: ObjectSetSubscription.Listener<Q, P>, opts?: ObjectSetSubscription.Options<Q, P>) => {
1596
+ readonly subscribe: <const P extends PropertyKeys<Q>, const R extends boolean = false>(listener: ObjectSetSubscription.Listener<Q, P, R>, opts?: ObjectSetSubscription.Options<Q, P, R>) => {
1598
1597
  unsubscribe: () => void;
1599
1598
  };
1600
1599
  }
@@ -1638,4 +1637,4 @@ interface AsyncIterLinks<Q extends ObjectOrInterfaceDefinition> {
1638
1637
  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>, NarrowToType<Q> {
1639
1638
  }
1640
1639
 
1641
- export { isOk as $, type AttachmentUpload as A, type GroupByClause as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type GroupByRange as E, type AsyncIterArgs as F, type GeoFilterOptions as G, type Augment as H, type InterfaceDefinition as I, type Augments as J, type FetchPageArgs as K, NullabilityAdherence as L, type MediaReference as M, type NotWhereClause as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, ObjectSetArgs as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, type SelectArg as T, type SelectArgToKeys as U, type ValidAggregationKeys as V, type WhereClause as W, type FetchPageResult as X, type SingleOsdkResult as Y, type Media as Z, type MediaMetadata as _, type MediaUpload as a, type TimeSeriesQuery as a$, type Result as a0, type BaseObjectSet as a1, type FetchLinksPageResult as a2, type LinkTypeApiNamesFor as a3, type MinimalDirectedObjectLinkInstance as a4, ObjectSetSubscription as a5, InterfaceMetadata as a6, PropertyKeys as a7, type ObjectSpecifier as a8, ObjectMetadata as a9, type NumberFormatNotation as aA, type NumberFormatOptions as aB, type NumberFormatRatio as aC, type NumberFormatScale as aD, type NumberFormatStandard as aE, type NumberFormatStandardUnit as aF, type NumberRatioType as aG, type NumberRoundingMode as aH, type NumberScaleType as aI, type PropertyNumberFormattingRule as aJ, type PropertyNumberFormattingRuleType as aK, type TimeCodeFormat as aL, type PropertyValueFormattingRule as aM, type PropertyTypeReference as aN, type PropertyTypeReferenceOrStringConstant as aO, type StringConstant as aP, type BaseWirePropertyTypes as aQ, type WirePropertyTypes as aR, type PrimaryKeyType as aS, type ConvertProps as aT, type MaybeScore as aU, Osdk as aV, type PageResult as aW, TimeseriesDurationMapping as aX, type GeotimeSeriesProperty as aY, type TimeSeriesPoint as aZ, type TimeSeriesProperty as a_, type PropertyDef as aa, type VersionBound as ab, SimplePropertyDef as ac, type PropertyBooleanFormattingRule as ad, type DatetimeFormat as ae, type DatetimeLocalizedFormat as af, type DatetimeLocalizedFormatType as ag, type DatetimeStringFormat as ah, type DatetimeTimezone as ai, type DatetimeTimezoneStatic as aj, type DatetimeTimezoneUser as ak, type PropertyDateFormattingRule as al, type PropertyTimestampFormattingRule as am, type KnownType as an, type PropertyKnownTypeFormattingRule as ao, type Affix as ap, type DurationBaseValue as aq, type DurationFormatStyle as ar, type DurationPrecision as as, type HumanReadableFormat as at, type NumberFormatAffix as au, type NumberFormatCurrency as av, type NumberFormatCurrencyStyle as aw, type NumberFormatCustomUnit as ax, type NumberFormatDuration as ay, type NumberFormatFixedValues as az, type Attachment as b, type LinkedType as b0, type LinkNames as b1, type ExtractOptions as b2, type MinimalObjectSet as b3, 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 AndWhereClause as p, type GeoFilter_Intersects as q, type GeoFilter_Within as r, type OrWhereClause as s, type PossibleWhereClauseFilters as t, type OsdkObjectCreatePropertyType as u, type OsdkObjectPropertyType as v, type OsdkObjectLinksObject as w, DerivedProperty as x, DurationMapping as y, type AllGroupByValues as z };
1640
+ export { isOk as $, type AttachmentUpload as A, type GroupByClause as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type GroupByRange as E, type AsyncIterArgs as F, type GeoFilterOptions as G, type Augment as H, type InterfaceDefinition as I, type Augments as J, type FetchPageArgs as K, NullabilityAdherence as L, type MediaReference as M, type NotWhereClause as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, ObjectSetArgs as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, type SelectArg as T, type SelectArgToKeys as U, type ValidAggregationKeys as V, type WhereClause as W, type FetchPageResult as X, type SingleOsdkResult as Y, type Media as Z, type MediaMetadata as _, type MediaUpload as a, type ExtractOptions as a$, type Result as a0, type BaseObjectSet as a1, ObjectSetSubscription as a2, InterfaceMetadata as a3, PropertyKeys as a4, type ObjectSpecifier as a5, ObjectMetadata as a6, type PropertyDef as a7, type VersionBound as a8, SimplePropertyDef as a9, type NumberFormatScale as aA, type NumberFormatStandard as aB, type NumberFormatStandardUnit as aC, type NumberRatioType as aD, type NumberRoundingMode as aE, type NumberScaleType as aF, type PropertyNumberFormattingRule as aG, type PropertyNumberFormattingRuleType as aH, type TimeCodeFormat as aI, type PropertyValueFormattingRule as aJ, type PropertyTypeReference as aK, type PropertyTypeReferenceOrStringConstant as aL, type StringConstant as aM, type BaseWirePropertyTypes as aN, type WirePropertyTypes as aO, type PrimaryKeyType as aP, type ConvertProps as aQ, type MaybeScore as aR, Osdk as aS, type PageResult as aT, TimeseriesDurationMapping as aU, type GeotimeSeriesProperty as aV, type TimeSeriesPoint as aW, type TimeSeriesProperty as aX, type TimeSeriesQuery as aY, type LinkedType as aZ, type LinkNames as a_, type PropertyBooleanFormattingRule as aa, type DatetimeFormat as ab, type DatetimeLocalizedFormat as ac, type DatetimeLocalizedFormatType as ad, type DatetimeStringFormat as ae, type DatetimeTimezone as af, type DatetimeTimezoneStatic as ag, type DatetimeTimezoneUser as ah, type PropertyDateFormattingRule as ai, type PropertyTimestampFormattingRule as aj, type KnownType as ak, type PropertyKnownTypeFormattingRule as al, type Affix as am, type DurationBaseValue as an, type DurationFormatStyle as ao, type DurationPrecision as ap, type HumanReadableFormat as aq, type NumberFormatAffix as ar, type NumberFormatCurrency as as, type NumberFormatCurrencyStyle as at, type NumberFormatCustomUnit as au, type NumberFormatDuration as av, type NumberFormatFixedValues as aw, type NumberFormatNotation as ax, type NumberFormatOptions as ay, type NumberFormatRatio as az, type Attachment as b, type MinimalObjectSet as b0, 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 AndWhereClause as p, type GeoFilter_Intersects as q, type GeoFilter_Within as r, type OrWhereClause as s, type PossibleWhereClauseFilters as t, type OsdkObjectCreatePropertyType as u, type OsdkObjectPropertyType as v, type OsdkObjectLinksObject as w, DerivedProperty as x, DurationMapping as y, type AllGroupByValues as z };
@@ -1,8 +1,5 @@
1
1
  'use strict';
2
2
 
3
- // src/actions/NullValue.ts
4
- var NULL_VALUE = Symbol.for("NULL_VALUE");
5
-
6
3
  // src/aggregate/WhereClause.ts
7
4
  var DistanceUnitMapping = {
8
5
  "centimeter": "CENTIMETERS",
@@ -72,7 +69,6 @@ var TimeseriesDurationMapping = {
72
69
 
73
70
  exports.DistanceUnitMapping = DistanceUnitMapping;
74
71
  exports.DurationMapping = DurationMapping;
75
- exports.NULL_VALUE = NULL_VALUE;
76
72
  exports.TimeseriesDurationMapping = TimeseriesDurationMapping;
77
73
  exports.isOk = isOk;
78
74
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
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
+ {"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// Fallback for unknown types","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const TimeDurationMapping = {\n \"sec\": \"SECONDS\",\n \"seconds\": \"SECONDS\",\n \"min\": \"MINUTES\",\n \"minute\": \"MINUTES\",\n \"minutes\": \"MINUTES\",\n \"hr\": \"HOURS\",\n \"hrs\": \"HOURS\",\n \"hour\": \"HOURS\",\n \"hours\": \"HOURS\",\n \"day\": \"DAYS\",\n \"days\": \"DAYS\",\n \"wk\": \"WEEKS\",\n \"week\": \"WEEKS\",\n \"weeks\": \"WEEKS\",\n \"mos\": \"MONTHS\",\n \"month\": \"MONTHS\",\n \"months\": \"MONTHS\",\n \"yr\": \"YEARS\",\n \"year\": \"YEARS\",\n \"years\": \"YEARS\"\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const DurationMapping = {\n ...TimeDurationMapping,\n \"quarter\": \"QUARTERS\",\n \"quarters\": \"QUARTERS\"\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Check if a result was successfully received\n * @param a - result wrapped value\n * @returns whether a result has a value in it\n */\nexport function isOk(a) {\n return \"value\" in a;\n}\n\n/**\n * Check if a result contains an error value\n * @param a Result wrapped value\n * @returns whether a result has an error in it\n */\nexport function isError(a) {\n return \"error\" in a;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const TimeseriesDurationMapping = {\n \"ms\": \"MILLISECONDS\",\n \"milliseconds\": \"MILLISECONDS\",\n ...TimeDurationMapping\n};"]}
@@ -1,5 +1,5 @@
1
- import { A as AttachmentUpload, M as MediaReference, a as MediaUpload, b as Attachment, O as ObjectTypeDefinition, c as ObjectIdentifiers, d as OsdkObjectPrimaryKeyType, e as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, f as OsdkMetadata, R as ReleaseStatus, g as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, h as PrimaryKeyTypes, i as OsdkBase } from './ObjectSet-DgucGuIA.cjs';
2
- export { ap as Affix, j as AggregateOpts, k as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, n as AggregationClause, l as AggregationResultsWithGroups, m as AggregationResultsWithoutGroups, o as AggregationsResults, z as AllGroupByValues, p as AndWhereClause, F as AsyncIterArgs, H as Augment, J as Augments, a1 as BaseObjectSet, aQ as BaseWirePropertyTypes, aT as ConvertProps, ae as DatetimeFormat, af as DatetimeLocalizedFormat, ag as DatetimeLocalizedFormatType, ah as DatetimeStringFormat, ai as DatetimeTimezone, aj as DatetimeTimezoneStatic, ak as DatetimeTimezoneUser, x as DerivedProperty, D as DistanceUnitMapping, aq as DurationBaseValue, ar as DurationFormatStyle, y as DurationMapping, as as DurationPrecision, a2 as FetchLinksPageResult, K as FetchPageArgs, X as FetchPageResult, G as GeoFilterOptions, q as GeoFilter_Intersects, r as GeoFilter_Within, aY as GeotimeSeriesProperty, B as GroupByClause, E as GroupByRange, at as HumanReadableFormat, a6 as InterfaceMetadata, an as KnownType, b1 as LinkNames, a3 as LinkTypeApiNamesFor, b0 as LinkedType, aU as MaybeScore, Z as Media, _ as MediaMetadata, a4 as MinimalDirectedObjectLinkInstance, N as NotWhereClause, L as NullabilityAdherence, au as NumberFormatAffix, av as NumberFormatCurrency, aw as NumberFormatCurrencyStyle, ax as NumberFormatCustomUnit, ay as NumberFormatDuration, az as NumberFormatFixedValues, aA as NumberFormatNotation, aB as NumberFormatOptions, aC as NumberFormatRatio, aD as NumberFormatScale, aE as NumberFormatStandard, aF as NumberFormatStandardUnit, aG as NumberRatioType, aH as NumberRoundingMode, aI as NumberScaleType, a9 as ObjectMetadata, Q as ObjectSetArgs, a5 as ObjectSetSubscription, a8 as ObjectSpecifier, s as OrWhereClause, aV as Osdk, u as OsdkObjectCreatePropertyType, w as OsdkObjectLinksObject, v as OsdkObjectPropertyType, aW as PageResult, t as PossibleWhereClauseFilters, aS as PrimaryKeyType, ad as PropertyBooleanFormattingRule, al as PropertyDateFormattingRule, aa as PropertyDef, a7 as PropertyKeys, ao as PropertyKnownTypeFormattingRule, aJ as PropertyNumberFormattingRule, aK as PropertyNumberFormattingRuleType, am as PropertyTimestampFormattingRule, aN as PropertyTypeReference, aO as PropertyTypeReferenceOrStringConstant, aM as PropertyValueFormattingRule, a0 as Result, T as SelectArg, U as SelectArgToKeys, ac as SimplePropertyDef, S as SingleLinkAccessor, Y as SingleOsdkResult, aP as StringConstant, aL as TimeCodeFormat, aZ as TimeSeriesPoint, a_ as TimeSeriesProperty, a$ as TimeSeriesQuery, aX as TimeseriesDurationMapping, V as ValidAggregationKeys, ab as VersionBound, W as WhereClause, aR as WirePropertyTypes, $ as isOk } from './ObjectSet-DgucGuIA.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-CADY0fcl.cjs';
2
+ export { am as Affix, j as AggregateOpts, k as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, n as AggregationClause, l as AggregationResultsWithGroups, m as AggregationResultsWithoutGroups, o as AggregationsResults, z as AllGroupByValues, p as AndWhereClause, F as AsyncIterArgs, H as Augment, J as Augments, a1 as BaseObjectSet, aN as BaseWirePropertyTypes, aQ as ConvertProps, ab as DatetimeFormat, ac as DatetimeLocalizedFormat, ad as DatetimeLocalizedFormatType, ae as DatetimeStringFormat, af as DatetimeTimezone, ag as DatetimeTimezoneStatic, ah as DatetimeTimezoneUser, x as DerivedProperty, D as DistanceUnitMapping, an as DurationBaseValue, ao as DurationFormatStyle, y as DurationMapping, ap as DurationPrecision, K as FetchPageArgs, X as FetchPageResult, G as GeoFilterOptions, q as GeoFilter_Intersects, r as GeoFilter_Within, aV as GeotimeSeriesProperty, B as GroupByClause, E as GroupByRange, aq as HumanReadableFormat, a3 as InterfaceMetadata, ak as KnownType, a_ as LinkNames, aZ as LinkedType, aR as MaybeScore, Z as Media, _ as MediaMetadata, N as NotWhereClause, L as NullabilityAdherence, ar as NumberFormatAffix, as as NumberFormatCurrency, at as NumberFormatCurrencyStyle, au as NumberFormatCustomUnit, av as NumberFormatDuration, aw as NumberFormatFixedValues, ax as NumberFormatNotation, ay as NumberFormatOptions, az as NumberFormatRatio, aA as NumberFormatScale, aB as NumberFormatStandard, aC as NumberFormatStandardUnit, aD as NumberRatioType, aE as NumberRoundingMode, aF as NumberScaleType, a6 as ObjectMetadata, Q as ObjectSetArgs, a2 as ObjectSetSubscription, a5 as ObjectSpecifier, s as OrWhereClause, aS as Osdk, u as OsdkObjectCreatePropertyType, w as OsdkObjectLinksObject, v as OsdkObjectPropertyType, aT as PageResult, t as PossibleWhereClauseFilters, aP as PrimaryKeyType, aa as PropertyBooleanFormattingRule, ai as PropertyDateFormattingRule, a7 as PropertyDef, a4 as PropertyKeys, al as PropertyKnownTypeFormattingRule, aG as PropertyNumberFormattingRule, aH as PropertyNumberFormattingRuleType, aj as PropertyTimestampFormattingRule, aK as PropertyTypeReference, aL as PropertyTypeReferenceOrStringConstant, aJ as PropertyValueFormattingRule, a0 as Result, T as SelectArg, U as SelectArgToKeys, a9 as SimplePropertyDef, S as SingleLinkAccessor, Y as SingleOsdkResult, aM as StringConstant, aI as TimeCodeFormat, aW as TimeSeriesPoint, aX as TimeSeriesProperty, aY as TimeSeriesQuery, aU as TimeseriesDurationMapping, V as ValidAggregationKeys, a8 as VersionBound, W as WhereClause, aO as WirePropertyTypes, $ as isOk } from './ObjectSet-CADY0fcl.cjs';
3
3
  import 'type-fest';
4
4
  import 'geojson';
5
5
 
@@ -332,8 +332,6 @@ type QueryParameterDefinition<T_Target extends ObjectTypeDefinition = any> = {
332
332
  } & QueryDataTypeDefinition<T_Target>;
333
333
  type QueryDataTypeDefinition<T_Target extends ObjectOrInterfaceDefinition = any> = PrimitiveDataType | ObjectQueryDataType<T_Target> | InterfaceQueryDataType<T_Target> | ObjectSetQueryDataType<T_Target> | InterfaceObjectSetQueryDataType<T_Target> | SetQueryDataType | UnionQueryDataType | StructQueryDataType | TwoDimensionalAggregationDataType | ThreeDimensionalAggregationDataType | MapDataType | ArrayQueryDataType;
334
334
  type BaseQueryDataTypeDefinition<T extends string> = {
335
- /** @deprecated use T["type"] extends "array" instead */
336
- multiplicity?: boolean;
337
335
  nullable?: boolean;
338
336
  type: T;
339
337
  };
@@ -360,8 +358,6 @@ interface SetQueryDataType extends BaseQueryDataTypeDefinition<"set"> {
360
358
  }
361
359
  interface ArrayQueryDataType extends BaseQueryDataTypeDefinition<"array"> {
362
360
  array: QueryDataTypeDefinition;
363
- /** @deprecated use T["type"] extends "array" instead */
364
- multiplicity?: true;
365
361
  }
366
362
  interface UnionQueryDataType extends BaseQueryDataTypeDefinition<"union"> {
367
363
  union: ReadonlyArray<QueryDataTypeDefinition>;
@@ -485,4 +481,4 @@ declare namespace QueryResult {
485
481
  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>>;
486
482
  }
487
483
 
488
- 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 };
484
+ 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, 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 { g as ObjectOrInterfaceDefinition, a7 as PropertyKeys, M as MediaReference, L as NullabilityAdherence, T as SelectArg, aV as Osdk, b2 as ExtractOptions, K as FetchPageArgs, X as FetchPageResult, i as OsdkBase } from '../ObjectSet-DgucGuIA.cjs';
2
- export { b3 as MinimalObjectSet } from '../ObjectSet-DgucGuIA.cjs';
1
+ import { g as ObjectOrInterfaceDefinition, a4 as PropertyKeys, M as MediaReference, L as NullabilityAdherence, T as SelectArg, aS as Osdk, a$ as ExtractOptions, K as FetchPageArgs, X as FetchPageResult, i as OsdkBase } from '../ObjectSet-CADY0fcl.cjs';
2
+ export { b0 as MinimalObjectSet } from '../ObjectSet-CADY0fcl.cjs';
3
3
  import 'type-fest';
4
4
  import 'geojson';
5
5
 
@@ -39,5 +39,5 @@ export const DistanceUnitMapping = {
39
39
  "nautical miles": "NAUTICAL_MILES"
40
40
  };
41
41
 
42
- // FIXME we need to represent all types
42
+ // Fallback for unknown types
43
43
  //# sourceMappingURL=WhereClause.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WhereClause.js","names":["DistanceUnitMapping"],"sources":["WhereClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { BBox, Point, Polygon } from \"geojson\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { BaseWirePropertyTypes } from \"../ontology/WirePropertyTypes.js\";\nimport type { IsNever } from \"../OsdkObjectFrom.js\";\nimport type { ArrayFilter } from \"./ArrayFilter.js\";\nimport type { BaseFilter } from \"./BaseFilter.js\";\nimport type { BooleanFilter } from \"./BooleanFilter.js\";\nimport type { DatetimeFilter } from \"./DatetimeFilter.js\";\nimport type { GeoFilter } from \"./GeoFilter.js\";\nimport type { Just } from \"./Just.js\";\nimport type { NumberFilter } from \"./NumberFilter.js\";\nimport type { StringFilter } from \"./StringFilter.js\";\n\nexport type PossibleWhereClauseFilters =\n | \"$gt\"\n | \"$eq\"\n | \"$ne\"\n | \"$isNull\"\n | \"$contains\"\n | \"$gte\"\n | \"$lt\"\n | \"$lte\"\n | \"$within\"\n | \"$in\"\n | \"$intersects\"\n | \"$startsWith\"\n | \"$containsAllTermsInOrder\"\n | \"$containsAnyTerm\"\n | \"$containsAllTerms\";\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping: {\n centimeter: \"CENTIMETERS\";\n centimeters: \"CENTIMETERS\";\n cm: \"CENTIMETERS\";\n meter: \"METERS\";\n meters: \"METERS\";\n m: \"METERS\";\n kilometer: \"KILOMETERS\";\n kilometers: \"KILOMETERS\";\n km: \"KILOMETERS\";\n inch: \"INCHES\";\n inches: \"INCHES\";\n foot: \"FEET\";\n feet: \"FEET\";\n yard: \"YARDS\";\n yards: \"YARDS\";\n mile: \"MILES\";\n miles: \"MILES\";\n nautical_mile: \"NAUTICAL_MILES\";\n nauticalMile: \"NAUTICAL_MILES\";\n \"nautical miles\": \"NAUTICAL_MILES\";\n} = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\",\n} satisfies Record<\n string,\n | \"CENTIMETERS\"\n | \"METERS\"\n | \"KILOMETERS\"\n | \"INCHES\"\n | \"FEET\"\n | \"YARDS\"\n | \"MILES\"\n | \"NAUTICAL_MILES\"\n>;\n\nexport type GeoFilter_Within = {\n \"$within\":\n | {\n $distance: [number, keyof typeof DistanceUnitMapping];\n $of: [number, number] | Readonly<Point>;\n $bbox?: never;\n $polygon?: never;\n }\n | {\n $bbox: BBox;\n $distance?: never;\n $of?: never;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n $distance?: never;\n $of?: never;\n }\n | Polygon;\n};\n\nexport type GeoFilter_Intersects = {\n \"$intersects\":\n | {\n $bbox: BBox;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n }\n | Polygon;\n};\n\ntype FilterFor<PD extends ObjectMetadata.Property> = PD[\"multiplicity\"] extends\n true\n ? (PD[\"type\"] extends Record<string, BaseWirePropertyTypes>\n ? ArrayFilter<StructArrayFilterOpts<PD[\"type\"]>>\n : PD[\"type\"] extends PropertyTypesRepresentedAsStringsForArrayWhereClause\n ? ArrayFilter<string>\n : (PD[\"type\"] extends boolean ? ArrayFilter<boolean>\n : ArrayFilter<number>))\n : PD[\"type\"] extends Record<string, BaseWirePropertyTypes> ?\n | StructFilter<PD[\"type\"]>\n | BaseFilter.$isNull<string>\n : (PD[\"type\"] extends \"string\" ? StringFilter\n : PD[\"type\"] extends \"geopoint\" | \"geoshape\" ? GeoFilter\n : PD[\"type\"] extends \"datetime\" | \"timestamp\" ? DatetimeFilter\n : PD[\"type\"] extends \"boolean\" ? BooleanFilter\n : PD[\"type\"] extends WhereClauseNumberPropertyTypes ? NumberFilter\n : BaseFilter<string>); // FIXME we need to represent all types\n\ntype StructArrayFilterOpts<ST extends Record<string, BaseWirePropertyTypes>> = {\n [K in keyof ST]?: FilterFor<{ \"type\": ST[K] }>;\n};\n\ntype StructFilterOpts<ST extends Record<string, BaseWirePropertyTypes>> = {\n [K in keyof ST]?: FilterFor<{ \"type\": ST[K] }>;\n};\ntype StructFilter<ST extends Record<string, BaseWirePropertyTypes>> = {\n [K in keyof ST]: Just<K, StructFilterOpts<ST>>;\n}[keyof ST];\n\ntype PropertyTypesRepresentedAsStringsForArrayWhereClause =\n | \"string\"\n | \"geopoint\"\n | \"geoshape\"\n | \"datetime\"\n | \"timestamp\";\ntype WhereClauseNumberPropertyTypes =\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"decimal\"\n | \"byte\";\n\nexport type AndWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $and: WhereClause<T, RDPs>[];\n};\n\nexport type OrWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $or: WhereClause<T, RDPs>[];\n};\n\nexport type NotWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $not: WhereClause<T, RDPs>;\n};\n\nexport type PropertyWhereClause<T extends ObjectOrInterfaceDefinition> = {\n [P in keyof CompileTimeMetadata<T>[\"properties\"]]?: FilterFor<\n CompileTimeMetadata<T>[\"properties\"][P]\n >;\n};\n\ntype MergedPropertyWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = PropertyWhereClause<\n DerivedObjectOrInterfaceDefinition.WithDerivedProperties<T, RDPs>\n>;\n\nexport type WhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> =\n | OrWhereClause<T, RDPs>\n | AndWhereClause<T, RDPs>\n | NotWhereClause<T, RDPs>\n | (IsNever<keyof CompileTimeMetadata<T>[\"properties\"]> extends true\n ? Record<string, never>\n : MergedPropertyWhereClause<T, RDPs>);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwCA;AACA;AACA,OAAO,MAAMA,mBAqBZ,GAAG;EACF,YAAY,EAAE,aAAa;EAC3B,aAAa,EAAE,aAAa;EAC5B,IAAI,EAAE,aAAa;EACnB,OAAO,EAAE,QAAQ;EACjB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,QAAQ;EACb,WAAW,EAAE,YAAY;EACzB,YAAY,EAAE,YAAY;EAC1B,IAAI,EAAE,YAAY;EAClB,MAAM,EAAE,QAAQ;EAChB,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,MAAM;EACd,MAAM,EAAE,MAAM;EACd,MAAM,EAAE,OAAO;EACf,OAAO,EAAE,OAAO;EAChB,MAAM,EAAE,OAAO;EACf,OAAO,EAAE,OAAO;EAChB,eAAe,EAAE,gBAAgB;EACjC,cAAc,EAAE,gBAAgB;EAChC,gBAAgB,EAAE;AACpB,CAUC;;AAwD0B","ignoreList":[]}
1
+ {"version":3,"file":"WhereClause.js","names":["DistanceUnitMapping"],"sources":["WhereClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { BBox, Point, Polygon } from \"geojson\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { BaseWirePropertyTypes } from \"../ontology/WirePropertyTypes.js\";\nimport type { IsNever } from \"../OsdkObjectFrom.js\";\nimport type { ArrayFilter } from \"./ArrayFilter.js\";\nimport type { BaseFilter } from \"./BaseFilter.js\";\nimport type { BooleanFilter } from \"./BooleanFilter.js\";\nimport type { DatetimeFilter } from \"./DatetimeFilter.js\";\nimport type { GeoFilter } from \"./GeoFilter.js\";\nimport type { Just } from \"./Just.js\";\nimport type { NumberFilter } from \"./NumberFilter.js\";\nimport type { StringFilter } from \"./StringFilter.js\";\n\nexport type PossibleWhereClauseFilters =\n | \"$gt\"\n | \"$eq\"\n | \"$ne\"\n | \"$isNull\"\n | \"$contains\"\n | \"$gte\"\n | \"$lt\"\n | \"$lte\"\n | \"$within\"\n | \"$in\"\n | \"$intersects\"\n | \"$startsWith\"\n | \"$containsAllTermsInOrder\"\n | \"$containsAnyTerm\"\n | \"$containsAllTerms\";\n\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping: {\n centimeter: \"CENTIMETERS\";\n centimeters: \"CENTIMETERS\";\n cm: \"CENTIMETERS\";\n meter: \"METERS\";\n meters: \"METERS\";\n m: \"METERS\";\n kilometer: \"KILOMETERS\";\n kilometers: \"KILOMETERS\";\n km: \"KILOMETERS\";\n inch: \"INCHES\";\n inches: \"INCHES\";\n foot: \"FEET\";\n feet: \"FEET\";\n yard: \"YARDS\";\n yards: \"YARDS\";\n mile: \"MILES\";\n miles: \"MILES\";\n nautical_mile: \"NAUTICAL_MILES\";\n nauticalMile: \"NAUTICAL_MILES\";\n \"nautical miles\": \"NAUTICAL_MILES\";\n} = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\",\n} satisfies Record<\n string,\n | \"CENTIMETERS\"\n | \"METERS\"\n | \"KILOMETERS\"\n | \"INCHES\"\n | \"FEET\"\n | \"YARDS\"\n | \"MILES\"\n | \"NAUTICAL_MILES\"\n>;\n\nexport type GeoFilter_Within = {\n \"$within\":\n | {\n $distance: [number, keyof typeof DistanceUnitMapping];\n $of: [number, number] | Readonly<Point>;\n $bbox?: never;\n $polygon?: never;\n }\n | {\n $bbox: BBox;\n $distance?: never;\n $of?: never;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n $distance?: never;\n $of?: never;\n }\n | Polygon;\n};\n\nexport type GeoFilter_Intersects = {\n \"$intersects\":\n | {\n $bbox: BBox;\n $polygon?: never;\n }\n | BBox\n | {\n $polygon: Polygon[\"coordinates\"];\n $bbox?: never;\n }\n | Polygon;\n};\n\ntype BaseFilterFor<T> = T extends Record<string, BaseWirePropertyTypes>\n ? StructFilterOpts<T>\n : T extends \"string\" ? StringFilter\n : T extends \"geopoint\" | \"geoshape\" ? GeoFilter\n : T extends \"datetime\" | \"timestamp\" ? DatetimeFilter\n : T extends \"boolean\" ? BooleanFilter\n : T extends WhereClauseNumberPropertyTypes ? NumberFilter\n : BaseFilter<string>; // Fallback for unknown types\n\ntype FilterFor<PD extends ObjectMetadata.Property> = PD[\"multiplicity\"] extends\n true ? ArrayFilter<BaseFilterFor<PD[\"type\"]>>\n : PD[\"type\"] extends Record<string, BaseWirePropertyTypes>\n ? StructFilter<PD[\"type\"]> | BaseFilter.$isNull<string>\n : BaseFilterFor<PD[\"type\"]>;\n\ntype StructFilterOpts<ST extends Record<string, BaseWirePropertyTypes>> = {\n [K in keyof ST]?: FilterFor<{ \"type\": ST[K] }>;\n};\ntype StructFilter<ST extends Record<string, BaseWirePropertyTypes>> = {\n [K in keyof ST]: Just<K, StructFilterOpts<ST>>;\n}[keyof ST];\n\ntype WhereClauseNumberPropertyTypes =\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"decimal\"\n | \"byte\";\n\nexport type AndWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $and: WhereClause<T, RDPs>[];\n};\n\nexport type OrWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $or: WhereClause<T, RDPs>[];\n};\n\nexport type NotWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n $not: WhereClause<T, RDPs>;\n};\n\nexport type PropertyWhereClause<T extends ObjectOrInterfaceDefinition> = {\n [P in keyof CompileTimeMetadata<T>[\"properties\"]]?: FilterFor<\n CompileTimeMetadata<T>[\"properties\"][P]\n >;\n};\n\ntype MergedPropertyWhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = PropertyWhereClause<\n DerivedObjectOrInterfaceDefinition.WithDerivedProperties<T, RDPs>\n>;\n\nexport type WhereClause<\n T extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> =\n | OrWhereClause<T, RDPs>\n | AndWhereClause<T, RDPs>\n | NotWhereClause<T, RDPs>\n | (IsNever<keyof CompileTimeMetadata<T>[\"properties\"]> extends true\n ? Record<string, never>\n : MergedPropertyWhereClause<T, RDPs>);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwCA;AACA;AACA,OAAO,MAAMA,mBAqBZ,GAAG;EACF,YAAY,EAAE,aAAa;EAC3B,aAAa,EAAE,aAAa;EAC5B,IAAI,EAAE,aAAa;EACnB,OAAO,EAAE,QAAQ;EACjB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,QAAQ;EACb,WAAW,EAAE,YAAY;EACzB,YAAY,EAAE,YAAY;EAC1B,IAAI,EAAE,YAAY;EAClB,MAAM,EAAE,QAAQ;EAChB,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,MAAM;EACd,MAAM,EAAE,MAAM;EACd,MAAM,EAAE,OAAO;EACf,OAAO,EAAE,OAAO;EAChB,MAAM,EAAE,OAAO;EACf,OAAO,EAAE,OAAO;EAChB,eAAe,EAAE,gBAAgB;EACjC,cAAc,EAAE,gBAAgB;EAChC,gBAAgB,EAAE;AACpB,CAUC;;AA+CuB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"DerivedProperty.js","names":["DerivedProperty"],"sources":["DerivedProperty.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 { ValidAggregationKeys } from \"../aggregate/AggregatableKeys.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type {\n DatetimeExpressions,\n DefinitionForType,\n NumericExpressions,\n} from \"./Expressions.js\";\nimport type {\n CollectWithPropAggregations,\n MinMaxWithPropAggregateOption,\n} from \"./WithPropertiesAggregationOptions.js\";\n\ndeclare const DerivedPropertyDefinitionBrand: unique symbol;\n\nexport namespace DerivedProperty {\n export interface Definition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > {\n readonly [DerivedPropertyDefinitionBrand]: true;\n }\n\n export interface NumericPropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, NumericExpressions<Q, T> {}\n\n export interface DatetimePropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, DatetimeExpressions<Q, T> {}\n\n export type Creator<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n > = (\n baseObjectSet: Builder<Q, false>,\n ) =>\n | Definition<T, Q>\n | NumericPropertyDefinition<T, Q>\n | DatetimePropertyDefinition<T, Q>;\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: Creator<Q, SimplePropertyDef>;\n };\n\n interface BaseBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {\n }\n\n export interface Builder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q>, Constant<Q> {\n }\n\n export interface AggregateBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {\n }\n\n export interface SelectPropertyBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export type ValidParts = \"DAYS\" | \"MONTHS\" | \"QUARTERS\" | \"YEARS\";\n}\n\ntype BuilderTypeFromConstraint<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true>\n : DerivedProperty.SelectPropertyBuilder<Q, false>;\n\ntype Filterable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly where: (\n clause: WhereClause<Q>,\n ) => BuilderTypeFromConstraint<Q, CONSTRAINED>;\n};\n\ntype Pivotable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CONSTRAINED extends true\n ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : NonNullable<CompileTimeMetadata<Q>[\"links\"][L][\"multiplicity\"]> extends\n true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;\n};\n\ntype Constant<Q extends ObjectOrInterfaceDefinition> = {\n readonly constant: {\n readonly double: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"double\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly integer: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"integer\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly long: (\n value: string,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"long\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly datetime: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"datetime\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly timestamp: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"timestamp\", \"non-nullable\", \"single\">,\n Q\n >;\n };\n};\n\ntype Aggregatable<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly aggregate: <\n V extends ValidAggregationKeys<\n Q,\n \"withPropertiesAggregate\"\n >,\n >(\n aggregationSpecifier: V,\n opts?: V extends `${any}:${infer P}`\n ? P extends CollectWithPropAggregations ? { limit: number }\n : P extends \"approximatePercentile\" ? { percentile: number }\n : never\n : never,\n ) => DefinitionForType<\n Q,\n V extends `${infer N}:${infer P}`\n ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"array\"\n >\n : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"single\"\n >\n : P extends \"approximateDistinct\" | \"exactDistinct\"\n ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : SimplePropertyDef.Make<\n \"double\",\n \"nullable\",\n \"single\"\n >\n : V extends \"$count\" ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : never\n >;\n};\n\ntype Selectable<Q extends ObjectOrInterfaceDefinition> = {\n readonly selectProperty: <R extends PropertyKeys<Q>>(\n propertyName: R,\n ) => DefinitionForType<\n Q,\n SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][R][\"type\"],\n CompileTimeMetadata<Q>[\"properties\"][R][\"nullable\"] extends true\n ? \"nullable\"\n : \"non-nullable\",\n CompileTimeMetadata<Q>[\"properties\"][R][\"multiplicity\"] extends true\n ? \"array\"\n : \"single\"\n >\n >;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAqCiBA,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"DerivedProperty.js","names":["DerivedProperty"],"sources":["DerivedProperty.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 { ValidAggregationKeys } from \"../aggregate/AggregatableKeys.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type {\n DatetimeExpressions,\n DefinitionForType,\n NumericExpressions,\n} from \"./Expressions.js\";\nimport type {\n CollectWithPropAggregations,\n MinMaxWithPropAggregateOption,\n} from \"./WithPropertiesAggregationOptions.js\";\n\ndeclare const DerivedPropertyDefinitionBrand: unique symbol;\n\nexport namespace DerivedProperty {\n export interface Definition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > {\n readonly [DerivedPropertyDefinitionBrand]: true;\n }\n\n export interface NumericPropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, NumericExpressions<Q, T> {}\n\n export interface DatetimePropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, DatetimeExpressions<Q, T> {}\n\n export type Creator<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n > = (\n baseObjectSet: Builder<Q, false>,\n ) =>\n | Definition<T, Q>\n | NumericPropertyDefinition<T, Q>\n | DatetimePropertyDefinition<T, Q>;\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: Creator<Q, SimplePropertyDef>;\n };\n\n interface BaseBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {\n }\n\n export interface Builder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export interface AggregateBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {\n }\n\n export interface SelectPropertyBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export type ValidParts = \"DAYS\" | \"MONTHS\" | \"QUARTERS\" | \"YEARS\";\n}\n\ntype BuilderTypeFromConstraint<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true>\n : DerivedProperty.SelectPropertyBuilder<Q, false>;\n\ntype Filterable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly where: (\n clause: WhereClause<Q>,\n ) => BuilderTypeFromConstraint<Q, CONSTRAINED>;\n};\n\ntype Pivotable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CONSTRAINED extends true\n ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : NonNullable<CompileTimeMetadata<Q>[\"links\"][L][\"multiplicity\"]> extends\n true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;\n};\n\ntype Aggregatable<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly aggregate: <\n V extends ValidAggregationKeys<\n Q,\n \"withPropertiesAggregate\"\n >,\n >(\n aggregationSpecifier: V,\n opts?: V extends `${any}:${infer P}`\n ? P extends CollectWithPropAggregations ? { limit: number }\n : P extends \"approximatePercentile\" ? { percentile: number }\n : never\n : never,\n ) => DefinitionForType<\n Q,\n V extends `${infer N}:${infer P}`\n ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"array\"\n >\n : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"single\"\n >\n : P extends \"approximateDistinct\" | \"exactDistinct\"\n ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : SimplePropertyDef.Make<\n \"double\",\n \"nullable\",\n \"single\"\n >\n : V extends \"$count\" ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : never\n >;\n};\n\ntype Selectable<Q extends ObjectOrInterfaceDefinition> = {\n readonly selectProperty: <R extends PropertyKeys<Q>>(\n propertyName: R,\n ) => DefinitionForType<\n Q,\n SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][R][\"type\"],\n CompileTimeMetadata<Q>[\"properties\"][R][\"nullable\"] extends true\n ? \"nullable\"\n : \"non-nullable\",\n CompileTimeMetadata<Q>[\"properties\"][R][\"multiplicity\"] extends true\n ? \"array\"\n : \"single\"\n >\n >;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAqCiBA,eAAe","ignoreList":[]}
@@ -14,7 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export { NULL_VALUE } from "./actions/NullValue.js";
18
17
  export { DistanceUnitMapping } from "./aggregate/WhereClause.js";
19
18
  export { DurationMapping } from "./groupby/GroupByClause.js";
20
19
  export { isOk } from "./object/Result.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["NULL_VALUE","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 { NULL_VALUE } from \"./actions/NullValue.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 AndWhereClause,\n GeoFilter_Intersects,\n GeoFilter_Within,\n NotWhereClause,\n OrWhereClause,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type {\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n} 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 { Logger } from \"./Logger.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 ObjectSetArgs,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type {\n Media,\n MediaMetadata,\n MediaReference,\n MediaUpload,\n} 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 {\n FetchLinksPageResult,\n LinkTypeApiNamesFor,\n MinimalDirectedObjectLinkInstance,\n} from \"./objectSet/ObjectSetLinks.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.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 InterfaceQueryDataType,\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nexport type { PropertyBooleanFormattingRule } from \"./ontology/valueFormatting/PropertyBooleanFormattingRule.js\";\nexport type {\n DatetimeFormat,\n DatetimeLocalizedFormat,\n DatetimeLocalizedFormatType,\n DatetimeStringFormat,\n DatetimeTimezone,\n DatetimeTimezoneStatic,\n DatetimeTimezoneUser,\n PropertyDateFormattingRule,\n PropertyTimestampFormattingRule,\n} from \"./ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.js\";\nexport type {\n KnownType,\n PropertyKnownTypeFormattingRule,\n} from \"./ontology/valueFormatting/PropertyKnownTypeFormattingRule.js\";\nexport type {\n Affix,\n DurationBaseValue,\n DurationFormatStyle,\n DurationPrecision,\n HumanReadableFormat,\n NumberFormatAffix,\n NumberFormatCurrency,\n NumberFormatCurrencyStyle,\n NumberFormatCustomUnit,\n NumberFormatDuration,\n NumberFormatFixedValues,\n NumberFormatNotation,\n NumberFormatOptions,\n NumberFormatRatio,\n NumberFormatScale,\n NumberFormatStandard,\n NumberFormatStandardUnit,\n NumberRatioType,\n NumberRoundingMode,\n NumberScaleType,\n PropertyNumberFormattingRule,\n PropertyNumberFormattingRuleType,\n TimeCodeFormat,\n} from \"./ontology/valueFormatting/PropertyNumberFormattingRule.js\";\nexport type { PropertyValueFormattingRule } from \"./ontology/valueFormatting/PropertyValueFormattingRule.js\";\nexport type {\n PropertyTypeReference,\n PropertyTypeReferenceOrStringConstant,\n StringConstant,\n} from \"./ontology/valueFormatting/PropertyValueFormattingUtils.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type {\n ObjectIdentifiers,\n OsdkBase,\n PrimaryKeyType,\n} from \"./OsdkBase.js\";\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, MaybeScore, 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;;AAUA,SAASA,UAAU,QAAQ,wBAAwB;AASnD,SAASC,mBAAmB,QAAQ,4BAA4B;AAmBhE,SAASC,eAAe,QAAQ,4BAA4B;AAqC5D,SAASC,IAAI,QAAQ,oBAAoB;;AAoGzC;;AAUA,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 AndWhereClause,\n GeoFilter_Intersects,\n GeoFilter_Within,\n NotWhereClause,\n OrWhereClause,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type {\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n} 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 { Logger } from \"./Logger.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 ObjectSetArgs,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type {\n Media,\n MediaMetadata,\n MediaReference,\n MediaUpload,\n} 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 {\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 InterfaceQueryDataType,\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nexport type { PropertyBooleanFormattingRule } from \"./ontology/valueFormatting/PropertyBooleanFormattingRule.js\";\nexport type {\n DatetimeFormat,\n DatetimeLocalizedFormat,\n DatetimeLocalizedFormatType,\n DatetimeStringFormat,\n DatetimeTimezone,\n DatetimeTimezoneStatic,\n DatetimeTimezoneUser,\n PropertyDateFormattingRule,\n PropertyTimestampFormattingRule,\n} from \"./ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.js\";\nexport type {\n KnownType,\n PropertyKnownTypeFormattingRule,\n} from \"./ontology/valueFormatting/PropertyKnownTypeFormattingRule.js\";\nexport type {\n Affix,\n DurationBaseValue,\n DurationFormatStyle,\n DurationPrecision,\n HumanReadableFormat,\n NumberFormatAffix,\n NumberFormatCurrency,\n NumberFormatCurrencyStyle,\n NumberFormatCustomUnit,\n NumberFormatDuration,\n NumberFormatFixedValues,\n NumberFormatNotation,\n NumberFormatOptions,\n NumberFormatRatio,\n NumberFormatScale,\n NumberFormatStandard,\n NumberFormatStandardUnit,\n NumberRatioType,\n NumberRoundingMode,\n NumberScaleType,\n PropertyNumberFormattingRule,\n PropertyNumberFormattingRuleType,\n TimeCodeFormat,\n} from \"./ontology/valueFormatting/PropertyNumberFormattingRule.js\";\nexport type { PropertyValueFormattingRule } from \"./ontology/valueFormatting/PropertyValueFormattingRule.js\";\nexport type {\n PropertyTypeReference,\n PropertyTypeReferenceOrStringConstant,\n StringConstant,\n} from \"./ontology/valueFormatting/PropertyValueFormattingUtils.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type {\n ObjectIdentifiers,\n OsdkBase,\n PrimaryKeyType,\n} from \"./OsdkBase.js\";\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, MaybeScore, 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;AAmBhE,SAASC,eAAe,QAAQ,4BAA4B;AAqC5D,SAASC,IAAI,QAAQ,oBAAoB;;AA+FzC;;AAUA,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","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 ObjectSetArgs,\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 {\n ExtractAllPropertiesOption,\n ExtractOptions,\n ExtractRidOption,\n MaybeScore,\n Osdk,\n} 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 {\n LinkTypeApiNamesFor,\n MinimalDirectedObjectLinkInstance,\n} from \"./ObjectSetLinks.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef> = {},\n> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends\n | BaseObjectSet<any>\n | Record<string, SimplePropertyDef>,\n> = [D] extends [never] ? {}\n : D extends BaseObjectSet<any> ? {}\n : D extends Record<string, SimplePropertyDef> ? D\n : {};\n\ntype MaybeSimplifyPropertyKeys<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n> = PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;\n\ntype SubSelectKeysHelper<\n Q extends ObjectOrInterfaceDefinition,\n L extends string,\n> = [L] extends [never] ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L ? PropertyKeys<Q>\n : L & PropertyKeys<Q>;\n\ntype SubSelectKeys<\n Q extends ObjectOrInterfaceDefinition,\n X extends SelectArg<Q, PropertyKeys<Q>, any, any> = never,\n> = SubSelectKeysHelper<Q, Extract$Select<X>>;\n\ntype NOOP<T> = T extends (...args: any[]) => any ? T\n : T extends abstract new(...args: any[]) => any ? T\n : { [K in keyof T]: T[K] };\n\ntype SubSelectRDPsHelper<\n X extends ValidFetchPageArgs<any, any, any> | ValidAsyncIterArgs<any, any>,\n DEFAULT extends string,\n> = [X] extends [never] ? DEFAULT\n : (X[\"$select\"] & string[])[number] & DEFAULT;\n\ntype SubSelectRDPs<\n RDPs extends Record<string, SimplePropertyDef>,\n X extends ValidFetchPageArgs<any, RDPs, any> | ValidAsyncIterArgs<any, RDPs>,\n> = [RDPs] extends [never] ? never\n : NOOP<{ [K in SubSelectRDPsHelper<X, string & keyof RDPs>]: RDPs[K] }>;\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs, ORDER_BY_OPTIONS>,\n Where<Q, RDPs>,\n AsyncIterLinks<Q>\n{\n}\n\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never] ? never\n :\n | ExtractRidOption<X[\"$includeRid\"] extends true ? true : false>\n | ExtractAllPropertiesOption<\n X[\"$includeAllBaseObjectProperties\"] extends true ? true : false\n >;\n\ntype Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<\n X[\"$select\"]\n>[number];\n\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly fetchPage: FetchPageSignature<Q, RDPs>;\n readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;\n}\n\ntype ValidFetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>>,\n> = ObjectSetArgs.FetchPage<\n Q,\n PropertyKeys<Q>,\n boolean,\n string & keyof RDPs,\n ORDER_BY_OPTIONS\n>;\n\ntype ValidAsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> =\n | ObjectSetArgs.AsyncIter<\n Q,\n PropertyKeys<Q>,\n false,\n string & keyof RDPs\n >\n | AsyncIterArgs<\n Q,\n never,\n any,\n any,\n any,\n true,\n string & keyof RDPs\n >;\n\ninterface FetchPageSignature<\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 <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): Promise<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >;\n}\n\ninterface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Finds the nearest neighbors for a given text or vector within the object set.\n *\n * @param query - Queries support either a vector matching the embedding model defined on the property, or text that is\n automatically embedded.\n * @param numNeighbors - The number of objects to return. If the number of documents in the objectType is less than the provided\n value, all objects will be returned. This value is limited to 1 &le; numNeighbors &ge; 500.\n * @param property - The property key with a defined embedding model to search over.\n *\n * @returns An object set containing the `numNeighbors` nearest neighbors. To return the objects ordered by relevance and each\n * objects associated score, specify \"relevance\" in the orderBy.\n */\n\n readonly nearestNeighbors: (\n query: string | number[],\n numNeighbors: number,\n property: PropertyKeys.Filtered<Q, \"vector\">,\n ) => this;\n}\n\ninterface FetchPageWithErrorsSignature<\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\n if(isOk(myObjs)){\n const myObjsResult = myObjs.value.data;\n }\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\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 AsyncIterSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\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 <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\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 <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n >(\n args?: AsyncIterArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): AsyncIterableIterator<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;\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.Creator<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\n | BaseObjectSet<Q>\n | Record<string, SimplePropertyDef> = never,\n> extends\n ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<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 ) => ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOneSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof 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 NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >;\n}\n\ninterface FetchOneWithErrorsSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof 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 Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >\n >;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;\n fetchOneWithErrors: Q extends ObjectTypeDefinition\n ? FetchOneWithErrorsSignature<Q, RDPs>\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 NarrowToType<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Casts the object set to the specified object type or interface type.\n * Any downstream object set operations (e.g. where, fetchPage, aggregate) will be\n * performed on the specified type. Objects from the original object set that do not\n * implement the specified interface or match the specified object set will be filtered out.\n * @param type - The object type you want to cast to.\n * @returns an object set of the specified type.\n */\n readonly narrowToType: <\n CONVERT_TO extends RestrictToImplementingObjectTypes<Q>,\n >(\n type: CONVERT_TO,\n ) => ObjectSet<CONVERT_TO>;\n}\n\ntype RestrictToImplementingObjectTypes<T extends ObjectOrInterfaceDefinition> =\n T extends ObjectTypeDefinition ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string ? InterfaceDefinition & { apiName: API_NAME }\n : never\n : never;\n\ntype ExtractImplementingTypes<T extends InterfaceDefinition> =\n CompileTimeMetadata<T> extends\n { implementedBy: ReadonlyArray<infer API_NAME extends string> }\n ? (ObjectTypeDefinition & { apiName: API_NAME }) | InterfaceDefinition\n : InterfaceDefinition;\n\ninterface AsyncIterLinks<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Batch load links on an object set. This is an experimental method that may change while in beta.\n * Use this method in conjunction with `.asyncIter()` and `.pivotTo(...).asyncIter()` to build an\n * object graph in memory.\n *\n * Please keep these limitations in mind:\n * - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore.\n * - The backend API fetches pages of *n* objects at a time. If, for any page of *n* objects, there are more\n * than 100,000 links present, results are limited to 100,000 links and should be considered partial.\n * - This method does not support OSv1 links and will throw an exception if links provided are backed by OSv1.\n * - This method currently does not support interface links, but support will be added in the near future.\n */\n readonly experimental_asyncIterLinks: <\n LINK_TYPE_API_NAME extends LinkTypeApiNamesFor<Q>,\n >(\n links: LINK_TYPE_API_NAME[],\n ) => AsyncIterableIterator<\n MinimalDirectedObjectLinkInstance<Q, LINK_TYPE_API_NAME>\n >;\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition & Q,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> extends\n MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<Q>,\n FetchOne<Q, D>,\n Subscribe<MERGED>,\n NearestNeighbors<Q>,\n NarrowToType<Q>\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 ObjectSetArgs,\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 {\n ExtractAllPropertiesOption,\n ExtractOptions,\n ExtractRidOption,\n MaybeScore,\n Osdk,\n} 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 {\n LinkTypeApiNamesFor,\n MinimalDirectedObjectLinkInstance,\n} from \"./ObjectSetLinks.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef> = {},\n> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends\n | BaseObjectSet<any>\n | Record<string, SimplePropertyDef>,\n> = [D] extends [never] ? {}\n : D extends BaseObjectSet<any> ? {}\n : D extends Record<string, SimplePropertyDef> ? D\n : {};\n\ntype MaybeSimplifyPropertyKeys<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n> = PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;\n\ntype SubSelectKeysHelper<\n Q extends ObjectOrInterfaceDefinition,\n L extends string,\n> = [L] extends [never] ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L ? PropertyKeys<Q>\n : L & PropertyKeys<Q>;\n\ntype SubSelectKeys<\n Q extends ObjectOrInterfaceDefinition,\n X extends SelectArg<Q, PropertyKeys<Q>, any, any> = never,\n> = SubSelectKeysHelper<Q, Extract$Select<X>>;\n\ntype NOOP<T> = T extends (...args: any[]) => any ? T\n : T extends abstract new(...args: any[]) => any ? T\n : { [K in keyof T]: T[K] };\n\ntype SubSelectRDPsHelper<\n X extends ValidFetchPageArgs<any, any, any> | ValidAsyncIterArgs<any, any>,\n DEFAULT extends string,\n> = [X] extends [never] ? DEFAULT\n : (X[\"$select\"] & string[])[number] & DEFAULT;\n\ntype SubSelectRDPs<\n RDPs extends Record<string, SimplePropertyDef>,\n X extends ValidFetchPageArgs<any, RDPs, any> | ValidAsyncIterArgs<any, RDPs>,\n> = [RDPs] extends [never] ? never\n : NOOP<{ [K in SubSelectRDPsHelper<X, string & keyof RDPs>]: RDPs[K] }>;\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs, ORDER_BY_OPTIONS>,\n Where<Q, RDPs>,\n AsyncIterLinks<Q>\n{\n}\n\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never] ? never\n :\n | ExtractRidOption<X[\"$includeRid\"] extends true ? true : false>\n | ExtractAllPropertiesOption<\n X[\"$includeAllBaseObjectProperties\"] extends true ? true : false\n >;\n\ntype Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<\n X[\"$select\"]\n>[number];\n\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly fetchPage: FetchPageSignature<Q, RDPs>;\n readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;\n}\n\ntype ValidFetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>>,\n> = ObjectSetArgs.FetchPage<\n Q,\n PropertyKeys<Q>,\n boolean,\n string & keyof RDPs,\n ORDER_BY_OPTIONS\n>;\n\ntype ValidAsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> =\n | ObjectSetArgs.AsyncIter<\n Q,\n PropertyKeys<Q>,\n false,\n string & keyof RDPs\n >\n | AsyncIterArgs<\n Q,\n never,\n any,\n any,\n any,\n true,\n string & keyof RDPs\n >;\n\ninterface FetchPageSignature<\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 <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): Promise<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >;\n}\n\ninterface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Finds the nearest neighbors for a given text or vector within the object set.\n *\n * @param query - Queries support either a vector matching the embedding model defined on the property, or text that is\n automatically embedded.\n * @param numNeighbors - The number of objects to return. If the number of documents in the objectType is less than the provided\n value, all objects will be returned. This value is limited to 1 &le; numNeighbors &ge; 500.\n * @param property - The property key with a defined embedding model to search over.\n *\n * @returns An object set containing the `numNeighbors` nearest neighbors. To return the objects ordered by relevance and each\n * objects associated score, specify \"relevance\" in the orderBy.\n */\n\n readonly nearestNeighbors: (\n query: string | number[],\n numNeighbors: number,\n property: PropertyKeys.Filtered<Q, \"vector\">,\n ) => this;\n}\n\ninterface FetchPageWithErrorsSignature<\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\n if(isOk(myObjs)){\n const myObjsResult = myObjs.value.data;\n }\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\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 AsyncIterSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\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 <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\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 <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n >(\n args?: AsyncIterArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): AsyncIterableIterator<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;\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.Creator<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\n | BaseObjectSet<Q>\n | Record<string, SimplePropertyDef> = never,\n> extends\n ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<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 ) => ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOneSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof 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 NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >;\n}\n\ninterface FetchOneWithErrorsSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof 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 Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >\n >;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;\n fetchOneWithErrors: Q extends ObjectTypeDefinition\n ? FetchOneWithErrorsSignature<Q, RDPs>\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 const R extends boolean = false,\n >(\n listener: ObjectSetSubscription.Listener<Q, P, R>,\n opts?: ObjectSetSubscription.Options<Q, P, R>,\n ) => { unsubscribe: () => void };\n}\n\ninterface NarrowToType<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Casts the object set to the specified object type or interface type.\n * Any downstream object set operations (e.g. where, fetchPage, aggregate) will be\n * performed on the specified type. Objects from the original object set that do not\n * implement the specified interface or match the specified object set will be filtered out.\n * @param type - The object type you want to cast to.\n * @returns an object set of the specified type.\n */\n readonly narrowToType: <\n CONVERT_TO extends RestrictToImplementingObjectTypes<Q>,\n >(\n type: CONVERT_TO,\n ) => ObjectSet<CONVERT_TO>;\n}\n\ntype RestrictToImplementingObjectTypes<T extends ObjectOrInterfaceDefinition> =\n T extends ObjectTypeDefinition ? ExtractImplementedInterfaces<T>\n : T extends InterfaceDefinition ? ExtractImplementingTypes<T>\n : never;\n\ntype ExtractImplementedInterfaces<T extends ObjectTypeDefinition> =\n CompileTimeMetadata<T> extends { implements: ReadonlyArray<infer API_NAME> }\n ? API_NAME extends string ? InterfaceDefinition & { apiName: API_NAME }\n : never\n : never;\n\ntype ExtractImplementingTypes<T extends InterfaceDefinition> =\n CompileTimeMetadata<T> extends\n { implementedBy: ReadonlyArray<infer API_NAME extends string> }\n ? (ObjectTypeDefinition & { apiName: API_NAME }) | InterfaceDefinition\n : InterfaceDefinition;\n\ninterface AsyncIterLinks<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Batch load links on an object set. This is an experimental method that may change while in beta.\n * Use this method in conjunction with `.asyncIter()` and `.pivotTo(...).asyncIter()` to build an\n * object graph in memory.\n *\n * Please keep these limitations in mind:\n * - Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore.\n * - The backend API fetches pages of *n* objects at a time. If, for any page of *n* objects, there are more\n * than 100,000 links present, results are limited to 100,000 links and should be considered partial.\n * - This method does not support OSv1 links and will throw an exception if links provided are backed by OSv1.\n * - This method currently does not support interface links, but support will be added in the near future.\n */\n readonly experimental_asyncIterLinks: <\n LINK_TYPE_API_NAME extends LinkTypeApiNamesFor<Q>,\n >(\n links: LINK_TYPE_API_NAME[],\n ) => AsyncIterableIterator<\n MinimalDirectedObjectLinkInstance<Q, LINK_TYPE_API_NAME>\n >;\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition & Q,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> extends\n MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<Q>,\n FetchOne<Q, D>,\n Subscribe<MERGED>,\n NearestNeighbors<Q>,\n NarrowToType<Q>\n{\n}\n"],"mappings":"","ignoreList":[]}
@@ -503,17 +503,6 @@ describe("ObjectSet", () => {
503
503
  }
504
504
  });
505
505
  });
506
- it("allows adding literals via base.constant", () => {
507
- fauxObjectSet.withProperties({
508
- "myProp1": base => {
509
- const plus = base.pivotTo("lead").selectProperty("employeeId").add(base.constant.double(1));
510
- expectTypeOf(plus).toEqualTypeOf();
511
- const intPlusIntReturnsInt = base.pivotTo("lead").selectProperty("employeeId").add(base.constant.integer(1));
512
- expectTypeOf(intPlusIntReturnsInt).toEqualTypeOf();
513
- return plus;
514
- }
515
- });
516
- });
517
506
  it("allows correctly typed nested property definitions", () => {
518
507
  fauxObjectSet.withProperties({
519
508
  "myProp1": base => {
@@ -559,17 +548,6 @@ describe("ObjectSet", () => {
559
548
  }
560
549
  });
561
550
  });
562
- it("allows adding literals via base.constant", () => {
563
- fauxObjectSet.withProperties({
564
- "myProp1": base => {
565
- const dateAndDateReturnDate = base.pivotTo("lead").selectProperty("dateOfJoining").min(base.constant.datetime("2025-01-01T00:00:00Z"));
566
- expectTypeOf(dateAndDateReturnDate).toEqualTypeOf();
567
- const dateAndTimeReturnTime = base.pivotTo("lead").selectProperty("dateOfJoining").min(base.constant.timestamp("2025-01-01T00:00:00Z"));
568
- expectTypeOf(dateAndTimeReturnTime).toEqualTypeOf();
569
- return dateAndTimeReturnTime;
570
- }
571
- });
572
- });
573
551
  it("allows correctly typed nested property definitions", () => {
574
552
  fauxObjectSet.withProperties({
575
553
  "myProp1": base => {