@osdk/client 2.7.0-beta.9 → 2.8.0-beta.1
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 +71 -0
- package/build/browser/actions/actions.test.js +9 -8
- package/build/browser/actions/actions.test.js.map +1 -1
- package/build/browser/fetchMetadata.test.js +9 -0
- package/build/browser/fetchMetadata.test.js.map +1 -1
- package/build/browser/index.js +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/intellisense.test.js +1 -1
- package/build/browser/intellisense.test.js.map +1 -1
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js +14 -9
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +74 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
- package/build/browser/object/SimpleOsdkProperties.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js +3 -0
- package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
- package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +85 -3
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects.js +4 -4
- package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects.test.js +48 -27
- package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/browser/object/fetchPage.js +16 -5
- package/build/browser/object/fetchPage.js.map +1 -1
- package/build/browser/object/object.test.js +123 -0
- package/build/browser/object/object.test.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +6 -6
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
- package/build/browser/objectSet/ObjectSetListenerWebsocket.js +15 -6
- package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
- package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +49 -3
- package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
- package/build/browser/objectSet/createObjectSet.js +1 -1
- package/build/browser/objectSet/createObjectSet.js.map +1 -1
- package/build/browser/observable/FunctionPayload.js +2 -0
- package/build/browser/observable/FunctionPayload.js.map +1 -0
- package/build/browser/observable/ObservableClient.js.map +1 -1
- package/build/browser/observable/internal/BulkObjectLoader.js +2 -1
- package/build/browser/observable/internal/BulkObjectLoader.js.map +1 -1
- package/build/browser/observable/internal/Changes.js +4 -1
- package/build/browser/observable/internal/Changes.js.map +1 -1
- package/build/browser/observable/internal/KnownCacheKey.js.map +1 -1
- package/build/browser/observable/internal/ObservableClientImpl.js +21 -1
- package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/browser/observable/internal/RidListCanonicalizer.js +30 -0
- package/build/browser/observable/internal/RidListCanonicalizer.js.map +1 -0
- package/build/browser/observable/internal/RidListCanonicalizer.test.js +50 -0
- package/build/browser/observable/internal/RidListCanonicalizer.test.js.map +1 -0
- package/build/browser/observable/internal/Store.js +11 -1
- package/build/browser/observable/internal/Store.js.map +1 -1
- package/build/browser/observable/internal/Store.test.js +58 -4
- package/build/browser/observable/internal/Store.test.js.map +1 -1
- package/build/browser/observable/internal/actions/ActionApplication.js +11 -7
- package/build/browser/observable/internal/actions/ActionApplication.js.map +1 -1
- package/build/browser/observable/internal/actions/OptimisticJob.js +1 -1
- package/build/browser/observable/internal/actions/OptimisticJob.js.map +1 -1
- package/build/browser/observable/internal/base-list/BaseCollectionQuery.js.map +1 -1
- package/build/browser/observable/internal/base-list/BaseListQuery.js +15 -9
- package/build/browser/observable/internal/base-list/BaseListQuery.js.map +1 -1
- package/build/browser/observable/internal/base-list/createCollectionConnectable.js +4 -2
- package/build/browser/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
- package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js +1 -2
- package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
- package/build/browser/observable/internal/evaluateFilter.js +1 -1
- package/build/browser/observable/internal/evaluateFilter.js.map +1 -1
- package/build/browser/observable/internal/evaluateFilter.test.js +105 -0
- package/build/browser/observable/internal/evaluateFilter.test.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionCacheKey.js +26 -0
- package/build/browser/observable/internal/function/FunctionCacheKey.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionParamsCanonicalizer.js +151 -0
- package/build/browser/observable/internal/function/FunctionParamsCanonicalizer.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionParamsCanonicalizer.test.js +186 -0
- package/build/browser/observable/internal/function/FunctionParamsCanonicalizer.test.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionQuery.js +137 -0
- package/build/browser/observable/internal/function/FunctionQuery.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionQuery.test.js +278 -0
- package/build/browser/observable/internal/function/FunctionQuery.test.js.map +1 -0
- package/build/browser/observable/internal/function/FunctionsHelper.js +92 -0
- package/build/browser/observable/internal/function/FunctionsHelper.js.map +1 -0
- package/build/browser/observable/internal/links/SpecificLinkQuery.js +2 -1
- package/build/browser/observable/internal/links/SpecificLinkQuery.js.map +1 -1
- package/build/browser/observable/internal/list/InterfaceListQuery.js +27 -10
- package/build/browser/observable/internal/list/InterfaceListQuery.js.map +1 -1
- package/build/browser/observable/internal/list/ListCacheKey.js +1 -0
- package/build/browser/observable/internal/list/ListCacheKey.js.map +1 -1
- package/build/browser/observable/internal/list/ListQuery.js +10 -4
- package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
- package/build/browser/observable/internal/list/ListQuery.test.js +167 -3
- package/build/browser/observable/internal/list/ListQuery.test.js.map +1 -1
- package/build/browser/observable/internal/list/ListsHelper.js +6 -3
- package/build/browser/observable/internal/list/ListsHelper.js.map +1 -1
- package/build/browser/observable/internal/list/ObjectListQuery.js +23 -9
- package/build/browser/observable/internal/list/ObjectListQuery.js.map +1 -1
- package/build/browser/observable/internal/object/ObjectQuery.js +15 -1
- package/build/browser/observable/internal/object/ObjectQuery.js.map +1 -1
- package/build/browser/observable/internal/object/ObjectsHelper.js +1 -3
- package/build/browser/observable/internal/object/ObjectsHelper.js.map +1 -1
- package/build/browser/observable/internal/objectMatchesWhereClause.test.js +11 -1
- package/build/browser/observable/internal/objectMatchesWhereClause.test.js.map +1 -1
- package/build/browser/observable/internal/objectset/ObjectSetQuery.js +6 -2
- package/build/browser/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
- package/build/browser/observable/internal/testUtils.js +8 -5
- package/build/browser/observable/internal/testUtils.js.map +1 -1
- package/build/browser/observable/internal/utils/rdpFieldOperations.js +6 -3
- package/build/browser/observable/internal/utils/rdpFieldOperations.js.map +1 -1
- package/build/browser/public/unstable-do-not-use.js.map +1 -1
- package/build/browser/queries/applyQuery.js +14 -0
- package/build/browser/queries/applyQuery.js.map +1 -1
- package/build/browser/queries/queries.test.js +14 -2
- package/build/browser/queries/queries.test.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/isObjectSpecifiersObject.js.map +1 -1
- package/build/browser/util/toDataValue.js +0 -5
- package/build/browser/util/toDataValue.js.map +1 -1
- package/build/browser/util/toDataValue.test.js +2 -7
- package/build/browser/util/toDataValue.test.js.map +1 -1
- package/build/cjs/{Client-DaUJl7jZ.d.cts → Client-Cmx6x_V1.d.cts} +1 -1
- package/build/cjs/{chunk-IQJTM3KW.cjs → chunk-7543GRIE.cjs} +183 -92
- package/build/cjs/chunk-7543GRIE.cjs.map +1 -0
- package/build/cjs/{chunk-PARVKNVB.cjs → chunk-VVKEXIIO.cjs} +108 -81
- package/build/cjs/chunk-VVKEXIIO.cjs.map +1 -0
- package/build/cjs/{createClient-D5G3qzAO.d.cts → createClient-BPK4om7e.d.cts} +1 -1
- package/build/cjs/index.cjs +8 -12
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +3 -3
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/internal.d.cts +1 -1
- package/build/cjs/public/unstable-do-not-use.cjs +537 -94
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.d.cts +75 -4
- package/build/esm/actions/actions.test.js +9 -8
- package/build/esm/actions/actions.test.js.map +1 -1
- package/build/esm/fetchMetadata.test.js +9 -0
- package/build/esm/fetchMetadata.test.js.map +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/intellisense.test.js +1 -1
- package/build/esm/intellisense.test.js.map +1 -1
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js +14 -9
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +74 -0
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
- package/build/esm/object/SimpleOsdkProperties.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js +3 -0
- package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
- package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +85 -3
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects.js +4 -4
- package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects.test.js +48 -27
- package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/esm/object/fetchPage.js +16 -5
- package/build/esm/object/fetchPage.js.map +1 -1
- package/build/esm/object/object.test.js +123 -0
- package/build/esm/object/object.test.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +6 -6
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
- package/build/esm/objectSet/ObjectSetListenerWebsocket.js +15 -6
- package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
- package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +49 -3
- package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
- package/build/esm/objectSet/createObjectSet.js +1 -1
- package/build/esm/objectSet/createObjectSet.js.map +1 -1
- package/build/esm/observable/FunctionPayload.js +2 -0
- package/build/esm/observable/FunctionPayload.js.map +1 -0
- package/build/esm/observable/ObservableClient.js.map +1 -1
- package/build/esm/observable/internal/BulkObjectLoader.js +2 -1
- package/build/esm/observable/internal/BulkObjectLoader.js.map +1 -1
- package/build/esm/observable/internal/Changes.js +4 -1
- package/build/esm/observable/internal/Changes.js.map +1 -1
- package/build/esm/observable/internal/KnownCacheKey.js.map +1 -1
- package/build/esm/observable/internal/ObservableClientImpl.js +21 -1
- package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/esm/observable/internal/RidListCanonicalizer.js +30 -0
- package/build/esm/observable/internal/RidListCanonicalizer.js.map +1 -0
- package/build/esm/observable/internal/RidListCanonicalizer.test.js +50 -0
- package/build/esm/observable/internal/RidListCanonicalizer.test.js.map +1 -0
- package/build/esm/observable/internal/Store.js +11 -1
- package/build/esm/observable/internal/Store.js.map +1 -1
- package/build/esm/observable/internal/Store.test.js +58 -4
- package/build/esm/observable/internal/Store.test.js.map +1 -1
- package/build/esm/observable/internal/actions/ActionApplication.js +11 -7
- package/build/esm/observable/internal/actions/ActionApplication.js.map +1 -1
- package/build/esm/observable/internal/actions/OptimisticJob.js +1 -1
- package/build/esm/observable/internal/actions/OptimisticJob.js.map +1 -1
- package/build/esm/observable/internal/base-list/BaseCollectionQuery.js.map +1 -1
- package/build/esm/observable/internal/base-list/BaseListQuery.js +15 -9
- package/build/esm/observable/internal/base-list/BaseListQuery.js.map +1 -1
- package/build/esm/observable/internal/base-list/createCollectionConnectable.js +4 -2
- package/build/esm/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
- package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js +1 -2
- package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
- package/build/esm/observable/internal/evaluateFilter.js +1 -1
- package/build/esm/observable/internal/evaluateFilter.js.map +1 -1
- package/build/esm/observable/internal/evaluateFilter.test.js +105 -0
- package/build/esm/observable/internal/evaluateFilter.test.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionCacheKey.js +26 -0
- package/build/esm/observable/internal/function/FunctionCacheKey.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionParamsCanonicalizer.js +151 -0
- package/build/esm/observable/internal/function/FunctionParamsCanonicalizer.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionParamsCanonicalizer.test.js +186 -0
- package/build/esm/observable/internal/function/FunctionParamsCanonicalizer.test.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionQuery.js +137 -0
- package/build/esm/observable/internal/function/FunctionQuery.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionQuery.test.js +278 -0
- package/build/esm/observable/internal/function/FunctionQuery.test.js.map +1 -0
- package/build/esm/observable/internal/function/FunctionsHelper.js +92 -0
- package/build/esm/observable/internal/function/FunctionsHelper.js.map +1 -0
- package/build/esm/observable/internal/links/SpecificLinkQuery.js +2 -1
- package/build/esm/observable/internal/links/SpecificLinkQuery.js.map +1 -1
- package/build/esm/observable/internal/list/InterfaceListQuery.js +27 -10
- package/build/esm/observable/internal/list/InterfaceListQuery.js.map +1 -1
- package/build/esm/observable/internal/list/ListCacheKey.js +1 -0
- package/build/esm/observable/internal/list/ListCacheKey.js.map +1 -1
- package/build/esm/observable/internal/list/ListQuery.js +10 -4
- package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
- package/build/esm/observable/internal/list/ListQuery.test.js +167 -3
- package/build/esm/observable/internal/list/ListQuery.test.js.map +1 -1
- package/build/esm/observable/internal/list/ListsHelper.js +6 -3
- package/build/esm/observable/internal/list/ListsHelper.js.map +1 -1
- package/build/esm/observable/internal/list/ObjectListQuery.js +23 -9
- package/build/esm/observable/internal/list/ObjectListQuery.js.map +1 -1
- package/build/esm/observable/internal/object/ObjectQuery.js +15 -1
- package/build/esm/observable/internal/object/ObjectQuery.js.map +1 -1
- package/build/esm/observable/internal/object/ObjectsHelper.js +1 -3
- package/build/esm/observable/internal/object/ObjectsHelper.js.map +1 -1
- package/build/esm/observable/internal/objectMatchesWhereClause.test.js +11 -1
- package/build/esm/observable/internal/objectMatchesWhereClause.test.js.map +1 -1
- package/build/esm/observable/internal/objectset/ObjectSetQuery.js +6 -2
- package/build/esm/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
- package/build/esm/observable/internal/testUtils.js +8 -5
- package/build/esm/observable/internal/testUtils.js.map +1 -1
- package/build/esm/observable/internal/utils/rdpFieldOperations.js +6 -3
- package/build/esm/observable/internal/utils/rdpFieldOperations.js.map +1 -1
- package/build/esm/public/unstable-do-not-use.js.map +1 -1
- package/build/esm/queries/applyQuery.js +14 -0
- package/build/esm/queries/applyQuery.js.map +1 -1
- package/build/esm/queries/queries.test.js +14 -2
- package/build/esm/queries/queries.test.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/isObjectSpecifiersObject.js.map +1 -1
- package/build/esm/util/toDataValue.js +0 -5
- package/build/esm/util/toDataValue.js.map +1 -1
- package/build/esm/util/toDataValue.test.js +2 -7
- package/build/esm/util/toDataValue.test.js.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/object/convertWireToOsdkObjects/InternalSymbols.d.ts +2 -0
- package/build/types/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +1 -1
- package/build/types/object/convertWireToOsdkObjects.d.ts +4 -4
- package/build/types/object/convertWireToOsdkObjects.d.ts.map +1 -1
- package/build/types/object/fetchPage.d.ts.map +1 -1
- package/build/types/object/object.test.d.ts.map +1 -1
- package/build/types/observable/FunctionPayload.d.ts +10 -0
- package/build/types/observable/FunctionPayload.d.ts.map +1 -0
- package/build/types/observable/ObservableClient.d.ts +73 -1
- package/build/types/observable/ObservableClient.d.ts.map +1 -1
- package/build/types/observable/internal/BulkObjectLoader.d.ts.map +1 -1
- package/build/types/observable/internal/Changes.d.ts +5 -3
- package/build/types/observable/internal/Changes.d.ts.map +1 -1
- package/build/types/observable/internal/KnownCacheKey.d.ts +2 -1
- package/build/types/observable/internal/KnownCacheKey.d.ts.map +1 -1
- package/build/types/observable/internal/RidListCanonicalizer.d.ts +5 -0
- package/build/types/observable/internal/RidListCanonicalizer.d.ts.map +1 -0
- package/build/types/observable/internal/RidListCanonicalizer.test.d.ts +1 -0
- package/build/types/observable/internal/RidListCanonicalizer.test.d.ts.map +1 -0
- package/build/types/observable/internal/Store.d.ts +7 -1
- package/build/types/observable/internal/Store.d.ts.map +1 -1
- package/build/types/observable/internal/Store.test.d.ts.map +1 -1
- package/build/types/observable/internal/actions/ActionApplication.d.ts.map +1 -1
- package/build/types/observable/internal/actions/OptimisticJob.d.ts.map +1 -1
- package/build/types/observable/internal/base-list/BaseCollectionQuery.d.ts +3 -0
- package/build/types/observable/internal/base-list/BaseCollectionQuery.d.ts.map +1 -1
- package/build/types/observable/internal/base-list/BaseListQuery.d.ts +3 -1
- package/build/types/observable/internal/base-list/BaseListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/evaluateFilter.test.d.ts +1 -0
- package/build/types/observable/internal/evaluateFilter.test.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionCacheKey.d.ts +17 -0
- package/build/types/observable/internal/function/FunctionCacheKey.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionParamsCanonicalizer.d.ts +16 -0
- package/build/types/observable/internal/function/FunctionParamsCanonicalizer.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionParamsCanonicalizer.test.d.ts +1 -0
- package/build/types/observable/internal/function/FunctionParamsCanonicalizer.test.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionQuery.d.ts +40 -0
- package/build/types/observable/internal/function/FunctionQuery.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionQuery.test.d.ts +1 -0
- package/build/types/observable/internal/function/FunctionQuery.test.d.ts.map +1 -0
- package/build/types/observable/internal/function/FunctionsHelper.d.ts +25 -0
- package/build/types/observable/internal/function/FunctionsHelper.d.ts.map +1 -0
- package/build/types/observable/internal/links/SpecificLinkQuery.d.ts.map +1 -1
- package/build/types/observable/internal/list/InterfaceListQuery.d.ts +3 -0
- package/build/types/observable/internal/list/InterfaceListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListCacheKey.d.ts +2 -1
- package/build/types/observable/internal/list/ListCacheKey.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListQuery.d.ts +1 -1
- package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListsHelper.d.ts +3 -1
- package/build/types/observable/internal/list/ListsHelper.d.ts.map +1 -1
- package/build/types/observable/internal/list/ObjectListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/object/ObjectQuery.d.ts.map +1 -1
- package/build/types/observable/internal/object/ObjectsHelper.d.ts.map +1 -1
- package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts +1 -0
- package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts.map +1 -1
- package/build/types/observable/internal/testUtils.d.ts.map +1 -1
- package/build/types/observable/internal/utils/rdpFieldOperations.d.ts.map +1 -1
- package/build/types/public/unstable-do-not-use.d.ts +2 -1
- package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
- package/build/types/queries/applyQuery.d.ts.map +1 -1
- package/build/types/util/isObjectSpecifiersObject.d.ts +1 -0
- package/build/types/util/isObjectSpecifiersObject.d.ts.map +1 -1
- package/package.json +14 -14
- package/build/cjs/chunk-IQJTM3KW.cjs.map +0 -1
- package/build/cjs/chunk-PARVKNVB.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk7543GRIE_cjs = require('../chunk-7543GRIE.cjs');
|
|
4
|
+
var chunkVVKEXIIO_cjs = require('../chunk-VVKEXIIO.cjs');
|
|
5
5
|
var chunkLDTMSHUZ_cjs = require('../chunk-LDTMSHUZ.cjs');
|
|
6
6
|
var trie = require('@wry/trie');
|
|
7
7
|
var deepEqual = require('fast-deep-equal');
|
|
@@ -153,7 +153,7 @@ var WhereClauseCanonicalizer = class {
|
|
|
153
153
|
var whereCanonicalizer = new WhereClauseCanonicalizer();
|
|
154
154
|
var orderByCanonicalizer = new OrderByCanonicalizer();
|
|
155
155
|
function computeObjectSetCacheKey(objectSet, options) {
|
|
156
|
-
const keyParts = ["objectSet",
|
|
156
|
+
const keyParts = ["objectSet", chunkVVKEXIIO_cjs.getWireObjectSet(objectSet)];
|
|
157
157
|
if (!options) {
|
|
158
158
|
return JSON.stringify(keyParts);
|
|
159
159
|
}
|
|
@@ -165,13 +165,13 @@ function computeObjectSetCacheKey(objectSet, options) {
|
|
|
165
165
|
keyParts.push("props", propKeys);
|
|
166
166
|
}
|
|
167
167
|
if (options.union && options.union.length > 0) {
|
|
168
|
-
keyParts.push("union", options.union.map((os) =>
|
|
168
|
+
keyParts.push("union", options.union.map((os) => chunkVVKEXIIO_cjs.getWireObjectSet(os)));
|
|
169
169
|
}
|
|
170
170
|
if (options.intersect && options.intersect.length > 0) {
|
|
171
|
-
keyParts.push("intersect", options.intersect.map((os) =>
|
|
171
|
+
keyParts.push("intersect", options.intersect.map((os) => chunkVVKEXIIO_cjs.getWireObjectSet(os)));
|
|
172
172
|
}
|
|
173
173
|
if (options.subtract && options.subtract.length > 0) {
|
|
174
|
-
keyParts.push("subtract", options.subtract.map((os) =>
|
|
174
|
+
keyParts.push("subtract", options.subtract.map((os) => chunkVVKEXIIO_cjs.getWireObjectSet(os)));
|
|
175
175
|
}
|
|
176
176
|
if (options.pivotTo) {
|
|
177
177
|
keyParts.push("pivotTo", options.pivotTo);
|
|
@@ -231,6 +231,20 @@ var ObservableClientImpl = class {
|
|
|
231
231
|
observeAggregation = (options, subFn) => {
|
|
232
232
|
return this.__experimentalStore.aggregations.observe(options, subFn);
|
|
233
233
|
};
|
|
234
|
+
observeFunction = (queryDef, params, options, subFn) => {
|
|
235
|
+
const dependsOn = options.dependsOn?.map((dep) => typeof dep === "string" ? dep : dep.apiName);
|
|
236
|
+
const dependsOnObjects = options.dependsOnObjects?.map((obj) => ({
|
|
237
|
+
$apiName: obj.$objectType ?? obj.$apiName,
|
|
238
|
+
$primaryKey: obj.$primaryKey
|
|
239
|
+
}));
|
|
240
|
+
return this.__experimentalStore.functions.observe({
|
|
241
|
+
...options,
|
|
242
|
+
queryDef,
|
|
243
|
+
params,
|
|
244
|
+
dependsOn,
|
|
245
|
+
dependsOnObjects
|
|
246
|
+
}, subFn);
|
|
247
|
+
};
|
|
234
248
|
observeLinks = (objects, linkName, options, subFn) => {
|
|
235
249
|
const objectsArray = Array.isArray(objects) ? objects : [objects];
|
|
236
250
|
const parentSub = new rxjs.Subscription();
|
|
@@ -240,7 +254,7 @@ var ObservableClientImpl = class {
|
|
|
240
254
|
...options,
|
|
241
255
|
srcType: {
|
|
242
256
|
type: "object",
|
|
243
|
-
apiName: obj.$apiName
|
|
257
|
+
apiName: obj.$objectType ?? obj.$apiName
|
|
244
258
|
},
|
|
245
259
|
linkName,
|
|
246
260
|
pk: obj.$primaryKey
|
|
@@ -271,6 +285,12 @@ var ObservableClientImpl = class {
|
|
|
271
285
|
invalidateObjectType(type) {
|
|
272
286
|
return this.__experimentalStore.invalidateObjectType(type, void 0);
|
|
273
287
|
}
|
|
288
|
+
invalidateFunction(apiName, params) {
|
|
289
|
+
return this.__experimentalStore.invalidateFunction(apiName, params);
|
|
290
|
+
}
|
|
291
|
+
invalidateFunctionsByObject(apiName, primaryKey) {
|
|
292
|
+
return this.__experimentalStore.invalidateFunctionsByObject(apiName, primaryKey);
|
|
293
|
+
}
|
|
274
294
|
canonicalizeWhereClause(where) {
|
|
275
295
|
return this.__experimentalStore.whereCanonicalizer.canonicalize(where);
|
|
276
296
|
}
|
|
@@ -351,12 +371,12 @@ var OptimisticJob = class {
|
|
|
351
371
|
return this;
|
|
352
372
|
},
|
|
353
373
|
createObject(type, pk, properties) {
|
|
354
|
-
const create = store.client[
|
|
374
|
+
const create = store.client[chunkVVKEXIIO_cjs.additionalContext].objectFactory2(store.client[chunkVVKEXIIO_cjs.additionalContext], [{
|
|
355
375
|
$primaryKey: pk,
|
|
356
376
|
$apiName: type.apiName,
|
|
357
377
|
$objectType: type.apiName,
|
|
358
378
|
...properties
|
|
359
|
-
}], void 0, {}).then((objs) => {
|
|
379
|
+
}], void 0, {}, void 0).then((objs) => {
|
|
360
380
|
return objs[0];
|
|
361
381
|
});
|
|
362
382
|
addedObjectPromises.push(create);
|
|
@@ -433,13 +453,17 @@ var ActionApplication = class {
|
|
|
433
453
|
}
|
|
434
454
|
})();
|
|
435
455
|
};
|
|
436
|
-
#invalidateActionEditResponse = async ({
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
456
|
+
#invalidateActionEditResponse = async (actionEditResponse) => {
|
|
457
|
+
if (actionEditResponse == null) {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
const {
|
|
461
|
+
deletedObjects,
|
|
462
|
+
modifiedObjects,
|
|
463
|
+
addedObjects,
|
|
464
|
+
editedObjectTypes,
|
|
465
|
+
type
|
|
466
|
+
} = actionEditResponse;
|
|
443
467
|
let changes;
|
|
444
468
|
if (type === "edits") {
|
|
445
469
|
const promisesToWait = [];
|
|
@@ -569,7 +593,7 @@ var Query = class {
|
|
|
569
593
|
this.store = store;
|
|
570
594
|
this.cacheKeys = store.cacheKeys;
|
|
571
595
|
this.#subject = observable;
|
|
572
|
-
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[
|
|
596
|
+
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkVVKEXIIO_cjs.additionalContext].logger : store.client[chunkVVKEXIIO_cjs.additionalContext].logger?.child({}, {
|
|
573
597
|
msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
|
|
574
598
|
}));
|
|
575
599
|
}
|
|
@@ -727,7 +751,7 @@ var Query = class {
|
|
|
727
751
|
// src/observable/internal/aggregation/AggregationQuery.ts
|
|
728
752
|
var AggregationQuery = class extends Query {
|
|
729
753
|
constructor(store, subject, cacheKey, opts) {
|
|
730
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
754
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkVVKEXIIO_cjs.additionalContext].logger?.child({}, {
|
|
731
755
|
msgPrefix: `AggregationQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
732
756
|
}) : void 0);
|
|
733
757
|
this.apiName = cacheKey.otherKeys[API_NAME_IDX];
|
|
@@ -974,7 +998,7 @@ var Changes = class {
|
|
|
974
998
|
modified = /* @__PURE__ */ new Set();
|
|
975
999
|
deleted = /* @__PURE__ */ new Set();
|
|
976
1000
|
registerObject = (cacheKey, data, isNew) => {
|
|
977
|
-
this[isNew ? "addedObjects" : "modifiedObjects"].set(data.$apiName, data);
|
|
1001
|
+
this[isNew ? "addedObjects" : "modifiedObjects"].set(data.$objectType ?? data.$apiName, data);
|
|
978
1002
|
this[isNew ? "added" : "modified"].add(cacheKey);
|
|
979
1003
|
};
|
|
980
1004
|
deleteObject = (cacheKey) => {
|
|
@@ -992,6 +1016,9 @@ var Changes = class {
|
|
|
992
1016
|
registerObjectSet = (key) => {
|
|
993
1017
|
this.modified.add(key);
|
|
994
1018
|
};
|
|
1019
|
+
registerFunction = (key) => {
|
|
1020
|
+
this.modified.add(key);
|
|
1021
|
+
};
|
|
995
1022
|
isEmpty() {
|
|
996
1023
|
return this.modifiedObjects.size === 0 && this.addedObjects.size === 0 && this.added.size === 0 && this.modified.size === 0 && this.deleted.size === 0;
|
|
997
1024
|
}
|
|
@@ -1020,6 +1047,325 @@ function multimapHelper(multimap) {
|
|
|
1020
1047
|
}));
|
|
1021
1048
|
}
|
|
1022
1049
|
|
|
1050
|
+
// src/observable/internal/function/FunctionsHelper.ts
|
|
1051
|
+
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1052
|
+
|
|
1053
|
+
// src/observable/internal/function/FunctionCacheKey.ts
|
|
1054
|
+
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1055
|
+
var PARAMS_IDX = 2;
|
|
1056
|
+
|
|
1057
|
+
// src/observable/internal/function/FunctionParamsCanonicalizer.ts
|
|
1058
|
+
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1059
|
+
function isPrimitiveValue(value) {
|
|
1060
|
+
if (value == null) return true;
|
|
1061
|
+
const t = typeof value;
|
|
1062
|
+
return t === "string" || t === "number" || t === "boolean" || t === "bigint";
|
|
1063
|
+
}
|
|
1064
|
+
var FunctionParamsCanonicalizer = class {
|
|
1065
|
+
#inputCache = /* @__PURE__ */ new WeakMap();
|
|
1066
|
+
#trie = new trie.Trie(false);
|
|
1067
|
+
#canonicalByMarker = /* @__PURE__ */ new WeakMap();
|
|
1068
|
+
canonicalize(params) {
|
|
1069
|
+
if (params == null) {
|
|
1070
|
+
return void 0;
|
|
1071
|
+
}
|
|
1072
|
+
if (this.#inputCache.has(params)) {
|
|
1073
|
+
return this.#inputCache.get(params);
|
|
1074
|
+
}
|
|
1075
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
1076
|
+
const path = [];
|
|
1077
|
+
const canonicalValue = this.#encodeAndBuild(params, path, seen);
|
|
1078
|
+
const marker = this.#trie.lookupArray(path);
|
|
1079
|
+
let canonical = this.#canonicalByMarker.get(marker);
|
|
1080
|
+
if (canonical === void 0) {
|
|
1081
|
+
canonical = canonicalValue;
|
|
1082
|
+
this.#canonicalByMarker.set(marker, canonical);
|
|
1083
|
+
}
|
|
1084
|
+
this.#inputCache.set(params, canonical);
|
|
1085
|
+
return canonical;
|
|
1086
|
+
}
|
|
1087
|
+
#encodeAndBuild(value, path, seen) {
|
|
1088
|
+
if (value == null) {
|
|
1089
|
+
path.push(value);
|
|
1090
|
+
return value;
|
|
1091
|
+
}
|
|
1092
|
+
if (isPrimitiveValue(value)) {
|
|
1093
|
+
path.push(value);
|
|
1094
|
+
return value;
|
|
1095
|
+
}
|
|
1096
|
+
if (seen.has(value)) {
|
|
1097
|
+
throw new Error("Circular reference in function parameters");
|
|
1098
|
+
}
|
|
1099
|
+
seen.add(value);
|
|
1100
|
+
if (value instanceof Date) {
|
|
1101
|
+
const iso = value.toISOString();
|
|
1102
|
+
path.push("$:date", iso);
|
|
1103
|
+
return iso;
|
|
1104
|
+
}
|
|
1105
|
+
if (Array.isArray(value)) {
|
|
1106
|
+
path.push("$:array");
|
|
1107
|
+
const arr = value.map((item) => this.#encodeAndBuild(item, path, seen));
|
|
1108
|
+
path.push("$:array_end");
|
|
1109
|
+
return arr;
|
|
1110
|
+
}
|
|
1111
|
+
if (value instanceof Set) {
|
|
1112
|
+
path.push("$:set");
|
|
1113
|
+
const sorted = this.#sortSetValues(Array.from(value));
|
|
1114
|
+
const arr = sorted.map((item) => this.#encodeAndBuild(item, path, seen));
|
|
1115
|
+
path.push("$:set_end");
|
|
1116
|
+
return arr;
|
|
1117
|
+
}
|
|
1118
|
+
if (value instanceof Map) {
|
|
1119
|
+
path.push("$:map");
|
|
1120
|
+
const sorted = this.#sortMapEntries(Array.from(value.entries()));
|
|
1121
|
+
const arr = sorted.map(([k, v]) => [this.#encodeAndBuild(k, path, seen), this.#encodeAndBuild(v, path, seen)]);
|
|
1122
|
+
path.push("$:map_end");
|
|
1123
|
+
return arr;
|
|
1124
|
+
}
|
|
1125
|
+
if (chunk7543GRIE_cjs.isObjectSpecifiersObject(value)) {
|
|
1126
|
+
const objectType = value.$objectType ?? value.$apiName;
|
|
1127
|
+
path.push("$:osdk", objectType, value.$primaryKey);
|
|
1128
|
+
return {
|
|
1129
|
+
$apiName: objectType,
|
|
1130
|
+
$primaryKey: value.$primaryKey
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
if (chunkVVKEXIIO_cjs.isObjectSet(value)) {
|
|
1134
|
+
const wire = chunkVVKEXIIO_cjs.getWireObjectSet(value);
|
|
1135
|
+
path.push("$:objectset", wire);
|
|
1136
|
+
return wire;
|
|
1137
|
+
}
|
|
1138
|
+
const obj = value;
|
|
1139
|
+
path.push("$:object");
|
|
1140
|
+
const canonical = {};
|
|
1141
|
+
for (const key of Object.keys(obj).sort()) {
|
|
1142
|
+
path.push(key);
|
|
1143
|
+
canonical[key] = this.#encodeAndBuild(obj[key], path, seen);
|
|
1144
|
+
}
|
|
1145
|
+
path.push("$:object_end");
|
|
1146
|
+
return canonical;
|
|
1147
|
+
}
|
|
1148
|
+
#comparePrimitives(a, b) {
|
|
1149
|
+
const ta = typeof a;
|
|
1150
|
+
const tb = typeof b;
|
|
1151
|
+
if (ta !== tb) return ta.localeCompare(tb);
|
|
1152
|
+
if (ta === "string") return a.localeCompare(b);
|
|
1153
|
+
if (ta === "number") {
|
|
1154
|
+
const an = a;
|
|
1155
|
+
const bn = b;
|
|
1156
|
+
if (Number.isNaN(an) && Number.isNaN(bn)) return 0;
|
|
1157
|
+
if (Number.isNaN(an)) return 1;
|
|
1158
|
+
if (Number.isNaN(bn)) return -1;
|
|
1159
|
+
return an - bn;
|
|
1160
|
+
}
|
|
1161
|
+
if (ta === "boolean") return (a ? 1 : 0) - (b ? 1 : 0);
|
|
1162
|
+
if (ta === "bigint") {
|
|
1163
|
+
const ab = a;
|
|
1164
|
+
const bb = b;
|
|
1165
|
+
return ab < bb ? -1 : ab > bb ? 1 : 0;
|
|
1166
|
+
}
|
|
1167
|
+
return 0;
|
|
1168
|
+
}
|
|
1169
|
+
#sortSetValues(items) {
|
|
1170
|
+
return items.slice().sort((a, b) => {
|
|
1171
|
+
if (isPrimitiveValue(a) && isPrimitiveValue(b)) {
|
|
1172
|
+
return this.#comparePrimitives(a, b);
|
|
1173
|
+
}
|
|
1174
|
+
return JSON.stringify(a).localeCompare(JSON.stringify(b));
|
|
1175
|
+
});
|
|
1176
|
+
}
|
|
1177
|
+
#sortMapEntries(entries) {
|
|
1178
|
+
return entries.slice().sort(([a], [b]) => {
|
|
1179
|
+
if (isPrimitiveValue(a) && isPrimitiveValue(b)) {
|
|
1180
|
+
return this.#comparePrimitives(a, b);
|
|
1181
|
+
}
|
|
1182
|
+
return JSON.stringify(a).localeCompare(JSON.stringify(b));
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
};
|
|
1186
|
+
|
|
1187
|
+
// src/observable/internal/function/FunctionQuery.ts
|
|
1188
|
+
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1189
|
+
var FunctionQuery = class extends Query {
|
|
1190
|
+
#apiName;
|
|
1191
|
+
#version;
|
|
1192
|
+
#params;
|
|
1193
|
+
#dependsOn;
|
|
1194
|
+
#dependsOnObjects;
|
|
1195
|
+
#queryDef;
|
|
1196
|
+
constructor(store, subject, queryDef, params, cacheKey, opts) {
|
|
1197
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkVVKEXIIO_cjs.additionalContext].logger?.child({}, {
|
|
1198
|
+
msgPrefix: `FunctionQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1199
|
+
}) : void 0);
|
|
1200
|
+
this.#apiName = queryDef.apiName;
|
|
1201
|
+
this.#version = queryDef.isFixedVersion ? queryDef.version : void 0;
|
|
1202
|
+
this.#params = params;
|
|
1203
|
+
this.#dependsOn = opts.dependsOn;
|
|
1204
|
+
this.#dependsOnObjects = opts.dependsOnObjects;
|
|
1205
|
+
this.#queryDef = queryDef;
|
|
1206
|
+
}
|
|
1207
|
+
_createConnectable(subject) {
|
|
1208
|
+
return rxjs.connectable(subject.pipe(rxjs.map((x) => {
|
|
1209
|
+
const value = x.value;
|
|
1210
|
+
return {
|
|
1211
|
+
status: x.status,
|
|
1212
|
+
result: value?.result,
|
|
1213
|
+
lastUpdated: value?.executedAt ?? 0,
|
|
1214
|
+
error: value?.error
|
|
1215
|
+
};
|
|
1216
|
+
})), {
|
|
1217
|
+
connector: () => new rxjs.BehaviorSubject({
|
|
1218
|
+
status: "init",
|
|
1219
|
+
result: void 0,
|
|
1220
|
+
lastUpdated: 0
|
|
1221
|
+
})
|
|
1222
|
+
});
|
|
1223
|
+
}
|
|
1224
|
+
async _fetchAndStore() {
|
|
1225
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1226
|
+
this.logger?.child({
|
|
1227
|
+
methodName: "_fetchAndStore"
|
|
1228
|
+
}).debug("calling _fetchAndStore");
|
|
1229
|
+
}
|
|
1230
|
+
try {
|
|
1231
|
+
const result = await chunk7543GRIE_cjs.applyQuery(this.store.client[chunkVVKEXIIO_cjs.additionalContext], this.#queryDef, this.#params);
|
|
1232
|
+
const executedAt = Date.now();
|
|
1233
|
+
this.store.batch({}, (batch) => {
|
|
1234
|
+
this.writeToStore({
|
|
1235
|
+
result,
|
|
1236
|
+
executedAt
|
|
1237
|
+
}, "loaded", batch);
|
|
1238
|
+
});
|
|
1239
|
+
} catch (e) {
|
|
1240
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1241
|
+
this.logger?.child({
|
|
1242
|
+
methodName: "_fetchAndStore"
|
|
1243
|
+
}).error("Error executing function", e);
|
|
1244
|
+
}
|
|
1245
|
+
const error = e instanceof Error ? e : new Error(String(e));
|
|
1246
|
+
this.store.batch({}, (batch) => {
|
|
1247
|
+
this.writeToStore({
|
|
1248
|
+
result: void 0,
|
|
1249
|
+
executedAt: 0,
|
|
1250
|
+
error
|
|
1251
|
+
}, "error", batch);
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
writeToStore(data, status, batch) {
|
|
1256
|
+
batch.write(this.cacheKey, data, status);
|
|
1257
|
+
return batch.read(this.cacheKey);
|
|
1258
|
+
}
|
|
1259
|
+
invalidateObjectType = (objectType, changes) => {
|
|
1260
|
+
if (this.#dependsOn?.includes(objectType)) {
|
|
1261
|
+
changes?.registerFunction(this.cacheKey);
|
|
1262
|
+
return this.revalidate(true);
|
|
1263
|
+
}
|
|
1264
|
+
return Promise.resolve();
|
|
1265
|
+
};
|
|
1266
|
+
dependsOnObject(apiName, primaryKey) {
|
|
1267
|
+
if (!this.#dependsOnObjects) {
|
|
1268
|
+
return false;
|
|
1269
|
+
}
|
|
1270
|
+
return this.#dependsOnObjects.some((obj) => obj.$apiName === apiName && obj.$primaryKey === primaryKey);
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* Called during batch operations when objects change.
|
|
1274
|
+
* Checks if any objects in dependsOnObjects were modified/added
|
|
1275
|
+
* and triggers revalidation if so.
|
|
1276
|
+
*/
|
|
1277
|
+
maybeUpdateAndRevalidate = (changes, _optimisticId) => {
|
|
1278
|
+
if (!this.#dependsOnObjects?.length) {
|
|
1279
|
+
return void 0;
|
|
1280
|
+
}
|
|
1281
|
+
for (const dep of this.#dependsOnObjects) {
|
|
1282
|
+
const modifiedObjects = changes.modifiedObjects.get(dep.$apiName);
|
|
1283
|
+
if (modifiedObjects?.some((obj) => obj.$primaryKey === dep.$primaryKey)) {
|
|
1284
|
+
return this.revalidate(true);
|
|
1285
|
+
}
|
|
1286
|
+
const addedObjects = changes.addedObjects.get(dep.$apiName);
|
|
1287
|
+
if (addedObjects?.some((obj) => obj.$primaryKey === dep.$primaryKey)) {
|
|
1288
|
+
return this.revalidate(true);
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
return void 0;
|
|
1292
|
+
};
|
|
1293
|
+
get apiName() {
|
|
1294
|
+
return this.#apiName;
|
|
1295
|
+
}
|
|
1296
|
+
get version() {
|
|
1297
|
+
return this.#version;
|
|
1298
|
+
}
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
// src/observable/internal/function/FunctionsHelper.ts
|
|
1302
|
+
var FunctionsHelper = class extends AbstractHelper {
|
|
1303
|
+
paramsCanonicalizer = new FunctionParamsCanonicalizer();
|
|
1304
|
+
constructor(store, cacheKeys) {
|
|
1305
|
+
super(store, cacheKeys);
|
|
1306
|
+
}
|
|
1307
|
+
observe(options, subFn) {
|
|
1308
|
+
return super.observe(options, subFn);
|
|
1309
|
+
}
|
|
1310
|
+
getQuery(options) {
|
|
1311
|
+
const {
|
|
1312
|
+
queryDef,
|
|
1313
|
+
params,
|
|
1314
|
+
...observeOpts
|
|
1315
|
+
} = options;
|
|
1316
|
+
const apiName = queryDef.apiName;
|
|
1317
|
+
const version = queryDef.isFixedVersion ? queryDef.version : void 0;
|
|
1318
|
+
const canonicalParams = this.paramsCanonicalizer.canonicalize(params);
|
|
1319
|
+
const functionCacheKey = this.cacheKeys.get("function", apiName, version, canonicalParams);
|
|
1320
|
+
return this.store.queries.get(functionCacheKey, () => new FunctionQuery(this.store, this.store.subjects.get(functionCacheKey), queryDef, params, functionCacheKey, observeOpts));
|
|
1321
|
+
}
|
|
1322
|
+
async invalidateFunction(apiName, params) {
|
|
1323
|
+
const functionApiName = typeof apiName === "string" ? apiName : apiName.apiName;
|
|
1324
|
+
let canonicalParams;
|
|
1325
|
+
if (params !== void 0) {
|
|
1326
|
+
canonicalParams = this.paramsCanonicalizer.canonicalize(params);
|
|
1327
|
+
}
|
|
1328
|
+
const promises = [];
|
|
1329
|
+
for (const cacheKey of this.store.queries.keys()) {
|
|
1330
|
+
if (cacheKey.type !== "function") {
|
|
1331
|
+
continue;
|
|
1332
|
+
}
|
|
1333
|
+
const query = this.store.queries.peek(cacheKey);
|
|
1334
|
+
if (!query) {
|
|
1335
|
+
continue;
|
|
1336
|
+
}
|
|
1337
|
+
if (query.apiName !== functionApiName) {
|
|
1338
|
+
continue;
|
|
1339
|
+
}
|
|
1340
|
+
if (canonicalParams !== void 0) {
|
|
1341
|
+
const queryCacheKey = cacheKey;
|
|
1342
|
+
const queryParams = queryCacheKey.otherKeys[PARAMS_IDX];
|
|
1343
|
+
if (queryParams !== canonicalParams) {
|
|
1344
|
+
continue;
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
promises.push(query.revalidate(true));
|
|
1348
|
+
}
|
|
1349
|
+
await Promise.allSettled(promises);
|
|
1350
|
+
}
|
|
1351
|
+
async invalidateFunctionsByObject(apiName, primaryKey) {
|
|
1352
|
+
const promises = [];
|
|
1353
|
+
for (const cacheKey of this.store.queries.keys()) {
|
|
1354
|
+
if (cacheKey.type !== "function") {
|
|
1355
|
+
continue;
|
|
1356
|
+
}
|
|
1357
|
+
const query = this.store.queries.peek(cacheKey);
|
|
1358
|
+
if (!query) {
|
|
1359
|
+
continue;
|
|
1360
|
+
}
|
|
1361
|
+
if (query.dependsOnObject(apiName, primaryKey)) {
|
|
1362
|
+
promises.push(query.revalidate(true));
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
await Promise.allSettled(promises);
|
|
1366
|
+
}
|
|
1367
|
+
};
|
|
1368
|
+
|
|
1023
1369
|
// src/observable/internal/IntersectCanonicalizer.ts
|
|
1024
1370
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1025
1371
|
|
|
@@ -1417,6 +1763,7 @@ var ORDER_BY_IDX = 3;
|
|
|
1417
1763
|
var RDP_IDX2 = 4;
|
|
1418
1764
|
var INTERSECT_IDX = 5;
|
|
1419
1765
|
var PIVOT_IDX = 6;
|
|
1766
|
+
var RIDS_IDX = 7;
|
|
1420
1767
|
|
|
1421
1768
|
// src/observable/internal/sorting/SortingStrategy.ts
|
|
1422
1769
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
@@ -1475,12 +1822,14 @@ function createCollectionConnectable(subject, subjects, createPayload) {
|
|
|
1475
1822
|
resolvedData,
|
|
1476
1823
|
isOptimistic: rxjs.of(listEntry.isOptimistic),
|
|
1477
1824
|
status: rxjs.of(listEntry.status),
|
|
1478
|
-
lastUpdated: rxjs.of(listEntry.lastUpdated)
|
|
1825
|
+
lastUpdated: rxjs.of(listEntry.lastUpdated),
|
|
1826
|
+
totalCount: rxjs.of(listEntry?.value?.totalCount)
|
|
1479
1827
|
}).pipe(rxjs.map((params) => createPayload({
|
|
1480
1828
|
resolvedData: Array.isArray(params.resolvedData) ? params.resolvedData : [],
|
|
1481
1829
|
isOptimistic: params.isOptimistic,
|
|
1482
1830
|
status: params.status,
|
|
1483
|
-
lastUpdated: params.lastUpdated
|
|
1831
|
+
lastUpdated: params.lastUpdated,
|
|
1832
|
+
totalCount: params.totalCount
|
|
1484
1833
|
}))), rxjs.asapScheduler);
|
|
1485
1834
|
})), {
|
|
1486
1835
|
resetOnDisconnect: false,
|
|
@@ -1535,9 +1884,10 @@ var BaseListQuery = class extends Query {
|
|
|
1535
1884
|
* @param status Status to set for the list
|
|
1536
1885
|
* @param batch Batch context to use
|
|
1537
1886
|
* @param append Whether to append to the existing list or replace it
|
|
1887
|
+
* @param totalCount Optional total count from API response
|
|
1538
1888
|
* @returns The updated entry
|
|
1539
1889
|
*/
|
|
1540
|
-
_updateList(items, status, batch, append = false) {
|
|
1890
|
+
_updateList(items, status, batch, append = false, totalCount) {
|
|
1541
1891
|
if (process.env.NODE_ENV !== "production") {
|
|
1542
1892
|
this.logger?.child({
|
|
1543
1893
|
methodName: "updateList"
|
|
@@ -1555,7 +1905,8 @@ var BaseListQuery = class extends Query {
|
|
|
1555
1905
|
objectCacheKeys = this._sortCacheKeys(objectCacheKeys, batch);
|
|
1556
1906
|
objectCacheKeys = removeDuplicates(objectCacheKeys, batch);
|
|
1557
1907
|
return this.writeToStore({
|
|
1558
|
-
data: objectCacheKeys
|
|
1908
|
+
data: objectCacheKeys,
|
|
1909
|
+
totalCount
|
|
1559
1910
|
}, status, batch);
|
|
1560
1911
|
}
|
|
1561
1912
|
/**
|
|
@@ -1646,7 +1997,8 @@ var BaseListQuery = class extends Query {
|
|
|
1646
1997
|
fetchMore: this.fetchMore,
|
|
1647
1998
|
hasMore: this.nextPageToken != null,
|
|
1648
1999
|
status: params.status,
|
|
1649
|
-
lastUpdated: params.lastUpdated
|
|
2000
|
+
lastUpdated: params.lastUpdated,
|
|
2001
|
+
totalCount: params.totalCount
|
|
1650
2002
|
};
|
|
1651
2003
|
}
|
|
1652
2004
|
/**
|
|
@@ -1747,6 +2099,7 @@ var BaseListQuery = class extends Query {
|
|
|
1747
2099
|
try {
|
|
1748
2100
|
const hadPreviousPage = this.nextPageToken != null;
|
|
1749
2101
|
const result = await this.fetchPageData(signal);
|
|
2102
|
+
this.currentTotalCount = result.totalCount;
|
|
1750
2103
|
if (signal?.aborted) {
|
|
1751
2104
|
return void 0;
|
|
1752
2105
|
}
|
|
@@ -1756,7 +2109,7 @@ var BaseListQuery = class extends Query {
|
|
|
1756
2109
|
const append = hadPreviousPage;
|
|
1757
2110
|
const finalStatus = result.nextPageToken ? status : "loaded";
|
|
1758
2111
|
const objectKeys = this.store.objects.storeOsdkInstances(result.data, batch, this.rdpConfig);
|
|
1759
|
-
return this._updateList(objectKeys, finalStatus, batch, append);
|
|
2112
|
+
return this._updateList(objectKeys, finalStatus, batch, append, this.currentTotalCount);
|
|
1760
2113
|
});
|
|
1761
2114
|
return retVal;
|
|
1762
2115
|
} catch (error) {
|
|
@@ -1792,8 +2145,10 @@ var BaseListQuery = class extends Query {
|
|
|
1792
2145
|
* @returns The updated entry with error status
|
|
1793
2146
|
*/
|
|
1794
2147
|
handleFetchError(_error, _status, batch) {
|
|
2148
|
+
const existingTotalCount = batch.read(this.cacheKey)?.value?.totalCount;
|
|
1795
2149
|
return this.writeToStore({
|
|
1796
|
-
data: []
|
|
2150
|
+
data: [],
|
|
2151
|
+
totalCount: existingTotalCount
|
|
1797
2152
|
}, "error", batch);
|
|
1798
2153
|
}
|
|
1799
2154
|
/**
|
|
@@ -1832,8 +2187,10 @@ var BaseListQuery = class extends Query {
|
|
|
1832
2187
|
objectCacheKeys = this.#retainReleaseAppend(batch, options.append ?? false, objectCacheKeys);
|
|
1833
2188
|
objectCacheKeys = this._sortCacheKeys(objectCacheKeys, batch);
|
|
1834
2189
|
objectCacheKeys = removeDuplicates(objectCacheKeys, batch);
|
|
2190
|
+
const existingTotalCount = batch.read(this.cacheKey)?.value?.totalCount;
|
|
1835
2191
|
return this.writeToStore({
|
|
1836
|
-
data: objectCacheKeys
|
|
2192
|
+
data: objectCacheKeys,
|
|
2193
|
+
totalCount: existingTotalCount
|
|
1837
2194
|
}, options.status, batch);
|
|
1838
2195
|
}
|
|
1839
2196
|
//
|
|
@@ -1958,7 +2315,7 @@ var BaseListQuery = class extends Query {
|
|
|
1958
2315
|
}).debug("Removing object", object);
|
|
1959
2316
|
}
|
|
1960
2317
|
this.store.batch({}, (batch) => {
|
|
1961
|
-
const objectCacheKey = this.store.cacheKeys.get("object", object.$apiName, object.$primaryKey);
|
|
2318
|
+
const objectCacheKey = this.store.cacheKeys.get("object", object.$objectType ?? object.$apiName, object.$primaryKey);
|
|
1962
2319
|
batch.delete(objectCacheKey, "loaded");
|
|
1963
2320
|
});
|
|
1964
2321
|
}
|
|
@@ -1978,7 +2335,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
1978
2335
|
batch.changes.modified.add(this.cacheKey);
|
|
1979
2336
|
}
|
|
1980
2337
|
constructor(store, subject, cacheKey, opts) {
|
|
1981
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
2338
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkVVKEXIIO_cjs.additionalContext].logger?.child({}, {
|
|
1982
2339
|
msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1983
2340
|
}) : void 0);
|
|
1984
2341
|
[this.#sourceApiName, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
|
|
@@ -1994,7 +2351,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
1994
2351
|
type: "object",
|
|
1995
2352
|
apiName: this.#sourceApiName
|
|
1996
2353
|
};
|
|
1997
|
-
const sourceMetadata = await client[
|
|
2354
|
+
const sourceMetadata = await client[chunkVVKEXIIO_cjs.additionalContext].ontologyProvider.getObjectDefinition(this.#sourceApiName);
|
|
1998
2355
|
if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {
|
|
1999
2356
|
const linkDef = sourceMetadata.links?.[this.#linkName];
|
|
2000
2357
|
if (!linkDef?.targetType) {
|
|
@@ -2011,7 +2368,8 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2011
2368
|
}
|
|
2012
2369
|
const queryParams = {
|
|
2013
2370
|
$pageSize: this.options.pageSize || 100,
|
|
2014
|
-
$nextPageToken: this.nextPageToken
|
|
2371
|
+
$nextPageToken: this.nextPageToken,
|
|
2372
|
+
$includeRid: true
|
|
2015
2373
|
};
|
|
2016
2374
|
if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {
|
|
2017
2375
|
queryParams.$orderBy = this.#orderBy;
|
|
@@ -2065,7 +2423,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2065
2423
|
return this.revalidate(true);
|
|
2066
2424
|
} else {
|
|
2067
2425
|
return (async () => {
|
|
2068
|
-
const sourceMetadata = await this.store.client[
|
|
2426
|
+
const sourceMetadata = await this.store.client[chunkVVKEXIIO_cjs.additionalContext].ontologyProvider.getObjectDefinition(this.#sourceApiName);
|
|
2069
2427
|
const linkDef = sourceMetadata.links?.[this.#linkName];
|
|
2070
2428
|
if (!linkDef || linkDef.targetType !== objectType) return;
|
|
2071
2429
|
const promise = this.revalidate(true);
|
|
@@ -2281,7 +2639,7 @@ function evaluateFilter(f, realValue, expected, strict) {
|
|
|
2281
2639
|
case "$ne":
|
|
2282
2640
|
return realValue !== expected;
|
|
2283
2641
|
case "$in":
|
|
2284
|
-
return expected
|
|
2642
|
+
return Array.isArray(expected) && expected.includes(realValue);
|
|
2285
2643
|
case "$isNull":
|
|
2286
2644
|
return realValue == null;
|
|
2287
2645
|
case "$startsWith":
|
|
@@ -2373,7 +2731,7 @@ var ListQuery = class extends BaseListQuery {
|
|
|
2373
2731
|
batch.changes.registerList(this.cacheKey);
|
|
2374
2732
|
}
|
|
2375
2733
|
constructor(store, subject, apiName, cacheKey, opts) {
|
|
2376
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
2734
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkVVKEXIIO_cjs.additionalContext].logger?.child({}, {
|
|
2377
2735
|
msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
2378
2736
|
}) : void 0);
|
|
2379
2737
|
this.apiName = apiName;
|
|
@@ -2411,15 +2769,16 @@ var ListQuery = class extends BaseListQuery {
|
|
|
2411
2769
|
*/
|
|
2412
2770
|
async fetchPageData(signal) {
|
|
2413
2771
|
if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
2414
|
-
const wireObjectSet =
|
|
2772
|
+
const wireObjectSet = chunkVVKEXIIO_cjs.getWireObjectSet(this.#objectSet);
|
|
2415
2773
|
const {
|
|
2416
2774
|
resultType
|
|
2417
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
2775
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkVVKEXIIO_cjs.additionalContext], wireObjectSet);
|
|
2418
2776
|
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#orderBy);
|
|
2419
2777
|
}
|
|
2420
2778
|
const resp = await this.#objectSet.fetchPage({
|
|
2421
2779
|
$nextPageToken: this.nextPageToken,
|
|
2422
2780
|
$pageSize: this.options.pageSize,
|
|
2781
|
+
$includeRid: true,
|
|
2423
2782
|
// For now this keeps the shared test code from falling apart
|
|
2424
2783
|
// but shouldn't be needed ideally
|
|
2425
2784
|
...Object.keys(this.#orderBy).length > 0 ? {
|
|
@@ -2442,8 +2801,10 @@ var ListQuery = class extends BaseListQuery {
|
|
|
2442
2801
|
handleFetchError(error, _status, batch) {
|
|
2443
2802
|
this.logger?.error("error", error);
|
|
2444
2803
|
this.store.subjects.get(this.cacheKey).error(error);
|
|
2804
|
+
const existingTotalCount = batch.read(this.cacheKey)?.value?.totalCount;
|
|
2445
2805
|
return this.writeToStore({
|
|
2446
|
-
data: []
|
|
2806
|
+
data: [],
|
|
2807
|
+
totalCount: existingTotalCount
|
|
2447
2808
|
}, "error", batch);
|
|
2448
2809
|
}
|
|
2449
2810
|
/**
|
|
@@ -2521,12 +2882,14 @@ var ListQuery = class extends BaseListQuery {
|
|
|
2521
2882
|
for (const obj of toAdd) {
|
|
2522
2883
|
newList.push(this.getObjectCacheKey(obj));
|
|
2523
2884
|
}
|
|
2885
|
+
const existingTotalCount = batch.read(this.cacheKey)?.value?.totalCount;
|
|
2524
2886
|
this._updateList(
|
|
2525
2887
|
newList,
|
|
2526
2888
|
status,
|
|
2527
2889
|
batch,
|
|
2528
2890
|
/* append */
|
|
2529
|
-
false
|
|
2891
|
+
false,
|
|
2892
|
+
existingTotalCount
|
|
2530
2893
|
);
|
|
2531
2894
|
});
|
|
2532
2895
|
if (needsRevalidation) {
|
|
@@ -2601,8 +2964,10 @@ var ListQuery = class extends BaseListQuery {
|
|
|
2601
2964
|
const newObjects = existing.value?.data.filter((o) => o !== objectCacheKey);
|
|
2602
2965
|
if (newObjects?.length !== existing.value?.data.length) {
|
|
2603
2966
|
batch.changes.registerList(this.cacheKey);
|
|
2967
|
+
const existingTotalCount = existing.value?.totalCount;
|
|
2604
2968
|
batch.write(this.cacheKey, {
|
|
2605
|
-
data: newObjects ?? []
|
|
2969
|
+
data: newObjects ?? [],
|
|
2970
|
+
totalCount: existingTotalCount
|
|
2606
2971
|
}, "loaded");
|
|
2607
2972
|
}
|
|
2608
2973
|
return;
|
|
@@ -2660,9 +3025,20 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
2660
3025
|
async postProcessFetchedData(data) {
|
|
2661
3026
|
return reloadDataAsFullObjects(this.store.client, data);
|
|
2662
3027
|
}
|
|
3028
|
+
createPayload(params) {
|
|
3029
|
+
const resolvedList = params.resolvedData.map((obj) => obj.$as(this.apiName));
|
|
3030
|
+
return {
|
|
3031
|
+
resolvedList,
|
|
3032
|
+
isOptimistic: params.isOptimistic,
|
|
3033
|
+
fetchMore: this.fetchMore,
|
|
3034
|
+
hasMore: this.nextPageToken != null,
|
|
3035
|
+
status: params.status,
|
|
3036
|
+
lastUpdated: params.lastUpdated
|
|
3037
|
+
};
|
|
3038
|
+
}
|
|
2663
3039
|
extractRelevantObjects(changes) {
|
|
2664
3040
|
const matchesApiName = ([, object]) => {
|
|
2665
|
-
return this.apiName in object[
|
|
3041
|
+
return this.apiName in object[chunk7543GRIE_cjs.ObjectDefRef].interfaceMap;
|
|
2666
3042
|
};
|
|
2667
3043
|
const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
2668
3044
|
const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
@@ -2681,22 +3057,30 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
2681
3057
|
}
|
|
2682
3058
|
};
|
|
2683
3059
|
async function reloadDataAsFullObjects(client, data) {
|
|
3060
|
+
if (data.length === 0) {
|
|
3061
|
+
return data;
|
|
3062
|
+
}
|
|
2684
3063
|
const groups = groupBy__default.default(data, (x) => x.$objectType);
|
|
2685
3064
|
const objectTypeToPrimaryKeyToObject = Object.fromEntries(await Promise.all(Object.entries(groups).map(async ([apiName, objects]) => {
|
|
2686
|
-
const objectDef =
|
|
3065
|
+
const objectDef = await client.fetchMetadata({
|
|
3066
|
+
type: "object",
|
|
3067
|
+
apiName
|
|
3068
|
+
});
|
|
2687
3069
|
const where = {
|
|
2688
3070
|
[objectDef.primaryKeyApiName]: {
|
|
2689
3071
|
$in: objects.map((x) => x.$primaryKey)
|
|
2690
3072
|
}
|
|
2691
3073
|
};
|
|
2692
|
-
const result = await client(objectDef).where(where).fetchPage(
|
|
3074
|
+
const result = await client(objectDef).where(where).fetchPage({
|
|
3075
|
+
$includeRid: true
|
|
3076
|
+
});
|
|
2693
3077
|
return [apiName, Object.fromEntries(result.data.map((x) => [x.$primaryKey, x]))];
|
|
2694
3078
|
})));
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
3079
|
+
return data.map((obj) => {
|
|
3080
|
+
const fullObject = objectTypeToPrimaryKeyToObject[obj.$objectType][obj.$primaryKey];
|
|
3081
|
+
!fullObject ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Could not find object ${obj.$objectType} ${obj.$primaryKey}`) : invariant5__default.default(false) : void 0;
|
|
3082
|
+
return fullObject;
|
|
2698
3083
|
});
|
|
2699
|
-
return data;
|
|
2700
3084
|
}
|
|
2701
3085
|
|
|
2702
3086
|
// src/observable/internal/list/ObjectListQuery.ts
|
|
@@ -2706,16 +3090,22 @@ var ObjectListQuery = class extends ListQuery {
|
|
|
2706
3090
|
const rdpConfig = this.cacheKey.otherKeys[RDP_IDX2];
|
|
2707
3091
|
const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX];
|
|
2708
3092
|
const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
|
|
3093
|
+
const rids = this.cacheKey.otherKeys[RIDS_IDX];
|
|
3094
|
+
const clientCtx = store.client[chunkVVKEXIIO_cjs.additionalContext];
|
|
3095
|
+
const typeDefinition = {
|
|
3096
|
+
type: "object",
|
|
3097
|
+
apiName: this.apiName
|
|
3098
|
+
};
|
|
2709
3099
|
if (pivotInfo != null) {
|
|
2710
|
-
|
|
3100
|
+
let sourceSet = store.client({
|
|
2711
3101
|
type: "object",
|
|
2712
3102
|
apiName: pivotInfo.sourceType
|
|
2713
3103
|
});
|
|
3104
|
+
sourceSet = sourceSet.where(this.canonicalWhere);
|
|
2714
3105
|
let objectSet2 = sourceSet.pivotTo(pivotInfo.linkName);
|
|
2715
3106
|
if (rdpConfig != null) {
|
|
2716
3107
|
objectSet2 = objectSet2.withProperties(rdpConfig);
|
|
2717
3108
|
}
|
|
2718
|
-
objectSet2 = objectSet2.where(this.canonicalWhere);
|
|
2719
3109
|
if (intersectWith != null && intersectWith.length > 0) {
|
|
2720
3110
|
const intersectSets = intersectWith.map((whereClause) => {
|
|
2721
3111
|
let intersectSet = store.client({
|
|
@@ -2731,10 +3121,15 @@ var ObjectListQuery = class extends ListQuery {
|
|
|
2731
3121
|
}
|
|
2732
3122
|
return objectSet2;
|
|
2733
3123
|
}
|
|
2734
|
-
let objectSet
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
3124
|
+
let objectSet;
|
|
3125
|
+
if (rids != null) {
|
|
3126
|
+
objectSet = clientCtx.objectSetFactory(typeDefinition, clientCtx, {
|
|
3127
|
+
type: "static",
|
|
3128
|
+
objects: [...rids]
|
|
3129
|
+
});
|
|
3130
|
+
} else {
|
|
3131
|
+
objectSet = store.client(typeDefinition);
|
|
3132
|
+
}
|
|
2738
3133
|
if (rdpConfig != null) {
|
|
2739
3134
|
objectSet = objectSet.withProperties(rdpConfig);
|
|
2740
3135
|
}
|
|
@@ -2783,13 +3178,14 @@ var ObjectListQuery = class extends ListQuery {
|
|
|
2783
3178
|
|
|
2784
3179
|
// src/observable/internal/list/ListsHelper.ts
|
|
2785
3180
|
var ListsHelper = class extends AbstractHelper {
|
|
2786
|
-
constructor(store, cacheKeys, whereCanonicalizer2, orderByCanonicalizer2, rdpCanonicalizer, intersectCanonicalizer, pivotCanonicalizer) {
|
|
3181
|
+
constructor(store, cacheKeys, whereCanonicalizer2, orderByCanonicalizer2, rdpCanonicalizer, intersectCanonicalizer, pivotCanonicalizer, ridListCanonicalizer) {
|
|
2787
3182
|
super(store, cacheKeys);
|
|
2788
3183
|
this.whereCanonicalizer = whereCanonicalizer2;
|
|
2789
3184
|
this.orderByCanonicalizer = orderByCanonicalizer2;
|
|
2790
3185
|
this.rdpCanonicalizer = rdpCanonicalizer;
|
|
2791
3186
|
this.intersectCanonicalizer = intersectCanonicalizer;
|
|
2792
3187
|
this.pivotCanonicalizer = pivotCanonicalizer;
|
|
3188
|
+
this.ridListCanonicalizer = ridListCanonicalizer;
|
|
2793
3189
|
}
|
|
2794
3190
|
observe(options, subFn) {
|
|
2795
3191
|
const ret = super.observe(options, subFn);
|
|
@@ -2805,7 +3201,8 @@ var ListsHelper = class extends AbstractHelper {
|
|
|
2805
3201
|
orderBy,
|
|
2806
3202
|
withProperties,
|
|
2807
3203
|
intersectWith,
|
|
2808
|
-
pivotTo
|
|
3204
|
+
pivotTo,
|
|
3205
|
+
rids
|
|
2809
3206
|
} = options;
|
|
2810
3207
|
const {
|
|
2811
3208
|
apiName,
|
|
@@ -2816,7 +3213,8 @@ var ListsHelper = class extends AbstractHelper {
|
|
|
2816
3213
|
const canonRdp = withProperties ? this.rdpCanonicalizer.canonicalize(withProperties) : void 0;
|
|
2817
3214
|
const canonIntersect = intersectWith && intersectWith.length > 0 ? this.intersectCanonicalizer.canonicalize(intersectWith) : void 0;
|
|
2818
3215
|
const canonPivot = pivotTo ? this.pivotCanonicalizer.canonicalize(apiName, pivotTo) : void 0;
|
|
2819
|
-
const
|
|
3216
|
+
const canonRids = rids != null ? this.ridListCanonicalizer.canonicalize(rids) : void 0;
|
|
3217
|
+
const listCacheKey = this.cacheKeys.get("list", type, apiName, canonWhere, canonOrderBy, canonRdp, canonIntersect, canonPivot, canonRids);
|
|
2820
3218
|
return this.store.queries.get(listCacheKey, () => {
|
|
2821
3219
|
const QueryClass = type === "object" ? ObjectListQuery : InterfaceListQuery;
|
|
2822
3220
|
return new QueryClass(this.store, this.store.subjects.get(listCacheKey), apiName, listCacheKey, options);
|
|
@@ -2844,20 +3242,21 @@ function stripRdpFields(value, rdpFields) {
|
|
|
2844
3242
|
if (rdpFields.size === 0) {
|
|
2845
3243
|
return value;
|
|
2846
3244
|
}
|
|
2847
|
-
const underlying = value[
|
|
2848
|
-
const objectDef = value[
|
|
3245
|
+
const underlying = value[chunk7543GRIE_cjs.UnderlyingOsdkObject];
|
|
3246
|
+
const objectDef = value[chunk7543GRIE_cjs.ObjectDefRef];
|
|
2849
3247
|
const newProps = {
|
|
2850
3248
|
$apiName: underlying.$apiName,
|
|
2851
3249
|
$objectType: underlying.$objectType,
|
|
2852
3250
|
$primaryKey: underlying.$primaryKey,
|
|
2853
|
-
$title: underlying.$title
|
|
3251
|
+
$title: underlying.$title,
|
|
3252
|
+
$rid: underlying.$rid
|
|
2854
3253
|
};
|
|
2855
3254
|
for (const key of Object.keys(underlying)) {
|
|
2856
3255
|
if (key in objectDef.properties && !rdpFields.has(key)) {
|
|
2857
3256
|
newProps[key] = underlying[key];
|
|
2858
3257
|
}
|
|
2859
3258
|
}
|
|
2860
|
-
return
|
|
3259
|
+
return chunk7543GRIE_cjs.createOsdkObject(value[chunk7543GRIE_cjs.ClientRef], objectDef, newProps);
|
|
2861
3260
|
}
|
|
2862
3261
|
function isSuperset(superset, subset) {
|
|
2863
3262
|
for (const field of subset) {
|
|
@@ -2868,13 +3267,14 @@ function isSuperset(superset, subset) {
|
|
|
2868
3267
|
return true;
|
|
2869
3268
|
}
|
|
2870
3269
|
function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
2871
|
-
const underlying = value[
|
|
2872
|
-
const objectDef = value[
|
|
3270
|
+
const underlying = value[chunk7543GRIE_cjs.UnderlyingOsdkObject];
|
|
3271
|
+
const objectDef = value[chunk7543GRIE_cjs.ObjectDefRef];
|
|
2873
3272
|
const newProps = {
|
|
2874
3273
|
$apiName: underlying.$apiName,
|
|
2875
3274
|
$objectType: underlying.$objectType,
|
|
2876
3275
|
$primaryKey: underlying.$primaryKey,
|
|
2877
|
-
$title: underlying.$title
|
|
3276
|
+
$title: underlying.$title,
|
|
3277
|
+
$rid: underlying.$rid
|
|
2878
3278
|
};
|
|
2879
3279
|
for (const key of Object.keys(underlying)) {
|
|
2880
3280
|
if (key in objectDef.properties) {
|
|
@@ -2884,7 +3284,7 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
|
2884
3284
|
}
|
|
2885
3285
|
}
|
|
2886
3286
|
}
|
|
2887
|
-
return
|
|
3287
|
+
return chunk7543GRIE_cjs.createOsdkObject(value[chunk7543GRIE_cjs.ClientRef], objectDef, newProps);
|
|
2888
3288
|
}
|
|
2889
3289
|
function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
|
|
2890
3290
|
if (targetRdpFields.size === 0) {
|
|
@@ -2896,13 +3296,14 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
2896
3296
|
}
|
|
2897
3297
|
return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
|
|
2898
3298
|
}
|
|
2899
|
-
const sourceUnderlying = sourceValue[
|
|
2900
|
-
const objectDef = sourceValue[
|
|
3299
|
+
const sourceUnderlying = sourceValue[chunk7543GRIE_cjs.UnderlyingOsdkObject];
|
|
3300
|
+
const objectDef = sourceValue[chunk7543GRIE_cjs.ObjectDefRef];
|
|
2901
3301
|
const newProps = {
|
|
2902
3302
|
$apiName: sourceUnderlying.$apiName,
|
|
2903
3303
|
$objectType: sourceUnderlying.$objectType,
|
|
2904
3304
|
$primaryKey: sourceUnderlying.$primaryKey,
|
|
2905
|
-
$title: sourceUnderlying.$title
|
|
3305
|
+
$title: sourceUnderlying.$title,
|
|
3306
|
+
$rid: sourceUnderlying.$rid
|
|
2906
3307
|
};
|
|
2907
3308
|
for (const key of Object.keys(sourceUnderlying)) {
|
|
2908
3309
|
if (key in objectDef.properties && (!sourceRdpFields.has(key) || targetRdpFields.has(key))) {
|
|
@@ -2910,14 +3311,14 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
2910
3311
|
}
|
|
2911
3312
|
}
|
|
2912
3313
|
if (targetCurrentValue) {
|
|
2913
|
-
const targetUnderlying = targetCurrentValue[
|
|
3314
|
+
const targetUnderlying = targetCurrentValue[chunk7543GRIE_cjs.UnderlyingOsdkObject];
|
|
2914
3315
|
for (const field of targetRdpFields) {
|
|
2915
3316
|
if (!sourceRdpFields.has(field) && field in targetUnderlying) {
|
|
2916
3317
|
newProps[field] = targetUnderlying[field];
|
|
2917
3318
|
}
|
|
2918
3319
|
}
|
|
2919
3320
|
}
|
|
2920
|
-
return
|
|
3321
|
+
return chunk7543GRIE_cjs.createOsdkObject(sourceValue[chunk7543GRIE_cjs.ClientRef], objectDef, newProps);
|
|
2921
3322
|
}
|
|
2922
3323
|
|
|
2923
3324
|
// src/observable/internal/object/ObjectCacheKeyRegistry.ts
|
|
@@ -3052,7 +3453,7 @@ var BulkObjectLoader = class {
|
|
|
3052
3453
|
#maxEntries;
|
|
3053
3454
|
constructor(client, maxWait = 25, maxEntries = 100) {
|
|
3054
3455
|
this.#client = client;
|
|
3055
|
-
this.#logger = client[
|
|
3456
|
+
this.#logger = client[chunkVVKEXIIO_cjs.additionalContext].logger;
|
|
3056
3457
|
this.#maxWait = maxWait;
|
|
3057
3458
|
this.#maxEntries = maxEntries;
|
|
3058
3459
|
}
|
|
@@ -3099,7 +3500,8 @@ var BulkObjectLoader = class {
|
|
|
3099
3500
|
const {
|
|
3100
3501
|
data
|
|
3101
3502
|
} = await this.#client(miniDef).where(whereClause).fetchPage({
|
|
3102
|
-
$pageSize: pks.length
|
|
3503
|
+
$pageSize: pks.length,
|
|
3504
|
+
$includeRid: true
|
|
3103
3505
|
});
|
|
3104
3506
|
for (const {
|
|
3105
3507
|
primaryKey,
|
|
@@ -3120,7 +3522,7 @@ var ObjectQuery = class extends Query {
|
|
|
3120
3522
|
#apiName;
|
|
3121
3523
|
#pk;
|
|
3122
3524
|
constructor(store, subject, type, pk, cacheKey, opts) {
|
|
3123
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3525
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkVVKEXIIO_cjs.additionalContext].logger?.child({}, {
|
|
3124
3526
|
msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3125
3527
|
}) : void 0);
|
|
3126
3528
|
this.#apiName = type;
|
|
@@ -3149,7 +3551,20 @@ var ObjectQuery = class extends Query {
|
|
|
3149
3551
|
methodName: "_fetchAndStore"
|
|
3150
3552
|
}).debug("calling _fetchAndStore");
|
|
3151
3553
|
}
|
|
3152
|
-
const
|
|
3554
|
+
const rdpConfig = this.cacheKey.otherKeys[RDP_CONFIG_IDX];
|
|
3555
|
+
let obj;
|
|
3556
|
+
if (rdpConfig) {
|
|
3557
|
+
const miniDef = {
|
|
3558
|
+
type: "object",
|
|
3559
|
+
apiName: this.#apiName
|
|
3560
|
+
};
|
|
3561
|
+
const fetched = await this.store.client(miniDef).withProperties(rdpConfig).fetchOne(this.#pk, {
|
|
3562
|
+
$includeRid: true
|
|
3563
|
+
});
|
|
3564
|
+
obj = fetched;
|
|
3565
|
+
} else {
|
|
3566
|
+
obj = await getBulkObjectLoader(this.store.client).fetch(this.#apiName, this.#pk);
|
|
3567
|
+
}
|
|
3153
3568
|
this.store.batch({}, (batch) => {
|
|
3154
3569
|
this.writeToStore(obj, "loaded", batch);
|
|
3155
3570
|
});
|
|
@@ -3199,7 +3614,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
3199
3614
|
*/
|
|
3200
3615
|
storeOsdkInstances(values, batch, rdpConfig) {
|
|
3201
3616
|
return values.map((v) => this.getQuery({
|
|
3202
|
-
apiName: v.$apiName,
|
|
3617
|
+
apiName: v.$objectType ?? v.$apiName,
|
|
3203
3618
|
pk: v.$primaryKey
|
|
3204
3619
|
}, rdpConfig).writeToStore(v, "loaded", batch).cacheKey);
|
|
3205
3620
|
}
|
|
@@ -3268,7 +3683,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3268
3683
|
#composedObjectSet;
|
|
3269
3684
|
#objectTypes;
|
|
3270
3685
|
constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
|
|
3271
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3686
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkVVKEXIIO_cjs.additionalContext].logger?.child({}, {
|
|
3272
3687
|
msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3273
3688
|
}) : void 0);
|
|
3274
3689
|
this.#baseObjectSetWire = baseObjectSetWire;
|
|
@@ -3313,7 +3728,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3313
3728
|
}
|
|
3314
3729
|
if (opts.union) {
|
|
3315
3730
|
for (const os of opts.union) {
|
|
3316
|
-
const wire =
|
|
3731
|
+
const wire = chunkVVKEXIIO_cjs.getWireObjectSet(os);
|
|
3317
3732
|
if (wire.type) {
|
|
3318
3733
|
types.add(wire.type);
|
|
3319
3734
|
}
|
|
@@ -3321,7 +3736,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3321
3736
|
}
|
|
3322
3737
|
if (opts.intersect) {
|
|
3323
3738
|
for (const os of opts.intersect) {
|
|
3324
|
-
const wire =
|
|
3739
|
+
const wire = chunkVVKEXIIO_cjs.getWireObjectSet(os);
|
|
3325
3740
|
if (wire.type) {
|
|
3326
3741
|
types.add(wire.type);
|
|
3327
3742
|
}
|
|
@@ -3329,7 +3744,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3329
3744
|
}
|
|
3330
3745
|
if (opts.subtract) {
|
|
3331
3746
|
for (const os of opts.subtract) {
|
|
3332
|
-
const wire =
|
|
3747
|
+
const wire = chunkVVKEXIIO_cjs.getWireObjectSet(os);
|
|
3333
3748
|
if (wire.type) {
|
|
3334
3749
|
types.add(wire.type);
|
|
3335
3750
|
}
|
|
@@ -3349,15 +3764,16 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3349
3764
|
*/
|
|
3350
3765
|
async fetchPageData(signal) {
|
|
3351
3766
|
if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
3352
|
-
const wireObjectSet =
|
|
3767
|
+
const wireObjectSet = chunkVVKEXIIO_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
3353
3768
|
const {
|
|
3354
3769
|
resultType
|
|
3355
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3770
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkVVKEXIIO_cjs.additionalContext], wireObjectSet);
|
|
3356
3771
|
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy);
|
|
3357
3772
|
}
|
|
3358
3773
|
const resp = await this.#composedObjectSet.fetchPage({
|
|
3359
3774
|
$nextPageToken: this.nextPageToken,
|
|
3360
3775
|
$pageSize: this.options.pageSize,
|
|
3776
|
+
$includeRid: true,
|
|
3361
3777
|
// OrderBy is already applied in the composed ObjectSet
|
|
3362
3778
|
...this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 ? {
|
|
3363
3779
|
$orderBy: this.#operations.orderBy
|
|
@@ -3372,8 +3788,10 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3372
3788
|
handleFetchError(error, _status, batch) {
|
|
3373
3789
|
this.logger?.error("error", error);
|
|
3374
3790
|
this.store.subjects.get(this.cacheKey).error(error);
|
|
3791
|
+
const existingTotalCount = batch.read(this.cacheKey)?.value?.totalCount;
|
|
3375
3792
|
return this.writeToStore({
|
|
3376
|
-
data: []
|
|
3793
|
+
data: [],
|
|
3794
|
+
totalCount: existingTotalCount
|
|
3377
3795
|
}, "error", batch);
|
|
3378
3796
|
}
|
|
3379
3797
|
registerStreamUpdates(sub) {
|
|
@@ -3394,7 +3812,8 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3394
3812
|
hasMore: this.nextPageToken != null,
|
|
3395
3813
|
status: params.status,
|
|
3396
3814
|
lastUpdated: params.lastUpdated,
|
|
3397
|
-
objectSet: this.#composedObjectSet
|
|
3815
|
+
objectSet: this.#composedObjectSet,
|
|
3816
|
+
totalCount: params.totalCount
|
|
3398
3817
|
};
|
|
3399
3818
|
}
|
|
3400
3819
|
};
|
|
@@ -3417,7 +3836,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
3417
3836
|
const {
|
|
3418
3837
|
baseObjectSet
|
|
3419
3838
|
} = options;
|
|
3420
|
-
const baseObjectSetWire = JSON.stringify(
|
|
3839
|
+
const baseObjectSetWire = JSON.stringify(chunkVVKEXIIO_cjs.getWireObjectSet(baseObjectSet));
|
|
3421
3840
|
const operations = this.buildCanonicalizedOperations(options);
|
|
3422
3841
|
const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
|
|
3423
3842
|
return this.store.queries.get(objectSetCacheKey, () => {
|
|
@@ -3433,13 +3852,13 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
3433
3852
|
operations.withProperties = Object.keys(options.withProperties).sort();
|
|
3434
3853
|
}
|
|
3435
3854
|
if (options.union && options.union.length > 0) {
|
|
3436
|
-
operations.union = options.union.map((os) => JSON.stringify(
|
|
3855
|
+
operations.union = options.union.map((os) => JSON.stringify(chunkVVKEXIIO_cjs.getWireObjectSet(os)));
|
|
3437
3856
|
}
|
|
3438
3857
|
if (options.intersect && options.intersect.length > 0) {
|
|
3439
|
-
operations.intersect = options.intersect.map((os) => JSON.stringify(
|
|
3858
|
+
operations.intersect = options.intersect.map((os) => JSON.stringify(chunkVVKEXIIO_cjs.getWireObjectSet(os)));
|
|
3440
3859
|
}
|
|
3441
3860
|
if (options.subtract && options.subtract.length > 0) {
|
|
3442
|
-
operations.subtract = options.subtract.map((os) => JSON.stringify(
|
|
3861
|
+
operations.subtract = options.subtract.map((os) => JSON.stringify(chunkVVKEXIIO_cjs.getWireObjectSet(os)));
|
|
3443
3862
|
}
|
|
3444
3863
|
if (options.pivotTo) {
|
|
3445
3864
|
operations.pivotTo = options.pivotTo;
|
|
@@ -3511,7 +3930,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
|
|
|
3511
3930
|
apiName: "__rdp_canonicalizer_holder__"
|
|
3512
3931
|
};
|
|
3513
3932
|
for (const [key, rdpFunction] of Object.entries(rdp)) {
|
|
3514
|
-
const builder =
|
|
3933
|
+
const builder = chunkVVKEXIIO_cjs.createWithPropertiesObjectSet(
|
|
3515
3934
|
objectTypeHolder,
|
|
3516
3935
|
{
|
|
3517
3936
|
type: "methodInput"
|
|
@@ -3545,6 +3964,22 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
|
|
|
3545
3964
|
}
|
|
3546
3965
|
};
|
|
3547
3966
|
|
|
3967
|
+
// src/observable/internal/RidListCanonicalizer.ts
|
|
3968
|
+
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
3969
|
+
var RidListCanonicalizer = class {
|
|
3970
|
+
cache = /* @__PURE__ */ new Map();
|
|
3971
|
+
canonicalize(rids) {
|
|
3972
|
+
const sorted = [...new Set(rids)].sort();
|
|
3973
|
+
const key = sorted.join("\0");
|
|
3974
|
+
let canonical = this.cache.get(key);
|
|
3975
|
+
if (!canonical) {
|
|
3976
|
+
canonical = sorted;
|
|
3977
|
+
this.cache.set(key, canonical);
|
|
3978
|
+
}
|
|
3979
|
+
return canonical;
|
|
3980
|
+
}
|
|
3981
|
+
};
|
|
3982
|
+
|
|
3548
3983
|
// src/observable/internal/Store.ts
|
|
3549
3984
|
var Store = class {
|
|
3550
3985
|
whereCanonicalizer = new WhereClauseCanonicalizer();
|
|
@@ -3552,6 +3987,7 @@ var Store = class {
|
|
|
3552
3987
|
rdpCanonicalizer = new RdpCanonicalizer();
|
|
3553
3988
|
intersectCanonicalizer = new IntersectCanonicalizer(this.whereCanonicalizer);
|
|
3554
3989
|
pivotCanonicalizer = new PivotCanonicalizer();
|
|
3990
|
+
ridListCanonicalizer = new RidListCanonicalizer();
|
|
3555
3991
|
/** @internal */
|
|
3556
3992
|
queries = new Queries();
|
|
3557
3993
|
objectCacheKeyRegistry = new ObjectCacheKeyRegistry();
|
|
@@ -3562,7 +3998,7 @@ var Store = class {
|
|
|
3562
3998
|
subjects = this.layers.subjects;
|
|
3563
3999
|
// these are hopefully temporary
|
|
3564
4000
|
constructor(client) {
|
|
3565
|
-
this.logger = client[
|
|
4001
|
+
this.logger = client[chunkVVKEXIIO_cjs.additionalContext].logger?.child({}, {
|
|
3566
4002
|
msgPrefix: "Store"
|
|
3567
4003
|
});
|
|
3568
4004
|
this.client = client;
|
|
@@ -3570,7 +4006,8 @@ var Store = class {
|
|
|
3570
4006
|
onDestroy: this.#cleanupCacheKey
|
|
3571
4007
|
});
|
|
3572
4008
|
this.aggregations = new AggregationsHelper(this, this.cacheKeys, this.whereCanonicalizer, this.rdpCanonicalizer);
|
|
3573
|
-
this.
|
|
4009
|
+
this.functions = new FunctionsHelper(this, this.cacheKeys);
|
|
4010
|
+
this.lists = new ListsHelper(this, this.cacheKeys, this.whereCanonicalizer, this.orderByCanonicalizer, this.rdpCanonicalizer, this.intersectCanonicalizer, this.pivotCanonicalizer, this.ridListCanonicalizer);
|
|
3574
4011
|
this.objects = new ObjectsHelper(this, this.cacheKeys);
|
|
3575
4012
|
this.links = new LinksHelper(this, this.cacheKeys, this.whereCanonicalizer, this.orderByCanonicalizer);
|
|
3576
4013
|
this.objectSets = new ObjectSetHelper(this, this.cacheKeys, this.whereCanonicalizer, this.orderByCanonicalizer);
|
|
@@ -3824,14 +4261,20 @@ var Store = class {
|
|
|
3824
4261
|
}
|
|
3825
4262
|
return Promise.allSettled(promises).then(() => void 0);
|
|
3826
4263
|
}
|
|
4264
|
+
async invalidateFunction(apiName, params) {
|
|
4265
|
+
return this.functions.invalidateFunction(apiName, params);
|
|
4266
|
+
}
|
|
4267
|
+
async invalidateFunctionsByObject(apiName, primaryKey) {
|
|
4268
|
+
return this.functions.invalidateFunctionsByObject(apiName, primaryKey);
|
|
4269
|
+
}
|
|
3827
4270
|
};
|
|
3828
4271
|
|
|
3829
4272
|
// src/observable/ObservableClient.ts
|
|
3830
4273
|
function createObservableClient(client) {
|
|
3831
|
-
const tweakedClient =
|
|
3832
|
-
...client[
|
|
3833
|
-
fetch: shared_net_fetch.createFetchHeaderMutator(client[
|
|
3834
|
-
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"),
|
|
4274
|
+
const tweakedClient = chunk7543GRIE_cjs.createClientFromContext({
|
|
4275
|
+
...client[chunkVVKEXIIO_cjs.additionalContext],
|
|
4276
|
+
fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkVVKEXIIO_cjs.additionalContext].fetch, (headers) => {
|
|
4277
|
+
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunk7543GRIE_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
|
|
3835
4278
|
return headers;
|
|
3836
4279
|
})
|
|
3837
4280
|
});
|
|
@@ -3875,11 +4318,11 @@ function getOsdkConfig(ontologyRid) {
|
|
|
3875
4318
|
|
|
3876
4319
|
Object.defineProperty(exports, "createClientWithTransaction", {
|
|
3877
4320
|
enumerable: true,
|
|
3878
|
-
get: function () { return
|
|
4321
|
+
get: function () { return chunk7543GRIE_cjs.createClientWithTransaction; }
|
|
3879
4322
|
});
|
|
3880
4323
|
Object.defineProperty(exports, "augment", {
|
|
3881
4324
|
enumerable: true,
|
|
3882
|
-
get: function () { return
|
|
4325
|
+
get: function () { return chunkVVKEXIIO_cjs.augment; }
|
|
3883
4326
|
});
|
|
3884
4327
|
exports.computeObjectSetCacheKey = computeObjectSetCacheKey;
|
|
3885
4328
|
exports.createObservableClient = createObservableClient;
|