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

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 (72) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/build/browser/OsdkBase.js.map +1 -1
  3. package/build/browser/actions/ActionResults.js.map +1 -1
  4. package/build/browser/actions/Actions.js.map +1 -1
  5. package/build/browser/experimental/fetchPageByRid.js +22 -0
  6. package/build/browser/experimental/fetchPageByRid.js.map +1 -0
  7. package/build/browser/index.js.map +1 -1
  8. package/build/browser/objectSet/ObjectSet.test.js +0 -4
  9. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  10. package/build/browser/ontology/ObjectSpecifier.js +2 -0
  11. package/build/browser/ontology/ObjectSpecifier.js.map +1 -0
  12. package/build/browser/ontology/ObjectSpecifier.test.js +53 -0
  13. package/build/browser/ontology/ObjectSpecifier.test.js.map +1 -0
  14. package/build/browser/ontology/ObjectTypeDefinition.js.map +1 -1
  15. package/build/browser/ontology/QueryDefinition.js.map +1 -1
  16. package/build/browser/public/unstable.js +1 -0
  17. package/build/browser/public/unstable.js.map +1 -1
  18. package/build/browser/test/EmployeeApiTest.js +21 -0
  19. package/build/browser/test/EmployeeApiTest.js.map +1 -0
  20. package/build/browser/test/FooInterfaceApiTest.js +22 -0
  21. package/build/browser/test/FooInterfaceApiTest.js.map +1 -0
  22. package/build/cjs/{FilteredPropertyKeys-CL4GoFyy.d.cts → FilteredPropertyKeys-D4ZQUqjG.d.cts} +7 -2
  23. package/build/cjs/index.cjs.map +1 -1
  24. package/build/cjs/index.d.cts +13 -5
  25. package/build/cjs/public/unstable.cjs +8 -0
  26. package/build/cjs/public/unstable.cjs.map +1 -1
  27. package/build/cjs/public/unstable.d.cts +8 -3
  28. package/build/esm/OsdkBase.js.map +1 -1
  29. package/build/esm/actions/ActionResults.js.map +1 -1
  30. package/build/esm/actions/Actions.js.map +1 -1
  31. package/build/esm/experimental/fetchPageByRid.js +22 -0
  32. package/build/esm/experimental/fetchPageByRid.js.map +1 -0
  33. package/build/esm/index.js.map +1 -1
  34. package/build/esm/objectSet/ObjectSet.test.js +0 -4
  35. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  36. package/build/esm/ontology/ObjectSpecifier.js +2 -0
  37. package/build/esm/ontology/ObjectSpecifier.js.map +1 -0
  38. package/build/esm/ontology/ObjectSpecifier.test.js +53 -0
  39. package/build/esm/ontology/ObjectSpecifier.test.js.map +1 -0
  40. package/build/esm/ontology/ObjectTypeDefinition.js.map +1 -1
  41. package/build/esm/ontology/QueryDefinition.js.map +1 -1
  42. package/build/esm/public/unstable.js +1 -0
  43. package/build/esm/public/unstable.js.map +1 -1
  44. package/build/esm/test/EmployeeApiTest.js +21 -0
  45. package/build/esm/test/EmployeeApiTest.js.map +1 -0
  46. package/build/esm/test/FooInterfaceApiTest.js +22 -0
  47. package/build/esm/test/FooInterfaceApiTest.js.map +1 -0
  48. package/build/types/OsdkBase.d.ts +2 -0
  49. package/build/types/OsdkBase.d.ts.map +1 -1
  50. package/build/types/actions/ActionResults.d.ts +4 -0
  51. package/build/types/actions/ActionResults.d.ts.map +1 -1
  52. package/build/types/actions/Actions.d.ts +1 -1
  53. package/build/types/actions/Actions.d.ts.map +1 -1
  54. package/build/types/experimental/fetchPageByRid.d.ts +14 -0
  55. package/build/types/experimental/fetchPageByRid.d.ts.map +1 -0
  56. package/build/types/index.d.ts +2 -0
  57. package/build/types/index.d.ts.map +1 -1
  58. package/build/types/ontology/ObjectSpecifier.d.ts +5 -0
  59. package/build/types/ontology/ObjectSpecifier.d.ts.map +1 -0
  60. package/build/types/ontology/ObjectSpecifier.test.d.ts +1 -0
  61. package/build/types/ontology/ObjectSpecifier.test.d.ts.map +1 -0
  62. package/build/types/ontology/ObjectTypeDefinition.d.ts +1 -1
  63. package/build/types/ontology/ObjectTypeDefinition.d.ts.map +1 -1
  64. package/build/types/ontology/QueryDefinition.d.ts +5 -1
  65. package/build/types/ontology/QueryDefinition.d.ts.map +1 -1
  66. package/build/types/public/unstable.d.ts +1 -0
  67. package/build/types/public/unstable.d.ts.map +1 -1
  68. package/build/types/test/EmployeeApiTest.d.ts +62 -0
  69. package/build/types/test/EmployeeApiTest.d.ts.map +1 -0
  70. package/build/types/test/FooInterfaceApiTest.d.ts +50 -0
  71. package/build/types/test/FooInterfaceApiTest.d.ts.map +1 -0
  72. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { A as Attachment, M as MediaReference, a as AttachmentUpload, O as ObjectTypeDefinition, b as OsdkBase, c as OsdkObjectPrimaryKeyType, d as ObjectSet, I as InterfaceDefinition, R as ReleaseStatus, e as OsdkMetadata, P as PropertyValueWireToClient, f as PrimaryKeyTypes } from './FilteredPropertyKeys-CL4GoFyy.cjs';
2
- export { g as AggregateOpts, h as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, k as AggregationClause, i as AggregationResultsWithGroups, j as AggregationResultsWithoutGroups, l as AggregationsResults, t as AllGroupByValues, w as AsyncIterArgs, x as Augment, y as Augments, Q as BaseObjectSet, a2 as BaseWirePropertyTypes, _ as CompileTimeMetadata, a5 as ConvertProps, r as DerivedProperty, D as DistanceUnitMapping, s as DurationMapping, F as FetchPageArgs, C as FetchPageResult, U as FilteredPropertyKeys, G as GeoFilterOptions, m as GeoFilter_Intersects, n as GeoFilter_Within, a9 as GeotimeSeriesProperty, u as GroupByClause, v as GroupByRange, X as InterfaceMetadata, ae as LinkNames, ad as LinkedType, H as Media, J as MediaMetadata, N as NullabilityAdherence, $ as ObjectMetadata, Y as ObjectOrInterfaceDefinition, T as ObjectSetSubscription, a6 as Osdk, q as OsdkObjectLinksObject, p as OsdkObjectPropertyType, a7 as PageResult, o as PossibleWhereClauseFilters, a4 as PrimaryKeyType, a0 as PropertyDef, Z as PropertyKeys, L as Result, z as SelectArg, B as SelectArgToKeys, S as SingleLinkAccessor, E as SingleOsdkResult, aa as TimeSeriesPoint, ab as TimeSeriesProperty, ac as TimeSeriesQuery, a8 as TimeseriesDurationMapping, V as ValidAggregationKeys, a1 as VersionBound, W as WhereClause, a3 as WirePropertyTypes, K as isOk } from './FilteredPropertyKeys-CL4GoFyy.cjs';
1
+ import { A as Attachment, M as MediaReference, a as AttachmentUpload, O as ObjectTypeDefinition, b as OsdkBase, c as OsdkObjectPrimaryKeyType, d as ObjectSet, I as InterfaceDefinition, R as ReleaseStatus, e as OsdkMetadata, P as PropertyValueWireToClient, f as PrimaryKeyTypes } from './FilteredPropertyKeys-D4ZQUqjG.cjs';
2
+ export { g as AggregateOpts, h as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, k as AggregationClause, i as AggregationResultsWithGroups, j as AggregationResultsWithoutGroups, l as AggregationsResults, t as AllGroupByValues, w as AsyncIterArgs, x as Augment, y as Augments, Q as BaseObjectSet, a3 as BaseWirePropertyTypes, $ as CompileTimeMetadata, a6 as ConvertProps, r as DerivedProperty, D as DistanceUnitMapping, s as DurationMapping, F as FetchPageArgs, C as FetchPageResult, U as FilteredPropertyKeys, G as GeoFilterOptions, m as GeoFilter_Intersects, n as GeoFilter_Within, aa as GeotimeSeriesProperty, u as GroupByClause, v as GroupByRange, X as InterfaceMetadata, af as LinkNames, ae as LinkedType, H as Media, J as MediaMetadata, N as NullabilityAdherence, a0 as ObjectMetadata, Y as ObjectOrInterfaceDefinition, T as ObjectSetSubscription, _ as ObjectSpecifier, a7 as Osdk, q as OsdkObjectLinksObject, p as OsdkObjectPropertyType, a8 as PageResult, o as PossibleWhereClauseFilters, a5 as PrimaryKeyType, a1 as PropertyDef, Z as PropertyKeys, L as Result, z as SelectArg, B as SelectArgToKeys, S as SingleLinkAccessor, E as SingleOsdkResult, ab as TimeSeriesPoint, ac as TimeSeriesProperty, ad as TimeSeriesQuery, a9 as TimeseriesDurationMapping, V as ValidAggregationKeys, a2 as VersionBound, W as WhereClause, a4 as WirePropertyTypes, K as isOk } from './FilteredPropertyKeys-D4ZQUqjG.cjs';
3
3
  import 'type-fest';
4
4
  import 'geojson';
5
5
 
@@ -88,7 +88,9 @@ interface ObjectEdits {
88
88
  type: "edits";
89
89
  addedObjects: Array<ObjectReference>;
90
90
  modifiedObjects: Array<ObjectReference>;
91
+ deletedObjects?: Array<ObjectReference>;
91
92
  addedLinks: Array<LinkReference>;
93
+ deletedLinks?: Array<LinkReference>;
92
94
  deletedObjectsCount: number;
93
95
  deletedLinksCount: number;
94
96
  }
@@ -96,7 +98,9 @@ interface LargeScaleObjectEdits {
96
98
  type: "largeScaleEdits";
97
99
  addedObjects?: never;
98
100
  modifiedObjects?: never;
101
+ deletedObjects?: never;
99
102
  addedLinks?: never;
103
+ deletedLinks?: never;
100
104
  deletedObjectsCount?: never;
101
105
  deletedLinksCount?: never;
102
106
  }
@@ -193,7 +197,7 @@ declare namespace ActionParam {
193
197
  type InterfaceType<T extends InterfaceDefinition> = {
194
198
  $objectType: NonNullable<T["__DefinitionMetadata"]> extends {
195
199
  implementedBy: infer U;
196
- } ? (U extends ReadonlyArray<string> ? U[number] : string) : string;
200
+ } ? (U extends ReadonlyArray<never> ? string : U extends ReadonlyArray<string> ? U[number] : string) : string;
197
201
  $primaryKey: string | number;
198
202
  };
199
203
  type StructType<T extends Record<string, keyof DataValueClientToWire>> = {
@@ -291,7 +295,7 @@ interface QueryDefinition<T = any> {
291
295
  type QueryParameterDefinition<T_Target extends ObjectTypeDefinition = any> = {
292
296
  description?: string;
293
297
  } & QueryDataTypeDefinition<T_Target>;
294
- type QueryDataTypeDefinition<T_Target extends ObjectTypeDefinition = any> = PrimitiveDataType | ObjectQueryDataType<T_Target> | ObjectSetQueryDataType<T_Target> | SetQueryDataType | UnionQueryDataType | StructQueryDataType | TwoDimensionalAggregationDataType | ThreeDimensionalAggregationDataType;
298
+ type QueryDataTypeDefinition<T_Target extends ObjectTypeDefinition = any> = PrimitiveDataType | ObjectQueryDataType<T_Target> | ObjectSetQueryDataType<T_Target> | SetQueryDataType | UnionQueryDataType | StructQueryDataType | TwoDimensionalAggregationDataType | ThreeDimensionalAggregationDataType | MapDataType;
295
299
  type BaseQueryDataTypeDefinition<T extends string> = {
296
300
  multiplicity?: boolean;
297
301
  nullable?: boolean;
@@ -322,6 +326,10 @@ interface TwoDimensionalAggregationDataType extends BaseQueryDataTypeDefinition<
322
326
  interface ThreeDimensionalAggregationDataType extends BaseQueryDataTypeDefinition<"threeDimensionalAggregation"> {
323
327
  threeDimensionalAggregation: ThreeDimensionalQueryAggregationDefinition;
324
328
  }
329
+ interface MapDataType extends BaseQueryDataTypeDefinition<"map"> {
330
+ keyType: QueryDataTypeDefinition;
331
+ valueType: QueryDataTypeDefinition;
332
+ }
325
333
  type AggregationKeyDataType<V = any> = SimpleAggregationKeyDataType<V> | RangeAggregationKeyDataType<V>;
326
334
  interface SimpleAggregationKeyDataType<V = any> {
327
335
  keyType: Exclude<AggregationKeyTypes, "range">;
@@ -413,4 +421,4 @@ declare namespace QueryResult {
413
421
  type ThreeDimensionalAggregationType<OUT extends AggregationKeyTypes | RangeKey<any>, IN extends AggregationKeyTypes | RangeKey<any>, V extends AggregationValueTypes> = ThreeDimensionalAggregation<OUT extends AggregationKeyTypes ? AggKeyWireToClient<OUT> : OUT, IN extends AggregationKeyTypes ? AggKeyWireToClient<IN> : IN, AggValueWireToClient<V>>;
414
422
  }
415
423
 
416
- export { type ActionDefinition, type ActionEditResponse, ActionMetadata, ActionParam, type ActionReturnTypeForOptions, type ActionValidationResponse, type AllowedBucketKeyTypes$1 as AllowedBucketKeyTypes, type AllowedBucketTypes$1 as AllowedBucketTypes, type ApplyActionOptions, type ApplyBatchActionOptions, Attachment, AttachmentUpload, type DataValueClientToWire, type DataValueWireToClient, InterfaceDefinition, MediaReference, type ObjectQueryDataType, type ObjectSet, type ObjectSetQueryDataType, ObjectTypeDefinition, type OntologyMetadata, OsdkBase, type OsdkObject, PrimaryKeyTypes, PropertyValueWireToClient, type QueryDataTypeDefinition, type QueryDefinition, type QueryMetadata, QueryParam, type QueryParameterDefinition, QueryResult, type ThreeDimensionalQueryAggregationDefinition, type TwoDimensionalQueryAggregationDefinition };
424
+ export { type ActionDefinition, type ActionEditResponse, ActionMetadata, ActionParam, type ActionReturnTypeForOptions, type ActionValidationResponse, type AllowedBucketKeyTypes$1 as AllowedBucketKeyTypes, type AllowedBucketTypes$1 as AllowedBucketTypes, type ApplyActionOptions, type ApplyBatchActionOptions, Attachment, AttachmentUpload, type DataValueClientToWire, type DataValueWireToClient, InterfaceDefinition, MediaReference, type ObjectQueryDataType, type ObjectSet, type ObjectSetQueryDataType, ObjectTypeDefinition, type OntologyMetadata, OsdkBase, type OsdkObject, PrimaryKeyTypes, PropertyValueWireToClient, type QueryDataTypeDefinition, type QueryDefinition, type QueryMetadata, QueryParam, type QueryParameterDefinition, QueryResult, type Range, type ThreeDimensionalAggregation, type ThreeDimensionalQueryAggregationDefinition, type TwoDimensionalAggregation, type TwoDimensionalQueryAggregationDefinition };
@@ -14,6 +14,13 @@ var __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid = {
14
14
  version: "2.1.0"
15
15
  };
16
16
 
17
+ // src/experimental/fetchPageByRid.ts
18
+ var __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = {
19
+ name: "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid",
20
+ type: "experiment",
21
+ version: "2.2.0"
22
+ };
23
+
17
24
  // src/experimental/getBulkLinks.ts
18
25
  var __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = {
19
26
  name: "__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks",
@@ -23,6 +30,7 @@ var __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = {
23
30
 
24
31
  exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference = __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference;
25
32
  exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid = __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid;
33
+ exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid;
26
34
  exports.__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks;
27
35
  //# sourceMappingURL=unstable.cjs.map
28
36
  //# sourceMappingURL=unstable.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/experimental/createMediaReference.ts","../../../src/experimental/fetchOneByRid.ts","../../../src/experimental/getBulkLinks.ts"],"names":[],"mappings":";;;AA6BO,IAAM,uDAA0D,GAAA;AAAA,EACrE,IAAM,EAAA,yDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA,OAAA;AACX,EAAA;;;ACjBO,IAAM,gDAAmD,GAAA;AAAA,EAC9D,IAAM,EAAA,kDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA,OAAA;AACX,EAAA;;;ACJO,IAAM,+CAAkD,GAAA;AAAA,EAC7D,IAAM,EAAA,iDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA,OAAA;AACX","file":"unstable.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @experimental This feature is experimental and might change in the future.\n *\n * Uploads a media item to the media property of the specified object type.\n *\n * @param data - Data to upload as media item\n * @param fileName - Name that will be assigned as path to the uploaded media item.\n * @param objectType - Object type to which the media item will be uploaded.\n * @param propertyType - Media reference property of the corresponding object type to which the media item will be uploaded.\n *\n * @returns media reference of the uploaded media item.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks\",\n type: \"experiment\",\n version: \"2.0.8\"\n};"]}
1
+ {"version":3,"sources":["../../../src/experimental/createMediaReference.ts","../../../src/experimental/fetchOneByRid.ts","../../../src/experimental/fetchPageByRid.ts","../../../src/experimental/getBulkLinks.ts"],"names":[],"mappings":";;;AA6BO,IAAM,uDAA0D,GAAA;AAAA,EACrE,IAAM,EAAA,yDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACjBO,IAAM,gDAAmD,GAAA;AAAA,EAC9D,IAAM,EAAA,kDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACJO,IAAM,iDAAoD,GAAA;AAAA,EAC/D,IAAM,EAAA,mDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX;;;ACJO,IAAM,+CAAkD,GAAA;AAAA,EAC7D,IAAM,EAAA,iDAAA;AAAA,EACN,IAAM,EAAA,YAAA;AAAA,EACN,OAAS,EAAA;AACX","file":"unstable.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @experimental This feature is experimental and might change in the future.\n *\n * Uploads a media item to the media property of the specified object type.\n *\n * @param data - Data to upload as media item\n * @param fileName - Name that will be assigned as path to the uploaded media item.\n * @param objectType - Object type to which the media item will be uploaded.\n * @param propertyType - Media reference property of the corresponding object type to which the media item will be uploaded.\n *\n * @returns media reference of the uploaded media item.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid\",\n type: \"experiment\",\n version: \"2.1.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\"\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks\",\n type: \"experiment\",\n version: \"2.0.8\"\n};"]}
@@ -1,5 +1,5 @@
1
- import { Y as ObjectOrInterfaceDefinition, U as FilteredPropertyKeys, M as MediaReference, O as ObjectTypeDefinition, Z as PropertyKeys, N as NullabilityAdherence, z as SelectArg, a6 as Osdk, af as ExtractOptions, b as OsdkBase } from '../FilteredPropertyKeys-CL4GoFyy.cjs';
2
- export { ag as MinimalObjectSet } from '../FilteredPropertyKeys-CL4GoFyy.cjs';
1
+ import { Y as ObjectOrInterfaceDefinition, U as FilteredPropertyKeys, M as MediaReference, O as ObjectTypeDefinition, Z as PropertyKeys, N as NullabilityAdherence, z as SelectArg, a7 as Osdk, ag as ExtractOptions, F as FetchPageArgs, C as FetchPageResult, b as OsdkBase } from '../FilteredPropertyKeys-D4ZQUqjG.cjs';
2
+ export { ah as MinimalObjectSet } from '../FilteredPropertyKeys-D4ZQUqjG.cjs';
3
3
  import 'type-fest';
4
4
  import 'geojson';
5
5
 
@@ -38,6 +38,11 @@ declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid: Experiment<"2.1.
38
38
  fetchOneByRid: fetchOneByRidFn;
39
39
  }>;
40
40
 
41
+ type fetchPageByRidFn = <Q extends ObjectOrInterfaceDefinition, const L extends PropertyKeys<Q>, const R extends boolean, const S extends NullabilityAdherence>(objectType: Q, rids: string[], options?: FetchPageArgs<Q, L, R, any, S>) => Promise<FetchPageResult<Q, L, R, S>>;
42
+ declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<"2.2.0", "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid", {
43
+ fetchPageByRid: fetchPageByRidFn;
44
+ }>;
45
+
41
46
  interface EXPERIMENTAL_BulkLinkResult {
42
47
  object: OsdkBase<any>;
43
48
  linkApiName: string;
@@ -50,4 +55,4 @@ declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks: Experiment<"2.0.8
50
55
  getBulkLinks: getBulkLinksFn;
51
56
  }>;
52
57
 
53
- export { type EXPERIMENTAL_BulkLinkResult, type Experiment, type ExperimentFns, __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference, __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid, __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks };
58
+ export { type EXPERIMENTAL_BulkLinkResult, type Experiment, type ExperimentFns, __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference, __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid, __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid, __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks };
@@ -1 +1 @@
1
- {"version":3,"file":"OsdkBase.js","names":[],"sources":["OsdkBase.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PropertyValueWireToClient } from \"./mapping/PropertyValueMapping.js\";\nimport type { ObjectOrInterfaceDefinition } from \"./ontology/ObjectOrInterface.js\";\nimport type { ObjectTypeDefinition } from \"./ontology/ObjectTypeDefinition.js\";\nimport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"./OsdkObjectPrimaryKeyType.js\";\n\nexport type OsdkBase<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly $apiName: Q[\"apiName\"];\n\n readonly $objectType: string;\n\n readonly $primaryKey: PrimaryKeyType<Q>;\n\n readonly $title: string | undefined;\n};\n\nexport type PrimaryKeyType<Q extends ObjectOrInterfaceDefinition> =\n & (Q extends ObjectTypeDefinition ? OsdkObjectPrimaryKeyType<Q>\n : unknown)\n // if the type is `unknown` then the next line will\n // restrict it down to all valid primary key types\n & PropertyValueWireToClient[PrimaryKeyTypes];\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"OsdkBase.js","names":[],"sources":["OsdkBase.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PropertyValueWireToClient } from \"./mapping/PropertyValueMapping.js\";\nimport type { ObjectOrInterfaceDefinition } from \"./ontology/ObjectOrInterface.js\";\nimport type { ObjectSpecifier } from \"./ontology/ObjectSpecifier.js\";\nimport type { ObjectTypeDefinition } from \"./ontology/ObjectTypeDefinition.js\";\nimport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"./OsdkObjectPrimaryKeyType.js\";\n\nexport type OsdkBase<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly $apiName: Q[\"apiName\"];\n\n readonly $objectType: string;\n\n readonly $primaryKey: PrimaryKeyType<Q>;\n\n readonly $title: string | undefined;\n\n readonly $objectSpecifier: ObjectSpecifier<Q>;\n};\n\nexport type PrimaryKeyType<Q extends ObjectOrInterfaceDefinition> =\n & (Q extends ObjectTypeDefinition ? OsdkObjectPrimaryKeyType<Q>\n : unknown)\n // if the type is `unknown` then the next line will\n // restrict it down to all valid primary key types\n & PropertyValueWireToClient[PrimaryKeyTypes];\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionResults.js","names":[],"sources":["ActionResults.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\n// These are migrated from @osdk/foundry.internal to avoid coupling the apis\n\nexport type ActionResults =\n & (\n | ObjectEdits\n | LargeScaleObjectEdits\n )\n & { editedObjectTypes: Array<String> };\n\ninterface ObjectEdits {\n type: \"edits\";\n addedObjects: Array<ObjectReference>;\n modifiedObjects: Array<ObjectReference>;\n addedLinks: Array<LinkReference>;\n deletedObjectsCount: number;\n deletedLinksCount: number;\n}\ninterface LargeScaleObjectEdits {\n type: \"largeScaleEdits\";\n addedObjects?: never;\n modifiedObjects?: never;\n addedLinks?: never;\n deletedObjectsCount?: never;\n deletedLinksCount?: never;\n}\n\ntype LinkReference = {\n linkTypeApiNameAtoB: string;\n linkTypeApiNameBtoA: string;\n aSideObject: ObjectReference;\n bSideObject: ObjectReference;\n};\ninterface ObjectReference {\n primaryKey: string | number;\n objectType: string;\n}\nexport interface ValidateActionResponseV2 {\n result: \"VALID\" | \"INVALID\";\n submissionCriteria: Array<{\n configuredFailureMessage?: string;\n result: \"VALID\" | \"INVALID\";\n }>;\n parameters: Record<string, {\n result: \"VALID\" | \"INVALID\";\n evaluatedConstraints: Array<ParameterEvaluatedConstraint>;\n required: boolean;\n }>;\n}\ntype ParameterEvaluatedConstraint =\n | { type: \"arraySize\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | { type: \"groupMember\" }\n | { type: \"objectPropertyValue\" }\n | { type: \"objectQueryResult\" }\n | {\n type: \"oneOf\";\n options: Array<{\n displayName?: string;\n value?: any;\n }>;\n otherValuesAllowed: boolean;\n }\n | { type: \"range\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | { type: \"stringLength\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | {\n type: \"stringRegexMatch\";\n regex: string;\n configuredFailureMessage?: string;\n }\n | { type: \"unevaluable\" };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ActionResults.js","names":[],"sources":["ActionResults.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\n// These are migrated from @osdk/foundry.internal to avoid coupling the apis\n\nexport type ActionResults =\n & (\n | ObjectEdits\n | LargeScaleObjectEdits\n )\n & { editedObjectTypes: Array<String> };\n\ninterface ObjectEdits {\n type: \"edits\";\n addedObjects: Array<ObjectReference>;\n modifiedObjects: Array<ObjectReference>;\n deletedObjects?: Array<ObjectReference>;\n addedLinks: Array<LinkReference>;\n deletedLinks?: Array<LinkReference>;\n deletedObjectsCount: number;\n deletedLinksCount: number;\n}\ninterface LargeScaleObjectEdits {\n type: \"largeScaleEdits\";\n addedObjects?: never;\n modifiedObjects?: never;\n deletedObjects?: never;\n addedLinks?: never;\n deletedLinks?: never;\n deletedObjectsCount?: never;\n deletedLinksCount?: never;\n}\n\ntype LinkReference = {\n linkTypeApiNameAtoB: string;\n linkTypeApiNameBtoA: string;\n aSideObject: ObjectReference;\n bSideObject: ObjectReference;\n};\ninterface ObjectReference {\n primaryKey: string | number;\n objectType: string;\n}\nexport interface ValidateActionResponseV2 {\n result: \"VALID\" | \"INVALID\";\n submissionCriteria: Array<{\n configuredFailureMessage?: string;\n result: \"VALID\" | \"INVALID\";\n }>;\n parameters: Record<string, {\n result: \"VALID\" | \"INVALID\";\n evaluatedConstraints: Array<ParameterEvaluatedConstraint>;\n required: boolean;\n }>;\n}\ntype ParameterEvaluatedConstraint =\n | { type: \"arraySize\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | { type: \"groupMember\" }\n | { type: \"objectPropertyValue\" }\n | { type: \"objectQueryResult\" }\n | {\n type: \"oneOf\";\n options: Array<{\n displayName?: string;\n value?: any;\n }>;\n otherValuesAllowed: boolean;\n }\n | { type: \"range\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | { type: \"stringLength\"; lt?: any; lte?: any; gt?: any; gte?: any }\n | {\n type: \"stringRegexMatch\";\n regex: string;\n configuredFailureMessage?: string;\n }\n | { type: \"unevaluable\" };\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type { ObjectTypeDefinition } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { OsdkBase } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\n\nexport type ApplyActionOptions =\n | { $returnEdits?: true; $validateOnly?: false }\n | {\n $validateOnly?: true;\n $returnEdits?: false;\n };\n\nexport type ApplyBatchActionOptions = { $returnEdits?: boolean };\n\n/**\n * Helper types for converting action definition parameter types to typescript types\n */\nexport namespace ActionParam {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueClientToWire[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> =\n | OsdkBase<T>\n | OsdkObjectPrimaryKeyType<T>;\n\n /**\n * Helper type to convert action definition parameter object sets to typescript types\n */\n export type ObjectSetType<T extends ObjectTypeDefinition> = ObjectSet<T>;\n\n /**\n * Helper type to convert action definition parameter interface types to typescript types\n */\n export type InterfaceType<T extends InterfaceDefinition> = {\n $objectType: NonNullable<T[\"__DefinitionMetadata\"]> extends\n { implementedBy: infer U }\n ? (U extends ReadonlyArray<string> ? U[number] : string)\n : string;\n $primaryKey: string | number;\n };\n\n export type StructType<\n T extends Record<string, keyof DataValueClientToWire>,\n > = { [K in keyof T]: DataValueClientToWire[T[K]] };\n}\n\nexport type ActionEditResponse = ActionResults;\nexport type ActionValidationResponse = ValidateActionResponseV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuBA;AACA;AACA;AAFA,WAGiBA,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type { ObjectTypeDefinition } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { OsdkBase } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\n\nexport type ApplyActionOptions =\n | { $returnEdits?: true; $validateOnly?: false }\n | {\n $validateOnly?: true;\n $returnEdits?: false;\n };\n\nexport type ApplyBatchActionOptions = { $returnEdits?: boolean };\n\n/**\n * Helper types for converting action definition parameter types to typescript types\n */\nexport namespace ActionParam {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueClientToWire[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> =\n | OsdkBase<T>\n | OsdkObjectPrimaryKeyType<T>;\n\n /**\n * Helper type to convert action definition parameter object sets to typescript types\n */\n export type ObjectSetType<T extends ObjectTypeDefinition> = ObjectSet<T>;\n\n /**\n * Helper type to convert action definition parameter interface types to typescript types\n */\n export type InterfaceType<T extends InterfaceDefinition> = {\n $objectType: NonNullable<T[\"__DefinitionMetadata\"]> extends\n { implementedBy: infer U } ? (U extends ReadonlyArray<never> ? string\n : U extends ReadonlyArray<string> ? U[number]\n : string)\n : string;\n $primaryKey: string | number;\n };\n\n export type StructType<\n T extends Record<string, keyof DataValueClientToWire>,\n > = { [K in keyof T]: DataValueClientToWire[T[K]] };\n}\n\nexport type ActionEditResponse = ActionResults;\nexport type ActionValidationResponse = ValidateActionResponseV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuBA;AACA;AACA;AAFA,WAGiBA,WAAW","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid = {
18
+ name: "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid",
19
+ type: "experiment",
20
+ version: "2.2.0"
21
+ };
22
+ //# sourceMappingURL=fetchPageByRid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchPageByRid.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","name","type","version"],"sources":["fetchPageByRid.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n FetchPageArgs,\n NullabilityAdherence,\n} from \"../object/FetchPageArgs.js\";\nimport type { FetchPageResult } from \"../object/FetchPageResult.js\";\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { Experiment } from \"./Experiment.js\";\n\ntype fetchPageByRidFn = <\n Q extends ObjectOrInterfaceDefinition,\n const L extends PropertyKeys<Q>,\n const R extends boolean,\n const S extends NullabilityAdherence,\n>(\n objectType: Q,\n rids: string[],\n options?: FetchPageArgs<Q, L, R, any, S>,\n) => Promise<FetchPageResult<Q, L, R, S>>;\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<\n \"2.2.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n { fetchPageByRid: fetchPageByRidFn }\n> = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBA,OAAO,MAAMA,iDAIZ,GAAG;EACFC,IAAI,EAAE,mDAAmD;EACzDC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n GeoFilter_Intersects,\n GeoFilter_Within,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type { OsdkObjectPropertyType } from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport type { DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type { Media, MediaMetadata, MediaReference } from \"./object/Media.js\";\nexport { isOk } from \"./object/Result.js\";\nexport type { Result } from \"./object/Result.js\";\nexport type { BaseObjectSet } from \"./objectSet/BaseObjectSet.js\";\nexport type { ObjectSet } from \"./objectSet/ObjectSet.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.js\";\nexport type { FilteredPropertyKeys } from \"./ontology/FilteredPropertyKeys.js\";\nexport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nexport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nexport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n PropertyDef,\n VersionBound,\n} from \"./ontology/ObjectTypeDefinition.js\";\nexport type { OntologyMetadata } from \"./ontology/OntologyMetadata.js\";\nexport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nexport type {\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type { OsdkBase, PrimaryKeyType } from \"./OsdkBase.js\";\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, Osdk } from \"./OsdkObjectFrom.js\";\nexport type { PageResult } from \"./PageResult.js\";\nexport type { QueryParam, QueryResult } from \"./queries/Queries.js\";\nexport { TimeseriesDurationMapping } from \"./timeseries/timeseries.js\";\nexport type {\n GeotimeSeriesProperty,\n TimeSeriesPoint,\n TimeSeriesProperty,\n TimeSeriesQuery,\n} from \"./timeseries/timeseries.js\";\nexport type { LinkedType, LinkNames } from \"./util/LinkUtils.js\";\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAahE,SAASC,eAAe,QAAQ,4BAA4B;AA8B5D,SAASC,IAAI,QAAQ,oBAAoB;AA8CzC,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n GeoFilter_Intersects,\n GeoFilter_Within,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type { OsdkObjectPropertyType } from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport type { DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type { Media, MediaMetadata, MediaReference } from \"./object/Media.js\";\nexport { isOk } from \"./object/Result.js\";\nexport type { Result } from \"./object/Result.js\";\nexport type { BaseObjectSet } from \"./objectSet/BaseObjectSet.js\";\nexport type { ObjectSet } from \"./objectSet/ObjectSet.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.js\";\nexport type { FilteredPropertyKeys } from \"./ontology/FilteredPropertyKeys.js\";\nexport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nexport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nexport type { ObjectSpecifier } from \"./ontology/ObjectSpecifier.js\";\nexport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n PropertyDef,\n VersionBound,\n} from \"./ontology/ObjectTypeDefinition.js\";\nexport type { OntologyMetadata } from \"./ontology/OntologyMetadata.js\";\nexport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nexport type {\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type { OsdkBase, PrimaryKeyType } from \"./OsdkBase.js\";\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, Osdk } from \"./OsdkObjectFrom.js\";\nexport type { PageResult } from \"./PageResult.js\";\nexport type {\n Range,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"./queries/Aggregations.js\";\nexport type { QueryParam, QueryResult } from \"./queries/Queries.js\";\nexport { TimeseriesDurationMapping } from \"./timeseries/timeseries.js\";\nexport type {\n GeotimeSeriesProperty,\n TimeSeriesPoint,\n TimeSeriesProperty,\n TimeSeriesQuery,\n} from \"./timeseries/timeseries.js\";\nexport type { LinkedType, LinkNames } from \"./util/LinkUtils.js\";\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAahE,SAASC,eAAe,QAAQ,4BAA4B;AA8B5D,SAASC,IAAI,QAAQ,oBAAoB;AAoDzC,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
@@ -15,10 +15,6 @@
15
15
  */
16
16
 
17
17
  import { describe, expectTypeOf, it, test, vi } from "vitest";
18
- const Employee = {
19
- type: "object",
20
- apiName: "Employee"
21
- };
22
18
  describe("ObjectSet", () => {
23
19
  const fauxObjectSet = {
24
20
  where: vi.fn(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSet.test.js","names":["describe","expectTypeOf","it","test","vi","Employee","type","apiName","fauxObjectSet","where","fn","withProperties","fetchPage","Promise","resolve","asyncIter","toEqualTypeOf","withA","base","pivotTo","aggregate","withFamily","selectProperty","withMom","withParents","todo","withAggregations","$select"],"sources":["ObjectSet.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { describe, expectTypeOf, it, test, vi } from \"vitest\";\n\nimport type {\n ObjectMetadata as $ObjectMetadata,\n ObjectSet as $ObjectSet,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n Osdk,\n PropertyDef as $PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n} from \"../index.js\";\n\nnamespace Employee {\n export type PropertyKeys =\n | \"employeeId\"\n | \"fullName\"\n | \"class\";\n\n export interface Links {\n readonly lead: $SingleLinkAccessor<Employee>;\n readonly peeps: Employee.ObjectSet;\n }\n\n export interface Props {\n readonly class: $PropType[\"string\"] | undefined;\n readonly fullName: $PropType[\"string\"] | undefined;\n readonly employeeId: $PropType[\"integer\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Employee, Employee.ObjectSet> {}\n}\n\ninterface Employee extends $ObjectTypeDefinition {\n type: \"object\";\n apiName: \"Employee\";\n __DefinitionMetadata?: {\n objectSet: Employee.ObjectSet;\n props: Employee.Props;\n linksType: Employee.Links;\n strictProps: Employee.StrictProps;\n apiName: \"Employee\";\n description: \"A full-time or part-time \\n\\n employee of our firm\";\n displayName: \"Employee\";\n icon: {\n type: \"blueprint\";\n color: \"blue\";\n name: \"person\";\n };\n implements: [\"FooInterface\"];\n interfaceMap: {\n FooInterface: {\n fooSpt: \"fullName\";\n };\n };\n inverseInterfaceMap: {\n FooInterface: {\n fullName: \"fooSpt\";\n };\n };\n links: {\n lead: $ObjectMetadata.Link<Employee, false>;\n peeps: $ObjectMetadata.Link<Employee, true>;\n };\n pluralDisplayName: \"Employees\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n properties: {\n class: $PropertyDef<\"string\", \"nullable\", \"single\">;\n fullName: $PropertyDef<\"string\", \"nullable\", \"single\">;\n employeeId: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\";\n status: \"ACTIVE\";\n titleProperty: \"fullName\";\n type: \"object\";\n visibility: \"NORMAL\";\n };\n}\n\nconst Employee: Employee = {\n type: \"object\",\n apiName: \"Employee\",\n};\n\ndescribe(\"ObjectSet\", () => {\n const fauxObjectSet = {\n where: vi.fn(() => {\n return fauxObjectSet;\n }),\n withProperties: vi.fn(() => {\n return fauxObjectSet;\n }),\n fetchPage: vi.fn(() => Promise.resolve()),\n asyncIter: vi.fn(() => {\n return {};\n }),\n } as any as Employee.ObjectSet;\n\n describe(\"normal\", () => {\n test(\"select none\", async () => {\n const result = await fauxObjectSet.fetchPage();\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never>\n >();\n });\n\n test(\"select one\", async () => {\n const result = await fauxObjectSet.fetchPage({ \"$select\": [\"fullName\"] });\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, \"fullName\">\n >();\n });\n });\n\n describe(\".withProperties\", () => {\n test(\"single property\", async () => {\n const withA = fauxObjectSet.withProperties({\n \"a\": (base) => {\n return base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\");\n },\n });\n\n expectTypeOf(withA).toEqualTypeOf<\n $ObjectSet<Employee, {\n a: \"integer\";\n }>\n >();\n\n const withAResults = await withA.fetchPage();\n\n expectTypeOf<typeof withAResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n a: \"integer\";\n }>\n >();\n\n expectTypeOf<typeof withAResults[\"data\"][0][\"a\"]>()\n .toEqualTypeOf<number>();\n });\n\n test(\"multiple properties\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n expectTypeOf(withFamily).toEqualTypeOf<\n $ObjectSet<Employee, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"dad\"]>()\n .toEqualTypeOf<string | undefined>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"sister\"]>()\n .toEqualTypeOf<string[] | undefined>();\n });\n\n describe(\"called in succession\", () => {\n test(\"independently\", () => {\n const withMom = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n const withParents = withMom.withProperties({\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n });\n\n expectTypeOf(withParents).toEqualTypeOf<\n $ObjectSet<Employee, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n }>\n >();\n });\n\n test.todo(\"with calculated properties\");\n });\n\n describe(\"nullability\", () => {\n it(\"count, exactDistinct, and approximateDistinct aren't nullable\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\"),\n \"sis\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:approximateDistinct\"),\n });\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"integer\";\n sis: \"integer\";\n }>\n >();\n });\n\n it(\n \"collectToSet, collectToList, selectProperty, and numeric aggregations are nullable\",\n async () => {\n const withAggregations = fauxObjectSet.withProperties({\n \"collectSet\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectSet\"),\n \"select\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"collectList\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n \"min\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:max\"),\n \"max\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:min\"),\n \"sum\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:sum\"),\n \"avg\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:avg\"),\n \"approximatePercentile\": (base) =>\n base.pivotTo(\"lead\").aggregate(\n \"employeeId:approximatePercentile\",\n ),\n });\n\n const withAggregationResults = await withAggregations.fetchPage();\n\n expectTypeOf<typeof withAggregationResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n collectSet: \"string\"[] | undefined;\n select: \"string\" | undefined;\n collectList: \"string\"[] | undefined;\n min: \"double\" | undefined;\n max: \"double\" | undefined;\n sum: \"double\" | undefined;\n avg: \"double\" | undefined;\n approximatePercentile: \"double\" | undefined;\n }>\n >();\n },\n );\n });\n\n describe(\"fetch functions return correct Osdk.Instance\", () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n\n it(\"works with .where\", async () => {\n const where = withFamily.where({ \"mom\": 1 });\n const whereResults = await where.fetchPage();\n\n expectTypeOf<typeof where>().toEqualTypeOf<typeof withFamily>();\n expectTypeOf<typeof whereResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n });\n\n it(\"works with .async\", () => {\n const asyncIter = withFamily.asyncIter();\n expectTypeOf<typeof asyncIter>().toEqualTypeOf<\n AsyncIterableIterator<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >\n >();\n });\n\n it(\"Works with no select\", async () => {\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n });\n\n it(\"Works with selecting all RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\", \"dad\", \"sister\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, never, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n });\n\n it(\"Works with selecting some RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, never, {\n mom: \"integer\";\n }>\n >();\n });\n\n it(\"Works with selecting all non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"fullName\", \"employeeId\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {}>\n >();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"class\"]>()\n .toEqualTypeOf<\n string | undefined\n >();\n });\n\n it(\"Works with selecting some non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, \"class\", {}>\n >();\n });\n\n it(\"Works with selecting a mix\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n Employee,\n never,\n \"class\",\n { mom: \"integer\" }\n >\n >();\n });\n });\n\n it(\"allows extracting the type\", () => {\n const objectSet = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n type ObjectSetType = typeof objectSet;\n\n expectTypeOf<ObjectSetType>().toEqualTypeOf<\n $ObjectSet<Employee, {\n mom: \"integer\";\n }>\n >();\n\n const objectSet2 = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n\n it(\"Defining the Type\", () => {\n type ObjectSetType = $ObjectSet<\n Employee,\n {\n mom: \"integer\" | undefined;\n }\n >;\n\n fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAiF7D,MAAMC,QAAkB,GAAG;EACzBC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC;AAEDP,QAAQ,CAAC,WAAW,EAAE,MAAM;EAC1B,MAAMQ,aAAa,GAAG;IACpBC,KAAK,EAAEL,EAAE,CAACM,EAAE,CAAC,MAAM;MACjB,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFG,cAAc,EAAEP,EAAE,CAACM,EAAE,CAAC,MAAM;MAC1B,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFI,SAAS,EAAER,EAAE,CAACM,EAAE,CAAC,MAAMG,OAAO,CAACC,OAAO,CAAC,CAAC,CAAC;IACzCC,SAAS,EAAEX,EAAE,CAACM,EAAE,CAAC,MAAM;MACrB,OAAO,CAAC,CAAC;IACX,CAAC;EACH,CAA8B;EAE9BV,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACvBG,IAAI,CAAC,aAAa,EAAE,YAAY;MACf,MAAMK,aAAa,CAACI,SAAS,CAAC,CAAC;MAC9CX,YAAY,CAAwB,CAAC,CAACe,aAAa,CAEjD,CAAC;IACL,CAAC,CAAC;IAEFb,IAAI,CAAC,YAAY,EAAE,YAAY;MACd,MAAMK,aAAa,CAACI,SAAS,CAAC;QAAE,SAAS,EAAE,CAAC,UAAU;MAAE,CAAC,CAAC;MACzEX,YAAY,CAAwB,CAAC,CAACe,aAAa,CAEjD,CAAC;IACL,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFhB,QAAQ,CAAC,iBAA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AC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ObjectSet.test.js","names":["describe","expectTypeOf","it","test","vi","fauxObjectSet","where","fn","withProperties","fetchPage","Promise","resolve","asyncIter","toEqualTypeOf","withA","base","pivotTo","aggregate","withFamily","selectProperty","withMom","withParents","todo","withAggregations","$select"],"sources":["ObjectSet.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { describe, expectTypeOf, it, test, vi } from \"vitest\";\n\nimport type { ObjectSet as $ObjectSet, Osdk, PropertyKeys } from \"../index.js\";\nimport type { EmployeeApiTest } from \"../test/EmployeeApiTest.js\";\n\ndescribe(\"ObjectSet\", () => {\n const fauxObjectSet = {\n where: vi.fn(() => {\n return fauxObjectSet;\n }),\n withProperties: vi.fn(() => {\n return fauxObjectSet;\n }),\n fetchPage: vi.fn(() => Promise.resolve()),\n asyncIter: vi.fn(() => {\n return {};\n }),\n } as any as EmployeeApiTest.ObjectSet;\n\n describe(\"normal\", () => {\n test(\"select none\", async () => {\n const result = await fauxObjectSet.fetchPage();\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never>\n >();\n });\n\n test(\"select one\", async () => {\n const result = await fauxObjectSet.fetchPage({ \"$select\": [\"fullName\"] });\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"fullName\">\n >();\n });\n });\n\n describe(\".withProperties\", () => {\n test(\"single property\", async () => {\n const withA = fauxObjectSet.withProperties({\n \"a\": (base) => {\n return base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\");\n },\n });\n\n expectTypeOf(withA).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n a: \"integer\";\n }>\n >();\n\n const withAResults = await withA.fetchPage();\n\n expectTypeOf<typeof withAResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n a: \"integer\";\n }>\n >();\n\n expectTypeOf<typeof withAResults[\"data\"][0][\"a\"]>()\n .toEqualTypeOf<number>();\n });\n\n test(\"multiple properties\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n expectTypeOf(withFamily).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"dad\"]>()\n .toEqualTypeOf<string | undefined>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"sister\"]>()\n .toEqualTypeOf<string[] | undefined>();\n });\n\n describe(\"called in succession\", () => {\n test(\"independently\", () => {\n const withMom = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n const withParents = withMom.withProperties({\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n });\n\n expectTypeOf(withParents).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n }>\n >();\n });\n\n test.todo(\"with calculated properties\");\n });\n\n describe(\"nullability\", () => {\n it(\"count, exactDistinct, and approximateDistinct aren't nullable\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\"),\n \"sis\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:approximateDistinct\"),\n });\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"integer\";\n sis: \"integer\";\n }>\n >();\n });\n\n it(\n \"collectToSet, collectToList, selectProperty, and numeric aggregations are nullable\",\n async () => {\n const withAggregations = fauxObjectSet.withProperties({\n \"collectSet\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectSet\"),\n \"select\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"collectList\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n \"min\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:max\"),\n \"max\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:min\"),\n \"sum\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:sum\"),\n \"avg\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:avg\"),\n \"approximatePercentile\": (base) =>\n base.pivotTo(\"lead\").aggregate(\n \"employeeId:approximatePercentile\",\n ),\n });\n\n const withAggregationResults = await withAggregations.fetchPage();\n\n expectTypeOf<typeof withAggregationResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n collectSet: \"string\"[] | undefined;\n select: \"string\" | undefined;\n collectList: \"string\"[] | undefined;\n min: \"double\" | undefined;\n max: \"double\" | undefined;\n sum: \"double\" | undefined;\n avg: \"double\" | undefined;\n approximatePercentile: \"double\" | undefined;\n }\n >\n >();\n },\n );\n });\n\n describe(\"fetch functions return correct Osdk.Instance\", () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n\n it(\"works with .where\", async () => {\n const where = withFamily.where({ \"mom\": 1 });\n const whereResults = await where.fetchPage();\n\n expectTypeOf<typeof where>().toEqualTypeOf<typeof withFamily>();\n expectTypeOf<typeof whereResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"works with .async\", () => {\n const asyncIter = withFamily.asyncIter();\n expectTypeOf<typeof asyncIter>().toEqualTypeOf<\n AsyncIterableIterator<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >\n >();\n });\n\n it(\"Works with no select\", async () => {\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"Works with selecting all RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\", \"dad\", \"sister\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n });\n\n it(\"Works with selecting some RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n }>\n >();\n });\n\n it(\"Works with selecting all non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"fullName\", \"employeeId\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {}\n >\n >();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"class\"]>()\n .toEqualTypeOf<\n string | undefined\n >();\n });\n\n it(\"Works with selecting some non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"class\", {}>\n >();\n });\n\n it(\"Works with selecting a mix\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n \"class\",\n { mom: \"integer\" }\n >\n >();\n });\n });\n\n it(\"allows extracting the type\", () => {\n const objectSet = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n type ObjectSetType = typeof objectSet;\n\n expectTypeOf<ObjectSetType>().toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n }>\n >();\n\n const objectSet2 = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n\n it(\"Defining the Type\", () => {\n type ObjectSetType = $ObjectSet<\n EmployeeApiTest,\n {\n mom: \"integer\" | undefined;\n }\n >;\n\n fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAK7DJ,QAAQ,CAAC,WAAW,EAAE,MAAM;EAC1B,MAAMK,aAAa,GAAG;IACpBC,KAAK,EAAEF,EAAE,CAACG,EAAE,CAAC,MAAM;MACjB,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFG,cAAc,EAAEJ,EAAE,CAACG,EAAE,CAAC,MAAM;MAC1B,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFI,SAAS,EAAEL,EAAE,CAACG,EAAE,CAAC,MAAMG,OAAO,CAACC,OAAO,CAAC,CAAC,CAAC;IACzCC,SAAS,EAAER,EAAE,CAACG,EAAE,CAAC,MAAM;MACrB,OAAO,CAAC,CAAC;IACX,CAAC;EACH,CAAqC;EAErCP,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACvBG,IAAI,CAAC,aAAa,EAAE,YAAY;MACf,MAAME,aAAa,CAACI,SAAS,CAAC,CAAC;MAC9CR,YAAY,CAAwB,CAAC,CAACY,aAAa,CAEjD,CAAC;IACL,CAAC,CAAC;IAEFV,IAAI,CAAC,YAAY,EAAE,Y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;IAEFf,EAAE,CAAC,mBAAmB,EAAE,MAAM;MAQ5BG,aAAa,CAACG,cAAc,CAAC;QAC3B,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ObjectSpecifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectSpecifier.js","names":[],"sources":["ObjectSpecifier.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./InterfaceDefinition.js\";\nimport type { ObjectOrInterfaceDefinition } from \"./ObjectOrInterface.js\";\n\nexport type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {\n __apiName:\n | Q[\"apiName\"]\n | (Q extends InterfaceDefinition\n ? NonNullable<Q[\"__DefinitionMetadata\"]> extends InterfaceMetadata\n ? NonNullable<\n NonNullable<Q[\"__DefinitionMetadata\"]>[\"implementedBy\"]\n >[number]\n : never\n : never);\n};\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { describe, expectTypeOf, it, vi } from "vitest";
18
+ describe("ObjectSpecifier", () => {
19
+ const fauxObjectSet = {
20
+ fetchOne: vi.fn(() => Promise.resolve(() => ""))
21
+ };
22
+ it("should only work with same Object Specifier", async () => {
23
+ expectTypeOf().toMatchTypeOf();
24
+ const EmployeeApiTest = await fauxObjectSet.fetchOne(123);
25
+ const specifier = EmployeeApiTest.$objectSpecifier;
26
+ expectTypeOf(specifier).toMatchTypeOf();
27
+ expectTypeOf().toMatchTypeOf();
28
+ });
29
+ describe("interfaces", () => {
30
+ const fauxInterfaceObjectSet = {
31
+ fetchPage: vi.fn(() => Promise.resolve({
32
+ data: [""]
33
+ }))
34
+ };
35
+ it("should work with loaded interfaces", async () => {
36
+ expectTypeOf().toMatchTypeOf();
37
+ const FooInterfaceApiTest = await fauxInterfaceObjectSet.fetchPage();
38
+ const specifier = FooInterfaceApiTest.data[0].$objectSpecifier;
39
+ expectTypeOf(specifier).toMatchTypeOf();
40
+ });
41
+ it("should only work with known object types", async () => {
42
+ const EmployeeApiTest = await fauxObjectSet.fetchOne(123);
43
+ const specifier = EmployeeApiTest.$objectSpecifier;
44
+ expectTypeOf(specifier).toMatchTypeOf();
45
+ const FooInterfaceApiTest = (await fauxInterfaceObjectSet.fetchPage()).data[0];
46
+ FooInterfaceApiTest.$objectSpecifier;
47
+ expectTypeOf().toMatchTypeOf();
48
+ expectTypeOf().toMatchTypeOf // @ts-expect-error
49
+ ();
50
+ });
51
+ });
52
+ });
53
+ //# sourceMappingURL=ObjectSpecifier.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectSpecifier.test.js","names":["describe","expectTypeOf","it","vi","fauxObjectSet","fetchOne","fn","Promise","resolve","toMatchTypeOf","EmployeeApiTest","specifier","$objectSpecifier","fauxInterfaceObjectSet","fetchPage","data","FooInterfaceApiTest"],"sources":["ObjectSpecifier.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { describe, expectTypeOf, it, vi } from \"vitest\";\nimport type { EmployeeApiTest } from \"../test/EmployeeApiTest.js\";\nimport type { FooInterfaceApiTest } from \"../test/FooInterfaceApiTest.js\";\nimport type { ObjectSpecifier } from \"./ObjectSpecifier.js\";\n\ndescribe(\"ObjectSpecifier\", () => {\n const fauxObjectSet = {\n fetchOne: vi.fn(() => Promise.resolve(() => \"\")),\n } as any as EmployeeApiTest.ObjectSet;\n\n it(\"should only work with same Object Specifier\", async () => {\n type EmployeeObjectSpecifier = ObjectSpecifier<EmployeeApiTest>;\n\n expectTypeOf<EmployeeObjectSpecifier>().toMatchTypeOf<\n string & { __apiName: \"Employee\" }\n >();\n\n const EmployeeApiTest = await fauxObjectSet.fetchOne(123);\n\n const specifier: EmployeeObjectSpecifier = EmployeeApiTest.$objectSpecifier;\n\n expectTypeOf(specifier).toMatchTypeOf<\n string & { __apiName: \"Employee\" }\n >();\n\n type NonEmployeeObjectSpecifier = ObjectSpecifier<\n { apiName: \"NotEmployee\"; osdkMetadata: any; type: \"object\" }\n >;\n\n expectTypeOf<NonEmployeeObjectSpecifier>().toMatchTypeOf<\n // @ts-expect-error\n EmployeeObjectId\n >();\n });\n\n describe(\"interfaces\", () => {\n const fauxInterfaceObjectSet = {\n fetchPage: vi.fn(() => Promise.resolve({ data: [\"\"] })),\n } as any as FooInterfaceApiTest.ObjectSet;\n\n it(\"should work with loaded interfaces\", async () => {\n type FooInterfaceObjectSpecifier = ObjectSpecifier<FooInterfaceApiTest>;\n\n expectTypeOf<FooInterfaceObjectSpecifier>().toMatchTypeOf<\n string & { __apiName: \"FooInterface\" | \"Employee\" }\n >();\n\n const FooInterfaceApiTest = await fauxInterfaceObjectSet.fetchPage();\n\n const specifier = FooInterfaceApiTest.data[0].$objectSpecifier;\n\n expectTypeOf(specifier).toMatchTypeOf<\n string & { __apiName: \"FooInterface\" | \"Employee\" }\n >();\n });\n\n it(\"should only work with known object types\", async () => {\n const EmployeeApiTest = await fauxObjectSet.fetchOne(123);\n\n const specifier = EmployeeApiTest.$objectSpecifier;\n\n expectTypeOf(specifier).toMatchTypeOf<\n string & { __apiName: \"Employee\" }\n >();\n\n const FooInterfaceApiTest =\n (await fauxInterfaceObjectSet.fetchPage()).data[0];\n\n const fooInterfaceObjectSpecifier = FooInterfaceApiTest.$objectSpecifier;\n\n expectTypeOf<typeof specifier>().toMatchTypeOf<\n typeof fooInterfaceObjectSpecifier\n >();\n\n type NonEmployeeObjectSpecifier = ObjectSpecifier<\n { apiName: \"NotEmployee\"; osdkMetadata: any; type: \"object\" }\n >;\n\n expectTypeOf<NonEmployeeObjectSpecifier>().toMatchTypeOf // @ts-expect-error\n <typeof fooInterfaceObjectSpecifier>();\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,EAAEC,EAAE,QAAQ,QAAQ;AAKvDH,QAAQ,CAAC,iBAAiB,EAAE,MAAM;EAChC,MAAMI,aAAa,GAAG;IACpBC,QAAQ,EAAEF,EAAE,CAACG,EAAE,CAAC,MAAMC,OAAO,CAACC,OAAO,CAAC,MAAM,EAAE,CAAC;EACjD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,YAAY,CAAmB,CAAC,CAACQ,aAAa,CAE5C,CAAC;MAMHR,YAAY,CAA6B,CAAC,CAACQ,aAAa,CAAC;MAAA,CACpB,CAAC;IACxC,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectTypeDefinition.js","names":["ObjectMetadata"],"sources":["ObjectTypeDefinition.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 { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ObjectOrInterface.js\";\nimport type { PrimaryKeyTypes } from \"./PrimaryKeyTypes.js\";\nimport type { VersionString } from \"./VersionString.js\";\nimport type { WirePropertyTypes } from \"./WirePropertyTypes.js\";\n\nexport type CompileTimeMetadata<T extends { __DefinitionMetadata?: {} }> =\n NonNullable<\n T[\"__DefinitionMetadata\"]\n >;\n\nexport type ObjectTypePropertyDefinitionFrom2<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n> = CompileTimeMetadata<Q>[\"properties\"][P];\n\nexport type ObjectInterfaceBaseMetadata = {\n type: \"object\" | \"interface\";\n apiName: string;\n displayName: string;\n description?: string;\n properties: Record<any, ObjectMetadata.Property>;\n links: Record<\n string,\n ObjectMetadata.Link<any, any>\n >;\n rid: string;\n /**\n * Represents the \"super interfaces\" of this object.\n *\n * Optional because they may not exist on legacy.\n */\n implements?: ReadonlyArray<string>;\n};\n\nexport interface ObjectInterfaceCompileDefinition {\n type: \"object\" | \"interface\";\n objectSet?: any;\n props?: any;\n strictProps?: any;\n linksType?: any;\n}\n\nexport interface VersionBound<V extends VersionString<any, any, any>> {\n __expectedClientVersion?: V;\n}\n\nexport interface ObjectMetadata extends ObjectInterfaceBaseMetadata {\n type: \"object\";\n primaryKeyApiName: keyof this[\"properties\"];\n titleProperty: keyof this[\"properties\"];\n primaryKeyType: PrimaryKeyTypes;\n icon?: Icon;\n visibility?: ObjectTypeVisibility;\n pluralDisplayName: string;\n status: ReleaseStatus;\n interfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* InterfaceType property api name */ string,\n /* ObjectType property api name */ string\n >\n >;\n inverseInterfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* ObjectType property api name */ string,\n /* InterfaceType property api name */ string\n >\n >;\n}\n\nexport namespace ObjectMetadata {\n export interface Property {\n readonly?: boolean;\n displayName?: string;\n description?: string;\n type: WirePropertyTypes;\n multiplicity?: boolean;\n nullable?: boolean;\n }\n\n export interface Link<\n Q extends ObjectTypeDefinition,\n M extends boolean,\n > {\n __OsdkLinkTargetType?: Q;\n targetType: Q[\"apiName\"];\n multiplicity: M;\n }\n}\n\nexport interface ObjectTypeDefinition {\n type: \"object\";\n apiName: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & ObjectMetadata\n & ObjectInterfaceCompileDefinition;\n}\n\nexport type ObjectTypeLinkKeysFrom2<\n Q extends ObjectTypeDefinition,\n> =\n & keyof CompileTimeMetadata<Q>[\"links\"]\n & string;\n\nexport interface PropertyDef<\n T extends WirePropertyTypes,\n N extends \"nullable\" | \"non-nullable\" = \"nullable\",\n M extends \"array\" | \"single\" = \"single\",\n> extends ObjectMetadata.Property {\n type: T;\n multiplicity: M extends \"array\" ? true : false;\n nullable: N extends \"nullable\" ? true : false;\n}\n\nexport type ReleaseStatus = \"ACTIVE\" | \"EXPERIMENTAL\" | \"DEPRECATED\";\n\ntype ObjectTypeVisibility = \"NORMAL\" | \"PROMINENT\" | \"HIDDEN\";\n\ntype BlueprintIcon = {\n type: \"blueprint\";\n color: string;\n name: string;\n};\n\ntype Icon = BlueprintIcon;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WA2FiBA,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"ObjectTypeDefinition.js","names":["ObjectMetadata"],"sources":["ObjectTypeDefinition.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 { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ObjectOrInterface.js\";\nimport type { PrimaryKeyTypes } from \"./PrimaryKeyTypes.js\";\nimport type { VersionString } from \"./VersionString.js\";\nimport type { WirePropertyTypes } from \"./WirePropertyTypes.js\";\n\nexport type CompileTimeMetadata<T extends { __DefinitionMetadata?: {} }> =\n NonNullable<\n T[\"__DefinitionMetadata\"]\n >;\n\nexport type ObjectTypePropertyDefinitionFrom2<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n> = CompileTimeMetadata<Q>[\"properties\"][P];\n\nexport type ObjectInterfaceBaseMetadata = {\n type: \"object\" | \"interface\";\n apiName: string;\n displayName: string;\n description?: string;\n properties: Record<any, ObjectMetadata.Property>;\n links: Record<\n string,\n ObjectMetadata.Link<any, any>\n >;\n rid: string;\n /**\n * Represents the \"super interfaces\" of this object.\n *\n * Optional because they may not exist on legacy.\n */\n implements?: ReadonlyArray<string>;\n};\n\nexport interface ObjectInterfaceCompileDefinition {\n type: \"object\" | \"interface\";\n objectSet?: any;\n props?: any;\n strictProps?: any;\n linksType?: any;\n}\n\nexport interface VersionBound<V extends VersionString<any, any, any>> {\n __expectedClientVersion?: V;\n}\n\nexport interface ObjectMetadata extends ObjectInterfaceBaseMetadata {\n type: \"object\";\n primaryKeyApiName: keyof this[\"properties\"];\n titleProperty: keyof this[\"properties\"];\n primaryKeyType: PrimaryKeyTypes;\n icon?: Icon;\n visibility?: ObjectTypeVisibility;\n pluralDisplayName: string;\n status: ReleaseStatus;\n interfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* InterfaceType property api name */ string,\n /* ObjectType property api name */ string\n >\n >;\n inverseInterfaceMap: Record<\n /* InterfaceType api name */ string,\n Record<\n /* ObjectType property api name */ string,\n /* InterfaceType property api name */ string\n >\n >;\n}\n\nexport namespace ObjectMetadata {\n export interface Property {\n readonly?: boolean;\n displayName?: string;\n description?: string;\n type: WirePropertyTypes;\n multiplicity?: boolean;\n nullable?: boolean;\n }\n\n export interface Link<\n Q extends ObjectTypeDefinition,\n M extends boolean,\n > {\n __OsdkLinkTargetType?: Q;\n targetType: Q[\"apiName\"];\n multiplicity: M;\n }\n}\n\nexport interface ObjectTypeDefinition {\n type: \"object\";\n apiName: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & ObjectMetadata\n & ObjectInterfaceCompileDefinition;\n}\n\nexport type ObjectTypeLinkKeysFrom2<\n Q extends ObjectTypeDefinition,\n> =\n & keyof CompileTimeMetadata<Q>[\"links\"]\n & string;\n\nexport interface PropertyDef<\n T extends WirePropertyTypes,\n N extends \"nullable\" | \"non-nullable\" = \"nullable\",\n M extends \"array\" | \"single\" = \"single\",\n> extends ObjectMetadata.Property {\n type: T;\n multiplicity: M extends \"array\" ? true : false;\n nullable: N extends \"nullable\" ? true : false;\n}\n\nexport type ReleaseStatus =\n | \"ACTIVE\"\n | \"EXPERIMENTAL\"\n | \"DEPRECATED\"\n | \"ENDORSED\";\n\ntype ObjectTypeVisibility = \"NORMAL\" | \"PROMINENT\" | \"HIDDEN\";\n\ntype BlueprintIcon = {\n type: \"blueprint\";\n color: string;\n name: string;\n};\n\ntype Icon = BlueprintIcon;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WA2FiBA,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"QueryDefinition.js","names":[],"sources":["QueryDefinition.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 { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type { ObjectTypeDefinition } from \"./ObjectTypeDefinition.js\";\n\nexport interface QueryMetadata {\n type: \"query\";\n apiName: string;\n description?: string;\n displayName?: string;\n version: string;\n parameters: Record<string, QueryParameterDefinition<any>>;\n output: QueryDataTypeDefinition;\n rid: string;\n}\n\nexport interface QueryCompileTimeMetadata<T> {\n signature: T;\n}\n\nexport interface QueryDefinition<T = any> {\n type: \"query\";\n apiName: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & QueryCompileTimeMetadata<T>\n & QueryMetadata;\n}\n\nexport type QueryParameterDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> = {\n description?: string;\n} & QueryDataTypeDefinition<T_Target>;\n\nexport type QueryDataTypeDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> =\n | PrimitiveDataType\n | ObjectQueryDataType<T_Target>\n | ObjectSetQueryDataType<T_Target>\n | SetQueryDataType\n | UnionQueryDataType\n | StructQueryDataType\n | TwoDimensionalAggregationDataType\n | ThreeDimensionalAggregationDataType;\n\nexport type BaseQueryDataTypeDefinition<T extends string> = {\n multiplicity?: boolean;\n nullable?: boolean;\n type: T;\n};\n\nexport type WireQueryDataTypes =\n | \"double\"\n | \"float\"\n | \"integer\"\n | \"long\"\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"timestamp\"\n | \"attachment\";\n\nexport type PrimitiveDataType<\n Q extends WireQueryDataTypes = WireQueryDataTypes,\n> = BaseQueryDataTypeDefinition<Q>;\n\nexport interface ObjectQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"object\"> {\n object: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface ObjectSetQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"objectSet\"> {\n objectSet: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface SetQueryDataType extends BaseQueryDataTypeDefinition<\"set\"> {\n set: QueryDataTypeDefinition;\n}\n\nexport interface UnionQueryDataType\n extends BaseQueryDataTypeDefinition<\"union\">\n{\n union: ReadonlyArray<QueryDataTypeDefinition>;\n}\n\nexport interface StructQueryDataType\n extends BaseQueryDataTypeDefinition<\"struct\">\n{\n struct: Record<string, QueryDataTypeDefinition>;\n}\n\nexport interface TwoDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"twoDimensionalAggregation\">\n{\n twoDimensionalAggregation: TwoDimensionalQueryAggregationDefinition;\n}\n\nexport interface ThreeDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"threeDimensionalAggregation\">\n{\n threeDimensionalAggregation: ThreeDimensionalQueryAggregationDefinition;\n}\n\nexport type AggregationKeyDataType<V = any> =\n | SimpleAggregationKeyDataType<V>\n | RangeAggregationKeyDataType<V>;\n\nexport interface SimpleAggregationKeyDataType<V = any> {\n keyType: Exclude<AggregationKeyTypes, \"range\">;\n valueType: V;\n}\nexport interface RangeAggregationKeyDataType<V = any> {\n keyType: \"range\";\n keySubtype: AggregationRangeKeyTypes;\n valueType: V;\n}\n\nexport type TwoDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n AggregationValueTypes\n>;\n\nexport type ThreeDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n TwoDimensionalQueryAggregationDefinition\n>;\n\nexport type AggregationKeyTypes =\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\"\n | \"range\";\n\nexport type AggregationRangeKeyTypes =\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\";\n\nexport type AggregationValueTypes = \"date\" | \"double\" | \"timestamp\";\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"QueryDefinition.js","names":[],"sources":["QueryDefinition.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 { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type { ObjectTypeDefinition } from \"./ObjectTypeDefinition.js\";\n\nexport interface QueryMetadata {\n type: \"query\";\n apiName: string;\n description?: string;\n displayName?: string;\n version: string;\n parameters: Record<string, QueryParameterDefinition<any>>;\n output: QueryDataTypeDefinition;\n rid: string;\n}\n\nexport interface QueryCompileTimeMetadata<T> {\n signature: T;\n}\n\nexport interface QueryDefinition<T = any> {\n type: \"query\";\n apiName: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & QueryCompileTimeMetadata<T>\n & QueryMetadata;\n}\n\nexport type QueryParameterDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> = {\n description?: string;\n} & QueryDataTypeDefinition<T_Target>;\n\nexport type QueryDataTypeDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> =\n | PrimitiveDataType\n | ObjectQueryDataType<T_Target>\n | ObjectSetQueryDataType<T_Target>\n | SetQueryDataType\n | UnionQueryDataType\n | StructQueryDataType\n | TwoDimensionalAggregationDataType\n | ThreeDimensionalAggregationDataType\n | MapDataType;\n\nexport type BaseQueryDataTypeDefinition<T extends string> = {\n multiplicity?: boolean;\n nullable?: boolean;\n type: T;\n};\n\nexport type WireQueryDataTypes =\n | \"double\"\n | \"float\"\n | \"integer\"\n | \"long\"\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"timestamp\"\n | \"attachment\";\n\nexport type PrimitiveDataType<\n Q extends WireQueryDataTypes = WireQueryDataTypes,\n> = BaseQueryDataTypeDefinition<Q>;\n\nexport interface ObjectQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"object\"> {\n object: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface ObjectSetQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"objectSet\"> {\n objectSet: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface SetQueryDataType extends BaseQueryDataTypeDefinition<\"set\"> {\n set: QueryDataTypeDefinition;\n}\n\nexport interface UnionQueryDataType\n extends BaseQueryDataTypeDefinition<\"union\">\n{\n union: ReadonlyArray<QueryDataTypeDefinition>;\n}\n\nexport interface StructQueryDataType\n extends BaseQueryDataTypeDefinition<\"struct\">\n{\n struct: Record<string, QueryDataTypeDefinition>;\n}\n\nexport interface TwoDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"twoDimensionalAggregation\">\n{\n twoDimensionalAggregation: TwoDimensionalQueryAggregationDefinition;\n}\n\nexport interface ThreeDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"threeDimensionalAggregation\">\n{\n threeDimensionalAggregation: ThreeDimensionalQueryAggregationDefinition;\n}\n\nexport interface MapDataType extends BaseQueryDataTypeDefinition<\"map\"> {\n keyType: QueryDataTypeDefinition;\n valueType: QueryDataTypeDefinition;\n}\n\nexport type AggregationKeyDataType<V = any> =\n | SimpleAggregationKeyDataType<V>\n | RangeAggregationKeyDataType<V>;\n\nexport interface SimpleAggregationKeyDataType<V = any> {\n keyType: Exclude<AggregationKeyTypes, \"range\">;\n valueType: V;\n}\nexport interface RangeAggregationKeyDataType<V = any> {\n keyType: \"range\";\n keySubtype: AggregationRangeKeyTypes;\n valueType: V;\n}\n\nexport type TwoDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n AggregationValueTypes\n>;\n\nexport type ThreeDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n TwoDimensionalQueryAggregationDefinition\n>;\n\nexport type AggregationKeyTypes =\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\"\n | \"range\";\n\nexport type AggregationRangeKeyTypes =\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\";\n\nexport type AggregationValueTypes = \"date\" | \"double\" | \"timestamp\";\n"],"mappings":"","ignoreList":[]}
@@ -16,5 +16,6 @@
16
16
 
17
17
  export { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from "../experimental/createMediaReference.js";
18
18
  export { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from "../experimental/fetchOneByRid.js";
19
+ export { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid } from "../experimental/fetchPageByRid.js";
19
20
  export { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from "../experimental/getBulkLinks.js";
20
21
  //# sourceMappingURL=unstable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unstable.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks"],"sources":["unstable.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\nexport type { Experiment, ExperimentFns } from \"../experimental/Experiment.js\";\n\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \"../experimental/createMediaReference.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from \"../experimental/fetchOneByRid.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from \"../experimental/getBulkLinks.js\";\n\nexport type { EXPERIMENTAL_BulkLinkResult } from \"../objectSet/BulkLinkResult.js\";\nexport type { MinimalObjectSet } from \"../objectSet/ObjectSet.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,uDAAuD,QAAQ,yCAAyC;AACjH,SAASC,gDAAgD,QAAQ,kCAAkC;AACnG,SAASC,+CAA+C,QAAQ,iCAAiC","ignoreList":[]}
1
+ {"version":3,"file":"unstable.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks"],"sources":["unstable.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\nexport type { Experiment, ExperimentFns } from \"../experimental/Experiment.js\";\n\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \"../experimental/createMediaReference.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from \"../experimental/fetchOneByRid.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid } from \"../experimental/fetchPageByRid.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from \"../experimental/getBulkLinks.js\";\n\nexport type { EXPERIMENTAL_BulkLinkResult } from \"../objectSet/BulkLinkResult.js\";\nexport type { MinimalObjectSet } from \"../objectSet/ObjectSet.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,uDAAuD,QAAQ,yCAAyC;AACjH,SAASC,gDAAgD,QAAQ,kCAAkC;AACnG,SAASC,iDAAiD,QAAQ,mCAAmC;AACrG,SAASC,+CAA+C,QAAQ,iCAAiC","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export const EmployeeApiTest = {
18
+ type: "object",
19
+ apiName: "Employee"
20
+ };
21
+ //# sourceMappingURL=EmployeeApiTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmployeeApiTest.js","names":["EmployeeApiTest","type","apiName"],"sources":["EmployeeApiTest.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectMetadata as $ObjectMetadata,\n ObjectSet as $ObjectSet,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n PropertyDef as $PropertyDef,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n} from \"../index.js\";\n\nexport namespace EmployeeApiTest {\n export type PropertyKeys =\n | \"employeeId\"\n | \"fullName\"\n | \"class\";\n\n export interface Links {\n readonly lead: $SingleLinkAccessor<EmployeeApiTest>;\n readonly peeps: EmployeeApiTest.ObjectSet;\n }\n\n export interface Props {\n readonly class: $PropType[\"string\"] | undefined;\n readonly fullName: $PropType[\"string\"] | undefined;\n readonly employeeId: $PropType[\"integer\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet\n extends $ObjectSet<EmployeeApiTest, EmployeeApiTest.ObjectSet>\n {}\n}\n\nexport interface EmployeeApiTest extends $ObjectTypeDefinition {\n type: \"object\";\n apiName: \"Employee\";\n __DefinitionMetadata?: {\n objectSet: EmployeeApiTest.ObjectSet;\n props: EmployeeApiTest.Props;\n linksType: EmployeeApiTest.Links;\n strictProps: EmployeeApiTest.StrictProps;\n apiName: \"Employee\";\n description: \"A full-time or part-time \\n\\n employee of our firm\";\n displayName: \"Employee\";\n icon: {\n type: \"blueprint\";\n color: \"blue\";\n name: \"person\";\n };\n implements: [\"FooInterface\"];\n interfaceMap: {\n FooInterface: {\n fooSpt: \"fullName\";\n };\n };\n inverseInterfaceMap: {\n FooInterface: {\n fullName: \"fooSpt\";\n };\n };\n links: {\n lead: $ObjectMetadata.Link<EmployeeApiTest, false>;\n peeps: $ObjectMetadata.Link<EmployeeApiTest, true>;\n };\n pluralDisplayName: \"Employees\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n properties: {\n class: $PropertyDef<\"string\", \"nullable\", \"single\">;\n fullName: $PropertyDef<\"string\", \"nullable\", \"single\">;\n employeeId: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\";\n status: \"ACTIVE\";\n titleProperty: \"fullName\";\n type: \"object\";\n visibility: \"NORMAL\";\n };\n}\n\nexport const EmployeeApiTest: EmployeeApiTest = {\n type: \"object\",\n apiName: \"Employee\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiFA,OAAO,MAAMA,eAAgC,GAAG;EAC9CC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export const FooInterfaceApiTest = {
18
+ type: "interface",
19
+ apiName: "FooInterface",
20
+ osdkMetadata: {}
21
+ };
22
+ //# sourceMappingURL=FooInterfaceApiTest.js.map