@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
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { Patch } from './patch.cjs';
|
|
2
|
+
import { DistributiveOmit, Optional } from './utilityTypes.cjs';
|
|
3
|
+
import '@croct/json';
|
|
4
|
+
|
|
5
|
+
type ProductDetails = {
|
|
6
|
+
productId: string;
|
|
7
|
+
sku?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
category?: string;
|
|
10
|
+
brand?: string;
|
|
11
|
+
variant?: string;
|
|
12
|
+
displayPrice: number;
|
|
13
|
+
originalPrice?: number;
|
|
14
|
+
url?: string;
|
|
15
|
+
imageUrl?: string;
|
|
16
|
+
};
|
|
17
|
+
type CartItem = {
|
|
18
|
+
index: number;
|
|
19
|
+
product: ProductDetails;
|
|
20
|
+
quantity: number;
|
|
21
|
+
total: number;
|
|
22
|
+
discount?: number;
|
|
23
|
+
coupon?: string;
|
|
24
|
+
};
|
|
25
|
+
type Cart = {
|
|
26
|
+
currency: string;
|
|
27
|
+
items: CartItem[];
|
|
28
|
+
subtotal?: number;
|
|
29
|
+
shippingPrice?: number;
|
|
30
|
+
taxes?: {
|
|
31
|
+
[key: string]: number;
|
|
32
|
+
};
|
|
33
|
+
costs?: {
|
|
34
|
+
[key: string]: number;
|
|
35
|
+
};
|
|
36
|
+
discount?: number;
|
|
37
|
+
total: number;
|
|
38
|
+
coupon?: string;
|
|
39
|
+
lastUpdateTime: number;
|
|
40
|
+
};
|
|
41
|
+
type OrderItem = {
|
|
42
|
+
index: number;
|
|
43
|
+
product: ProductDetails;
|
|
44
|
+
quantity?: number;
|
|
45
|
+
total: number;
|
|
46
|
+
discount?: number;
|
|
47
|
+
coupon?: string;
|
|
48
|
+
};
|
|
49
|
+
type OrderStatus = 'placed' | 'paid' | 'completed';
|
|
50
|
+
type Order = {
|
|
51
|
+
orderId: string;
|
|
52
|
+
currency: string;
|
|
53
|
+
items: OrderItem[];
|
|
54
|
+
subtotal?: number;
|
|
55
|
+
shippingPrice?: number;
|
|
56
|
+
taxes?: {
|
|
57
|
+
[key: string]: number;
|
|
58
|
+
};
|
|
59
|
+
costs?: {
|
|
60
|
+
[key: string]: number;
|
|
61
|
+
};
|
|
62
|
+
discount?: number;
|
|
63
|
+
total: number;
|
|
64
|
+
coupon?: string;
|
|
65
|
+
paymentMethod?: string;
|
|
66
|
+
installments?: number;
|
|
67
|
+
status?: OrderStatus;
|
|
68
|
+
};
|
|
69
|
+
type Gender = 'male' | 'female' | 'neutral' | 'unknown';
|
|
70
|
+
declare const pageEventTypes: readonly ["pageLoaded", "pageOpened"];
|
|
71
|
+
declare const tabEventTypes: readonly ["tabOpened", "tabUrlChanged", "tabVisibilityChanged"];
|
|
72
|
+
declare const cartEventTypes: readonly ["cartModified", "cartViewed", "checkoutStarted"];
|
|
73
|
+
declare const ecommerceEventTypes: readonly ["cartModified", "cartViewed", "checkoutStarted", "orderPlaced", "productViewed"];
|
|
74
|
+
declare const identifiedUserEventTypes: string[];
|
|
75
|
+
declare const userEventTypes: readonly [...string[], "userProfileChanged"];
|
|
76
|
+
declare const miscEventTypes: readonly ["nothingChanged", "sessionAttributesChanged", "goalCompleted", "interestShown", "postViewed", "eventOccurred", "linkOpened"];
|
|
77
|
+
declare const eventTypes: readonly ["pageLoaded", "pageOpened", "cartModified", "cartViewed", "checkoutStarted", "orderPlaced", "productViewed", ...string[], "userProfileChanged", "nothingChanged", "sessionAttributesChanged", "goalCompleted", "interestShown", "postViewed", "eventOccurred", "linkOpened"];
|
|
78
|
+
interface BaseEvent {
|
|
79
|
+
type: string;
|
|
80
|
+
}
|
|
81
|
+
interface UserProfileChanged extends BaseEvent {
|
|
82
|
+
type: 'userProfileChanged';
|
|
83
|
+
patch: Patch;
|
|
84
|
+
}
|
|
85
|
+
type Primitive = null | string | number | boolean;
|
|
86
|
+
type PrimitiveMap = {
|
|
87
|
+
[member: string]: Primitive;
|
|
88
|
+
};
|
|
89
|
+
type PrimitiveArray = Primitive[];
|
|
90
|
+
type TwoLevelMap = {
|
|
91
|
+
[member: string]: Primitive | PrimitiveMap | PrimitiveArray;
|
|
92
|
+
};
|
|
93
|
+
type TwoLevelArray = PrimitiveArray | PrimitiveMap[] | PrimitiveArray[];
|
|
94
|
+
type CustomAttribute = Primitive | TwoLevelMap | TwoLevelArray;
|
|
95
|
+
type UserProfile = {
|
|
96
|
+
firstName?: string;
|
|
97
|
+
lastName?: string;
|
|
98
|
+
birthDate?: string;
|
|
99
|
+
gender?: Gender;
|
|
100
|
+
email?: string;
|
|
101
|
+
alternateEmail?: string;
|
|
102
|
+
phone?: string;
|
|
103
|
+
alternatePhone?: string;
|
|
104
|
+
address?: {
|
|
105
|
+
street?: string;
|
|
106
|
+
district?: string;
|
|
107
|
+
city?: string;
|
|
108
|
+
region?: string;
|
|
109
|
+
country?: string;
|
|
110
|
+
postalCode?: string;
|
|
111
|
+
};
|
|
112
|
+
avatar?: string;
|
|
113
|
+
company?: string;
|
|
114
|
+
companyUrl?: string;
|
|
115
|
+
jobTitle?: string;
|
|
116
|
+
interests?: string[];
|
|
117
|
+
activities?: string[];
|
|
118
|
+
custom?: {
|
|
119
|
+
[member: string]: CustomAttribute;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
interface UserSignedUp extends BaseEvent {
|
|
123
|
+
type: 'userSignedUp';
|
|
124
|
+
userId: string;
|
|
125
|
+
profile?: UserProfile;
|
|
126
|
+
}
|
|
127
|
+
interface UserSignedIn extends BaseEvent {
|
|
128
|
+
type: 'userSignedIn';
|
|
129
|
+
userId: string;
|
|
130
|
+
}
|
|
131
|
+
interface UserSignedOut extends BaseEvent {
|
|
132
|
+
type: 'userSignedOut';
|
|
133
|
+
userId: string;
|
|
134
|
+
}
|
|
135
|
+
type IdentifiedUserEvent = UserSignedIn | UserSignedOut | UserSignedUp;
|
|
136
|
+
type UserEvent = UserProfileChanged | IdentifiedUserEvent;
|
|
137
|
+
type CartEventType = typeof cartEventTypes[number];
|
|
138
|
+
interface BaseCartEvent extends BaseEvent {
|
|
139
|
+
type: CartEventType;
|
|
140
|
+
cart: Cart;
|
|
141
|
+
}
|
|
142
|
+
interface CartViewed extends BaseCartEvent {
|
|
143
|
+
type: 'cartViewed';
|
|
144
|
+
}
|
|
145
|
+
interface CartModified extends BaseCartEvent {
|
|
146
|
+
type: 'cartModified';
|
|
147
|
+
}
|
|
148
|
+
interface CheckoutStarted extends BaseCartEvent {
|
|
149
|
+
type: 'checkoutStarted';
|
|
150
|
+
orderId?: string;
|
|
151
|
+
}
|
|
152
|
+
type CartEvent = CartModified | CartViewed | CheckoutStarted;
|
|
153
|
+
interface OrderPlaced extends BaseEvent {
|
|
154
|
+
type: 'orderPlaced';
|
|
155
|
+
order: Order;
|
|
156
|
+
}
|
|
157
|
+
interface ProductViewed extends BaseEvent {
|
|
158
|
+
type: 'productViewed';
|
|
159
|
+
product: ProductDetails;
|
|
160
|
+
}
|
|
161
|
+
type EcommerceEvent = OrderPlaced | ProductViewed | CartEvent;
|
|
162
|
+
/**
|
|
163
|
+
* Tab event
|
|
164
|
+
*/
|
|
165
|
+
type TabEventType = typeof tabEventTypes[number];
|
|
166
|
+
interface BaseTabEvent extends BaseEvent {
|
|
167
|
+
type: TabEventType;
|
|
168
|
+
tabId: string;
|
|
169
|
+
}
|
|
170
|
+
interface TabOpened extends BaseTabEvent {
|
|
171
|
+
type: 'tabOpened';
|
|
172
|
+
}
|
|
173
|
+
interface TabUrlChanged extends BaseTabEvent {
|
|
174
|
+
type: 'tabUrlChanged';
|
|
175
|
+
url: string;
|
|
176
|
+
}
|
|
177
|
+
interface TabVisibilityChanged extends BaseTabEvent {
|
|
178
|
+
type: 'tabVisibilityChanged';
|
|
179
|
+
visibility: 'visible' | 'hidden';
|
|
180
|
+
}
|
|
181
|
+
type TabEvent = TabVisibilityChanged | TabUrlChanged | TabOpened;
|
|
182
|
+
type PageEventType = typeof pageEventTypes[number];
|
|
183
|
+
interface BasePageEvent extends BaseEvent {
|
|
184
|
+
type: PageEventType;
|
|
185
|
+
url: string;
|
|
186
|
+
}
|
|
187
|
+
interface PageOpened extends BasePageEvent {
|
|
188
|
+
type: 'pageOpened';
|
|
189
|
+
referrer?: string;
|
|
190
|
+
}
|
|
191
|
+
interface PageLoaded extends BasePageEvent {
|
|
192
|
+
type: 'pageLoaded';
|
|
193
|
+
title: string;
|
|
194
|
+
lastModifiedTime: number;
|
|
195
|
+
}
|
|
196
|
+
type PageEvent = PageLoaded | PageOpened;
|
|
197
|
+
interface NothingChanged extends BaseEvent {
|
|
198
|
+
type: 'nothingChanged';
|
|
199
|
+
sinceTime: number;
|
|
200
|
+
}
|
|
201
|
+
interface SessionAttributesChanged extends BaseEvent {
|
|
202
|
+
type: 'sessionAttributesChanged';
|
|
203
|
+
patch: Patch;
|
|
204
|
+
}
|
|
205
|
+
interface GoalCompleted extends BaseEvent {
|
|
206
|
+
type: 'goalCompleted';
|
|
207
|
+
goalId: string;
|
|
208
|
+
value?: number;
|
|
209
|
+
currency?: string;
|
|
210
|
+
}
|
|
211
|
+
interface InterestShown extends BaseEvent {
|
|
212
|
+
type: 'interestShown';
|
|
213
|
+
interests: string[];
|
|
214
|
+
}
|
|
215
|
+
interface PostDetails {
|
|
216
|
+
postId: string;
|
|
217
|
+
url?: string;
|
|
218
|
+
title: string;
|
|
219
|
+
tags?: string[];
|
|
220
|
+
categories?: string[];
|
|
221
|
+
authors?: string[];
|
|
222
|
+
publishTime: number;
|
|
223
|
+
updateTime?: number;
|
|
224
|
+
}
|
|
225
|
+
interface PostViewed extends BaseEvent {
|
|
226
|
+
type: 'postViewed';
|
|
227
|
+
post: PostDetails;
|
|
228
|
+
}
|
|
229
|
+
interface EventOccurred extends BaseEvent {
|
|
230
|
+
type: 'eventOccurred';
|
|
231
|
+
name: string;
|
|
232
|
+
details?: {
|
|
233
|
+
[key: string]: string | number | boolean | null;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
interface LinkOpened extends BaseEvent {
|
|
237
|
+
type: 'linkOpened';
|
|
238
|
+
link: string;
|
|
239
|
+
}
|
|
240
|
+
type MiscEvent = NothingChanged | SessionAttributesChanged | EventOccurred | GoalCompleted | InterestShown | PostViewed | LinkOpened;
|
|
241
|
+
type EventMap = {
|
|
242
|
+
tabVisibilityChanged: TabVisibilityChanged;
|
|
243
|
+
tabUrlChanged: TabUrlChanged;
|
|
244
|
+
tabOpened: TabOpened;
|
|
245
|
+
pageLoaded: PageLoaded;
|
|
246
|
+
pageOpened: PageOpened;
|
|
247
|
+
userSignedIn: UserSignedIn;
|
|
248
|
+
userSignedOut: UserSignedOut;
|
|
249
|
+
userSignedUp: UserSignedUp;
|
|
250
|
+
userProfileChanged: UserProfileChanged;
|
|
251
|
+
productViewed: ProductViewed;
|
|
252
|
+
cartViewed: CartViewed;
|
|
253
|
+
cartModified: CartModified;
|
|
254
|
+
checkoutStarted: CheckoutStarted;
|
|
255
|
+
orderPlaced: OrderPlaced;
|
|
256
|
+
nothingChanged: NothingChanged;
|
|
257
|
+
sessionAttributesChanged: SessionAttributesChanged;
|
|
258
|
+
goalCompleted: GoalCompleted;
|
|
259
|
+
interestShown: InterestShown;
|
|
260
|
+
postViewed: PostViewed;
|
|
261
|
+
eventOccurred: EventOccurred;
|
|
262
|
+
linkOpened: LinkOpened;
|
|
263
|
+
};
|
|
264
|
+
type TrackingEventType = keyof EventMap;
|
|
265
|
+
type TrackingEvent<T extends TrackingEventType = TrackingEventType> = T extends TrackingEventType ? EventMap[T] : EventMap[TrackingEventType];
|
|
266
|
+
/**
|
|
267
|
+
* Partial Events
|
|
268
|
+
*/
|
|
269
|
+
type CartPartialEvent<T extends CartEvent = CartEvent> = DistributiveOmit<T, 'cart'> & Record<'cart', Optional<Cart, 'lastUpdateTime'>>;
|
|
270
|
+
type PartialTrackingEvent = Exclude<TrackingEvent, PageEvent | TabEvent | CartEvent> | CartPartialEvent;
|
|
271
|
+
/**
|
|
272
|
+
* External Events
|
|
273
|
+
*/
|
|
274
|
+
type ExternalEventMap = {
|
|
275
|
+
cartModified: CartPartialEvent<CartModified>;
|
|
276
|
+
cartViewed: CartPartialEvent<CartViewed>;
|
|
277
|
+
checkoutStarted: CartPartialEvent<CheckoutStarted>;
|
|
278
|
+
orderPlaced: OrderPlaced;
|
|
279
|
+
productViewed: ProductViewed;
|
|
280
|
+
userSignedUp: UserSignedUp;
|
|
281
|
+
goalCompleted: GoalCompleted;
|
|
282
|
+
interestShown: InterestShown;
|
|
283
|
+
postViewed: PostViewed;
|
|
284
|
+
linkOpened: LinkOpened;
|
|
285
|
+
eventOccurred: EventOccurred;
|
|
286
|
+
};
|
|
287
|
+
type ExternalTrackingEventType = keyof ExternalEventMap;
|
|
288
|
+
type ExternalTrackingEvent<T extends ExternalTrackingEventType = ExternalTrackingEventType> = T extends ExternalTrackingEventType ? ExternalEventMap[T] : ExternalEventMap[ExternalTrackingEventType];
|
|
289
|
+
type ExternalTrackingEventPayload<T extends ExternalTrackingEventType> = Omit<ExternalEventMap[T], 'type'>;
|
|
290
|
+
declare function isIdentifiedUserEvent(event: TrackingEvent): event is IdentifiedUserEvent;
|
|
291
|
+
declare function isCartPartialEvent(event: PartialTrackingEvent): event is CartPartialEvent;
|
|
292
|
+
type TrackingEventContext = {
|
|
293
|
+
tabId: string;
|
|
294
|
+
url: string;
|
|
295
|
+
metadata?: {
|
|
296
|
+
[key: string]: string;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
type BeaconPayload = Exclude<TrackingEvent, IdentifiedUserEvent> | DistributiveOmit<Exclude<IdentifiedUserEvent, UserSignedUp>, 'userId'> & Record<'externalUserId', IdentifiedUserEvent['userId']> | Omit<UserSignedUp, 'userId' | 'profile'> & Record<'externalUserId', IdentifiedUserEvent['userId']> & {
|
|
300
|
+
patch?: Patch;
|
|
301
|
+
};
|
|
302
|
+
type Beacon = {
|
|
303
|
+
timestamp: number;
|
|
304
|
+
token?: string;
|
|
305
|
+
context: TrackingEventContext;
|
|
306
|
+
payload: BeaconPayload;
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export { type Beacon, type BeaconPayload, type Cart, type CartEvent, type CartEventType, type CartItem, type CartModified, type CartViewed, type CheckoutStarted, type EcommerceEvent, type EventOccurred, type ExternalTrackingEvent, type ExternalTrackingEventPayload, type ExternalTrackingEventType, type Gender, type GoalCompleted, type IdentifiedUserEvent, type InterestShown, type LinkOpened, type MiscEvent, type NothingChanged, type Order, type OrderItem, type OrderPlaced, type OrderStatus, type PageEvent, type PageEventType, type PageLoaded, type PageOpened, type PartialTrackingEvent, type PostDetails, type PostViewed, type ProductDetails, type ProductViewed, type SessionAttributesChanged, type TabEvent, type TabEventType, type TabOpened, type TabUrlChanged, type TabVisibilityChanged, type TrackingEvent, type TrackingEventContext, type TrackingEventType, type UserEvent, type UserProfile, type UserProfileChanged, type UserSignedIn, type UserSignedOut, type UserSignedUp, cartEventTypes, ecommerceEventTypes, eventTypes, identifiedUserEventTypes, isCartPartialEvent, isIdentifiedUserEvent, miscEventTypes, pageEventTypes, tabEventTypes, userEventTypes };
|
package/trackingEvents.js
CHANGED
package/transformer.cjs
CHANGED
package/transformer.js
CHANGED
package/utilityTypes.cjs
CHANGED
|
@@ -13,4 +13,3 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
13
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
14
|
var utilityTypes_exports = {};
|
|
15
15
|
module.exports = __toCommonJS(utilityTypes_exports);
|
|
16
|
-
//# sourceMappingURL=utilityTypes.cjs.map
|
package/utilityTypes.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=utilityTypes.js.map
|
package/uuid.cjs
CHANGED
package/uuid.d.cts
ADDED
package/uuid.js
CHANGED
package/validation/arrayType.cjs
CHANGED
|
@@ -20,8 +20,8 @@ __export(arrayType_exports, {
|
|
|
20
20
|
ArrayType: () => ArrayType
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(arrayType_exports);
|
|
23
|
-
var import_schema = require(
|
|
24
|
-
var import_violation = require(
|
|
23
|
+
var import_schema = require('./schema.cjs');
|
|
24
|
+
var import_violation = require('./violation.cjs');
|
|
25
25
|
class ArrayType {
|
|
26
26
|
constructor(definition = {}) {
|
|
27
27
|
this.definition = {
|
|
@@ -72,4 +72,3 @@ class ArrayType {
|
|
|
72
72
|
0 && (module.exports = {
|
|
73
73
|
ArrayType
|
|
74
74
|
});
|
|
75
|
-
//# sourceMappingURL=arrayType.cjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TypeSchema, Schema } from './schema.cjs';
|
|
2
|
+
|
|
3
|
+
type ArrayDefinition = {
|
|
4
|
+
minItems: number;
|
|
5
|
+
maxItems: number;
|
|
6
|
+
items?: Schema;
|
|
7
|
+
};
|
|
8
|
+
declare class ArrayType implements TypeSchema {
|
|
9
|
+
private readonly definition;
|
|
10
|
+
constructor(definition?: Partial<ArrayDefinition>);
|
|
11
|
+
getTypes(): string[];
|
|
12
|
+
isValidType(value: unknown): value is unknown[];
|
|
13
|
+
validate(value: unknown, path?: string[]): void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { ArrayType };
|
package/validation/arrayType.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Violation } from "./schema";
|
|
2
|
-
import { describe, formatPath } from "./violation";
|
|
1
|
+
import { Violation } from "./schema.js";
|
|
2
|
+
import { describe, formatPath } from "./violation.js";
|
|
3
3
|
class ArrayType {
|
|
4
4
|
constructor(definition = {}) {
|
|
5
5
|
this.definition = {
|
|
@@ -49,4 +49,3 @@ class ArrayType {
|
|
|
49
49
|
export {
|
|
50
50
|
ArrayType
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=arrayType.js.map
|
|
@@ -20,8 +20,8 @@ __export(booleanType_exports, {
|
|
|
20
20
|
BooleanType: () => BooleanType
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(booleanType_exports);
|
|
23
|
-
var import_schema = require(
|
|
24
|
-
var import_violation = require(
|
|
23
|
+
var import_schema = require('./schema.cjs');
|
|
24
|
+
var import_violation = require('./violation.cjs');
|
|
25
25
|
class BooleanType {
|
|
26
26
|
getTypes() {
|
|
27
27
|
return ["boolean"];
|
|
@@ -43,4 +43,3 @@ class BooleanType {
|
|
|
43
43
|
0 && (module.exports = {
|
|
44
44
|
BooleanType
|
|
45
45
|
});
|
|
46
|
-
//# sourceMappingURL=booleanType.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Violation } from "./schema";
|
|
2
|
-
import { describe, formatPath } from "./violation";
|
|
1
|
+
import { Violation } from "./schema.js";
|
|
2
|
+
import { describe, formatPath } from "./violation.js";
|
|
3
3
|
class BooleanType {
|
|
4
4
|
getTypes() {
|
|
5
5
|
return ["boolean"];
|
|
@@ -20,4 +20,3 @@ class BooleanType {
|
|
|
20
20
|
export {
|
|
21
21
|
BooleanType
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=booleanType.js.map
|
|
@@ -20,8 +20,8 @@ __export(functionType_exports, {
|
|
|
20
20
|
FunctionType: () => FunctionType
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(functionType_exports);
|
|
23
|
-
var import_schema = require(
|
|
24
|
-
var import_violation = require(
|
|
23
|
+
var import_schema = require('./schema.cjs');
|
|
24
|
+
var import_violation = require('./violation.cjs');
|
|
25
25
|
class FunctionType {
|
|
26
26
|
getTypes() {
|
|
27
27
|
return ["function"];
|
|
@@ -43,4 +43,3 @@ class FunctionType {
|
|
|
43
43
|
0 && (module.exports = {
|
|
44
44
|
FunctionType
|
|
45
45
|
});
|
|
46
|
-
//# sourceMappingURL=functionType.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Violation } from "./schema";
|
|
2
|
-
import { describe, formatPath } from "./violation";
|
|
1
|
+
import { Violation } from "./schema.js";
|
|
2
|
+
import { describe, formatPath } from "./violation.js";
|
|
3
3
|
class FunctionType {
|
|
4
4
|
getTypes() {
|
|
5
5
|
return ["function"];
|
|
@@ -20,4 +20,3 @@ class FunctionType {
|
|
|
20
20
|
export {
|
|
21
21
|
FunctionType
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=functionType.js.map
|
package/validation/index.cjs
CHANGED
|
@@ -33,18 +33,18 @@ __export(validation_exports, {
|
|
|
33
33
|
UnionType: () => import_unionType.UnionType
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(validation_exports);
|
|
36
|
-
__reExport(validation_exports, require(
|
|
37
|
-
__reExport(validation_exports, require(
|
|
38
|
-
var import_arrayType = require(
|
|
39
|
-
var import_booleanType = require(
|
|
40
|
-
var import_functionType = require(
|
|
41
|
-
var import_jsonType = require(
|
|
42
|
-
var import_mixedSchema = require(
|
|
43
|
-
var import_nullType = require(
|
|
44
|
-
var import_numberType = require(
|
|
45
|
-
var import_objectType = require(
|
|
46
|
-
var import_stringType = require(
|
|
47
|
-
var import_unionType = require(
|
|
36
|
+
__reExport(validation_exports, require('./schema.cjs'), module.exports);
|
|
37
|
+
__reExport(validation_exports, require('./violation.cjs'), module.exports);
|
|
38
|
+
var import_arrayType = require('./arrayType.cjs');
|
|
39
|
+
var import_booleanType = require('./booleanType.cjs');
|
|
40
|
+
var import_functionType = require('./functionType.cjs');
|
|
41
|
+
var import_jsonType = require('./jsonType.cjs');
|
|
42
|
+
var import_mixedSchema = require('./mixedSchema.cjs');
|
|
43
|
+
var import_nullType = require('./nullType.cjs');
|
|
44
|
+
var import_numberType = require('./numberType.cjs');
|
|
45
|
+
var import_objectType = require('./objectType.cjs');
|
|
46
|
+
var import_stringType = require('./stringType.cjs');
|
|
47
|
+
var import_unionType = require('./unionType.cjs');
|
|
48
48
|
// Annotate the CommonJS export names for ESM import in node:
|
|
49
49
|
0 && (module.exports = {
|
|
50
50
|
ArrayType,
|
|
@@ -60,7 +60,6 @@ var import_unionType = require("./unionType");
|
|
|
60
60
|
ObjectType,
|
|
61
61
|
StringType,
|
|
62
62
|
UnionType,
|
|
63
|
-
...require(
|
|
64
|
-
...require(
|
|
63
|
+
...require('./schema.cjs'),
|
|
64
|
+
...require('./violation.cjs')
|
|
65
65
|
});
|
|
66
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { Schema, TypeSchema, Violation } from './schema.cjs';
|
|
2
|
+
export { describe, formatPath } from './violation.cjs';
|
|
3
|
+
export { ArrayType } from './arrayType.cjs';
|
|
4
|
+
export { BooleanType } from './booleanType.cjs';
|
|
5
|
+
export { FunctionType } from './functionType.cjs';
|
|
6
|
+
export { JsonArrayType, JsonObjectType, JsonPrimitiveType, JsonType } from './jsonType.cjs';
|
|
7
|
+
export { MixedSchema } from './mixedSchema.cjs';
|
|
8
|
+
export { NullType } from './nullType.cjs';
|
|
9
|
+
export { NumberType } from './numberType.cjs';
|
|
10
|
+
export { ObjectType } from './objectType.cjs';
|
|
11
|
+
export { StringType } from './stringType.cjs';
|
|
12
|
+
export { UnionType } from './unionType.cjs';
|
package/validation/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * from "./schema";
|
|
2
|
-
export * from "./violation";
|
|
3
|
-
import { ArrayType } from "./arrayType";
|
|
4
|
-
import { BooleanType } from "./booleanType";
|
|
5
|
-
import { FunctionType } from "./functionType";
|
|
6
|
-
import { JsonType, JsonArrayType, JsonObjectType, JsonPrimitiveType } from "./jsonType";
|
|
7
|
-
import { MixedSchema } from "./mixedSchema";
|
|
8
|
-
import { NullType } from "./nullType";
|
|
9
|
-
import { NumberType } from "./numberType";
|
|
10
|
-
import { ObjectType } from "./objectType";
|
|
11
|
-
import { StringType } from "./stringType";
|
|
12
|
-
import { UnionType } from "./unionType";
|
|
1
|
+
export * from "./schema.js";
|
|
2
|
+
export * from "./violation.js";
|
|
3
|
+
import { ArrayType } from "./arrayType.js";
|
|
4
|
+
import { BooleanType } from "./booleanType.js";
|
|
5
|
+
import { FunctionType } from "./functionType.js";
|
|
6
|
+
import { JsonType, JsonArrayType, JsonObjectType, JsonPrimitiveType } from "./jsonType.js";
|
|
7
|
+
import { MixedSchema } from "./mixedSchema.js";
|
|
8
|
+
import { NullType } from "./nullType.js";
|
|
9
|
+
import { NumberType } from "./numberType.js";
|
|
10
|
+
import { ObjectType } from "./objectType.js";
|
|
11
|
+
import { StringType } from "./stringType.js";
|
|
12
|
+
import { UnionType } from "./unionType.js";
|
|
13
13
|
export {
|
|
14
14
|
ArrayType,
|
|
15
15
|
BooleanType,
|
|
@@ -25,4 +25,3 @@ export {
|
|
|
25
25
|
StringType,
|
|
26
26
|
UnionType
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
package/validation/jsonType.cjs
CHANGED
|
@@ -23,8 +23,8 @@ __export(jsonType_exports, {
|
|
|
23
23
|
JsonType: () => JsonType
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(jsonType_exports);
|
|
26
|
-
var import_schema = require(
|
|
27
|
-
var import_violation = require(
|
|
26
|
+
var import_schema = require('./schema.cjs');
|
|
27
|
+
var import_violation = require('./violation.cjs');
|
|
28
28
|
function isJsonPrimitive(value) {
|
|
29
29
|
return value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number";
|
|
30
30
|
}
|
|
@@ -139,4 +139,3 @@ class JsonType {
|
|
|
139
139
|
JsonPrimitiveType,
|
|
140
140
|
JsonType
|
|
141
141
|
});
|
|
142
|
-
//# sourceMappingURL=jsonType.cjs.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TypeSchema, Schema } from './schema.cjs';
|
|
2
|
+
|
|
3
|
+
type JsonObjectDefinition = {
|
|
4
|
+
properties?: Schema;
|
|
5
|
+
propertyNames?: Schema;
|
|
6
|
+
};
|
|
7
|
+
declare class JsonObjectType implements TypeSchema {
|
|
8
|
+
private readonly definition;
|
|
9
|
+
constructor(definition?: JsonObjectDefinition);
|
|
10
|
+
getTypes(): string[];
|
|
11
|
+
isValidType(value: unknown): boolean;
|
|
12
|
+
validate(value: unknown, path?: string[]): void;
|
|
13
|
+
}
|
|
14
|
+
type JsonArrayDefinition = {
|
|
15
|
+
items?: Schema;
|
|
16
|
+
};
|
|
17
|
+
declare class JsonArrayType implements TypeSchema {
|
|
18
|
+
private readonly definition;
|
|
19
|
+
constructor(definition?: JsonArrayDefinition);
|
|
20
|
+
getTypes(): string[];
|
|
21
|
+
isValidType(value: unknown): boolean;
|
|
22
|
+
validate(value: unknown, path?: string[]): void;
|
|
23
|
+
}
|
|
24
|
+
declare class JsonPrimitiveType implements TypeSchema {
|
|
25
|
+
getTypes(): string[];
|
|
26
|
+
isValidType(value: unknown): boolean;
|
|
27
|
+
validate(value: unknown, path?: string[]): void;
|
|
28
|
+
}
|
|
29
|
+
declare class JsonType implements TypeSchema {
|
|
30
|
+
getTypes(): string[];
|
|
31
|
+
isValidType(value: unknown): boolean;
|
|
32
|
+
validate(value: unknown, path?: string[]): void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { JsonArrayType, JsonObjectType, JsonPrimitiveType, JsonType };
|
package/validation/jsonType.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Violation } from "./schema";
|
|
2
|
-
import { describe, formatPath } from "./violation";
|
|
1
|
+
import { Violation } from "./schema.js";
|
|
2
|
+
import { describe, formatPath } from "./violation.js";
|
|
3
3
|
function isJsonPrimitive(value) {
|
|
4
4
|
return value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number";
|
|
5
5
|
}
|
|
@@ -113,4 +113,3 @@ export {
|
|
|
113
113
|
JsonPrimitiveType,
|
|
114
114
|
JsonType
|
|
115
115
|
};
|
|
116
|
-
//# sourceMappingURL=jsonType.js.map
|