@osdk/client 2.8.0-beta.28 → 2.8.0-beta.29

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 (64) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js +3 -3
  3. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  4. package/build/browser/observable/ObservableClient.js.map +1 -1
  5. package/build/browser/observable/internal/ObservableClientImpl.js +32 -0
  6. package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
  7. package/build/browser/observable/internal/OrderByCanonicalizer.js +5 -2
  8. package/build/browser/observable/internal/OrderByCanonicalizer.js.map +1 -1
  9. package/build/browser/observable/internal/SelectCanonicalizer.js +3 -0
  10. package/build/browser/observable/internal/SelectCanonicalizer.js.map +1 -1
  11. package/build/browser/observable/internal/WhereClauseCanonicalizer.js +3 -0
  12. package/build/browser/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  13. package/build/browser/observable/internal/list/InterfaceListQuery.js +2 -6
  14. package/build/browser/observable/internal/list/InterfaceListQuery.js.map +1 -1
  15. package/build/browser/observable/internal/list/ListQuery.js +6 -0
  16. package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
  17. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  18. package/build/browser/queries/applyQuery.js +1 -1
  19. package/build/browser/queries/applyQuery.js.map +1 -1
  20. package/build/browser/util/UserAgent.js +2 -2
  21. package/build/cjs/{chunk-SV4AIIV4.cjs → chunk-KGWUPXAM.cjs} +2 -2
  22. package/build/cjs/{chunk-SV4AIIV4.cjs.map → chunk-KGWUPXAM.cjs.map} +1 -1
  23. package/build/cjs/{chunk-66XI45ES.cjs → chunk-XYZOCIVH.cjs} +40 -40
  24. package/build/cjs/chunk-XYZOCIVH.cjs.map +1 -0
  25. package/build/cjs/index.cjs +10 -10
  26. package/build/cjs/public/internal.cjs +8 -8
  27. package/build/cjs/public/unstable-do-not-use.cjs +117 -74
  28. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  29. package/build/cjs/public/unstable-do-not-use.d.cts +19 -1
  30. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +3 -3
  31. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  32. package/build/esm/observable/ObservableClient.js.map +1 -1
  33. package/build/esm/observable/internal/ObservableClientImpl.js +32 -0
  34. package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
  35. package/build/esm/observable/internal/OrderByCanonicalizer.js +5 -2
  36. package/build/esm/observable/internal/OrderByCanonicalizer.js.map +1 -1
  37. package/build/esm/observable/internal/SelectCanonicalizer.js +3 -0
  38. package/build/esm/observable/internal/SelectCanonicalizer.js.map +1 -1
  39. package/build/esm/observable/internal/WhereClauseCanonicalizer.js +3 -0
  40. package/build/esm/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  41. package/build/esm/observable/internal/list/InterfaceListQuery.js +2 -6
  42. package/build/esm/observable/internal/list/InterfaceListQuery.js.map +1 -1
  43. package/build/esm/observable/internal/list/ListQuery.js +6 -0
  44. package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
  45. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  46. package/build/esm/queries/applyQuery.js +1 -1
  47. package/build/esm/queries/applyQuery.js.map +1 -1
  48. package/build/esm/util/UserAgent.js +2 -2
  49. package/build/types/observable/ObservableClient.d.ts +19 -0
  50. package/build/types/observable/ObservableClient.d.ts.map +1 -1
  51. package/build/types/observable/internal/OrderByCanonicalizer.d.ts +2 -1
  52. package/build/types/observable/internal/OrderByCanonicalizer.d.ts.map +1 -1
  53. package/build/types/observable/internal/SelectCanonicalizer.d.ts +2 -0
  54. package/build/types/observable/internal/SelectCanonicalizer.d.ts.map +1 -1
  55. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts +1 -0
  56. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts.map +1 -1
  57. package/build/types/observable/internal/list/InterfaceListQuery.d.ts.map +1 -1
  58. package/build/types/observable/internal/list/ListQuery.d.ts +2 -0
  59. package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
  60. package/build/types/public/unstable-do-not-use.d.ts +1 -1
  61. package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
  62. package/build/types/queries/applyQuery.d.ts.map +1 -1
  63. package/package.json +7 -7
  64. package/build/cjs/chunk-66XI45ES.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js","../../src/internal/conversions/extractNamespace.ts","../../src/util/addUserAgentAndRequestContextHeaders.ts","../../src/util/extractObjectOrInterfaceType.ts","../../src/util/extractRdpDefinition.ts","../../src/util/objectSetUtils.ts","../../src/object/fetchPage.ts","../../src/internal/conversions/fullyQualifyPropName.ts","../../src/internal/conversions/makeGeoFilterBbox.ts","../../src/internal/conversions/makeGeoFilterPolygon.ts","../../src/internal/conversions/makeGeoFilterIntersects.ts","../../src/internal/conversions/makeGeoFilterWithin.ts","../../src/internal/conversions/toIntervalQuery.ts","../../src/internal/conversions/modernToLegacyWhereClause.ts","../../src/derivedProperties/derivedPropertyDefinitionFactory.ts","../../src/derivedProperties/createWithPropertiesObjectSet.ts","../../src/internal/conversions/modernToLegacyAggregationClause.ts","../../src/internal/conversions/legacyToModernSingleAggregationResult.ts","../../src/internal/conversions/modernToLegacyGroupByClause.ts","../../src/object/aggregate.ts","../../src/object/fetchSingle.ts","../../src/util/augmentRequestContext.ts","../../src/util/WireObjectSet.ts","../../src/objectSet/fetchLinksPage.ts","../../src/objectSet/createObjectSet.ts","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js","../../src/Client.ts","../../src/public-utils/hydrateAttachmentFromRid.ts","../../src/logger/BaseLogger.ts","../../src/logger/MinimalLogger.ts"],"names":["foundryPlatformFetch","createFetchHeaderMutator","def","objOrInterfaceDef","linkDef","invariant","objectSets","objectSetTypes","filteredObjectTypes","definitions","requestBody","result","DistanceUnitMapping","wrappedObjectSet","selectorResult","DurationMapping","aggregate","PalantirApiError","augment","_get","get"],"mappings":";;;;;;;;;;;;;AAgCA,IAAM,IAAO,GAAA,CAAC,CAAG,EAAA,uCAAA,EAAyC,CAAC,CAAA;AASpD,SAAS,GAAA,CAAI,SAAS,IAAM,EAAA;AACjC,EAAA,OAAOA,sCAAsB,CAAA,IAAA,EAAM,IAAM,EAAA,GAAG,IAAI,CAAA;AAClD;AAyBA,IAAM,OAAU,GAAA,CAAC,CAAG,EAAA,0CAAA,EAA4C,CAAC,CAAA;AAuC1D,SAAS,MAAA,CAAO,SAAS,IAAM,EAAA;AACpC,EAAA,OAAOA,sCAAsB,CAAA,IAAA,EAAM,OAAS,EAAA,GAAG,IAAI,CAAA;AACrD;;;AC5FA,IAAM,gBAAmB,GAAA,CAAC,CAAG,EAAA,+CAAA,EAAiD,CAAC,CAAA;AASxE,SAAS,eAAA,CAAgB,SAAS,IAAM,EAAA;AAC7C,EAAA,OAAOA,sCAAsB,CAAA,IAAA,EAAM,gBAAkB,EAAA,GAAG,IAAI,CAAA;AAC9D;AAaA,IAAM,KAAQ,GAAA,CAAC,CAAG,EAAA,2CAAA,EAA6C,CAAC,CAAA;AAgBzD,SAAS,IAAA,CAAK,SAAS,IAAM,EAAA;AAClC,EAAA,OAAOA,sCAAsB,CAAA,IAAA,EAAM,KAAO,EAAA,GAAG,IAAI,CAAA;AACnD;AACA,IAAM,wBAA2B,GAAA,CAAC,CAAG,EAAA,8DAAA,EAAgE,CAAC,CAAA;AAqB/F,SAAS,uBAAA,CAAwB,SAAS,IAAM,EAAA;AACrD,EAAA,OAAOA,sCAAsB,CAAA,IAAA,EAAM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5D,MAAA,IAAA,CAAK,IAAK,CAAA,CAAA,CAAA,EAAI,QAAS,CAAA,UAAU,CAAI,EAAA,CAAA,CAAA;AAAA;AAEvC,IAAA,OAAO,IAAI,IAAS,KAAA;AAElB,MAAQ,OAAA,CAAA,IAAA,KAAS,OAAU,GAAA,OAAA,GAAU,IAAI,CAAA,CAAE,KAAK,IAAK,CAAA,GAAG,CAAG,EAAA,GAAG,IAAI,CAAA;AAAA,KACpE;AAAA;AAEJ","file":"chunk-SV4AIIV4.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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/interfaceTypes\", 2];\n/**\n * Lists the interface types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}\", 2];\n/**\n * Gets a specific interface type with the given API name.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _listObjectsForInterface = [0, \"/v2/ontologies/{0}/interfaces/{1}\", 2];\n/**\n * Lists the objects for the given Ontology and interface type.\n *\n * Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or\n * repeated objects in the response pages.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Each page may be smaller or larger than the requested page size. However, it\n * is guaranteed that if there are more results available, at least one result will be present\n * in the response.\n *\n * Note that null value properties will not be returned.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}\n */\nexport function listObjectsForInterface($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listObjectsForInterface, ...args);\n}\nconst _search = [1, \"/v2/ontologies/{0}/interfaces/{1}/search\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object\n * sets.\n * :::\n * Search for objects in the specified ontology and interface type. Any properties specified in the \"where\" or\n * \"orderBy\" parameters must be shared property type API names defined on the interface. The following search\n * queries are supported:\n *\n * | Query type | Description | Supported Types |\n * |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------|\n * | lt | The provided property is less than the provided value. | number, string, date, timestamp |\n * | gt | The provided property is greater than the provided value. | number, string, date, timestamp |\n * | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp |\n * | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp |\n * | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp |\n * | isNull | The provided property is (or is not) null. | all |\n * | contains | The provided property contains the provided value. | array |\n * | not | The sub-query does not match. | N/A (applied on a query) |\n * | and | All the sub-queries match. | N/A (applied on queries) |\n * | or | At least one of the sub-queries match. | N/A (applied on queries) |\n * | startsWith | The provided property starts with the provided term. | string |\n * | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string |\n * | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string |\n * | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string |\n * | containsAllTerms | The provided property contains all the terms separated by whitespace. | string |\n *\n * Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'\"~`). Periods (`.`) on their own are ignored.\n * Partial terms are not matched by terms filters except where explicitly noted.\n *\n * Attempting to use an unsupported query will result in a validation error. Third-party applications using this\n * endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/search\n */\nexport function search($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _search, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/interfaces/{1}/aggregate\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object\n * sets.\n * :::\n * Perform functions on object fields in the specified ontology and of the specified interface type. Any\n * properties specified in the query must be shared property type API names defined on the interface.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...args);\n}\nconst _listOutgoingInterfaceLinkTypes = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}/outgoingLinkTypes\", 2];\n/**\n * List the outgoing interface link types for an interface type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes\n */\nexport function listOutgoingInterfaceLinkTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listOutgoingInterfaceLinkTypes, ...args);\n}\nconst _getOutgoingInterfaceLinkType = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}/outgoingLinkTypes/{2}\", 2];\n/**\n * Get an outgoing interface link type for an interface type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes/{interfaceLinkType}\n */\nexport function getOutgoingInterfaceLinkType($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getOutgoingInterfaceLinkType, ...args);\n}\nconst _listInterfaceLinkedObjects = [0, \"/v2/ontologies/{0}/interfaces/{1}/{2}/{3}/links/{4}\", 2];\n/**\n * Lists the linked objects for a specific object and the given interface link type.\n *\n * Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or\n * repeated objects in the response pages.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Each page may be smaller or larger than the requested page size. However, it\n * is guaranteed that if there are more results available, at least one result will be present\n * in the response.\n *\n * Note that null value properties will not be returned.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/{objectType}/{primaryKey}/links/{interfaceLinkType}\n */\nexport function listInterfaceLinkedObjects($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listInterfaceLinkedObjects, ...args);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _createTemporary = [1, \"/v2/ontologies/{0}/objectSets/createTemporary\", 3];\n/**\n * Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectSets/createTemporary\n */\nexport function createTemporary($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _createTemporary, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objectSets/{1}\"];\n/**\n * Gets the definition of the `ObjectSet` with the given RID.\n *\n * @alpha\n *\n * Required Scopes: []\n * URL: /v2/ontologies/{ontology}/objectSets/{objectSetRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _load = [1, \"/v2/ontologies/{0}/objectSets/loadObjects\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjects\n */\nexport function load($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _load, ...args);\n}\nconst _loadMultipleObjectTypes = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsMultipleObjectTypes\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting\n * objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped\n * to an interface, in which only the object type properties that implement the properties of any interfaces in its\n * scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to\n * object implementation is returned in order to interpret the objects as the interfaces that they implement.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `loadObjects`.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes\n */\nexport function loadMultipleObjectTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadMultipleObjectTypes, ...args);\n}\nconst _loadObjectsOrInterfaces = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsOrInterfaces\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested\n * object set contains interfaces and the object can be viewed as an interface, it will contain the properties\n * defined by the interface. If not, it will contain the properties defined by its object type. This allows directly\n * loading all objects of an interface where all objects are viewed as the interface, for example.\n *\n * Note that the result object set cannot contain a mix of objects with \"interface\" properties and \"object type\"\n * properties. Attempting to load an object set like this will result in an error.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `/loadObjects`.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces\n */\nexport function loadObjectsOrInterfaces($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadObjectsOrInterfaces, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/objectSets/aggregate\", 3];\n/**\n * Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...args);\n}\nconst _loadLinks = [1, \"/v2/ontologies/{0}/objectSets/loadLinks\", 3];\n/**\n * Loads the specified links from the defined object set.\n *\n * Links are defined as a link type API name and object locators for the source and target objects\n * where only the `__primaryKey` and `__apiName` properties are loaded.\n *\n * Links are grouped by source object locator; however, the links for a given source object may be\n * split over multiple entries with the same source object locator.\n *\n * Please keep these limitations in mind:\n *\n * * Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore.\n * * This endpoint requests links for 1,000 objects at a time. If, for any page of 1,000 objects, there are more\n * than 100,000 links present, results are limited to 100,000 links and should be considered partial.\n * * This endpoint does not support OSv1 links and will return an error if links provided are backed by OSv1.\n * * This endpoint currently does not support interface object sets or interface links, but support will be added in the near future.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadLinks\n */\nexport function loadLinks($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadLinks, ...args);\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function extractNamespace(fqApiName) {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1) return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetchHeaderMutator } from \"@osdk/shared.net.fetch\";\nexport const addUserAgentAndRequestContextHeaders = (client, withMetadata) => ({\n ...client,\n fetch: createFetchHeaderMutator(client.fetch, headers => {\n headers.set(\"X-OSDK-Request-Context\", JSON.stringify(client.requestContext));\n if (withMetadata.osdkMetadata) {\n headers.set(\"Fetch-User-Agent\", withMetadata.osdkMetadata.extraUserAgent);\n }\n return headers;\n })\n});","/*\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 invariant from \"tiny-invariant\";\n/* @internal\n* Returns the resultant interface or object type of the object set\n*/\nexport async function extractObjectOrInterfaceType(clientCtx, objectSet) {\n switch (objectSet.type) {\n case \"searchAround\":\n {\n const def = await extractObjectOrInterfaceType(clientCtx, objectSet.objectSet);\n if (def === undefined) {\n return undefined;\n }\n const objOrInterfaceDef = def.type === \"object\" ? await clientCtx.ontologyProvider.getObjectDefinition(def.apiName) : await clientCtx.ontologyProvider.getInterfaceDefinition(def.apiName);\n const linkDef = objOrInterfaceDef.links[objectSet.link];\n !linkDef ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing link definition for '${objectSet.link}'`) : invariant(false) : void 0;\n return objOrInterfaceDef.type === \"object\" ? {\n apiName: objOrInterfaceDef.links[objectSet.link].targetType,\n type: \"object\"\n } : {\n apiName: objOrInterfaceDef.links[objectSet.link].targetTypeApiName,\n type: objOrInterfaceDef.links[objectSet.link].targetType\n };\n }\n case \"withProperties\":\n {\n return extractObjectOrInterfaceType(clientCtx, objectSet.objectSet);\n }\n case \"methodInput\":\n return undefined;\n case \"base\":\n return {\n type: \"object\",\n apiName: objectSet.objectType\n };\n case \"interfaceBase\":\n return {\n type: \"interface\",\n apiName: objectSet.interfaceType\n };\n case \"filter\":\n case \"asBaseObjectTypes\":\n case \"nearestNeighbors\":\n return extractObjectOrInterfaceType(clientCtx, objectSet.objectSet);\n case \"asType\":\n return {\n type: clientCtx.narrowTypeInterfaceOrObjectMapping[objectSet.entityType],\n apiName: objectSet.entityType\n };\n case \"intersect\":\n {\n const objectSets = objectSet.objectSets;\n const objectSetTypes = await Promise.all(objectSets.map(os => extractObjectOrInterfaceType(clientCtx, os)));\n const filteredObjectTypes = objectSetTypes.filter(Boolean);\n const firstInterfaceType = filteredObjectTypes.find(val => val?.type === \"interface\");\n !firstInterfaceType ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing interface type in intersect objectset scope'`) : invariant(false) : void 0;\n return firstInterfaceType;\n }\n case \"subtract\":\n case \"union\":\n const objectSets = objectSet.objectSets;\n const objectSetTypes = await Promise.all(objectSets.map(os => extractObjectOrInterfaceType(clientCtx, os)));\n const filteredObjectTypes = objectSetTypes.filter(Boolean);\n const firstObjectType = filteredObjectTypes[0];\n !filteredObjectTypes.every(val => {\n return val?.apiName === firstObjectType?.apiName && val?.type === firstObjectType?.type;\n }) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Can only have one object type when doing subtract, union\") : invariant(false) : void 0;\n return filteredObjectTypes[0];\n case \"static\":\n case \"reference\":\n // Static and reference object sets are always intersected with a base object set, so we can just return undefined.\n return undefined;\n case \"interfaceLinkSearchAround\":\n const def = await extractObjectOrInterfaceType(clientCtx, objectSet.objectSet);\n if (def === undefined) {\n return undefined;\n }\n const objOrInterfaceDef = def.type === \"object\" ? await clientCtx.ontologyProvider.getObjectDefinition(def.apiName) : await clientCtx.ontologyProvider.getInterfaceDefinition(def.apiName);\n const linkDef = objOrInterfaceDef.links[objectSet.interfaceLink];\n !linkDef ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing link definition for '${objectSet.interfaceLink}'`) : invariant(false) : void 0;\n return objOrInterfaceDef.type === \"object\" ? {\n apiName: objOrInterfaceDef.links[objectSet.interfaceLink].targetType,\n type: \"object\"\n } : {\n apiName: objOrInterfaceDef.links[objectSet.interfaceLink].targetTypeApiName,\n type: objOrInterfaceDef.links[objectSet.interfaceLink].targetType\n };\n // We don't have to worry about new object sets being added and doing a runtime break and breaking people since the OSDK is always constructing these.\n default:\n const _ = objectSet;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Unsupported object set type for deriving object or interface type,`) : invariant(false) : void 0;\n }\n}","/*\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 invariant from \"tiny-invariant\";\nexport async function extractRdpDefinition(clientCtx, objectSet) {\n return (await extractRdpDefinitionInternal(clientCtx, objectSet, undefined)).definitions;\n}\n\n/* @internal\n* Returns a tuple of the derived property definitions and the object type that the derived property is defined on.\n*/\nasync function extractRdpDefinitionInternal(clientCtx, objectSet, methodInputObjectType) {\n switch (objectSet.type) {\n case \"searchAround\":\n {\n const {\n definitions,\n childObjectType\n } = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);\n if (childObjectType === undefined || childObjectType === \"\") {\n return {\n definitions: {}\n };\n }\n const objDef = await clientCtx.ontologyProvider.getObjectDefinition(childObjectType);\n const linkDef = objDef.links[objectSet.link];\n !linkDef ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing link definition for '${objectSet.link}'`) : invariant(false) : void 0;\n return {\n definitions,\n childObjectType: objDef.links[objectSet.link].targetType\n };\n }\n case \"withProperties\":\n {\n // These are the definitions and current object type for all object set operations prior to the definition (e.g. filter, pivotTo, etc.)\n const {\n definitions,\n childObjectType\n } = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);\n if (childObjectType === undefined || childObjectType === \"\") {\n return {\n definitions: {}\n };\n }\n for (const [name, definition] of Object.entries(objectSet.derivedProperties)) {\n if (definition.type !== \"selection\") {\n definitions[name] = {\n selectedOrCollectedPropertyType: undefined,\n definition\n };\n continue;\n }\n switch (definition.operation.type) {\n case \"collectList\":\n case \"collectSet\":\n case \"get\":\n // This is the object set construction for the derived property definition construction. We pass in childObjectType so that when we reach MethodInputObjectSet, we know where to start looking.\n const {\n childObjectType: operationLevelObjectType\n } = await extractRdpDefinitionInternal(clientCtx, definition.objectSet, childObjectType);\n if (operationLevelObjectType === undefined || operationLevelObjectType === \"\") {\n return {\n definitions: {}\n };\n }\n const objDef = await clientCtx.ontologyProvider.getObjectDefinition(operationLevelObjectType);\n definitions[name] = {\n selectedOrCollectedPropertyType: objDef.properties[definition.operation.selectedPropertyApiName],\n definition\n };\n break;\n default:\n definitions[name] = {\n selectedOrCollectedPropertyType: undefined,\n definition\n };\n }\n }\n return {\n definitions,\n childObjectType\n };\n }\n case \"methodInput\":\n return {\n definitions: {},\n childObjectType: methodInputObjectType\n };\n case \"base\":\n return {\n definitions: {},\n childObjectType: objectSet.objectType\n };\n case \"interfaceBase\":\n return {\n definitions: {},\n childObjectType: objectSet.interfaceType\n };\n case \"filter\":\n case \"asBaseObjectTypes\":\n case \"asType\":\n case \"nearestNeighbors\":\n return extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);\n // These will throw in OSS so we should throw here so no request is made\n case \"intersect\":\n case \"subtract\":\n case \"union\":\n const objectSets = objectSet.objectSets;\n const objectSetTypes = await Promise.all(objectSets.map(os => extractRdpDefinitionInternal(clientCtx, os, methodInputObjectType)));\n const definitions = objectSetTypes.reduce((acc, {\n definitions\n }) => ({\n ...acc,\n ...definitions\n }), {});\n !(Object.keys(definitions).length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Object sets combined using intersect, subtract, or union must not contain any derived property definitions\") : invariant(false) : void 0;\n const firstValidChildObjectType = objectSetTypes.find(({\n childObjectType\n }) => childObjectType != null)?.childObjectType;\n !objectSetTypes.every(({\n childObjectType\n }) => childObjectType === firstValidChildObjectType || childObjectType == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"All object sets in an intersect, subtract, or union must have the same child object type\") : invariant(false) : void 0;\n return {\n definitions: {},\n childObjectType: firstValidChildObjectType\n };\n case \"static\":\n case \"reference\":\n // Static and reference object sets are always intersected with a base object set, so we can just return no child object type.\n return {\n definitions: {}\n };\n // We don't have to worry about new object sets being added and doing a runtime break and breaking people since the OSDK is always constructing these.\n case \"interfaceLinkSearchAround\":\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Unsupported object set type for Runtime Derived Properties`) : invariant(false) : void 0;\n default:\n const _ = objectSet;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Unsupported object set type for Runtime Derived Properties`) : invariant(false) : void 0;\n }\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 function resolveBaseObjectSetType(objectType) {\n return objectType.type === \"interface\" ? {\n type: \"interfaceBase\",\n interfaceType: objectType[\"apiName\"]\n } : {\n type: \"base\",\n objectType: objectType[\"apiName\"]\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as OntologyInterfaces from \"@osdk/foundry.ontologies/OntologyInterface\";\nimport * as OntologyObjectSets from \"@osdk/foundry.ontologies/OntologyObjectSet\";\nimport invariant from \"tiny-invariant\";\nimport { extractNamespace } from \"../internal/conversions/extractNamespace.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { extractObjectOrInterfaceType } from \"../util/extractObjectOrInterfaceType.js\";\nimport { extractRdpDefinition } from \"../util/extractRdpDefinition.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\nexport function augment(type, ...properties) {\n return {\n [type.apiName]: properties\n };\n}\n\n/** @internal */\nexport function objectSetToSearchJsonV2(objectSet, expectedApiName, existingWhere = undefined) {\n if (objectSet.type === \"base\" || objectSet.type === \"interfaceBase\") {\n if (objectSet.type === \"base\" && objectSet.objectType !== expectedApiName) {\n throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.objectType}`);\n }\n if (objectSet.type === \"interfaceBase\" && objectSet.interfaceType !== expectedApiName) {\n throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.interfaceType}`);\n }\n return existingWhere;\n }\n if (objectSet.type === \"filter\") {\n return objectSetToSearchJsonV2(objectSet.objectSet, expectedApiName, existingWhere == null ? objectSet.where : {\n type: \"and\",\n value: [existingWhere, objectSet.where]\n });\n }\n throw new Error(`Unsupported objectSet type: ${objectSet.type}`);\n}\n\n/** @internal */\nexport function resolveInterfaceObjectSet(objectSet, interfaceTypeApiName, args) {\n return args?.$includeAllBaseObjectProperties ? {\n type: \"intersect\",\n objectSets: [objectSet, {\n type: \"interfaceBase\",\n interfaceType: interfaceTypeApiName,\n includeAllBaseObjectProperties: true\n }]\n } : objectSet;\n}\n\n/** @internal */\nexport async function fetchStaticRidPage(client, rids, args, useSnapshot = false) {\n const shouldLoadPropertySecurities = args.$loadPropertySecurityMetadata ?? false;\n const requestBody = await applyFetchArgs(args, {\n objectSet: {\n type: \"static\",\n objects: rids\n },\n select: args?.$select ?? [],\n excludeRid: !args?.$includeRid,\n snapshot: useSnapshot,\n loadPropertySecurities: shouldLoadPropertySecurities\n }, client, {\n type: \"object\",\n apiName: \"\"\n });\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const result = await OntologyObjectSets.loadMultipleObjectTypes(addUserAgentAndRequestContextHeaders(client, {\n osdkMetadata: undefined\n }), await client.ontologyRid, requestBody, {\n preview: true,\n transactionId: client.transactionId\n });\n return Promise.resolve({\n data: await client.objectFactory2(client, result.data, undefined, {}, shouldLoadPropertySecurities ? result.propertySecurities : undefined, !args.$includeRid, args.$select, false, result.interfaceToObjectTypeMappings, result.interfaceToObjectTypeMappingsV2),\n nextPageToken: result.nextPageToken,\n totalCount: result.totalCount\n });\n}\nasync function fetchInterfacePage(client, interfaceType, args, objectSet, useSnapshot = false) {\n if (args.$__UNSTABLE_useOldInterfaceApis) {\n !(args.$loadPropertySecurityMetadata === false || args.$loadPropertySecurityMetadata === undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"`$loadPropertySecurityMetadata` is not supported with old interface APIs\") : invariant(false) : void 0;\n const baseRequestBody = {\n augmentedProperties: {},\n augmentedSharedPropertyTypes: {},\n augmentedInterfacePropertyTypes: {},\n otherInterfaceTypes: [],\n selectedObjectTypes: [],\n selectedSharedPropertyTypes: args.$select ? [...args.$select] : [],\n selectedInterfacePropertyTypes: [],\n where: objectSetToSearchJsonV2(objectSet, interfaceType.apiName)\n };\n const requestBody = await applyFetchArgs(args, baseRequestBody, client, interfaceType);\n if (requestBody.selectedSharedPropertyTypes.length > 0) {\n const remapped = remapPropertyNames(interfaceType, requestBody.selectedSharedPropertyTypes);\n requestBody.selectedSharedPropertyTypes = Array.from(remapped);\n }\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const result = await OntologyInterfaces.search(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, interfaceType.apiName, requestBody, {\n preview: true\n });\n result.data = await client.objectFactory(client, result.data,\n // drop readonly\n interfaceType.apiName, !args.$includeRid, await extractRdpDefinition(client, objectSet), undefined);\n return result;\n }\n const extractedInterfaceTypeApiName = (await extractObjectOrInterfaceType(client, objectSet))?.apiName ?? interfaceType.apiName;\n const resolvedInterfaceObjectSet = resolveInterfaceObjectSet(objectSet, extractedInterfaceTypeApiName, args);\n const shouldLoadPropertySecurities = args.$loadPropertySecurityMetadata ?? false;\n const requestBody = await buildAndRemapRequestBody(args, {\n objectSet: resolvedInterfaceObjectSet,\n select: args?.$select ? [...args.$select] : [],\n selectV2: [],\n loadPropertySecurities: shouldLoadPropertySecurities,\n excludeRid: !args?.$includeRid,\n snapshot: useSnapshot\n }, client, interfaceType);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const result = await OntologyObjectSets.loadMultipleObjectTypes(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, requestBody, {\n preview: true,\n branch: client.branch,\n transactionId: client.transactionId\n });\n return Promise.resolve({\n data: await client.objectFactory2(client, result.data, extractedInterfaceTypeApiName, {}, shouldLoadPropertySecurities ? result.propertySecurities : undefined, !args.$includeRid, args.$select, false, result.interfaceToObjectTypeMappings, result.interfaceToObjectTypeMappingsV2),\n nextPageToken: result.nextPageToken,\n totalCount: result.totalCount\n });\n}\n\n/** @internal */\nexport async function fetchPageInternal(client, objectType, objectSet, args = {}, useSnapshot = false) {\n if (objectType.type === \"interface\") {\n return await fetchInterfacePage(client, objectType, args, objectSet, useSnapshot); // fixme\n } else {\n return await fetchObjectPage(client, objectType, args, objectSet, useSnapshot); // fixme\n }\n}\n\n/** @internal */\nexport async function fetchPageWithErrorsInternal(client, objectType, objectSet, args = {}) {\n try {\n const result = await fetchPageInternal(client, objectType, objectSet, args);\n return {\n value: result\n };\n } catch (e) {\n if (e instanceof Error) {\n return {\n error: e\n };\n }\n return {\n error: e\n };\n }\n}\n\n/**\n * @param client\n * @param objectType\n * @param args\n * @param objectSet\n * @returns\n * @internal\n */\nexport async function fetchPage(client, objectType, args, objectSet = resolveBaseObjectSetType(objectType)) {\n return fetchPageInternal(client, objectType, objectSet, args);\n}\n\n/** @internal */\nexport async function fetchPageWithErrors(client, objectType, args, objectSet = resolveBaseObjectSetType(objectType)) {\n return fetchPageWithErrorsInternal(client, objectType, objectSet, args);\n}\n\n/** @internal */\nasync function buildAndRemapRequestBody(args, baseBody, client, objectType) {\n const requestBody = await applyFetchArgs(args, baseBody, client, objectType);\n if (requestBody.select != null && requestBody.select.length > 0) {\n const remapped = remapPropertyNames(objectType, requestBody.select);\n return {\n ...requestBody,\n select: remapped\n };\n }\n return requestBody;\n}\n\n/** @internal */\nexport function remapPropertyNames(objectOrInterface, propertyNames) {\n if (objectOrInterface == null) {\n return propertyNames;\n }\n if (objectOrInterface.type === \"interface\") {\n const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);\n return propertyNames.map(name => {\n const [fieldApiNamespace, fieldShortName] = extractNamespace(name);\n return fieldApiNamespace == null && objApiNamespace != null ? `${objApiNamespace}.${fieldShortName}` : name;\n });\n }\n return propertyNames;\n}\nasync function applyFetchArgs(args, body, _client, objectType) {\n if (args?.$nextPageToken) {\n body.pageToken = args.$nextPageToken;\n }\n if (args?.$pageSize != null) {\n body.pageSize = args.$pageSize;\n }\n if (args?.$loadPropertySecurityMetadata) {\n body.loadPropertySecurities = true;\n }\n const orderBy = args?.$orderBy;\n if (orderBy) {\n if (orderBy === \"relevance\") {\n body.orderBy = {\n orderType: \"relevance\",\n fields: []\n };\n } else {\n const orderByEntries = Object.entries(orderBy);\n const fieldNames = orderByEntries.map(([field]) => field);\n const remappedFields = remapPropertyNames(objectType, fieldNames);\n body.orderBy = {\n fields: orderByEntries.map(([, direction], index) => ({\n field: remappedFields[index],\n direction\n }))\n };\n }\n }\n return body;\n}\n\n/** @internal */\nexport async function fetchObjectPage(client, objectType, args, objectSet, useSnapshot = false) {\n // For simple object fetches, since we know the object type up front\n // we can parallelize network requests for loading metadata and loading the actual objects\n // In our object factory we await and block on loading the metadata, which if this call finishes, should already be cached on the client\n // We have an empty catch here so that if this call errors before we await later, we won't have an unhandled promise rejection that would crash the process\n // Swallowing the error is ok because we await the metadata load in the objectFactory later anyways which eventually bubbles up the error to the user\n void client.ontologyProvider.getObjectDefinition(objectType.apiName).catch(() => {});\n const shouldLoadPropertySecurities = args.$loadPropertySecurityMetadata ?? false;\n const requestBody = await buildAndRemapRequestBody(args, {\n objectSet,\n select: args?.$select ? [...args.$select] : [],\n selectV2: [],\n loadPropertySecurities: shouldLoadPropertySecurities,\n excludeRid: !args?.$includeRid,\n snapshot: useSnapshot\n }, client, objectType);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const r = await OntologyObjectSets.load(addUserAgentAndRequestContextHeaders(client, objectType), await client.ontologyRid, requestBody, {\n branch: client.branch,\n transactionId: client.transactionId\n });\n return Promise.resolve({\n data: await client.objectFactory(client, r.data, undefined, undefined, await extractRdpDefinition(client, objectSet), shouldLoadPropertySecurities ? r.propertySecurities : undefined, args.$select, false),\n nextPageToken: r.nextPageToken,\n totalCount: r.totalCount\n });\n}","/*\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 { extractNamespace } from \"./extractNamespace.js\";\nexport function fullyQualifyPropName(fieldName, objectOrInterface) {\n if (objectOrInterface.type === \"interface\") {\n const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);\n const [fieldApiNamespace, fieldShortName] = extractNamespace(fieldName);\n return fieldApiNamespace == null && objApiNamespace != null ? `${objApiNamespace}.${fieldShortName}` : fieldName;\n }\n return fieldName;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function makeGeoFilterBbox(bbox, filterType, propertyIdentifier, field) {\n return {\n type: filterType === \"$within\" ? \"withinBoundingBox\" : \"intersectsBoundingBox\",\n /**\n * This is a bit ugly, but did this so that propertyIdentifier only shows up in the return object if its defined,\n * this makes it so we don't need to go update our entire test bed either to include a field which may change in near future.\n * Once we solidify that this is the way forward, I can remove field and clean this up\n */\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: {\n topLeft: {\n type: \"Point\",\n coordinates: [bbox[0], bbox[3]]\n },\n bottomRight: {\n type: \"Point\",\n coordinates: [bbox[2], bbox[1]]\n }\n }\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function makeGeoFilterPolygon(coordinates, filterType, propertyIdentifier, field) {\n return {\n type: filterType,\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: {\n type: \"Polygon\",\n coordinates\n }\n };\n}","/*\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 { makeGeoFilterBbox } from \"./makeGeoFilterBbox.js\";\nimport { makeGeoFilterPolygon } from \"./makeGeoFilterPolygon.js\";\nexport function makeGeoFilterIntersects(intersectsBody, propertyIdentifier, field) {\n if (Array.isArray(intersectsBody)) {\n return makeGeoFilterBbox(intersectsBody, \"$intersects\", propertyIdentifier, field);\n } else if (\"$bbox\" in intersectsBody && intersectsBody.$bbox != null) {\n return makeGeoFilterBbox(intersectsBody.$bbox, \"$intersects\", propertyIdentifier, field);\n } else {\n const coordinates = \"$polygon\" in intersectsBody ? intersectsBody.$polygon : intersectsBody.coordinates;\n return makeGeoFilterPolygon(coordinates, \"intersectsPolygon\", propertyIdentifier, field);\n }\n}","/*\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 { DistanceUnitMapping } from \"@osdk/api\";\nimport { makeGeoFilterBbox } from \"./makeGeoFilterBbox.js\";\nimport { makeGeoFilterPolygon } from \"./makeGeoFilterPolygon.js\";\nexport function makeGeoFilterWithin(withinBody, propertyIdentifier, field) {\n if (Array.isArray(withinBody)) {\n return makeGeoFilterBbox(withinBody, \"$within\", propertyIdentifier, field);\n } else if (\"$bbox\" in withinBody && withinBody.$bbox != null) {\n return makeGeoFilterBbox(withinBody.$bbox, \"$within\", propertyIdentifier, field);\n } else if (\"$distance\" in withinBody && \"$of\" in withinBody && withinBody.$distance != null && withinBody.$of != null) {\n return {\n type: \"withinDistanceOf\",\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: {\n center: Array.isArray(withinBody.$of) ? {\n type: \"Point\",\n coordinates: withinBody.$of\n } : withinBody.$of,\n distance: {\n value: withinBody.$distance[0],\n unit: DistanceUnitMapping[withinBody.$distance[1]]\n }\n }\n };\n } else {\n const coordinates = \"$polygon\" in withinBody ? withinBody.$polygon : withinBody.coordinates;\n return makeGeoFilterPolygon(coordinates, \"withinPolygon\", propertyIdentifier, field);\n }\n}","/*\n * Copyright 2026 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 invariant from \"tiny-invariant\";\nexport function toIntervalQueryRule(rule) {\n if (rule.$match != null) {\n if (rule.$prefixOnLastTerm) {\n return {\n type: \"prefixOnLastToken\",\n query: rule.$match\n };\n }\n return {\n type: \"match\",\n query: rule.$match,\n ordered: rule.$ordered,\n maxGaps: rule.$maxGaps\n };\n }\n if (rule.$and != null) {\n return {\n type: \"allOf\",\n rules: rule.$and.map(toIntervalQueryRule),\n ordered: rule.$ordered,\n maxGaps: rule.$maxGaps\n };\n }\n if (rule.$or != null) {\n return {\n type: \"anyOf\",\n rules: rule.$or.map(toIntervalQueryRule)\n };\n }\n if (rule.$fuzzy != null) {\n return {\n type: \"fuzzy\",\n term: rule.$fuzzy,\n fuzziness: rule.$fuzziness\n };\n }\n const _ = rule;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Unknown interval rule type\") : invariant(false) : void 0;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { fullyQualifyPropName } from \"./fullyQualifyPropName.js\";\nimport { makeGeoFilterIntersects } from \"./makeGeoFilterIntersects.js\";\nimport { makeGeoFilterWithin } from \"./makeGeoFilterWithin.js\";\nimport { toIntervalQueryRule } from \"./toIntervalQuery.js\";\nfunction isAndClause(whereClause) {\n return \"$and\" in whereClause && whereClause.$and !== undefined;\n}\nfunction isOrClause(whereClause) {\n return \"$or\" in whereClause && whereClause.$or !== undefined;\n}\nfunction isNotClause(whereClause) {\n return \"$not\" in whereClause && whereClause.$not !== undefined;\n}\n\n/** @internal */\nexport function modernToLegacyWhereClause(whereClause, objectOrInterface, rdpNames) {\n const parts = Object.entries(whereClause).map(([key, value]) => ({\n [key]: value\n }));\n if (parts.length === 1) {\n return modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames);\n }\n return {\n type: \"and\",\n value: parts.map(v => modernToLegacyWhereClauseInner(v, objectOrInterface, rdpNames))\n };\n}\n\n/** @internal */\nexport function modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames) {\n const parts = Object.entries(whereClause);\n !(parts.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid where clause provided.\") : invariant(false) : void 0;\n if (isAndClause(whereClause)) {\n return {\n type: \"and\",\n value: whereClause.$and.map(clause => modernToLegacyWhereClause(clause, objectOrInterface, rdpNames))\n };\n } else if (isOrClause(whereClause)) {\n return {\n type: \"or\",\n value: whereClause.$or.map(clause => modernToLegacyWhereClause(clause, objectOrInterface, rdpNames))\n };\n } else if (isNotClause(whereClause)) {\n return {\n type: \"not\",\n value: modernToLegacyWhereClause(whereClause.$not, objectOrInterface, rdpNames)\n };\n }\n return handleWherePair(parts[0], objectOrInterface, undefined, rdpNames);\n}\nfunction handleWherePair([fieldName, filter], objectOrInterface, structFieldSelector, rdpNames) {\n !(filter != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Cannot filter on property \"${fieldName}\" with an undefined or null value. ` + `If the value might be undefined, check it before adding to the where clause.`) : invariant(false) : void 0;\n const isRdp = !structFieldSelector && rdpNames?.has(fieldName);\n const propertyIdentifier = isRdp ? {\n type: \"property\",\n apiName: fieldName\n } : structFieldSelector != null ? {\n type: \"structField\",\n ...structFieldSelector,\n propertyApiName: fullyQualifyPropName(structFieldSelector.propertyApiName, objectOrInterface)\n } : undefined;\n const field = !isRdp && structFieldSelector == null ? fullyQualifyPropName(fieldName, objectOrInterface) : undefined;\n !(field == null || propertyIdentifier == null && (field != null || isRdp != null)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Encountered error constructing where clause: field and propertyIdentifier cannot both be defined\") : invariant(false) : void 0;\n if (typeof filter === \"string\" || typeof filter === \"number\" || typeof filter === \"boolean\") {\n return {\n type: \"eq\",\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: filter\n };\n }\n const keysOfFilter = Object.keys(filter);\n\n // If any of the keys start with `$` then they must be the only one.\n // e.g. `where({ name: { $eq: \"foo\", $ne: \"bar\" } })` is invalid currently\n const hasDollarSign = keysOfFilter.some(key => key.startsWith(\"$\"));\n !(!hasDollarSign || keysOfFilter.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"A WhereClause Filter with multiple clauses/fields is not allowed. Instead, use an 'or'/'and' clause to combine multiple filters.\") : invariant(false) : void 0;\n\n // Struct\n if (!hasDollarSign) {\n const structFilter = Object.entries(filter);\n !(structFilter.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot filter on more than one struct field in the same clause, need to use an and clause\") : invariant(false) : void 0;\n const structFieldApiName = keysOfFilter[0];\n return handleWherePair(Object.entries(filter)[0], objectOrInterface, {\n propertyApiName: fieldName,\n structFieldApiName\n }, rdpNames);\n }\n const firstKey = keysOfFilter[0];\n !(filter[firstKey] != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n if (firstKey === \"$contains\" && filter[firstKey] instanceof Object) {\n const containsValue = filter[firstKey];\n const containsKeys = Object.keys(containsValue);\n const isFilterObject = containsKeys.some(key => key.startsWith(\"$\"));\n if (isFilterObject) {\n return handleWherePair([fieldName, containsValue], objectOrInterface, structFieldSelector, rdpNames);\n } else {\n const structFilter = Object.entries(containsValue);\n !(structFilter.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot filter on more than one struct field in the same clause, need to use an and clause\") : invariant(false) : void 0;\n const structFieldApiName = structFilter[0][0];\n return handleWherePair(structFilter[0], objectOrInterface, {\n propertyApiName: fieldName,\n structFieldApiName\n });\n }\n }\n if (firstKey === \"$ne\") {\n return {\n type: \"not\",\n value: {\n type: \"eq\",\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: filter[firstKey]\n }\n };\n }\n if (firstKey === \"$within\") {\n return makeGeoFilterWithin(filter[firstKey], propertyIdentifier, field);\n }\n if (firstKey === \"$intersects\") {\n return makeGeoFilterIntersects(filter[firstKey], propertyIdentifier, field);\n }\n if (firstKey === \"$containsAllTerms\" || firstKey === \"$containsAnyTerm\") {\n return {\n type: firstKey.substring(1),\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: typeof filter[firstKey] === \"string\" ? filter[firstKey] : filter[firstKey][\"term\"],\n fuzzy: typeof filter[firstKey] === \"string\" ? false : filter[firstKey][\"fuzzySearch\"] ?? false\n };\n }\n if (firstKey === \"$interval\") {\n return {\n type: \"interval\",\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n rule: toIntervalQueryRule(filter[firstKey])\n };\n }\n return {\n type: firstKey.substring(1),\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: filter[firstKey]\n };\n}","/*\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 invariant from \"tiny-invariant\";\n\n/** @internal */\nexport function derivedPropertyDefinitionFactory(wireDefinition, definitionMap) {\n const definition = {\n abs() {\n return derivedPropertyDefinitionFactory({\n type: \"absoluteValue\",\n property: wireDefinition\n }, definitionMap);\n },\n negate() {\n return derivedPropertyDefinitionFactory({\n type: \"negate\",\n property: wireDefinition\n }, definitionMap);\n },\n max(value) {\n return derivedPropertyDefinitionFactory({\n type: \"greatest\",\n properties: [wireDefinition, getDefinitionFromMap(value, definitionMap)]\n }, definitionMap);\n },\n min(value) {\n return derivedPropertyDefinitionFactory({\n type: \"least\",\n properties: [wireDefinition, getDefinitionFromMap(value, definitionMap)]\n }, definitionMap);\n },\n add(value) {\n return derivedPropertyDefinitionFactory({\n type: \"add\",\n properties: [wireDefinition, getDefinitionFromMap(value, definitionMap)]\n }, definitionMap);\n },\n subtract(value) {\n return derivedPropertyDefinitionFactory({\n \"type\": \"subtract\",\n \"left\": wireDefinition,\n \"right\": getDefinitionFromMap(value, definitionMap)\n }, definitionMap);\n },\n multiply(value) {\n return derivedPropertyDefinitionFactory({\n type: \"multiply\",\n properties: [wireDefinition, getDefinitionFromMap(value, definitionMap)]\n }, definitionMap);\n },\n divide(value) {\n return derivedPropertyDefinitionFactory({\n \"type\": \"divide\",\n \"left\": wireDefinition,\n \"right\": getDefinitionFromMap(value, definitionMap)\n }, definitionMap);\n },\n extractPart: part => {\n return derivedPropertyDefinitionFactory({\n type: \"extract\",\n part,\n property: wireDefinition\n }, definitionMap);\n }\n };\n definitionMap.set(definition, wireDefinition);\n return definition;\n}\nconst getDefinitionFromMap = (arg, definitionMap) => {\n if (typeof arg === \"object\") {\n const definition = definitionMap.get(arg);\n !definition ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Derived Property is not defined\") : invariant(false) : void 0;\n return definition;\n } else if (typeof arg === \"number\") {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Literals for derived properties are not yet supported\") : invariant(false) : void 0;\n }\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid argument type for a derived property\") : invariant(false) : void 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\nimport invariant from \"tiny-invariant\";\nimport { modernToLegacyWhereClause } from \"../internal/conversions/modernToLegacyWhereClause.js\";\nimport { derivedPropertyDefinitionFactory } from \"./derivedPropertyDefinitionFactory.js\";\n\n/** @internal */\nexport function createWithPropertiesObjectSet(objectType, objectSet, definitionMap, fromBaseObjectSet = false) {\n return {\n pivotTo: link => {\n return createWithPropertiesObjectSet(objectType, {\n type: \"searchAround\",\n objectSet,\n link\n }, definitionMap);\n },\n where: clause => {\n const rdpNames = new Set(definitionMap.keys());\n return createWithPropertiesObjectSet(objectType, {\n type: \"filter\",\n objectSet: objectSet,\n where: modernToLegacyWhereClause(clause, objectType, rdpNames)\n }, definitionMap);\n },\n aggregate: (aggregation, opt) => {\n const splitAggregation = aggregation.split(\":\");\n !(splitAggregation.length === 2 || splitAggregation[0] === \"$count\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid aggregation format\") : invariant(false) : void 0;\n const [aggregationPropertyName, aggregationOperation] = splitAggregation;\n let aggregationOperationDefinition;\n switch (aggregationOperation) {\n case \"sum\":\n case \"avg\":\n case \"min\":\n case \"max\":\n case \"exactDistinct\":\n case \"approximateDistinct\":\n aggregationOperationDefinition = {\n type: aggregationOperation,\n selectedPropertyApiName: aggregationPropertyName\n };\n break;\n case \"approximatePercentile\":\n aggregationOperationDefinition = {\n type: \"approximatePercentile\",\n selectedPropertyApiName: aggregationPropertyName,\n approximatePercentile: opt?.percentile ?? .5\n };\n break;\n case \"collectSet\":\n case \"collectList\":\n aggregationOperationDefinition = {\n type: aggregationOperation,\n selectedPropertyApiName: aggregationPropertyName,\n limit: opt?.limit ?? 100\n };\n break;\n case undefined:\n if (aggregationPropertyName === \"$count\") {\n aggregationOperationDefinition = {\n type: \"count\"\n };\n break;\n }\n default:\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid aggregation operation \" + aggregationOperation) : invariant(false) : void 0;\n }\n const wrappedObjectSet = {\n type: \"selection\",\n objectSet: objectSet,\n operation: aggregationOperationDefinition\n };\n const selectorResult = derivedPropertyDefinitionFactory(wrappedObjectSet, definitionMap);\n definitionMap.set(selectorResult, wrappedObjectSet);\n return selectorResult;\n },\n selectProperty: name => {\n if (fromBaseObjectSet) {\n const wrappedObjectSet = {\n type: \"property\",\n apiName: name\n };\n const selectorResult = derivedPropertyDefinitionFactory(wrappedObjectSet, definitionMap);\n definitionMap.set(selectorResult, wrappedObjectSet);\n return selectorResult;\n }\n const wrappedObjectSet = {\n type: \"selection\",\n objectSet: objectSet,\n operation: {\n type: \"get\",\n selectedPropertyApiName: name\n }\n };\n const selectorResult = derivedPropertyDefinitionFactory(wrappedObjectSet, definitionMap);\n definitionMap.set(selectorResult, wrappedObjectSet);\n return selectorResult;\n }\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst directionFieldMap = dir => dir === \"asc\" ? \"ASC\" : dir === \"desc\" ? \"DESC\" : undefined;\n\n/** @internal */\nexport function splitAggregationKey(key) {\n const colonPos = key.lastIndexOf(\":\");\n return {\n property: key.slice(0, colonPos),\n metric: key.slice(colonPos + 1)\n };\n}\n\n/** @internal */\nexport function modernToLegacyAggregationClause(select) {\n return Object.entries(select).flatMap(([propAndMetric, aggregationType]) => {\n if (propAndMetric === \"$count\") {\n return {\n type: \"count\",\n name: \"count\",\n direction: directionFieldMap(aggregationType)\n };\n }\n const {\n property,\n metric\n } = splitAggregationKey(propAndMetric);\n return [{\n type: metric,\n name: `${property}.${metric}`,\n direction: directionFieldMap(aggregationType),\n field: property\n }];\n });\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { splitAggregationKey } from \"./modernToLegacyAggregationClause.js\";\n\n/** @internal */\nexport function legacyToModernSingleAggregationResult(entry, select) {\n const result = {};\n\n // Seed the result with undefined for every selected metric so that\n // properties are always present, even when the server returns no metrics\n // (e.g. aggregating over 0 objects).\n for (const selectKey of Object.keys(select)) {\n if (selectKey === \"$count\") {\n continue;\n }\n const {\n property,\n metric\n } = splitAggregationKey(selectKey);\n (result[property] ??= {})[metric] = undefined;\n }\n for (const {\n name,\n value\n } of entry.metrics) {\n if (name === \"count\") {\n continue;\n }\n const [property, metricType] = name.split(\".\");\n if (result[property]) {\n // guard against an unknown metric name\n result[property][metricType] = value;\n }\n }\n return result;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DurationMapping } from \"@osdk/api\";\n/** @internal */\nexport function modernToLegacyGroupByClause(groupByClause) {\n if (!groupByClause) return [];\n return Object.entries(groupByClause).flatMap(([field, type]) => {\n if (type === \"exact\") {\n return [{\n type,\n field\n }];\n } else if (\"$exactWithLimit\" in type) {\n {\n return [{\n type: \"exact\",\n field,\n maxGroupCount: type.$exactWithLimit\n }];\n }\n } else if (\"$exact\" in type) {\n return [{\n type: \"exact\",\n field,\n maxGroupCount: type.$exact?.$limit ?? undefined,\n defaultValue: type.$exact.$defaultValue ?? undefined,\n includeNullValues: type.$exact.$includeNullValue === true ? true : undefined\n }];\n } else if (\"$fixedWidth\" in type) {\n return [{\n type: \"fixedWidth\",\n field,\n fixedWidth: type.$fixedWidth\n }];\n } else if (\"$ranges\" in type) {\n return [{\n type: \"ranges\",\n field,\n ranges: type.$ranges.map(range => convertRange(range))\n }];\n } else if (\"$duration\" in type) {\n return [{\n type: \"duration\",\n field,\n value: type.$duration[0],\n unit: DurationMapping[type.$duration[1]]\n }];\n } else return [];\n });\n}\nfunction convertRange(range) {\n return {\n startValue: range[0],\n endValue: range[1]\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as OntologyObjectSets from \"@osdk/foundry.ontologies/OntologyObjectSet\";\nimport invariant from \"tiny-invariant\";\nimport { legacyToModernSingleAggregationResult } from \"../internal/conversions/legacyToModernSingleAggregationResult.js\";\nimport { modernToLegacyAggregationClause } from \"../internal/conversions/modernToLegacyAggregationClause.js\";\nimport { modernToLegacyGroupByClause } from \"../internal/conversions/modernToLegacyGroupByClause.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\n\n/** @internal */\nexport async function aggregate(clientCtx, objectType, objectSet = resolveBaseObjectSetType(objectType), req) {\n const resolvedObjectSet = resolveBaseObjectSetType(objectType);\n const body = {\n aggregation: modernToLegacyAggregationClause(req.$select),\n groupBy: [],\n where: undefined\n };\n if (req.$groupBy) {\n body.groupBy = modernToLegacyGroupByClause(req.$groupBy);\n }\n if (clientCtx.flushEdits != null) {\n await clientCtx.flushEdits();\n }\n const result = await OntologyObjectSets.aggregate(addUserAgentAndRequestContextHeaders(clientCtx, objectType), await clientCtx.ontologyRid, {\n objectSet,\n groupBy: body.groupBy,\n aggregation: body.aggregation\n }, {\n branch: clientCtx.branch,\n transactionId: clientCtx.transactionId\n });\n if (!result.data || !Array.isArray(result.data)) {\n throw new Error(`Aggregation request failed: ${JSON.stringify(result)}`);\n }\n if (!req.$groupBy) {\n !(result.data.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"no group by clause should mean only one data result\") : invariant(false) : void 0;\n return {\n ...aggregationToCountResult(result.data[0]),\n ...legacyToModernSingleAggregationResult(result.data[0], req.$select)\n };\n }\n const ret = result.data.map(entry => {\n return {\n $group: entry.group,\n ...aggregationToCountResult(entry),\n ...legacyToModernSingleAggregationResult(entry, req.$select)\n };\n }); // fixme\n\n return ret; // FIXME\n}\nfunction aggregationToCountResult(entry) {\n for (const aggregateResult of entry.metrics) {\n if (aggregateResult.name === \"count\") {\n return {\n $count: aggregateResult.value\n };\n }\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PalantirApiError } from \"@osdk/shared.net.errors\";\nimport { fetchPage } from \"./fetchPage.js\";\n\n/** @internal */\nexport async function fetchSingle(client, objectType, args, objectSet) {\n const result = await fetchPage(client, objectType, {\n ...args,\n $pageSize: 1\n }, objectSet);\n if (result.data.length !== 1 || result.nextPageToken != null) {\n throw new PalantirApiError(`Expected a single result but got ${result.data.length} instead${result.nextPageToken != null ? \" with nextPageToken set\" : \"\"}`);\n }\n return result.data[0];\n}\n\n/** @internal */\nexport async function fetchSingleWithErrors(client, objectType, args, objectSet) {\n try {\n const result = await fetchSingle(client, objectType, args, objectSet);\n return {\n value: result\n };\n } catch (e) {\n if (e instanceof Error) {\n return {\n error: e\n };\n }\n return {\n error: e\n };\n }\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\n/**\nReturns a client with its `requestContext` merged with the result of applying\n`augment` to its `requestContext`.\n\nThe second argument is an `Partial<RequestContext>`-returning `augment` function\ninstead of a `RequestContext` object to make referencing the current request\ncontext easier. For example, modifying the `fetchPage` function to add its name\nto the object set's called method chain could look like:\n```\naugmentRequestContext(\n clientContext,\n ctx => ({ methodChain: [...ctx.methodChain, \"fetchPage\"] })\n)\n```\nor\n```\naugmentRequestContext(\n clientContext,\n ({ methodChain }) => ({ methodChain: [...methodChain, \"fetchPage\"] })\n)\n```\ninstead of\n```\naugmentRequestContext(\n clientContext,\n { methodChain: [...clientContext.requestContext.methodChain, \"fetchPage\"] }\n)\n```\n*/\nexport const augmentRequestContext = (client, augment) => ({\n ...client,\n requestContext: {\n ...client.requestContext,\n ...augment(client.requestContext)\n }\n});","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst WIRE_OBJECT_SET_TYPES = new Set([\"base\", \"filter\", \"intersect\", \"reference\", \"searchAround\", \"static\", \"subtract\", \"union\", \"interfaceBase\"]);\n\n/** @internal */\nexport function isWireObjectSet(o) {\n return o != null && typeof o === \"object\" && WIRE_OBJECT_SET_TYPES.has(o.type);\n}","/*\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 * as OntologyObjectSets from \"@osdk/foundry.ontologies/OntologyObjectSet\";\n/** @internal */\nexport const fetchLinksPage = async (client, objectType, objectSet, links) => {\n if (objectType.type === \"interface\") {\n throw new Error(\"Interface object sets are not supported yet.\");\n }\n void client.ontologyProvider.getObjectDefinition(objectType.apiName).catch(() => {});\n const result = await OntologyObjectSets.loadLinks(client, await client.ontologyRid, {\n objectSet,\n links\n }, {\n branch: client.branch,\n preview: true\n });\n return remapLinksPage(result);\n};\n\n/** @internal */\nexport const remapLinksPage = wireLinksPage => {\n return {\n ...wireLinksPage,\n data: wireLinksPage.data.flatMap(({\n sourceObject,\n linkedObjects\n }) => linkedObjects.map(({\n targetObject,\n linkType\n }) => ({\n source: remapObjectLocator(sourceObject),\n target: remapObjectLocator(targetObject),\n linkType: linkType\n })))\n };\n};\n\n/** @internal */\nexport const remapObjectLocator = wireObjectLocator => ({\n $apiName: wireObjectLocator.__apiName,\n $primaryKey: wireObjectLocator.__primaryKey\n});","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { createWithPropertiesObjectSet } from \"../derivedProperties/createWithPropertiesObjectSet.js\";\nimport { modernToLegacyWhereClause } from \"../internal/conversions/modernToLegacyWhereClause.js\";\nimport { aggregate } from \"../object/aggregate.js\";\nimport { fetchPageInternal, fetchPageWithErrorsInternal } from \"../object/fetchPage.js\";\nimport { fetchSingle, fetchSingleWithErrors } from \"../object/fetchSingle.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\nimport { isWireObjectSet } from \"../util/WireObjectSet.js\";\nimport { fetchLinksPage } from \"./fetchLinksPage.js\";\nfunction isObjectTypeDefinition(def) {\n return def.type === \"object\";\n}\nexport function isObjectSet(o) {\n return o != null && typeof o === \"object\" && isWireObjectSet(objectSetDefinitions.get(o));\n}\nexport function getWireObjectSet(objectSet) {\n return objectSetDefinitions.get(objectSet);\n}\n\n/** @internal exported for internal use only */\nexport const objectSetDefinitions = new WeakMap();\n\n/** @internal */\nexport function createObjectSet(objectType, clientCtx, objectSet = resolveBaseObjectSetType(objectType)) {\n const base = {\n aggregate: aggregate.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"aggregate\"\n })), objectType, objectSet),\n fetchPage: fetchPageInternal.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchPage\"\n })), objectType, objectSet),\n fetchPageWithErrors: fetchPageWithErrorsInternal.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchPageWithErrors\"\n })), objectType, objectSet),\n where: clause => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"filter\",\n objectSet: objectSet,\n where: modernToLegacyWhereClause(clause, objectType)\n });\n },\n pivotTo: function (type) {\n return createSearchAround(type)();\n },\n union: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"union\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n intersect: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"intersect\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n subtract: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"subtract\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n nearestNeighbors: (query, numNeighbors, property) => {\n const nearestNeighborsQuery = isTextQuery(query) ? {\n \"type\": \"text\",\n \"value\": query\n } : {\n \"type\": \"vector\",\n \"value\": query\n };\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"nearestNeighbors\",\n objectSet,\n propertyIdentifier: {\n type: \"property\",\n apiName: property\n },\n numNeighbors,\n query: nearestNeighborsQuery\n });\n },\n asyncIter: async function* (args) {\n let $nextPageToken = undefined;\n do {\n const result = await fetchPageInternal(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"asyncIter\"\n })), objectType, objectSet, {\n ...args,\n $pageSize: 10000,\n $nextPageToken\n }, true);\n $nextPageToken = result.nextPageToken;\n for (const obj of result.data) {\n yield obj;\n }\n } while ($nextPageToken != null);\n },\n fetchOne: isObjectTypeDefinition(objectType) ? async (primaryKey, options) => {\n return await fetchSingle(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchOne\"\n })), objectType, options, await createWithPk(clientCtx, objectType, objectSet, primaryKey));\n } : undefined,\n fetchOneWithErrors: isObjectTypeDefinition(objectType) ? async (primaryKey, options) => {\n return await fetchSingleWithErrors(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchOneWithErrors\"\n })), objectType, options, await createWithPk(clientCtx, objectType, objectSet, primaryKey));\n } : undefined,\n subscribe: (listener, opts) => {\n const pendingSubscribe = import(\"./ObjectSetListenerWebsocket.js\").then(({\n ObjectSetListenerWebsocket\n }) => ObjectSetListenerWebsocket.getInstance(clientCtx).subscribe(objectType, objectSet, listener, opts?.properties, opts?.includeRid));\n return {\n unsubscribe: async () => (await pendingSubscribe)()\n };\n },\n withProperties: clause => {\n const definitionMap = new Map();\n const derivedProperties = {};\n for (const key of Object.keys(clause)) {\n const derivedPropertyDefinition = clause[key](createWithPropertiesObjectSet(objectType, {\n type: \"methodInput\"\n }, definitionMap, true));\n derivedProperties[key] = definitionMap.get(derivedPropertyDefinition);\n }\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"withProperties\",\n derivedProperties: derivedProperties,\n objectSet: objectSet\n });\n },\n narrowToType: objectTypeDef => {\n const existingMapping = clientCtx.narrowTypeInterfaceOrObjectMapping[objectTypeDef.apiName];\n !(!existingMapping || existingMapping === objectTypeDef.type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `${objectTypeDef.apiName} was previously used as an ${existingMapping}, but now used as a ${objectTypeDef.type}.`) : invariant(false) : void 0;\n clientCtx.narrowTypeInterfaceOrObjectMapping[objectTypeDef.apiName] = objectTypeDef.type;\n return clientCtx.objectSetFactory(objectTypeDef, clientCtx, {\n type: \"asType\",\n objectSet: objectSet,\n entityType: objectTypeDef.apiName\n });\n },\n experimental_asyncIterLinks: async function* (links) {\n let $nextPageToken = undefined;\n do {\n const result = await fetchLinksPage(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"asyncIterLinks\"\n })), objectType, objectSet, links);\n $nextPageToken = result.nextPageToken;\n for (const obj of result.data) {\n yield obj;\n }\n } while ($nextPageToken != null);\n },\n $objectSetInternals: {\n def: objectType\n }\n };\n function createSearchAround(link) {\n return () => {\n return clientCtx.objectSetFactory(objectType, clientCtx, objectType.type === \"object\" ? {\n type: \"searchAround\",\n objectSet,\n link\n } : {\n type: \"interfaceLinkSearchAround\",\n objectSet,\n interfaceLink: link\n });\n };\n }\n objectSetDefinitions.set(base, objectSet);\n\n // we are using a type assertion because the marker symbol defined in BaseObjectSet isn't actually used\n // at runtime.\n return base;\n}\nasync function createWithPk(clientCtx, objectType, objectSet, primaryKey) {\n const objDef = await clientCtx.ontologyProvider.getObjectDefinition(objectType.apiName);\n const withPk = {\n type: \"filter\",\n objectSet: objectSet,\n where: {\n type: \"eq\",\n field: objDef.primaryKeyApiName,\n value: primaryKey\n }\n };\n return withPk;\n}\nfunction isTextQuery(query) {\n return typeof query === \"string\";\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _upload = [1, \"/v2/ontologies/attachments/upload\", 7, \"*/*\"];\n/**\n * Upload an attachment to use in an action. Any attachment which has not been linked to an object via\n * an action within one hour after upload will be removed.\n * Previously mapped attachments which are not connected to any object anymore are also removed on\n * a biweekly basis.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-write]\n * URL: /v2/ontologies/attachments/upload\n */\nexport function upload($ctx, ...args) {\n const headerParams = {\n ...args[2],\n \"Content-Type\": args[2]?.[\"Content-Type\"] ?? args[0].type,\n \"Content-Length\": args[0].size.toString()\n };\n return $foundryPlatformFetch($ctx, _upload, args[0], args[1], headerParams);\n}\nconst _uploadWithRid = [1, \"/v2/ontologies/attachments/upload/{0}\", 7, \"*/*\"];\n/**\n * This endpoint is identical to `/v2/ontologies/attachments/upload` but additionally accepts a previously\n * generated `AttachmentRid`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-write]\n * URL: /v2/ontologies/attachments/upload/{attachmentRid}\n */\nexport function uploadWithRid($ctx, ...args) {\n const headerParams = {\n ...args[3],\n \"Content-Type\": args[3]?.[\"Content-Type\"] ?? args[1].type,\n \"Content-Length\": args[1].size.toString()\n };\n return $foundryPlatformFetch($ctx, _uploadWithRid, args[0], args[1], args[2], headerParams);\n}\nconst _read = [0, \"/v2/ontologies/attachments/{0}/content\",,, \"*/*\"];\n/**\n * Get the content of an attachment.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}/content\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _get = [0, \"/v2/ontologies/attachments/{0}\"];\n/**\n * Get the metadata of an attachment.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.8.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nconst ErrorMessage = Symbol(\"ErrorMessage\");","/*\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 * as Attachments from \"@osdk/foundry.ontologies/Attachment\";\nimport { additionalContext } from \"../Client.js\";\n/**\n * Helper function to create an attachment type from a rid\n * @param client - An OSDK client.\n * @param rid - The rid of attachment in Foundry.\n * @returns An OSDK attachment object\n */\nexport function hydrateAttachmentFromRid(client, rid) {\n return hydrateAttachmentFromRidInternal(client[additionalContext], rid);\n}\n\n/** @internal */\nexport function hydrateAttachmentFromRidInternal(client, rid) {\n return {\n rid,\n async fetchContents() {\n return Attachments.read(client, rid);\n },\n async fetchMetadata() {\n const r = await Attachments.get(client, rid);\n return {\n ...r,\n sizeBytes: Number(r.sizeBytes)\n };\n }\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function noop() {}\nconst levels = {\n trace: 10,\n debug: 20,\n info: 30,\n warn: 40,\n error: 50,\n fatal: 60\n};\nexport class BaseLogger {\n #factory;\n constructor(bindings, options = {}, factory) {\n this.bindings = bindings;\n this.options = options;\n this.#factory = factory;\n for (const k of [\"trace\", \"debug\", \"info\", \"warn\", \"error\", \"fatal\"]) {\n if (this.options?.level && !this.isLevelEnabled(k)) {\n continue;\n }\n this[k] = this.createLogMethod(k, bindings);\n }\n }\n trace = noop;\n debug = noop;\n warn = noop;\n info = noop;\n error = noop;\n fatal = noop;\n child(bindings, options) {\n return new this.#factory({\n ...this.bindings,\n ...bindings\n }, {\n level: options?.level ?? this.options?.level,\n msgPrefix: [this.options?.msgPrefix, options?.msgPrefix].filter(x => x).join(\" \")\n });\n }\n isLevelEnabled(level) {\n const ourLevel = this.options?.level ?? \"info\";\n return level in levels && ourLevel in levels && levels[level] >= levels[ourLevel];\n }\n}","/*\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 { BaseLogger } from \"./BaseLogger.js\";\nexport class MinimalLogger extends BaseLogger {\n constructor(bindings = {}, options = {}) {\n super(bindings, {\n ...options,\n level: options.level ?? \"error\"\n }, MinimalLogger);\n }\n createLogMethod(name, bindings) {\n const msgs = [name];\n if (this.options?.msgPrefix) {\n msgs.push(this.options.msgPrefix);\n }\n if (typeof bindings === \"object\" && \"methodName\" in bindings) {\n msgs.push(`.${bindings.methodName}()`);\n }\n return (...args) => {\n // eslint-disable-next-line no-console\n console[name === \"fatal\" ? \"error\" : name](msgs.join(\" \"), ...args);\n };\n }\n}"]}
1
+ {"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js","../../src/internal/conversions/extractNamespace.ts","../../src/util/addUserAgentAndRequestContextHeaders.ts","../../src/util/extractObjectOrInterfaceType.ts","../../src/util/extractRdpDefinition.ts","../../src/util/objectSetUtils.ts","../../src/object/fetchPage.ts","../../src/internal/conversions/fullyQualifyPropName.ts","../../src/internal/conversions/makeGeoFilterBbox.ts","../../src/internal/conversions/makeGeoFilterPolygon.ts","../../src/internal/conversions/makeGeoFilterIntersects.ts","../../src/internal/conversions/makeGeoFilterWithin.ts","../../src/internal/conversions/toIntervalQuery.ts","../../src/internal/conversions/modernToLegacyWhereClause.ts","../../src/derivedProperties/derivedPropertyDefinitionFactory.ts","../../src/derivedProperties/createWithPropertiesObjectSet.ts","../../src/internal/conversions/modernToLegacyAggregationClause.ts","../../src/internal/conversions/legacyToModernSingleAggregationResult.ts","../../src/internal/conversions/modernToLegacyGroupByClause.ts","../../src/object/aggregate.ts","../../src/object/fetchSingle.ts","../../src/util/augmentRequestContext.ts","../../src/util/WireObjectSet.ts","../../src/objectSet/fetchLinksPage.ts","../../src/objectSet/createObjectSet.ts","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js","../../src/Client.ts","../../src/public-utils/hydrateAttachmentFromRid.ts","../../src/logger/BaseLogger.ts","../../src/logger/MinimalLogger.ts"],"names":["foundryPlatformFetch","createFetchHeaderMutator","def","objOrInterfaceDef","linkDef","invariant","objectSets","objectSetTypes","filteredObjectTypes","definitions","requestBody","result","DistanceUnitMapping","wrappedObjectSet","selectorResult","DurationMapping","aggregate","PalantirApiError","augment","_get","get"],"mappings":";;;;;;;;;;;;;AAgCA,IAAM,IAAO,GAAA,CAAC,CAAG,EAAA,uCAAA,EAAyC,CAAC,CAAA;AASpD,SAAS,GAAA,CAAI,SA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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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/interfaceTypes\", 2];\n/**\n * Lists the interface types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}\", 2];\n/**\n * Gets a specific interface type with the given API name.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _listObjectsForInterface = [0, \"/v2/ontologies/{0}/interfaces/{1}\", 2];\n/**\n * Lists the objects for the given Ontology and interface type.\n *\n * Note that this endpoint does not guarantee consistency, unless you use the snapshot flag specified below. Changes to the data could result in missing or\n * repeated objects in the response pages.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Each page may be smaller or larger than the requested page size. However, it\n * is guaranteed that if there are more results available, at least one result will be present\n * in the response.\n *\n * Note that null value properties will not be returned.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}\n */\nexport function listObjectsForInterface($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listObjectsForInterface, ...args);\n}\nconst _search = [1, \"/v2/ontologies/{0}/interfaces/{1}/search\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object\n * sets.\n * :::\n * Search for objects in the specified ontology and interface type. Any properties specified in the \"where\" or\n * \"orderBy\" parameters must be shared property type API names defined on the interface. The following search\n * queries are supported:\n *\n * | Query type | Description | Supported Types |\n * |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------|\n * | lt | The provided property is less than the provided value. | number, string, date, timestamp |\n * | gt | The provided property is greater than the provided value. | number, string, date, timestamp |\n * | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp |\n * | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp |\n * | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp |\n * | isNull | The provided property is (or is not) null. | all |\n * | contains | The provided property contains the provided value. | array |\n * | not | The sub-query does not match. | N/A (applied on a query) |\n * | and | All the sub-queries match. | N/A (applied on queries) |\n * | or | At least one of the sub-queries match. | N/A (applied on queries) |\n * | startsWith | The provided property starts with the provided term. | string |\n * | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string |\n * | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string |\n * | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string |\n * | containsAllTerms | The provided property contains all the terms separated by whitespace. | string |\n *\n * Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'\"~`). Periods (`.`) on their own are ignored.\n * Partial terms are not matched by terms filters except where explicitly noted.\n *\n * Attempting to use an unsupported query will result in a validation error. Third-party applications using this\n * endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/search\n */\nexport function search($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _search, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/interfaces/{1}/aggregate\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object\n * sets.\n * :::\n * Perform functions on object fields in the specified ontology and of the specified interface type. Any\n * properties specified in the query must be shared property type API names defined on the interface.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...args);\n}\nconst _listOutgoingInterfaceLinkTypes = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}/outgoingLinkTypes\", 2];\n/**\n * List the outgoing interface link types for an interface type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes\n */\nexport function listOutgoingInterfaceLinkTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listOutgoingInterfaceLinkTypes, ...args);\n}\nconst _getOutgoingInterfaceLinkType = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}/outgoingLinkTypes/{2}\", 2];\n/**\n * Get an outgoing interface link type for an interface type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}/outgoingLinkTypes/{interfaceLinkType}\n */\nexport function getOutgoingInterfaceLinkType($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getOutgoingInterfaceLinkType, ...args);\n}\nconst _listInterfaceLinkedObjects = [0, \"/v2/ontologies/{0}/interfaces/{1}/{2}/{3}/links/{4}\", 2];\n/**\n * Lists the linked objects for a specific object and the given interface link type.\n *\n * Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or\n * repeated objects in the response pages.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Each page may be smaller or larger than the requested page size. However, it\n * is guaranteed that if there are more results available, at least one result will be present\n * in the response.\n *\n * Note that null value properties will not be returned.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/{objectType}/{primaryKey}/links/{interfaceLinkType}\n */\nexport function listInterfaceLinkedObjects($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listInterfaceLinkedObjects, ...args);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _createTemporary = [1, \"/v2/ontologies/{0}/objectSets/createTemporary\", 3];\n/**\n * Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectSets/createTemporary\n */\nexport function createTemporary($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _createTemporary, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objectSets/{1}\"];\n/**\n * Gets the definition of the `ObjectSet` with the given RID.\n *\n * @alpha\n *\n * Required Scopes: []\n * URL: /v2/ontologies/{ontology}/objectSets/{objectSetRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _load = [1, \"/v2/ontologies/{0}/objectSets/loadObjects\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjects\n */\nexport function load($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _load, ...args);\n}\nconst _loadMultipleObjectTypes = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsMultipleObjectTypes\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting\n * objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped\n * to an interface, in which only the object type properties that implement the properties of any interfaces in its\n * scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to\n * object implementation is returned in order to interpret the objects as the interfaces that they implement.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `loadObjects`.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes\n */\nexport function loadMultipleObjectTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadMultipleObjectTypes, ...args);\n}\nconst _loadObjectsOrInterfaces = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsOrInterfaces\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested\n * object set contains interfaces and the object can be viewed as an interface, it will contain the properties\n * defined by the interface. If not, it will contain the properties defined by its object type. This allows directly\n * loading all objects of an interface where all objects are viewed as the interface, for example.\n *\n * Note that the result object set cannot contain a mix of objects with \"interface\" properties and \"object type\"\n * properties. Attempting to load an object set like this will result in an error.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `/loadObjects`.\n *\n * Vector properties will not be returned unless included in the `select` parameter.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces\n */\nexport function loadObjectsOrInterfaces($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadObjectsOrInterfaces, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/objectSets/aggregate\", 3];\n/**\n * Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...args);\n}\nconst _loadLinks = [1, \"/v2/ontologies/{0}/objectSets/loadLinks\", 3];\n/**\n * Loads the specified links from the defined object set.\n *\n * Links are defined as a link type API name and object locators for the source and target objects\n * where only the `__primaryKey` and `__apiName` properties are loaded.\n *\n * Links are grouped by source object locator; however, the links for a given source object may be\n * split over multiple entries with the same source object locator.\n *\n * Please keep these limitations in mind:\n *\n * * Links returned may be stale. For example, primary keys returned by this endpoint may not exist anymore.\n * * This endpoint requests links for 1,000 objects at a time. If, for any page of 1,000 objects, there are more\n * than 100,000 links present, results are limited to 100,000 links and should be considered partial.\n * * This endpoint does not support OSv1 links and will return an error if links provided are backed by OSv1.\n * * This endpoint currently does not support interface object sets or interface links, but support will be added in the near future.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadLinks\n */\nexport function loadLinks($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadLinks, ...args);\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function extractNamespace(fqApiName) {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1) return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetchHeaderMutator } from \"@osdk/shared.net.fetch\";\nexport const addUserAgentAndRequestContextHeaders = (client, withMetadata) => ({\n ...client,\n fetch: createFetchHeaderMutator(client.fetch, headers => {\n headers.set(\"X-OSDK-Request-Context\", JSON.stringify(client.requestContext));\n if (withMetadata.osdkMetadata) {\n headers.set(\"Fetch-User-Agent\", withMetadata.osdkMetadata.extraUserAgent);\n }\n return headers;\n })\n});","/*\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 invariant from \"tiny-invariant\";\n/* @internal\n* Returns the resultant interface or object type of the object set\n*/\nexport async function extractObjectOrInterfaceType(clientCtx, objectSet) {\n switch (objectSet.type) {\n case \"searchAround\":\n {\n const def = await extractObjectOrInterfaceType(clientCtx, objectSet.objectSet);\n if (def === undefined) {\n return undefined;\n }\n const objOrInterfaceDef = def.type === \"object\" ? await clientCtx.ontologyProvider.getObjectDefinition(def.apiName) : await clientCtx.ontologyProvider.getInterfaceDefinition(def.apiName);\n const linkDef = objOrInterfaceDef.links[objectSet.link];\n !linkDef ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing link definition for '${objectSet.link}'`) : invariant(false) : void 0;\n return objOrInterfaceDef.type === \"object\" ? {\n apiName: objOrInterfaceDef.links[objectSet.link].targetType,\n type: \"object\"\n } : {\n apiName: objOrInterfaceDef.links[objectSet.link].targetTypeApiName,\n type: objOrInterfaceDef.links[objectSet.link].targetType\n };\n }\n case \"withProperties\":\n {\n return extractObjectOrInterfaceType(clientCtx, objectSet.objectSet);\n }\n case \"methodInput\":\n return undefined;\n case \"base\":\n return {\n type: \"object\",\n apiName: objectSet.objectType\n };\n case \"interfaceBase\":\n return {\n type: \"interface\",\n apiName: objectSet.interfaceType\n };\n case \"filter\":\n case \"asBaseObjectTypes\":\n case \"nearestNeighbors\":\n return extractObjectOrInterfaceType(clientCtx, objectSet.objectSet);\n case \"asType\":\n return {\n type: clientCtx.narrowTypeInterfaceOrObjectMapping[objectSet.entityType],\n apiName: objectSet.entityType\n };\n case \"intersect\":\n {\n const objectSets = objectSet.objectSets;\n const objectSetTypes = await Promise.all(objectSets.map(os => extractObjectOrInterfaceType(clientCtx, os)));\n const filteredObjectTypes = objectSetTypes.filter(Boolean);\n const firstInterfaceType = filteredObjectTypes.find(val => val?.type === \"interface\");\n !firstInterfaceType ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing interface type in intersect objectset scope'`) : invariant(false) : void 0;\n return firstInterfaceType;\n }\n case \"subtract\":\n case \"union\":\n const objectSets = objectSet.objectSets;\n const objectSetTypes = await Promise.all(objectSets.map(os => extractObjectOrInterfaceType(clientCtx, os)));\n const filteredObjectTypes = objectSetTypes.filter(Boolean);\n const firstObjectType = filteredObjectTypes[0];\n !filteredObjectTypes.every(val => {\n return val?.apiName === firstObjectType?.apiName && val?.type === firstObjectType?.type;\n }) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Can only have one object type when doing subtract, union\") : invariant(false) : void 0;\n return filteredObjectTypes[0];\n case \"static\":\n case \"reference\":\n // Static and reference object sets are always intersected with a base object set, so we can just return undefined.\n return undefined;\n case \"interfaceLinkSearchAround\":\n const def = await extractObjectOrInterfaceType(clientCtx, objectSet.objectSet);\n if (def === undefined) {\n return undefined;\n }\n const objOrInterfaceDef = def.type === \"object\" ? await clientCtx.ontologyProvider.getObjectDefinition(def.apiName) : await clientCtx.ontologyProvider.getInterfaceDefinition(def.apiName);\n const linkDef = objOrInterfaceDef.links[objectSet.interfaceLink];\n !linkDef ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing link definition for '${objectSet.interfaceLink}'`) : invariant(false) : void 0;\n return objOrInterfaceDef.type === \"object\" ? {\n apiName: objOrInterfaceDef.links[objectSet.interfaceLink].targetType,\n type: \"object\"\n } : {\n apiName: objOrInterfaceDef.links[objectSet.interfaceLink].targetTypeApiName,\n type: objOrInterfaceDef.links[objectSet.interfaceLink].targetType\n };\n // We don't have to worry about new object sets being added and doing a runtime break and breaking people since the OSDK is always constructing these.\n default:\n const _ = objectSet;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Unsupported object set type for deriving object or interface type,`) : invariant(false) : void 0;\n }\n}","/*\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 invariant from \"tiny-invariant\";\nexport async function extractRdpDefinition(clientCtx, objectSet) {\n return (await extractRdpDefinitionInternal(clientCtx, objectSet, undefined)).definitions;\n}\n\n/* @internal\n* Returns a tuple of the derived property definitions and the object type that the derived property is defined on.\n*/\nasync function extractRdpDefinitionInternal(clientCtx, objectSet, methodInputObjectType) {\n switch (objectSet.type) {\n case \"searchAround\":\n {\n const {\n definitions,\n childObjectType\n } = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);\n if (childObjectType === undefined || childObjectType === \"\") {\n return {\n definitions: {}\n };\n }\n const objDef = await clientCtx.ontologyProvider.getObjectDefinition(childObjectType);\n const linkDef = objDef.links[objectSet.link];\n !linkDef ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing link definition for '${objectSet.link}'`) : invariant(false) : void 0;\n return {\n definitions,\n childObjectType: objDef.links[objectSet.link].targetType\n };\n }\n case \"withProperties\":\n {\n // These are the definitions and current object type for all object set operations prior to the definition (e.g. filter, pivotTo, etc.)\n const {\n definitions,\n childObjectType\n } = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);\n if (childObjectType === undefined || childObjectType === \"\") {\n return {\n definitions: {}\n };\n }\n for (const [name, definition] of Object.entries(objectSet.derivedProperties)) {\n if (definition.type !== \"selection\") {\n definitions[name] = {\n selectedOrCollectedPropertyType: undefined,\n definition\n };\n continue;\n }\n switch (definition.operation.type) {\n case \"collectList\":\n case \"collectSet\":\n case \"get\":\n // This is the object set construction for the derived property definition construction. We pass in childObjectType so that when we reach MethodInputObjectSet, we know where to start looking.\n const {\n childObjectType: operationLevelObjectType\n } = await extractRdpDefinitionInternal(clientCtx, definition.objectSet, childObjectType);\n if (operationLevelObjectType === undefined || operationLevelObjectType === \"\") {\n return {\n definitions: {}\n };\n }\n const objDef = await clientCtx.ontologyProvider.getObjectDefinition(operationLevelObjectType);\n definitions[name] = {\n selectedOrCollectedPropertyType: objDef.properties[definition.operation.selectedPropertyApiName],\n definition\n };\n break;\n default:\n definitions[name] = {\n selectedOrCollectedPropertyType: undefined,\n definition\n };\n }\n }\n return {\n definitions,\n childObjectType\n };\n }\n case \"methodInput\":\n return {\n definitions: {},\n childObjectType: methodInputObjectType\n };\n case \"base\":\n return {\n definitions: {},\n childObjectType: objectSet.objectType\n };\n case \"interfaceBase\":\n return {\n definitions: {},\n childObjectType: objectSet.interfaceType\n };\n case \"filter\":\n case \"asBaseObjectTypes\":\n case \"asType\":\n case \"nearestNeighbors\":\n return extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);\n // These will throw in OSS so we should throw here so no request is made\n case \"intersect\":\n case \"subtract\":\n case \"union\":\n const objectSets = objectSet.objectSets;\n const objectSetTypes = await Promise.all(objectSets.map(os => extractRdpDefinitionInternal(clientCtx, os, methodInputObjectType)));\n const definitions = objectSetTypes.reduce((acc, {\n definitions\n }) => ({\n ...acc,\n ...definitions\n }), {});\n !(Object.keys(definitions).length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Object sets combined using intersect, subtract, or union must not contain any derived property definitions\") : invariant(false) : void 0;\n const firstValidChildObjectType = objectSetTypes.find(({\n childObjectType\n }) => childObjectType != null)?.childObjectType;\n !objectSetTypes.every(({\n childObjectType\n }) => childObjectType === firstValidChildObjectType || childObjectType == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"All object sets in an intersect, subtract, or union must have the same child object type\") : invariant(false) : void 0;\n return {\n definitions: {},\n childObjectType: firstValidChildObjectType\n };\n case \"static\":\n case \"reference\":\n // Static and reference object sets are always intersected with a base object set, so we can just return no child object type.\n return {\n definitions: {}\n };\n // We don't have to worry about new object sets being added and doing a runtime break and breaking people since the OSDK is always constructing these.\n case \"interfaceLinkSearchAround\":\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Unsupported object set type for Runtime Derived Properties`) : invariant(false) : void 0;\n default:\n const _ = objectSet;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Unsupported object set type for Runtime Derived Properties`) : invariant(false) : void 0;\n }\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 function resolveBaseObjectSetType(objectType) {\n return objectType.type === \"interface\" ? {\n type: \"interfaceBase\",\n interfaceType: objectType[\"apiName\"]\n } : {\n type: \"base\",\n objectType: objectType[\"apiName\"]\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as OntologyInterfaces from \"@osdk/foundry.ontologies/OntologyInterface\";\nimport * as OntologyObjectSets from \"@osdk/foundry.ontologies/OntologyObjectSet\";\nimport invariant from \"tiny-invariant\";\nimport { extractNamespace } from \"../internal/conversions/extractNamespace.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { extractObjectOrInterfaceType } from \"../util/extractObjectOrInterfaceType.js\";\nimport { extractRdpDefinition } from \"../util/extractRdpDefinition.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\nexport function augment(type, ...properties) {\n return {\n [type.apiName]: properties\n };\n}\n\n/** @internal */\nexport function objectSetToSearchJsonV2(objectSet, expectedApiName, existingWhere = undefined) {\n if (objectSet.type === \"base\" || objectSet.type === \"interfaceBase\") {\n if (objectSet.type === \"base\" && objectSet.objectType !== expectedApiName) {\n throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.objectType}`);\n }\n if (objectSet.type === \"interfaceBase\" && objectSet.interfaceType !== expectedApiName) {\n throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.interfaceType}`);\n }\n return existingWhere;\n }\n if (objectSet.type === \"filter\") {\n return objectSetToSearchJsonV2(objectSet.objectSet, expectedApiName, existingWhere == null ? objectSet.where : {\n type: \"and\",\n value: [existingWhere, objectSet.where]\n });\n }\n throw new Error(`Unsupported objectSet type: ${objectSet.type}`);\n}\n\n/** @internal */\nexport function resolveInterfaceObjectSet(objectSet, interfaceTypeApiName, args) {\n return args?.$includeAllBaseObjectProperties ? {\n type: \"intersect\",\n objectSets: [objectSet, {\n type: \"interfaceBase\",\n interfaceType: interfaceTypeApiName,\n includeAllBaseObjectProperties: true\n }]\n } : objectSet;\n}\n\n/** @internal */\nexport async function fetchStaticRidPage(client, rids, args, useSnapshot = false) {\n const shouldLoadPropertySecurities = args.$loadPropertySecurityMetadata ?? false;\n const requestBody = await applyFetchArgs(args, {\n objectSet: {\n type: \"static\",\n objects: rids\n },\n select: args?.$select ?? [],\n excludeRid: !args?.$includeRid,\n snapshot: useSnapshot,\n loadPropertySecurities: shouldLoadPropertySecurities\n }, client, {\n type: \"object\",\n apiName: \"\"\n });\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const result = await OntologyObjectSets.loadMultipleObjectTypes(addUserAgentAndRequestContextHeaders(client, {\n osdkMetadata: undefined\n }), await client.ontologyRid, requestBody, {\n preview: true,\n transactionId: client.transactionId\n });\n return Promise.resolve({\n data: await client.objectFactory2(client, result.data, undefined, {}, shouldLoadPropertySecurities ? result.propertySecurities : undefined, !args.$includeRid, args.$select, false, result.interfaceToObjectTypeMappings, result.interfaceToObjectTypeMappingsV2),\n nextPageToken: result.nextPageToken,\n totalCount: result.totalCount\n });\n}\nasync function fetchInterfacePage(client, interfaceType, args, objectSet, useSnapshot = false) {\n if (args.$__UNSTABLE_useOldInterfaceApis) {\n !(args.$loadPropertySecurityMetadata === false || args.$loadPropertySecurityMetadata === undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"`$loadPropertySecurityMetadata` is not supported with old interface APIs\") : invariant(false) : void 0;\n const baseRequestBody = {\n augmentedProperties: {},\n augmentedSharedPropertyTypes: {},\n augmentedInterfacePropertyTypes: {},\n otherInterfaceTypes: [],\n selectedObjectTypes: [],\n selectedSharedPropertyTypes: args.$select ? [...args.$select] : [],\n selectedInterfacePropertyTypes: [],\n where: objectSetToSearchJsonV2(objectSet, interfaceType.apiName)\n };\n const requestBody = await applyFetchArgs(args, baseRequestBody, client, interfaceType);\n if (requestBody.selectedSharedPropertyTypes.length > 0) {\n const remapped = remapPropertyNames(interfaceType, requestBody.selectedSharedPropertyTypes);\n requestBody.selectedSharedPropertyTypes = Array.from(remapped);\n }\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const result = await OntologyInterfaces.search(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, interfaceType.apiName, requestBody, {\n preview: true\n });\n result.data = await client.objectFactory(client, result.data,\n // drop readonly\n interfaceType.apiName, !args.$includeRid, await extractRdpDefinition(client, objectSet), undefined);\n return result;\n }\n const extractedInterfaceTypeApiName = (await extractObjectOrInterfaceType(client, objectSet))?.apiName ?? interfaceType.apiName;\n const resolvedInterfaceObjectSet = resolveInterfaceObjectSet(objectSet, extractedInterfaceTypeApiName, args);\n const shouldLoadPropertySecurities = args.$loadPropertySecurityMetadata ?? false;\n const requestBody = await buildAndRemapRequestBody(args, {\n objectSet: resolvedInterfaceObjectSet,\n select: args?.$select ? [...args.$select] : [],\n selectV2: [],\n loadPropertySecurities: shouldLoadPropertySecurities,\n excludeRid: !args?.$includeRid,\n snapshot: useSnapshot\n }, client, interfaceType);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const result = await OntologyObjectSets.loadMultipleObjectTypes(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, requestBody, {\n preview: true,\n branch: client.branch,\n transactionId: client.transactionId\n });\n return Promise.resolve({\n data: await client.objectFactory2(client, result.data, extractedInterfaceTypeApiName, {}, shouldLoadPropertySecurities ? result.propertySecurities : undefined, !args.$includeRid, args.$select, false, result.interfaceToObjectTypeMappings, result.interfaceToObjectTypeMappingsV2),\n nextPageToken: result.nextPageToken,\n totalCount: result.totalCount\n });\n}\n\n/** @internal */\nexport async function fetchPageInternal(client, objectType, objectSet, args = {}, useSnapshot = false) {\n if (objectType.type === \"interface\") {\n return await fetchInterfacePage(client, objectType, args, objectSet, useSnapshot); // fixme\n } else {\n return await fetchObjectPage(client, objectType, args, objectSet, useSnapshot); // fixme\n }\n}\n\n/** @internal */\nexport async function fetchPageWithErrorsInternal(client, objectType, objectSet, args = {}) {\n try {\n const result = await fetchPageInternal(client, objectType, objectSet, args);\n return {\n value: result\n };\n } catch (e) {\n if (e instanceof Error) {\n return {\n error: e\n };\n }\n return {\n error: e\n };\n }\n}\n\n/**\n * @param client\n * @param objectType\n * @param args\n * @param objectSet\n * @returns\n * @internal\n */\nexport async function fetchPage(client, objectType, args, objectSet = resolveBaseObjectSetType(objectType)) {\n return fetchPageInternal(client, objectType, objectSet, args);\n}\n\n/** @internal */\nexport async function fetchPageWithErrors(client, objectType, args, objectSet = resolveBaseObjectSetType(objectType)) {\n return fetchPageWithErrorsInternal(client, objectType, objectSet, args);\n}\n\n/** @internal */\nasync function buildAndRemapRequestBody(args, baseBody, client, objectType) {\n const requestBody = await applyFetchArgs(args, baseBody, client, objectType);\n if (requestBody.select != null && requestBody.select.length > 0) {\n const remapped = remapPropertyNames(objectType, requestBody.select);\n return {\n ...requestBody,\n select: remapped\n };\n }\n return requestBody;\n}\n\n/** @internal */\nexport function remapPropertyNames(objectOrInterface, propertyNames) {\n if (objectOrInterface == null) {\n return propertyNames;\n }\n if (objectOrInterface.type === \"interface\") {\n const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);\n return propertyNames.map(name => {\n const [fieldApiNamespace, fieldShortName] = extractNamespace(name);\n return fieldApiNamespace == null && objApiNamespace != null ? `${objApiNamespace}.${fieldShortName}` : name;\n });\n }\n return propertyNames;\n}\nasync function applyFetchArgs(args, body, _client, objectType) {\n if (args?.$nextPageToken) {\n body.pageToken = args.$nextPageToken;\n }\n if (args?.$pageSize != null) {\n body.pageSize = args.$pageSize;\n }\n if (args?.$loadPropertySecurityMetadata) {\n body.loadPropertySecurities = true;\n }\n const orderBy = args?.$orderBy;\n if (orderBy) {\n if (orderBy === \"relevance\") {\n body.orderBy = {\n orderType: \"relevance\",\n fields: []\n };\n } else {\n const orderByEntries = Object.entries(orderBy);\n const fieldNames = orderByEntries.map(([field]) => field);\n const remappedFields = remapPropertyNames(objectType, fieldNames);\n body.orderBy = {\n fields: orderByEntries.map(([, direction], index) => ({\n field: remappedFields[index],\n direction\n }))\n };\n }\n }\n return body;\n}\n\n/** @internal */\nexport async function fetchObjectPage(client, objectType, args, objectSet, useSnapshot = false) {\n // For simple object fetches, since we know the object type up front\n // we can parallelize network requests for loading metadata and loading the actual objects\n // In our object factory we await and block on loading the metadata, which if this call finishes, should already be cached on the client\n // We have an empty catch here so that if this call errors before we await later, we won't have an unhandled promise rejection that would crash the process\n // Swallowing the error is ok because we await the metadata load in the objectFactory later anyways which eventually bubbles up the error to the user\n void client.ontologyProvider.getObjectDefinition(objectType.apiName).catch(() => {});\n const shouldLoadPropertySecurities = args.$loadPropertySecurityMetadata ?? false;\n const requestBody = await buildAndRemapRequestBody(args, {\n objectSet,\n select: args?.$select ? [...args.$select] : [],\n selectV2: [],\n loadPropertySecurities: shouldLoadPropertySecurities,\n excludeRid: !args?.$includeRid,\n snapshot: useSnapshot\n }, client, objectType);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const r = await OntologyObjectSets.load(addUserAgentAndRequestContextHeaders(client, objectType), await client.ontologyRid, requestBody, {\n branch: client.branch,\n transactionId: client.transactionId\n });\n return Promise.resolve({\n data: await client.objectFactory(client, r.data, undefined, undefined, await extractRdpDefinition(client, objectSet), shouldLoadPropertySecurities ? r.propertySecurities : undefined, args.$select, false),\n nextPageToken: r.nextPageToken,\n totalCount: r.totalCount\n });\n}","/*\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 { extractNamespace } from \"./extractNamespace.js\";\nexport function fullyQualifyPropName(fieldName, objectOrInterface) {\n if (objectOrInterface.type === \"interface\") {\n const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);\n const [fieldApiNamespace, fieldShortName] = extractNamespace(fieldName);\n return fieldApiNamespace == null && objApiNamespace != null ? `${objApiNamespace}.${fieldShortName}` : fieldName;\n }\n return fieldName;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function makeGeoFilterBbox(bbox, filterType, propertyIdentifier, field) {\n return {\n type: filterType === \"$within\" ? \"withinBoundingBox\" : \"intersectsBoundingBox\",\n /**\n * This is a bit ugly, but did this so that propertyIdentifier only shows up in the return object if its defined,\n * this makes it so we don't need to go update our entire test bed either to include a field which may change in near future.\n * Once we solidify that this is the way forward, I can remove field and clean this up\n */\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: {\n topLeft: {\n type: \"Point\",\n coordinates: [bbox[0], bbox[3]]\n },\n bottomRight: {\n type: \"Point\",\n coordinates: [bbox[2], bbox[1]]\n }\n }\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function makeGeoFilterPolygon(coordinates, filterType, propertyIdentifier, field) {\n return {\n type: filterType,\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: {\n type: \"Polygon\",\n coordinates\n }\n };\n}","/*\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 { makeGeoFilterBbox } from \"./makeGeoFilterBbox.js\";\nimport { makeGeoFilterPolygon } from \"./makeGeoFilterPolygon.js\";\nexport function makeGeoFilterIntersects(intersectsBody, propertyIdentifier, field) {\n if (Array.isArray(intersectsBody)) {\n return makeGeoFilterBbox(intersectsBody, \"$intersects\", propertyIdentifier, field);\n } else if (\"$bbox\" in intersectsBody && intersectsBody.$bbox != null) {\n return makeGeoFilterBbox(intersectsBody.$bbox, \"$intersects\", propertyIdentifier, field);\n } else {\n const coordinates = \"$polygon\" in intersectsBody ? intersectsBody.$polygon : intersectsBody.coordinates;\n return makeGeoFilterPolygon(coordinates, \"intersectsPolygon\", propertyIdentifier, field);\n }\n}","/*\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 { DistanceUnitMapping } from \"@osdk/api\";\nimport { makeGeoFilterBbox } from \"./makeGeoFilterBbox.js\";\nimport { makeGeoFilterPolygon } from \"./makeGeoFilterPolygon.js\";\nexport function makeGeoFilterWithin(withinBody, propertyIdentifier, field) {\n if (Array.isArray(withinBody)) {\n return makeGeoFilterBbox(withinBody, \"$within\", propertyIdentifier, field);\n } else if (\"$bbox\" in withinBody && withinBody.$bbox != null) {\n return makeGeoFilterBbox(withinBody.$bbox, \"$within\", propertyIdentifier, field);\n } else if (\"$distance\" in withinBody && \"$of\" in withinBody && withinBody.$distance != null && withinBody.$of != null) {\n return {\n type: \"withinDistanceOf\",\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: {\n center: Array.isArray(withinBody.$of) ? {\n type: \"Point\",\n coordinates: withinBody.$of\n } : withinBody.$of,\n distance: {\n value: withinBody.$distance[0],\n unit: DistanceUnitMapping[withinBody.$distance[1]]\n }\n }\n };\n } else {\n const coordinates = \"$polygon\" in withinBody ? withinBody.$polygon : withinBody.coordinates;\n return makeGeoFilterPolygon(coordinates, \"withinPolygon\", propertyIdentifier, field);\n }\n}","/*\n * Copyright 2026 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 invariant from \"tiny-invariant\";\nexport function toIntervalQueryRule(rule) {\n if (rule.$match != null) {\n if (rule.$prefixOnLastTerm) {\n return {\n type: \"prefixOnLastToken\",\n query: rule.$match\n };\n }\n return {\n type: \"match\",\n query: rule.$match,\n ordered: rule.$ordered,\n maxGaps: rule.$maxGaps\n };\n }\n if (rule.$and != null) {\n return {\n type: \"allOf\",\n rules: rule.$and.map(toIntervalQueryRule),\n ordered: rule.$ordered,\n maxGaps: rule.$maxGaps\n };\n }\n if (rule.$or != null) {\n return {\n type: \"anyOf\",\n rules: rule.$or.map(toIntervalQueryRule)\n };\n }\n if (rule.$fuzzy != null) {\n return {\n type: \"fuzzy\",\n term: rule.$fuzzy,\n fuzziness: rule.$fuzziness\n };\n }\n const _ = rule;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Unknown interval rule type\") : invariant(false) : void 0;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { fullyQualifyPropName } from \"./fullyQualifyPropName.js\";\nimport { makeGeoFilterIntersects } from \"./makeGeoFilterIntersects.js\";\nimport { makeGeoFilterWithin } from \"./makeGeoFilterWithin.js\";\nimport { toIntervalQueryRule } from \"./toIntervalQuery.js\";\nfunction isAndClause(whereClause) {\n return \"$and\" in whereClause && whereClause.$and !== undefined;\n}\nfunction isOrClause(whereClause) {\n return \"$or\" in whereClause && whereClause.$or !== undefined;\n}\nfunction isNotClause(whereClause) {\n return \"$not\" in whereClause && whereClause.$not !== undefined;\n}\n\n/** @internal */\nexport function modernToLegacyWhereClause(whereClause, objectOrInterface, rdpNames) {\n const parts = Object.entries(whereClause).map(([key, value]) => ({\n [key]: value\n }));\n if (parts.length === 1) {\n return modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames);\n }\n return {\n type: \"and\",\n value: parts.map(v => modernToLegacyWhereClauseInner(v, objectOrInterface, rdpNames))\n };\n}\n\n/** @internal */\nexport function modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames) {\n const parts = Object.entries(whereClause);\n !(parts.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid where clause provided.\") : invariant(false) : void 0;\n if (isAndClause(whereClause)) {\n return {\n type: \"and\",\n value: whereClause.$and.map(clause => modernToLegacyWhereClause(clause, objectOrInterface, rdpNames))\n };\n } else if (isOrClause(whereClause)) {\n return {\n type: \"or\",\n value: whereClause.$or.map(clause => modernToLegacyWhereClause(clause, objectOrInterface, rdpNames))\n };\n } else if (isNotClause(whereClause)) {\n return {\n type: \"not\",\n value: modernToLegacyWhereClause(whereClause.$not, objectOrInterface, rdpNames)\n };\n }\n return handleWherePair(parts[0], objectOrInterface, undefined, rdpNames);\n}\nfunction handleWherePair([fieldName, filter], objectOrInterface, structFieldSelector, rdpNames) {\n !(filter != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Cannot filter on property \"${fieldName}\" with an undefined or null value. ` + `If the value might be undefined, check it before adding to the where clause.`) : invariant(false) : void 0;\n const isRdp = !structFieldSelector && rdpNames?.has(fieldName);\n const propertyIdentifier = isRdp ? {\n type: \"property\",\n apiName: fieldName\n } : structFieldSelector != null ? {\n type: \"structField\",\n ...structFieldSelector,\n propertyApiName: fullyQualifyPropName(structFieldSelector.propertyApiName, objectOrInterface)\n } : undefined;\n const field = !isRdp && structFieldSelector == null ? fullyQualifyPropName(fieldName, objectOrInterface) : undefined;\n !(field == null || propertyIdentifier == null && (field != null || isRdp != null)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Encountered error constructing where clause: field and propertyIdentifier cannot both be defined\") : invariant(false) : void 0;\n if (typeof filter === \"string\" || typeof filter === \"number\" || typeof filter === \"boolean\") {\n return {\n type: \"eq\",\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: filter\n };\n }\n const keysOfFilter = Object.keys(filter);\n\n // If any of the keys start with `$` then they must be the only one.\n // e.g. `where({ name: { $eq: \"foo\", $ne: \"bar\" } })` is invalid currently\n const hasDollarSign = keysOfFilter.some(key => key.startsWith(\"$\"));\n !(!hasDollarSign || keysOfFilter.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"A WhereClause Filter with multiple clauses/fields is not allowed. Instead, use an 'or'/'and' clause to combine multiple filters.\") : invariant(false) : void 0;\n\n // Struct\n if (!hasDollarSign) {\n const structFilter = Object.entries(filter);\n !(structFilter.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot filter on more than one struct field in the same clause, need to use an and clause\") : invariant(false) : void 0;\n const structFieldApiName = keysOfFilter[0];\n return handleWherePair(Object.entries(filter)[0], objectOrInterface, {\n propertyApiName: fieldName,\n structFieldApiName\n }, rdpNames);\n }\n const firstKey = keysOfFilter[0];\n !(filter[firstKey] != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n if (firstKey === \"$contains\" && filter[firstKey] instanceof Object) {\n const containsValue = filter[firstKey];\n const containsKeys = Object.keys(containsValue);\n const isFilterObject = containsKeys.some(key => key.startsWith(\"$\"));\n if (isFilterObject) {\n return handleWherePair([fieldName, containsValue], objectOrInterface, structFieldSelector, rdpNames);\n } else {\n const structFilter = Object.entries(containsValue);\n !(structFilter.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot filter on more than one struct field in the same clause, need to use an and clause\") : invariant(false) : void 0;\n const structFieldApiName = structFilter[0][0];\n return handleWherePair(structFilter[0], objectOrInterface, {\n propertyApiName: fieldName,\n structFieldApiName\n });\n }\n }\n if (firstKey === \"$ne\") {\n return {\n type: \"not\",\n value: {\n type: \"eq\",\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: filter[firstKey]\n }\n };\n }\n if (firstKey === \"$within\") {\n return makeGeoFilterWithin(filter[firstKey], propertyIdentifier, field);\n }\n if (firstKey === \"$intersects\") {\n return makeGeoFilterIntersects(filter[firstKey], propertyIdentifier, field);\n }\n if (firstKey === \"$containsAllTerms\" || firstKey === \"$containsAnyTerm\") {\n return {\n type: firstKey.substring(1),\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: typeof filter[firstKey] === \"string\" ? filter[firstKey] : filter[firstKey][\"term\"],\n fuzzy: typeof filter[firstKey] === \"string\" ? false : filter[firstKey][\"fuzzySearch\"] ?? false\n };\n }\n if (firstKey === \"$interval\") {\n return {\n type: \"interval\",\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n rule: toIntervalQueryRule(filter[firstKey])\n };\n }\n return {\n type: firstKey.substring(1),\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: filter[firstKey]\n };\n}","/*\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 invariant from \"tiny-invariant\";\n\n/** @internal */\nexport function derivedPropertyDefinitionFactory(wireDefinition, definitionMap) {\n const definition = {\n abs() {\n return derivedPropertyDefinitionFactory({\n type: \"absoluteValue\",\n property: wireDefinition\n }, definitionMap);\n },\n negate() {\n return derivedPropertyDefinitionFactory({\n type: \"negate\",\n property: wireDefinition\n }, definitionMap);\n },\n max(value) {\n return derivedPropertyDefinitionFactory({\n type: \"greatest\",\n properties: [wireDefinition, getDefinitionFromMap(value, definitionMap)]\n }, definitionMap);\n },\n min(value) {\n return derivedPropertyDefinitionFactory({\n type: \"least\",\n properties: [wireDefinition, getDefinitionFromMap(value, definitionMap)]\n }, definitionMap);\n },\n add(value) {\n return derivedPropertyDefinitionFactory({\n type: \"add\",\n properties: [wireDefinition, getDefinitionFromMap(value, definitionMap)]\n }, definitionMap);\n },\n subtract(value) {\n return derivedPropertyDefinitionFactory({\n \"type\": \"subtract\",\n \"left\": wireDefinition,\n \"right\": getDefinitionFromMap(value, definitionMap)\n }, definitionMap);\n },\n multiply(value) {\n return derivedPropertyDefinitionFactory({\n type: \"multiply\",\n properties: [wireDefinition, getDefinitionFromMap(value, definitionMap)]\n }, definitionMap);\n },\n divide(value) {\n return derivedPropertyDefinitionFactory({\n \"type\": \"divide\",\n \"left\": wireDefinition,\n \"right\": getDefinitionFromMap(value, definitionMap)\n }, definitionMap);\n },\n extractPart: part => {\n return derivedPropertyDefinitionFactory({\n type: \"extract\",\n part,\n property: wireDefinition\n }, definitionMap);\n }\n };\n definitionMap.set(definition, wireDefinition);\n return definition;\n}\nconst getDefinitionFromMap = (arg, definitionMap) => {\n if (typeof arg === \"object\") {\n const definition = definitionMap.get(arg);\n !definition ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Derived Property is not defined\") : invariant(false) : void 0;\n return definition;\n } else if (typeof arg === \"number\") {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Literals for derived properties are not yet supported\") : invariant(false) : void 0;\n }\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid argument type for a derived property\") : invariant(false) : void 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\nimport invariant from \"tiny-invariant\";\nimport { modernToLegacyWhereClause } from \"../internal/conversions/modernToLegacyWhereClause.js\";\nimport { derivedPropertyDefinitionFactory } from \"./derivedPropertyDefinitionFactory.js\";\n\n/** @internal */\nexport function createWithPropertiesObjectSet(objectType, objectSet, definitionMap, fromBaseObjectSet = false) {\n return {\n pivotTo: link => {\n return createWithPropertiesObjectSet(objectType, {\n type: \"searchAround\",\n objectSet,\n link\n }, definitionMap);\n },\n where: clause => {\n const rdpNames = new Set(definitionMap.keys());\n return createWithPropertiesObjectSet(objectType, {\n type: \"filter\",\n objectSet,\n where: modernToLegacyWhereClause(clause, objectType, rdpNames)\n }, definitionMap);\n },\n aggregate: (aggregation, opt) => {\n const splitAggregation = aggregation.split(\":\");\n !(splitAggregation.length === 2 || splitAggregation[0] === \"$count\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid aggregation format\") : invariant(false) : void 0;\n const [aggregationPropertyName, aggregationOperation] = splitAggregation;\n let aggregationOperationDefinition;\n switch (aggregationOperation) {\n case \"sum\":\n case \"avg\":\n case \"min\":\n case \"max\":\n case \"exactDistinct\":\n case \"approximateDistinct\":\n aggregationOperationDefinition = {\n type: aggregationOperation,\n selectedPropertyApiName: aggregationPropertyName\n };\n break;\n case \"approximatePercentile\":\n aggregationOperationDefinition = {\n type: \"approximatePercentile\",\n selectedPropertyApiName: aggregationPropertyName,\n approximatePercentile: opt?.percentile ?? .5\n };\n break;\n case \"collectSet\":\n case \"collectList\":\n aggregationOperationDefinition = {\n type: aggregationOperation,\n selectedPropertyApiName: aggregationPropertyName,\n limit: opt?.limit ?? 100\n };\n break;\n case undefined:\n if (aggregationPropertyName === \"$count\") {\n aggregationOperationDefinition = {\n type: \"count\"\n };\n break;\n }\n default:\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid aggregation operation \" + aggregationOperation) : invariant(false) : void 0;\n }\n const wrappedObjectSet = {\n type: \"selection\",\n objectSet,\n operation: aggregationOperationDefinition\n };\n const selectorResult = derivedPropertyDefinitionFactory(wrappedObjectSet, definitionMap);\n definitionMap.set(selectorResult, wrappedObjectSet);\n return selectorResult;\n },\n selectProperty: name => {\n if (fromBaseObjectSet) {\n const wrappedObjectSet = {\n type: \"property\",\n apiName: name\n };\n const selectorResult = derivedPropertyDefinitionFactory(wrappedObjectSet, definitionMap);\n definitionMap.set(selectorResult, wrappedObjectSet);\n return selectorResult;\n }\n const wrappedObjectSet = {\n type: \"selection\",\n objectSet,\n operation: {\n type: \"get\",\n selectedPropertyApiName: name\n }\n };\n const selectorResult = derivedPropertyDefinitionFactory(wrappedObjectSet, definitionMap);\n definitionMap.set(selectorResult, wrappedObjectSet);\n return selectorResult;\n }\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst directionFieldMap = dir => dir === \"asc\" ? \"ASC\" : dir === \"desc\" ? \"DESC\" : undefined;\n\n/** @internal */\nexport function splitAggregationKey(key) {\n const colonPos = key.lastIndexOf(\":\");\n return {\n property: key.slice(0, colonPos),\n metric: key.slice(colonPos + 1)\n };\n}\n\n/** @internal */\nexport function modernToLegacyAggregationClause(select) {\n return Object.entries(select).flatMap(([propAndMetric, aggregationType]) => {\n if (propAndMetric === \"$count\") {\n return {\n type: \"count\",\n name: \"count\",\n direction: directionFieldMap(aggregationType)\n };\n }\n const {\n property,\n metric\n } = splitAggregationKey(propAndMetric);\n return [{\n type: metric,\n name: `${property}.${metric}`,\n direction: directionFieldMap(aggregationType),\n field: property\n }];\n });\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { splitAggregationKey } from \"./modernToLegacyAggregationClause.js\";\n\n/** @internal */\nexport function legacyToModernSingleAggregationResult(entry, select) {\n const result = {};\n\n // Seed the result with undefined for every selected metric so that\n // properties are always present, even when the server returns no metrics\n // (e.g. aggregating over 0 objects).\n for (const selectKey of Object.keys(select)) {\n if (selectKey === \"$count\") {\n continue;\n }\n const {\n property,\n metric\n } = splitAggregationKey(selectKey);\n (result[property] ??= {})[metric] = undefined;\n }\n for (const {\n name,\n value\n } of entry.metrics) {\n if (name === \"count\") {\n continue;\n }\n const [property, metricType] = name.split(\".\");\n if (result[property]) {\n // guard against an unknown metric name\n result[property][metricType] = value;\n }\n }\n return result;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DurationMapping } from \"@osdk/api\";\n/** @internal */\nexport function modernToLegacyGroupByClause(groupByClause) {\n if (!groupByClause) return [];\n return Object.entries(groupByClause).flatMap(([field, type]) => {\n if (type === \"exact\") {\n return [{\n type,\n field\n }];\n } else if (\"$exactWithLimit\" in type) {\n {\n return [{\n type: \"exact\",\n field,\n maxGroupCount: type.$exactWithLimit\n }];\n }\n } else if (\"$exact\" in type) {\n return [{\n type: \"exact\",\n field,\n maxGroupCount: type.$exact?.$limit ?? undefined,\n defaultValue: type.$exact.$defaultValue ?? undefined,\n includeNullValues: type.$exact.$includeNullValue === true ? true : undefined\n }];\n } else if (\"$fixedWidth\" in type) {\n return [{\n type: \"fixedWidth\",\n field,\n fixedWidth: type.$fixedWidth\n }];\n } else if (\"$ranges\" in type) {\n return [{\n type: \"ranges\",\n field,\n ranges: type.$ranges.map(range => convertRange(range))\n }];\n } else if (\"$duration\" in type) {\n return [{\n type: \"duration\",\n field,\n value: type.$duration[0],\n unit: DurationMapping[type.$duration[1]]\n }];\n } else return [];\n });\n}\nfunction convertRange(range) {\n return {\n startValue: range[0],\n endValue: range[1]\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as OntologyObjectSets from \"@osdk/foundry.ontologies/OntologyObjectSet\";\nimport invariant from \"tiny-invariant\";\nimport { legacyToModernSingleAggregationResult } from \"../internal/conversions/legacyToModernSingleAggregationResult.js\";\nimport { modernToLegacyAggregationClause } from \"../internal/conversions/modernToLegacyAggregationClause.js\";\nimport { modernToLegacyGroupByClause } from \"../internal/conversions/modernToLegacyGroupByClause.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\n\n/** @internal */\nexport async function aggregate(clientCtx, objectType, objectSet = resolveBaseObjectSetType(objectType), req) {\n const resolvedObjectSet = resolveBaseObjectSetType(objectType);\n const body = {\n aggregation: modernToLegacyAggregationClause(req.$select),\n groupBy: [],\n where: undefined\n };\n if (req.$groupBy) {\n body.groupBy = modernToLegacyGroupByClause(req.$groupBy);\n }\n if (clientCtx.flushEdits != null) {\n await clientCtx.flushEdits();\n }\n const result = await OntologyObjectSets.aggregate(addUserAgentAndRequestContextHeaders(clientCtx, objectType), await clientCtx.ontologyRid, {\n objectSet,\n groupBy: body.groupBy,\n aggregation: body.aggregation\n }, {\n branch: clientCtx.branch,\n transactionId: clientCtx.transactionId\n });\n if (!result.data || !Array.isArray(result.data)) {\n throw new Error(`Aggregation request failed: ${JSON.stringify(result)}`);\n }\n if (!req.$groupBy) {\n !(result.data.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"no group by clause should mean only one data result\") : invariant(false) : void 0;\n return {\n ...aggregationToCountResult(result.data[0]),\n ...legacyToModernSingleAggregationResult(result.data[0], req.$select)\n };\n }\n const ret = result.data.map(entry => {\n return {\n $group: entry.group,\n ...aggregationToCountResult(entry),\n ...legacyToModernSingleAggregationResult(entry, req.$select)\n };\n }); // fixme\n\n return ret; // FIXME\n}\nfunction aggregationToCountResult(entry) {\n for (const aggregateResult of entry.metrics) {\n if (aggregateResult.name === \"count\") {\n return {\n $count: aggregateResult.value\n };\n }\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PalantirApiError } from \"@osdk/shared.net.errors\";\nimport { fetchPage } from \"./fetchPage.js\";\n\n/** @internal */\nexport async function fetchSingle(client, objectType, args, objectSet) {\n const result = await fetchPage(client, objectType, {\n ...args,\n $pageSize: 1\n }, objectSet);\n if (result.data.length !== 1 || result.nextPageToken != null) {\n throw new PalantirApiError(`Expected a single result but got ${result.data.length} instead${result.nextPageToken != null ? \" with nextPageToken set\" : \"\"}`);\n }\n return result.data[0];\n}\n\n/** @internal */\nexport async function fetchSingleWithErrors(client, objectType, args, objectSet) {\n try {\n const result = await fetchSingle(client, objectType, args, objectSet);\n return {\n value: result\n };\n } catch (e) {\n if (e instanceof Error) {\n return {\n error: e\n };\n }\n return {\n error: e\n };\n }\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\n/**\nReturns a client with its `requestContext` merged with the result of applying\n`augment` to its `requestContext`.\n\nThe second argument is an `Partial<RequestContext>`-returning `augment` function\ninstead of a `RequestContext` object to make referencing the current request\ncontext easier. For example, modifying the `fetchPage` function to add its name\nto the object set's called method chain could look like:\n```\naugmentRequestContext(\n clientContext,\n ctx => ({ methodChain: [...ctx.methodChain, \"fetchPage\"] })\n)\n```\nor\n```\naugmentRequestContext(\n clientContext,\n ({ methodChain }) => ({ methodChain: [...methodChain, \"fetchPage\"] })\n)\n```\ninstead of\n```\naugmentRequestContext(\n clientContext,\n { methodChain: [...clientContext.requestContext.methodChain, \"fetchPage\"] }\n)\n```\n*/\nexport const augmentRequestContext = (client, augment) => ({\n ...client,\n requestContext: {\n ...client.requestContext,\n ...augment(client.requestContext)\n }\n});","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst WIRE_OBJECT_SET_TYPES = new Set([\"base\", \"filter\", \"intersect\", \"reference\", \"searchAround\", \"static\", \"subtract\", \"union\", \"interfaceBase\"]);\n\n/** @internal */\nexport function isWireObjectSet(o) {\n return o != null && typeof o === \"object\" && WIRE_OBJECT_SET_TYPES.has(o.type);\n}","/*\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 * as OntologyObjectSets from \"@osdk/foundry.ontologies/OntologyObjectSet\";\n/** @internal */\nexport const fetchLinksPage = async (client, objectType, objectSet, links) => {\n if (objectType.type === \"interface\") {\n throw new Error(\"Interface object sets are not supported yet.\");\n }\n void client.ontologyProvider.getObjectDefinition(objectType.apiName).catch(() => {});\n const result = await OntologyObjectSets.loadLinks(client, await client.ontologyRid, {\n objectSet,\n links\n }, {\n branch: client.branch,\n preview: true\n });\n return remapLinksPage(result);\n};\n\n/** @internal */\nexport const remapLinksPage = wireLinksPage => {\n return {\n ...wireLinksPage,\n data: wireLinksPage.data.flatMap(({\n sourceObject,\n linkedObjects\n }) => linkedObjects.map(({\n targetObject,\n linkType\n }) => ({\n source: remapObjectLocator(sourceObject),\n target: remapObjectLocator(targetObject),\n linkType: linkType\n })))\n };\n};\n\n/** @internal */\nexport const remapObjectLocator = wireObjectLocator => ({\n $apiName: wireObjectLocator.__apiName,\n $primaryKey: wireObjectLocator.__primaryKey\n});","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { createWithPropertiesObjectSet } from \"../derivedProperties/createWithPropertiesObjectSet.js\";\nimport { modernToLegacyWhereClause } from \"../internal/conversions/modernToLegacyWhereClause.js\";\nimport { aggregate } from \"../object/aggregate.js\";\nimport { fetchPageInternal, fetchPageWithErrorsInternal } from \"../object/fetchPage.js\";\nimport { fetchSingle, fetchSingleWithErrors } from \"../object/fetchSingle.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\nimport { isWireObjectSet } from \"../util/WireObjectSet.js\";\nimport { fetchLinksPage } from \"./fetchLinksPage.js\";\nfunction isObjectTypeDefinition(def) {\n return def.type === \"object\";\n}\nexport function isObjectSet(o) {\n return o != null && typeof o === \"object\" && isWireObjectSet(objectSetDefinitions.get(o));\n}\nexport function getWireObjectSet(objectSet) {\n return objectSetDefinitions.get(objectSet);\n}\n\n/** @internal exported for internal use only */\nexport const objectSetDefinitions = new WeakMap();\n\n/** @internal */\nexport function createObjectSet(objectType, clientCtx, objectSet = resolveBaseObjectSetType(objectType)) {\n const base = {\n aggregate: aggregate.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"aggregate\"\n })), objectType, objectSet),\n fetchPage: fetchPageInternal.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchPage\"\n })), objectType, objectSet),\n fetchPageWithErrors: fetchPageWithErrorsInternal.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchPageWithErrors\"\n })), objectType, objectSet),\n where: clause => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"filter\",\n objectSet: objectSet,\n where: modernToLegacyWhereClause(clause, objectType)\n });\n },\n pivotTo: function (type) {\n return createSearchAround(type)();\n },\n union: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"union\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n intersect: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"intersect\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n subtract: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"subtract\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n nearestNeighbors: (query, numNeighbors, property) => {\n const nearestNeighborsQuery = isTextQuery(query) ? {\n \"type\": \"text\",\n \"value\": query\n } : {\n \"type\": \"vector\",\n \"value\": query\n };\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"nearestNeighbors\",\n objectSet,\n propertyIdentifier: {\n type: \"property\",\n apiName: property\n },\n numNeighbors,\n query: nearestNeighborsQuery\n });\n },\n asyncIter: async function* (args) {\n let $nextPageToken = undefined;\n do {\n const result = await fetchPageInternal(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"asyncIter\"\n })), objectType, objectSet, {\n ...args,\n $pageSize: 10000,\n $nextPageToken\n }, true);\n $nextPageToken = result.nextPageToken;\n for (const obj of result.data) {\n yield obj;\n }\n } while ($nextPageToken != null);\n },\n fetchOne: isObjectTypeDefinition(objectType) ? async (primaryKey, options) => {\n return await fetchSingle(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchOne\"\n })), objectType, options, await createWithPk(clientCtx, objectType, objectSet, primaryKey));\n } : undefined,\n fetchOneWithErrors: isObjectTypeDefinition(objectType) ? async (primaryKey, options) => {\n return await fetchSingleWithErrors(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchOneWithErrors\"\n })), objectType, options, await createWithPk(clientCtx, objectType, objectSet, primaryKey));\n } : undefined,\n subscribe: (listener, opts) => {\n const pendingSubscribe = import(\"./ObjectSetListenerWebsocket.js\").then(({\n ObjectSetListenerWebsocket\n }) => ObjectSetListenerWebsocket.getInstance(clientCtx).subscribe(objectType, objectSet, listener, opts?.properties, opts?.includeRid));\n return {\n unsubscribe: async () => (await pendingSubscribe)()\n };\n },\n withProperties: clause => {\n const definitionMap = new Map();\n const derivedProperties = {};\n for (const key of Object.keys(clause)) {\n const derivedPropertyDefinition = clause[key](createWithPropertiesObjectSet(objectType, {\n type: \"methodInput\"\n }, definitionMap, true));\n derivedProperties[key] = definitionMap.get(derivedPropertyDefinition);\n }\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"withProperties\",\n derivedProperties: derivedProperties,\n objectSet: objectSet\n });\n },\n narrowToType: objectTypeDef => {\n const existingMapping = clientCtx.narrowTypeInterfaceOrObjectMapping[objectTypeDef.apiName];\n !(!existingMapping || existingMapping === objectTypeDef.type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `${objectTypeDef.apiName} was previously used as an ${existingMapping}, but now used as a ${objectTypeDef.type}.`) : invariant(false) : void 0;\n clientCtx.narrowTypeInterfaceOrObjectMapping[objectTypeDef.apiName] = objectTypeDef.type;\n return clientCtx.objectSetFactory(objectTypeDef, clientCtx, {\n type: \"asType\",\n objectSet: objectSet,\n entityType: objectTypeDef.apiName\n });\n },\n experimental_asyncIterLinks: async function* (links) {\n let $nextPageToken = undefined;\n do {\n const result = await fetchLinksPage(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"asyncIterLinks\"\n })), objectType, objectSet, links);\n $nextPageToken = result.nextPageToken;\n for (const obj of result.data) {\n yield obj;\n }\n } while ($nextPageToken != null);\n },\n $objectSetInternals: {\n def: objectType\n }\n };\n function createSearchAround(link) {\n return () => {\n return clientCtx.objectSetFactory(objectType, clientCtx, objectType.type === \"object\" ? {\n type: \"searchAround\",\n objectSet,\n link\n } : {\n type: \"interfaceLinkSearchAround\",\n objectSet,\n interfaceLink: link\n });\n };\n }\n objectSetDefinitions.set(base, objectSet);\n\n // we are using a type assertion because the marker symbol defined in BaseObjectSet isn't actually used\n // at runtime.\n return base;\n}\nasync function createWithPk(clientCtx, objectType, objectSet, primaryKey) {\n const objDef = await clientCtx.ontologyProvider.getObjectDefinition(objectType.apiName);\n const withPk = {\n type: \"filter\",\n objectSet: objectSet,\n where: {\n type: \"eq\",\n field: objDef.primaryKeyApiName,\n value: primaryKey\n }\n };\n return withPk;\n}\nfunction isTextQuery(query) {\n return typeof query === \"string\";\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _upload = [1, \"/v2/ontologies/attachments/upload\", 7, \"*/*\"];\n/**\n * Upload an attachment to use in an action. Any attachment which has not been linked to an object via\n * an action within one hour after upload will be removed.\n * Previously mapped attachments which are not connected to any object anymore are also removed on\n * a biweekly basis.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-write]\n * URL: /v2/ontologies/attachments/upload\n */\nexport function upload($ctx, ...args) {\n const headerParams = {\n ...args[2],\n \"Content-Type\": args[2]?.[\"Content-Type\"] ?? args[0].type,\n \"Content-Length\": args[0].size.toString()\n };\n return $foundryPlatformFetch($ctx, _upload, args[0], args[1], headerParams);\n}\nconst _uploadWithRid = [1, \"/v2/ontologies/attachments/upload/{0}\", 7, \"*/*\"];\n/**\n * This endpoint is identical to `/v2/ontologies/attachments/upload` but additionally accepts a previously\n * generated `AttachmentRid`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-write]\n * URL: /v2/ontologies/attachments/upload/{attachmentRid}\n */\nexport function uploadWithRid($ctx, ...args) {\n const headerParams = {\n ...args[3],\n \"Content-Type\": args[3]?.[\"Content-Type\"] ?? args[1].type,\n \"Content-Length\": args[1].size.toString()\n };\n return $foundryPlatformFetch($ctx, _uploadWithRid, args[0], args[1], args[2], headerParams);\n}\nconst _read = [0, \"/v2/ontologies/attachments/{0}/content\",,, \"*/*\"];\n/**\n * Get the content of an attachment.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}/content\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _get = [0, \"/v2/ontologies/attachments/{0}\"];\n/**\n * Get the metadata of an attachment.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.8.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nconst ErrorMessage = Symbol(\"ErrorMessage\");","/*\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 * as Attachments from \"@osdk/foundry.ontologies/Attachment\";\nimport { additionalContext } from \"../Client.js\";\n/**\n * Helper function to create an attachment type from a rid\n * @param client - An OSDK client.\n * @param rid - The rid of attachment in Foundry.\n * @returns An OSDK attachment object\n */\nexport function hydrateAttachmentFromRid(client, rid) {\n return hydrateAttachmentFromRidInternal(client[additionalContext], rid);\n}\n\n/** @internal */\nexport function hydrateAttachmentFromRidInternal(client, rid) {\n return {\n rid,\n async fetchContents() {\n return Attachments.read(client, rid);\n },\n async fetchMetadata() {\n const r = await Attachments.get(client, rid);\n return {\n ...r,\n sizeBytes: Number(r.sizeBytes)\n };\n }\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function noop() {}\nconst levels = {\n trace: 10,\n debug: 20,\n info: 30,\n warn: 40,\n error: 50,\n fatal: 60\n};\nexport class BaseLogger {\n #factory;\n constructor(bindings, options = {}, factory) {\n this.bindings = bindings;\n this.options = options;\n this.#factory = factory;\n for (const k of [\"trace\", \"debug\", \"info\", \"warn\", \"error\", \"fatal\"]) {\n if (this.options?.level && !this.isLevelEnabled(k)) {\n continue;\n }\n this[k] = this.createLogMethod(k, bindings);\n }\n }\n trace = noop;\n debug = noop;\n warn = noop;\n info = noop;\n error = noop;\n fatal = noop;\n child(bindings, options) {\n return new this.#factory({\n ...this.bindings,\n ...bindings\n }, {\n level: options?.level ?? this.options?.level,\n msgPrefix: [this.options?.msgPrefix, options?.msgPrefix].filter(x => x).join(\" \")\n });\n }\n isLevelEnabled(level) {\n const ourLevel = this.options?.level ?? \"info\";\n return level in levels && ourLevel in levels && levels[level] >= levels[ourLevel];\n }\n}","/*\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 { BaseLogger } from \"./BaseLogger.js\";\nexport class MinimalLogger extends BaseLogger {\n constructor(bindings = {}, options = {}) {\n super(bindings, {\n ...options,\n level: options.level ?? \"error\"\n }, MinimalLogger);\n }\n createLogMethod(name, bindings) {\n const msgs = [name];\n if (this.options?.msgPrefix) {\n msgs.push(this.options.msgPrefix);\n }\n if (typeof bindings === \"object\" && \"methodName\" in bindings) {\n msgs.push(`.${bindings.methodName}()`);\n }\n return (...args) => {\n // eslint-disable-next-line no-console\n console[name === \"fatal\" ? \"error\" : name](msgs.join(\" \"), ...args);\n };\n }\n}"]}