@osdk/client 2.0.0-beta.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +284 -0
- package/build/browser/Client.d.ts +39 -0
- package/build/browser/Client.d.ts.map +1 -0
- package/build/browser/Client.js +20 -0
- package/build/browser/Client.js.map +1 -0
- package/build/browser/Definitions.test.d.ts +2 -0
- package/build/browser/Definitions.test.d.ts.map +1 -0
- package/build/browser/Definitions.test.js +35 -0
- package/build/browser/Definitions.test.js.map +1 -0
- package/build/browser/Logger.d.ts +19 -0
- package/build/browser/Logger.d.ts.map +1 -0
- package/build/browser/Logger.js +17 -0
- package/build/browser/Logger.js.map +1 -0
- package/build/browser/MinimalClientContext.d.ts +26 -0
- package/build/browser/MinimalClientContext.d.ts.map +1 -0
- package/build/browser/MinimalClientContext.js +17 -0
- package/build/browser/MinimalClientContext.js.map +1 -0
- package/build/browser/ResultOrError.d.ts +12 -0
- package/build/browser/ResultOrError.d.ts.map +1 -0
- package/build/browser/ResultOrError.js +19 -0
- package/build/browser/ResultOrError.js.map +1 -0
- package/build/browser/SatisfiesSemver.d.ts +4 -0
- package/build/browser/SatisfiesSemver.d.ts.map +1 -0
- package/build/browser/SatisfiesSemver.js +17 -0
- package/build/browser/SatisfiesSemver.js.map +1 -0
- package/build/browser/SatisfiesSemver.test.d.ts +2 -0
- package/build/browser/SatisfiesSemver.test.d.ts.map +1 -0
- package/build/browser/SatisfiesSemver.test.js +69 -0
- package/build/browser/SatisfiesSemver.test.js.map +1 -0
- package/build/browser/__unstable/ConjureSupport.d.ts +55 -0
- package/build/browser/__unstable/ConjureSupport.d.ts.map +1 -0
- package/build/browser/__unstable/ConjureSupport.js +174 -0
- package/build/browser/__unstable/ConjureSupport.js.map +1 -0
- package/build/browser/__unstable/createBulkLinksAsyncIterFactory.d.ts +10 -0
- package/build/browser/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +1 -0
- package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js +114 -0
- package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -0
- package/build/browser/actions/ActionValidationError.d.ts +6 -0
- package/build/browser/actions/ActionValidationError.d.ts.map +1 -0
- package/build/browser/actions/ActionValidationError.js +23 -0
- package/build/browser/actions/ActionValidationError.js.map +1 -0
- package/build/browser/actions/actions.test.d.ts +2 -0
- package/build/browser/actions/actions.test.d.ts.map +1 -0
- package/build/browser/actions/actions.test.js +323 -0
- package/build/browser/actions/actions.test.js.map +1 -0
- package/build/browser/actions/applyAction.d.ts +30 -0
- package/build/browser/actions/applyAction.d.ts.map +1 -0
- package/build/browser/actions/applyAction.js +114 -0
- package/build/browser/actions/applyAction.js.map +1 -0
- package/build/browser/createAttachmentFromRid.d.ts +10 -0
- package/build/browser/createAttachmentFromRid.d.ts.map +1 -0
- package/build/browser/createAttachmentFromRid.js +38 -0
- package/build/browser/createAttachmentFromRid.js.map +1 -0
- package/build/browser/createClient.d.ts +6 -0
- package/build/browser/createClient.d.ts.map +1 -0
- package/build/browser/createClient.js +88 -0
- package/build/browser/createClient.js.map +1 -0
- package/build/browser/createClient.test.d.ts +2 -0
- package/build/browser/createClient.test.d.ts.map +1 -0
- package/build/browser/createClient.test.js +45 -0
- package/build/browser/createClient.test.js.map +1 -0
- package/build/browser/createMinimalClient.d.ts +2 -0
- package/build/browser/createMinimalClient.d.ts.map +1 -0
- package/build/browser/createMinimalClient.js +42 -0
- package/build/browser/createMinimalClient.js.map +1 -0
- package/build/browser/createPlatformClient.d.ts +17 -0
- package/build/browser/createPlatformClient.d.ts.map +1 -0
- package/build/browser/createPlatformClient.js +33 -0
- package/build/browser/createPlatformClient.js.map +1 -0
- package/build/browser/createTimeseriesProperty.d.ts +14 -0
- package/build/browser/createTimeseriesProperty.d.ts.map +1 -0
- package/build/browser/createTimeseriesProperty.js +79 -0
- package/build/browser/createTimeseriesProperty.js.map +1 -0
- package/build/browser/definitions/LinkDefinitions.test.d.ts +2 -0
- package/build/browser/definitions/LinkDefinitions.test.d.ts.map +1 -0
- package/build/browser/definitions/LinkDefinitions.test.js +41 -0
- package/build/browser/definitions/LinkDefinitions.test.js.map +1 -0
- package/build/browser/fetchMetadata.d.ts +2 -0
- package/build/browser/fetchMetadata.d.ts.map +1 -0
- package/build/browser/fetchMetadata.js +35 -0
- package/build/browser/fetchMetadata.js.map +1 -0
- package/build/browser/fetchMetadata.test.d.ts +2 -0
- package/build/browser/fetchMetadata.test.d.ts.map +1 -0
- package/build/browser/fetchMetadata.test.js +218 -0
- package/build/browser/fetchMetadata.test.js.map +1 -0
- package/build/browser/index.d.ts +13 -0
- package/build/browser/index.d.ts.map +1 -0
- package/build/browser/index.js +22 -12
- package/build/browser/index.js.map +1 -1
- package/build/browser/intellisense.test.d.ts +2 -0
- package/build/browser/intellisense.test.d.ts.map +1 -0
- package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +2 -0
- package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +1 -0
- package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js +25 -0
- package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -0
- package/build/browser/intellisense.test.js +86 -0
- package/build/browser/intellisense.test.js.map +1 -0
- package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts +2 -0
- package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +1 -0
- package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js +34 -0
- package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -0
- package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts +2 -0
- package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts.map +1 -0
- package/build/browser/internal/conversions/modernToLegacyAggregationClause.js +38 -0
- package/build/browser/internal/conversions/modernToLegacyAggregationClause.js.map +1 -0
- package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts +2 -0
- package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts.map +1 -0
- package/build/browser/internal/conversions/modernToLegacyGroupByClause.js +62 -0
- package/build/browser/internal/conversions/modernToLegacyGroupByClause.js.map +1 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.d.ts +2 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.d.ts.map +1 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js +144 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts +2 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +1 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +486 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -0
- package/build/browser/object/AttachmentUpload.d.ts +4 -0
- package/build/browser/object/AttachmentUpload.d.ts.map +1 -0
- package/build/browser/object/AttachmentUpload.js +27 -0
- package/build/browser/object/AttachmentUpload.js.map +1 -0
- package/build/browser/object/Cache.d.ts +2 -0
- package/build/browser/object/Cache.d.ts.map +1 -0
- package/build/browser/object/Cache.js +76 -0
- package/build/browser/object/Cache.js.map +1 -0
- package/build/browser/object/Cache.test.d.ts +11 -0
- package/build/browser/object/Cache.test.d.ts.map +1 -0
- package/build/browser/object/Cache.test.js +283 -0
- package/build/browser/object/Cache.test.js.map +1 -0
- package/build/browser/object/SimpleCache.d.ts +38 -0
- package/build/browser/object/SimpleCache.d.ts.map +1 -0
- package/build/browser/object/SimpleCache.js +67 -0
- package/build/browser/object/SimpleCache.js.map +1 -0
- package/build/browser/object/aggregate.d.ts +2 -0
- package/build/browser/object/aggregate.d.ts.map +1 -0
- package/build/browser/object/aggregate.js +69 -0
- package/build/browser/object/aggregate.js.map +1 -0
- package/build/browser/object/aggregate.test.d.ts +2 -0
- package/build/browser/object/aggregate.test.d.ts.map +1 -0
- package/build/browser/object/aggregate.test.js +398 -0
- package/build/browser/object/aggregate.test.js.map +1 -0
- package/build/browser/object/attachment.test.d.ts +2 -0
- package/build/browser/object/attachment.test.d.ts.map +1 -0
- package/build/browser/object/attachment.test.js +55 -0
- package/build/browser/object/attachment.test.js.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +11 -0
- package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js +17 -0
- package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts +13 -0
- package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js +22 -0
- package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts +2 -0
- package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js +17 -0
- package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +2 -0
- package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +48 -0
- package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +8 -0
- package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +17 -0
- package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +2 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +82 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts +2 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +114 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/getDollarAs.d.ts +3 -0
- package/build/browser/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js +55 -0
- package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts +2 -0
- package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js +60 -0
- package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects.d.ts +2 -0
- package/build/browser/object/convertWireToOsdkObjects.d.ts.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects.js +150 -0
- package/build/browser/object/convertWireToOsdkObjects.js.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects.test.d.ts +2 -0
- package/build/browser/object/convertWireToOsdkObjects.test.d.ts.map +1 -0
- package/build/browser/object/convertWireToOsdkObjects.test.js +254 -0
- package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -0
- package/build/browser/object/fetchPage.d.ts +3 -0
- package/build/browser/object/fetchPage.d.ts.map +1 -0
- package/build/browser/object/fetchPage.js +135 -0
- package/build/browser/object/fetchPage.js.map +1 -0
- package/build/browser/object/fetchPage.test.d.ts +2 -0
- package/build/browser/object/fetchPage.test.d.ts.map +1 -0
- package/build/browser/object/fetchPage.test.js +106 -0
- package/build/browser/object/fetchPage.test.js.map +1 -0
- package/build/browser/object/fetchSingle.d.ts +2 -0
- package/build/browser/object/fetchSingle.d.ts.map +1 -0
- package/build/browser/object/fetchSingle.js +47 -0
- package/build/browser/object/fetchSingle.js.map +1 -0
- package/build/browser/object/object.test.d.ts +12 -0
- package/build/browser/object/object.test.d.ts.map +1 -0
- package/build/browser/object/object.test.js +179 -0
- package/build/browser/object/object.test.js.map +1 -0
- package/build/browser/object/timeseries.test.d.ts +2 -0
- package/build/browser/object/timeseries.test.d.ts.map +1 -0
- package/build/browser/object/timeseries.test.js +163 -0
- package/build/browser/object/timeseries.test.js.map +1 -0
- package/build/browser/objectSet/ObjectSet.test.d.ts +2 -0
- package/build/browser/objectSet/ObjectSet.test.d.ts.map +1 -0
- package/build/browser/objectSet/ObjectSet.test.js +313 -0
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -0
- package/build/browser/objectSet/ObjectSetFactory.d.ts +2 -0
- package/build/browser/objectSet/ObjectSetFactory.d.ts.map +1 -0
- package/build/browser/objectSet/ObjectSetFactory.js +17 -0
- package/build/browser/objectSet/ObjectSetFactory.js.map +1 -0
- package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts +7 -0
- package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts.map +1 -0
- package/build/browser/objectSet/ObjectSetListenerWebsocket.js +533 -0
- package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -0
- package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts +2 -0
- package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +1 -0
- package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +338 -0
- package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -0
- package/build/browser/objectSet/conjureUnionType.d.ts +13 -0
- package/build/browser/objectSet/conjureUnionType.d.ts.map +1 -0
- package/build/browser/objectSet/conjureUnionType.js +27 -0
- package/build/browser/objectSet/conjureUnionType.js.map +1 -0
- package/build/browser/objectSet/createObjectSet.d.ts +2 -0
- package/build/browser/objectSet/createObjectSet.d.ts.map +1 -0
- package/build/browser/objectSet/createObjectSet.js +136 -0
- package/build/browser/objectSet/createObjectSet.js.map +1 -0
- package/build/browser/objectSet/toConjureObjectSet.d.ts +2 -0
- package/build/browser/objectSet/toConjureObjectSet.d.ts.map +1 -0
- package/build/browser/objectSet/toConjureObjectSet.js +158 -0
- package/build/browser/objectSet/toConjureObjectSet.js.map +1 -0
- package/build/browser/ontology/OntologyProvider.d.ts +32 -0
- package/build/browser/ontology/OntologyProvider.d.ts.map +1 -0
- package/build/browser/ontology/OntologyProvider.js +17 -0
- package/build/browser/ontology/OntologyProvider.js.map +1 -0
- package/build/browser/ontology/StandardOntologyProvider.d.ts +5 -0
- package/build/browser/ontology/StandardOntologyProvider.d.ts.map +1 -0
- package/build/browser/ontology/StandardOntologyProvider.js +59 -0
- package/build/browser/ontology/StandardOntologyProvider.js.map +1 -0
- package/build/browser/ontology/StandardOntologyProvider.test.d.ts +2 -0
- package/build/browser/ontology/StandardOntologyProvider.test.d.ts.map +1 -0
- package/build/browser/ontology/StandardOntologyProvider.test.js +48 -0
- package/build/browser/ontology/StandardOntologyProvider.test.js.map +1 -0
- package/build/browser/ontology/loadActionMetadata.d.ts +4 -0
- package/build/browser/ontology/loadActionMetadata.d.ts.map +1 -0
- package/build/browser/ontology/loadActionMetadata.js +22 -0
- package/build/browser/ontology/loadActionMetadata.js.map +1 -0
- package/build/browser/ontology/loadFullObjectMetadata.d.ts +6 -0
- package/build/browser/ontology/loadFullObjectMetadata.d.ts.map +1 -0
- package/build/browser/ontology/loadFullObjectMetadata.js +28 -0
- package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -0
- package/build/browser/ontology/loadInterfaceMetadata.d.ts +4 -0
- package/build/browser/ontology/loadInterfaceMetadata.d.ts.map +1 -0
- package/build/browser/ontology/loadInterfaceMetadata.js +24 -0
- package/build/browser/ontology/loadInterfaceMetadata.js.map +1 -0
- package/build/browser/ontology/loadQueryMetadata.d.ts +4 -0
- package/build/browser/ontology/loadQueryMetadata.d.ts.map +1 -0
- package/build/browser/ontology/loadQueryMetadata.js +22 -0
- package/build/browser/ontology/loadQueryMetadata.js.map +1 -0
- package/build/browser/ontology/makeConjureContext.d.ts +4 -0
- package/build/browser/ontology/makeConjureContext.d.ts.map +1 -0
- package/build/browser/ontology/makeConjureContext.js +28 -0
- package/build/browser/ontology/makeConjureContext.js.map +1 -0
- package/build/browser/pageRequestAsAsyncIter.d.ts +10 -0
- package/build/browser/pageRequestAsAsyncIter.d.ts.map +1 -0
- package/build/browser/pageRequestAsAsyncIter.js +37 -0
- package/build/browser/pageRequestAsAsyncIter.js.map +1 -0
- package/build/browser/public/unstable-do-not-use.d.ts +2 -0
- package/build/browser/public/unstable-do-not-use.d.ts.map +1 -0
- package/build/browser/public/unstable-do-not-use.js +16 -878
- package/build/browser/public/unstable-do-not-use.js.map +1 -1
- package/build/browser/queries/applyQuery.d.ts +6 -0
- package/build/browser/queries/applyQuery.d.ts.map +1 -0
- package/build/browser/queries/applyQuery.js +234 -0
- package/build/browser/queries/applyQuery.js.map +1 -0
- package/build/browser/queries/queries.test.d.ts +2 -0
- package/build/browser/queries/queries.test.d.ts.map +1 -0
- package/build/browser/queries/queries.test.js +171 -0
- package/build/browser/queries/queries.test.js.map +1 -0
- package/build/browser/queries/types.d.ts +20 -0
- package/build/browser/queries/types.d.ts.map +1 -0
- package/build/browser/queries/types.js +17 -0
- package/build/browser/queries/types.js.map +1 -0
- package/build/browser/tsserver.d.ts +34 -0
- package/build/browser/tsserver.d.ts.map +1 -0
- package/build/browser/tsserver.js +133 -0
- package/build/browser/tsserver.js.map +1 -0
- package/build/browser/util/ArrayElement.d.ts +2 -0
- package/build/browser/util/ArrayElement.d.ts.map +1 -0
- package/build/browser/util/ArrayElement.js +17 -0
- package/build/browser/util/ArrayElement.js.map +1 -0
- package/build/browser/util/NOOP.d.ts +4 -0
- package/build/browser/util/NOOP.d.ts.map +1 -0
- package/build/browser/util/NOOP.js +17 -0
- package/build/browser/util/NOOP.js.map +1 -0
- package/build/browser/util/NullableProps.d.ts +6 -0
- package/build/browser/util/NullableProps.d.ts.map +1 -0
- package/build/browser/util/NullableProps.js +17 -0
- package/build/browser/util/NullableProps.js.map +1 -0
- package/build/browser/util/UserAgent.d.ts +2 -0
- package/build/browser/util/UserAgent.d.ts.map +1 -0
- package/build/browser/util/UserAgent.js +17 -0
- package/build/browser/util/UserAgent.js.map +1 -0
- package/build/browser/util/WireObjectSet.d.ts +2 -0
- package/build/browser/util/WireObjectSet.d.ts.map +1 -0
- package/build/browser/util/WireObjectSet.js +21 -0
- package/build/browser/util/WireObjectSet.js.map +1 -0
- package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts +4 -0
- package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts.map +1 -0
- package/build/browser/util/addUserAgentAndRequestContextHeaders.js +27 -0
- package/build/browser/util/addUserAgentAndRequestContextHeaders.js.map +1 -0
- package/build/browser/util/augmentRequestContext.d.ts +32 -0
- package/build/browser/util/augmentRequestContext.d.ts.map +1 -0
- package/build/browser/util/augmentRequestContext.js +52 -0
- package/build/browser/util/augmentRequestContext.js.map +1 -0
- package/build/browser/util/isOntologyObjectV2.d.ts +2 -0
- package/build/browser/util/isOntologyObjectV2.d.ts.map +1 -0
- package/build/browser/util/isOntologyObjectV2.js +20 -0
- package/build/browser/util/isOntologyObjectV2.js.map +1 -0
- package/build/browser/util/isOsdkBaseObject.d.ts +3 -0
- package/build/browser/util/isOsdkBaseObject.d.ts.map +1 -0
- package/build/browser/util/isOsdkBaseObject.js +19 -0
- package/build/browser/util/isOsdkBaseObject.js.map +1 -0
- package/build/browser/util/isOsdkObject.d.ts +3 -0
- package/build/browser/util/isOsdkObject.d.ts.map +1 -0
- package/build/browser/util/isOsdkObject.js +19 -0
- package/build/browser/util/isOsdkObject.js.map +1 -0
- package/build/browser/util/partialBy.d.ts +3 -0
- package/build/browser/util/partialBy.d.ts.map +1 -0
- package/build/browser/util/partialBy.js +17 -0
- package/build/browser/util/partialBy.js.map +1 -0
- package/build/browser/util/streamutils.d.ts +3 -0
- package/build/browser/util/streamutils.d.ts.map +1 -0
- package/build/browser/util/streamutils.js +95 -0
- package/build/browser/util/streamutils.js.map +1 -0
- package/build/browser/util/toDataValue.d.ts +2 -0
- package/build/browser/util/toDataValue.d.ts.map +1 -0
- package/build/browser/util/toDataValue.js +73 -0
- package/build/browser/util/toDataValue.js.map +1 -0
- package/build/browser/util/toDataValue.test.d.ts +2 -0
- package/build/browser/util/toDataValue.test.d.ts.map +1 -0
- package/build/browser/util/toDataValue.test.js +117 -0
- package/build/browser/util/toDataValue.test.js.map +1 -0
- package/build/browser/util/toDataValueQueries.d.ts +2 -0
- package/build/browser/util/toDataValueQueries.d.ts.map +1 -0
- package/build/browser/util/toDataValueQueries.js +107 -0
- package/build/browser/util/toDataValueQueries.js.map +1 -0
- package/build/esm/Client.d.ts +24 -4
- package/build/esm/Client.d.ts.map +1 -1
- package/build/esm/Client.js +20 -0
- package/build/esm/Client.js.map +1 -0
- package/build/esm/Definitions.test.js +35 -0
- package/build/esm/Definitions.test.js.map +1 -0
- package/build/esm/Logger.d.ts +19 -0
- package/build/esm/Logger.d.ts.map +1 -0
- package/build/esm/Logger.js +17 -0
- package/build/esm/Logger.js.map +1 -0
- package/build/esm/MinimalClientContext.d.ts +1 -1
- package/build/esm/MinimalClientContext.d.ts.map +1 -1
- package/build/esm/MinimalClientContext.js +17 -0
- package/build/esm/MinimalClientContext.js.map +1 -0
- package/build/esm/ResultOrError.js +19 -0
- package/build/esm/ResultOrError.js.map +1 -0
- package/build/esm/SatisfiesSemver.js +17 -0
- package/build/esm/SatisfiesSemver.js.map +1 -0
- package/build/esm/SatisfiesSemver.test.js +69 -0
- package/build/esm/SatisfiesSemver.test.js.map +1 -0
- package/build/esm/__unstable/ConjureSupport.js +174 -0
- package/build/esm/__unstable/ConjureSupport.js.map +1 -0
- package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts +1 -1
- package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +1 -1
- package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js +114 -0
- package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -0
- package/build/esm/actions/ActionValidationError.d.ts +1 -1
- package/build/esm/actions/ActionValidationError.d.ts.map +1 -1
- package/build/esm/actions/ActionValidationError.js +23 -0
- package/build/esm/actions/ActionValidationError.js.map +1 -0
- package/build/esm/actions/actions.test.js +323 -0
- package/build/esm/actions/actions.test.js.map +1 -0
- package/build/esm/actions/applyAction.d.ts +17 -11
- package/build/esm/actions/applyAction.d.ts.map +1 -1
- package/build/esm/actions/applyAction.js +114 -0
- package/build/esm/actions/applyAction.js.map +1 -0
- package/build/esm/createAttachmentFromRid.d.ts +1 -1
- package/build/esm/createAttachmentFromRid.d.ts.map +1 -1
- package/build/esm/createAttachmentFromRid.js +38 -0
- package/build/esm/createAttachmentFromRid.js.map +1 -0
- package/build/esm/createClient.d.ts +1 -1
- package/build/esm/createClient.d.ts.map +1 -1
- package/build/esm/createClient.js +88 -0
- package/build/esm/createClient.js.map +1 -0
- package/build/esm/createClient.test.js +45 -0
- package/build/esm/createClient.test.js.map +1 -0
- package/build/esm/createMinimalClient.js +42 -0
- package/build/esm/createMinimalClient.js.map +1 -0
- package/build/esm/createPlatformClient.js +33 -0
- package/build/esm/createPlatformClient.js.map +1 -0
- package/build/esm/createTimeseriesProperty.d.ts +12 -2
- package/build/esm/createTimeseriesProperty.d.ts.map +1 -1
- package/build/esm/createTimeseriesProperty.js +79 -0
- package/build/esm/createTimeseriesProperty.js.map +1 -0
- package/build/esm/definitions/LinkDefinitions.test.js +41 -0
- package/build/esm/definitions/LinkDefinitions.test.js.map +1 -0
- package/build/esm/fetchMetadata.d.ts +2 -0
- package/build/esm/fetchMetadata.d.ts.map +1 -0
- package/build/esm/fetchMetadata.js +35 -0
- package/build/esm/fetchMetadata.js.map +1 -0
- package/build/esm/fetchMetadata.test.d.ts +2 -0
- package/build/esm/fetchMetadata.test.d.ts.map +1 -0
- package/build/esm/fetchMetadata.test.js +218 -0
- package/build/esm/fetchMetadata.test.js.map +1 -0
- package/build/esm/index.d.ts +3 -2
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +22 -12
- package/build/esm/index.js.map +1 -1
- package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js +25 -0
- package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -0
- package/build/esm/intellisense.test.js +86 -0
- package/build/esm/intellisense.test.js.map +1 -0
- package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js +34 -0
- package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -0
- package/build/esm/internal/conversions/modernToLegacyAggregationClause.js +38 -0
- package/build/esm/internal/conversions/modernToLegacyAggregationClause.js.map +1 -0
- package/build/esm/internal/conversions/modernToLegacyGroupByClause.js +62 -0
- package/build/esm/internal/conversions/modernToLegacyGroupByClause.js.map +1 -0
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js +144 -0
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -0
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +486 -0
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -0
- package/build/esm/object/AttachmentUpload.d.ts +1 -1
- package/build/esm/object/AttachmentUpload.d.ts.map +1 -1
- package/build/esm/object/AttachmentUpload.js +27 -0
- package/build/esm/object/AttachmentUpload.js.map +1 -0
- package/build/esm/object/Cache.js +76 -0
- package/build/esm/object/Cache.js.map +1 -0
- package/build/esm/object/Cache.test.js +283 -0
- package/build/esm/object/Cache.test.js.map +1 -0
- package/build/esm/object/SimpleCache.js +67 -0
- package/build/esm/object/SimpleCache.js.map +1 -0
- package/build/esm/object/aggregate.js +69 -0
- package/build/esm/object/aggregate.js.map +1 -0
- package/build/esm/object/aggregate.test.js +398 -0
- package/build/esm/object/aggregate.test.js.map +1 -0
- package/build/esm/object/attachment.test.js +55 -0
- package/build/esm/object/attachment.test.js.map +1 -0
- package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +4 -5
- package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js +17 -0
- package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -0
- package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts +2 -3
- package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js +22 -0
- package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -0
- package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js +17 -0
- package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -0
- package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +48 -0
- package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -0
- package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +17 -0
- package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -0
- package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +82 -0
- package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -0
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +114 -0
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -0
- package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts +1 -1
- package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js +55 -0
- package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -0
- package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js +60 -0
- package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -0
- package/build/esm/object/convertWireToOsdkObjects.js +150 -0
- package/build/esm/object/convertWireToOsdkObjects.js.map +1 -0
- package/build/esm/object/convertWireToOsdkObjects.test.js +254 -0
- package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -0
- package/build/esm/object/fetchPage.d.ts +2 -3
- package/build/esm/object/fetchPage.d.ts.map +1 -1
- package/build/esm/object/fetchPage.js +135 -0
- package/build/esm/object/fetchPage.js.map +1 -0
- package/build/esm/object/fetchPage.test.js +106 -0
- package/build/esm/object/fetchPage.test.js.map +1 -0
- package/build/esm/object/fetchSingle.js +47 -0
- package/build/esm/object/fetchSingle.js.map +1 -0
- package/build/esm/object/object.test.d.ts +4 -5
- package/build/esm/object/object.test.d.ts.map +1 -1
- package/build/esm/object/object.test.js +179 -0
- package/build/esm/object/object.test.js.map +1 -0
- package/build/esm/object/timeseries.test.js +163 -0
- package/build/esm/object/timeseries.test.js.map +1 -0
- package/build/esm/objectSet/ObjectSet.test.js +313 -0
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -0
- package/build/esm/objectSet/ObjectSetFactory.js +17 -0
- package/build/esm/objectSet/ObjectSetFactory.js.map +1 -0
- package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts.map +1 -1
- package/build/esm/objectSet/ObjectSetListenerWebsocket.js +536 -0
- package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -0
- package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +338 -0
- package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -0
- package/build/esm/objectSet/conjureUnionType.js +27 -0
- package/build/esm/objectSet/conjureUnionType.js.map +1 -0
- package/build/esm/objectSet/createObjectSet.js +136 -0
- package/build/esm/objectSet/createObjectSet.js.map +1 -0
- package/build/esm/objectSet/toConjureObjectSet.js +158 -0
- package/build/esm/objectSet/toConjureObjectSet.js.map +1 -0
- package/build/esm/ontology/OntologyProvider.d.ts +7 -13
- package/build/esm/ontology/OntologyProvider.d.ts.map +1 -1
- package/build/esm/ontology/OntologyProvider.js +17 -0
- package/build/esm/ontology/OntologyProvider.js.map +1 -0
- package/build/esm/ontology/StandardOntologyProvider.d.ts.map +1 -1
- package/build/esm/ontology/StandardOntologyProvider.js +59 -0
- package/build/esm/ontology/StandardOntologyProvider.js.map +1 -0
- package/build/esm/ontology/StandardOntologyProvider.test.js +48 -0
- package/build/esm/ontology/StandardOntologyProvider.test.js.map +1 -0
- package/build/esm/ontology/loadActionMetadata.d.ts +4 -0
- package/build/esm/ontology/loadActionMetadata.d.ts.map +1 -0
- package/build/esm/ontology/loadActionMetadata.js +22 -0
- package/build/esm/ontology/loadActionMetadata.js.map +1 -0
- package/build/esm/ontology/loadFullObjectMetadata.d.ts +2 -2
- package/build/esm/ontology/loadFullObjectMetadata.d.ts.map +1 -1
- package/build/esm/ontology/loadFullObjectMetadata.js +28 -0
- package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -0
- package/build/esm/ontology/loadInterfaceMetadata.d.ts +4 -0
- package/build/esm/ontology/loadInterfaceMetadata.d.ts.map +1 -0
- package/build/esm/ontology/loadInterfaceMetadata.js +24 -0
- package/build/esm/ontology/loadInterfaceMetadata.js.map +1 -0
- package/build/esm/ontology/loadQueryMetadata.d.ts +4 -0
- package/build/esm/ontology/loadQueryMetadata.d.ts.map +1 -0
- package/build/esm/ontology/loadQueryMetadata.js +22 -0
- package/build/esm/ontology/loadQueryMetadata.js.map +1 -0
- package/build/esm/ontology/makeConjureContext.js +28 -0
- package/build/esm/ontology/makeConjureContext.js.map +1 -0
- package/build/esm/pageRequestAsAsyncIter.js +37 -0
- package/build/esm/pageRequestAsAsyncIter.js.map +1 -0
- package/build/esm/public/unstable-do-not-use.d.ts +0 -4
- package/build/esm/public/unstable-do-not-use.d.ts.map +1 -1
- package/build/esm/public/unstable-do-not-use.js +16 -881
- package/build/esm/public/unstable-do-not-use.js.map +1 -1
- package/build/esm/queries/applyQuery.d.ts +3 -4
- package/build/esm/queries/applyQuery.d.ts.map +1 -1
- package/build/esm/queries/applyQuery.js +234 -0
- package/build/esm/queries/applyQuery.js.map +1 -0
- package/build/esm/queries/queries.test.js +171 -0
- package/build/esm/queries/queries.test.js.map +1 -0
- package/build/esm/queries/types.d.ts +10 -11
- package/build/esm/queries/types.d.ts.map +1 -1
- package/build/esm/queries/types.js +17 -0
- package/build/esm/queries/types.js.map +1 -0
- package/build/esm/tsserver.d.ts +1 -1
- package/build/esm/tsserver.d.ts.map +1 -1
- package/build/esm/tsserver.js +133 -0
- package/build/esm/tsserver.js.map +1 -0
- package/build/esm/util/ArrayElement.js +17 -0
- package/build/esm/util/ArrayElement.js.map +1 -0
- package/build/esm/util/NOOP.js +17 -0
- package/build/esm/util/NOOP.js.map +1 -0
- package/build/esm/util/NullableProps.js +17 -0
- package/build/esm/util/NullableProps.js.map +1 -0
- package/build/esm/util/UserAgent.js +17 -0
- package/build/esm/util/UserAgent.js.map +1 -0
- package/build/esm/util/WireObjectSet.js +21 -0
- package/build/esm/util/WireObjectSet.js.map +1 -0
- package/build/esm/util/addUserAgentAndRequestContextHeaders.js +27 -0
- package/build/esm/util/addUserAgentAndRequestContextHeaders.js.map +1 -0
- package/build/esm/util/augmentRequestContext.js +52 -0
- package/build/esm/util/augmentRequestContext.js.map +1 -0
- package/build/esm/util/isOntologyObjectV2.js +20 -0
- package/build/esm/util/isOntologyObjectV2.js.map +1 -0
- package/build/esm/util/isOsdkBaseObject.d.ts +1 -1
- package/build/esm/util/isOsdkBaseObject.d.ts.map +1 -1
- package/build/esm/util/isOsdkBaseObject.js +19 -0
- package/build/esm/util/isOsdkBaseObject.js.map +1 -0
- package/build/esm/util/isOsdkObject.d.ts +1 -1
- package/build/esm/util/isOsdkObject.d.ts.map +1 -1
- package/build/esm/util/isOsdkObject.js +19 -0
- package/build/esm/util/isOsdkObject.js.map +1 -0
- package/build/esm/util/partialBy.js +17 -0
- package/build/esm/util/partialBy.js.map +1 -0
- package/build/esm/util/streamutils.js +95 -0
- package/build/esm/util/streamutils.js.map +1 -0
- package/build/esm/util/toDataValue.js +73 -0
- package/build/esm/util/toDataValue.js.map +1 -0
- package/build/esm/util/toDataValue.test.js +117 -0
- package/build/esm/util/toDataValue.test.js.map +1 -0
- package/build/esm/util/toDataValueQueries.js +107 -0
- package/build/esm/util/toDataValueQueries.js.map +1 -0
- package/package.json +15 -27
- package/build/browser/chunk-5HUCUBJX.js +0 -2327
- package/build/browser/chunk-5HUCUBJX.js.map +0 -1
- package/build/esm/__unstable/UNSTABLE_createClient.d.ts +0 -4
- package/build/esm/__unstable/UNSTABLE_createClient.d.ts.map +0 -1
- package/build/esm/__unstable/UnstableClient.d.ts +0 -12
- package/build/esm/__unstable/UnstableClient.d.ts.map +0 -1
- package/build/esm/chunk-5HUCUBJX.js +0 -2327
- package/build/esm/chunk-5HUCUBJX.js.map +0 -1
- package/build/esm/objectSet/ObjectSetListener.d.ts +0 -18
- package/build/esm/objectSet/ObjectSetListener.d.ts.map +0 -1
- package/build/esm/objectSet/createUnstableObjectSet.d.ts +0 -8
- package/build/esm/objectSet/createUnstableObjectSet.d.ts.map +0 -1
- package/build/esm/ontology/loadInterfaceDefinition.d.ts +0 -4
- package/build/esm/ontology/loadInterfaceDefinition.d.ts.map +0 -1
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { $Actions, $Interfaces, $Objects, $ontologyRid, $Queries } from "@osdk/client.test.ontology";
|
|
17
|
+
import { apiServer } from "@osdk/shared.test";
|
|
18
|
+
import { afterAll, beforeAll, describe, expect, expectTypeOf, it } from "vitest";
|
|
19
|
+
import { createClient } from "./createClient.js";
|
|
20
|
+
describe("FetchMetadata", () => {
|
|
21
|
+
let client;
|
|
22
|
+
beforeAll(async () => {
|
|
23
|
+
apiServer.listen();
|
|
24
|
+
client = createClient("https://stack.palantir.com", $ontologyRid, async () => "myAccessToken");
|
|
25
|
+
});
|
|
26
|
+
afterAll(() => {
|
|
27
|
+
apiServer.close();
|
|
28
|
+
});
|
|
29
|
+
it("fetches object metadata correctly", async () => {
|
|
30
|
+
const objectMetadata = await client.fetchMetadata($Objects.Employee);
|
|
31
|
+
expectTypeOf(objectMetadata).toEqualTypeOf();
|
|
32
|
+
expect(objectMetadata).toMatchInlineSnapshot(`
|
|
33
|
+
{
|
|
34
|
+
"apiName": "Employee",
|
|
35
|
+
"description": "A full-time or part-time
|
|
36
|
+
|
|
37
|
+
employee of our firm",
|
|
38
|
+
"displayName": "Employee",
|
|
39
|
+
"icon": {
|
|
40
|
+
"color": "blue",
|
|
41
|
+
"name": "person",
|
|
42
|
+
"type": "blueprint",
|
|
43
|
+
},
|
|
44
|
+
"implements": [
|
|
45
|
+
"FooInterface",
|
|
46
|
+
],
|
|
47
|
+
"interfaceMap": {
|
|
48
|
+
"FooInterface": {
|
|
49
|
+
"fooSpt": "fullName",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
"inverseInterfaceMap": {
|
|
53
|
+
"FooInterface": {
|
|
54
|
+
"fullName": "fooSpt",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
"links": {
|
|
58
|
+
"lead": {
|
|
59
|
+
"multiplicity": false,
|
|
60
|
+
"targetType": "Employee",
|
|
61
|
+
},
|
|
62
|
+
"officeLink": {
|
|
63
|
+
"multiplicity": false,
|
|
64
|
+
"targetType": "Office",
|
|
65
|
+
},
|
|
66
|
+
"peeps": {
|
|
67
|
+
"multiplicity": true,
|
|
68
|
+
"targetType": "Employee",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
"pluralDisplayName": "Employees",
|
|
72
|
+
"primaryKeyApiName": "employeeId",
|
|
73
|
+
"primaryKeyType": "integer",
|
|
74
|
+
"properties": {
|
|
75
|
+
"employeeId": {
|
|
76
|
+
"description": undefined,
|
|
77
|
+
"displayName": undefined,
|
|
78
|
+
"multiplicity": false,
|
|
79
|
+
"nullable": false,
|
|
80
|
+
"type": "integer",
|
|
81
|
+
},
|
|
82
|
+
"employeeStatus": {
|
|
83
|
+
"description": "TimeSeries of the status of the employee",
|
|
84
|
+
"displayName": undefined,
|
|
85
|
+
"multiplicity": false,
|
|
86
|
+
"nullable": true,
|
|
87
|
+
"type": "stringTimeseries",
|
|
88
|
+
},
|
|
89
|
+
"fullName": {
|
|
90
|
+
"description": undefined,
|
|
91
|
+
"displayName": undefined,
|
|
92
|
+
"multiplicity": false,
|
|
93
|
+
"nullable": true,
|
|
94
|
+
"type": "string",
|
|
95
|
+
},
|
|
96
|
+
"office": {
|
|
97
|
+
"description": "The unique "ID" of the employee's \\"primary\\" assigned office.
|
|
98
|
+
This is some more text.",
|
|
99
|
+
"displayName": undefined,
|
|
100
|
+
"multiplicity": false,
|
|
101
|
+
"nullable": true,
|
|
102
|
+
"type": "string",
|
|
103
|
+
},
|
|
104
|
+
"startDate": {
|
|
105
|
+
"description": "The date the employee was hired (most recently, if they were re-hired)",
|
|
106
|
+
"displayName": undefined,
|
|
107
|
+
"multiplicity": false,
|
|
108
|
+
"nullable": true,
|
|
109
|
+
"type": "datetime",
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
"rid": "ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44",
|
|
113
|
+
"status": "ACTIVE",
|
|
114
|
+
"titleProperty": "fullName",
|
|
115
|
+
"type": "object",
|
|
116
|
+
"visibility": "NORMAL",
|
|
117
|
+
}
|
|
118
|
+
`);
|
|
119
|
+
});
|
|
120
|
+
it("fetches interface metadata correctly", async () => {
|
|
121
|
+
const interfaceMetadata = await client.fetchMetadata($Interfaces.FooInterface);
|
|
122
|
+
expectTypeOf(interfaceMetadata).toEqualTypeOf();
|
|
123
|
+
expect(interfaceMetadata).toMatchInlineSnapshot(`
|
|
124
|
+
{
|
|
125
|
+
"apiName": "FooInterface",
|
|
126
|
+
"description": "Interface for Foo",
|
|
127
|
+
"displayName": "Foo Interface",
|
|
128
|
+
"implements": [],
|
|
129
|
+
"links": {},
|
|
130
|
+
"properties": {
|
|
131
|
+
"fooSpt": {
|
|
132
|
+
"description": "A foo",
|
|
133
|
+
"displayName": "Foo",
|
|
134
|
+
"multiplicity": false,
|
|
135
|
+
"nullable": true,
|
|
136
|
+
"type": "string",
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
"rid": "ri.interface.main.interface.1",
|
|
140
|
+
"type": "interface",
|
|
141
|
+
}
|
|
142
|
+
`);
|
|
143
|
+
});
|
|
144
|
+
it("fetches action metadata correctly", async () => {
|
|
145
|
+
const actionMetadata = await client.fetchMetadata($Actions.moveOffice);
|
|
146
|
+
expectTypeOf(actionMetadata).toEqualTypeOf();
|
|
147
|
+
expect(actionMetadata).toMatchInlineSnapshot(`
|
|
148
|
+
{
|
|
149
|
+
"apiName": "moveOffice",
|
|
150
|
+
"description": "Update an office's physical location",
|
|
151
|
+
"displayName": "move-office",
|
|
152
|
+
"modifiedEntities": {
|
|
153
|
+
"Office": {
|
|
154
|
+
"created": false,
|
|
155
|
+
"modified": true,
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
"parameters": {
|
|
159
|
+
"newAddress": {
|
|
160
|
+
"description": "The office's new physical address (not necessarily shipping address)",
|
|
161
|
+
"multiplicity": false,
|
|
162
|
+
"nullable": true,
|
|
163
|
+
"type": "string",
|
|
164
|
+
},
|
|
165
|
+
"newCapacity": {
|
|
166
|
+
"description": "The maximum seated-at-desk capacity of the new office (maximum fire-safe capacity may be higher)",
|
|
167
|
+
"multiplicity": false,
|
|
168
|
+
"nullable": true,
|
|
169
|
+
"type": "integer",
|
|
170
|
+
},
|
|
171
|
+
"officeId": {
|
|
172
|
+
"description": undefined,
|
|
173
|
+
"multiplicity": false,
|
|
174
|
+
"nullable": false,
|
|
175
|
+
"type": "string",
|
|
176
|
+
},
|
|
177
|
+
"officeNames": {
|
|
178
|
+
"description": "A list of all office names",
|
|
179
|
+
"multiplicity": true,
|
|
180
|
+
"nullable": true,
|
|
181
|
+
"type": "integer",
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
"rid": "ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2",
|
|
185
|
+
"status": "ACTIVE",
|
|
186
|
+
"type": "action",
|
|
187
|
+
}
|
|
188
|
+
`);
|
|
189
|
+
});
|
|
190
|
+
it("fetches query metadata correctly", async () => {
|
|
191
|
+
const queryMetadata = await client.fetchMetadata($Queries.queryAcceptsObject);
|
|
192
|
+
expectTypeOf(queryMetadata).toEqualTypeOf();
|
|
193
|
+
expect(queryMetadata).toMatchInlineSnapshot(`
|
|
194
|
+
{
|
|
195
|
+
"apiName": "queryAcceptsObject",
|
|
196
|
+
"description": "description of the query that takes object types",
|
|
197
|
+
"displayName": "QueryAcceptsObject",
|
|
198
|
+
"output": {
|
|
199
|
+
"nullable": false,
|
|
200
|
+
"object": "Employee",
|
|
201
|
+
"type": "object",
|
|
202
|
+
},
|
|
203
|
+
"parameters": {
|
|
204
|
+
"object": {
|
|
205
|
+
"description": undefined,
|
|
206
|
+
"nullable": false,
|
|
207
|
+
"object": "Employee",
|
|
208
|
+
"type": "object",
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
"rid": "ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968",
|
|
212
|
+
"type": "query",
|
|
213
|
+
"version": "0.11.0",
|
|
214
|
+
}
|
|
215
|
+
`);
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
//# sourceMappingURL=fetchMetadata.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchMetadata.test.js","names":["$Actions","$Interfaces","$Objects","$ontologyRid","$Queries","apiServer","afterAll","beforeAll","describe","expect","expectTypeOf","it","createClient","client","listen","close","objectMetadata","fetchMetadata","Employee","toEqualTypeOf","toMatchInlineSnapshot","interfaceMetadata","FooInterface","actionMetadata","moveOffice","queryMetadata","queryAcceptsObject"],"sources":["fetchMetadata.test.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { $Actions, $Interfaces, $Objects, $ontologyRid, $Queries, } from \"@osdk/client.test.ontology\";\nimport { apiServer } from \"@osdk/shared.test\";\nimport { afterAll, beforeAll, describe, expect, expectTypeOf, it, } from \"vitest\";\nimport { createClient } from \"./createClient.js\";\ndescribe(\"FetchMetadata\", () => {\n let client;\n beforeAll(async () => {\n apiServer.listen();\n client = createClient(\"https://stack.palantir.com\", $ontologyRid, async () => \"myAccessToken\");\n });\n afterAll(() => {\n apiServer.close();\n });\n it(\"fetches object metadata correctly\", async () => {\n const objectMetadata = await client.fetchMetadata($Objects.Employee);\n expectTypeOf(objectMetadata).toEqualTypeOf();\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 },\n \"pluralDisplayName\": \"Employees\",\n \"primaryKeyApiName\": \"employeeId\",\n \"primaryKeyType\": \"integer\",\n \"properties\": {\n \"employeeId\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"integer\",\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 },\n \"fullName\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\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 },\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 },\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 it(\"fetches interface metadata correctly\", async () => {\n const interfaceMetadata = await client.fetchMetadata($Interfaces.FooInterface);\n expectTypeOf(interfaceMetadata).toEqualTypeOf();\n expect(interfaceMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"FooInterface\",\n \"description\": \"Interface for Foo\",\n \"displayName\": \"Foo Interface\",\n \"implements\": [],\n \"links\": {},\n \"properties\": {\n \"fooSpt\": {\n \"description\": \"A foo\",\n \"displayName\": \"Foo\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n },\n },\n \"rid\": \"ri.interface.main.interface.1\",\n \"type\": \"interface\",\n }\n `);\n });\n it(\"fetches action metadata correctly\", async () => {\n const actionMetadata = await client.fetchMetadata($Actions.moveOffice);\n expectTypeOf(actionMetadata).toEqualTypeOf();\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 it(\"fetches query metadata correctly\", async () => {\n const queryMetadata = await client.fetchMetadata($Queries.queryAcceptsObject);\n expectTypeOf(queryMetadata).toEqualTypeOf();\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;AACA,SAASA,QAAQ,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,YAAY,EAAEC,QAAQ,QAAS,4BAA4B;AACrG,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAS,QAAQ;AACjF,SAASC,YAAY,QAAQ,mBAAmB;AAChDJ,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC5B,IAAIK,MAAM;EACVN,SAAS,CAAC,YAAY;IAClBF,SAAS,CAACS,MAAM,CAAC,CAAC;IAClBD,MAAM,GAAGD,YAAY,CAAC,4BAA4B,EAAET,YAAY,EAAE,YAAY,eAAe,CAAC;EAClG,CAAC,CAAC;EACFG,QAAQ,CAAC,MAAM;IACXD,SAAS,CAACU,KAAK,CAAC,CAAC;EACrB,CAAC,CAAC;EACFJ,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAChD,MAAMK,cAAc,GAAG,MAAMH,MAAM,CAACI,aAAa,CAACf,QAAQ,CAACgB,QAAQ,CAAC;IACpER,YAAY,CAACM,cAAc,CAAC,CAACG,aAAa,CAAC,CAAC;IAC5CV,MAAM,CAACO,cAAc,CAAC,CAACI,qBAAqB,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;EACF,CAAC,CAAC;EACFT,EAAE,CAAC,sCAAsC,EAAE,YAAY;IACnD,MAAMU,iBAAiB,GAAG,MAAMR,MAAM,CAACI,aAAa,CAAChB,WAAW,CAACqB,YAAY,CAAC;IAC9EZ,YAAY,CAACW,iBAAiB,CAAC,CAACF,aAAa,CAAC,CAAC;IAC/CV,MAAM,CAACY,iBAAiB,CAAC,CAACD,qBAAqB,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;EACFT,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAChD,MAAMY,cAAc,GAAG,MAAMV,MAAM,CAACI,aAAa,CAACjB,QAAQ,CAACwB,UAAU,CAAC;IACtEd,YAAY,CAACa,cAAc,CAAC,CAACJ,aAAa,CAAC,CAAC;IAC5CV,MAAM,CAACc,cAAc,CAAC,CAACH,qBAAqB,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;EACF,CAAC,CAAC;EACFT,EAAE,CAAC,kCAAkC,EAAE,YAAY;IAC/C,MAAMc,aAAa,GAAG,MAAMZ,MAAM,CAACI,aAAa,CAACb,QAAQ,CAACsB,kBAAkB,CAAC;IAC7EhB,YAAY,CAACe,aAAa,CAAC,CAACN,aAAa,CAAC,CAAC;IAC3CV,MAAM,CAACgB,aAAa,CAAC,CAACL,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type { ActionEditResponse, ActionReturnTypeForOptions, ActionValidationResponse, ApplyActionOptions, ApplyBatchActionOptions, ObjectSet, Osdk, OsdkObject, PageResult, Result, WhereClause, } from "@osdk/api";
|
|
2
|
+
export { isOk } from "@osdk/api";
|
|
3
|
+
export { PalantirApiError } from "@osdk/shared.net.errors";
|
|
4
|
+
export { ActionValidationError } from "./actions/ActionValidationError.js";
|
|
5
|
+
export type { Client } from "./Client.js";
|
|
6
|
+
export { createAttachmentFromRid } from "./createAttachmentFromRid.js";
|
|
7
|
+
export { createClient } from "./createClient.js";
|
|
8
|
+
export { createPlatformClient } from "./createPlatformClient.js";
|
|
9
|
+
export type { PlatformClient } from "./createPlatformClient.js";
|
|
10
|
+
export type { Logger } from "./Logger.js";
|
|
11
|
+
export { createAttachmentUpload } from "./object/AttachmentUpload.js";
|
|
12
|
+
export type { ResultOrError } from "./ResultOrError.js";
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EACV,kBAAkB,EAClB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,EACT,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
package/build/browser/index.js
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 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
|
+
export { isOk } from "@osdk/api";
|
|
17
|
+
export { PalantirApiError } from "@osdk/shared.net.errors";
|
|
18
|
+
export { ActionValidationError } from "./actions/ActionValidationError.js";
|
|
19
|
+
export { createAttachmentFromRid } from "./createAttachmentFromRid.js";
|
|
20
|
+
export { createClient } from "./createClient.js";
|
|
21
|
+
export { createPlatformClient } from "./createPlatformClient.js";
|
|
22
|
+
export { createAttachmentUpload } from "./object/AttachmentUpload.js";
|
|
13
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["isOk","PalantirApiError","ActionValidationError","createAttachmentFromRid","createClient","createPlatformClient","createAttachmentUpload"],"sources":["index.js"],"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 */\nexport { isOk } from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport { createAttachmentFromRid } from \"./createAttachmentFromRid.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,WAAW;AAChC,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAC1E,SAASC,uBAAuB,QAAQ,8BAA8B;AACtE,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,sBAAsB,QAAQ,8BAA8B","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intellisense.test.d.ts","sourceRoot":"","sources":["../../src/intellisense.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callsQueryAcceptsObject.d.ts","sourceRoot":"","sources":["../../../src/intellisense.test.helpers/callsQueryAcceptsObject.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
// WARNING!
|
|
17
|
+
// WARNING!
|
|
18
|
+
// This file is used for tests that check intellisense. Editing this file by hand will likely
|
|
19
|
+
// break tests that have hard coded line numbers and line offsets.
|
|
20
|
+
import { queryAcceptsObject } from "@osdk/client.test.ontology";
|
|
21
|
+
const client = {};
|
|
22
|
+
client(queryAcceptsObject).executeFunction({
|
|
23
|
+
object: undefined
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=callsQueryAcceptsObject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callsQueryAcceptsObject.js","names":["queryAcceptsObject","client","executeFunction","object","undefined"],"sources":["callsQueryAcceptsObject.js"],"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// WARNING!\n// WARNING!\n// This file is used for tests that check intellisense. Editing this file by hand will likely\n// break tests that have hard coded line numbers and line offsets.\nimport { queryAcceptsObject } from \"@osdk/client.test.ontology\";\nconst client = {};\nclient(queryAcceptsObject).executeFunction({\n object: undefined,\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,QAAQ,4BAA4B;AAC/D,MAAMC,MAAM,GAAG,CAAC,CAAC;AACjBA,MAAM,CAACD,kBAAkB,CAAC,CAACE,eAAe,CAAC;EACvCC,MAAM,EAAEC;AACZ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 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
|
+
import { findUpSync } from "find-up";
|
|
17
|
+
import * as path from "node:path";
|
|
18
|
+
import invariant from "tiny-invariant";
|
|
19
|
+
import * as ts from "typescript";
|
|
20
|
+
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
|
21
|
+
import { startTsServer } from "./tsserver.js";
|
|
22
|
+
// it needs to be hoisted because its referenced from our mocked WebSocket
|
|
23
|
+
// which must be hoisted to work
|
|
24
|
+
const rootLogger = await vi.hoisted(async () => {
|
|
25
|
+
const pino = (await import("pino")).pino;
|
|
26
|
+
const pinoPretty = await import("pino-pretty");
|
|
27
|
+
const {
|
|
28
|
+
EventEmitter
|
|
29
|
+
} = await import("node:events");
|
|
30
|
+
return Promise.resolve(pino({
|
|
31
|
+
level: "info"
|
|
32
|
+
}, pinoPretty.build({
|
|
33
|
+
sync: true,
|
|
34
|
+
timestampKey: undefined,
|
|
35
|
+
errorLikeObjectKeys: ["error", "err", "exception"],
|
|
36
|
+
errorProps: "stack,cause,properties",
|
|
37
|
+
ignore: "time,hostname,pid",
|
|
38
|
+
destination: new class extends EventEmitter {
|
|
39
|
+
write(a) {
|
|
40
|
+
// remove trailing newline since console.log adds one
|
|
41
|
+
if (a.at(-1) === "\n") a = a.slice(0, -1);
|
|
42
|
+
// This lets the test framework aggregate the logs per test, whereas direct to stdout does not
|
|
43
|
+
console.log(a);
|
|
44
|
+
}
|
|
45
|
+
}()
|
|
46
|
+
})));
|
|
47
|
+
});
|
|
48
|
+
describe("intellisense", () => {
|
|
49
|
+
let packagesDir;
|
|
50
|
+
let clientPackagePath;
|
|
51
|
+
beforeAll(() => {
|
|
52
|
+
const clientsPackageJson = findUpSync("package.json", {
|
|
53
|
+
cwd: import.meta.url
|
|
54
|
+
});
|
|
55
|
+
!(clientsPackageJson != null) ? invariant(false) : void 0;
|
|
56
|
+
packagesDir = path.join(path.dirname(clientsPackageJson), "..");
|
|
57
|
+
clientPackagePath = path.join(packagesDir, "client");
|
|
58
|
+
});
|
|
59
|
+
let tsServer;
|
|
60
|
+
let intellisenseFilePath;
|
|
61
|
+
beforeEach(async a => {
|
|
62
|
+
intellisenseFilePath = path.join(clientPackagePath, "src", "intellisense.test.helpers", `${a.task.name}.ts`);
|
|
63
|
+
expect(ts.sys.fileExists(intellisenseFilePath)).toBeTruthy();
|
|
64
|
+
tsServer = await startTsServer(rootLogger);
|
|
65
|
+
await tsServer.sendOpenRequest({
|
|
66
|
+
file: intellisenseFilePath
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
afterEach(async () => {
|
|
70
|
+
tsServer.stop();
|
|
71
|
+
tsServer = undefined;
|
|
72
|
+
});
|
|
73
|
+
it("callsQueryAcceptsObject", {
|
|
74
|
+
timeout: 20_000
|
|
75
|
+
}, async () => {
|
|
76
|
+
const {
|
|
77
|
+
resp
|
|
78
|
+
} = await tsServer.sendQuickInfoRequest({
|
|
79
|
+
file: intellisenseFilePath,
|
|
80
|
+
line: 27,
|
|
81
|
+
offset: 6
|
|
82
|
+
});
|
|
83
|
+
expect(resp.body?.documentation).toMatchInlineSnapshot(`"(no ontology metadata)"`);
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=intellisense.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intellisense.test.js","names":["findUpSync","path","invariant","ts","afterEach","beforeAll","beforeEach","describe","expect","it","vi","startTsServer","rootLogger","hoisted","pino","pinoPretty","EventEmitter","Promise","resolve","level","build","sync","timestampKey","undefined","errorLikeObjectKeys","errorProps","ignore","destination","write","a","at","slice","console","log","packagesDir","clientPackagePath","clientsPackageJson","cwd","import","meta","url","join","dirname","tsServer","intellisenseFilePath","task","name","sys","fileExists","toBeTruthy","sendOpenRequest","file","stop","timeout","resp","sendQuickInfoRequest","line","offset","body","documentation","toMatchInlineSnapshot"],"sources":["intellisense.test.js"],"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 */\nimport { findUpSync } from \"find-up\";\nimport * as path from \"node:path\";\nimport invariant from \"tiny-invariant\";\nimport * as ts from \"typescript\";\nimport { afterEach, beforeAll, beforeEach, describe, expect, it, vi, } from \"vitest\";\nimport { startTsServer } from \"./tsserver.js\";\n// it needs to be hoisted because its referenced from our mocked WebSocket\n// which must be hoisted to work\nconst rootLogger = await vi.hoisted(async () => {\n const pino = (await import(\"pino\")).pino;\n const pinoPretty = await import(\"pino-pretty\");\n const { EventEmitter } = await import(\"node:events\");\n class PinoConsoleLogDestination extends EventEmitter {\n write(a) {\n // remove trailing newline since console.log adds one\n if (a.at(-1) === \"\\n\")\n a = a.slice(0, -1);\n // This lets the test framework aggregate the logs per test, whereas direct to stdout does not\n console.log(a);\n }\n }\n return Promise.resolve(pino({ level: \"info\" }, (pinoPretty.build)({\n sync: true,\n timestampKey: undefined,\n errorLikeObjectKeys: [\"error\", \"err\", \"exception\"],\n errorProps: \"stack,cause,properties\",\n ignore: \"time,hostname,pid\",\n destination: new PinoConsoleLogDestination(),\n })));\n});\ndescribe(\"intellisense\", () => {\n let packagesDir;\n let clientPackagePath;\n beforeAll(() => {\n const clientsPackageJson = findUpSync(\"package.json\", {\n cwd: import.meta.url,\n });\n invariant(clientsPackageJson != null);\n packagesDir = path.join(path.dirname(clientsPackageJson), \"..\");\n clientPackagePath = path.join(packagesDir, \"client\");\n });\n let tsServer;\n let intellisenseFilePath;\n beforeEach(async (a) => {\n intellisenseFilePath = path.join(clientPackagePath, \"src\", \"intellisense.test.helpers\", `${a.task.name}.ts`);\n expect(ts.sys.fileExists(intellisenseFilePath)).toBeTruthy();\n tsServer = await startTsServer(rootLogger);\n await tsServer.sendOpenRequest({ file: intellisenseFilePath });\n });\n afterEach(async () => {\n tsServer.stop();\n tsServer = undefined;\n });\n it(\"callsQueryAcceptsObject\", { timeout: 20_000 }, async () => {\n const { resp } = await tsServer.sendQuickInfoRequest({\n file: intellisenseFilePath,\n line: 27,\n offset: 6,\n });\n expect(resp.body?.documentation).toMatchInlineSnapshot(`\"(no ontology metadata)\"`);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,SAAS;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAOC,SAAS,MAAM,gBAAgB;AACtC,OAAO,KAAKC,EAAE,MAAM,YAAY;AAChC,SAASC,SAAS,EAAEC,SAAS,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,EAAEC,EAAE,QAAS,QAAQ;AACpF,SAASC,aAAa,QAAQ,eAAe;AAC7C;AACA;AACA,MAAMC,UAAU,GAAG,MAAMF,EAAE,CAACG,OAAO,CAAC,YAAY;EAC5C,MAAMC,IAAI,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,EAAEA,IAAI;EACxC,MAAMC,UAAU,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC;EAC9C,MAAM;IAAEC;EAAa,CAAC,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC;EAUpD,OAAOC,OAAO,CAACC,OAAO,CAACJ,IAAI,CAAC;IAAEK,KAAK,EAAE;EAAO,CAAC,EAAGJ,UAAU,CAACK,KAAK,CAAE;IAC9DC,IAAI,EAAE,IAAI;IACVC,YAAY,EAAEC,SAAS;IACvBC,mBAAmB,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC;IAClDC,UAAU,EAAE,wBAAwB;IACpCC,MAAM,EAAE,mBAAmB;IAC3BC,WAAW,EAAE,IAfjB,cAAwCX,YAAY,CAAC;MACjDY,KAAKA,CAACC,CAAC,EAAE;QACL;QACA,IAAIA,CAAC,CAACC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EACjBD,CAAC,GAAGA,CAAC,CAACE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACtB;QACAC,OAAO,CAACC,GAAG,CAACJ,CAAC,CAAC;MAClB;IACJ,CAAC,CAO8C;EAC/C,CAAC,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AACFtB,QAAQ,CAAC,cAAc,EAAE,MAAM;EAC3B,IAAI2B,WAAW;EACf,IAAIC,iBAAiB;EACrB9B,SAAS,CAAC,MAAM;IACZ,MAAM+B,kBAAkB,GAAGpC,UAAU,CAAC,cAAc,EAAE;MAClDqC,GAAG,EAAEC,MAAM,CAACC,IAAI,CAACC;IACrB,CAAC,CAAC;IACF,EAAUJ,kBAAkB,IAAI,IAAI,IAApClC,SAAS;IACTgC,WAAW,GAAGjC,IAAI,CAACwC,IAAI,CAACxC,IAAI,CAACyC,OAAO,CAACN,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC/DD,iBAAiB,GAAGlC,IAAI,CAACwC,IAAI,CAACP,WAAW,EAAE,QAAQ,CAAC;EACxD,CAAC,CAAC;EACF,IAAIS,QAAQ;EACZ,IAAIC,oBAAoB;EACxBtC,UAAU,CAAC,MAAOuB,CAAC,IAAK;IACpBe,oBAAoB,GAAG3C,IAAI,CAACwC,IAAI,CAACN,iBAAiB,EAAE,KAAK,EAAE,2BAA2B,EAAE,GAAGN,CAAC,CAACgB,IAAI,CAACC,IAAI,KAAK,CAAC;IAC5GtC,MAAM,CAACL,EAAE,CAAC4C,GAAG,CAACC,UAAU,CAACJ,oBAAoB,CAAC,CAAC,CAACK,UAAU,CAAC,CAAC;IAC5DN,QAAQ,GAAG,MAAMhC,aAAa,CAACC,UAAU,CAAC;IAC1C,MAAM+B,QAAQ,CAACO,eAAe,CAAC;MAAEC,IAAI,EAAEP;IAAqB,CAAC,CAAC;EAClE,CAAC,CAAC;EACFxC,SAAS,CAAC,YAAY;IAClBuC,QAAQ,CAACS,IAAI,CAAC,CAAC;IACfT,QAAQ,GAAGpB,SAAS;EACxB,CAAC,CAAC;EACFd,EAAE,CAAC,yBAAyB,EAAE;IAAE4C,OAAO,EAAE;EAAO,CAAC,EAAE,YAAY;IAC3D,MAAM;MAAEC;IAAK,CAAC,GAAG,MAAMX,QAAQ,CAACY,oBAAoB,CAAC;MACjDJ,IAAI,EAAEP,oBAAoB;MAC1BY,IAAI,EAAE,EAAE;MACRC,MAAM,EAAE;IACZ,CAAC,CAAC;IACFjD,MAAM,CAAC8C,IAAI,CAACI,IAAI,EAAEC,aAAa,CAAC,CAACC,qBAAqB,CAAC,0BAA0B,CAAC;EACtF,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacyToModernSingleAggregationResult.d.ts","sourceRoot":"","sources":["../../../../src/internal/conversions/legacyToModernSingleAggregationResult.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 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
|
+
import invariant from "tiny-invariant";
|
|
17
|
+
/** @internal */
|
|
18
|
+
export function legacyToModernSingleAggregationResult(entry) {
|
|
19
|
+
return entry.metrics.reduce((accumulator, curValue) => {
|
|
20
|
+
const parts = curValue.name.split(".");
|
|
21
|
+
if (parts[0] === "count") {
|
|
22
|
+
return accumulator;
|
|
23
|
+
}
|
|
24
|
+
!(parts.length === 2) ? invariant(false, "assumed we were getting a `${key}.${type}`") : void 0;
|
|
25
|
+
const property = parts[0];
|
|
26
|
+
const metricType = parts[1];
|
|
27
|
+
if (!(property in accumulator)) {
|
|
28
|
+
accumulator[property] = {}; // fixme?
|
|
29
|
+
}
|
|
30
|
+
accumulator[property][metricType] = curValue.value; // fixme?
|
|
31
|
+
return accumulator;
|
|
32
|
+
}, {});
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=legacyToModernSingleAggregationResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacyToModernSingleAggregationResult.js","names":["invariant","legacyToModernSingleAggregationResult","entry","metrics","reduce","accumulator","curValue","parts","name","split","length","property","metricType","value"],"sources":["legacyToModernSingleAggregationResult.js"],"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 */\nimport invariant from \"tiny-invariant\";\n/** @internal */\nexport function legacyToModernSingleAggregationResult(entry) {\n return entry.metrics.reduce((accumulator, curValue) => {\n const parts = curValue.name.split(\".\");\n if (parts[0] === \"count\") {\n return accumulator;\n }\n invariant(parts.length === 2, \"assumed we were getting a `${key}.${type}`\");\n const property = parts[0];\n const metricType = parts[1];\n if (!(property in accumulator)) {\n accumulator[property] = {}; // fixme?\n }\n accumulator[property][metricType] = curValue.value; // fixme?\n return accumulator;\n }, {});\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,gBAAgB;AACtC;AACA,OAAO,SAASC,qCAAqCA,CAACC,KAAK,EAAE;EACzD,OAAOA,KAAK,CAACC,OAAO,CAACC,MAAM,CAAC,CAACC,WAAW,EAAEC,QAAQ,KAAK;IACnD,MAAMC,KAAK,GAAGD,QAAQ,CAACE,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC;IACtC,IAAIF,KAAK,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE;MACtB,OAAOF,WAAW;IACtB;IACA,EAAUE,KAAK,CAACG,MAAM,KAAK,CAAC,IAA5BV,SAAS,QAAqB,4CAA4C;IAC1E,MAAMW,QAAQ,GAAGJ,KAAK,CAAC,CAAC,CAAC;IACzB,MAAMK,UAAU,GAAGL,KAAK,CAAC,CAAC,CAAC;IAC3B,IAAI,EAAEI,QAAQ,IAAIN,WAAW,CAAC,EAAE;MAC5BA,WAAW,CAACM,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChC;IACAN,WAAW,CAACM,QAAQ,CAAC,CAACC,UAAU,CAAC,GAAGN,QAAQ,CAACO,KAAK,CAAC,CAAC;IACpD,OAAOR,WAAW;EACtB,CAAC,EAAE,CAAC,CAAC,CAAC;AACV","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modernToLegacyAggregationClause.d.ts","sourceRoot":"","sources":["../../../../src/internal/conversions/modernToLegacyAggregationClause.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 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
|
+
const directionFieldMap = dir => dir === "asc" ? "ASC" : dir === "desc" ? "DESC" : undefined;
|
|
17
|
+
/** @internal */
|
|
18
|
+
export function modernToLegacyAggregationClause(select) {
|
|
19
|
+
return Object.entries(select).flatMap(([propAndMetric, aggregationType]) => {
|
|
20
|
+
if (propAndMetric === "$count") {
|
|
21
|
+
return {
|
|
22
|
+
type: "count",
|
|
23
|
+
name: "count",
|
|
24
|
+
direction: directionFieldMap(aggregationType)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const colonPos = propAndMetric.lastIndexOf(":");
|
|
28
|
+
const property = propAndMetric.slice(0, colonPos);
|
|
29
|
+
const metric = propAndMetric.slice(colonPos + 1);
|
|
30
|
+
return [{
|
|
31
|
+
type: metric,
|
|
32
|
+
name: `${property}.${metric}`,
|
|
33
|
+
direction: directionFieldMap(aggregationType),
|
|
34
|
+
field: property
|
|
35
|
+
}];
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=modernToLegacyAggregationClause.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modernToLegacyAggregationClause.js","names":["directionFieldMap","dir","undefined","modernToLegacyAggregationClause","select","Object","entries","flatMap","propAndMetric","aggregationType","type","name","direction","colonPos","lastIndexOf","property","slice","metric","field"],"sources":["modernToLegacyAggregationClause.js"],"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 */\nconst directionFieldMap = (dir) => dir === \"asc\" ? \"ASC\" : dir === \"desc\" ? \"DESC\" : undefined;\n/** @internal */\nexport function modernToLegacyAggregationClause(select) {\n return Object.entries(select).flatMap(([propAndMetric, aggregationType]) => {\n if (propAndMetric === \"$count\") {\n return {\n type: \"count\",\n name: \"count\",\n direction: directionFieldMap(aggregationType),\n };\n }\n const colonPos = propAndMetric.lastIndexOf(\":\");\n const property = propAndMetric.slice(0, colonPos);\n const metric = propAndMetric.slice(colonPos + 1);\n return [\n {\n type: metric,\n name: `${property}.${metric}`,\n direction: directionFieldMap(aggregationType),\n field: property,\n },\n ];\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,iBAAiB,GAAIC,GAAG,IAAKA,GAAG,KAAK,KAAK,GAAG,KAAK,GAAGA,GAAG,KAAK,MAAM,GAAG,MAAM,GAAGC,SAAS;AAC9F;AACA,OAAO,SAASC,+BAA+BA,CAACC,MAAM,EAAE;EACpD,OAAOC,MAAM,CAACC,OAAO,CAACF,MAAM,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,aAAa,EAAEC,eAAe,CAAC,KAAK;IACxE,IAAID,aAAa,KAAK,QAAQ,EAAE;MAC5B,OAAO;QACHE,IAAI,EAAE,OAAO;QACbC,IAAI,EAAE,OAAO;QACbC,SAAS,EAAEZ,iBAAiB,CAACS,eAAe;MAChD,CAAC;IACL;IACA,MAAMI,QAAQ,GAAGL,aAAa,CAACM,WAAW,CAAC,GAAG,CAAC;IAC/C,MAAMC,QAAQ,GAAGP,aAAa,CAACQ,KAAK,CAAC,CAAC,EAAEH,QAAQ,CAAC;IACjD,MAAMI,MAAM,GAAGT,aAAa,CAACQ,KAAK,CAACH,QAAQ,GAAG,CAAC,CAAC;IAChD,OAAO,CACH;MACIH,IAAI,EAAEO,MAAM;MACZN,IAAI,EAAE,GAAGI,QAAQ,IAAIE,MAAM,EAAE;MAC7BL,SAAS,EAAEZ,iBAAiB,CAACS,eAAe,CAAC;MAC7CS,KAAK,EAAEH;IACX,CAAC,CACJ;EACL,CAAC,CAAC;AACN","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modernToLegacyGroupByClause.d.ts","sourceRoot":"","sources":["../../../../src/internal/conversions/modernToLegacyGroupByClause.ts"],"names":[],"mappings":""}
|