@c15t/backend 2.0.0-rc.3 → 2.0.0-rc.5
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/dist/cache.cjs +4 -4
- package/dist/cache.js +4 -4
- package/dist/core.cjs +845 -87
- package/dist/core.js +821 -87
- package/dist/db/schema.cjs +37 -0
- package/dist/db/schema.js +33 -2
- package/dist/edge.cjs +1106 -0
- package/dist/edge.js +1069 -0
- package/dist/router.cjs +621 -71
- package/dist/router.js +621 -71
- package/{dist → dist-types}/cache/adapters/cloudflare-kv.d.ts +0 -1
- package/{dist → dist-types}/cache/adapters/index.d.ts +0 -1
- package/{dist → dist-types}/cache/adapters/memory.d.ts +0 -1
- package/{dist → dist-types}/cache/adapters/upstash-redis.d.ts +0 -1
- package/{dist → dist-types}/cache/gvl-resolver.d.ts +1 -2
- package/{dist → dist-types}/cache/index.d.ts +0 -1
- package/{dist → dist-types}/cache/keys.d.ts +0 -1
- package/{dist → dist-types}/cache/types.d.ts +0 -1
- package/{dist → dist-types}/core.d.ts +8 -1
- package/{dist → dist-types}/db/migrator/index.d.ts +0 -1
- package/{dist → dist-types}/db/registry/consent-policy.d.ts +0 -1
- package/{dist → dist-types}/db/registry/consent-purpose.d.ts +0 -1
- package/{dist → dist-types}/db/registry/domain.d.ts +0 -1
- package/{dist → dist-types}/db/registry/index.d.ts +22 -2
- package/dist-types/db/registry/runtime-policy-decision.d.ts +60 -0
- package/{dist → dist-types}/db/registry/subject.d.ts +0 -1
- package/{dist → dist-types}/db/registry/types.d.ts +1 -2
- package/{dist → dist-types}/db/registry/utils/generate-id.d.ts +0 -1
- package/{dist → dist-types}/db/registry/utils.d.ts +0 -1
- package/{dist → dist-types}/db/schema/1.0.0/audit-log.d.ts +0 -1
- package/{dist → dist-types}/db/schema/1.0.0/consent-policy.d.ts +0 -1
- package/{dist → dist-types}/db/schema/1.0.0/consent-purpose.d.ts +0 -1
- package/{dist → dist-types}/db/schema/1.0.0/consent-record.d.ts +0 -1
- package/{dist → dist-types}/db/schema/1.0.0/consent.d.ts +1 -2
- package/{dist → dist-types}/db/schema/1.0.0/domain.d.ts +0 -1
- package/{dist → dist-types}/db/schema/1.0.0/index.d.ts +0 -1
- package/{dist → dist-types}/db/schema/1.0.0/subject.d.ts +0 -1
- package/{dist → dist-types}/db/schema/2.0.0/audit-log.d.ts +1 -2
- package/{dist → dist-types}/db/schema/2.0.0/consent-policy.d.ts +1 -2
- package/{dist → dist-types}/db/schema/2.0.0/consent-purpose.d.ts +1 -2
- package/{dist → dist-types}/db/schema/2.0.0/consent.d.ts +5 -2
- package/{dist → dist-types}/db/schema/2.0.0/domain.d.ts +1 -2
- package/{dist → dist-types}/db/schema/2.0.0/index.d.ts +432 -17
- package/dist-types/db/schema/2.0.0/runtime-policy-decision.d.ts +23 -0
- package/{dist → dist-types}/db/schema/2.0.0/subject.d.ts +1 -2
- package/{dist → dist-types}/db/schema/index.d.ts +862 -33
- package/{dist → dist-types}/db/tenant-scope.d.ts +0 -1
- package/dist-types/define-config.d.ts +17 -0
- package/dist-types/edge/index.d.ts +5 -0
- package/dist-types/edge/init-handler.d.ts +38 -0
- package/dist-types/edge/resolve-consent.d.ts +80 -0
- package/dist-types/edge/types.d.ts +13 -0
- package/{dist → dist-types}/handlers/consent/check.handler.d.ts +0 -1
- package/{src/handlers/consent/index.ts → dist-types/handlers/consent/index.d.ts} +0 -1
- package/{dist → dist-types}/handlers/init/geo.d.ts +2 -3
- package/{dist → dist-types}/handlers/init/index.d.ts +4 -5
- package/dist-types/handlers/init/policy.d.ts +26 -0
- package/dist-types/handlers/init/resolve-init.d.ts +44 -0
- package/dist-types/handlers/init/translations.d.ts +48 -0
- package/dist-types/handlers/policy/snapshot.d.ts +99 -0
- package/{src/handlers/status/index.ts → dist-types/handlers/status/index.d.ts} +0 -1
- package/{dist → dist-types}/handlers/status/status.handler.d.ts +0 -1
- package/{dist → dist-types}/handlers/subject/get.handler.d.ts +0 -1
- package/{src/handlers/subject/index.ts → dist-types/handlers/subject/index.d.ts} +0 -1
- package/{dist → dist-types}/handlers/subject/list.handler.d.ts +0 -1
- package/{dist → dist-types}/handlers/subject/patch.handler.d.ts +0 -1
- package/{dist → dist-types}/handlers/subject/post.handler.d.ts +12 -1
- package/{dist → dist-types}/handlers/utils/consent-enrichment.d.ts +0 -1
- package/{dist → dist-types}/init.d.ts +4 -7
- package/{dist → dist-types}/middleware/auth/index.d.ts +0 -1
- package/{dist → dist-types}/middleware/auth/validate-api-key.d.ts +0 -1
- package/{dist → dist-types}/middleware/cors/cors.d.ts +0 -1
- package/{src/middleware/cors/index.ts → dist-types/middleware/cors/index.d.ts} +0 -1
- package/{dist → dist-types}/middleware/cors/is-origin-trusted.d.ts +1 -2
- package/{dist → dist-types}/middleware/cors/process-cors.d.ts +0 -1
- package/{dist → dist-types}/middleware/openapi/config.d.ts +0 -1
- package/{dist → dist-types}/middleware/openapi/handlers.d.ts +0 -1
- package/{src/middleware/openapi/index.ts → dist-types/middleware/openapi/index.d.ts} +0 -1
- package/{dist → dist-types}/middleware/process-ip/index.d.ts +0 -1
- package/dist-types/policies/builder.d.ts +127 -0
- package/dist-types/policies/defaults.d.ts +2 -0
- package/dist-types/policies/matchers.d.ts +3 -0
- package/{dist → dist-types}/router.d.ts +0 -1
- package/{dist → dist-types}/routes/consent.d.ts +0 -1
- package/{src/routes/index.ts → dist-types/routes/index.d.ts} +0 -1
- package/{dist → dist-types}/routes/init.d.ts +0 -1
- package/{dist → dist-types}/routes/status.d.ts +0 -1
- package/{dist → dist-types}/routes/subject.d.ts +0 -1
- package/{dist → dist-types}/types/api.d.ts +0 -1
- package/dist-types/types/index.d.ts +443 -0
- package/dist-types/utils/background.d.ts +6 -0
- package/{dist → dist-types}/utils/create-telemetry-options.d.ts +1 -2
- package/{dist → dist-types}/utils/env.d.ts +0 -1
- package/{dist → dist-types}/utils/extract-error-message.d.ts +0 -1
- package/{dist → dist-types}/utils/instrumentation.d.ts +0 -1
- package/{dist → dist-types}/utils/logger.d.ts +1 -2
- package/{dist → dist-types}/utils/metrics.d.ts +0 -1
- package/dist-types/version.d.ts +1 -0
- package/docs/README.md +49 -0
- package/docs/api/configuration.md +197 -0
- package/docs/api/endpoints.md +211 -0
- package/docs/guides/caching.md +85 -0
- package/docs/guides/database-setup.md +128 -0
- package/docs/guides/edge-deployment.md +248 -0
- package/docs/guides/framework-integration.md +142 -0
- package/docs/guides/iab-tcf.md +89 -0
- package/docs/guides/observability.md +96 -0
- package/docs/guides/policy-packs.md +396 -0
- package/docs/quickstart.md +129 -0
- package/package.json +37 -23
- package/.turbo/turbo-build.log +0 -49
- package/CHANGELOG.md +0 -115
- package/dist/cache/adapters/cloudflare-kv.d.ts.map +0 -1
- package/dist/cache/adapters/index.d.ts.map +0 -1
- package/dist/cache/adapters/memory.d.ts.map +0 -1
- package/dist/cache/adapters/upstash-redis.d.ts.map +0 -1
- package/dist/cache/gvl-resolver.d.ts.map +0 -1
- package/dist/cache/index.d.ts.map +0 -1
- package/dist/cache/keys.d.ts.map +0 -1
- package/dist/cache/types.d.ts.map +0 -1
- package/dist/core.d.ts.map +0 -1
- package/dist/db/adapters/drizzle.d.ts +0 -2
- package/dist/db/adapters/drizzle.d.ts.map +0 -1
- package/dist/db/adapters/index.d.ts +0 -2
- package/dist/db/adapters/index.d.ts.map +0 -1
- package/dist/db/adapters/kysely.d.ts +0 -2
- package/dist/db/adapters/kysely.d.ts.map +0 -1
- package/dist/db/adapters/mongo.d.ts +0 -2
- package/dist/db/adapters/mongo.d.ts.map +0 -1
- package/dist/db/adapters/prisma.d.ts +0 -2
- package/dist/db/adapters/prisma.d.ts.map +0 -1
- package/dist/db/adapters/typeorm.d.ts +0 -2
- package/dist/db/adapters/typeorm.d.ts.map +0 -1
- package/dist/db/migrator/index.d.ts.map +0 -1
- package/dist/db/registry/consent-policy.d.ts.map +0 -1
- package/dist/db/registry/consent-purpose.d.ts.map +0 -1
- package/dist/db/registry/domain.d.ts.map +0 -1
- package/dist/db/registry/index.d.ts.map +0 -1
- package/dist/db/registry/subject.d.ts.map +0 -1
- package/dist/db/registry/types.d.ts.map +0 -1
- package/dist/db/registry/utils/generate-id.d.ts.map +0 -1
- package/dist/db/registry/utils.d.ts.map +0 -1
- package/dist/db/schema/1.0.0/audit-log.d.ts.map +0 -1
- package/dist/db/schema/1.0.0/consent-policy.d.ts.map +0 -1
- package/dist/db/schema/1.0.0/consent-purpose.d.ts.map +0 -1
- package/dist/db/schema/1.0.0/consent-record.d.ts.map +0 -1
- package/dist/db/schema/1.0.0/consent.d.ts.map +0 -1
- package/dist/db/schema/1.0.0/domain.d.ts.map +0 -1
- package/dist/db/schema/1.0.0/index.d.ts.map +0 -1
- package/dist/db/schema/1.0.0/subject.d.ts.map +0 -1
- package/dist/db/schema/2.0.0/audit-log.d.ts.map +0 -1
- package/dist/db/schema/2.0.0/consent-policy.d.ts.map +0 -1
- package/dist/db/schema/2.0.0/consent-purpose.d.ts.map +0 -1
- package/dist/db/schema/2.0.0/consent.d.ts.map +0 -1
- package/dist/db/schema/2.0.0/domain.d.ts.map +0 -1
- package/dist/db/schema/2.0.0/index.d.ts.map +0 -1
- package/dist/db/schema/2.0.0/subject.d.ts.map +0 -1
- package/dist/db/schema/index.d.ts.map +0 -1
- package/dist/db/tenant-scope.d.ts.map +0 -1
- package/dist/define-config.d.ts +0 -5
- package/dist/define-config.d.ts.map +0 -1
- package/dist/handlers/consent/check.handler.d.ts.map +0 -1
- package/dist/handlers/consent/index.d.ts +0 -12
- package/dist/handlers/consent/index.d.ts.map +0 -1
- package/dist/handlers/init/geo.d.ts.map +0 -1
- package/dist/handlers/init/index.d.ts.map +0 -1
- package/dist/handlers/init/translations.d.ts +0 -28
- package/dist/handlers/init/translations.d.ts.map +0 -1
- package/dist/handlers/status/index.d.ts +0 -7
- package/dist/handlers/status/index.d.ts.map +0 -1
- package/dist/handlers/status/status.handler.d.ts.map +0 -1
- package/dist/handlers/subject/get.handler.d.ts.map +0 -1
- package/dist/handlers/subject/index.d.ts +0 -10
- package/dist/handlers/subject/index.d.ts.map +0 -1
- package/dist/handlers/subject/list.handler.d.ts.map +0 -1
- package/dist/handlers/subject/patch.handler.d.ts.map +0 -1
- package/dist/handlers/subject/post.handler.d.ts.map +0 -1
- package/dist/handlers/utils/consent-enrichment.d.ts.map +0 -1
- package/dist/init.d.ts.map +0 -1
- package/dist/middleware/auth/index.d.ts.map +0 -1
- package/dist/middleware/auth/validate-api-key.d.ts.map +0 -1
- package/dist/middleware/cors/cors.d.ts.map +0 -1
- package/dist/middleware/cors/index.d.ts +0 -30
- package/dist/middleware/cors/index.d.ts.map +0 -1
- package/dist/middleware/cors/is-origin-trusted.d.ts.map +0 -1
- package/dist/middleware/cors/process-cors.d.ts.map +0 -1
- package/dist/middleware/openapi/config.d.ts.map +0 -1
- package/dist/middleware/openapi/handlers.d.ts.map +0 -1
- package/dist/middleware/openapi/index.d.ts +0 -12
- package/dist/middleware/openapi/index.d.ts.map +0 -1
- package/dist/middleware/process-ip/index.d.ts.map +0 -1
- package/dist/router.d.ts.map +0 -1
- package/dist/routes/consent.d.ts.map +0 -1
- package/dist/routes/index.d.ts +0 -10
- package/dist/routes/index.d.ts.map +0 -1
- package/dist/routes/init.d.ts.map +0 -1
- package/dist/routes/status.d.ts.map +0 -1
- package/dist/routes/subject.d.ts.map +0 -1
- package/dist/types/api.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -263
- package/dist/types/index.d.ts.map +0 -1
- package/dist/utils/create-telemetry-options.d.ts.map +0 -1
- package/dist/utils/env.d.ts.map +0 -1
- package/dist/utils/extract-error-message.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/instrumentation.d.ts.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/metrics.d.ts.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/knip.json +0 -31
- package/rslib.config.ts +0 -93
- package/src/cache/adapters/cloudflare-kv.ts +0 -71
- package/src/cache/adapters/index.ts +0 -22
- package/src/cache/adapters/memory.ts +0 -111
- package/src/cache/adapters/upstash-redis.ts +0 -113
- package/src/cache/gvl-resolver.ts +0 -289
- package/src/cache/index.ts +0 -34
- package/src/cache/keys.ts +0 -68
- package/src/cache/types.ts +0 -66
- package/src/core.ts +0 -369
- package/src/db/migrator/index.ts +0 -80
- package/src/db/registry/consent-policy.test.ts +0 -451
- package/src/db/registry/consent-policy.ts +0 -82
- package/src/db/registry/consent-purpose.test.ts +0 -428
- package/src/db/registry/consent-purpose.ts +0 -61
- package/src/db/registry/domain.test.ts +0 -445
- package/src/db/registry/domain.ts +0 -91
- package/src/db/registry/index.ts +0 -14
- package/src/db/registry/subject.test.ts +0 -371
- package/src/db/registry/subject.ts +0 -126
- package/src/db/registry/types.ts +0 -10
- package/src/db/registry/utils/generate-id.test.ts +0 -216
- package/src/db/registry/utils/generate-id.ts +0 -133
- package/src/db/registry/utils.ts +0 -133
- package/src/db/schema/1.0.0/audit-log.ts +0 -15
- package/src/db/schema/1.0.0/consent-policy.ts +0 -14
- package/src/db/schema/1.0.0/consent-purpose.ts +0 -14
- package/src/db/schema/1.0.0/consent-record.ts +0 -10
- package/src/db/schema/1.0.0/consent.ts +0 -20
- package/src/db/schema/1.0.0/domain.ts +0 -12
- package/src/db/schema/1.0.0/index.ts +0 -48
- package/src/db/schema/1.0.0/subject.ts +0 -11
- package/src/db/schema/2.0.0/audit-log.ts +0 -18
- package/src/db/schema/2.0.0/consent-policy.ts +0 -28
- package/src/db/schema/2.0.0/consent-purpose.ts +0 -12
- package/src/db/schema/2.0.0/consent.ts +0 -28
- package/src/db/schema/2.0.0/domain.ts +0 -12
- package/src/db/schema/2.0.0/index.ts +0 -47
- package/src/db/schema/2.0.0/subject.ts +0 -13
- package/src/db/schema/index.ts +0 -15
- package/src/db/tenant-scope.test.ts +0 -747
- package/src/db/tenant-scope.ts +0 -103
- package/src/define-config.ts +0 -5
- package/src/handlers/consent/check.handler.ts +0 -126
- package/src/handlers/init/geo.test.ts +0 -317
- package/src/handlers/init/geo.ts +0 -195
- package/src/handlers/init/index.test.ts +0 -205
- package/src/handlers/init/index.ts +0 -114
- package/src/handlers/init/translations.test.ts +0 -121
- package/src/handlers/init/translations.ts +0 -72
- package/src/handlers/status/status.handler.test.ts +0 -155
- package/src/handlers/status/status.handler.ts +0 -51
- package/src/handlers/subject/get.handler.ts +0 -92
- package/src/handlers/subject/list.handler.ts +0 -92
- package/src/handlers/subject/patch.handler.ts +0 -119
- package/src/handlers/subject/post.handler.test.ts +0 -294
- package/src/handlers/subject/post.handler.ts +0 -268
- package/src/handlers/utils/consent-enrichment.test.ts +0 -380
- package/src/handlers/utils/consent-enrichment.ts +0 -218
- package/src/init.test.ts +0 -126
- package/src/init.ts +0 -87
- package/src/middleware/auth/index.ts +0 -11
- package/src/middleware/auth/validate-api-key.test.ts +0 -86
- package/src/middleware/auth/validate-api-key.ts +0 -107
- package/src/middleware/cors/cors.test.ts +0 -135
- package/src/middleware/cors/cors.ts +0 -186
- package/src/middleware/cors/is-origin-trusted.test.ts +0 -164
- package/src/middleware/cors/is-origin-trusted.ts +0 -130
- package/src/middleware/cors/process-cors.ts +0 -91
- package/src/middleware/openapi/config.ts +0 -29
- package/src/middleware/openapi/handlers.ts +0 -34
- package/src/middleware/process-ip/index.test.ts +0 -195
- package/src/middleware/process-ip/index.ts +0 -199
- package/src/router.ts +0 -15
- package/src/routes/consent.ts +0 -52
- package/src/routes/init.ts +0 -105
- package/src/routes/status.ts +0 -46
- package/src/routes/subject.ts +0 -152
- package/src/types/api.ts +0 -48
- package/src/types/index.ts +0 -297
- package/src/utils/create-telemetry-options.test.ts +0 -302
- package/src/utils/create-telemetry-options.ts +0 -229
- package/src/utils/env.ts +0 -84
- package/src/utils/extract-error-message.ts +0 -21
- package/src/utils/instrumentation.test.ts +0 -185
- package/src/utils/instrumentation.ts +0 -196
- package/src/utils/logger.ts +0 -41
- package/src/utils/metrics.test.ts +0 -323
- package/src/utils/metrics.ts +0 -402
- package/src/utils/telemetry-pii.test.ts +0 -325
- package/src/version.ts +0 -2
- package/tsconfig.json +0 -11
- package/vitest.config.ts +0 -28
- /package/dist/{types.cjs → types/index.cjs} +0 -0
- /package/dist/{types.js → types/index.js} +0 -0
- /package/{src/db/adapters/drizzle.ts → dist-types/db/adapters/drizzle.d.ts} +0 -0
- /package/{src/db/adapters/index.ts → dist-types/db/adapters/index.d.ts} +0 -0
- /package/{src/db/adapters/kysely.ts → dist-types/db/adapters/kysely.d.ts} +0 -0
- /package/{src/db/adapters/mongo.ts → dist-types/db/adapters/mongo.d.ts} +0 -0
- /package/{src/db/adapters/prisma.ts → dist-types/db/adapters/prisma.d.ts} +0 -0
- /package/{src/db/adapters/typeorm.ts → dist-types/db/adapters/typeorm.d.ts} +0 -0
- /package/{src/utils/index.ts → dist-types/utils/index.d.ts} +0 -0
|
@@ -8,4 +8,3 @@
|
|
|
8
8
|
export { createCloudflareKVAdapter, type KVNamespace, } from './cloudflare-kv';
|
|
9
9
|
export { clearMemoryCache, createMemoryCacheAdapter, getMemoryCacheSize, } from './memory';
|
|
10
10
|
export { createUpstashRedisAdapter, createUpstashRedisAdapterFromClient, type UpstashRedisAdapterOptions, } from './upstash-redis';
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
|
-
import type { GlobalVendorList } from '
|
|
12
|
+
import type { GlobalVendorList } from '../../../schema/dist-types/types.d';
|
|
13
13
|
import type { CacheAdapter } from './types';
|
|
14
14
|
/**
|
|
15
15
|
* Options for creating a GVL resolver.
|
|
@@ -83,4 +83,3 @@ export interface GVLResolver {
|
|
|
83
83
|
* @public
|
|
84
84
|
*/
|
|
85
85
|
export declare function createGVLResolver(options: GVLResolverOptions): GVLResolver;
|
|
86
|
-
//# sourceMappingURL=gvl-resolver.d.ts.map
|
|
@@ -10,4 +10,3 @@ export { createGVLResolver, type GVLResolver, type GVLResolverOptions, } from '.
|
|
|
10
10
|
export { createCacheKey, createGVLCacheKey } from './keys';
|
|
11
11
|
export type { CacheAdapter } from './types';
|
|
12
12
|
export { GVL_TTL_MS, MEMORY_TTL_MS } from './types';
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -74,6 +74,13 @@ export interface C15TInstance {
|
|
|
74
74
|
*/
|
|
75
75
|
export declare const c15tInstance: (options: C15TOptions) => C15TInstance;
|
|
76
76
|
export { defineConfig } from './define-config';
|
|
77
|
+
export type { PolicyValidationResult } from './handlers/init/policy';
|
|
78
|
+
export { inspectPolicies } from './handlers/init/policy';
|
|
79
|
+
export type { PolicyBuilderInput } from './policies/builder';
|
|
80
|
+
export { policyBuilder } from './policies/builder';
|
|
81
|
+
export type { EuropePolicyMode, PolicyPackPresets, } from './policies/defaults';
|
|
82
|
+
export { policyPackPresets } from './policies/defaults';
|
|
83
|
+
export type { PolicyMatch } from './policies/matchers';
|
|
84
|
+
export { EEA_COUNTRY_CODES, EU_COUNTRY_CODES, POLICY_MATCH_DATASET_VERSION, policyMatchers, UK_COUNTRY_CODES, } from './policies/matchers';
|
|
77
85
|
export type { C15TContext, C15TOptions } from './types';
|
|
78
86
|
export { version } from './version';
|
|
79
|
-
//# sourceMappingURL=core.d.ts.map
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import type { Registry } from './types';
|
|
2
2
|
export declare const createRegistry: (ctx: Registry) => {
|
|
3
|
+
findOrCreateRuntimePolicyDecision: (input: import("./runtime-policy-decision").RuntimePolicyDecisionInput) => Promise<{
|
|
4
|
+
id: string;
|
|
5
|
+
tenantId: string | null;
|
|
6
|
+
policyId: string;
|
|
7
|
+
fingerprint: string;
|
|
8
|
+
matchedBy: string;
|
|
9
|
+
countryCode: string | null;
|
|
10
|
+
regionCode: string | null;
|
|
11
|
+
jurisdiction: string;
|
|
12
|
+
language: string | null;
|
|
13
|
+
model: string;
|
|
14
|
+
policyI18n: unknown;
|
|
15
|
+
uiMode: string | null;
|
|
16
|
+
bannerUi: unknown;
|
|
17
|
+
dialogUi: unknown;
|
|
18
|
+
categories: unknown;
|
|
19
|
+
preselectedCategories: unknown;
|
|
20
|
+
proofConfig: unknown;
|
|
21
|
+
dedupeKey: string;
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
}>;
|
|
3
24
|
findDomainByName: (name: string) => Promise<{
|
|
4
25
|
id: string;
|
|
5
26
|
name: string;
|
|
@@ -23,7 +44,7 @@ export declare const createRegistry: (ctx: Registry) => {
|
|
|
23
44
|
createdAt: Date;
|
|
24
45
|
tenantId: string | null;
|
|
25
46
|
} | null>;
|
|
26
|
-
findOrCreatePolicy: (type: import("
|
|
47
|
+
findOrCreatePolicy: (type: import("../../../../schema/dist-types/index.d.ts").PolicyType) => Promise<{
|
|
27
48
|
id: string;
|
|
28
49
|
version: string;
|
|
29
50
|
type: string;
|
|
@@ -53,4 +74,3 @@ export declare const createRegistry: (ctx: Registry) => {
|
|
|
53
74
|
tenantId: string | null;
|
|
54
75
|
}>;
|
|
55
76
|
};
|
|
56
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { PolicyModel } from '../../types';
|
|
2
|
+
import type { Registry } from './types';
|
|
3
|
+
interface RuntimePolicyDecisionUiSurface {
|
|
4
|
+
allowedActions?: Array<'accept' | 'reject' | 'customize'>;
|
|
5
|
+
primaryAction?: 'accept' | 'reject' | 'customize';
|
|
6
|
+
layout?: Array<'accept' | 'reject' | 'customize' | Array<'accept' | 'reject' | 'customize'>>;
|
|
7
|
+
direction?: 'row' | 'column';
|
|
8
|
+
uiProfile?: 'balanced' | 'compact' | 'strict';
|
|
9
|
+
scrollLock?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface RuntimePolicyDecisionInput {
|
|
12
|
+
tenantId?: string;
|
|
13
|
+
policyId: string;
|
|
14
|
+
fingerprint: string;
|
|
15
|
+
matchedBy: 'region' | 'country' | 'default';
|
|
16
|
+
countryCode: string | null;
|
|
17
|
+
regionCode: string | null;
|
|
18
|
+
jurisdiction: string;
|
|
19
|
+
language?: string;
|
|
20
|
+
model: PolicyModel;
|
|
21
|
+
policyI18n?: {
|
|
22
|
+
language?: string;
|
|
23
|
+
messageProfile?: string;
|
|
24
|
+
};
|
|
25
|
+
uiMode?: 'none' | 'banner' | 'dialog';
|
|
26
|
+
bannerUi?: RuntimePolicyDecisionUiSurface;
|
|
27
|
+
dialogUi?: RuntimePolicyDecisionUiSurface;
|
|
28
|
+
categories?: string[];
|
|
29
|
+
preselectedCategories?: string[];
|
|
30
|
+
proofConfig?: {
|
|
31
|
+
storeIp?: boolean;
|
|
32
|
+
storeUserAgent?: boolean;
|
|
33
|
+
storeLanguage?: boolean;
|
|
34
|
+
};
|
|
35
|
+
dedupeKey: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function runtimePolicyDecisionRegistry({ db, ctx }: Registry): {
|
|
38
|
+
findOrCreateRuntimePolicyDecision: (input: RuntimePolicyDecisionInput) => Promise<{
|
|
39
|
+
id: string;
|
|
40
|
+
tenantId: string | null;
|
|
41
|
+
policyId: string;
|
|
42
|
+
fingerprint: string;
|
|
43
|
+
matchedBy: string;
|
|
44
|
+
countryCode: string | null;
|
|
45
|
+
regionCode: string | null;
|
|
46
|
+
jurisdiction: string;
|
|
47
|
+
language: string | null;
|
|
48
|
+
model: string;
|
|
49
|
+
policyI18n: unknown;
|
|
50
|
+
uiMode: string | null;
|
|
51
|
+
bannerUi: unknown;
|
|
52
|
+
dialogUi: unknown;
|
|
53
|
+
categories: unknown;
|
|
54
|
+
preselectedCategories: unknown;
|
|
55
|
+
proofConfig: unknown;
|
|
56
|
+
dedupeKey: string;
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
}>;
|
|
59
|
+
};
|
|
60
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { createLogger } from '
|
|
1
|
+
import type { createLogger } from '../../../../logger/dist-types/index.d.ts';
|
|
2
2
|
import type { InferFumaDB } from 'fumadb';
|
|
3
3
|
import type { LatestDB } from '../schema';
|
|
4
4
|
export interface Registry {
|
|
@@ -7,4 +7,3 @@ export interface Registry {
|
|
|
7
7
|
logger: ReturnType<typeof createLogger>;
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -11,4 +11,3 @@ export declare const auditLogTable: import("fumadb/schema").Table<{
|
|
|
11
11
|
createdAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
|
|
12
12
|
eventTimezone: import("fumadb/schema").Column<"string", string | null, string>;
|
|
13
13
|
}, {}>;
|
|
14
|
-
//# sourceMappingURL=audit-log.d.ts.map
|
|
@@ -10,4 +10,3 @@ export declare const consentPolicyTable: import("fumadb/schema").Table<{
|
|
|
10
10
|
isActive: import("fumadb/schema").Column<"bool", boolean | null, boolean>;
|
|
11
11
|
createdAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
|
|
12
12
|
}, {}>;
|
|
13
|
-
//# sourceMappingURL=consent-policy.d.ts.map
|
|
@@ -10,4 +10,3 @@ export declare const consentPurposeTable: import("fumadb/schema").Table<{
|
|
|
10
10
|
createdAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
|
|
11
11
|
updatedAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
|
|
12
12
|
}, {}>;
|
|
13
|
-
//# sourceMappingURL=consent-purpose.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Consent, consentSchema } from '
|
|
1
|
+
import { type Consent, consentSchema } from '../../../../../schema/dist-types/index.d.ts';
|
|
2
2
|
export declare const consentTable: import("fumadb/schema").Table<{
|
|
3
3
|
id: import("fumadb/schema").IdColumn<"varchar(255)", string, string>;
|
|
4
4
|
subjectId: import("fumadb/schema").Column<"string", string, string>;
|
|
@@ -15,4 +15,3 @@ export declare const consentTable: import("fumadb/schema").Table<{
|
|
|
15
15
|
isActive: import("fumadb/schema").Column<"bool", boolean | null, boolean>;
|
|
16
16
|
}, {}>;
|
|
17
17
|
export { consentSchema, type Consent };
|
|
18
|
-
//# sourceMappingURL=consent.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AuditLog, auditLogSchema } from '
|
|
1
|
+
import { type AuditLog, auditLogSchema } from '../../../../../schema/dist-types/index.d.ts';
|
|
2
2
|
export declare const auditLogTable: import("fumadb/schema").Table<{
|
|
3
3
|
id: import("fumadb/schema").IdColumn<"varchar(255)", string, string>;
|
|
4
4
|
entityType: import("fumadb/schema").Column<"string", string, string>;
|
|
@@ -13,4 +13,3 @@ export declare const auditLogTable: import("fumadb/schema").Table<{
|
|
|
13
13
|
tenantId: import("fumadb/schema").Column<"string", string | null, string | null>;
|
|
14
14
|
}, {}>;
|
|
15
15
|
export { auditLogSchema, type AuditLog };
|
|
16
|
-
//# sourceMappingURL=audit-log.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ConsentPolicy, consentPolicySchema, type PolicyType, policyTypeSchema } from '
|
|
1
|
+
import { type ConsentPolicy, consentPolicySchema, type PolicyType, policyTypeSchema } from '../../../../../schema/dist-types/index.d.ts';
|
|
2
2
|
export declare const consentPolicyTable: import("fumadb/schema").Table<{
|
|
3
3
|
id: import("fumadb/schema").IdColumn<"varchar(255)", string, string>;
|
|
4
4
|
version: import("fumadb/schema").Column<"string", string, string>;
|
|
@@ -10,4 +10,3 @@ export declare const consentPolicyTable: import("fumadb/schema").Table<{
|
|
|
10
10
|
}, {}>;
|
|
11
11
|
export { consentPolicySchema, policyTypeSchema, type ConsentPolicy, type PolicyType, };
|
|
12
12
|
export declare const PolicyTypeSchema: import("valibot").PicklistSchema<["cookie_banner", "privacy_policy", "dpa", "terms_and_conditions", "marketing_communications", "age_verification", "other"], undefined>;
|
|
13
|
-
//# sourceMappingURL=consent-policy.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ConsentPurpose, consentPurposeSchema } from '
|
|
1
|
+
import { type ConsentPurpose, consentPurposeSchema } from '../../../../../schema/dist-types/index.d.ts';
|
|
2
2
|
export declare const consentPurposeTable: import("fumadb/schema").Table<{
|
|
3
3
|
id: import("fumadb/schema").IdColumn<"varchar(255)", string, string>;
|
|
4
4
|
code: import("fumadb/schema").Column<"string", string, string>;
|
|
@@ -7,4 +7,3 @@ export declare const consentPurposeTable: import("fumadb/schema").Table<{
|
|
|
7
7
|
tenantId: import("fumadb/schema").Column<"string", string | null, string | null>;
|
|
8
8
|
}, {}>;
|
|
9
9
|
export { consentPurposeSchema, type ConsentPurpose };
|
|
10
|
-
//# sourceMappingURL=consent-purpose.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Consent, consentSchema } from '
|
|
1
|
+
import { type Consent, consentSchema } from '../../../../../schema/dist-types/index.d.ts';
|
|
2
2
|
export declare const consentTable: import("fumadb/schema").Table<{
|
|
3
3
|
id: import("fumadb/schema").IdColumn<"varchar(255)", string, string>;
|
|
4
4
|
subjectId: import("fumadb/schema").Column<"string", string, string>;
|
|
@@ -20,7 +20,10 @@ export declare const consentTable: import("fumadb/schema").Table<{
|
|
|
20
20
|
uiSource: import("fumadb/schema").Column<"string", string | null, string | null>;
|
|
21
21
|
/** Derived consent action (e.g., 'accept_all', 'reject_all', 'opt_out', 'custom') */
|
|
22
22
|
consentAction: import("fumadb/schema").Column<"string", string | null, string | null>;
|
|
23
|
+
/** Runtime policy decision reference used for this consent record. */
|
|
24
|
+
runtimePolicyDecisionId: import("fumadb/schema").Column<"string", string | null, string | null>;
|
|
25
|
+
/** Source of runtime policy decision evidence. */
|
|
26
|
+
runtimePolicySource: import("fumadb/schema").Column<"string", string | null, string | null>;
|
|
23
27
|
tenantId: import("fumadb/schema").Column<"string", string | null, string | null>;
|
|
24
28
|
}, {}>;
|
|
25
29
|
export { consentSchema, type Consent };
|
|
26
|
-
//# sourceMappingURL=consent.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Domain, domainSchema } from '
|
|
1
|
+
import { type Domain, domainSchema } from '../../../../../schema/dist-types/index.d.ts';
|
|
2
2
|
export declare const domainTable: import("fumadb/schema").Table<{
|
|
3
3
|
id: import("fumadb/schema").IdColumn<"varchar(255)", string, string>;
|
|
4
4
|
name: import("fumadb/schema").Column<"string", string, string>;
|
|
@@ -7,4 +7,3 @@ export declare const domainTable: import("fumadb/schema").Table<{
|
|
|
7
7
|
tenantId: import("fumadb/schema").Column<"string", string | null, string | null>;
|
|
8
8
|
}, {}>;
|
|
9
9
|
export { domainSchema, type Domain };
|
|
10
|
-
//# sourceMappingURL=domain.d.ts.map
|