@osdk/client 2.6.0-beta.1 → 2.6.0-beta.11
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 +134 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/MinimalClientContext.js.map +1 -1
- package/build/browser/createClient.js +1 -1
- package/build/browser/createClient.js.map +1 -1
- package/build/browser/createClient.test.js +19 -1
- package/build/browser/createClient.test.js.map +1 -1
- package/build/browser/createMinimalClient.js +1 -1
- package/build/browser/createMinimalClient.js.map +1 -1
- package/build/browser/derivedProperties/createWithPropertiesObjectSet.js +2 -1
- package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
- package/build/browser/fetchMetadata.test.js +11 -0
- package/build/browser/fetchMetadata.test.js.map +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/internal/conversions/extractNamespace.js +22 -0
- package/build/browser/internal/conversions/extractNamespace.js.map +1 -0
- package/build/browser/internal/conversions/fullyQualifyPropName.js +26 -0
- package/build/browser/internal/conversions/fullyQualifyPropName.js.map +1 -0
- package/build/browser/internal/conversions/makeGeoFilterBbox.js +41 -0
- package/build/browser/internal/conversions/makeGeoFilterBbox.js.map +1 -0
- package/build/browser/internal/conversions/makeGeoFilterIntersects.js +29 -0
- package/build/browser/internal/conversions/makeGeoFilterIntersects.js.map +1 -0
- package/build/browser/internal/conversions/makeGeoFilterPolygon.js +30 -0
- package/build/browser/internal/conversions/makeGeoFilterPolygon.js.map +1 -0
- package/build/browser/internal/conversions/makeGeoFilterWithin.js +48 -0
- package/build/browser/internal/conversions/makeGeoFilterWithin.js.map +1 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js +59 -105
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +309 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
- package/build/browser/object/aggregate.js +2 -1
- package/build/browser/object/aggregate.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +5 -1
- package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +10 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects.test.js +12 -0
- package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/browser/object/fetchPage.js +7 -4
- package/build/browser/object/fetchPage.js.map +1 -1
- package/build/browser/object/formatting/applyPropertyFormatter.js +58 -0
- package/build/browser/object/formatting/applyPropertyFormatter.js.map +1 -0
- package/build/browser/object/formatting/applyPropertyFormatter.test.js +726 -0
- package/build/browser/object/formatting/applyPropertyFormatter.test.js.map +1 -0
- package/build/browser/object/formatting/formatBoolean.js +23 -0
- package/build/browser/object/formatting/formatBoolean.js.map +1 -0
- package/build/browser/object/formatting/formatDateTime.js +158 -0
- package/build/browser/object/formatting/formatDateTime.js.map +1 -0
- package/build/browser/object/formatting/formatNumber.js +242 -0
- package/build/browser/object/formatting/formatNumber.js.map +1 -0
- package/build/browser/object/formatting/propertyFormattingUtils.js +39 -0
- package/build/browser/object/formatting/propertyFormattingUtils.js.map +1 -0
- package/build/browser/object/mediaUpload.js +1 -1
- package/build/browser/object/mediaUpload.js.map +1 -1
- package/build/browser/objectSet/ObjectSetListenerWebsocket.js +17 -0
- package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
- package/build/browser/observable/ObservableClient.js.map +1 -1
- package/build/browser/observable/internal/BulkObjectLoader.js +12 -4
- package/build/browser/observable/internal/BulkObjectLoader.js.map +1 -1
- package/build/browser/observable/internal/BulkObjectLoader.test.js +48 -0
- package/build/browser/observable/internal/BulkObjectLoader.test.js.map +1 -1
- package/build/browser/observable/internal/CacheKeys.js +9 -3
- package/build/browser/observable/internal/CacheKeys.js.map +1 -1
- package/build/browser/observable/internal/Canonicalizer.js +51 -0
- package/build/browser/observable/internal/Canonicalizer.js.map +1 -0
- package/build/browser/observable/internal/Changes.js.map +1 -1
- package/build/browser/observable/internal/IntersectCanonicalizer.js +35 -0
- package/build/browser/observable/internal/IntersectCanonicalizer.js.map +1 -0
- package/build/browser/observable/internal/KnownCacheKey.js.map +1 -1
- package/build/browser/observable/internal/ObservableClientImpl.js +3 -0
- package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/browser/observable/internal/OrderByCanonicalizer.js +1 -4
- package/build/browser/observable/internal/OrderByCanonicalizer.js.map +1 -1
- package/build/browser/observable/internal/PivotCanonicalizer.js +33 -0
- package/build/browser/observable/internal/PivotCanonicalizer.js.map +1 -0
- package/build/browser/observable/internal/RdpCanonicalizer.js +66 -0
- package/build/browser/observable/internal/RdpCanonicalizer.js.map +1 -0
- package/build/browser/observable/internal/RdpCanonicalizer.test.js +68 -0
- package/build/browser/observable/internal/RdpCanonicalizer.test.js.map +1 -0
- package/build/browser/observable/internal/SimpleWhereClause.js.map +1 -1
- package/build/browser/observable/internal/Store.js +172 -6
- package/build/browser/observable/internal/Store.js.map +1 -1
- package/build/browser/observable/internal/WhereClauseCanonicalizer.js +1 -1
- package/build/browser/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
- package/build/browser/observable/internal/actions/ActionApplication.js +1 -1
- package/build/browser/observable/internal/actions/ActionApplication.js.map +1 -1
- package/build/browser/observable/internal/actions/OptimisticJob.js +3 -3
- package/build/browser/observable/internal/actions/OptimisticJob.js.map +1 -1
- package/build/browser/observable/internal/aggregation/AggregationCacheKey.js +22 -0
- package/build/browser/observable/internal/aggregation/AggregationCacheKey.js.map +1 -0
- package/build/browser/observable/internal/aggregation/AggregationQuery.js +77 -0
- package/build/browser/observable/internal/aggregation/AggregationQuery.js.map +1 -0
- package/build/browser/observable/internal/aggregation/AggregationsHelper.js +54 -0
- package/build/browser/observable/internal/aggregation/AggregationsHelper.js.map +1 -0
- package/build/browser/observable/internal/aggregation/ObjectAggregationQuery.js +33 -0
- package/build/browser/observable/internal/aggregation/ObjectAggregationQuery.js.map +1 -0
- package/build/browser/observable/internal/base-list/BaseListQuery.js +148 -6
- package/build/browser/observable/internal/base-list/BaseListQuery.js.map +1 -1
- package/build/browser/observable/internal/base-list/createCollectionConnectable.js +0 -5
- package/build/browser/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
- package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js +26 -13
- package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
- package/build/browser/observable/internal/evaluateFilter.js +61 -0
- package/build/browser/observable/internal/evaluateFilter.js.map +1 -0
- package/build/browser/observable/internal/links/SpecificLinkCacheKey.js +33 -1
- package/build/browser/observable/internal/links/SpecificLinkCacheKey.js.map +1 -1
- package/build/browser/observable/internal/list/InterfaceListQuery.js +8 -3
- package/build/browser/observable/internal/list/InterfaceListQuery.js.map +1 -1
- package/build/browser/observable/internal/list/ListCacheKey.js +24 -1
- package/build/browser/observable/internal/list/ListCacheKey.js.map +1 -1
- package/build/browser/observable/internal/list/ListQuery.js +42 -64
- package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
- package/build/browser/observable/internal/list/ListQuery.test.js +243 -0
- package/build/browser/observable/internal/list/ListQuery.test.js.map +1 -0
- package/build/browser/observable/internal/list/ListQueryOptions.js.map +1 -1
- package/build/browser/observable/internal/list/ListsHelper.js +18 -8
- package/build/browser/observable/internal/list/ListsHelper.js.map +1 -1
- package/build/browser/observable/internal/list/ObjectListQuery.js +51 -3
- package/build/browser/observable/internal/list/ObjectListQuery.js.map +1 -1
- package/build/browser/observable/internal/object/ObjectCacheKey.js +20 -1
- package/build/browser/observable/internal/object/ObjectCacheKey.js.map +1 -1
- package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.js +126 -0
- package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.js.map +1 -0
- package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.test.js +173 -0
- package/build/browser/observable/internal/object/ObjectCacheKeyRegistry.test.js.map +1 -0
- package/build/browser/observable/internal/object/ObjectQuery.js +10 -58
- package/build/browser/observable/internal/object/ObjectQuery.js.map +1 -1
- package/build/browser/observable/internal/object/ObjectsHelper.js +65 -5
- package/build/browser/observable/internal/object/ObjectsHelper.js.map +1 -1
- package/build/browser/observable/internal/objectMatchesWhereClause.js +3 -37
- package/build/browser/observable/internal/objectMatchesWhereClause.js.map +1 -1
- package/build/browser/observable/internal/objectset/ObjectSetHelper.js +5 -1
- package/build/browser/observable/internal/objectset/ObjectSetHelper.js.map +1 -1
- package/build/browser/observable/internal/objectset/ObjectSetQuery.js +10 -1
- package/build/browser/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
- package/build/browser/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
- package/build/browser/observable/internal/testUtils/invalidateList.js +6 -1
- package/build/browser/observable/internal/testUtils/invalidateList.js.map +1 -1
- package/build/browser/observable/internal/testUtils.js +5 -2
- package/build/browser/observable/internal/testUtils.js.map +1 -1
- package/build/browser/observable/internal/types/ObjectUpdate.js +2 -0
- package/build/browser/observable/internal/types/ObjectUpdate.js.map +1 -0
- package/build/browser/observable/internal/utils/rdpFieldOperations.js +83 -0
- package/build/browser/observable/internal/utils/rdpFieldOperations.js.map +1 -0
- package/build/browser/public/internal-node.js +18 -0
- package/build/browser/public/internal-node.js.map +1 -0
- package/build/browser/public/unstable-do-not-use.js.map +1 -1
- package/build/browser/queries/applyQuery.js +2 -0
- package/build/browser/queries/applyQuery.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/toDataValue.js +3 -2
- package/build/browser/util/toDataValue.js.map +1 -1
- package/build/browser/util/toDataValue.test.js +1 -1
- package/build/browser/util/toDataValue.test.js.map +1 -1
- package/build/browser/util/toDataValueQueries.js +2 -2
- package/build/browser/util/toDataValueQueries.js.map +1 -1
- package/build/cjs/chunk-6SCDLAU2.cjs +57 -0
- package/build/cjs/chunk-6SCDLAU2.cjs.map +1 -0
- package/build/cjs/{chunk-DCEFUXFS.cjs → chunk-RO7XAQOS.cjs} +421 -246
- package/build/cjs/chunk-RO7XAQOS.cjs.map +1 -0
- package/build/cjs/{chunk-BP7BR5FZ.cjs → chunk-VGO7XU6T.cjs} +610 -71
- package/build/cjs/chunk-VGO7XU6T.cjs.map +1 -0
- package/build/cjs/{delay-QK4T7RVX.cjs → delay-KIUUJ5NJ.cjs} +4 -3
- package/build/cjs/delay-KIUUJ5NJ.cjs.map +1 -0
- package/build/cjs/index.cjs +17 -9
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +1 -1
- package/build/cjs/public/internal-node.cjs +193767 -0
- package/build/cjs/public/internal-node.cjs.map +1 -0
- package/build/cjs/public/internal-node.d.cts +29 -0
- package/build/cjs/public/internal.cjs +16 -9
- package/build/cjs/public/internal.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.cjs +1751 -869
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.d.cts +73 -6
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/MinimalClientContext.js.map +1 -1
- package/build/esm/createClient.js +1 -1
- package/build/esm/createClient.js.map +1 -1
- package/build/esm/createClient.test.js +19 -1
- package/build/esm/createClient.test.js.map +1 -1
- package/build/esm/createMinimalClient.js +1 -1
- package/build/esm/createMinimalClient.js.map +1 -1
- package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +2 -1
- package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
- package/build/esm/fetchMetadata.test.js +11 -0
- package/build/esm/fetchMetadata.test.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/internal/conversions/extractNamespace.js +22 -0
- package/build/esm/internal/conversions/extractNamespace.js.map +1 -0
- package/build/esm/internal/conversions/fullyQualifyPropName.js +26 -0
- package/build/esm/internal/conversions/fullyQualifyPropName.js.map +1 -0
- package/build/esm/internal/conversions/makeGeoFilterBbox.js +41 -0
- package/build/esm/internal/conversions/makeGeoFilterBbox.js.map +1 -0
- package/build/esm/internal/conversions/makeGeoFilterIntersects.js +29 -0
- package/build/esm/internal/conversions/makeGeoFilterIntersects.js.map +1 -0
- package/build/esm/internal/conversions/makeGeoFilterPolygon.js +30 -0
- package/build/esm/internal/conversions/makeGeoFilterPolygon.js.map +1 -0
- package/build/esm/internal/conversions/makeGeoFilterWithin.js +48 -0
- package/build/esm/internal/conversions/makeGeoFilterWithin.js.map +1 -0
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js +59 -105
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +309 -0
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
- package/build/esm/object/aggregate.js +2 -1
- package/build/esm/object/aggregate.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +5 -1
- package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +10 -0
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects.test.js +12 -0
- package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/esm/object/fetchPage.js +7 -4
- package/build/esm/object/fetchPage.js.map +1 -1
- package/build/esm/object/formatting/applyPropertyFormatter.js +58 -0
- package/build/esm/object/formatting/applyPropertyFormatter.js.map +1 -0
- package/build/esm/object/formatting/applyPropertyFormatter.test.js +726 -0
- package/build/esm/object/formatting/applyPropertyFormatter.test.js.map +1 -0
- package/build/esm/object/formatting/formatBoolean.js +23 -0
- package/build/esm/object/formatting/formatBoolean.js.map +1 -0
- package/build/esm/object/formatting/formatDateTime.js +158 -0
- package/build/esm/object/formatting/formatDateTime.js.map +1 -0
- package/build/esm/object/formatting/formatNumber.js +242 -0
- package/build/esm/object/formatting/formatNumber.js.map +1 -0
- package/build/esm/object/formatting/propertyFormattingUtils.js +39 -0
- package/build/esm/object/formatting/propertyFormattingUtils.js.map +1 -0
- package/build/esm/object/mediaUpload.js +1 -1
- package/build/esm/object/mediaUpload.js.map +1 -1
- package/build/esm/objectSet/ObjectSetListenerWebsocket.js +17 -0
- package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
- package/build/esm/observable/ObservableClient.js.map +1 -1
- package/build/esm/observable/internal/BulkObjectLoader.js +12 -4
- package/build/esm/observable/internal/BulkObjectLoader.js.map +1 -1
- package/build/esm/observable/internal/BulkObjectLoader.test.js +48 -0
- package/build/esm/observable/internal/BulkObjectLoader.test.js.map +1 -1
- package/build/esm/observable/internal/CacheKeys.js +9 -3
- package/build/esm/observable/internal/CacheKeys.js.map +1 -1
- package/build/esm/observable/internal/Canonicalizer.js +51 -0
- package/build/esm/observable/internal/Canonicalizer.js.map +1 -0
- package/build/esm/observable/internal/Changes.js.map +1 -1
- package/build/esm/observable/internal/IntersectCanonicalizer.js +35 -0
- package/build/esm/observable/internal/IntersectCanonicalizer.js.map +1 -0
- package/build/esm/observable/internal/KnownCacheKey.js.map +1 -1
- package/build/esm/observable/internal/ObservableClientImpl.js +3 -0
- package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/esm/observable/internal/OrderByCanonicalizer.js +1 -4
- package/build/esm/observable/internal/OrderByCanonicalizer.js.map +1 -1
- package/build/esm/observable/internal/PivotCanonicalizer.js +33 -0
- package/build/esm/observable/internal/PivotCanonicalizer.js.map +1 -0
- package/build/esm/observable/internal/RdpCanonicalizer.js +66 -0
- package/build/esm/observable/internal/RdpCanonicalizer.js.map +1 -0
- package/build/esm/observable/internal/RdpCanonicalizer.test.js +68 -0
- package/build/esm/observable/internal/RdpCanonicalizer.test.js.map +1 -0
- package/build/esm/observable/internal/SimpleWhereClause.js.map +1 -1
- package/build/esm/observable/internal/Store.js +172 -6
- package/build/esm/observable/internal/Store.js.map +1 -1
- package/build/esm/observable/internal/WhereClauseCanonicalizer.js +1 -1
- package/build/esm/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
- package/build/esm/observable/internal/actions/ActionApplication.js +1 -1
- package/build/esm/observable/internal/actions/ActionApplication.js.map +1 -1
- package/build/esm/observable/internal/actions/OptimisticJob.js +3 -3
- package/build/esm/observable/internal/actions/OptimisticJob.js.map +1 -1
- package/build/esm/observable/internal/aggregation/AggregationCacheKey.js +22 -0
- package/build/esm/observable/internal/aggregation/AggregationCacheKey.js.map +1 -0
- package/build/esm/observable/internal/aggregation/AggregationQuery.js +77 -0
- package/build/esm/observable/internal/aggregation/AggregationQuery.js.map +1 -0
- package/build/esm/observable/internal/aggregation/AggregationsHelper.js +54 -0
- package/build/esm/observable/internal/aggregation/AggregationsHelper.js.map +1 -0
- package/build/esm/observable/internal/aggregation/ObjectAggregationQuery.js +33 -0
- package/build/esm/observable/internal/aggregation/ObjectAggregationQuery.js.map +1 -0
- package/build/esm/observable/internal/base-list/BaseListQuery.js +148 -6
- package/build/esm/observable/internal/base-list/BaseListQuery.js.map +1 -1
- package/build/esm/observable/internal/base-list/createCollectionConnectable.js +0 -5
- package/build/esm/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
- package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js +26 -13
- package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
- package/build/esm/observable/internal/evaluateFilter.js +61 -0
- package/build/esm/observable/internal/evaluateFilter.js.map +1 -0
- package/build/esm/observable/internal/links/SpecificLinkCacheKey.js +33 -1
- package/build/esm/observable/internal/links/SpecificLinkCacheKey.js.map +1 -1
- package/build/esm/observable/internal/list/InterfaceListQuery.js +8 -3
- package/build/esm/observable/internal/list/InterfaceListQuery.js.map +1 -1
- package/build/esm/observable/internal/list/ListCacheKey.js +24 -1
- package/build/esm/observable/internal/list/ListCacheKey.js.map +1 -1
- package/build/esm/observable/internal/list/ListQuery.js +42 -64
- package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
- package/build/esm/observable/internal/list/ListQuery.test.js +243 -0
- package/build/esm/observable/internal/list/ListQuery.test.js.map +1 -0
- package/build/esm/observable/internal/list/ListQueryOptions.js.map +1 -1
- package/build/esm/observable/internal/list/ListsHelper.js +18 -8
- package/build/esm/observable/internal/list/ListsHelper.js.map +1 -1
- package/build/esm/observable/internal/list/ObjectListQuery.js +51 -3
- package/build/esm/observable/internal/list/ObjectListQuery.js.map +1 -1
- package/build/esm/observable/internal/object/ObjectCacheKey.js +20 -1
- package/build/esm/observable/internal/object/ObjectCacheKey.js.map +1 -1
- package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.js +126 -0
- package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.js.map +1 -0
- package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.test.js +173 -0
- package/build/esm/observable/internal/object/ObjectCacheKeyRegistry.test.js.map +1 -0
- package/build/esm/observable/internal/object/ObjectQuery.js +10 -58
- package/build/esm/observable/internal/object/ObjectQuery.js.map +1 -1
- package/build/esm/observable/internal/object/ObjectsHelper.js +65 -5
- package/build/esm/observable/internal/object/ObjectsHelper.js.map +1 -1
- package/build/esm/observable/internal/objectMatchesWhereClause.js +3 -37
- package/build/esm/observable/internal/objectMatchesWhereClause.js.map +1 -1
- package/build/esm/observable/internal/objectset/ObjectSetHelper.js +5 -1
- package/build/esm/observable/internal/objectset/ObjectSetHelper.js.map +1 -1
- package/build/esm/observable/internal/objectset/ObjectSetQuery.js +10 -1
- package/build/esm/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
- package/build/esm/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
- package/build/esm/observable/internal/testUtils/invalidateList.js +6 -1
- package/build/esm/observable/internal/testUtils/invalidateList.js.map +1 -1
- package/build/esm/observable/internal/testUtils.js +5 -2
- package/build/esm/observable/internal/testUtils.js.map +1 -1
- package/build/esm/observable/internal/types/ObjectUpdate.js +2 -0
- package/build/esm/observable/internal/types/ObjectUpdate.js.map +1 -0
- package/build/esm/observable/internal/utils/rdpFieldOperations.js +83 -0
- package/build/esm/observable/internal/utils/rdpFieldOperations.js.map +1 -0
- package/build/esm/public/internal-node.js +18 -0
- package/build/esm/public/internal-node.js.map +1 -0
- package/build/esm/public/unstable-do-not-use.js.map +1 -1
- package/build/esm/queries/applyQuery.js +2 -0
- package/build/esm/queries/applyQuery.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/toDataValue.js +3 -2
- package/build/esm/util/toDataValue.js.map +1 -1
- package/build/esm/util/toDataValue.test.js +1 -1
- package/build/esm/util/toDataValue.test.js.map +1 -1
- package/build/esm/util/toDataValueQueries.js +2 -2
- package/build/esm/util/toDataValueQueries.js.map +1 -1
- package/build/types/Client.d.ts +1 -1
- package/build/types/MinimalClientContext.d.ts +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/internal/conversions/extractNamespace.d.ts +1 -0
- package/build/types/internal/conversions/extractNamespace.d.ts.map +1 -0
- package/build/types/internal/conversions/fullyQualifyPropName.d.ts +2 -0
- package/build/types/internal/conversions/fullyQualifyPropName.d.ts.map +1 -0
- package/build/types/internal/conversions/makeGeoFilterBbox.d.ts +3 -0
- package/build/types/internal/conversions/makeGeoFilterBbox.d.ts.map +1 -0
- package/build/types/internal/conversions/makeGeoFilterIntersects.d.ts +3 -0
- package/build/types/internal/conversions/makeGeoFilterIntersects.d.ts.map +1 -0
- package/build/types/internal/conversions/makeGeoFilterPolygon.d.ts +3 -0
- package/build/types/internal/conversions/makeGeoFilterPolygon.d.ts.map +1 -0
- package/build/types/internal/conversions/makeGeoFilterWithin.d.ts +3 -0
- package/build/types/internal/conversions/makeGeoFilterWithin.d.ts.map +1 -0
- package/build/types/internal/conversions/modernToLegacyWhereClause.d.ts +1 -1
- package/build/types/internal/conversions/modernToLegacyWhereClause.d.ts.map +1 -1
- package/build/types/object/formatting/applyPropertyFormatter.d.ts +18 -0
- package/build/types/object/formatting/applyPropertyFormatter.d.ts.map +1 -0
- package/build/types/object/formatting/applyPropertyFormatter.test.d.ts +1 -0
- package/build/types/object/formatting/applyPropertyFormatter.test.d.ts.map +1 -0
- package/build/types/object/formatting/formatBoolean.d.ts +5 -0
- package/build/types/object/formatting/formatBoolean.d.ts.map +1 -0
- package/build/types/object/formatting/formatDateTime.d.ts +6 -0
- package/build/types/object/formatting/formatDateTime.d.ts.map +1 -0
- package/build/types/object/formatting/formatNumber.d.ts +15 -0
- package/build/types/object/formatting/formatNumber.d.ts.map +1 -0
- package/build/types/object/formatting/propertyFormattingUtils.d.ts +10 -0
- package/build/types/object/formatting/propertyFormattingUtils.d.ts.map +1 -0
- package/build/types/observable/ObservableClient.d.ts +76 -5
- 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/CacheKeys.d.ts.map +1 -1
- package/build/types/observable/internal/Canonicalizer.d.ts +37 -0
- package/build/types/observable/internal/Canonicalizer.d.ts.map +1 -0
- package/build/types/observable/internal/Changes.d.ts +4 -3
- package/build/types/observable/internal/Changes.d.ts.map +1 -1
- package/build/types/observable/internal/IntersectCanonicalizer.d.ts +18 -0
- package/build/types/observable/internal/IntersectCanonicalizer.d.ts.map +1 -0
- 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/OrderByCanonicalizer.d.ts.map +1 -1
- package/build/types/observable/internal/PivotCanonicalizer.d.ts +10 -0
- package/build/types/observable/internal/PivotCanonicalizer.d.ts.map +1 -0
- package/build/types/observable/internal/RdpCanonicalizer.d.ts +8 -0
- package/build/types/observable/internal/RdpCanonicalizer.d.ts.map +1 -0
- package/build/types/observable/internal/RdpCanonicalizer.test.d.ts +1 -0
- package/build/types/observable/internal/RdpCanonicalizer.test.d.ts.map +1 -0
- package/build/types/observable/internal/SimpleWhereClause.d.ts +6 -2
- package/build/types/observable/internal/SimpleWhereClause.d.ts.map +1 -1
- package/build/types/observable/internal/Store.d.ts +10 -0
- package/build/types/observable/internal/Store.d.ts.map +1 -1
- package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts +5 -2
- package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts.map +1 -1
- package/build/types/observable/internal/actions/ActionApplication.d.ts.map +1 -1
- package/build/types/observable/internal/aggregation/AggregationCacheKey.d.ts +12 -0
- package/build/types/observable/internal/aggregation/AggregationCacheKey.d.ts.map +1 -0
- package/build/types/observable/internal/aggregation/AggregationQuery.d.ts +49 -0
- package/build/types/observable/internal/aggregation/AggregationQuery.d.ts.map +1 -0
- package/build/types/observable/internal/aggregation/AggregationsHelper.d.ts +37 -0
- package/build/types/observable/internal/aggregation/AggregationsHelper.d.ts.map +1 -0
- package/build/types/observable/internal/aggregation/ObjectAggregationQuery.d.ts +5 -0
- package/build/types/observable/internal/aggregation/ObjectAggregationQuery.d.ts.map +1 -0
- package/build/types/observable/internal/base-list/BaseListQuery.d.ts +48 -2
- package/build/types/observable/internal/base-list/BaseListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/base-list/createCollectionConnectable.d.ts +1 -23
- package/build/types/observable/internal/base-list/createCollectionConnectable.d.ts.map +1 -1
- package/build/types/observable/internal/evaluateFilter.d.ts +6 -0
- package/build/types/observable/internal/evaluateFilter.d.ts.map +1 -0
- package/build/types/observable/internal/links/SpecificLinkCacheKey.d.ts +5 -0
- package/build/types/observable/internal/links/SpecificLinkCacheKey.d.ts.map +1 -1
- package/build/types/observable/internal/list/InterfaceListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListCacheKey.d.ts +10 -1
- package/build/types/observable/internal/list/ListCacheKey.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListQuery.d.ts +12 -15
- package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListQuery.test.d.ts +1 -0
- package/build/types/observable/internal/list/ListQuery.test.d.ts.map +1 -0
- package/build/types/observable/internal/list/ListQueryOptions.d.ts +10 -1
- package/build/types/observable/internal/list/ListQueryOptions.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListsHelper.d.ts +7 -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/ObjectCacheKey.d.ts +6 -1
- package/build/types/observable/internal/object/ObjectCacheKey.d.ts.map +1 -1
- package/build/types/observable/internal/object/ObjectCacheKeyRegistry.d.ts +60 -0
- package/build/types/observable/internal/object/ObjectCacheKeyRegistry.d.ts.map +1 -0
- package/build/types/observable/internal/object/ObjectCacheKeyRegistry.test.d.ts +1 -0
- package/build/types/observable/internal/object/ObjectCacheKeyRegistry.test.d.ts.map +1 -0
- package/build/types/observable/internal/object/ObjectQuery.d.ts +1 -1
- package/build/types/observable/internal/object/ObjectQuery.d.ts.map +1 -1
- package/build/types/observable/internal/object/ObjectsHelper.d.ts +15 -1
- package/build/types/observable/internal/object/ObjectsHelper.d.ts.map +1 -1
- package/build/types/observable/internal/objectMatchesWhereClause.d.ts.map +1 -1
- package/build/types/observable/internal/objectset/ObjectSetHelper.d.ts.map +1 -1
- package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts +2 -1
- package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts.map +1 -1
- package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts +16 -0
- package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts.map +1 -1
- package/build/types/observable/internal/testUtils.d.ts +2 -2
- package/build/types/observable/internal/testUtils.d.ts.map +1 -1
- package/build/types/observable/internal/types/ObjectUpdate.d.ts +11 -0
- package/build/types/observable/internal/types/ObjectUpdate.d.ts.map +1 -0
- package/build/types/observable/internal/utils/rdpFieldOperations.d.ts +5 -0
- package/build/types/observable/internal/utils/rdpFieldOperations.d.ts.map +1 -0
- package/build/types/public/internal-node.d.ts +2 -0
- package/build/types/public/internal-node.d.ts.map +1 -0
- package/build/types/public/unstable-do-not-use.d.ts +1 -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/internal-node.d.ts +17 -0
- package/package.json +18 -8
- package/build/cjs/chunk-BP7BR5FZ.cjs.map +0 -1
- package/build/cjs/chunk-DCEFUXFS.cjs.map +0 -1
- package/build/cjs/chunk-Q7SFCCGT.cjs +0 -11
- package/build/cjs/chunk-Q7SFCCGT.cjs.map +0 -1
- package/build/cjs/delay-QK4T7RVX.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchMetadata.test.js","names":["$Actions","$Interfaces","$Objects","$Queries","LegacyFauxFoundry","startNodeApiServer","beforeAll","describe","expect","expectTypeOf","it","createClient","client","testSetup","apiServer","close","objectMetadata","fetchMetadata","Employee","toEqualTypeOf","toMatchInlineSnapshot","interfaceMetadata","FooInterface","actionMetadata","moveOffice","queryMetadata","queryAcceptsObject"],"sources":["fetchMetadata.test.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionMetadata,\n InterfaceMetadata,\n ObjectMetadata,\n QueryMetadata,\n} from \"@osdk/api\";\nimport {\n $Actions,\n $Interfaces,\n $Objects,\n $Queries,\n} from \"@osdk/client.test.ontology\";\nimport { LegacyFauxFoundry, startNodeApiServer } from \"@osdk/shared.test\";\nimport { beforeAll, describe, expect, expectTypeOf, it } from \"vitest\";\nimport type { Client } from \"./Client.js\";\nimport { createClient } from \"./createClient.js\";\n\ndescribe(\"FetchMetadata\", () => {\n let client: Client;\n\n beforeAll(() => {\n const testSetup = startNodeApiServer(new LegacyFauxFoundry(), createClient);\n ({ client } = testSetup);\n return () => {\n testSetup.apiServer.close();\n };\n });\n\n it(\"fetches object metadata correctly\", async () => {\n const objectMetadata = await client.fetchMetadata($Objects.Employee);\n\n expectTypeOf(objectMetadata).toEqualTypeOf<\n ObjectMetadata\n >();\n\n expect(objectMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"Employee\",\n \"description\": \"A full-time or part-time \n\n employee of our firm\",\n \"displayName\": \"Employee\",\n \"icon\": {\n \"color\": \"blue\",\n \"name\": \"person\",\n \"type\": \"blueprint\",\n },\n \"implements\": [\n \"FooInterface\",\n ],\n \"interfaceMap\": {\n \"FooInterface\": {\n \"fooSpt\": \"fullName\",\n },\n },\n \"inverseInterfaceMap\": {\n \"FooInterface\": {\n \"fullName\": \"fooSpt\",\n },\n },\n \"links\": {\n \"lead\": {\n \"multiplicity\": false,\n \"targetType\": \"Employee\",\n },\n \"officeLink\": {\n \"multiplicity\": false,\n \"targetType\": \"Office\",\n },\n \"peeps\": {\n \"multiplicity\": true,\n \"targetType\": \"Employee\",\n },\n \"visitedOffices\": {\n \"multiplicity\": true,\n \"targetType\": \"Office\",\n },\n },\n \"pluralDisplayName\": \"Employees\",\n \"primaryKeyApiName\": \"employeeId\",\n \"primaryKeyType\": \"integer\",\n \"properties\": {\n \"class\": {\n \"description\": \"\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeId\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"integer\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeLocation\": {\n \"description\": \"Geotime series reference of the location of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"geotimeSeriesReference\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeSensor\": {\n \"description\": \"TimeSeries sensor of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"sensorTimeseries\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeStatus\": {\n \"description\": \"TimeSeries of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"stringTimeseries\",\n \"valueTypeApiName\": undefined,\n },\n \"fullName\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"office\": {\n \"description\": \"The unique \"ID\" of the employee's \\\\\"primary\\\\\" assigned office.\n This is some more text.\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"skillSet\": {\n \"description\": \"The skills of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"skillSetEmbedding\": {\n \"description\": \"Vectorized skill set\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"vector\",\n \"valueTypeApiName\": undefined,\n },\n \"startDate\": {\n \"description\": \"The date the employee was hired (most recently, if they were re-hired)\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"datetime\",\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\",\n \"status\": \"ACTIVE\",\n \"titleProperty\": \"fullName\",\n \"type\": \"object\",\n \"visibility\": \"NORMAL\",\n }\n `);\n });\n\n it(\"fetches interface metadata correctly\", async () => {\n const interfaceMetadata = await client.fetchMetadata(\n $Interfaces.FooInterface,\n );\n\n expectTypeOf(interfaceMetadata).toEqualTypeOf<\n InterfaceMetadata\n >();\n\n expect(interfaceMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"FooInterface\",\n \"description\": \"Interface for Foo\",\n \"displayName\": \"Foo Interface\",\n \"implementedBy\": [\n \"Employee\",\n \"Person\",\n ],\n \"implements\": [],\n \"links\": {\n \"toBar\": {\n \"multiplicity\": true,\n \"targetType\": \"interface\",\n \"targetTypeApiName\": \"BarInterface\",\n },\n },\n \"properties\": {\n \"fooSpt\": {\n \"description\": \"A foo\",\n \"displayName\": \"Foo\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.interface.main.interface.1\",\n \"type\": \"interface\",\n }\n `);\n });\n\n it(\"fetches action metadata correctly\", async () => {\n const actionMetadata = await client.fetchMetadata(\n $Actions.moveOffice,\n );\n\n expectTypeOf(actionMetadata).toEqualTypeOf<ActionMetadata>();\n\n expect(actionMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"moveOffice\",\n \"description\": \"Update an office's physical location\",\n \"displayName\": \"move-office\",\n \"modifiedEntities\": {\n \"Office\": {\n \"created\": false,\n \"modified\": true,\n },\n },\n \"parameters\": {\n \"newAddress\": {\n \"description\": \"The office's new physical address (not necessarily shipping address)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n },\n \"newCapacity\": {\n \"description\": \"The maximum seated-at-desk capacity of the new office (maximum fire-safe capacity may be higher)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n \"officeId\": {\n \"description\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"string\",\n },\n \"officeNames\": {\n \"description\": \"A list of all office names\",\n \"multiplicity\": true,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n },\n \"rid\": \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n \"status\": \"ACTIVE\",\n \"type\": \"action\",\n }\n `);\n });\n\n it(\"fetches query metadata correctly\", async () => {\n const queryMetadata = await client.fetchMetadata(\n $Queries.queryAcceptsObject,\n );\n\n expectTypeOf(queryMetadata).toEqualTypeOf<QueryMetadata>();\n\n expect(queryMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"queryAcceptsObject\",\n \"description\": \"description of the query that takes object types\",\n \"displayName\": \"QueryAcceptsObject\",\n \"output\": {\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n \"parameters\": {\n \"object\": {\n \"description\": undefined,\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n },\n \"rid\": \"ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968\",\n \"type\": \"query\",\n \"version\": \"0.11.0\",\n }\n `);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SACEA,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,QAAQ,QACH,4BAA4B;AACnC,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,mBAAmB;AACzE,SAASC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAEtE,SAASC,YAAY,QAAQ,mBAAmB;AAEhDJ,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9B,IAAIK,MAAc;EAElBN,SAAS,CAAC,MAAM;IACd,MAAMO,SAAS,GAAGR,kBAAkB,CAAC,IAAID,iBAAiB,CAAC,CAAC,EAAEO,YAAY,CAAC;IAC3E,CAAC;MAAEC;IAAO,CAAC,GAAGC,SAAS;IACvB,OAAO,MAAM;MACXA,SAAS,CAACC,SAAS,CAACC,KAAK,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,CAAC;EAEFL,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMM,cAAc,GAAG,MAAMJ,MAAM,CAACK,aAAa,CAACf,QAAQ,CAACgB,QAAQ,CAAC;IAEpET,YAAY,CAACO,cAAc,CAAC,CAACG,aAAa,CAExC,CAAC;IAEHX,MAAM,CAACQ,cAAc,CAAC,CAACI,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,sCAAsC,EAAE,YAAY;IACrD,MAAMW,iBAAiB,GAAG,MAAMT,MAAM,CAACK,aAAa,CAClDhB,WAAW,CAACqB,YACd,CAAC;IAEDb,YAAY,CAACY,iBAAiB,CAAC,CAACF,aAAa,CAE3C,CAAC;IAEHX,MAAM,CAACa,iBAAiB,CAAC,CAACD,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMa,cAAc,GAAG,MAAMX,MAAM,CAACK,aAAa,CAC/CjB,QAAQ,CAACwB,UACX,CAAC;IAEDf,YAAY,CAACc,cAAc,CAAC,CAACJ,aAAa,CAAiB,CAAC;IAE5DX,MAAM,CAACe,cAAc,CAAC,CAACH,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,kCAAkC,EAAE,YAAY;IACjD,MAAMe,aAAa,GAAG,MAAMb,MAAM,CAACK,aAAa,CAC9Cd,QAAQ,CAACuB,kBACX,CAAC;IAEDjB,YAAY,CAACgB,aAAa,CAAC,CAACN,aAAa,CAAgB,CAAC;IAE1DX,MAAM,CAACiB,aAAa,CAAC,CAACL,qBAAqB,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"fetchMetadata.test.js","names":["$Actions","$Interfaces","$Objects","$Queries","LegacyFauxFoundry","startNodeApiServer","beforeAll","describe","expect","expectTypeOf","it","createClient","client","testSetup","apiServer","close","objectMetadata","fetchMetadata","Employee","toEqualTypeOf","toMatchInlineSnapshot","interfaceMetadata","FooInterface","actionMetadata","moveOffice","queryMetadata","queryAcceptsObject"],"sources":["fetchMetadata.test.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionMetadata,\n InterfaceMetadata,\n ObjectMetadata,\n QueryMetadata,\n} from \"@osdk/api\";\nimport {\n $Actions,\n $Interfaces,\n $Objects,\n $Queries,\n} from \"@osdk/client.test.ontology\";\nimport { LegacyFauxFoundry, startNodeApiServer } from \"@osdk/shared.test\";\nimport { beforeAll, describe, expect, expectTypeOf, it } from \"vitest\";\nimport type { Client } from \"./Client.js\";\nimport { createClient } from \"./createClient.js\";\n\ndescribe(\"FetchMetadata\", () => {\n let client: Client;\n\n beforeAll(() => {\n const testSetup = startNodeApiServer(new LegacyFauxFoundry(), createClient);\n ({ client } = testSetup);\n return () => {\n testSetup.apiServer.close();\n };\n });\n\n it(\"fetches object metadata correctly\", async () => {\n const objectMetadata = await client.fetchMetadata($Objects.Employee);\n\n expectTypeOf(objectMetadata).toEqualTypeOf<\n ObjectMetadata\n >();\n\n expect(objectMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"Employee\",\n \"description\": \"A full-time or part-time \n\n employee of our firm\",\n \"displayName\": \"Employee\",\n \"icon\": {\n \"color\": \"blue\",\n \"name\": \"person\",\n \"type\": \"blueprint\",\n },\n \"implements\": [\n \"FooInterface\",\n ],\n \"interfaceMap\": {\n \"FooInterface\": {\n \"fooSpt\": \"fullName\",\n },\n },\n \"inverseInterfaceMap\": {\n \"FooInterface\": {\n \"fullName\": \"fooSpt\",\n },\n },\n \"links\": {\n \"lead\": {\n \"multiplicity\": false,\n \"targetType\": \"Employee\",\n },\n \"officeLink\": {\n \"multiplicity\": false,\n \"targetType\": \"Office\",\n },\n \"peeps\": {\n \"multiplicity\": true,\n \"targetType\": \"Employee\",\n },\n \"visitedOffices\": {\n \"multiplicity\": true,\n \"targetType\": \"Office\",\n },\n },\n \"pluralDisplayName\": \"Employees\",\n \"primaryKeyApiName\": \"employeeId\",\n \"primaryKeyType\": \"integer\",\n \"properties\": {\n \"class\": {\n \"description\": \"\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeId\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"integer\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeLocation\": {\n \"description\": \"Geotime series reference of the location of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"geotimeSeriesReference\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeSensor\": {\n \"description\": \"TimeSeries sensor of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"sensorTimeseries\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeStatus\": {\n \"description\": \"TimeSeries of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"stringTimeseries\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"fullName\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"office\": {\n \"description\": \"The unique \"ID\" of the employee's \\\\\"primary\\\\\" assigned office.\n This is some more text.\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"skillSet\": {\n \"description\": \"The skills of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"skillSetEmbedding\": {\n \"description\": \"Vectorized skill set\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"vector\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"startDate\": {\n \"description\": \"The date the employee was hired (most recently, if they were re-hired)\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"datetime\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\",\n \"status\": \"ACTIVE\",\n \"titleProperty\": \"fullName\",\n \"type\": \"object\",\n \"visibility\": \"NORMAL\",\n }\n `);\n });\n\n it(\"fetches interface metadata correctly\", async () => {\n const interfaceMetadata = await client.fetchMetadata(\n $Interfaces.FooInterface,\n );\n\n expectTypeOf(interfaceMetadata).toEqualTypeOf<\n InterfaceMetadata\n >();\n\n expect(interfaceMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"FooInterface\",\n \"description\": \"Interface for Foo\",\n \"displayName\": \"Foo Interface\",\n \"implementedBy\": [\n \"Employee\",\n \"Person\",\n ],\n \"implements\": [],\n \"links\": {\n \"toBar\": {\n \"multiplicity\": true,\n \"targetType\": \"interface\",\n \"targetTypeApiName\": \"BarInterface\",\n },\n },\n \"properties\": {\n \"fooSpt\": {\n \"description\": \"A foo\",\n \"displayName\": \"Foo\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.interface.main.interface.1\",\n \"type\": \"interface\",\n }\n `);\n });\n\n it(\"fetches action metadata correctly\", async () => {\n const actionMetadata = await client.fetchMetadata(\n $Actions.moveOffice,\n );\n\n expectTypeOf(actionMetadata).toEqualTypeOf<ActionMetadata>();\n\n expect(actionMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"moveOffice\",\n \"description\": \"Update an office's physical location\",\n \"displayName\": \"move-office\",\n \"modifiedEntities\": {\n \"Office\": {\n \"created\": false,\n \"modified\": true,\n },\n },\n \"parameters\": {\n \"newAddress\": {\n \"description\": \"The office's new physical address (not necessarily shipping address)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n },\n \"newCapacity\": {\n \"description\": \"The maximum seated-at-desk capacity of the new office (maximum fire-safe capacity may be higher)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n \"officeId\": {\n \"description\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"string\",\n },\n \"officeNames\": {\n \"description\": \"A list of all office names\",\n \"multiplicity\": true,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n },\n \"rid\": \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n \"status\": \"ACTIVE\",\n \"type\": \"action\",\n }\n `);\n });\n\n it(\"fetches query metadata correctly\", async () => {\n const queryMetadata = await client.fetchMetadata(\n $Queries.queryAcceptsObject,\n );\n\n expectTypeOf(queryMetadata).toEqualTypeOf<QueryMetadata>();\n\n expect(queryMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"queryAcceptsObject\",\n \"description\": \"description of the query that takes object types\",\n \"displayName\": \"QueryAcceptsObject\",\n \"output\": {\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n \"parameters\": {\n \"object\": {\n \"description\": undefined,\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n },\n \"rid\": \"ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968\",\n \"type\": \"query\",\n \"version\": \"0.11.0\",\n }\n `);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SACEA,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,QAAQ,QACH,4BAA4B;AACnC,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,mBAAmB;AACzE,SAASC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAEtE,SAASC,YAAY,QAAQ,mBAAmB;AAEhDJ,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9B,IAAIK,MAAc;EAElBN,SAAS,CAAC,MAAM;IACd,MAAMO,SAAS,GAAGR,kBAAkB,CAAC,IAAID,iBAAiB,CAAC,CAAC,EAAEO,YAAY,CAAC;IAC3E,CAAC;MAAEC;IAAO,CAAC,GAAGC,SAAS;IACvB,OAAO,MAAM;MACXA,SAAS,CAACC,SAAS,CAACC,KAAK,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,CAAC;EAEFL,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMM,cAAc,GAAG,MAAMJ,MAAM,CAACK,aAAa,CAACf,QAAQ,CAACgB,QAAQ,CAAC;IAEpET,YAAY,CAACO,cAAc,CAAC,CAACG,aAAa,CAExC,CAAC;IAEHX,MAAM,CAACQ,cAAc,CAAC,CAACI,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,sCAAsC,EAAE,YAAY;IACrD,MAAMW,iBAAiB,GAAG,MAAMT,MAAM,CAACK,aAAa,CAClDhB,WAAW,CAACqB,YACd,CAAC;IAEDb,YAAY,CAACY,iBAAiB,CAAC,CAACF,aAAa,CAE3C,CAAC;IAEHX,MAAM,CAACa,iBAAiB,CAAC,CAACD,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMa,cAAc,GAAG,MAAMX,MAAM,CAACK,aAAa,CAC/CjB,QAAQ,CAACwB,UACX,CAAC;IAEDf,YAAY,CAACc,cAAc,CAAC,CAACJ,aAAa,CAAiB,CAAC;IAE5DX,MAAM,CAACe,cAAc,CAAC,CAACH,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,kCAAkC,EAAE,YAAY;IACjD,MAAMe,aAAa,GAAG,MAAMb,MAAM,CAACK,aAAa,CAC9Cd,QAAQ,CAACuB,kBACX,CAAC;IAEDjB,YAAY,CAACgB,aAAa,CAAC,CAACN,aAAa,CAAgB,CAAC;IAE1DX,MAAM,CAACiB,aAAa,CAAC,CAACL,qBAAqB,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["isOk","NULL_VALUE","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC","createObjectSpecifierFromPrimaryKey","extractPrimaryKeyFromObjectSpecifier"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\nexport { isOk, NULL_VALUE } from \"@osdk/api\";\nexport type {\n ActionDefinition,\n ActionEditResponse,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n Attachment,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n Logger,\n ObjectMetadata,\n ObjectSet,\n ObjectSpecifier,\n ObjectTypeDefinition,\n Osdk,\n OsdkObject,\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n PageResult,\n PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient,\n QueryDefinition,\n QueryParam,\n QueryResult,\n Range,\n Result,\n SingleLinkAccessor,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n VersionBound,\n WhereClause,\n} from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\n\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport type { Client } from \"./Client.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport type { PlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\nexport type { ResultOrError } from \"./ResultOrError.js\";\n\nexport {\n extractDate,\n extractDateInLocalTime,\n extractDateInUTC,\n} from \"./util/datetimeConverters.js\";\n\nexport {\n createObjectSpecifierFromPrimaryKey,\n extractPrimaryKeyFromObjectSpecifier,\n} from \"./util/objectSpecifierUtils.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAASA,IAAI,EAAEC,UAAU,QAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"index.js","names":["isOk","NULL_VALUE","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC","createObjectSpecifierFromPrimaryKey","extractPrimaryKeyFromObjectSpecifier"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\nexport { isOk, NULL_VALUE } from \"@osdk/api\";\nexport type {\n ActionDefinition,\n ActionEditResponse,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n Attachment,\n CompileTimeMetadata,\n DerivedProperty,\n InterfaceDefinition,\n InterfaceMetadata,\n Logger,\n MediaReference,\n MediaUpload,\n ObjectMetadata,\n ObjectSet,\n ObjectSpecifier,\n ObjectTypeDefinition,\n Osdk,\n OsdkObject,\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n PageResult,\n PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient,\n QueryDefinition,\n QueryParam,\n QueryResult,\n Range,\n Result,\n SingleLinkAccessor,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n VersionBound,\n WhereClause,\n} from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\n\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport type { Client } from \"./Client.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport type { PlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\nexport type { ResultOrError } from \"./ResultOrError.js\";\n\nexport {\n extractDate,\n extractDateInLocalTime,\n extractDateInUTC,\n} from \"./util/datetimeConverters.js\";\n\nexport {\n createObjectSpecifierFromPrimaryKey,\n extractPrimaryKeyFromObjectSpecifier,\n} from \"./util/objectSpecifierUtils.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAASA,IAAI,EAAEC,UAAU,QAAQ,WAAW;AAyC5C,SAASC,gBAAgB,QAAQ,yBAAyB;AAE1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAE1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,SAASC,sBAAsB,QAAQ,8BAA8B;AAGrE,SACEC,WAAW,EACXC,sBAAsB,EACtBC,gBAAgB,QACX,8BAA8B;AAErC,SACEC,mCAAmC,EACnCC,oCAAoC,QAC/B,gCAAgC","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export function extractNamespace(fqApiName) {
|
|
18
|
+
const last = fqApiName.lastIndexOf(".");
|
|
19
|
+
if (last === -1) return [undefined, fqApiName];
|
|
20
|
+
return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=extractNamespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractNamespace.js","names":["extractNamespace","fqApiName","last","lastIndexOf","undefined","slice"],"sources":["extractNamespace.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function extractNamespace(\n fqApiName: string,\n): [string | undefined, string] {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1) return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,gBAAgBA,CAC9BC,SAAiB,EACa;EAC9B,MAAMC,IAAI,GAAGD,SAAS,CAACE,WAAW,CAAC,GAAG,CAAC;EACvC,IAAID,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,CAACE,SAAS,EAAEH,SAAS,CAAC;EAC9C,OAAO,CAACA,SAAS,CAACI,KAAK,CAAC,CAAC,EAAEH,IAAI,CAAC,EAAED,SAAS,CAACI,KAAK,CAACH,IAAI,GAAG,CAAC,CAAC,CAAC;AAC9D","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { extractNamespace } from "./extractNamespace.js";
|
|
18
|
+
export function fullyQualifyPropName(fieldName, objectOrInterface) {
|
|
19
|
+
if (objectOrInterface.type === "interface") {
|
|
20
|
+
const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);
|
|
21
|
+
const [fieldApiNamespace, fieldShortName] = extractNamespace(fieldName);
|
|
22
|
+
return fieldApiNamespace == null && objApiNamespace != null ? `${objApiNamespace}.${fieldShortName}` : fieldName;
|
|
23
|
+
}
|
|
24
|
+
return fieldName;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=fullyQualifyPropName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullyQualifyPropName.js","names":["extractNamespace","fullyQualifyPropName","fieldName","objectOrInterface","type","objApiNamespace","apiName","fieldApiNamespace","fieldShortName"],"sources":["fullyQualifyPropName.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ObjectOrInterfaceDefinition } from \"@osdk/api\";\nimport { extractNamespace } from \"./extractNamespace.js\";\n\nexport function fullyQualifyPropName(\n fieldName: string,\n objectOrInterface: ObjectOrInterfaceDefinition,\n): string {\n if (objectOrInterface.type === \"interface\") {\n const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);\n const [fieldApiNamespace, fieldShortName] = extractNamespace(fieldName);\n return (fieldApiNamespace == null && objApiNamespace != null)\n ? `${objApiNamespace}.${fieldShortName}`\n : fieldName;\n }\n return fieldName;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,gBAAgB,QAAQ,uBAAuB;AAExD,OAAO,SAASC,oBAAoBA,CAClCC,SAAiB,EACjBC,iBAA8C,EACtC;EACR,IAAIA,iBAAiB,CAACC,IAAI,KAAK,WAAW,EAAE;IAC1C,MAAM,CAACC,eAAe,CAAC,GAAGL,gBAAgB,CAACG,iBAAiB,CAACG,OAAO,CAAC;IACrE,MAAM,CAACC,iBAAiB,EAAEC,cAAc,CAAC,GAAGR,gBAAgB,CAACE,SAAS,CAAC;IACvE,OAAQK,iBAAiB,IAAI,IAAI,IAAIF,eAAe,IAAI,IAAI,GACxD,GAAGA,eAAe,IAAIG,cAAc,EAAE,GACtCN,SAAS;EACf;EACA,OAAOA,SAAS;AAClB","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export function makeGeoFilterBbox(bbox, filterType, propertyIdentifier, field) {
|
|
18
|
+
return {
|
|
19
|
+
type: filterType === "$within" ? "withinBoundingBox" : "intersectsBoundingBox",
|
|
20
|
+
/**
|
|
21
|
+
* This is a bit ugly, but did this so that propertyIdentifier only shows up in the return object if its defined,
|
|
22
|
+
* 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.
|
|
23
|
+
* Once we solidify that this is the way forward, I can remove field and clean this up
|
|
24
|
+
*/
|
|
25
|
+
...(propertyIdentifier != null && {
|
|
26
|
+
propertyIdentifier
|
|
27
|
+
}),
|
|
28
|
+
field,
|
|
29
|
+
value: {
|
|
30
|
+
topLeft: {
|
|
31
|
+
type: "Point",
|
|
32
|
+
coordinates: [bbox[0], bbox[3]]
|
|
33
|
+
},
|
|
34
|
+
bottomRight: {
|
|
35
|
+
type: "Point",
|
|
36
|
+
coordinates: [bbox[2], bbox[1]]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=makeGeoFilterBbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeGeoFilterBbox.js","names":["makeGeoFilterBbox","bbox","filterType","propertyIdentifier","field","type","value","topLeft","coordinates","bottomRight"],"sources":["makeGeoFilterBbox.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n PropertyIdentifier,\n SearchJsonQueryV2,\n} from \"@osdk/foundry.ontologies\";\nimport type { BBox } from \"geojson\";\n\nexport function makeGeoFilterBbox(\n bbox: BBox,\n filterType: \"$within\" | \"$intersects\",\n propertyIdentifier?: PropertyIdentifier,\n field?: string,\n): SearchJsonQueryV2 {\n return {\n type: filterType === \"$within\"\n ? \"withinBoundingBox\"\n : \"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 && { propertyIdentifier }),\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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAO,SAASA,iBAAiBA,CAC/BC,IAAU,EACVC,UAAqC,EACrCC,kBAAuC,EACvCC,KAAc,EACK;EACnB,OAAO;IACLC,IAAI,EAAEH,UAAU,KAAK,SAAS,GAC1B,mBAAmB,GACnB,uBAAuB;IAC3B;AACJ;AACA;AACA;AACA;IACI,IAAIC,kBAAkB,IAAI,IAAI,IAAI;MAAEA;IAAmB,CAAC,CAAC;IACzDC,KAAK;IACLE,KAAK,EAAE;MACLC,OAAO,EAAE;QACPF,IAAI,EAAE,OAAO;QACbG,WAAW,EAAE,CAACP,IAAI,CAAC,CAAC,CAAC,EAAEA,IAAI,CAAC,CAAC,CAAC;MAChC,CAAC;MACDQ,WAAW,EAAE;QACXJ,IAAI,EAAE,OAAO;QACbG,WAAW,EAAE,CAACP,IAAI,CAAC,CAAC,CAAC,EAAEA,IAAI,CAAC,CAAC,CAAC;MAChC;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { makeGeoFilterBbox } from "./makeGeoFilterBbox.js";
|
|
18
|
+
import { makeGeoFilterPolygon } from "./makeGeoFilterPolygon.js";
|
|
19
|
+
export function makeGeoFilterIntersects(intersectsBody, propertyIdentifier, field) {
|
|
20
|
+
if (Array.isArray(intersectsBody)) {
|
|
21
|
+
return makeGeoFilterBbox(intersectsBody, "$intersects", propertyIdentifier, field);
|
|
22
|
+
} else if ("$bbox" in intersectsBody && intersectsBody.$bbox != null) {
|
|
23
|
+
return makeGeoFilterBbox(intersectsBody.$bbox, "$intersects", propertyIdentifier, field);
|
|
24
|
+
} else {
|
|
25
|
+
const coordinates = "$polygon" in intersectsBody ? intersectsBody.$polygon : intersectsBody.coordinates;
|
|
26
|
+
return makeGeoFilterPolygon(coordinates, "intersectsPolygon", propertyIdentifier, field);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=makeGeoFilterIntersects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeGeoFilterIntersects.js","names":["makeGeoFilterBbox","makeGeoFilterPolygon","makeGeoFilterIntersects","intersectsBody","propertyIdentifier","field","Array","isArray","$bbox","coordinates","$polygon"],"sources":["makeGeoFilterIntersects.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { GeoFilterOptions } from \"@osdk/api\";\nimport type {\n PropertyIdentifier,\n SearchJsonQueryV2,\n} from \"@osdk/foundry.ontologies\";\nimport { makeGeoFilterBbox } from \"./makeGeoFilterBbox.js\";\nimport { makeGeoFilterPolygon } from \"./makeGeoFilterPolygon.js\";\n\nexport function makeGeoFilterIntersects(\n intersectsBody: GeoFilterOptions[\"$intersects\"],\n propertyIdentifier?: PropertyIdentifier,\n field?: string,\n): SearchJsonQueryV2 {\n if (Array.isArray(intersectsBody)) {\n return makeGeoFilterBbox(\n intersectsBody,\n \"$intersects\",\n propertyIdentifier,\n field,\n );\n } else if (\"$bbox\" in intersectsBody && intersectsBody.$bbox != null) {\n return makeGeoFilterBbox(\n intersectsBody.$bbox,\n \"$intersects\",\n propertyIdentifier,\n field,\n );\n } else {\n const coordinates = (\"$polygon\" in intersectsBody)\n ? intersectsBody.$polygon\n : intersectsBody.coordinates;\n return makeGeoFilterPolygon(\n coordinates,\n \"intersectsPolygon\",\n propertyIdentifier,\n field,\n );\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,OAAO,SAASC,uBAAuBA,CACrCC,cAA+C,EAC/CC,kBAAuC,EACvCC,KAAc,EACK;EACnB,IAAIC,KAAK,CAACC,OAAO,CAACJ,cAAc,CAAC,EAAE;IACjC,OAAOH,iBAAiB,CACtBG,cAAc,EACd,aAAa,EACbC,kBAAkB,EAClBC,KACF,CAAC;EACH,CAAC,MAAM,IAAI,OAAO,IAAIF,cAAc,IAAIA,cAAc,CAACK,KAAK,IAAI,IAAI,EAAE;IACpE,OAAOR,iBAAiB,CACtBG,cAAc,CAACK,KAAK,EACpB,aAAa,EACbJ,kBAAkB,EAClBC,KACF,CAAC;EACH,CAAC,MAAM;IACL,MAAMI,WAAW,GAAI,UAAU,IAAIN,cAAc,GAC7CA,cAAc,CAACO,QAAQ,GACvBP,cAAc,CAACM,WAAW;IAC9B,OAAOR,oBAAoB,CACzBQ,WAAW,EACX,mBAAmB,EACnBL,kBAAkB,EAClBC,KACF,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export function makeGeoFilterPolygon(coordinates, filterType, propertyIdentifier, field) {
|
|
18
|
+
return {
|
|
19
|
+
type: filterType,
|
|
20
|
+
...(propertyIdentifier != null && {
|
|
21
|
+
propertyIdentifier
|
|
22
|
+
}),
|
|
23
|
+
field,
|
|
24
|
+
value: {
|
|
25
|
+
type: "Polygon",
|
|
26
|
+
coordinates
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=makeGeoFilterPolygon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeGeoFilterPolygon.js","names":["makeGeoFilterPolygon","coordinates","filterType","propertyIdentifier","field","type","value"],"sources":["makeGeoFilterPolygon.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n PropertyIdentifier,\n SearchJsonQueryV2,\n} from \"@osdk/foundry.ontologies\";\nimport type { Position } from \"geojson\";\n\nexport function makeGeoFilterPolygon(\n coordinates: Position[][],\n filterType: \"intersectsPolygon\" | \"withinPolygon\",\n propertyIdentifier?: PropertyIdentifier,\n field?: string,\n): SearchJsonQueryV2 {\n return {\n type: filterType,\n ...(propertyIdentifier != null && { propertyIdentifier }),\n field,\n value: {\n type: \"Polygon\",\n coordinates,\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAO,SAASA,oBAAoBA,CAClCC,WAAyB,EACzBC,UAAiD,EACjDC,kBAAuC,EACvCC,KAAc,EACK;EACnB,OAAO;IACLC,IAAI,EAAEH,UAAU;IAChB,IAAIC,kBAAkB,IAAI,IAAI,IAAI;MAAEA;IAAmB,CAAC,CAAC;IACzDC,KAAK;IACLE,KAAK,EAAE;MACLD,IAAI,EAAE,SAAS;MACfJ;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { DistanceUnitMapping } from "@osdk/api";
|
|
18
|
+
import { makeGeoFilterBbox } from "./makeGeoFilterBbox.js";
|
|
19
|
+
import { makeGeoFilterPolygon } from "./makeGeoFilterPolygon.js";
|
|
20
|
+
export function makeGeoFilterWithin(withinBody, propertyIdentifier, field) {
|
|
21
|
+
if (Array.isArray(withinBody)) {
|
|
22
|
+
return makeGeoFilterBbox(withinBody, "$within", propertyIdentifier, field);
|
|
23
|
+
} else if ("$bbox" in withinBody && withinBody.$bbox != null) {
|
|
24
|
+
return makeGeoFilterBbox(withinBody.$bbox, "$within", propertyIdentifier, field);
|
|
25
|
+
} else if ("$distance" in withinBody && "$of" in withinBody && withinBody.$distance != null && withinBody.$of != null) {
|
|
26
|
+
return {
|
|
27
|
+
type: "withinDistanceOf",
|
|
28
|
+
...(propertyIdentifier != null && {
|
|
29
|
+
propertyIdentifier
|
|
30
|
+
}),
|
|
31
|
+
field,
|
|
32
|
+
value: {
|
|
33
|
+
center: Array.isArray(withinBody.$of) ? {
|
|
34
|
+
type: "Point",
|
|
35
|
+
coordinates: withinBody.$of
|
|
36
|
+
} : withinBody.$of,
|
|
37
|
+
distance: {
|
|
38
|
+
value: withinBody.$distance[0],
|
|
39
|
+
unit: DistanceUnitMapping[withinBody.$distance[1]]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
} else {
|
|
44
|
+
const coordinates = "$polygon" in withinBody ? withinBody.$polygon : withinBody.coordinates;
|
|
45
|
+
return makeGeoFilterPolygon(coordinates, "withinPolygon", propertyIdentifier, field);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=makeGeoFilterWithin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeGeoFilterWithin.js","names":["DistanceUnitMapping","makeGeoFilterBbox","makeGeoFilterPolygon","makeGeoFilterWithin","withinBody","propertyIdentifier","field","Array","isArray","$bbox","$distance","$of","type","value","center","coordinates","distance","unit","$polygon"],"sources":["makeGeoFilterWithin.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { GeoFilterOptions } from \"@osdk/api\";\nimport { DistanceUnitMapping } from \"@osdk/api\";\nimport type {\n PropertyIdentifier,\n SearchJsonQueryV2,\n} from \"@osdk/foundry.ontologies\";\nimport { makeGeoFilterBbox } from \"./makeGeoFilterBbox.js\";\nimport { makeGeoFilterPolygon } from \"./makeGeoFilterPolygon.js\";\n\nexport function makeGeoFilterWithin(\n withinBody: GeoFilterOptions[\"$within\"],\n propertyIdentifier?: PropertyIdentifier,\n field?: string,\n): SearchJsonQueryV2 {\n if (Array.isArray(withinBody)) {\n return makeGeoFilterBbox(withinBody, \"$within\", propertyIdentifier, field);\n } else if (\"$bbox\" in withinBody && withinBody.$bbox != null) {\n return makeGeoFilterBbox(\n withinBody.$bbox,\n \"$within\",\n propertyIdentifier,\n field,\n );\n } else if (\n (\"$distance\" in withinBody && \"$of\" in withinBody)\n && withinBody.$distance != null\n && withinBody.$of != null\n ) {\n return {\n type: \"withinDistanceOf\",\n ...(propertyIdentifier != null && { propertyIdentifier }),\n field,\n value: {\n center: Array.isArray(withinBody.$of)\n ? {\n type: \"Point\",\n coordinates: withinBody.$of,\n }\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)\n ? withinBody.$polygon\n : withinBody.coordinates;\n return makeGeoFilterPolygon(\n coordinates,\n \"withinPolygon\",\n propertyIdentifier,\n field,\n );\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mBAAmB,QAAQ,WAAW;AAK/C,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,OAAO,SAASC,mBAAmBA,CACjCC,UAAuC,EACvCC,kBAAuC,EACvCC,KAAc,EACK;EACnB,IAAIC,KAAK,CAACC,OAAO,CAACJ,UAAU,CAAC,EAAE;IAC7B,OAAOH,iBAAiB,CAACG,UAAU,EAAE,SAAS,EAAEC,kBAAkB,EAAEC,KAAK,CAAC;EAC5E,CAAC,MAAM,IAAI,OAAO,IAAIF,UAAU,IAAIA,UAAU,CAACK,KAAK,IAAI,IAAI,EAAE;IAC5D,OAAOR,iBAAiB,CACtBG,UAAU,CAACK,KAAK,EAChB,SAAS,EACTJ,kBAAkB,EAClBC,KACF,CAAC;EACH,CAAC,MAAM,IACJ,WAAW,IAAIF,UAAU,IAAI,KAAK,IAAIA,UAAU,IAC9CA,UAAU,CAACM,SAAS,IAAI,IAAI,IAC5BN,UAAU,CAACO,GAAG,IAAI,IAAI,EACzB;IACA,OAAO;MACLC,IAAI,EAAE,kBAAkB;MACxB,IAAIP,kBAAkB,IAAI,IAAI,IAAI;QAAEA;MAAmB,CAAC,CAAC;MACzDC,KAAK;MACLO,KAAK,EAAE;QACLC,MAAM,EAAEP,KAAK,CAACC,OAAO,CAACJ,UAAU,CAACO,GAAG,CAAC,GACjC;UACAC,IAAI,EAAE,OAAO;UACbG,WAAW,EAAEX,UAAU,CAACO;QAC1B,CAAC,GACCP,UAAU,CAACO,GAAG;QAClBK,QAAQ,EAAE;UACRH,KAAK,EAAET,UAAU,CAACM,SAAS,CAAC,CAAC,CAAC;UAC9BO,IAAI,EAAEjB,mBAAmB,CAACI,UAAU,CAACM,SAAS,CAAC,CAAC,CAAC;QACnD;MACF;IACF,CAAC;EACH,CAAC,MAAM;IACL,MAAMK,WAAW,GAAI,UAAU,IAAIX,UAAU,GACzCA,UAAU,CAACc,QAAQ,GACnBd,UAAU,CAACW,WAAW;IAC1B,OAAOb,oBAAoB,CACzBa,WAAW,EACX,eAAe,EACfV,kBAAkB,EAClBC,KACF,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -14,86 +14,69 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { DistanceUnitMapping } from "@osdk/api";
|
|
18
17
|
import invariant from "tiny-invariant";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
import { fullyQualifyPropName } from "./fullyQualifyPropName.js";
|
|
19
|
+
import { makeGeoFilterIntersects } from "./makeGeoFilterIntersects.js";
|
|
20
|
+
import { makeGeoFilterWithin } from "./makeGeoFilterWithin.js";
|
|
21
|
+
function isAndClause(whereClause) {
|
|
22
|
+
return "$and" in whereClause && whereClause.$and !== undefined;
|
|
23
|
+
}
|
|
24
|
+
function isOrClause(whereClause) {
|
|
25
|
+
return "$or" in whereClause && whereClause.$or !== undefined;
|
|
26
|
+
}
|
|
27
|
+
function isNotClause(whereClause) {
|
|
28
|
+
return "$not" in whereClause && whereClause.$not !== undefined;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export function modernToLegacyWhereClause(whereClause, objectOrInterface, rdpNames) {
|
|
33
|
+
const parts = Object.entries(whereClause).map(([key, value]) => ({
|
|
34
|
+
[key]: value
|
|
35
|
+
}));
|
|
36
|
+
if (parts.length === 1) {
|
|
37
|
+
return modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames);
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
type: "and",
|
|
41
|
+
value: parts.map(v => modernToLegacyWhereClauseInner(v, objectOrInterface, rdpNames))
|
|
42
|
+
};
|
|
23
43
|
}
|
|
24
44
|
|
|
25
45
|
/** @internal */
|
|
26
|
-
export function
|
|
27
|
-
|
|
46
|
+
export function modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames) {
|
|
47
|
+
const parts = Object.entries(whereClause);
|
|
48
|
+
!(parts.length === 1) ? process.env.NODE_ENV !== "production" ? invariant(false, "Invalid where clause provided.") : invariant(false) : void 0;
|
|
49
|
+
if (isAndClause(whereClause)) {
|
|
28
50
|
return {
|
|
29
51
|
type: "and",
|
|
30
|
-
value: whereClause.$and.map(clause => modernToLegacyWhereClause(clause, objectOrInterface))
|
|
52
|
+
value: whereClause.$and.map(clause => modernToLegacyWhereClause(clause, objectOrInterface, rdpNames))
|
|
31
53
|
};
|
|
32
|
-
} else if (
|
|
54
|
+
} else if (isOrClause(whereClause)) {
|
|
33
55
|
return {
|
|
34
56
|
type: "or",
|
|
35
|
-
value: whereClause.$or.map(clause => modernToLegacyWhereClause(clause, objectOrInterface))
|
|
57
|
+
value: whereClause.$or.map(clause => modernToLegacyWhereClause(clause, objectOrInterface, rdpNames))
|
|
36
58
|
};
|
|
37
|
-
} else if (
|
|
59
|
+
} else if (isNotClause(whereClause)) {
|
|
38
60
|
return {
|
|
39
61
|
type: "not",
|
|
40
|
-
value: modernToLegacyWhereClause(whereClause.$not, objectOrInterface)
|
|
62
|
+
value: modernToLegacyWhereClause(whereClause.$not, objectOrInterface, rdpNames)
|
|
41
63
|
};
|
|
42
64
|
}
|
|
43
|
-
|
|
44
|
-
if (parts.length === 1) {
|
|
45
|
-
return handleWherePair(parts[0], objectOrInterface);
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
type: "and",
|
|
49
|
-
value: parts.map(v => handleWherePair(v, objectOrInterface))
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function makeGeoFilterBbox(bbox, filterType, propertyIdentifier, field) {
|
|
53
|
-
return {
|
|
54
|
-
type: filterType === "$within" ? "withinBoundingBox" : "intersectsBoundingBox",
|
|
55
|
-
/**
|
|
56
|
-
* This is a bit ugly, but did this so that propertyIdentifier only shows up in the return object if its defined,
|
|
57
|
-
* 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.
|
|
58
|
-
* Once we solidify that this is the way forward, I can remove field and clean this up
|
|
59
|
-
*/
|
|
60
|
-
...(propertyIdentifier != null && {
|
|
61
|
-
propertyIdentifier
|
|
62
|
-
}),
|
|
63
|
-
field,
|
|
64
|
-
value: {
|
|
65
|
-
topLeft: {
|
|
66
|
-
type: "Point",
|
|
67
|
-
coordinates: [bbox[0], bbox[3]]
|
|
68
|
-
},
|
|
69
|
-
bottomRight: {
|
|
70
|
-
type: "Point",
|
|
71
|
-
coordinates: [bbox[2], bbox[1]]
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function makeGeoFilterPolygon(coordinates, filterType, propertyIdentifier, field) {
|
|
77
|
-
return {
|
|
78
|
-
type: filterType,
|
|
79
|
-
...(propertyIdentifier != null && {
|
|
80
|
-
propertyIdentifier
|
|
81
|
-
}),
|
|
82
|
-
field,
|
|
83
|
-
value: {
|
|
84
|
-
type: "Polygon",
|
|
85
|
-
coordinates
|
|
86
|
-
}
|
|
87
|
-
};
|
|
65
|
+
return handleWherePair(parts[0], objectOrInterface, undefined, rdpNames);
|
|
88
66
|
}
|
|
89
|
-
function handleWherePair([fieldName, filter], objectOrInterface, structFieldSelector) {
|
|
67
|
+
function handleWherePair([fieldName, filter], objectOrInterface, structFieldSelector, rdpNames) {
|
|
90
68
|
!(filter != null) ? process.env.NODE_ENV !== "production" ? invariant(false, "Defined key values are only allowed when they are not undefined.") : invariant(false) : void 0;
|
|
91
|
-
const
|
|
69
|
+
const isRdp = !structFieldSelector && rdpNames?.has(fieldName);
|
|
70
|
+
const propertyIdentifier = isRdp ? {
|
|
71
|
+
type: "property",
|
|
72
|
+
apiName: fieldName
|
|
73
|
+
} : structFieldSelector != null ? {
|
|
92
74
|
type: "structField",
|
|
93
75
|
...structFieldSelector,
|
|
94
76
|
propertyApiName: fullyQualifyPropName(structFieldSelector.propertyApiName, objectOrInterface)
|
|
95
77
|
} : undefined;
|
|
96
|
-
const field = structFieldSelector == null ? fullyQualifyPropName(fieldName, objectOrInterface) : undefined;
|
|
78
|
+
const field = !isRdp && structFieldSelector == null ? fullyQualifyPropName(fieldName, objectOrInterface) : undefined;
|
|
79
|
+
!(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;
|
|
97
80
|
if (typeof filter === "string" || typeof filter === "number" || typeof filter === "boolean") {
|
|
98
81
|
return {
|
|
99
82
|
type: "eq",
|
|
@@ -110,6 +93,8 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
|
|
|
110
93
|
// e.g. `where({ name: { $eq: "foo", $ne: "bar" } })` is invalid currently
|
|
111
94
|
const hasDollarSign = keysOfFilter.some(key => key.startsWith("$"));
|
|
112
95
|
!(!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;
|
|
96
|
+
|
|
97
|
+
// Struct
|
|
113
98
|
if (!hasDollarSign) {
|
|
114
99
|
const structFilter = Object.entries(filter);
|
|
115
100
|
!(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;
|
|
@@ -117,10 +102,21 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
|
|
|
117
102
|
return handleWherePair(Object.entries(filter)[0], objectOrInterface, {
|
|
118
103
|
propertyApiName: fieldName,
|
|
119
104
|
structFieldApiName
|
|
120
|
-
});
|
|
105
|
+
}, rdpNames);
|
|
121
106
|
}
|
|
122
107
|
const firstKey = keysOfFilter[0];
|
|
123
108
|
!(filter[firstKey] != null) ? process.env.NODE_ENV !== "production" ? invariant(false) : invariant(false) : void 0;
|
|
109
|
+
|
|
110
|
+
// Struct array
|
|
111
|
+
if (firstKey === "$contains" && filter[firstKey] instanceof Object) {
|
|
112
|
+
const structFilter = Object.entries(filter[firstKey]);
|
|
113
|
+
!(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;
|
|
114
|
+
const structFieldApiName = structFilter[0][0];
|
|
115
|
+
return handleWherePair(structFilter[0], objectOrInterface, {
|
|
116
|
+
propertyApiName: fieldName,
|
|
117
|
+
structFieldApiName
|
|
118
|
+
});
|
|
119
|
+
}
|
|
124
120
|
if (firstKey === "$ne") {
|
|
125
121
|
return {
|
|
126
122
|
type: "not",
|
|
@@ -135,44 +131,10 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
|
|
|
135
131
|
};
|
|
136
132
|
}
|
|
137
133
|
if (firstKey === "$within") {
|
|
138
|
-
|
|
139
|
-
if (Array.isArray(withinBody)) {
|
|
140
|
-
return makeGeoFilterBbox(withinBody, firstKey, propertyIdentifier, field);
|
|
141
|
-
} else if ("$bbox" in withinBody && withinBody.$bbox != null) {
|
|
142
|
-
return makeGeoFilterBbox(withinBody.$bbox, firstKey, propertyIdentifier, field);
|
|
143
|
-
} else if ("$distance" in withinBody && "$of" in withinBody && withinBody.$distance != null && withinBody.$of != null) {
|
|
144
|
-
return {
|
|
145
|
-
type: "withinDistanceOf",
|
|
146
|
-
...(propertyIdentifier != null && {
|
|
147
|
-
propertyIdentifier
|
|
148
|
-
}),
|
|
149
|
-
field,
|
|
150
|
-
value: {
|
|
151
|
-
center: Array.isArray(withinBody.$of) ? {
|
|
152
|
-
type: "Point",
|
|
153
|
-
coordinates: withinBody.$of
|
|
154
|
-
} : withinBody.$of,
|
|
155
|
-
distance: {
|
|
156
|
-
value: withinBody.$distance[0],
|
|
157
|
-
unit: DistanceUnitMapping[withinBody.$distance[1]]
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
} else {
|
|
162
|
-
const coordinates = "$polygon" in withinBody ? withinBody.$polygon : withinBody.coordinates;
|
|
163
|
-
return makeGeoFilterPolygon(coordinates, "withinPolygon", propertyIdentifier, fieldName);
|
|
164
|
-
}
|
|
134
|
+
return makeGeoFilterWithin(filter[firstKey], propertyIdentifier, field);
|
|
165
135
|
}
|
|
166
136
|
if (firstKey === "$intersects") {
|
|
167
|
-
|
|
168
|
-
if (Array.isArray(intersectsBody)) {
|
|
169
|
-
return makeGeoFilterBbox(intersectsBody, firstKey, propertyIdentifier, field);
|
|
170
|
-
} else if ("$bbox" in intersectsBody && intersectsBody.$bbox != null) {
|
|
171
|
-
return makeGeoFilterBbox(intersectsBody.$bbox, firstKey, propertyIdentifier, field);
|
|
172
|
-
} else {
|
|
173
|
-
const coordinates = "$polygon" in intersectsBody ? intersectsBody.$polygon : intersectsBody.coordinates;
|
|
174
|
-
return makeGeoFilterPolygon(coordinates, "intersectsPolygon", propertyIdentifier, field);
|
|
175
|
-
}
|
|
137
|
+
return makeGeoFilterIntersects(filter[firstKey], propertyIdentifier, field);
|
|
176
138
|
}
|
|
177
139
|
if (firstKey === "$containsAllTerms" || firstKey === "$containsAnyTerm") {
|
|
178
140
|
return {
|
|
@@ -194,12 +156,4 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
|
|
|
194
156
|
value: filter[firstKey]
|
|
195
157
|
};
|
|
196
158
|
}
|
|
197
|
-
function fullyQualifyPropName(fieldName, objectOrInterface) {
|
|
198
|
-
if (objectOrInterface.type === "interface") {
|
|
199
|
-
const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);
|
|
200
|
-
const [fieldApiNamespace, fieldShortName] = extractNamespace(fieldName);
|
|
201
|
-
return fieldApiNamespace == null && objApiNamespace != null ? `${objApiNamespace}.${fieldShortName}` : fieldName;
|
|
202
|
-
}
|
|
203
|
-
return fieldName;
|
|
204
|
-
}
|
|
205
159
|
//# sourceMappingURL=modernToLegacyWhereClause.js.map
|