@croct/sdk 0.17.10 → 0.17.12
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 +0 -1
- package/activeRecord.js +0 -1
- package/apiKey.cjs +0 -1
- package/apiKey.js +0 -1
- package/base64Url.cjs +0 -1
- package/base64Url.js +0 -1
- package/cache/cache.cjs +0 -1
- package/cache/cache.js +0 -1
- package/cache/cookieCache.cjs +0 -1
- package/cache/cookieCache.js +0 -1
- package/cache/fallbackCache.cjs +0 -1
- package/cache/fallbackCache.js +0 -1
- package/cache/inMemoryCache.cjs +0 -1
- package/cache/inMemoryCache.js +0 -1
- package/cache/index.cjs +0 -1
- package/cache/index.js +0 -1
- package/cache/localStorageCache.cjs +0 -1
- package/cache/localStorageCache.js +0 -1
- package/channel/channel.cjs +0 -1
- package/channel/channel.js +0 -1
- package/channel/encodedChannel.cjs +0 -1
- package/channel/encodedChannel.js +0 -1
- package/channel/guaranteedChannel.cjs +0 -1
- package/channel/guaranteedChannel.js +0 -1
- package/channel/httpBeaconChannel.cjs +0 -1
- package/channel/httpBeaconChannel.js +0 -1
- package/channel/index.cjs +0 -1
- package/channel/index.js +0 -1
- package/channel/queuedChannel.cjs +0 -1
- package/channel/queuedChannel.js +0 -1
- package/channel/retryChannel.cjs +0 -1
- package/channel/retryChannel.js +0 -1
- package/channel/sandboxChannel.cjs +0 -1
- package/channel/sandboxChannel.js +0 -1
- package/cid/assigner.cjs +0 -1
- package/cid/assigner.js +0 -1
- package/cid/cachedAssigner.cjs +0 -1
- package/cid/cachedAssigner.js +0 -1
- package/cid/fixedAssigner.cjs +0 -1
- package/cid/fixedAssigner.js +0 -1
- package/cid/index.cjs +0 -1
- package/cid/index.js +0 -1
- package/cid/remoteAssigner.cjs +0 -1
- package/cid/remoteAssigner.js +0 -1
- package/constants.cjs +1 -2
- package/constants.d.ts +2 -2
- package/constants.js +1 -2
- package/container.cjs +0 -1
- package/container.js +0 -1
- package/contentFetcher.cjs +0 -1
- package/contentFetcher.js +0 -1
- package/context.cjs +0 -1
- package/context.js +0 -1
- package/error.cjs +0 -1
- package/error.js +0 -1
- package/evaluator.cjs +0 -1
- package/evaluator.js +0 -1
- package/eventManager.cjs +0 -1
- package/eventManager.js +0 -1
- package/eventSubjectProcessor.cjs +0 -1
- package/eventSubjectProcessor.js +0 -1
- package/facade/contentFetcherFacade.cjs +0 -1
- package/facade/contentFetcherFacade.js +0 -1
- package/facade/evaluatorFacade.cjs +0 -1
- package/facade/evaluatorFacade.js +0 -1
- package/facade/index.cjs +0 -1
- package/facade/index.js +0 -1
- package/facade/sdkFacade.cjs +0 -1
- package/facade/sdkFacade.js +0 -1
- package/facade/sessionFacade.cjs +0 -1
- package/facade/sessionFacade.js +0 -1
- package/facade/sessionPatch.cjs +0 -1
- package/facade/sessionPatch.js +0 -1
- package/facade/trackerFacade.cjs +0 -1
- package/facade/trackerFacade.js +0 -1
- package/facade/userFacade.cjs +0 -1
- package/facade/userFacade.js +0 -1
- package/facade/userPatch.cjs +0 -1
- package/facade/userPatch.js +0 -1
- package/help.cjs +0 -1
- package/help.js +0 -1
- package/index.cjs +0 -1
- package/index.js +0 -1
- package/logging/consoleLogger.cjs +0 -1
- package/logging/consoleLogger.js +0 -1
- package/logging/filteredLogger.cjs +0 -1
- package/logging/filteredLogger.js +0 -1
- package/logging/index.cjs +0 -1
- package/logging/index.js +0 -1
- package/logging/logger.cjs +0 -1
- package/logging/logger.js +0 -1
- package/logging/namespacedLogger.cjs +0 -1
- package/logging/namespacedLogger.js +0 -1
- package/logging/nullLogger.cjs +0 -1
- package/logging/nullLogger.js +0 -1
- package/namespacedStorage.cjs +0 -1
- package/namespacedStorage.js +0 -1
- package/package.json +1 -1
- package/patch.cjs +0 -1
- package/patch.js +0 -1
- package/queue/capacityRestrictedQueue.cjs +0 -1
- package/queue/capacityRestrictedQueue.js +0 -1
- package/queue/inMemoryQueue.cjs +0 -1
- package/queue/inMemoryQueue.js +0 -1
- package/queue/index.cjs +0 -1
- package/queue/index.js +0 -1
- package/queue/monitoredQueue.cjs +0 -1
- package/queue/monitoredQueue.js +0 -1
- package/queue/persistentQueue.cjs +0 -1
- package/queue/persistentQueue.js +0 -1
- package/queue/queue.cjs +0 -1
- package/queue/queue.js +0 -1
- package/retry/arbitraryPolicy.cjs +0 -1
- package/retry/arbitraryPolicy.js +0 -1
- package/retry/backoffPolicy.cjs +0 -1
- package/retry/backoffPolicy.js +0 -1
- package/retry/index.cjs +0 -1
- package/retry/index.js +0 -1
- package/retry/maxAttemptsPolicy.cjs +0 -1
- package/retry/maxAttemptsPolicy.js +0 -1
- package/retry/neverPolicy.cjs +0 -1
- package/retry/neverPolicy.js +0 -1
- package/retry/policy.cjs +0 -1
- package/retry/policy.js +0 -1
- package/schema/attributeSchema.cjs +0 -1
- package/schema/attributeSchema.js +0 -1
- package/schema/contentFetcherSchemas.cjs +0 -1
- package/schema/contentFetcherSchemas.js +0 -1
- package/schema/contentSchemas.cjs +0 -1
- package/schema/contentSchemas.js +0 -1
- package/schema/contextSchemas.cjs +0 -1
- package/schema/contextSchemas.js +0 -1
- package/schema/ecommerceSchemas.cjs +0 -1
- package/schema/ecommerceSchemas.js +0 -1
- package/schema/evaluatorSchemas.cjs +0 -1
- package/schema/evaluatorSchemas.js +0 -1
- package/schema/eventSchemas.cjs +0 -1
- package/schema/eventSchemas.js +0 -1
- package/schema/index.cjs +0 -1
- package/schema/index.js +0 -1
- package/schema/loggerSchema.cjs +0 -1
- package/schema/loggerSchema.js +0 -1
- package/schema/operationSchemas.cjs +0 -1
- package/schema/operationSchemas.js +0 -1
- package/schema/sdkFacadeSchemas.cjs +0 -1
- package/schema/sdkFacadeSchemas.js +0 -1
- package/schema/sdkSchemas.cjs +0 -1
- package/schema/sdkSchemas.js +0 -1
- package/schema/tokenSchema.cjs +0 -1
- package/schema/tokenSchema.js +0 -1
- package/schema/userSchema.cjs +0 -1
- package/schema/userSchema.js +0 -1
- package/sdk.cjs +0 -1
- package/sdk.js +0 -1
- package/sdkEvents.cjs +0 -1
- package/sdkEvents.js +0 -1
- package/sourceLocation.cjs +0 -1
- package/sourceLocation.js +0 -1
- package/tab.cjs +0 -1
- package/tab.js +0 -1
- package/token/cachedTokenStore.cjs +0 -1
- package/token/cachedTokenStore.js +0 -1
- package/token/inMemoryTokenStore.cjs +0 -1
- package/token/inMemoryTokenStore.js +0 -1
- package/token/index.cjs +0 -1
- package/token/index.js +0 -1
- package/token/replicatedTokenStore.cjs +0 -1
- package/token/replicatedTokenStore.js +0 -1
- package/token/token.cjs +0 -1
- package/token/token.js +0 -1
- package/tracker.cjs +0 -1
- package/tracker.js +0 -1
- package/trackingEvents.cjs +0 -1
- package/trackingEvents.js +0 -1
- package/transformer.cjs +0 -1
- package/transformer.js +0 -1
- package/utilityTypes.cjs +0 -1
- package/utilityTypes.js +0 -1
- package/uuid.cjs +0 -1
- package/uuid.js +0 -1
- package/validation/arrayType.cjs +0 -1
- package/validation/arrayType.js +0 -1
- package/validation/booleanType.cjs +0 -1
- package/validation/booleanType.js +0 -1
- package/validation/functionType.cjs +0 -1
- package/validation/functionType.js +0 -1
- package/validation/index.cjs +0 -1
- package/validation/index.js +0 -1
- package/validation/jsonType.cjs +0 -1
- package/validation/jsonType.js +0 -1
- package/validation/mixedSchema.cjs +0 -1
- package/validation/mixedSchema.js +0 -1
- package/validation/nullType.cjs +0 -1
- package/validation/nullType.js +0 -1
- package/validation/numberType.cjs +0 -1
- package/validation/numberType.js +0 -1
- package/validation/objectType.cjs +0 -1
- package/validation/objectType.js +0 -1
- package/validation/schema.cjs +0 -1
- package/validation/schema.js +0 -1
- package/validation/stringType.cjs +0 -1
- package/validation/stringType.js +0 -1
- package/validation/unionType.cjs +0 -1
- package/validation/unionType.js +0 -1
- package/validation/violation.cjs +0 -1
- 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/src/activeRecord.ts +0 -150
- package/src/apiKey.ts +0 -208
- package/src/base64Url.ts +0 -22
- package/src/cache/cache.ts +0 -22
- package/src/cache/cookieCache.ts +0 -88
- package/src/cache/fallbackCache.ts +0 -29
- package/src/cache/inMemoryCache.ts +0 -21
- package/src/cache/index.ts +0 -4
- package/src/cache/localStorageCache.ts +0 -85
- package/src/channel/channel.ts +0 -52
- package/src/channel/encodedChannel.ts +0 -21
- package/src/channel/guaranteedChannel.ts +0 -131
- package/src/channel/httpBeaconChannel.ts +0 -128
- package/src/channel/index.ts +0 -7
- package/src/channel/queuedChannel.ts +0 -143
- package/src/channel/retryChannel.ts +0 -94
- package/src/channel/sandboxChannel.ts +0 -47
- package/src/cid/assigner.ts +0 -3
- package/src/cid/cachedAssigner.ts +0 -68
- package/src/cid/fixedAssigner.ts +0 -13
- package/src/cid/index.ts +0 -4
- package/src/cid/remoteAssigner.ts +0 -57
- package/src/constants.ts +0 -4
- package/src/container.ts +0 -410
- package/src/contentFetcher.ts +0 -290
- package/src/context.ts +0 -139
- package/src/error.ts +0 -31
- package/src/evaluator.ts +0 -314
- package/src/eventManager.ts +0 -53
- package/src/eventSubjectProcessor.ts +0 -85
- package/src/facade/contentFetcherFacade.ts +0 -69
- package/src/facade/evaluatorFacade.ts +0 -111
- package/src/facade/index.ts +0 -7
- package/src/facade/sdkFacade.ts +0 -310
- package/src/facade/sessionFacade.ts +0 -14
- package/src/facade/sessionPatch.ts +0 -32
- package/src/facade/trackerFacade.ts +0 -98
- package/src/facade/userFacade.ts +0 -26
- package/src/facade/userPatch.ts +0 -32
- package/src/help.ts +0 -24
- package/src/index.ts +0 -4
- package/src/logging/consoleLogger.ts +0 -38
- package/src/logging/filteredLogger.ts +0 -57
- package/src/logging/index.ts +0 -5
- package/src/logging/logger.ts +0 -13
- package/src/logging/namespacedLogger.ts +0 -32
- package/src/logging/nullLogger.ts +0 -19
- package/src/namespacedStorage.ts +0 -69
- package/src/patch.ts +0 -64
- package/src/queue/capacityRestrictedQueue.ts +0 -44
- package/src/queue/inMemoryQueue.ts +0 -43
- package/src/queue/index.ts +0 -5
- package/src/queue/monitoredQueue.ts +0 -168
- package/src/queue/persistentQueue.ts +0 -73
- package/src/queue/queue.ts +0 -15
- package/src/retry/arbitraryPolicy.ts +0 -21
- package/src/retry/backoffPolicy.ts +0 -84
- package/src/retry/index.ts +0 -5
- package/src/retry/maxAttemptsPolicy.ts +0 -28
- package/src/retry/neverPolicy.ts +0 -11
- package/src/retry/policy.ts +0 -5
- package/src/schema/attributeSchema.ts +0 -6
- package/src/schema/contentFetcherSchemas.ts +0 -23
- package/src/schema/contentSchemas.ts +0 -44
- package/src/schema/contextSchemas.ts +0 -5
- package/src/schema/ecommerceSchemas.ts +0 -179
- package/src/schema/evaluatorSchemas.ts +0 -52
- package/src/schema/eventSchemas.ts +0 -134
- package/src/schema/index.ts +0 -11
- package/src/schema/loggerSchema.ts +0 -12
- package/src/schema/operationSchemas.ts +0 -102
- package/src/schema/sdkFacadeSchemas.ts +0 -64
- package/src/schema/sdkSchemas.ts +0 -82
- package/src/schema/tokenSchema.ts +0 -42
- package/src/schema/userSchema.ts +0 -184
- package/src/sdk.ts +0 -183
- package/src/sdkEvents.ts +0 -15
- package/src/sourceLocation.ts +0 -85
- package/src/tab.ts +0 -148
- package/src/token/cachedTokenStore.ts +0 -34
- package/src/token/inMemoryTokenStore.ts +0 -13
- package/src/token/index.ts +0 -4
- package/src/token/replicatedTokenStore.ts +0 -21
- package/src/token/token.ts +0 -301
- package/src/tracker.ts +0 -504
- package/src/trackingEvents.ts +0 -452
- package/src/transformer.ts +0 -7
- package/src/utilityTypes.ts +0 -3
- package/src/uuid.ts +0 -43
- package/src/validation/arrayType.ts +0 -71
- package/src/validation/booleanType.ts +0 -22
- package/src/validation/functionType.ts +0 -22
- package/src/validation/index.ts +0 -12
- package/src/validation/jsonType.ts +0 -156
- package/src/validation/mixedSchema.ts +0 -7
- package/src/validation/nullType.ts +0 -22
- package/src/validation/numberType.ts +0 -59
- package/src/validation/objectType.ts +0 -138
- package/src/validation/schema.ts +0 -21
- package/src/validation/stringType.ts +0 -118
- package/src/validation/unionType.ts +0 -53
- package/src/validation/violation.ts +0 -23
- 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
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {ArrayType, StringType, ObjectType, NumberType} from '../validation';
|
|
2
|
-
|
|
3
|
-
export const postDetails = new ObjectType({
|
|
4
|
-
required: ['postId', 'title', 'publishTime'],
|
|
5
|
-
properties: {
|
|
6
|
-
postId: new StringType({
|
|
7
|
-
minLength: 1,
|
|
8
|
-
maxLength: 200,
|
|
9
|
-
}),
|
|
10
|
-
url: new StringType({
|
|
11
|
-
format: 'url',
|
|
12
|
-
}),
|
|
13
|
-
title: new StringType({
|
|
14
|
-
minLength: 1,
|
|
15
|
-
maxLength: 200,
|
|
16
|
-
}),
|
|
17
|
-
tags: new ArrayType({
|
|
18
|
-
items: new StringType({
|
|
19
|
-
minLength: 1,
|
|
20
|
-
maxLength: 50,
|
|
21
|
-
}),
|
|
22
|
-
minItems: 1,
|
|
23
|
-
maxItems: 10,
|
|
24
|
-
}),
|
|
25
|
-
categories: new ArrayType({
|
|
26
|
-
items: new StringType({
|
|
27
|
-
minLength: 1,
|
|
28
|
-
maxLength: 50,
|
|
29
|
-
}),
|
|
30
|
-
minItems: 1,
|
|
31
|
-
maxItems: 10,
|
|
32
|
-
}),
|
|
33
|
-
authors: new ArrayType({
|
|
34
|
-
items: new StringType({
|
|
35
|
-
minLength: 1,
|
|
36
|
-
maxLength: 50,
|
|
37
|
-
}),
|
|
38
|
-
minItems: 1,
|
|
39
|
-
maxItems: 10,
|
|
40
|
-
}),
|
|
41
|
-
publishTime: new NumberType(),
|
|
42
|
-
updateTime: new NumberType(),
|
|
43
|
-
},
|
|
44
|
-
});
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import {ObjectType, StringType, NumberType, ArrayType} from '../validation';
|
|
2
|
-
|
|
3
|
-
export const productDetails = new ObjectType({
|
|
4
|
-
required: ['productId', 'name', 'displayPrice'],
|
|
5
|
-
properties: {
|
|
6
|
-
productId: new StringType({
|
|
7
|
-
minLength: 1,
|
|
8
|
-
maxLength: 50,
|
|
9
|
-
}),
|
|
10
|
-
sku: new StringType({
|
|
11
|
-
minLength: 1,
|
|
12
|
-
maxLength: 50,
|
|
13
|
-
}),
|
|
14
|
-
name: new StringType({
|
|
15
|
-
minLength: 1,
|
|
16
|
-
maxLength: 200,
|
|
17
|
-
}),
|
|
18
|
-
category: new StringType({
|
|
19
|
-
minLength: 1,
|
|
20
|
-
maxLength: 100,
|
|
21
|
-
}),
|
|
22
|
-
brand: new StringType({
|
|
23
|
-
minLength: 1,
|
|
24
|
-
maxLength: 100,
|
|
25
|
-
}),
|
|
26
|
-
variant: new StringType({
|
|
27
|
-
minLength: 1,
|
|
28
|
-
maxLength: 50,
|
|
29
|
-
}),
|
|
30
|
-
displayPrice: new NumberType({
|
|
31
|
-
minimum: 0,
|
|
32
|
-
}),
|
|
33
|
-
originalPrice: new NumberType({
|
|
34
|
-
minimum: 0,
|
|
35
|
-
}),
|
|
36
|
-
url: new StringType({
|
|
37
|
-
format: 'url',
|
|
38
|
-
}),
|
|
39
|
-
imageUrl: new StringType({
|
|
40
|
-
format: 'url',
|
|
41
|
-
}),
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
export const cartItem = new ObjectType({
|
|
46
|
-
required: ['index', 'product', 'quantity', 'total'],
|
|
47
|
-
properties: {
|
|
48
|
-
index: new NumberType({
|
|
49
|
-
minimum: 0,
|
|
50
|
-
}),
|
|
51
|
-
product: productDetails,
|
|
52
|
-
quantity: new NumberType({
|
|
53
|
-
minimum: 1,
|
|
54
|
-
}),
|
|
55
|
-
total: new NumberType({
|
|
56
|
-
minimum: 0,
|
|
57
|
-
}),
|
|
58
|
-
discount: new NumberType({
|
|
59
|
-
minimum: 0,
|
|
60
|
-
}),
|
|
61
|
-
coupon: new StringType({
|
|
62
|
-
minLength: 1,
|
|
63
|
-
maxLength: 50,
|
|
64
|
-
}),
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
export const cart = new ObjectType({
|
|
69
|
-
required: ['currency', 'items', 'total'],
|
|
70
|
-
properties: {
|
|
71
|
-
currency: new StringType({
|
|
72
|
-
maxLength: 10,
|
|
73
|
-
minLength: 1,
|
|
74
|
-
}),
|
|
75
|
-
items: new ArrayType({
|
|
76
|
-
items: cartItem,
|
|
77
|
-
}),
|
|
78
|
-
subtotal: new NumberType({
|
|
79
|
-
minimum: 0,
|
|
80
|
-
}),
|
|
81
|
-
shippingPrice: new NumberType({
|
|
82
|
-
minimum: 0,
|
|
83
|
-
}),
|
|
84
|
-
taxes: new ObjectType({
|
|
85
|
-
additionalProperties: new NumberType(),
|
|
86
|
-
minProperties: 1,
|
|
87
|
-
}),
|
|
88
|
-
costs: new ObjectType({
|
|
89
|
-
additionalProperties: new NumberType(),
|
|
90
|
-
minProperties: 1,
|
|
91
|
-
}),
|
|
92
|
-
discount: new NumberType({
|
|
93
|
-
minimum: 0,
|
|
94
|
-
}),
|
|
95
|
-
total: new NumberType({
|
|
96
|
-
minimum: 0,
|
|
97
|
-
}),
|
|
98
|
-
coupon: new StringType({
|
|
99
|
-
minLength: 1,
|
|
100
|
-
maxLength: 50,
|
|
101
|
-
}),
|
|
102
|
-
lastUpdateTime: new NumberType(),
|
|
103
|
-
},
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
export const orderItem = new ObjectType({
|
|
107
|
-
required: ['index', 'product', 'quantity', 'total'],
|
|
108
|
-
properties: {
|
|
109
|
-
index: new NumberType({
|
|
110
|
-
minimum: 0,
|
|
111
|
-
}),
|
|
112
|
-
product: productDetails,
|
|
113
|
-
quantity: new NumberType({
|
|
114
|
-
minimum: 1,
|
|
115
|
-
}),
|
|
116
|
-
total: new NumberType({
|
|
117
|
-
minimum: 0,
|
|
118
|
-
}),
|
|
119
|
-
discount: new NumberType({
|
|
120
|
-
minimum: 0,
|
|
121
|
-
}),
|
|
122
|
-
coupon: new StringType({
|
|
123
|
-
minLength: 1,
|
|
124
|
-
maxLength: 50,
|
|
125
|
-
}),
|
|
126
|
-
},
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
export const order = new ObjectType({
|
|
130
|
-
required: ['orderId', 'currency', 'items', 'total'],
|
|
131
|
-
properties: {
|
|
132
|
-
orderId: new StringType({
|
|
133
|
-
minLength: 1,
|
|
134
|
-
maxLength: 50,
|
|
135
|
-
}),
|
|
136
|
-
currency: new StringType({
|
|
137
|
-
maxLength: 10,
|
|
138
|
-
minLength: 1,
|
|
139
|
-
}),
|
|
140
|
-
items: new ArrayType({
|
|
141
|
-
items: orderItem,
|
|
142
|
-
minItems: 1,
|
|
143
|
-
}),
|
|
144
|
-
subtotal: new NumberType({
|
|
145
|
-
minimum: 0,
|
|
146
|
-
}),
|
|
147
|
-
shippingPrice: new NumberType({
|
|
148
|
-
minimum: 0,
|
|
149
|
-
}),
|
|
150
|
-
taxes: new ObjectType({
|
|
151
|
-
additionalProperties: new NumberType(),
|
|
152
|
-
minProperties: 1,
|
|
153
|
-
}),
|
|
154
|
-
costs: new ObjectType({
|
|
155
|
-
additionalProperties: new NumberType(),
|
|
156
|
-
minProperties: 1,
|
|
157
|
-
}),
|
|
158
|
-
discount: new NumberType({
|
|
159
|
-
minimum: 0,
|
|
160
|
-
}),
|
|
161
|
-
total: new NumberType({
|
|
162
|
-
minimum: 0,
|
|
163
|
-
}),
|
|
164
|
-
coupon: new StringType({
|
|
165
|
-
minLength: 1,
|
|
166
|
-
maxLength: 50,
|
|
167
|
-
}),
|
|
168
|
-
paymentMethod: new StringType({
|
|
169
|
-
minLength: 1,
|
|
170
|
-
maxLength: 50,
|
|
171
|
-
}),
|
|
172
|
-
installments: new NumberType({
|
|
173
|
-
minimum: 1,
|
|
174
|
-
}),
|
|
175
|
-
status: new StringType({
|
|
176
|
-
enumeration: ['placed', 'paid', 'complete'],
|
|
177
|
-
}),
|
|
178
|
-
},
|
|
179
|
-
});
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObjectType,
|
|
3
|
-
NumberType,
|
|
4
|
-
JsonObjectType,
|
|
5
|
-
UnionType,
|
|
6
|
-
StringType,
|
|
7
|
-
NullType,
|
|
8
|
-
BooleanType,
|
|
9
|
-
TypeSchema,
|
|
10
|
-
ArrayType,
|
|
11
|
-
} from '../validation';
|
|
12
|
-
|
|
13
|
-
function createJsonSchema(maximumDepth: number): TypeSchema {
|
|
14
|
-
return new UnionType(
|
|
15
|
-
new NullType(),
|
|
16
|
-
new NumberType(),
|
|
17
|
-
new BooleanType(),
|
|
18
|
-
new StringType({maxLength: 255}),
|
|
19
|
-
...(maximumDepth > 1
|
|
20
|
-
? [
|
|
21
|
-
new JsonObjectType({
|
|
22
|
-
propertyNames: new UnionType(
|
|
23
|
-
new NumberType(),
|
|
24
|
-
new StringType({
|
|
25
|
-
minLength: 1,
|
|
26
|
-
maxLength: 50,
|
|
27
|
-
}),
|
|
28
|
-
),
|
|
29
|
-
properties: createJsonSchema(maximumDepth - 1),
|
|
30
|
-
}),
|
|
31
|
-
new ArrayType({items: createJsonSchema(maximumDepth - 1)}),
|
|
32
|
-
]
|
|
33
|
-
: []
|
|
34
|
-
),
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export const evaluationOptionsSchema = new ObjectType({
|
|
39
|
-
properties: {
|
|
40
|
-
timeout: new NumberType({
|
|
41
|
-
integer: true,
|
|
42
|
-
minimum: 0,
|
|
43
|
-
}),
|
|
44
|
-
attributes: new JsonObjectType({
|
|
45
|
-
propertyNames: new StringType({
|
|
46
|
-
minLength: 1,
|
|
47
|
-
maxLength: 50,
|
|
48
|
-
}),
|
|
49
|
-
properties: createJsonSchema(5),
|
|
50
|
-
}),
|
|
51
|
-
},
|
|
52
|
-
});
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObjectType,
|
|
3
|
-
StringType,
|
|
4
|
-
NumberType,
|
|
5
|
-
UnionType,
|
|
6
|
-
NullType,
|
|
7
|
-
BooleanType,
|
|
8
|
-
ArrayType,
|
|
9
|
-
} from '../validation';
|
|
10
|
-
import {cart, order, productDetails} from './ecommerceSchemas';
|
|
11
|
-
import {userProfileSchema} from './userSchema';
|
|
12
|
-
import {postDetails} from './contentSchemas';
|
|
13
|
-
|
|
14
|
-
export const cartModified = new ObjectType({
|
|
15
|
-
required: ['cart'],
|
|
16
|
-
properties: {
|
|
17
|
-
cart: cart,
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
export const cartViewed = new ObjectType({
|
|
22
|
-
required: ['cart'],
|
|
23
|
-
properties: {
|
|
24
|
-
cart: cart,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export const checkoutStarted = new ObjectType({
|
|
29
|
-
required: ['cart'],
|
|
30
|
-
properties: {
|
|
31
|
-
cart: cart,
|
|
32
|
-
orderId: new StringType({
|
|
33
|
-
minLength: 1,
|
|
34
|
-
maxLength: 50,
|
|
35
|
-
}),
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export const orderPlaced = new ObjectType({
|
|
40
|
-
required: ['order'],
|
|
41
|
-
properties: {
|
|
42
|
-
order: order,
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
export const productViewed = new ObjectType({
|
|
47
|
-
required: ['product'],
|
|
48
|
-
properties: {
|
|
49
|
-
product: productDetails,
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
export const userSignedUp = new ObjectType({
|
|
54
|
-
required: ['userId'],
|
|
55
|
-
properties: {
|
|
56
|
-
userId: new StringType({
|
|
57
|
-
minLength: 1,
|
|
58
|
-
maxLength: 254,
|
|
59
|
-
}),
|
|
60
|
-
profile: userProfileSchema,
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export const goalCompleted = new ObjectType({
|
|
65
|
-
required: ['goalId'],
|
|
66
|
-
properties: {
|
|
67
|
-
goalId: new StringType({
|
|
68
|
-
minLength: 3,
|
|
69
|
-
maxLength: 100,
|
|
70
|
-
pattern: /^[a-z0-9][a-z0-9:_-]+[a-z0-9]$/i,
|
|
71
|
-
}),
|
|
72
|
-
value: new NumberType({
|
|
73
|
-
minimum: 0,
|
|
74
|
-
}),
|
|
75
|
-
currency: new StringType({
|
|
76
|
-
minLength: 1,
|
|
77
|
-
maxLength: 10,
|
|
78
|
-
}),
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
export const interestShown = new ObjectType({
|
|
83
|
-
required: ['interests'],
|
|
84
|
-
properties: {
|
|
85
|
-
interests: new ArrayType({
|
|
86
|
-
items: new StringType({
|
|
87
|
-
minLength: 1,
|
|
88
|
-
maxLength: 50,
|
|
89
|
-
}),
|
|
90
|
-
minItems: 1,
|
|
91
|
-
maxItems: 10,
|
|
92
|
-
}),
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
export const postViewed = new ObjectType({
|
|
97
|
-
required: ['post'],
|
|
98
|
-
properties: {
|
|
99
|
-
post: postDetails,
|
|
100
|
-
},
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
export const linkOpened = new ObjectType({
|
|
104
|
-
required: ['link'],
|
|
105
|
-
properties: {
|
|
106
|
-
link: new StringType(),
|
|
107
|
-
},
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
export const eventOccurred = new ObjectType({
|
|
111
|
-
required: ['name'],
|
|
112
|
-
properties: {
|
|
113
|
-
name: new StringType({
|
|
114
|
-
minLength: 1,
|
|
115
|
-
maxLength: 50,
|
|
116
|
-
}),
|
|
117
|
-
details: new ObjectType({
|
|
118
|
-
additionalProperties: new UnionType(
|
|
119
|
-
new NullType(),
|
|
120
|
-
new BooleanType(),
|
|
121
|
-
new NumberType(),
|
|
122
|
-
new StringType({
|
|
123
|
-
maxLength: 300,
|
|
124
|
-
}),
|
|
125
|
-
),
|
|
126
|
-
propertyNames: new StringType({
|
|
127
|
-
minLength: 1,
|
|
128
|
-
maxLength: 20,
|
|
129
|
-
format: 'identifier',
|
|
130
|
-
}),
|
|
131
|
-
maxProperties: 10,
|
|
132
|
-
}),
|
|
133
|
-
},
|
|
134
|
-
});
|
package/src/schema/index.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './contextSchemas';
|
|
2
|
-
export * from './ecommerceSchemas';
|
|
3
|
-
export * from './evaluatorSchemas';
|
|
4
|
-
export * from './contentFetcherSchemas';
|
|
5
|
-
export * from './eventSchemas';
|
|
6
|
-
export * from './loggerSchema';
|
|
7
|
-
export * from './operationSchemas';
|
|
8
|
-
export * from './sdkFacadeSchemas';
|
|
9
|
-
export * from './sdkSchemas';
|
|
10
|
-
export * from './tokenSchema';
|
|
11
|
-
export * from './userSchema';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {ObjectType, FunctionType} from '../validation';
|
|
2
|
-
|
|
3
|
-
export const loggerSchema = new ObjectType({
|
|
4
|
-
required: ['debug', 'info', 'warn', 'error'],
|
|
5
|
-
additionalProperties: true,
|
|
6
|
-
properties: {
|
|
7
|
-
debug: new FunctionType(),
|
|
8
|
-
info: new FunctionType(),
|
|
9
|
-
warn: new FunctionType(),
|
|
10
|
-
error: new FunctionType(),
|
|
11
|
-
},
|
|
12
|
-
});
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObjectType,
|
|
3
|
-
StringType,
|
|
4
|
-
NumberType,
|
|
5
|
-
JsonArrayType,
|
|
6
|
-
JsonObjectType,
|
|
7
|
-
JsonPrimitiveType,
|
|
8
|
-
UnionType,
|
|
9
|
-
} from '../validation';
|
|
10
|
-
import {attributeNameSchema} from './attributeSchema';
|
|
11
|
-
|
|
12
|
-
const pointer = new StringType({
|
|
13
|
-
format: 'pointer',
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
const simpleArray = new JsonArrayType({
|
|
17
|
-
items: new JsonPrimitiveType(),
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const simpleMap = new JsonObjectType({
|
|
21
|
-
properties: new JsonPrimitiveType(),
|
|
22
|
-
propertyNames: attributeNameSchema,
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const complexMap = new JsonObjectType({
|
|
26
|
-
properties: new UnionType(new JsonPrimitiveType(), simpleArray, simpleMap),
|
|
27
|
-
propertyNames: attributeNameSchema,
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
const collectionValue = new UnionType(simpleArray, complexMap);
|
|
31
|
-
|
|
32
|
-
const mixedValue = new UnionType(new JsonPrimitiveType(), simpleArray, complexMap);
|
|
33
|
-
|
|
34
|
-
export const addOperation = new ObjectType({
|
|
35
|
-
required: ['path', 'value'],
|
|
36
|
-
properties: {
|
|
37
|
-
path: pointer,
|
|
38
|
-
value: mixedValue,
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
export const setOperation = new ObjectType({
|
|
43
|
-
required: ['path', 'value'],
|
|
44
|
-
properties: {
|
|
45
|
-
path: pointer,
|
|
46
|
-
value: mixedValue,
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
export const combineOperation = new ObjectType({
|
|
51
|
-
required: ['path', 'value'],
|
|
52
|
-
properties: {
|
|
53
|
-
path: pointer,
|
|
54
|
-
value: mixedValue,
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
export const mergeOperation = new ObjectType({
|
|
59
|
-
required: ['path', 'value'],
|
|
60
|
-
properties: {
|
|
61
|
-
path: pointer,
|
|
62
|
-
value: collectionValue,
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
export const decrementOperation = new ObjectType({
|
|
67
|
-
required: ['path', 'value'],
|
|
68
|
-
properties: {
|
|
69
|
-
path: pointer,
|
|
70
|
-
value: new NumberType(),
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
export const incrementOperation = new ObjectType({
|
|
75
|
-
required: ['path', 'value'],
|
|
76
|
-
properties: {
|
|
77
|
-
path: pointer,
|
|
78
|
-
value: new NumberType(),
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
export const clearOperation = new ObjectType({
|
|
83
|
-
required: ['path'],
|
|
84
|
-
properties: {
|
|
85
|
-
path: pointer,
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
export const unsetOperation = new ObjectType({
|
|
90
|
-
required: ['path'],
|
|
91
|
-
properties: {
|
|
92
|
-
path: pointer,
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
export const removeOperation = new ObjectType({
|
|
97
|
-
required: ['path', 'value'],
|
|
98
|
-
properties: {
|
|
99
|
-
path: pointer,
|
|
100
|
-
value: mixedValue,
|
|
101
|
-
},
|
|
102
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObjectType,
|
|
3
|
-
StringType,
|
|
4
|
-
BooleanType,
|
|
5
|
-
UnionType,
|
|
6
|
-
NullType,
|
|
7
|
-
FunctionType,
|
|
8
|
-
NumberType,
|
|
9
|
-
} from '../validation';
|
|
10
|
-
import {tokenScopeSchema} from './contextSchemas';
|
|
11
|
-
import {cookieOptionsSchema, eventMetadataSchema} from './sdkSchemas';
|
|
12
|
-
import {loggerSchema} from './loggerSchema';
|
|
13
|
-
|
|
14
|
-
export const sdkFacadeConfigurationSchema = new ObjectType({
|
|
15
|
-
required: ['appId'],
|
|
16
|
-
properties: {
|
|
17
|
-
appId: new StringType({
|
|
18
|
-
format: 'uuid',
|
|
19
|
-
}),
|
|
20
|
-
clientId: new StringType({
|
|
21
|
-
pattern: /^[0-9a-f]{32}$/i,
|
|
22
|
-
}),
|
|
23
|
-
tokenScope: tokenScopeSchema,
|
|
24
|
-
disableCidMirroring: new BooleanType(),
|
|
25
|
-
debug: new BooleanType(),
|
|
26
|
-
test: new BooleanType(),
|
|
27
|
-
track: new BooleanType(),
|
|
28
|
-
logger: loggerSchema,
|
|
29
|
-
urlSanitizer: new FunctionType(),
|
|
30
|
-
eventMetadata: eventMetadataSchema,
|
|
31
|
-
userId: new UnionType(
|
|
32
|
-
new StringType({
|
|
33
|
-
minLength: 1,
|
|
34
|
-
}),
|
|
35
|
-
new NullType(),
|
|
36
|
-
),
|
|
37
|
-
token: new UnionType(
|
|
38
|
-
new StringType({
|
|
39
|
-
pattern: /^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/,
|
|
40
|
-
}),
|
|
41
|
-
new NullType(),
|
|
42
|
-
),
|
|
43
|
-
baseEndpointUrl: new StringType({
|
|
44
|
-
format: 'url',
|
|
45
|
-
}),
|
|
46
|
-
cidAssignerEndpointUrl: new StringType({
|
|
47
|
-
format: 'url',
|
|
48
|
-
}),
|
|
49
|
-
cookie: new ObjectType({
|
|
50
|
-
properties: {
|
|
51
|
-
clientId: cookieOptionsSchema,
|
|
52
|
-
userToken: cookieOptionsSchema,
|
|
53
|
-
previewToken: cookieOptionsSchema,
|
|
54
|
-
},
|
|
55
|
-
}),
|
|
56
|
-
defaultFetchTimeout: new NumberType({
|
|
57
|
-
integer: true,
|
|
58
|
-
minimum: 1,
|
|
59
|
-
}),
|
|
60
|
-
defaultPreferredLocale: new StringType({
|
|
61
|
-
pattern: /^[a-z]{2,3}([-_][a-z]{2,3})?$/i,
|
|
62
|
-
}),
|
|
63
|
-
},
|
|
64
|
-
});
|
package/src/schema/sdkSchemas.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import {ObjectType, StringType, BooleanType, NumberType, FunctionType} from '../validation';
|
|
2
|
-
import {tokenScopeSchema} from './contextSchemas';
|
|
3
|
-
import {loggerSchema} from './loggerSchema';
|
|
4
|
-
|
|
5
|
-
export const eventMetadataSchema = new ObjectType({
|
|
6
|
-
maxProperties: 5,
|
|
7
|
-
propertyNames: new StringType({
|
|
8
|
-
minLength: 1,
|
|
9
|
-
maxLength: 20,
|
|
10
|
-
format: 'identifier',
|
|
11
|
-
}),
|
|
12
|
-
additionalProperties: new StringType({
|
|
13
|
-
maxLength: 300,
|
|
14
|
-
}),
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export const cookieOptionsSchema = new ObjectType({
|
|
18
|
-
required: ['name'],
|
|
19
|
-
properties: {
|
|
20
|
-
name: new StringType({
|
|
21
|
-
minLength: 1,
|
|
22
|
-
}),
|
|
23
|
-
domain: new StringType({
|
|
24
|
-
minLength: 1,
|
|
25
|
-
}),
|
|
26
|
-
path: new StringType({
|
|
27
|
-
minLength: 1,
|
|
28
|
-
}),
|
|
29
|
-
secure: new BooleanType(),
|
|
30
|
-
sameSite: new StringType({
|
|
31
|
-
enumeration: ['strict', 'lax', 'none'],
|
|
32
|
-
}),
|
|
33
|
-
maxAge: new NumberType({
|
|
34
|
-
minimum: 0,
|
|
35
|
-
integer: true,
|
|
36
|
-
}),
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
export const sdkConfigurationSchema = new ObjectType({
|
|
41
|
-
required: ['appId', 'tokenScope', 'disableCidMirroring', 'debug', 'test'],
|
|
42
|
-
properties: {
|
|
43
|
-
appId: new StringType({
|
|
44
|
-
format: 'uuid',
|
|
45
|
-
}),
|
|
46
|
-
clientId: new StringType({
|
|
47
|
-
pattern: /^[0-9a-f]{32}$/i,
|
|
48
|
-
}),
|
|
49
|
-
tokenScope: tokenScopeSchema,
|
|
50
|
-
baseEndpointUrl: new StringType({
|
|
51
|
-
format: 'url',
|
|
52
|
-
}),
|
|
53
|
-
cidAssignerEndpointUrl: new StringType({
|
|
54
|
-
format: 'url',
|
|
55
|
-
}),
|
|
56
|
-
beaconQueueSize: new NumberType({
|
|
57
|
-
minimum: 0,
|
|
58
|
-
integer: true,
|
|
59
|
-
}),
|
|
60
|
-
disableCidMirroring: new BooleanType(),
|
|
61
|
-
cookie: new ObjectType({
|
|
62
|
-
properties: {
|
|
63
|
-
clientId: cookieOptionsSchema,
|
|
64
|
-
userToken: cookieOptionsSchema,
|
|
65
|
-
previewToken: cookieOptionsSchema,
|
|
66
|
-
},
|
|
67
|
-
}),
|
|
68
|
-
debug: new BooleanType(),
|
|
69
|
-
test: new BooleanType(),
|
|
70
|
-
logger: loggerSchema,
|
|
71
|
-
urlSanitizer: new FunctionType(),
|
|
72
|
-
eventMetadata: eventMetadataSchema,
|
|
73
|
-
eventProcessor: new FunctionType(),
|
|
74
|
-
defaultFetchTimeout: new NumberType({
|
|
75
|
-
integer: true,
|
|
76
|
-
minimum: 1,
|
|
77
|
-
}),
|
|
78
|
-
defaultPreferredLocale: new StringType({
|
|
79
|
-
pattern: /^[a-z]{2,3}([-_][a-z]{2,3})?$/i,
|
|
80
|
-
}),
|
|
81
|
-
},
|
|
82
|
-
});
|