@osdk/client 2.7.0-beta.9 → 2.7.0
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.
- package/CHANGELOG.md +236 -0
- package/build/browser/MinimalClientContext.js.map +1 -1
- package/build/browser/actions/actions.test.js +9 -8
- package/build/browser/actions/actions.test.js.map +1 -1
- package/build/browser/actions/applyAction.js +0 -4
- package/build/browser/actions/applyAction.js.map +1 -1
- package/build/browser/createClient.js +1 -2
- package/build/browser/createClient.js.map +1 -1
- package/build/browser/createMinimalClient.js +0 -1
- package/build/browser/createMinimalClient.js.map +1 -1
- package/build/browser/derivedProperties/createWithPropertiesObjectSet.js +1 -17
- package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
- package/build/browser/index.js +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js +14 -9
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +74 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
- package/build/browser/object/SimpleOsdkProperties.js.map +1 -1
- package/build/browser/object/aggregate.js +0 -1
- package/build/browser/object/aggregate.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
- package/build/browser/object/fetchPage.js +0 -2
- package/build/browser/object/fetchPage.js.map +1 -1
- package/build/browser/objectSet/ObjectSetListenerWebsocket.js +13 -4
- package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
- package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +46 -2
- package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
- package/build/browser/objectSet/createObjectSet.js +1 -1
- package/build/browser/objectSet/createObjectSet.js.map +1 -1
- package/build/browser/objectSet/fetchLinksPage.js +0 -1
- package/build/browser/objectSet/fetchLinksPage.js.map +1 -1
- package/build/browser/observable/FunctionPayload.js +2 -0
- package/build/browser/observable/FunctionPayload.js.map +1 -0
- package/build/browser/observable/ObservableClient.js.map +1 -1
- package/build/browser/observable/internal/BulkObjectLoader.js +2 -1
- package/build/browser/observable/internal/BulkObjectLoader.js.map +1 -1
- package/build/browser/observable/internal/Changes.js +4 -1
- package/build/browser/observable/internal/Changes.js.map +1 -1
- package/build/browser/observable/internal/KnownCacheKey.js.map +1 -1
- package/build/browser/observable/internal/ObservableClientImpl.js +21 -1
- package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/browser/observable/internal/RidListCanonicalizer.js +30 -0
- package/build/browser/observable/internal/RidListCanonicalizer.js.map +1 -0
- package/build/browser/observable/internal/RidListCanonicalizer.test.js +50 -0
- package/build/browser/observable/internal/RidListCanonicalizer.test.js.map +1 -0
- package/build/browser/observable/internal/Store.js +11 -1
- package/build/browser/observable/internal/Store.js.map +1 -1
- package/build/browser/observable/internal/Store.test.js +57 -4
- package/build/browser/observable/internal/Store.test.js.map +1 -1
- package/build/browser/observable/internal/actions/ActionApplication.js +12 -9
- package/build/browser/observable/internal/actions/ActionApplication.js.map +1 -1
- package/build/browser/observable/internal/base-list/BaseCollectionQuery.js.map +1 -1
- package/build/browser/observable/internal/base-list/BaseListQuery.js +15 -9
- package/build/browser/observable/internal/base-list/BaseListQuery.js.map +1 -1
- package/build/browser/observable/internal/base-list/createCollectionConnectable.js +4 -2
- package/build/browser/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
- package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js +1 -2
- package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
- package/build/browser/observable/internal/evaluateFilter.js +1 -1
- package/build/browser/observable/internal/evaluateFilter.js.map +1 -1
- package/build/browser/observable/internal/evaluateFilter.test.js +105 -0
- package/build/browser/observable/internal/evaluateFilter.test.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionCacheKey.js +26 -0
- package/build/browser/observable/internal/function/FunctionCacheKey.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionParamsCanonicalizer.js +151 -0
- package/build/browser/observable/internal/function/FunctionParamsCanonicalizer.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionParamsCanonicalizer.test.js +186 -0
- package/build/browser/observable/internal/function/FunctionParamsCanonicalizer.test.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionQuery.js +137 -0
- package/build/browser/observable/internal/function/FunctionQuery.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionQuery.test.js +278 -0
- package/build/browser/observable/internal/function/FunctionQuery.test.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionsHelper.js +92 -0
- package/build/browser/observable/internal/function/FunctionsHelper.js.map +1 -0
- package/build/browser/observable/internal/links/SpecificLinkQuery.js +2 -1
- package/build/browser/observable/internal/links/SpecificLinkQuery.js.map +1 -1
- package/build/browser/observable/internal/list/InterfaceListQuery.js +27 -10
- package/build/browser/observable/internal/list/InterfaceListQuery.js.map +1 -1
- package/build/browser/observable/internal/list/ListCacheKey.js +1 -0
- package/build/browser/observable/internal/list/ListCacheKey.js.map +1 -1
- package/build/browser/observable/internal/list/ListQuery.js +10 -4
- package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
- package/build/browser/observable/internal/list/ListQuery.test.js +167 -3
- package/build/browser/observable/internal/list/ListQuery.test.js.map +1 -1
- package/build/browser/observable/internal/list/ListsHelper.js +6 -3
- package/build/browser/observable/internal/list/ListsHelper.js.map +1 -1
- package/build/browser/observable/internal/list/ObjectListQuery.js +23 -9
- package/build/browser/observable/internal/list/ObjectListQuery.js.map +1 -1
- package/build/browser/observable/internal/object/ObjectQuery.js +15 -1
- package/build/browser/observable/internal/object/ObjectQuery.js.map +1 -1
- package/build/browser/observable/internal/object/ObjectsHelper.js +1 -3
- package/build/browser/observable/internal/object/ObjectsHelper.js.map +1 -1
- package/build/browser/observable/internal/objectMatchesWhereClause.test.js +11 -1
- package/build/browser/observable/internal/objectMatchesWhereClause.test.js.map +1 -1
- package/build/browser/observable/internal/objectset/ObjectSetQuery.js +6 -2
- package/build/browser/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
- package/build/browser/observable/internal/testUtils.js +8 -5
- package/build/browser/observable/internal/testUtils.js.map +1 -1
- package/build/browser/observable/internal/utils/rdpFieldOperations.js +6 -3
- package/build/browser/observable/internal/utils/rdpFieldOperations.js.map +1 -1
- package/build/browser/ontology/loadActionMetadata.js +1 -3
- package/build/browser/ontology/loadActionMetadata.js.map +1 -1
- package/build/browser/ontology/loadFullObjectMetadata.js +1 -2
- package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -1
- package/build/browser/ontology/loadInterfaceMetadata.js +1 -2
- package/build/browser/ontology/loadInterfaceMetadata.js.map +1 -1
- package/build/browser/public/unstable-do-not-use.js.map +1 -1
- package/build/browser/queries/applyQuery.js +14 -0
- package/build/browser/queries/applyQuery.js.map +1 -1
- package/build/browser/queries/queries.test.js +14 -2
- package/build/browser/queries/queries.test.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/browser/util/isObjectSpecifiersObject.js.map +1 -1
- package/build/browser/util/toDataValue.js +0 -5
- package/build/browser/util/toDataValue.js.map +1 -1
- package/build/browser/util/toDataValue.test.js +2 -7
- package/build/browser/util/toDataValue.test.js.map +1 -1
- package/build/cjs/{Client-DaUJl7jZ.d.cts → Client-Cmx6x_V1.d.cts} +1 -1
- package/build/cjs/{chunk-IQJTM3KW.cjs → chunk-W4BHRZWL.cjs} +79 -82
- package/build/cjs/chunk-W4BHRZWL.cjs.map +1 -0
- package/build/cjs/{chunk-PARVKNVB.cjs → chunk-Y362HOIZ.cjs} +30 -35
- package/build/cjs/chunk-Y362HOIZ.cjs.map +1 -0
- package/build/cjs/{createClient-D5G3qzAO.d.cts → createClient-BDmrDOzZ.d.cts} +1 -2
- package/build/cjs/index.cjs +8 -12
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +3 -3
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/internal.d.cts +1 -1
- package/build/cjs/public/unstable-do-not-use.cjs +537 -95
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.d.cts +75 -4
- package/build/esm/MinimalClientContext.js.map +1 -1
- package/build/esm/actions/actions.test.js +9 -8
- package/build/esm/actions/actions.test.js.map +1 -1
- package/build/esm/actions/applyAction.js +0 -4
- package/build/esm/actions/applyAction.js.map +1 -1
- package/build/esm/createClient.js +1 -2
- package/build/esm/createClient.js.map +1 -1
- package/build/esm/createMinimalClient.js +0 -1
- package/build/esm/createMinimalClient.js.map +1 -1
- package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +1 -17
- package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js +14 -9
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +74 -0
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
- package/build/esm/object/SimpleOsdkProperties.js.map +1 -1
- package/build/esm/object/aggregate.js +0 -1
- package/build/esm/object/aggregate.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
- package/build/esm/object/fetchPage.js +0 -2
- package/build/esm/object/fetchPage.js.map +1 -1
- package/build/esm/objectSet/ObjectSetListenerWebsocket.js +13 -4
- package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
- package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +46 -2
- package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
- package/build/esm/objectSet/createObjectSet.js +1 -1
- package/build/esm/objectSet/createObjectSet.js.map +1 -1
- package/build/esm/objectSet/fetchLinksPage.js +0 -1
- package/build/esm/objectSet/fetchLinksPage.js.map +1 -1
- package/build/esm/observable/FunctionPayload.js +2 -0
- package/build/esm/observable/FunctionPayload.js.map +1 -0
- package/build/esm/observable/ObservableClient.js.map +1 -1
- package/build/esm/observable/internal/BulkObjectLoader.js +2 -1
- package/build/esm/observable/internal/BulkObjectLoader.js.map +1 -1
- package/build/esm/observable/internal/Changes.js +4 -1
- package/build/esm/observable/internal/Changes.js.map +1 -1
- package/build/esm/observable/internal/KnownCacheKey.js.map +1 -1
- package/build/esm/observable/internal/ObservableClientImpl.js +21 -1
- package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/esm/observable/internal/RidListCanonicalizer.js +30 -0
- package/build/esm/observable/internal/RidListCanonicalizer.js.map +1 -0
- package/build/esm/observable/internal/RidListCanonicalizer.test.js +50 -0
- package/build/esm/observable/internal/RidListCanonicalizer.test.js.map +1 -0
- package/build/esm/observable/internal/Store.js +11 -1
- package/build/esm/observable/internal/Store.js.map +1 -1
- package/build/esm/observable/internal/Store.test.js +57 -4
- package/build/esm/observable/internal/Store.test.js.map +1 -1
- package/build/esm/observable/internal/actions/ActionApplication.js +12 -9
- package/build/esm/observable/internal/actions/ActionApplication.js.map +1 -1
- package/build/esm/observable/internal/base-list/BaseCollectionQuery.js.map +1 -1
- package/build/esm/observable/internal/base-list/BaseListQuery.js +15 -9
- package/build/esm/observable/internal/base-list/BaseListQuery.js.map +1 -1
- package/build/esm/observable/internal/base-list/createCollectionConnectable.js +4 -2
- package/build/esm/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
- package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js +1 -2
- package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
- package/build/esm/observable/internal/evaluateFilter.js +1 -1
- package/build/esm/observable/internal/evaluateFilter.js.map +1 -1
- package/build/esm/observable/internal/evaluateFilter.test.js +105 -0
- package/build/esm/observable/internal/evaluateFilter.test.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionCacheKey.js +26 -0
- package/build/esm/observable/internal/function/FunctionCacheKey.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionParamsCanonicalizer.js +151 -0
- package/build/esm/observable/internal/function/FunctionParamsCanonicalizer.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionParamsCanonicalizer.test.js +186 -0
- package/build/esm/observable/internal/function/FunctionParamsCanonicalizer.test.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionQuery.js +137 -0
- package/build/esm/observable/internal/function/FunctionQuery.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionQuery.test.js +278 -0
- package/build/esm/observable/internal/function/FunctionQuery.test.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionsHelper.js +92 -0
- package/build/esm/observable/internal/function/FunctionsHelper.js.map +1 -0
- package/build/esm/observable/internal/links/SpecificLinkQuery.js +2 -1
- package/build/esm/observable/internal/links/SpecificLinkQuery.js.map +1 -1
- package/build/esm/observable/internal/list/InterfaceListQuery.js +27 -10
- package/build/esm/observable/internal/list/InterfaceListQuery.js.map +1 -1
- package/build/esm/observable/internal/list/ListCacheKey.js +1 -0
- package/build/esm/observable/internal/list/ListCacheKey.js.map +1 -1
- package/build/esm/observable/internal/list/ListQuery.js +10 -4
- package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
- package/build/esm/observable/internal/list/ListQuery.test.js +167 -3
- package/build/esm/observable/internal/list/ListQuery.test.js.map +1 -1
- package/build/esm/observable/internal/list/ListsHelper.js +6 -3
- package/build/esm/observable/internal/list/ListsHelper.js.map +1 -1
- package/build/esm/observable/internal/list/ObjectListQuery.js +23 -9
- package/build/esm/observable/internal/list/ObjectListQuery.js.map +1 -1
- package/build/esm/observable/internal/object/ObjectQuery.js +15 -1
- package/build/esm/observable/internal/object/ObjectQuery.js.map +1 -1
- package/build/esm/observable/internal/object/ObjectsHelper.js +1 -3
- package/build/esm/observable/internal/object/ObjectsHelper.js.map +1 -1
- package/build/esm/observable/internal/objectMatchesWhereClause.test.js +11 -1
- package/build/esm/observable/internal/objectMatchesWhereClause.test.js.map +1 -1
- package/build/esm/observable/internal/objectset/ObjectSetQuery.js +6 -2
- package/build/esm/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
- package/build/esm/observable/internal/testUtils.js +8 -5
- package/build/esm/observable/internal/testUtils.js.map +1 -1
- package/build/esm/observable/internal/utils/rdpFieldOperations.js +6 -3
- package/build/esm/observable/internal/utils/rdpFieldOperations.js.map +1 -1
- package/build/esm/ontology/loadActionMetadata.js +1 -3
- package/build/esm/ontology/loadActionMetadata.js.map +1 -1
- package/build/esm/ontology/loadFullObjectMetadata.js +1 -2
- package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -1
- package/build/esm/ontology/loadInterfaceMetadata.js +1 -2
- package/build/esm/ontology/loadInterfaceMetadata.js.map +1 -1
- package/build/esm/public/unstable-do-not-use.js.map +1 -1
- package/build/esm/queries/applyQuery.js +14 -0
- package/build/esm/queries/applyQuery.js.map +1 -1
- package/build/esm/queries/queries.test.js +14 -2
- package/build/esm/queries/queries.test.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/esm/util/isObjectSpecifiersObject.js.map +1 -1
- package/build/esm/util/toDataValue.js +0 -5
- package/build/esm/util/toDataValue.js.map +1 -1
- package/build/esm/util/toDataValue.test.js +2 -7
- package/build/esm/util/toDataValue.test.js.map +1 -1
- package/build/types/MinimalClientContext.d.ts +1 -1
- package/build/types/actions/applyAction.d.ts.map +1 -1
- package/build/types/createClient.d.ts +0 -1
- package/build/types/createClient.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/objectSet/createObjectSet.d.ts +14 -1
- package/build/types/objectSet/createObjectSet.d.ts.map +1 -1
- package/build/types/objectSet/fetchLinksPage.d.ts +9 -1
- package/build/types/objectSet/fetchLinksPage.d.ts.map +1 -1
- package/build/types/observable/FunctionPayload.d.ts +10 -0
- package/build/types/observable/FunctionPayload.d.ts.map +1 -0
- package/build/types/observable/ObservableClient.d.ts +73 -1
- package/build/types/observable/ObservableClient.d.ts.map +1 -1
- package/build/types/observable/internal/BulkObjectLoader.d.ts.map +1 -1
- package/build/types/observable/internal/Changes.d.ts +5 -3
- package/build/types/observable/internal/Changes.d.ts.map +1 -1
- package/build/types/observable/internal/KnownCacheKey.d.ts +2 -1
- package/build/types/observable/internal/KnownCacheKey.d.ts.map +1 -1
- package/build/types/observable/internal/RidListCanonicalizer.d.ts +5 -0
- package/build/types/observable/internal/RidListCanonicalizer.d.ts.map +1 -0
- package/build/types/observable/internal/RidListCanonicalizer.test.d.ts +1 -0
- package/build/types/observable/internal/RidListCanonicalizer.test.d.ts.map +1 -0
- package/build/types/observable/internal/Store.d.ts +7 -1
- package/build/types/observable/internal/Store.d.ts.map +1 -1
- package/build/types/observable/internal/Store.test.d.ts.map +1 -1
- package/build/types/observable/internal/actions/ActionApplication.d.ts.map +1 -1
- package/build/types/observable/internal/base-list/BaseCollectionQuery.d.ts +3 -0
- package/build/types/observable/internal/base-list/BaseCollectionQuery.d.ts.map +1 -1
- package/build/types/observable/internal/base-list/BaseListQuery.d.ts +3 -1
- package/build/types/observable/internal/base-list/BaseListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/evaluateFilter.test.d.ts +1 -0
- package/build/types/observable/internal/evaluateFilter.test.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionCacheKey.d.ts +17 -0
- package/build/types/observable/internal/function/FunctionCacheKey.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionParamsCanonicalizer.d.ts +16 -0
- package/build/types/observable/internal/function/FunctionParamsCanonicalizer.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionParamsCanonicalizer.test.d.ts +1 -0
- package/build/types/observable/internal/function/FunctionParamsCanonicalizer.test.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionQuery.d.ts +40 -0
- package/build/types/observable/internal/function/FunctionQuery.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionQuery.test.d.ts +1 -0
- package/build/types/observable/internal/function/FunctionQuery.test.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionsHelper.d.ts +25 -0
- package/build/types/observable/internal/function/FunctionsHelper.d.ts.map +1 -0
- package/build/types/observable/internal/links/SpecificLinkQuery.d.ts.map +1 -1
- package/build/types/observable/internal/list/InterfaceListQuery.d.ts +3 -0
- package/build/types/observable/internal/list/InterfaceListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListCacheKey.d.ts +2 -1
- package/build/types/observable/internal/list/ListCacheKey.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListQuery.d.ts +1 -1
- package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListsHelper.d.ts +3 -1
- package/build/types/observable/internal/list/ListsHelper.d.ts.map +1 -1
- package/build/types/observable/internal/list/ObjectListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/object/ObjectQuery.d.ts.map +1 -1
- package/build/types/observable/internal/object/ObjectsHelper.d.ts.map +1 -1
- package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts +1 -0
- package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts.map +1 -1
- package/build/types/observable/internal/testUtils.d.ts.map +1 -1
- package/build/types/observable/internal/utils/rdpFieldOperations.d.ts.map +1 -1
- package/build/types/public/unstable-do-not-use.d.ts +2 -1
- package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
- package/build/types/queries/applyQuery.d.ts.map +1 -1
- package/build/types/util/isObjectSpecifiersObject.d.ts +1 -0
- package/build/types/util/isObjectSpecifiersObject.d.ts.map +1 -1
- package/package.json +11 -12
- package/build/cjs/chunk-IQJTM3KW.cjs.map +0 -1
- package/build/cjs/chunk-PARVKNVB.cjs.map +0 -1
- package/build/cjs/delay-W2TSML2P.cjs +0 -75
- package/build/cjs/delay-W2TSML2P.cjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/object/fetchPage.ts","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/index.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js","../../../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/index.js","../../../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js","../../../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js","../../../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeFullMetadata.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/CipherTextProperty.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyTransaction.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyValueType.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js","../../src/internal/conversions/extractNamespace.ts","../../src/util/addUserAgentAndRequestContextHeaders.ts","../../src/util/extractObjectOrInterfaceType.ts","../../src/util/extractRdpDefinition.ts","../../src/util/objectSetUtils.ts","../../src/public-utils/hydrateAttachmentFromRid.ts","../../src/Client.ts","../../src/logger/MinimalLogger.ts","../../src/logger/BaseLogger.ts","../../src/object/fetchSingle.ts","../../src/objectSet/createObjectSet.ts","../../src/derivedProperties/createWithPropertiesObjectSet.ts","../../src/internal/conversions/modernToLegacyWhereClause.ts","../../src/internal/conversions/fullyQualifyPropName.ts","../../src/internal/conversions/makeGeoFilterIntersects.ts","../../src/internal/conversions/makeGeoFilterBbox.ts","../../src/internal/conversions/makeGeoFilterPolygon.ts","../../src/internal/conversions/makeGeoFilterWithin.ts","../../src/derivedProperties/derivedPropertyDefinitionFactory.ts","../../src/object/aggregate.ts","../../src/internal/conversions/legacyToModernSingleAggregationResult.ts","../../src/internal/conversions/modernToLegacyAggregationClause.ts","../../src/internal/conversions/modernToLegacyGroupByClause.ts","../../src/util/augmentRequestContext.ts","../../src/util/WireObjectSet.ts","../../src/objectSet/fetchLinksPage.ts","../../src/objectSet/ObjectSetListenerWebsocket.ts","../../src/util/exponentialBackoff.ts"],"names":["init_cjs_shims","__export","symbolClientContext","PalantirApiError","UnknownError","get","_get","upload","_upload","list","_list","aggregate","_aggregate","createFetchHeaderMutator","def","objOrInterfaceDef","linkDef","invariant","objectSets","objectSetTypes","filteredObjectTypes","definitions","requestBody","result","DistanceUnitMapping","wrappedObjectSet","selectorResult","DurationMapping","augment","WebSocket"],"mappings":";;;;;;;;;;;;;;;AAAAA,gCAAA,EAAA;;;ACAAA,gCAAA,EAAA;;;ACAA,IAAA,cAAA,GAAA;AAAAC,0BAAA,CAAA,cAAA,EAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,kBAAA,EAAA,MAAA;AAAA,CAAA,CAAA;AAAAD,gCAAA,EAAA;;;ACAAA,gCAAA,EAAA;;;ACAAA,gCAAA,EAAA;;;ACAAA,gCAAA,EAAA;AAgBa,IAAA,mBAAA,GAAsB,OAAO,eAAe;;;AChBzDA,gCAAA,EAAA;AAgBO,IAAME,oBAAsB,GAAA,qBAAA;AFEnC,eAAsB,oBAAA,CAAqB,QAAQ,CAAC,aAAA,EAAe,UAAU,KAAO,EAAA,WAAA,EAAa,mBAAmB,CAAA,EAAA,GAAM,IAAM,EAAA;AAC9H,EAAM,MAAA,IAAA,GAAO,SAAS,OAAQ,CAAA,cAAA,EAAgB,MAAM,kBAAmB,CAAA,IAAA,CAAK,KAAM,EAAC,CAAC,CAAA;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A,cAAA,GAAiB,MAAO,CAAA,aAAA;AACxB,QAAW,KAAA,MAAA,GAAA,IAAO,OAAO,IAAM,EAAA;AAC7B,UAAM,MAAA,GAAA;AAAA;AACR,eACO,cAAkB,IAAA,IAAA;AAAA,KAC7B;AAAA,IACA,mBAAqB,EAAA;AAAA,MACnB,GAAK,EAAA;AAAA;AACP,GACF;AACA,EAAA,SAAS,mBAAmB,IAAM,EAAA;AAChC,IAAA,OAAO,MAAM;AACX,MAAA,OAAO,UAAU,gBAAiB,CAAA,UAAA,EAAY,SAAW,EAAA,UAAA,CAAW,SAAS,QAAW,GAAA;AAAA,QACtF,IAAM,EAAA,cAAA;AAAA,QACN,SAAA;AAAA,QACA;AAAA,OACE,GAAA;AAAA,QACF,IAAM,EAAA,2BAAA;AAAA,QACN,SAAA;AAAA,QACA,aAAe,EAAA;AAAA,OAChB,CAAA;AAAA,KACH;AAAA;AAEF,EAAqB,oBAAA,CAAA,GAAA,CAAI,MAAM,SAAS,CAAA;AAIxC,EAAO,OAAA,IAAA;AACT;AACA,eAAe,YAAa,CAAA,SAAA,EAAW,UAAY,EAAA,SAAA,EAAW,UAAY,EAAA;AACxE,EAAA,MAAM,SAAS,MAAM,SAAA,CAAU,gBAAiB,CAAA,mBAAA,CAAoB,WAAW,OAAO,CAAA;AACtF,EAAA,MAAM,MAAS,GAAA;AAAA,IACb,IAAM,EAAA,QAAA;AAAA,IACN,SAAA;AAAA,IACA,KAAO,EAAA;AAAA,MACL,IAAM,EAAA,IAAA;AAAA,MACN,OAAO,MAAO,CAAA,iBAAA;AAAA,MACd,KAAO,EAAA;AAAA;AACT,GACF;AACA,EAAO,OAAA,MAAA;AACT;AACA,SAAS,YAAY,KAAO,EAAA;AAC1B,EAAA,OAAO,OAAO,KAAU,KAAA,QAAA;AAC1B","file":"chunk-PARVKNVB.cjs","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as OntologiesV2 from \"@osdk/foundry.ontologies\";\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 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 }, client, {\n type: \"object\",\n apiName: \"\"\n });\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const result = await OntologiesV2.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, {}, !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 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 OntologiesV2.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));\n return result;\n }\n const extractedInterfaceTypeApiName = (await extractObjectOrInterfaceType(client, objectSet))?.apiName ?? interfaceType.apiName;\n const resolvedInterfaceObjectSet = resolveInterfaceObjectSet(objectSet, extractedInterfaceTypeApiName, args);\n const requestBody = await buildAndRemapRequestBody(args, {\n objectSet: resolvedInterfaceObjectSet,\n select: args?.$select ? [...args.$select] : [],\n selectV2: [],\n excludeRid: !args?.$includeRid,\n snapshot: useSnapshot\n }, client, interfaceType);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const result = await OntologiesV2.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, {}, !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 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 requestBody = await buildAndRemapRequestBody(args, {\n objectSet,\n select: args?.$select ? [...args.$select] : [],\n selectV2: [],\n excludeRid: !args?.$includeRid,\n snapshot: useSnapshot\n }, client, objectType);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const r = await OntologiesV2.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), args.$select, false),\n nextPageToken: r.nextPageToken,\n totalCount: r.totalCount\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 */\nexport * as Actions from \"./public/Action.js\";\nexport * as ActionTypesFullMetadata from \"./public/ActionTypeFullMetadata.js\";\nexport * as ActionTypesV2 from \"./public/ActionTypeV2.js\";\nexport * as Attachments from \"./public/Attachment.js\";\nexport * as AttachmentPropertiesV2 from \"./public/AttachmentPropertyV2.js\";\nexport * as CipherTextProperties from \"./public/CipherTextProperty.js\";\nexport * as LinkedObjectsV2 from \"./public/LinkedObjectV2.js\";\nexport * as MediaReferenceProperties from \"./public/MediaReferenceProperty.js\";\nexport * as ObjectTypesV2 from \"./public/ObjectTypeV2.js\";\nexport * as OntologyInterfaces from \"./public/OntologyInterface.js\";\nexport * as OntologyObjectSets from \"./public/OntologyObjectSet.js\";\nexport * as OntologyObjectsV2 from \"./public/OntologyObjectV2.js\";\nexport * as OntologyTransactions from \"./public/OntologyTransaction.js\";\nexport * as OntologiesV2 from \"./public/OntologyV2.js\";\nexport * as OntologyValueTypes from \"./public/OntologyValueType.js\";\nexport * as Queries from \"./public/Query.js\";\nexport * as QueryTypes from \"./public/QueryType.js\";\nexport * as TimeSeriesPropertiesV2 from \"./public/TimeSeriesPropertyV2.js\";\nexport * as TimeSeriesValueBankProperties from \"./public/TimeSeriesValueBankProperty.js\";","/*\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 _apply = [1, \"/v2/ontologies/{0}/actions/{1}/apply\", 3];\n/**\n * Applies an action using the given parameters.\n *\n * Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible.\n * Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.\n *\n * Note that a 200 HTTP status code only indicates that the request was received and processed by the server.\n * See the validation result in the response body to determine if the action was applied successfully.\n *\n * Note that [parameter default values](https://www.palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by\n * this endpoint.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/apply\n */\nexport function apply($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _apply, ...args);\n}\nconst _applyAsync = [1, \"/v2/ontologies/{0}/actions/{1}/applyAsync\", 3];\n/**\n * Applies an action using the given parameters.\n *\n * Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible.\n * Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.\n *\n * Note that [parameter default values](https://www.palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by\n * this endpoint.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyAsync\n */\nexport function applyAsync($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyAsync, ...args);\n}\nconst _applyBatch = [1, \"/v2/ontologies/{0}/actions/{1}/applyBatch\", 3];\n/**\n * Applies multiple actions (of the same Action Type) using the given parameters.\n *\n * Changes to objects or links stored in Object Storage V1 are eventually consistent and may take some time to be visible.\n * Edits to objects or links in Object Storage V2 will be visible immediately after the action completes.\n *\n * Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not\n * call Functions may receive a higher limit.\n *\n * Note that [notifications](https://www.palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyBatch\n */\nexport function applyBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyBatch, ...args);\n}\nconst _applyWithOverrides = [1, \"/v2/ontologies/{0}/actions/{1}/applyWithOverrides\", 3];\n/**\n * Same as regular apply action operation, but allows specifying overrides for UniqueIdentifier and\n * CurrentTime generated action parameters.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyWithOverrides\n */\nexport function applyWithOverrides($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyWithOverrides, ...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 */\nexport { foundryPlatformFetch } from \"./foundryPlatformFetch.js\";","/*\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 */\nimport { symbolClientContext as oldSymbolClientContext } from \"@osdk/shared.client\";\nimport { symbolClientContext } from \"@osdk/shared.client2\";\nimport { PalantirApiError, UnknownError } from \"@osdk/shared.net.errors\";\nexport async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {\n const path = origPath.replace(/\\{([^}]+)\\}/g, () => encodeURIComponent(args.shift()));\n const body = flags & 1 ? args.shift() : undefined;\n const queryArgs = flags & 2 ? args.shift() : undefined;\n const headerArgs = flags & 4 ? args.shift() : undefined;\n const method = [\"GET\", \"POST\", \"PUT\", \"DELETE\", \"PATCH\"][httpMethodNum];\n return await apiFetch(client[symbolClientContext] ?? client[oldSymbolClientContext] ?? client, method, path, body, queryArgs, headerArgs, contentType, responseContentType);\n}\nasync function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {\n const url = parseUrl(clientCtx.baseUrl, endpointPath);\n for (const [key, value] of Object.entries(queryArguments || {})) {\n if (value == null) {\n continue;\n }\n if (Array.isArray(value)) {\n for (const item of value) {\n url.searchParams.append(key, item);\n }\n } else {\n url.searchParams.append(key, value);\n }\n }\n const headersInit = new Headers();\n headersInit.set(\"Content-Type\", requestMediaType ?? \"application/json\");\n headersInit.set(\"Accept\", responseMediaType ?? \"application/json\");\n Object.entries(headers || {}).forEach(([key, value]) => {\n if (key === \"Content-Type\" && typeof value === \"string\") {\n headersInit.set(\"Content-Type\", value);\n } else if (key === \"Accept\" && typeof value === \"string\") {\n headersInit.set(\"Accept\", value);\n } else if (value != null) {\n headersInit.append(key, value.toString());\n }\n });\n const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);\n // Because this uses the client's fetch, there is a 99.99% chance that it is already going\n // to handle the error case and throw a PalantirApiError since its wrapped in a\n // createFetchOrThrow.\n const response = await clientCtx.fetch(url.toString(), {\n body,\n method: method,\n headers: headersInit\n });\n // However, if we ended up using a \"regular\" fetch, the\n // error status codes are not thrown by fetch automatically,\n // we have to look at the ok property and behave accordingly\n if (!response.ok) {\n try {\n const convertedError = await response.json();\n return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, convertedError.errorDescription, response.status, convertedError.errorInstanceId, convertedError.parameters);\n } catch (e) {\n if (e instanceof Error) {\n return new UnknownError(e.message, \"UNKNOWN\");\n }\n return new UnknownError(\"Unable to parse error response\", \"UNKNOWN\");\n }\n }\n // Do not return anything if its a 204. Do not parse either!\n if (response.status === 204) {\n return;\n }\n if (responseMediaType == null || responseMediaType === \"application/json\") {\n return await response.json();\n }\n return response;\n}\nexport function parseUrl(baseUrl, endpointPath) {\n baseUrl += baseUrl.endsWith(\"/\") ? \"\" : \"/\";\n return new URL(`api${endpointPath}`, baseUrl);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const symbolClientContext = Symbol(\"ClientContext\");","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const symbolClientContext = \"__osdkClientContext\";","/*\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}/actionTypesFullMetadata\", 2];\n/**\n * Lists the action types (with full metadata) 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 * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypesFullMetadata\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/actionTypes/{1}/fullMetadata\", 2];\n/**\n * Gets the full metadata associated with an action type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/{actionType}/fullMetadata\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...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 _list = [0, \"/v2/ontologies/{0}/actionTypes\", 2];\n/**\n * Lists the action 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 * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/actionTypes/{1}\", 2];\n/**\n * Gets a specific action type with the given API name.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/{actionType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRid = [0, \"/v2/ontologies/{0}/actionTypes/byRid/{1}\", 2];\n/**\n * Gets a specific action type with the given RID.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid}\n */\nexport function getByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRid, ...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 _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 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 _getAttachment = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}\", 2];\n/**\n * Get the metadata of attachments parented to the given object.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}\n */\nexport function getAttachment($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getAttachment, ...args);\n}\nconst _getAttachmentByRid = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/{4}\", 2];\n/**\n * Get the metadata of a particular attachment in an attachment list.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}\n */\nexport function getAttachmentByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getAttachmentByRid, ...args);\n}\nconst _readAttachment = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/content\", 2,, \"*/*\"];\n/**\n * Get the content of an attachment.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content\n */\nexport function readAttachment($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _readAttachment, ...args);\n}\nconst _readAttachmentByRid = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/attachments/{3}/{4}/content\", 2,, \"*/*\"];\n/**\n * Get the content of an attachment by its RID.\n *\n * The RID must exist in the attachment array of the property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content\n */\nexport function readAttachmentByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _readAttachmentByRid, ...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 _decrypt = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/ciphertexts/{3}/decrypt\"];\n/**\n * Decrypt the value of a ciphertext property.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/ciphertexts/{property}/decrypt\n */\nexport function decrypt($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _decrypt, ...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 _listLinkedObjects = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/links/{3}\", 2];\n/**\n * Lists the linked objects for a specific object and the given 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 * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}\n */\nexport function listLinkedObjects($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listLinkedObjects, ...args);\n}\nconst _getLinkedObject = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/links/{3}/{4}\", 2];\n/**\n * Get a specific linked object that originates from another object.\n *\n * If there is no link between the two objects, `LinkedObjectNotFound` is thrown.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}\n */\nexport function getLinkedObject($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLinkedObject, ...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 _getMediaContent = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/content\", 2,, \"*/*\"];\n/**\n * Gets the content of a media item referenced by this property.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content\n */\nexport function getMediaContent($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaContent, ...args);\n}\nconst _getMediaMetadata = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/metadata\", 2];\n/**\n * Gets metadata about the media item referenced by this property.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata\n */\nexport function getMediaMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaMetadata, ...args);\n}\nconst _upload = [1, \"/v2/ontologies/{0}/objectTypes/{1}/media/{2}/upload\", 3, \"*/*\"];\n/**\n * Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown.\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 * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...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 _list = [0, \"/v2/ontologies/{0}/objectTypes\", 2];\n/**\n * Lists the object types for the given Ontology.\n *\n * Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are\n * more results available, at least one result will be present in the\n * response.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objectTypes/{1}\", 2];\n/**\n * Gets a specific object type with the given API name.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getFullMetadata = [0, \"/v2/ontologies/{0}/objectTypes/{1}/fullMetadata\", 2];\n/**\n * Gets the full metadata for a specific object type with the given API name.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata\n */\nexport function getFullMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFullMetadata, ...args);\n}\nconst _listOutgoingLinkTypes = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes\", 2];\n/**\n * List the outgoing links for an object type.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes\n */\nexport function listOutgoingLinkTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listOutgoingLinkTypes, ...args);\n}\nconst _getOutgoingLinkType = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes/{2}\", 2];\n/**\n * Get an outgoing link for an object type.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}\n */\nexport function getOutgoingLinkType($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getOutgoingLinkType, ...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 _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 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}/objects/{1}\", 2];\n/**\n * Lists the objects for the given Ontology and object 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 * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objects/{1}/{2}\", 2];\n/**\n * Gets a specific object with the given primary key.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _count = [1, \"/v2/ontologies/{0}/objects/{1}/count\", 2];\n/**\n * Returns a count of the objects of the given object type.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/count\n */\nexport function count($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _count, ...args);\n}\nconst _search = [1, \"/v2/ontologies/{0}/objects/{1}/search\", 3];\n/**\n * Search for objects in the specified ontology and object type. The request body is used\n * to filter objects based on the specified query. The supported queries are:\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 * | 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 term 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 * | startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | 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 * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/search\n */\nexport function search($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _search, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/objects/{1}/aggregate\", 3];\n/**\n * Perform functions on object fields in the specified ontology and object type.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...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 _postEdits = [1, \"/v2/ontologies/{0}/transactions/{1}/edits\", 3];\n/**\n * Applies a set of edits to a transaction in order.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/transactions/{transactionId}/edits\n */\nexport function postEdits($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _postEdits, ...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 _list = [0, \"/v2/ontologies\"];\n/**\n * Lists the Ontologies visible to the current user.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}\"];\n/**\n * Gets a specific ontology for a given Ontology API name or RID.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getFullMetadata = [0, \"/v2/ontologies/{0}/fullMetadata\", 2];\n/**\n * Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces.\n * This endpoint is designed to return as much metadata as possible in a single request to support OSDK workflows.\n * It may omit certain entities rather than fail the request.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/fullMetadata\n */\nexport function getFullMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFullMetadata, ...args);\n}\nconst _loadMetadata = [1, \"/v2/ontologies/{0}/metadata\", 3];\n/**\n * Load Ontology metadata for the requested object, link, action, query, and interface types.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/metadata\n */\nexport function loadMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadMetadata, ...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 _get = [0, \"/v2/ontologies/{0}/valueTypes/{1}\", 2];\n/**\n * Gets a specific value type with the given API name.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/valueTypes/{valueType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _list = [0, \"/v2/ontologies/{0}/valueTypes\", 2];\n/**\n * Lists the latest versions of the value types for the given Ontology.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/valueTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...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 _execute = [1, \"/v2/ontologies/{0}/queries/{1}/execute\", 7];\n/**\n * Executes a Query using the given parameters. By default, the latest version of the Query is executed.\n *\n * Optional parameters do not need to be supplied.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...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 _list = [0, \"/v2/ontologies/{0}/queryTypes\", 2];\n/**\n * Lists the query 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 * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queryTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/queryTypes/{1}\", 2];\n/**\n * Gets a specific query type with the given API name.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queryTypes/{queryApiName}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...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 _getFirstPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/firstPoint\", 2];\n/**\n * Get the first point of a time series property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint\n */\nexport function getFirstPoint($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFirstPoint, ...args);\n}\nconst _getLastPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/lastPoint\", 2];\n/**\n * Get the last point of a time series property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint\n */\nexport function getLastPoint($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLastPoint, ...args);\n}\nconst _streamPoints = [1, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamPoints\", 3,, \"*/*\"];\n/**\n * Stream all of the points of a time series property.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints\n */\nexport function streamPoints($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamPoints, ...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 _getLatestValue = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/latestValue\", 2];\n/**\n * Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue\n */\nexport function getLatestValue($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLatestValue, ...args);\n}\nconst _streamValues = [1, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamValues\", 3,, \"*/*\"];\n/**\n * Stream all of the points of a time series property (this includes geotime series references).\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues\n */\nexport function streamValues($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamValues, ...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 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 OntologiesV2 from \"@osdk/foundry.ontologies\";\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 OntologiesV2.Attachments.read(client, rid);\n },\n async fetchMetadata() {\n const r = await OntologiesV2.Attachments.get(client, rid);\n return {\n ...r,\n sizeBytes: Number(r.sizeBytes)\n };\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\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.7.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nconst ErrorMessage = Symbol(\"ErrorMessage\");","/*\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}","/*\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 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 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\";\nimport { ObjectSetListenerWebsocket } from \"./ObjectSetListenerWebsocket.js\";\nfunction isObjectTypeDefinition(def) {\n return def.type === \"object\";\n}\n\n/* @internal */\nexport function isObjectSet(o) {\n return o != null && typeof o === \"object\" && isWireObjectSet(objectSetDefinitions.get(o));\n}\n\n/** @internal */\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 = ObjectSetListenerWebsocket.getInstance(clientCtx).subscribe(objectType, objectSet, listener, opts?.properties);\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 */\n\nimport invariant from \"tiny-invariant\";\nimport { modernToLegacyWhereClause } from \"../internal/conversions/modernToLegacyWhereClause.js\";\nimport { derivedPropertyDefinitionFactory } from \"./derivedPropertyDefinitionFactory.js\";\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 constant: {\n double: value => {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Not supported\") : invariant(false) : void 0;\n },\n integer: value => {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Not supported\") : invariant(false) : void 0;\n },\n long: value => {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Not supported\") : invariant(false) : void 0;\n },\n datetime: value => {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Not supported\") : invariant(false) : void 0;\n },\n timestamp: value => {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Not supported\") : invariant(false) : void 0;\n }\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 invariant from \"tiny-invariant\";\nimport { fullyQualifyPropName } from \"./fullyQualifyPropName.js\";\nimport { makeGeoFilterIntersects } from \"./makeGeoFilterIntersects.js\";\nimport { makeGeoFilterWithin } from \"./makeGeoFilterWithin.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, \"Defined key values are only allowed when they are not undefined.\") : 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\n // Struct array\n if (firstKey === \"$contains\" && filter[firstKey] instanceof Object) {\n const structFilter = Object.entries(filter[firstKey]);\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 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 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 { 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\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\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 { 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 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\": \"subtract\",\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 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 OntologiesV2 from \"@osdk/foundry.ontologies\";\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 OntologiesV2.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 (!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])\n };\n }\n const ret = result.data.map(entry => {\n return {\n $group: entry.group,\n ...aggregationToCountResult(entry),\n ...legacyToModernSingleAggregationResult(entry)\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 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\";\n/** @internal */\nexport function legacyToModernSingleAggregationResult(entry) {\n return entry.metrics.reduce((accumulator, curValue) => {\n const parts = curValue.name.split(\".\");\n if (parts[0] === \"count\") {\n return accumulator;\n }\n !(parts.length === 2) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"assumed we were getting a `${key}.${type}`\") : invariant(false) : void 0;\n const property = parts[0];\n const metricType = parts[1];\n if (!(property in accumulator)) {\n accumulator[property] = {}; // fixme?\n }\n accumulator[property][metricType] = curValue.value; // fixme?\n\n return accumulator;\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 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 colonPos = propAndMetric.lastIndexOf(\":\");\n const property = propAndMetric.slice(0, colonPos);\n const metric = propAndMetric.slice(colonPos + 1);\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 { 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 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 OntologiesV2 from \"@osdk/foundry.ontologies\";\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 OntologiesV2.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 WebSocket from \"isomorphic-ws\";\nimport invariant from \"tiny-invariant\";\nimport { ExponentialBackoff } from \"../util/exponentialBackoff.js\";\nconst MINIMUM_RECONNECT_DELAY_MS = 5 * 1000;\nconst EXPONENTIAL_BACKOFF_INITIAL_DELAY_MS = 1000;\nconst EXPONENTIAL_BACKOFF_MAX_DELAY_MS = 60000;\nconst EXPONENTIAL_BACKOFF_MULTIPLIER = 2;\nconst EXPONENTIAL_BACKOFF_JITTER_FACTOR = 0.3;\nconst WEBSOCKET_IDLE_DISCONNECT_DELAY_MS = 15000;\nconst WEBSOCKET_HEARTBEAT_INTERVAL_MS = 45 * 1000;\n\n/** Noop function to reduce conditional checks */\nfunction doNothing() {}\n\n/**\n * Converts an ObjectSetListener to one where all the functions are defined.\n */\nfunction fillOutListener({\n onChange = doNothing,\n onError = doNothing,\n onOutOfDate = doNothing,\n onSuccessfulSubscription = doNothing\n}) {\n return {\n onChange,\n onError,\n onOutOfDate,\n onSuccessfulSubscription\n };\n}\nfunction isReady(sub) {\n return sub.isReady != null;\n}\nfunction subscriptionIsDone(sub) {\n return sub.status === \"done\" || sub.status === \"error\";\n}\n\n/** @internal */\nexport class ObjectSetListenerWebsocket {\n static #instances = new WeakMap();\n // FIXME\n static getInstance(client) {\n let instance = ObjectSetListenerWebsocket.#instances.get(client.clientCacheKey);\n if (instance == null) {\n instance = new ObjectSetListenerWebsocket(client);\n ObjectSetListenerWebsocket.#instances.set(client.clientCacheKey, instance);\n }\n return instance;\n }\n #ws;\n #lastWsConnect = 0;\n #client;\n #backoff;\n #isFirstConnection = true;\n #logger;\n\n /**\n * map of requestId to all active subscriptions at the time of the request\n */\n #pendingSubscriptions = new Map();\n\n /**\n * Map of subscriptionId to Subscription. Note: the subscriptionId may be\n * temporary and not the actual subscriptionId from the server.\n */\n #subscriptions = new Map();\n #endedSubscriptions = new Set();\n #maybeDisconnectTimeout;\n #heartbeatInterval;\n\n // DO NOT CONSTRUCT DIRECTLY. ONLY EXPOSED AS A TESTING SEAM\n constructor(client, {\n minimumReconnectDelayMs = MINIMUM_RECONNECT_DELAY_MS\n } = {}) {\n this.MINIMUM_RECONNECT_DELAY_MS = minimumReconnectDelayMs;\n this.#client = client;\n this.#backoff = new ExponentialBackoff({\n initialDelayMs: EXPONENTIAL_BACKOFF_INITIAL_DELAY_MS,\n maxDelayMs: EXPONENTIAL_BACKOFF_MAX_DELAY_MS,\n multiplier: EXPONENTIAL_BACKOFF_MULTIPLIER,\n jitterFactor: EXPONENTIAL_BACKOFF_JITTER_FACTOR\n });\n this.#logger = client.logger?.child({}, {\n msgPrefix: \"<OSW> \"\n });\n !(client.baseUrl.startsWith(\"https://\") || client.baseUrl.startsWith(\"http://\")) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Stack must be a URL\") : invariant(false) : void 0;\n }\n async subscribe(objectType, objectSet, listener, properties = []) {\n const objOrInterfaceDef = objectType.type === \"object\" ? await this.#client.ontologyProvider.getObjectDefinition(objectType.apiName) : await this.#client.ontologyProvider.getInterfaceDefinition(objectType.apiName);\n let objectProperties = [];\n let referenceProperties = [];\n if (properties.length === 0) {\n properties = Object.keys(objOrInterfaceDef.properties);\n }\n objectProperties = properties.filter(p => objOrInterfaceDef.properties[p].type !== \"geotimeSeriesReference\");\n referenceProperties = properties.filter(p => objOrInterfaceDef.properties[p].type === \"geotimeSeriesReference\");\n const sub = {\n listener: fillOutListener(listener),\n objectSet,\n primaryKeyPropertyName: objOrInterfaceDef.type === \"interface\" ? undefined : objOrInterfaceDef.primaryKeyApiName,\n requestedProperties: objectProperties,\n requestedReferenceProperties: referenceProperties,\n status: \"preparing\",\n // Since we don't have a real subscription id yet but we need to keep\n // track of this reference, we can just use a random uuid.\n subscriptionId: `TMP-${nextUuid()}}`,\n interfaceApiName: objOrInterfaceDef.type === \"object\" ? undefined : objOrInterfaceDef.apiName\n };\n this.#subscriptions.set(sub.subscriptionId, sub);\n\n // actually prepares the subscription, ensures the ws is ready, and sends\n // a subscribe message. We don't want to block on this.\n void this.#initiateSubscribe(sub);\n return () => {\n this.#unsubscribe(sub);\n };\n }\n\n /**\n * Called at least once for every subscription.\n *\n * - Resets pending expiry\n * - Recreates temporary object set\n * - Triggers a full subscribe message\n *\n * @returns\n */\n async #initiateSubscribe(sub) {\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug(\"#initiateSubscribe()\");\n }\n try {\n await this.#ensureWebsocket();\n\n // the consumer may have already unsubscribed before we are ready to request a subscription\n // so we have to acquire the pendingSubscription after the await.\n if (subscriptionIsDone(sub)) {\n return;\n }\n sub.isReady = true;\n // if we aren't open, then this happens after we #onConnect\n if (this.#ws?.readyState === WebSocket.OPEN) {\n this.#sendSubscribeMessage();\n }\n } catch (error) {\n this.#logger?.error(error, \"Error in #initiateSubscribe\");\n this.#tryCatchOnError(sub, true, error);\n }\n }\n #sendSubscribeMessage() {\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug(\"#sendSubscribeMessage()\");\n }\n // If two calls to `.subscribe()` happen at once (or if the connection is reset),\n // we may have multiple subscriptions that don't have a subscriptionId yet,\n // so we filter those out.\n const readySubs = [...this.#subscriptions.values()].filter(isReady);\n const id = nextUuid();\n // responses come back as an array of subIds, so we need to know the sources\n this.#pendingSubscriptions.set(id, readySubs);\n\n // every subscribe message \"overwrites\" the previous ones that are not\n // re-included, so we have to reconstitute the entire list of subscriptions\n const subscribe = {\n id,\n requests: readySubs.map(({\n objectSet,\n requestedProperties,\n requestedReferenceProperties,\n interfaceApiName\n }) => {\n return {\n objectSet: objectSet,\n propertySet: requestedProperties,\n referenceSet: requestedReferenceProperties\n };\n })\n };\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug({\n payload: subscribe\n }, \"sending subscribe message\");\n }\n this.#ws?.send(JSON.stringify(subscribe));\n }\n #unsubscribe(sub, newStatus = \"done\") {\n if (subscriptionIsDone(sub)) {\n // if we are already done, we don't need to do anything\n return;\n }\n sub.status = newStatus;\n\n // make sure listeners do nothing now\n sub.listener = fillOutListener({});\n this.#subscriptions.delete(sub.subscriptionId);\n this.#endedSubscriptions.add(sub.subscriptionId);\n this.#sendSubscribeMessage();\n\n // If we have no more subscriptions, we can disconnect the websocket\n // however we should wait a bit to see if we get any more subscriptions.\n // For example, when switching between react views, you may unsubscribe\n // in the old view and subscribe in the new view. We don't need to re-establish\n // the websocket connection in that case.\n if (this.#maybeDisconnectTimeout) {\n // We reset the timeout on every unsubscribe so its always at least 15s from\n // the last time we are empty. E.g.:\n // - 0s: Subscribe(A)\n // - 10s: Unsubscribe(A)\n // - 11s: Subscribe(B)\n // - 20s: Unsubscribe(B)\n // If we do not clear out the timeout we would disconnect at 25s but that would only be\n // 5s after the last subscription was removed instead of at 35s for the desired 15s.\n clearTimeout(this.#maybeDisconnectTimeout);\n }\n this.#maybeDisconnectTimeout = setTimeout(() => {\n this.#maybeDisconnectTimeout = undefined;\n if (this.#subscriptions.size === 0) {\n this.#cycleWebsocket();\n }\n }, WEBSOCKET_IDLE_DISCONNECT_DELAY_MS);\n }\n async #ensureWebsocket() {\n if (this.#ws == null) {\n const {\n baseUrl,\n tokenProvider\n } = this.#client;\n const url = constructWebsocketUrl(baseUrl, await this.#client.ontologyRid);\n const token = await tokenProvider();\n\n // tokenProvider is async, there could potentially be a race to create the websocket.\n // Only the first call to reach here will find a null this.#ws, the rest will bail out\n if (this.#ws == null) {\n // Only apply exponential backoff delay on reconnection attempts, not the first connection\n if (!this.#isFirstConnection) {\n const delay = this.#backoff.calculateDelay();\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug({\n delay,\n attempt: this.#backoff.getAttempt()\n }, \"Waiting before reconnect\");\n }\n await new Promise(resolve => {\n setTimeout(resolve, delay);\n });\n }\n this.#lastWsConnect = Date.now();\n\n // we again may have lost the race after our minimum backoff time\n if (this.#ws == null) {\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug(\"Creating websocket\");\n }\n this.#ws = new WebSocket(url, [`Bearer-${token}`]);\n this.#ws.addEventListener(\"close\", this.#onClose);\n this.#ws.addEventListener(\"message\", this.#onMessage);\n this.#ws.addEventListener(\"open\", this.#onOpen);\n }\n }\n // Allow await-ing the websocket open event if it isn't open already.\n // This needs to happen even for callers that didn't just create this.#ws\n if (this.#ws.readyState === WebSocket.CONNECTING) {\n const ws = this.#ws;\n return new Promise((resolve, reject) => {\n function cleanup() {\n ws.removeEventListener(\"open\", open);\n ws.removeEventListener(\"error\", error);\n ws.removeEventListener(\"close\", cleanup);\n }\n function open() {\n cleanup();\n resolve();\n }\n function error(evt) {\n cleanup();\n reject(new Error(String(evt)));\n }\n ws.addEventListener(\"open\", open);\n ws.addEventListener(\"error\", error);\n ws.addEventListener(\"close\", cleanup);\n });\n }\n }\n }\n #onOpen = () => {\n // Mark that we've successfully connected at least once\n this.#isFirstConnection = false;\n // Reset backoff on successful connection\n this.#backoff.reset();\n // resubscribe all of the listeners\n this.#sendSubscribeMessage();\n\n // Start heartbeat to keep connection alive\n if (this.#heartbeatInterval) {\n clearInterval(this.#heartbeatInterval);\n }\n this.#heartbeatInterval = setInterval(() => {\n if (this.#ws?.readyState === WebSocket.OPEN) {\n this.#sendSubscribeMessage();\n }\n }, WEBSOCKET_HEARTBEAT_INTERVAL_MS);\n };\n #onMessage = async message => {\n const data = JSON.parse(String(message.data));\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug({\n payload: data\n }, \"received message from ws\");\n }\n switch (data.type) {\n case \"objectSetChanged\":\n await this.#handleMessage_objectSetChanged(data);\n return;\n case \"refreshObjectSet\":\n this.#handleMessage_refreshObjectSet(data);\n return;\n case \"subscribeResponses\":\n this.#handleMessage_subscribeResponses(data);\n return;\n case \"subscriptionClosed\":\n {\n this.#handleMessage_subscriptionClosed(data);\n return;\n }\n default:\n const _ = data;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Unexpected message type\") : invariant(false) : void 0;\n }\n };\n #handleMessage_objectSetChanged = async payload => {\n const sub = this.#subscriptions.get(payload.id);\n if (sub == null) return;\n const objectUpdates = payload.updates.filter(update => update.type === \"object\");\n const referenceUpdates = payload.updates.filter(update => update.type === \"reference\");\n const osdkObjectsWithReferenceUpdates = await Promise.all(referenceUpdates.map(async o => {\n const osdkObjectArray = await this.#client.objectFactory2(this.#client, [{\n __apiName: o.objectType,\n __primaryKey: sub.primaryKeyPropertyName != null ? o.primaryKey[sub.primaryKeyPropertyName] : undefined,\n ...o.primaryKey,\n [o.property]: o.value\n }], sub.interfaceApiName, {}, false, undefined, false, await this.#fetchInterfaceMapping(o.objectType, sub.interfaceApiName));\n const singleOsdkObject = osdkObjectArray[0] ?? undefined;\n return singleOsdkObject != null ? {\n object: singleOsdkObject,\n state: \"ADDED_OR_UPDATED\"\n } : undefined;\n }));\n for (const update of osdkObjectsWithReferenceUpdates) {\n if (update != null) {\n try {\n sub.listener.onChange?.(update);\n } catch (error) {\n this.#logger?.error(error, \"Error in onChange callback\");\n this.#tryCatchOnError(sub, false, error);\n }\n }\n }\n const osdkObjects = await Promise.all(objectUpdates.map(async o => {\n const keysToDelete = Object.keys(o.object).filter(key => sub.requestedReferenceProperties.includes(key));\n for (const key of keysToDelete) {\n delete o.object[key];\n }\n const osdkObjectArray = await this.#client.objectFactory2(this.#client, [o.object], sub.interfaceApiName, {}, false, undefined, false, await this.#fetchInterfaceMapping(o.object.__apiName, sub.interfaceApiName));\n const singleOsdkObject = osdkObjectArray[0] ?? undefined;\n return singleOsdkObject != null ? {\n object: singleOsdkObject,\n state: o.state\n } : undefined;\n }));\n for (const osdkObject of osdkObjects) {\n if (osdkObject != null) {\n try {\n sub.listener.onChange?.(osdkObject);\n } catch (error) {\n this.#logger?.error(error, \"Error in onChange callback\");\n this.#tryCatchOnError(sub, false, error);\n }\n }\n }\n };\n async #fetchInterfaceMapping(objectTypeApiName, interfaceApiName) {\n if (interfaceApiName == null) return {};\n const interfaceMap = (await this.#client.ontologyProvider.getObjectDefinition(objectTypeApiName)).interfaceMap;\n return {\n [interfaceApiName]: {\n [objectTypeApiName]: interfaceMap[interfaceApiName]\n }\n };\n }\n #handleMessage_refreshObjectSet = payload => {\n const sub = this.#subscriptions.get(payload.id);\n !sub ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected subscription id ${payload.id}`) : invariant(false) : void 0;\n try {\n sub.listener.onOutOfDate();\n } catch (error) {\n this.#logger?.error(error, \"Error in onOutOfDate callback\");\n this.#tryCatchOnError(sub, false, error);\n }\n };\n #handleMessage_subscribeResponses = payload => {\n const {\n id,\n responses\n } = payload;\n const subs = this.#pendingSubscriptions.get(id);\n !subs ? process.env.NODE_ENV !== \"production\" ? invariant(false, `should have a pending subscription for ${id}`) : invariant(false) : void 0;\n this.#pendingSubscriptions.delete(id);\n for (let i = 0; i < responses.length; i++) {\n const sub = subs[i];\n const response = responses[i];\n switch (response.type) {\n case \"error\":\n this.#tryCatchOnError(sub, true, response.errors);\n this.#unsubscribe(sub, \"error\");\n break;\n case \"qos\":\n // the server has requested that we tear down our websocket and reconnect to help load balance\n this.#cycleWebsocket();\n break;\n case \"success\":\n // `\"preparing\"` should only be the status on an initial subscribe.\n const shouldFireOutOfDate = sub.status === \"expired\" || sub.status === \"reconnecting\";\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug({\n shouldFireOutOfDate\n }, \"success\");\n }\n sub.status = \"subscribed\";\n if (sub.subscriptionId !== response.id) {\n // might be the temporary one\n this.#subscriptions.delete(sub.subscriptionId);\n sub.subscriptionId = response.id;\n this.#subscriptions.set(sub.subscriptionId, sub); // future messages come by this subId\n }\n try {\n if (shouldFireOutOfDate) sub.listener.onOutOfDate();else sub.listener.onSuccessfulSubscription();\n } catch (error) {\n this.#logger?.error(error, \"Error in onOutOfDate or onSuccessfulSubscription callback\");\n this.#tryCatchOnError(sub, false, error);\n }\n break;\n default:\n this.#tryCatchOnError(sub, true, response);\n }\n }\n };\n #handleMessage_subscriptionClosed(payload) {\n const sub = this.#subscriptions.get(payload.id);\n if (sub == null && this.#endedSubscriptions.has(payload.id)) return;\n !sub ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected subscription id ${payload.id}`) : invariant(false) : void 0;\n this.#tryCatchOnError(sub, true, payload.cause);\n this.#unsubscribe(sub, \"error\");\n }\n #onClose = event => {\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug({\n event\n }, \"Received close event from ws\", event);\n }\n this.#cycleWebsocket();\n };\n #cycleWebsocket = () => {\n // Clear heartbeat interval\n if (this.#heartbeatInterval) {\n clearInterval(this.#heartbeatInterval);\n this.#heartbeatInterval = undefined;\n }\n if (this.#ws) {\n this.#ws.removeEventListener(\"open\", this.#onOpen);\n this.#ws.removeEventListener(\"message\", this.#onMessage);\n this.#ws.removeEventListener(\"close\", this.#onClose);\n if (this.#ws.readyState !== WebSocket.CLOSING && this.#ws.readyState !== WebSocket.CLOSED) {\n this.#ws.close();\n }\n this.#ws = undefined;\n }\n\n // if we have any listeners that are still depending on us, go ahead and reopen the websocket\n if (this.#subscriptions.size > 0) {\n if (process.env.NODE_ENV !== \"production\") {\n for (const s of this.#subscriptions.values()) {\n !(s.status !== \"done\" && s.status !== \"error\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"should not have done/error subscriptions still\") : invariant(false) : void 0;\n }\n }\n for (const s of this.#subscriptions.values()) {\n if (s.status === \"subscribed\") s.status = \"reconnecting\";\n }\n\n // we don't care about the result of this (we want cycleWebsocket to be fire and forget)\n // just that it happens\n void this.#ensureWebsocket();\n }\n };\n #tryCatchOnError = (sub, subscriptionClosed, error) => {\n try {\n sub.listener.onError({\n subscriptionClosed: subscriptionClosed,\n error\n });\n } catch (onErrorError) {\n // eslint-disable-next-line no-console\n console.error(`Error encountered in an onError callback for an OSDK subscription`, onErrorError);\n // eslint-disable-next-line no-console\n console.error(`This onError call was triggered by an error in another callback`, error);\n // eslint-disable-next-line no-console\n console.error(`The subscription has been closed.`, error);\n if (!subscriptionClosed) {\n this.#logger?.error(error, \"Error in onError callback\");\n this.#unsubscribe(sub, \"error\");\n this.#tryCatchOnError(sub, true, onErrorError);\n }\n }\n };\n}\n\n/** @internal */\nexport function constructWebsocketUrl(baseUrl, ontologyRid) {\n const base = new URL(baseUrl);\n const url = new URL(`api/v2/ontologySubscriptions/ontologies/${ontologyRid}/streamSubscriptions`, base);\n url.protocol = url.protocol.replace(\"https\", \"wss\");\n return url;\n}\nlet uuidCounter = 0;\nfunction nextUuid() {\n return `00000000-0000-0000-0000-${(uuidCounter++).toString().padStart(12, \"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\nconst DEFAULT_OPTIONS = {\n initialDelayMs: 1000,\n maxDelayMs: 60000,\n multiplier: 2,\n jitterFactor: 0.3\n};\nexport class ExponentialBackoff {\n attempt = 0;\n constructor(options = {}) {\n this.options = {\n ...DEFAULT_OPTIONS,\n ...options\n };\n }\n calculateDelay() {\n const {\n initialDelayMs,\n maxDelayMs,\n multiplier,\n jitterFactor\n } = this.options;\n const baseDelay = Math.min(initialDelayMs * Math.pow(multiplier, this.attempt), maxDelayMs);\n const jitter = baseDelay * jitterFactor * (Math.random() * 2 - 1);\n const delayWithJitter = Math.max(0, baseDelay + jitter);\n this.attempt++;\n return Math.round(delayWithJitter);\n }\n reset() {\n this.attempt = 0;\n }\n getAttempt() {\n return this.attempt;\n }\n}"]}
|