@croct/sdk 0.17.11 → 0.18.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/activeRecord.cjs +1 -2
- package/activeRecord.d.cts +26 -0
- package/activeRecord.js +1 -2
- package/apiKey.cjs +0 -1
- package/apiKey.d.cts +48 -0
- package/apiKey.js +0 -1
- package/base64Url.cjs +0 -1
- package/base64Url.d.cts +4 -0
- package/base64Url.js +0 -1
- package/cache/cache.cjs +0 -1
- package/cache/cache.d.cts +17 -0
- package/cache/cache.js +0 -1
- package/cache/cookieCache.cjs +0 -1
- package/cache/cookieCache.d.cts +22 -0
- package/cache/cookieCache.js +0 -1
- package/cache/fallbackCache.cjs +0 -1
- package/cache/fallbackCache.d.cts +11 -0
- package/cache/fallbackCache.js +0 -1
- package/cache/inMemoryCache.cjs +0 -1
- package/cache/inMemoryCache.d.cts +11 -0
- package/cache/inMemoryCache.js +0 -1
- package/cache/index.cjs +5 -6
- package/cache/index.d.cts +4 -0
- package/cache/index.js +4 -5
- package/cache/localStorageCache.cjs +0 -1
- package/cache/localStorageCache.d.cts +19 -0
- package/cache/localStorageCache.js +0 -1
- package/channel/channel.cjs +1 -2
- package/channel/channel.d.cts +24 -0
- package/channel/channel.js +1 -2
- package/channel/encodedChannel.cjs +0 -1
- package/channel/encodedChannel.d.cts +12 -0
- package/channel/encodedChannel.js +0 -1
- package/channel/guaranteedChannel.cjs +2 -3
- package/channel/guaranteedChannel.d.cts +33 -0
- package/channel/guaranteedChannel.js +2 -3
- package/channel/httpBeaconChannel.cjs +5 -6
- package/channel/httpBeaconChannel.d.cts +26 -0
- package/channel/httpBeaconChannel.js +5 -6
- package/channel/index.cjs +8 -9
- package/channel/index.d.cts +12 -0
- package/channel/index.js +7 -8
- package/channel/queuedChannel.cjs +2 -3
- package/channel/queuedChannel.d.cts +21 -0
- package/channel/queuedChannel.js +2 -3
- package/channel/retryChannel.cjs +2 -3
- package/channel/retryChannel.d.cts +21 -0
- package/channel/retryChannel.js +2 -3
- package/channel/sandboxChannel.cjs +1 -2
- package/channel/sandboxChannel.d.cts +15 -0
- package/channel/sandboxChannel.js +1 -2
- package/cid/assigner.cjs +0 -1
- package/cid/assigner.d.cts +5 -0
- package/cid/assigner.js +0 -1
- package/cid/cachedAssigner.cjs +1 -2
- package/cid/cachedAssigner.d.cts +17 -0
- package/cid/cachedAssigner.js +1 -2
- package/cid/fixedAssigner.cjs +0 -1
- package/cid/fixedAssigner.d.cts +9 -0
- package/cid/fixedAssigner.js +0 -1
- package/cid/index.cjs +5 -6
- package/cid/index.d.cts +6 -0
- package/cid/index.js +4 -5
- package/cid/remoteAssigner.cjs +3 -4
- package/cid/remoteAssigner.d.cts +13 -0
- package/cid/remoteAssigner.js +3 -4
- package/constants.cjs +1 -2
- package/constants.d.cts +6 -0
- package/constants.d.ts +2 -2
- package/constants.js +1 -2
- package/container.cjs +18 -19
- package/container.d.cts +95 -0
- package/container.js +18 -19
- package/contentFetcher.cjs +4 -5
- package/contentFetcher.d.cts +69 -0
- package/contentFetcher.js +4 -5
- package/context.cjs +4 -5
- package/context.d.cts +36 -0
- package/context.js +4 -5
- package/error.cjs +0 -1
- package/error.d.cts +4 -0
- package/error.js +0 -1
- package/evaluator.cjs +5 -6
- package/evaluator.d.cts +86 -0
- package/evaluator.js +5 -6
- package/eventManager.cjs +0 -1
- package/eventManager.d.cts +21 -0
- package/eventManager.js +0 -1
- package/eventSubjectProcessor.cjs +0 -1
- package/eventSubjectProcessor.d.cts +22 -0
- package/eventSubjectProcessor.js +0 -1
- package/facade/contentFetcherFacade.cjs +2 -3
- package/facade/contentFetcherFacade.d.cts +36 -0
- package/facade/contentFetcherFacade.js +2 -3
- package/facade/evaluatorFacade.cjs +2 -3
- package/facade/evaluatorFacade.d.cts +41 -0
- package/facade/evaluatorFacade.js +2 -3
- package/facade/index.cjs +7 -10
- package/facade/index.d.cts +29 -0
- package/facade/index.js +7 -9
- package/facade/sdkFacade.cjs +10 -11
- package/facade/sdkFacade.d.cts +86 -0
- package/facade/sdkFacade.js +10 -11
- package/facade/sessionFacade.cjs +1 -2
- package/facade/sessionFacade.d.cts +22 -0
- package/facade/sessionFacade.js +1 -2
- package/facade/sessionPatch.cjs +1 -2
- package/facade/sessionPatch.d.cts +21 -0
- package/facade/sessionPatch.js +1 -2
- package/facade/trackerFacade.cjs +2 -3
- package/facade/trackerFacade.d.cts +25 -0
- package/facade/trackerFacade.js +2 -3
- package/facade/userFacade.cjs +1 -2
- package/facade/userFacade.d.cts +28 -0
- package/facade/userFacade.js +1 -2
- package/facade/userPatch.cjs +1 -2
- package/facade/userPatch.d.cts +21 -0
- package/facade/userPatch.js +1 -2
- package/help.cjs +0 -1
- package/help.d.cts +5 -0
- package/help.js +0 -1
- package/index.cjs +2 -5
- package/index.d.cts +25 -0
- package/index.js +2 -4
- package/logging/consoleLogger.cjs +0 -1
- package/logging/consoleLogger.d.cts +13 -0
- package/logging/consoleLogger.js +0 -1
- package/logging/filteredLogger.cjs +0 -1
- package/logging/filteredLogger.d.cts +22 -0
- package/logging/filteredLogger.js +0 -1
- package/logging/index.cjs +6 -7
- package/logging/index.d.cts +5 -0
- package/logging/index.js +5 -6
- package/logging/logger.cjs +0 -1
- package/logging/logger.d.cts +11 -0
- package/logging/logger.js +0 -1
- package/logging/namespacedLogger.cjs +0 -1
- package/logging/namespacedLogger.d.cts +14 -0
- package/logging/namespacedLogger.js +0 -1
- package/logging/nullLogger.cjs +0 -1
- package/logging/nullLogger.d.cts +10 -0
- package/logging/nullLogger.js +0 -1
- package/namespacedStorage.cjs +0 -1
- package/namespacedStorage.d.cts +16 -0
- package/namespacedStorage.js +0 -1
- package/package.json +4 -1
- package/patch.cjs +0 -1
- package/patch.d.cts +46 -0
- package/patch.js +0 -1
- package/queue/capacityRestrictedQueue.cjs +0 -1
- package/queue/capacityRestrictedQueue.d.cts +16 -0
- package/queue/capacityRestrictedQueue.js +0 -1
- package/queue/inMemoryQueue.cjs +0 -1
- package/queue/inMemoryQueue.d.cts +15 -0
- package/queue/inMemoryQueue.js +0 -1
- package/queue/index.cjs +6 -7
- package/queue/index.d.cts +6 -0
- package/queue/index.js +5 -6
- package/queue/monitoredQueue.cjs +1 -2
- package/queue/monitoredQueue.d.cts +28 -0
- package/queue/monitoredQueue.js +1 -2
- package/queue/persistentQueue.cjs +0 -1
- package/queue/persistentQueue.d.cts +18 -0
- package/queue/persistentQueue.js +0 -1
- package/queue/queue.cjs +0 -1
- package/queue/queue.d.cts +11 -0
- package/queue/queue.js +0 -1
- package/retry/arbitraryPolicy.cjs +0 -1
- package/retry/arbitraryPolicy.d.cts +10 -0
- package/retry/arbitraryPolicy.js +0 -1
- package/retry/backoffPolicy.cjs +0 -1
- package/retry/backoffPolicy.d.cts +26 -0
- package/retry/backoffPolicy.js +0 -1
- package/retry/index.cjs +6 -7
- package/retry/index.d.cts +5 -0
- package/retry/index.js +5 -6
- package/retry/maxAttemptsPolicy.cjs +0 -1
- package/retry/maxAttemptsPolicy.d.cts +11 -0
- package/retry/maxAttemptsPolicy.js +0 -1
- package/retry/neverPolicy.cjs +0 -1
- package/retry/neverPolicy.d.cts +8 -0
- package/retry/neverPolicy.js +0 -1
- package/retry/policy.cjs +0 -1
- package/retry/policy.d.cts +6 -0
- package/retry/policy.js +0 -1
- package/schema/attributeSchema.cjs +1 -2
- package/schema/attributeSchema.d.cts +6 -0
- package/schema/attributeSchema.js +1 -2
- package/schema/contentFetcherSchemas.cjs +1 -2
- package/schema/contentFetcherSchemas.d.cts +6 -0
- package/schema/contentFetcherSchemas.js +1 -2
- package/schema/contentSchemas.cjs +1 -2
- package/schema/contentSchemas.d.cts +6 -0
- package/schema/contentSchemas.js +1 -2
- package/schema/contextSchemas.cjs +1 -2
- package/schema/contextSchemas.d.cts +6 -0
- package/schema/contextSchemas.js +1 -2
- package/schema/ecommerceSchemas.cjs +1 -2
- package/schema/ecommerceSchemas.d.cts +10 -0
- package/schema/ecommerceSchemas.js +1 -2
- package/schema/evaluatorSchemas.cjs +1 -2
- package/schema/evaluatorSchemas.d.cts +6 -0
- package/schema/evaluatorSchemas.js +1 -2
- package/schema/eventSchemas.cjs +4 -5
- package/schema/eventSchemas.d.cts +16 -0
- package/schema/eventSchemas.js +4 -5
- package/schema/index.cjs +22 -23
- package/schema/index.d.cts +14 -0
- package/schema/index.js +11 -12
- package/schema/loggerSchema.cjs +1 -2
- package/schema/loggerSchema.d.cts +6 -0
- package/schema/loggerSchema.js +1 -2
- package/schema/operationSchemas.cjs +2 -3
- package/schema/operationSchemas.d.cts +14 -0
- package/schema/operationSchemas.js +2 -3
- package/schema/sdkFacadeSchemas.cjs +4 -5
- package/schema/sdkFacadeSchemas.d.cts +6 -0
- package/schema/sdkFacadeSchemas.js +4 -5
- package/schema/sdkSchemas.cjs +3 -4
- package/schema/sdkSchemas.d.cts +8 -0
- package/schema/sdkSchemas.js +3 -4
- package/schema/tokenSchema.cjs +1 -2
- package/schema/tokenSchema.d.cts +6 -0
- package/schema/tokenSchema.js +1 -2
- package/schema/userSchema.cjs +2 -3
- package/schema/userSchema.d.cts +6 -0
- package/schema/userSchema.js +2 -3
- package/sdk.cjs +4 -5
- package/sdk.d.cts +69 -0
- package/sdk.js +4 -5
- package/sdkEvents.cjs +0 -1
- package/sdkEvents.d.cts +15 -0
- package/sdkEvents.js +0 -1
- package/sourceLocation.cjs +0 -1
- package/sourceLocation.d.cts +14 -0
- package/sourceLocation.js +0 -1
- package/tab.cjs +1 -2
- package/tab.d.cts +40 -0
- package/tab.js +1 -2
- package/token/cachedTokenStore.cjs +1 -2
- package/token/cachedTokenStore.d.cts +13 -0
- package/token/cachedTokenStore.js +1 -2
- package/token/inMemoryTokenStore.cjs +0 -1
- package/token/inMemoryTokenStore.d.cts +11 -0
- package/token/inMemoryTokenStore.js +0 -1
- package/token/index.cjs +5 -6
- package/token/index.d.cts +7 -0
- package/token/index.js +4 -5
- package/token/replicatedTokenStore.cjs +0 -1
- package/token/replicatedTokenStore.d.cts +13 -0
- package/token/replicatedTokenStore.js +0 -1
- package/token/token.cjs +3 -4
- package/token/token.d.cts +70 -0
- package/token/token.js +3 -4
- package/tracker.cjs +3 -4
- package/tracker.d.cts +82 -0
- package/tracker.js +3 -4
- package/trackingEvents.cjs +0 -1
- package/trackingEvents.d.cts +309 -0
- package/trackingEvents.js +0 -1
- package/transformer.cjs +0 -1
- package/transformer.d.cts +6 -0
- package/transformer.js +0 -1
- package/utilityTypes.cjs +0 -1
- package/utilityTypes.d.cts +4 -0
- package/utilityTypes.js +0 -1
- package/uuid.cjs +0 -1
- package/uuid.d.cts +3 -0
- package/uuid.js +0 -1
- package/validation/arrayType.cjs +2 -3
- package/validation/arrayType.d.cts +16 -0
- package/validation/arrayType.js +2 -3
- package/validation/booleanType.cjs +2 -3
- package/validation/booleanType.d.cts +9 -0
- package/validation/booleanType.js +2 -3
- package/validation/functionType.cjs +2 -3
- package/validation/functionType.d.cts +9 -0
- package/validation/functionType.js +2 -3
- package/validation/index.cjs +14 -15
- package/validation/index.d.cts +12 -0
- package/validation/index.js +12 -13
- package/validation/jsonType.cjs +2 -3
- package/validation/jsonType.d.cts +35 -0
- package/validation/jsonType.js +2 -3
- package/validation/mixedSchema.cjs +0 -1
- package/validation/mixedSchema.d.cts +7 -0
- package/validation/mixedSchema.js +0 -1
- package/validation/nullType.cjs +2 -3
- package/validation/nullType.d.cts +9 -0
- package/validation/nullType.js +2 -3
- package/validation/numberType.cjs +2 -3
- package/validation/numberType.d.cts +16 -0
- package/validation/numberType.js +2 -3
- package/validation/objectType.cjs +3 -4
- package/validation/objectType.d.cts +30 -0
- package/validation/objectType.js +3 -4
- package/validation/schema.cjs +0 -1
- package/validation/schema.d.cts +18 -0
- package/validation/schema.js +0 -1
- package/validation/stringType.cjs +2 -3
- package/validation/stringType.d.cts +24 -0
- package/validation/stringType.js +2 -3
- package/validation/unionType.cjs +2 -3
- package/validation/unionType.d.cts +11 -0
- package/validation/unionType.js +2 -3
- package/validation/violation.cjs +0 -1
- package/validation/violation.d.cts +4 -0
- package/validation/violation.js +0 -1
- package/activeRecord.cjs.map +0 -1
- package/activeRecord.js.map +0 -1
- package/apiKey.cjs.map +0 -1
- package/apiKey.js.map +0 -1
- package/base64Url.cjs.map +0 -1
- package/base64Url.js.map +0 -1
- package/cache/cache.cjs.map +0 -1
- package/cache/cache.js.map +0 -1
- package/cache/cookieCache.cjs.map +0 -1
- package/cache/cookieCache.js.map +0 -1
- package/cache/fallbackCache.cjs.map +0 -1
- package/cache/fallbackCache.js.map +0 -1
- package/cache/inMemoryCache.cjs.map +0 -1
- package/cache/inMemoryCache.js.map +0 -1
- package/cache/index.cjs.map +0 -1
- package/cache/index.js.map +0 -1
- package/cache/localStorageCache.cjs.map +0 -1
- package/cache/localStorageCache.js.map +0 -1
- package/channel/channel.cjs.map +0 -1
- package/channel/channel.js.map +0 -1
- package/channel/encodedChannel.cjs.map +0 -1
- package/channel/encodedChannel.js.map +0 -1
- package/channel/guaranteedChannel.cjs.map +0 -1
- package/channel/guaranteedChannel.js.map +0 -1
- package/channel/httpBeaconChannel.cjs.map +0 -1
- package/channel/httpBeaconChannel.js.map +0 -1
- package/channel/index.cjs.map +0 -1
- package/channel/index.js.map +0 -1
- package/channel/queuedChannel.cjs.map +0 -1
- package/channel/queuedChannel.js.map +0 -1
- package/channel/retryChannel.cjs.map +0 -1
- package/channel/retryChannel.js.map +0 -1
- package/channel/sandboxChannel.cjs.map +0 -1
- package/channel/sandboxChannel.js.map +0 -1
- package/cid/assigner.cjs.map +0 -1
- package/cid/assigner.js.map +0 -1
- package/cid/cachedAssigner.cjs.map +0 -1
- package/cid/cachedAssigner.js.map +0 -1
- package/cid/fixedAssigner.cjs.map +0 -1
- package/cid/fixedAssigner.js.map +0 -1
- package/cid/index.cjs.map +0 -1
- package/cid/index.js.map +0 -1
- package/cid/remoteAssigner.cjs.map +0 -1
- package/cid/remoteAssigner.js.map +0 -1
- package/constants.cjs.map +0 -1
- package/constants.js.map +0 -1
- package/container.cjs.map +0 -1
- package/container.js.map +0 -1
- package/contentFetcher.cjs.map +0 -1
- package/contentFetcher.js.map +0 -1
- package/context.cjs.map +0 -1
- package/context.js.map +0 -1
- package/error.cjs.map +0 -1
- package/error.js.map +0 -1
- package/evaluator.cjs.map +0 -1
- package/evaluator.js.map +0 -1
- package/eventManager.cjs.map +0 -1
- package/eventManager.js.map +0 -1
- package/eventSubjectProcessor.cjs.map +0 -1
- package/eventSubjectProcessor.js.map +0 -1
- package/facade/contentFetcherFacade.cjs.map +0 -1
- package/facade/contentFetcherFacade.js.map +0 -1
- package/facade/evaluatorFacade.cjs.map +0 -1
- package/facade/evaluatorFacade.js.map +0 -1
- package/facade/index.cjs.map +0 -1
- package/facade/index.js.map +0 -1
- package/facade/sdkFacade.cjs.map +0 -1
- package/facade/sdkFacade.js.map +0 -1
- package/facade/sessionFacade.cjs.map +0 -1
- package/facade/sessionFacade.js.map +0 -1
- package/facade/sessionPatch.cjs.map +0 -1
- package/facade/sessionPatch.js.map +0 -1
- package/facade/trackerFacade.cjs.map +0 -1
- package/facade/trackerFacade.js.map +0 -1
- package/facade/userFacade.cjs.map +0 -1
- package/facade/userFacade.js.map +0 -1
- package/facade/userPatch.cjs.map +0 -1
- package/facade/userPatch.js.map +0 -1
- package/help.cjs.map +0 -1
- package/help.js.map +0 -1
- package/index.cjs.map +0 -1
- package/index.js.map +0 -1
- package/logging/consoleLogger.cjs.map +0 -1
- package/logging/consoleLogger.js.map +0 -1
- package/logging/filteredLogger.cjs.map +0 -1
- package/logging/filteredLogger.js.map +0 -1
- package/logging/index.cjs.map +0 -1
- package/logging/index.js.map +0 -1
- package/logging/logger.cjs.map +0 -1
- package/logging/logger.js.map +0 -1
- package/logging/namespacedLogger.cjs.map +0 -1
- package/logging/namespacedLogger.js.map +0 -1
- package/logging/nullLogger.cjs.map +0 -1
- package/logging/nullLogger.js.map +0 -1
- package/namespacedStorage.cjs.map +0 -1
- package/namespacedStorage.js.map +0 -1
- package/patch.cjs.map +0 -1
- package/patch.js.map +0 -1
- package/queue/capacityRestrictedQueue.cjs.map +0 -1
- package/queue/capacityRestrictedQueue.js.map +0 -1
- package/queue/inMemoryQueue.cjs.map +0 -1
- package/queue/inMemoryQueue.js.map +0 -1
- package/queue/index.cjs.map +0 -1
- package/queue/index.js.map +0 -1
- package/queue/monitoredQueue.cjs.map +0 -1
- package/queue/monitoredQueue.js.map +0 -1
- package/queue/persistentQueue.cjs.map +0 -1
- package/queue/persistentQueue.js.map +0 -1
- package/queue/queue.cjs.map +0 -1
- package/queue/queue.js.map +0 -1
- package/retry/arbitraryPolicy.cjs.map +0 -1
- package/retry/arbitraryPolicy.js.map +0 -1
- package/retry/backoffPolicy.cjs.map +0 -1
- package/retry/backoffPolicy.js.map +0 -1
- package/retry/index.cjs.map +0 -1
- package/retry/index.js.map +0 -1
- package/retry/maxAttemptsPolicy.cjs.map +0 -1
- package/retry/maxAttemptsPolicy.js.map +0 -1
- package/retry/neverPolicy.cjs.map +0 -1
- package/retry/neverPolicy.js.map +0 -1
- package/retry/policy.cjs.map +0 -1
- package/retry/policy.js.map +0 -1
- package/schema/attributeSchema.cjs.map +0 -1
- package/schema/attributeSchema.js.map +0 -1
- package/schema/contentFetcherSchemas.cjs.map +0 -1
- package/schema/contentFetcherSchemas.js.map +0 -1
- package/schema/contentSchemas.cjs.map +0 -1
- package/schema/contentSchemas.js.map +0 -1
- package/schema/contextSchemas.cjs.map +0 -1
- package/schema/contextSchemas.js.map +0 -1
- package/schema/ecommerceSchemas.cjs.map +0 -1
- package/schema/ecommerceSchemas.js.map +0 -1
- package/schema/evaluatorSchemas.cjs.map +0 -1
- package/schema/evaluatorSchemas.js.map +0 -1
- package/schema/eventSchemas.cjs.map +0 -1
- package/schema/eventSchemas.js.map +0 -1
- package/schema/index.cjs.map +0 -1
- package/schema/index.js.map +0 -1
- package/schema/loggerSchema.cjs.map +0 -1
- package/schema/loggerSchema.js.map +0 -1
- package/schema/operationSchemas.cjs.map +0 -1
- package/schema/operationSchemas.js.map +0 -1
- package/schema/sdkFacadeSchemas.cjs.map +0 -1
- package/schema/sdkFacadeSchemas.js.map +0 -1
- package/schema/sdkSchemas.cjs.map +0 -1
- package/schema/sdkSchemas.js.map +0 -1
- package/schema/tokenSchema.cjs.map +0 -1
- package/schema/tokenSchema.js.map +0 -1
- package/schema/userSchema.cjs.map +0 -1
- package/schema/userSchema.js.map +0 -1
- package/sdk.cjs.map +0 -1
- package/sdk.js.map +0 -1
- package/sdkEvents.cjs.map +0 -1
- package/sdkEvents.js.map +0 -1
- package/sourceLocation.cjs.map +0 -1
- package/sourceLocation.js.map +0 -1
- package/tab.cjs.map +0 -1
- package/tab.js.map +0 -1
- package/token/cachedTokenStore.cjs.map +0 -1
- package/token/cachedTokenStore.js.map +0 -1
- package/token/inMemoryTokenStore.cjs.map +0 -1
- package/token/inMemoryTokenStore.js.map +0 -1
- package/token/index.cjs.map +0 -1
- package/token/index.js.map +0 -1
- package/token/replicatedTokenStore.cjs.map +0 -1
- package/token/replicatedTokenStore.js.map +0 -1
- package/token/token.cjs.map +0 -1
- package/token/token.js.map +0 -1
- package/tracker.cjs.map +0 -1
- package/tracker.js.map +0 -1
- package/trackingEvents.cjs.map +0 -1
- package/trackingEvents.js.map +0 -1
- package/transformer.cjs.map +0 -1
- package/transformer.js.map +0 -1
- package/utilityTypes.cjs.map +0 -1
- package/utilityTypes.js.map +0 -1
- package/uuid.cjs.map +0 -1
- package/uuid.js.map +0 -1
- package/validation/arrayType.cjs.map +0 -1
- package/validation/arrayType.js.map +0 -1
- package/validation/booleanType.cjs.map +0 -1
- package/validation/booleanType.js.map +0 -1
- package/validation/functionType.cjs.map +0 -1
- package/validation/functionType.js.map +0 -1
- package/validation/index.cjs.map +0 -1
- package/validation/index.js.map +0 -1
- package/validation/jsonType.cjs.map +0 -1
- package/validation/jsonType.js.map +0 -1
- package/validation/mixedSchema.cjs.map +0 -1
- package/validation/mixedSchema.js.map +0 -1
- package/validation/nullType.cjs.map +0 -1
- package/validation/nullType.js.map +0 -1
- package/validation/numberType.cjs.map +0 -1
- package/validation/numberType.js.map +0 -1
- package/validation/objectType.cjs.map +0 -1
- package/validation/objectType.js.map +0 -1
- package/validation/schema.cjs.map +0 -1
- package/validation/schema.js.map +0 -1
- package/validation/stringType.cjs.map +0 -1
- package/validation/stringType.js.map +0 -1
- package/validation/unionType.cjs.map +0 -1
- package/validation/unionType.js.map +0 -1
- package/validation/violation.cjs.map +0 -1
- package/validation/violation.js.map +0 -1
package/context.cjs
CHANGED
|
@@ -20,10 +20,10 @@ __export(context_exports, {
|
|
|
20
20
|
Context: () => Context
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(context_exports);
|
|
23
|
-
var import_token = require(
|
|
24
|
-
var import_tab = require(
|
|
25
|
-
var import_uuid = require(
|
|
26
|
-
var import_cache = require(
|
|
23
|
+
var import_token = require('./token/index.cjs');
|
|
24
|
+
var import_tab = require('./tab.cjs');
|
|
25
|
+
var import_uuid = require('./uuid.cjs');
|
|
26
|
+
var import_cache = require('./cache/index.cjs');
|
|
27
27
|
function tokenEquals(left, right) {
|
|
28
28
|
return left === right || left !== null && right !== null && left.toString() === right.toString();
|
|
29
29
|
}
|
|
@@ -111,4 +111,3 @@ class Context {
|
|
|
111
111
|
0 && (module.exports = {
|
|
112
112
|
Context
|
|
113
113
|
});
|
|
114
|
-
//# sourceMappingURL=context.cjs.map
|
package/context.d.cts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Token } from './token/token.cjs';
|
|
2
|
+
import { Cache } from './cache/cache.cjs';
|
|
3
|
+
import { UrlSanitizer, Tab } from './tab.cjs';
|
|
4
|
+
import { EventDispatcher } from './eventManager.cjs';
|
|
5
|
+
import { SdkEventMap } from './sdkEvents.cjs';
|
|
6
|
+
import '@croct/json';
|
|
7
|
+
import './apiKey.cjs';
|
|
8
|
+
|
|
9
|
+
type TokenScope = 'isolated' | 'global' | 'contextual';
|
|
10
|
+
type Configuration = {
|
|
11
|
+
tokenScope: TokenScope;
|
|
12
|
+
urlSanitizer?: UrlSanitizer;
|
|
13
|
+
eventDispatcher: ContextEventDispatcher;
|
|
14
|
+
cache: {
|
|
15
|
+
tabId: Cache;
|
|
16
|
+
tabToken: Cache;
|
|
17
|
+
browserToken: Cache;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
type ContextEventDispatcher = EventDispatcher<Pick<SdkEventMap, 'tokenChanged'>>;
|
|
21
|
+
declare class Context {
|
|
22
|
+
private readonly tab;
|
|
23
|
+
private readonly tokenStore;
|
|
24
|
+
private readonly eventDispatcher;
|
|
25
|
+
private lastToken;
|
|
26
|
+
private constructor();
|
|
27
|
+
static load({ cache, tokenScope, eventDispatcher, urlSanitizer }: Configuration): Context;
|
|
28
|
+
getTab(): Tab;
|
|
29
|
+
isAnonymous(): boolean;
|
|
30
|
+
getUser(): string | null;
|
|
31
|
+
getToken(): Token | null;
|
|
32
|
+
setToken(token: Token | null): void;
|
|
33
|
+
private syncToken;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { type Configuration, Context, type TokenScope };
|
package/context.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CachedTokenStore, ReplicatedTokenStore, InMemoryTokenStore } from "./token";
|
|
2
|
-
import { Tab } from "./tab";
|
|
3
|
-
import { uuid4 } from "./uuid";
|
|
4
|
-
import { ObservableCache } from "./cache";
|
|
1
|
+
import { CachedTokenStore, ReplicatedTokenStore, InMemoryTokenStore } from "./token/index.js";
|
|
2
|
+
import { Tab } from "./tab.js";
|
|
3
|
+
import { uuid4 } from "./uuid.js";
|
|
4
|
+
import { ObservableCache } from "./cache/index.js";
|
|
5
5
|
function tokenEquals(left, right) {
|
|
6
6
|
return left === right || left !== null && right !== null && left.toString() === right.toString();
|
|
7
7
|
}
|
|
@@ -88,4 +88,3 @@ class Context {
|
|
|
88
88
|
export {
|
|
89
89
|
Context
|
|
90
90
|
};
|
|
91
|
-
//# sourceMappingURL=context.js.map
|
package/error.cjs
CHANGED
package/error.d.cts
ADDED
package/error.js
CHANGED
package/evaluator.cjs
CHANGED
|
@@ -23,11 +23,11 @@ __export(evaluator_exports, {
|
|
|
23
23
|
QueryError: () => QueryError
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(evaluator_exports);
|
|
26
|
-
var import_constants = require(
|
|
27
|
-
var import_error = require(
|
|
28
|
-
var import_sourceLocation = require(
|
|
29
|
-
var import_logging = require(
|
|
30
|
-
var import_help = require(
|
|
26
|
+
var import_constants = require('./constants.cjs');
|
|
27
|
+
var import_error = require('./error.cjs');
|
|
28
|
+
var import_sourceLocation = require('./sourceLocation.cjs');
|
|
29
|
+
var import_logging = require('./logging/index.cjs');
|
|
30
|
+
var import_help = require('./help.cjs');
|
|
31
31
|
var EvaluationErrorType = /* @__PURE__ */ ((EvaluationErrorType2) => {
|
|
32
32
|
EvaluationErrorType2["TIMEOUT"] = "https://croct.help/api/evaluation#timeout";
|
|
33
33
|
EvaluationErrorType2["UNEXPECTED_ERROR"] = "https://croct.help/api/evaluation#unexpected-error";
|
|
@@ -216,4 +216,3 @@ let Evaluator = _Evaluator;
|
|
|
216
216
|
Evaluator,
|
|
217
217
|
QueryError
|
|
218
218
|
});
|
|
219
|
-
//# sourceMappingURL=evaluator.cjs.map
|
package/evaluator.d.cts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { JsonObject, JsonValue } from '@croct/json';
|
|
2
|
+
import { Token } from './token/token.cjs';
|
|
3
|
+
import { Location } from './sourceLocation.cjs';
|
|
4
|
+
import { Logger } from './logging/logger.cjs';
|
|
5
|
+
import { ApiKey } from './apiKey.cjs';
|
|
6
|
+
|
|
7
|
+
type Campaign = {
|
|
8
|
+
name?: string;
|
|
9
|
+
source?: string;
|
|
10
|
+
medium?: string;
|
|
11
|
+
term?: string;
|
|
12
|
+
content?: string;
|
|
13
|
+
};
|
|
14
|
+
type Page = {
|
|
15
|
+
url: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
referrer?: string;
|
|
18
|
+
};
|
|
19
|
+
type EvaluationContext = {
|
|
20
|
+
timeZone?: string;
|
|
21
|
+
campaign?: Campaign;
|
|
22
|
+
page?: Page;
|
|
23
|
+
attributes?: JsonObject;
|
|
24
|
+
};
|
|
25
|
+
type AllowedFetchOptions = Exclude<keyof RequestInit, 'method' | 'body' | 'headers' | 'signal'>;
|
|
26
|
+
type ExtraFetchOptions<T extends keyof RequestInit = AllowedFetchOptions> = Pick<RequestInit, T> & {
|
|
27
|
+
[key in Exclude<keyof RequestInit, T>]?: never;
|
|
28
|
+
} & Record<string, any>;
|
|
29
|
+
type EvaluationOptions = {
|
|
30
|
+
clientId?: string;
|
|
31
|
+
clientIp?: string;
|
|
32
|
+
clientAgent?: string;
|
|
33
|
+
userToken?: Token | string;
|
|
34
|
+
timeout?: number;
|
|
35
|
+
context?: EvaluationContext;
|
|
36
|
+
extra?: ExtraFetchOptions;
|
|
37
|
+
};
|
|
38
|
+
declare enum EvaluationErrorType {
|
|
39
|
+
TIMEOUT = "https://croct.help/api/evaluation#timeout",
|
|
40
|
+
UNEXPECTED_ERROR = "https://croct.help/api/evaluation#unexpected-error",
|
|
41
|
+
INVALID_QUERY = "https://croct.help/api/evaluation#invalid-query",
|
|
42
|
+
TOO_COMPLEX_QUERY = "https://croct.help/api/evaluation#too-complex-query",
|
|
43
|
+
EVALUATION_FAILED = "https://croct.help/api/evaluation#evaluation-failed",
|
|
44
|
+
UNALLOWED_RESULT = "https://croct.help/api/evaluation#unallowed-result",
|
|
45
|
+
UNSERIALIZABLE_RESULT = "https://croct.help/api/evaluation#unserializable-result"
|
|
46
|
+
}
|
|
47
|
+
type ErrorResponse = {
|
|
48
|
+
type: EvaluationErrorType;
|
|
49
|
+
title: string;
|
|
50
|
+
status: number;
|
|
51
|
+
detail?: string;
|
|
52
|
+
};
|
|
53
|
+
declare class EvaluationError<T extends ErrorResponse = ErrorResponse> extends Error {
|
|
54
|
+
readonly response: T;
|
|
55
|
+
constructor(response: T);
|
|
56
|
+
}
|
|
57
|
+
type QueryErrorDetail = {
|
|
58
|
+
cause: string;
|
|
59
|
+
location: Location;
|
|
60
|
+
};
|
|
61
|
+
type QueryErrorResponse = ErrorResponse & {
|
|
62
|
+
errors: QueryErrorDetail[];
|
|
63
|
+
};
|
|
64
|
+
declare class QueryError extends EvaluationError<QueryErrorResponse> {
|
|
65
|
+
constructor(response: QueryErrorResponse);
|
|
66
|
+
}
|
|
67
|
+
type Configuration = {
|
|
68
|
+
appId?: string;
|
|
69
|
+
apiKey?: string | ApiKey;
|
|
70
|
+
baseEndpointUrl?: string;
|
|
71
|
+
logger?: Logger;
|
|
72
|
+
defaultTimeout?: number;
|
|
73
|
+
};
|
|
74
|
+
declare class Evaluator {
|
|
75
|
+
static readonly MAX_QUERY_LENGTH: number;
|
|
76
|
+
private readonly configuration;
|
|
77
|
+
private readonly endpoint;
|
|
78
|
+
private readonly logger;
|
|
79
|
+
constructor(configuration: Configuration);
|
|
80
|
+
evaluate(query: string, options?: EvaluationOptions): Promise<JsonValue>;
|
|
81
|
+
private fetch;
|
|
82
|
+
private logHelp;
|
|
83
|
+
toJSON(): never;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { type Campaign, type Configuration, type ErrorResponse, type EvaluationContext, EvaluationError, EvaluationErrorType, type EvaluationOptions, Evaluator, type Page, QueryError, type QueryErrorResponse };
|
package/evaluator.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BASE_ENDPOINT_URL, CLIENT_LIBRARY, MAX_QUERY_LENGTH } from "./constants";
|
|
2
|
-
import { formatMessage } from "./error";
|
|
3
|
-
import { getLength, getLocation } from "./sourceLocation";
|
|
4
|
-
import { NullLogger } from "./logging";
|
|
5
|
-
import { Help } from "./help";
|
|
1
|
+
import { BASE_ENDPOINT_URL, CLIENT_LIBRARY, MAX_QUERY_LENGTH } from "./constants.js";
|
|
2
|
+
import { formatMessage } from "./error.js";
|
|
3
|
+
import { getLength, getLocation } from "./sourceLocation.js";
|
|
4
|
+
import { NullLogger } from "./logging/index.js";
|
|
5
|
+
import { Help } from "./help.js";
|
|
6
6
|
var EvaluationErrorType = /* @__PURE__ */ ((EvaluationErrorType2) => {
|
|
7
7
|
EvaluationErrorType2["TIMEOUT"] = "https://croct.help/api/evaluation#timeout";
|
|
8
8
|
EvaluationErrorType2["UNEXPECTED_ERROR"] = "https://croct.help/api/evaluation#unexpected-error";
|
|
@@ -190,4 +190,3 @@ export {
|
|
|
190
190
|
Evaluator,
|
|
191
191
|
QueryError
|
|
192
192
|
};
|
|
193
|
-
//# sourceMappingURL=evaluator.js.map
|
package/eventManager.cjs
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface EventListener<T> {
|
|
2
|
+
(event: T): void;
|
|
3
|
+
}
|
|
4
|
+
type EventMap = Record<string, Record<string, any>>;
|
|
5
|
+
interface EventDispatcher<TEvents extends EventMap> {
|
|
6
|
+
dispatch<T extends keyof TEvents>(eventName: T, event: TEvents[T]): void;
|
|
7
|
+
}
|
|
8
|
+
interface EventSubscriber<TEvents extends EventMap> {
|
|
9
|
+
addListener<T extends keyof TEvents>(eventName: T, listener: EventListener<TEvents[T]>): void;
|
|
10
|
+
removeListener<T extends keyof TEvents>(eventName: T, listener: EventListener<TEvents[T]>): void;
|
|
11
|
+
}
|
|
12
|
+
interface EventManager<DEvents extends EventMap, SEvents extends EventMap = DEvents> extends EventDispatcher<DEvents>, EventSubscriber<SEvents> {
|
|
13
|
+
}
|
|
14
|
+
declare class SynchronousEventManager<TEvents extends EventMap> implements EventManager<TEvents> {
|
|
15
|
+
private readonly listeners;
|
|
16
|
+
addListener<T extends keyof TEvents>(type: T, listener: EventListener<TEvents[T]>): void;
|
|
17
|
+
removeListener<T extends keyof TEvents>(eventName: T, listener: EventListener<TEvents[T]>): void;
|
|
18
|
+
dispatch<T extends keyof TEvents>(eventName: T, event: TEvents[T]): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { type EventDispatcher, type EventListener, type EventManager, type EventMap, type EventSubscriber, SynchronousEventManager };
|
package/eventManager.js
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TrackingEventProcessor, QueuedEventInfo } from './tracker.cjs';
|
|
2
|
+
import { Logger } from './logging/logger.cjs';
|
|
3
|
+
import './tab.cjs';
|
|
4
|
+
import './eventManager.cjs';
|
|
5
|
+
import './channel/channel.cjs';
|
|
6
|
+
import './retry/policy.cjs';
|
|
7
|
+
import './token/token.cjs';
|
|
8
|
+
import '@croct/json';
|
|
9
|
+
import './apiKey.cjs';
|
|
10
|
+
import './trackingEvents.cjs';
|
|
11
|
+
import './patch.cjs';
|
|
12
|
+
import './utilityTypes.cjs';
|
|
13
|
+
|
|
14
|
+
declare class EventSubjectProcessor implements TrackingEventProcessor {
|
|
15
|
+
private currentToken?;
|
|
16
|
+
private logger;
|
|
17
|
+
constructor(logger: Logger);
|
|
18
|
+
process(event: QueuedEventInfo): QueuedEventInfo[];
|
|
19
|
+
private static isIdentificationEvent;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { EventSubjectProcessor };
|
package/eventSubjectProcessor.js
CHANGED
|
@@ -20,8 +20,8 @@ __export(contentFetcherFacade_exports, {
|
|
|
20
20
|
ContentFetcherFacade: () => ContentFetcherFacade
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(contentFetcherFacade_exports);
|
|
23
|
-
var import_error = require(
|
|
24
|
-
var import_schema = require(
|
|
23
|
+
var import_error = require('../error.cjs');
|
|
24
|
+
var import_schema = require('../schema/index.cjs');
|
|
25
25
|
function validate(options) {
|
|
26
26
|
try {
|
|
27
27
|
import_schema.fetchOptionsSchema.validate(options);
|
|
@@ -58,4 +58,3 @@ class ContentFetcherFacade {
|
|
|
58
58
|
0 && (module.exports = {
|
|
59
59
|
ContentFetcherFacade
|
|
60
60
|
});
|
|
61
|
-
//# sourceMappingURL=contentFetcherFacade.cjs.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { JsonObject } from '@croct/json';
|
|
2
|
+
import { ContentFetcher, FetchResponse } from '../contentFetcher.cjs';
|
|
3
|
+
import { ContextFactory } from './evaluatorFacade.cjs';
|
|
4
|
+
import { TokenProvider } from '../token/token.cjs';
|
|
5
|
+
import { CidAssigner } from '../cid/assigner.cjs';
|
|
6
|
+
import '../evaluator.cjs';
|
|
7
|
+
import '../sourceLocation.cjs';
|
|
8
|
+
import '../logging/logger.cjs';
|
|
9
|
+
import '../apiKey.cjs';
|
|
10
|
+
import '../tab.cjs';
|
|
11
|
+
import '../eventManager.cjs';
|
|
12
|
+
|
|
13
|
+
type FetchOptions = {
|
|
14
|
+
version?: `${number}` | number;
|
|
15
|
+
preferredLocale?: string;
|
|
16
|
+
timeout?: number;
|
|
17
|
+
attributes?: JsonObject;
|
|
18
|
+
};
|
|
19
|
+
type Configuration = {
|
|
20
|
+
contentFetcher: ContentFetcher;
|
|
21
|
+
contextFactory: ContextFactory;
|
|
22
|
+
previewTokenProvider: TokenProvider;
|
|
23
|
+
userTokenProvider: TokenProvider;
|
|
24
|
+
cidAssigner: CidAssigner;
|
|
25
|
+
};
|
|
26
|
+
declare class ContentFetcherFacade {
|
|
27
|
+
private readonly fetcher;
|
|
28
|
+
private readonly contextFactory;
|
|
29
|
+
private readonly previewTokenProvider;
|
|
30
|
+
private readonly userTokenProvider;
|
|
31
|
+
private readonly cidAssigner;
|
|
32
|
+
constructor(configuration: Configuration);
|
|
33
|
+
fetch<P extends JsonObject>(slotId: string, options?: FetchOptions): Promise<FetchResponse<P>>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { type Configuration, ContentFetcherFacade, type FetchOptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { formatCause } from "../error";
|
|
2
|
-
import { fetchOptionsSchema as optionsSchema } from "../schema";
|
|
1
|
+
import { formatCause } from "../error.js";
|
|
2
|
+
import { fetchOptionsSchema as optionsSchema } from "../schema/index.js";
|
|
3
3
|
function validate(options) {
|
|
4
4
|
try {
|
|
5
5
|
optionsSchema.validate(options);
|
|
@@ -35,4 +35,3 @@ class ContentFetcherFacade {
|
|
|
35
35
|
export {
|
|
36
36
|
ContentFetcherFacade
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=contentFetcherFacade.js.map
|
|
@@ -22,8 +22,8 @@ __export(evaluatorFacade_exports, {
|
|
|
22
22
|
TabContextFactory: () => TabContextFactory
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(evaluatorFacade_exports);
|
|
25
|
-
var import_schema = require(
|
|
26
|
-
var import_error = require(
|
|
25
|
+
var import_schema = require('../schema/index.cjs');
|
|
26
|
+
var import_error = require('../error.cjs');
|
|
27
27
|
function validate(options) {
|
|
28
28
|
try {
|
|
29
29
|
import_schema.evaluationOptionsSchema.validate(options);
|
|
@@ -91,4 +91,3 @@ class TabContextFactory {
|
|
|
91
91
|
MinimalContextFactory,
|
|
92
92
|
TabContextFactory
|
|
93
93
|
});
|
|
94
|
-
//# sourceMappingURL=evaluatorFacade.cjs.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { JsonObject, JsonValue } from '@croct/json';
|
|
2
|
+
import { EvaluationContext, Evaluator } from '../evaluator.cjs';
|
|
3
|
+
import { Tab } from '../tab.cjs';
|
|
4
|
+
import { TokenProvider } from '../token/token.cjs';
|
|
5
|
+
import { CidAssigner } from '../cid/assigner.cjs';
|
|
6
|
+
import '../sourceLocation.cjs';
|
|
7
|
+
import '../logging/logger.cjs';
|
|
8
|
+
import '../apiKey.cjs';
|
|
9
|
+
import '../eventManager.cjs';
|
|
10
|
+
|
|
11
|
+
type EvaluationOptions = {
|
|
12
|
+
timeout?: number;
|
|
13
|
+
attributes?: JsonObject;
|
|
14
|
+
};
|
|
15
|
+
interface ContextFactory {
|
|
16
|
+
createContext(attributes?: JsonObject): EvaluationContext;
|
|
17
|
+
}
|
|
18
|
+
type Configuration = {
|
|
19
|
+
evaluator: Evaluator;
|
|
20
|
+
contextFactory: ContextFactory;
|
|
21
|
+
userTokenProvider: TokenProvider;
|
|
22
|
+
cidAssigner: CidAssigner;
|
|
23
|
+
};
|
|
24
|
+
declare class EvaluatorFacade {
|
|
25
|
+
private readonly evaluator;
|
|
26
|
+
private readonly contextFactory;
|
|
27
|
+
private readonly tokenProvider;
|
|
28
|
+
private readonly cidAssigner;
|
|
29
|
+
constructor(configuration: Configuration);
|
|
30
|
+
evaluate(query: string, options?: EvaluationOptions): Promise<JsonValue>;
|
|
31
|
+
}
|
|
32
|
+
declare class MinimalContextFactory implements ContextFactory {
|
|
33
|
+
createContext(attributes?: JsonObject): EvaluationContext;
|
|
34
|
+
}
|
|
35
|
+
declare class TabContextFactory implements ContextFactory {
|
|
36
|
+
private readonly tab;
|
|
37
|
+
constructor(tab: Tab);
|
|
38
|
+
createContext(attributes?: JsonObject): EvaluationContext;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { type Configuration, type ContextFactory, type EvaluationOptions, EvaluatorFacade, MinimalContextFactory, TabContextFactory };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { evaluationOptionsSchema as optionsSchema } from "../schema";
|
|
2
|
-
import { formatCause } from "../error";
|
|
1
|
+
import { evaluationOptionsSchema as optionsSchema } from "../schema/index.js";
|
|
2
|
+
import { formatCause } from "../error.js";
|
|
3
3
|
function validate(options) {
|
|
4
4
|
try {
|
|
5
5
|
optionsSchema.validate(options);
|
|
@@ -66,4 +66,3 @@ export {
|
|
|
66
66
|
MinimalContextFactory,
|
|
67
67
|
TabContextFactory
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=evaluatorFacade.js.map
|
package/facade/index.cjs
CHANGED
|
@@ -17,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
var facade_exports = {};
|
|
19
19
|
__export(facade_exports, {
|
|
20
|
-
ContextFactory: () => import_evaluatorFacade.ContextFactory,
|
|
21
20
|
EvaluatorFacade: () => import_evaluatorFacade.EvaluatorFacade,
|
|
22
21
|
MinimalContextFactory: () => import_evaluatorFacade.MinimalContextFactory,
|
|
23
22
|
SdkFacade: () => import_sdkFacade.SdkFacade,
|
|
@@ -29,16 +28,15 @@ __export(facade_exports, {
|
|
|
29
28
|
UserPatch: () => import_userPatch.UserPatch
|
|
30
29
|
});
|
|
31
30
|
module.exports = __toCommonJS(facade_exports);
|
|
32
|
-
var import_evaluatorFacade = require(
|
|
33
|
-
var import_sdkFacade = require(
|
|
34
|
-
var import_sessionFacade = require(
|
|
35
|
-
var import_sessionPatch = require(
|
|
36
|
-
var import_trackerFacade = require(
|
|
37
|
-
var import_userFacade = require(
|
|
38
|
-
var import_userPatch = require(
|
|
31
|
+
var import_evaluatorFacade = require('./evaluatorFacade.cjs');
|
|
32
|
+
var import_sdkFacade = require('./sdkFacade.cjs');
|
|
33
|
+
var import_sessionFacade = require('./sessionFacade.cjs');
|
|
34
|
+
var import_sessionPatch = require('./sessionPatch.cjs');
|
|
35
|
+
var import_trackerFacade = require('./trackerFacade.cjs');
|
|
36
|
+
var import_userFacade = require('./userFacade.cjs');
|
|
37
|
+
var import_userPatch = require('./userPatch.cjs');
|
|
39
38
|
// Annotate the CommonJS export names for ESM import in node:
|
|
40
39
|
0 && (module.exports = {
|
|
41
|
-
ContextFactory,
|
|
42
40
|
EvaluatorFacade,
|
|
43
41
|
MinimalContextFactory,
|
|
44
42
|
SdkFacade,
|
|
@@ -49,4 +47,3 @@ var import_userPatch = require("./userPatch");
|
|
|
49
47
|
UserFacade,
|
|
50
48
|
UserPatch
|
|
51
49
|
});
|
|
52
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export { ContextFactory, EvaluatorFacade, MinimalContextFactory, TabContextFactory } from './evaluatorFacade.cjs';
|
|
2
|
+
export { SdkFacade } from './sdkFacade.cjs';
|
|
3
|
+
export { SessionFacade } from './sessionFacade.cjs';
|
|
4
|
+
export { SessionPatch } from './sessionPatch.cjs';
|
|
5
|
+
export { TrackerFacade } from './trackerFacade.cjs';
|
|
6
|
+
export { UserFacade } from './userFacade.cjs';
|
|
7
|
+
export { UserPatch } from './userPatch.cjs';
|
|
8
|
+
import '@croct/json';
|
|
9
|
+
import '../evaluator.cjs';
|
|
10
|
+
import '../token/token.cjs';
|
|
11
|
+
import '../apiKey.cjs';
|
|
12
|
+
import '../sourceLocation.cjs';
|
|
13
|
+
import '../logging/logger.cjs';
|
|
14
|
+
import '../tab.cjs';
|
|
15
|
+
import '../eventManager.cjs';
|
|
16
|
+
import '../cid/assigner.cjs';
|
|
17
|
+
import '../context.cjs';
|
|
18
|
+
import '../cache/cache.cjs';
|
|
19
|
+
import '../sdkEvents.cjs';
|
|
20
|
+
import './contentFetcherFacade.cjs';
|
|
21
|
+
import '../contentFetcher.cjs';
|
|
22
|
+
import '../cache/cookieCache.cjs';
|
|
23
|
+
import '../trackingEvents.cjs';
|
|
24
|
+
import '../patch.cjs';
|
|
25
|
+
import '../utilityTypes.cjs';
|
|
26
|
+
import '../tracker.cjs';
|
|
27
|
+
import '../channel/channel.cjs';
|
|
28
|
+
import '../retry/policy.cjs';
|
|
29
|
+
import '../activeRecord.cjs';
|
package/facade/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { EvaluatorFacade,
|
|
2
|
-
import { SdkFacade } from "./sdkFacade";
|
|
3
|
-
import { SessionFacade } from "./sessionFacade";
|
|
4
|
-
import { SessionPatch } from "./sessionPatch";
|
|
5
|
-
import { TrackerFacade } from "./trackerFacade";
|
|
6
|
-
import { UserFacade } from "./userFacade";
|
|
7
|
-
import { UserPatch } from "./userPatch";
|
|
1
|
+
import { EvaluatorFacade, MinimalContextFactory, TabContextFactory } from "./evaluatorFacade.js";
|
|
2
|
+
import { SdkFacade } from "./sdkFacade.js";
|
|
3
|
+
import { SessionFacade } from "./sessionFacade.js";
|
|
4
|
+
import { SessionPatch } from "./sessionPatch.js";
|
|
5
|
+
import { TrackerFacade } from "./trackerFacade.js";
|
|
6
|
+
import { UserFacade } from "./userFacade.js";
|
|
7
|
+
import { UserPatch } from "./userPatch.js";
|
|
8
8
|
export {
|
|
9
|
-
ContextFactory,
|
|
10
9
|
EvaluatorFacade,
|
|
11
10
|
MinimalContextFactory,
|
|
12
11
|
SdkFacade,
|
|
@@ -17,4 +16,3 @@ export {
|
|
|
17
16
|
UserFacade,
|
|
18
17
|
UserPatch
|
|
19
18
|
};
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
package/facade/sdkFacade.cjs
CHANGED
|
@@ -20,16 +20,16 @@ __export(sdkFacade_exports, {
|
|
|
20
20
|
SdkFacade: () => SdkFacade
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(sdkFacade_exports);
|
|
23
|
-
var import_evaluatorFacade = require(
|
|
24
|
-
var import_trackerFacade = require(
|
|
25
|
-
var import_userFacade = require(
|
|
26
|
-
var import_token = require(
|
|
27
|
-
var import_error = require(
|
|
28
|
-
var import_schema = require(
|
|
29
|
-
var import_sdk = require(
|
|
30
|
-
var import_sessionFacade = require(
|
|
31
|
-
var import_contentFetcherFacade = require(
|
|
32
|
-
var import_eventSubjectProcessor = require(
|
|
23
|
+
var import_evaluatorFacade = require('./evaluatorFacade.cjs');
|
|
24
|
+
var import_trackerFacade = require('./trackerFacade.cjs');
|
|
25
|
+
var import_userFacade = require('./userFacade.cjs');
|
|
26
|
+
var import_token = require('../token/index.cjs');
|
|
27
|
+
var import_error = require('../error.cjs');
|
|
28
|
+
var import_schema = require('../schema/index.cjs');
|
|
29
|
+
var import_sdk = require('../sdk.cjs');
|
|
30
|
+
var import_sessionFacade = require('./sessionFacade.cjs');
|
|
31
|
+
var import_contentFetcherFacade = require('./contentFetcherFacade.cjs');
|
|
32
|
+
var import_eventSubjectProcessor = require('../eventSubjectProcessor.cjs');
|
|
33
33
|
function validateConfiguration(configuration) {
|
|
34
34
|
try {
|
|
35
35
|
import_schema.sdkFacadeConfigurationSchema.validate(configuration);
|
|
@@ -226,4 +226,3 @@ class SdkFacade {
|
|
|
226
226
|
0 && (module.exports = {
|
|
227
227
|
SdkFacade
|
|
228
228
|
});
|
|
229
|
-
//# sourceMappingURL=sdkFacade.cjs.map
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { EvaluatorFacade } from './evaluatorFacade.cjs';
|
|
2
|
+
import { TrackerFacade } from './trackerFacade.cjs';
|
|
3
|
+
import { TokenScope, Context } from '../context.cjs';
|
|
4
|
+
import { UserFacade } from './userFacade.cjs';
|
|
5
|
+
import { TokenStore, Token } from '../token/token.cjs';
|
|
6
|
+
import { SessionFacade } from './sessionFacade.cjs';
|
|
7
|
+
import { Logger } from '../logging/logger.cjs';
|
|
8
|
+
import { SdkEventMap } from '../sdkEvents.cjs';
|
|
9
|
+
import { EventManager } from '../eventManager.cjs';
|
|
10
|
+
import { CidAssigner } from '../cid/assigner.cjs';
|
|
11
|
+
import { UrlSanitizer } from '../tab.cjs';
|
|
12
|
+
import { ContentFetcherFacade } from './contentFetcherFacade.cjs';
|
|
13
|
+
import { CookieCacheConfiguration } from '../cache/cookieCache.cjs';
|
|
14
|
+
import './sessionPatch.cjs';
|
|
15
|
+
import './userPatch.cjs';
|
|
16
|
+
import '@croct/json';
|
|
17
|
+
import '../evaluator.cjs';
|
|
18
|
+
import '../sourceLocation.cjs';
|
|
19
|
+
import '../apiKey.cjs';
|
|
20
|
+
import '../trackingEvents.cjs';
|
|
21
|
+
import '../patch.cjs';
|
|
22
|
+
import '../utilityTypes.cjs';
|
|
23
|
+
import '../tracker.cjs';
|
|
24
|
+
import '../channel/channel.cjs';
|
|
25
|
+
import '../retry/policy.cjs';
|
|
26
|
+
import '../cache/cache.cjs';
|
|
27
|
+
import '../activeRecord.cjs';
|
|
28
|
+
import '../contentFetcher.cjs';
|
|
29
|
+
|
|
30
|
+
type Configuration = {
|
|
31
|
+
appId: string;
|
|
32
|
+
tokenScope?: TokenScope;
|
|
33
|
+
debug?: boolean;
|
|
34
|
+
test?: boolean;
|
|
35
|
+
track?: boolean;
|
|
36
|
+
token?: string | null;
|
|
37
|
+
userId?: string | null;
|
|
38
|
+
clientId?: string;
|
|
39
|
+
eventMetadata?: {
|
|
40
|
+
[key: string]: string;
|
|
41
|
+
};
|
|
42
|
+
logger?: Logger;
|
|
43
|
+
urlSanitizer?: UrlSanitizer;
|
|
44
|
+
baseEndpointUrl?: string;
|
|
45
|
+
disableCidMirroring?: boolean;
|
|
46
|
+
cidAssignerEndpointUrl?: string;
|
|
47
|
+
cookie?: {
|
|
48
|
+
clientId?: CookieCacheConfiguration;
|
|
49
|
+
userToken?: CookieCacheConfiguration;
|
|
50
|
+
previewToken?: CookieCacheConfiguration;
|
|
51
|
+
};
|
|
52
|
+
defaultFetchTimeout?: number;
|
|
53
|
+
defaultPreferredLocale?: string;
|
|
54
|
+
};
|
|
55
|
+
declare class SdkFacade {
|
|
56
|
+
private readonly sdk;
|
|
57
|
+
private trackerFacade?;
|
|
58
|
+
private userFacade?;
|
|
59
|
+
private sessionFacade?;
|
|
60
|
+
private evaluatorFacade?;
|
|
61
|
+
private contentFetcherFacade?;
|
|
62
|
+
private constructor();
|
|
63
|
+
static init(configuration: Configuration): SdkFacade;
|
|
64
|
+
get context(): Context;
|
|
65
|
+
get cidAssigner(): CidAssigner;
|
|
66
|
+
get previewTokenStore(): TokenStore;
|
|
67
|
+
get userTokenStore(): TokenStore;
|
|
68
|
+
get tracker(): TrackerFacade;
|
|
69
|
+
get user(): UserFacade;
|
|
70
|
+
get session(): SessionFacade;
|
|
71
|
+
get evaluator(): EvaluatorFacade;
|
|
72
|
+
get contentFetcher(): ContentFetcherFacade;
|
|
73
|
+
get eventManager(): EventManager<Record<string, Record<string, unknown>>, SdkEventMap>;
|
|
74
|
+
identify(userId: string): void;
|
|
75
|
+
anonymize(): void;
|
|
76
|
+
getToken(): Token | null;
|
|
77
|
+
setToken(token: Token): void;
|
|
78
|
+
unsetToken(): void;
|
|
79
|
+
private trackInternalEvent;
|
|
80
|
+
getLogger(...namespace: string[]): Logger;
|
|
81
|
+
getTabStorage(namespace: string, ...subnamespace: string[]): Storage;
|
|
82
|
+
getBrowserStorage(namespace: string, ...subnamespace: string[]): Storage;
|
|
83
|
+
close(): Promise<void>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { type Configuration, SdkFacade };
|