@c15t/backend 1.2.0-canary.13 → 1.2.0-canary.2
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/.turbo/turbo-build.log +20 -22
- package/.turbo/turbo-fmt.log +4 -4
- package/.turbo/turbo-test.log +531 -0
- package/coverage/coverage-final.json +84 -0
- package/coverage/coverage-summary.json +85 -0
- package/coverage/html/backend/index.html +116 -0
- package/coverage/html/backend/rslib.config.ts.html +415 -0
- package/coverage/html/backend/src/contracts/consent/index.html +161 -0
- package/coverage/html/backend/src/contracts/consent/index.ts.html +112 -0
- package/coverage/html/backend/src/contracts/consent/post.contract.ts.html +559 -0
- package/coverage/html/backend/src/contracts/consent/show-banner.contract.ts.html +220 -0
- package/coverage/html/backend/src/contracts/consent/verify.contract.ts.html +463 -0
- package/coverage/html/backend/src/contracts/index.html +116 -0
- package/coverage/html/backend/src/contracts/index.ts.html +139 -0
- package/coverage/html/backend/src/contracts/meta/index.html +131 -0
- package/coverage/html/backend/src/contracts/meta/index.ts.html +100 -0
- package/coverage/html/backend/src/contracts/meta/status.contract.ts.html +196 -0
- package/coverage/html/backend/src/contracts/shared/index.html +116 -0
- package/coverage/html/backend/src/contracts/shared/jurisdiction.schema.ts.html +175 -0
- package/coverage/html/backend/src/core.ts.html +1624 -0
- package/coverage/html/backend/src/handlers/consent/index.html +161 -0
- package/coverage/html/backend/src/handlers/consent/index.ts.html +112 -0
- package/coverage/html/backend/src/handlers/consent/post.handler.ts.html +889 -0
- package/coverage/html/backend/src/handlers/consent/show-banner.handler.ts.html +535 -0
- package/coverage/html/backend/src/handlers/consent/verify.handler.ts.html +1000 -0
- package/coverage/html/backend/src/handlers/meta/index.html +131 -0
- package/coverage/html/backend/src/handlers/meta/index.ts.html +100 -0
- package/coverage/html/backend/src/handlers/meta/status.handler.ts.html +226 -0
- package/coverage/html/backend/src/index.html +161 -0
- package/coverage/html/backend/src/init.ts.html +1018 -0
- package/coverage/html/backend/src/pkgs/api-router/hooks/index.html +116 -0
- package/coverage/html/backend/src/pkgs/api-router/hooks/processor.ts.html +544 -0
- package/coverage/html/backend/src/pkgs/api-router/index.html +116 -0
- package/coverage/html/backend/src/pkgs/api-router/telemetry.ts.html +334 -0
- package/coverage/html/backend/src/pkgs/api-router/utils/cors.ts.html +304 -0
- package/coverage/html/backend/src/pkgs/api-router/utils/index.html +131 -0
- package/coverage/html/backend/src/pkgs/api-router/utils/ip.ts.html +361 -0
- package/coverage/html/backend/src/pkgs/data-model/fields/field-factory.ts.html +709 -0
- package/coverage/html/backend/src/pkgs/data-model/fields/id-generator.ts.html +256 -0
- package/coverage/html/backend/src/pkgs/data-model/fields/index.html +161 -0
- package/coverage/html/backend/src/pkgs/data-model/fields/superjson-utils.ts.html +136 -0
- package/coverage/html/backend/src/pkgs/data-model/fields/zod-fields.ts.html +496 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/create-hooks.ts.html +349 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/index.html +176 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/update-hooks.ts.html +358 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/update-many-hooks.ts.html +613 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/utils.ts.html +538 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/with-hooks-factory.ts.html +289 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapter-factory.ts.html +289 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/drizzle-adapter/drizzle-adapter.ts.html +2203 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/drizzle-adapter/index.html +116 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/index.html +116 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/dialect.ts.html +670 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/index.html +131 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/kysely-adapter.ts.html +3634 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/tests/index.html +116 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/tests/test-utils.ts.html +1417 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/memory-adapter/index.html +116 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/memory-adapter/memory-adapter.ts.html +2071 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/prisma-adapter/index.html +116 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/prisma-adapter/prisma-adapter.ts.html +1834 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/test.ts.html +316 -0
- package/coverage/html/backend/src/pkgs/db-adapters/index.html +131 -0
- package/coverage/html/backend/src/pkgs/db-adapters/utils.ts.html +238 -0
- package/coverage/html/backend/src/pkgs/migrations/get-migration.ts.html +343 -0
- package/coverage/html/backend/src/pkgs/migrations/get-schema/get-schema.ts.html +217 -0
- package/coverage/html/backend/src/pkgs/migrations/get-schema/index.html +146 -0
- package/coverage/html/backend/src/pkgs/migrations/get-schema/process-fields.ts.html +280 -0
- package/coverage/html/backend/src/pkgs/migrations/get-schema/process-tables.ts.html +289 -0
- package/coverage/html/backend/src/pkgs/migrations/index.html +176 -0
- package/coverage/html/backend/src/pkgs/migrations/migration-builders.ts.html +595 -0
- package/coverage/html/backend/src/pkgs/migrations/migration-execution.ts.html +301 -0
- package/coverage/html/backend/src/pkgs/migrations/schema-comparison.ts.html +694 -0
- package/coverage/html/backend/src/pkgs/migrations/type-mapping.ts.html +817 -0
- package/coverage/html/backend/src/pkgs/results/core/error-class.ts.html +976 -0
- package/coverage/html/backend/src/pkgs/results/core/error-codes.ts.html +703 -0
- package/coverage/html/backend/src/pkgs/results/core/index.html +146 -0
- package/coverage/html/backend/src/pkgs/results/core/tracing.ts.html +280 -0
- package/coverage/html/backend/src/pkgs/results/create-telemetry-options.ts.html +271 -0
- package/coverage/html/backend/src/pkgs/results/index.html +131 -0
- package/coverage/html/backend/src/pkgs/results/orpc-error-handler.ts.html +496 -0
- package/coverage/html/backend/src/pkgs/results/results/index.html +131 -0
- package/coverage/html/backend/src/pkgs/results/results/recovery-utils.ts.html +628 -0
- package/coverage/html/backend/src/pkgs/results/results/result-helpers.ts.html +1234 -0
- package/coverage/html/backend/src/pkgs/utils/env.ts.html +337 -0
- package/coverage/html/backend/src/pkgs/utils/index.html +146 -0
- package/coverage/html/backend/src/pkgs/utils/logger.ts.html +199 -0
- package/coverage/html/backend/src/pkgs/utils/url.ts.html +400 -0
- package/coverage/html/backend/src/router.ts.html +109 -0
- package/coverage/html/backend/src/schema/audit-log/index.html +146 -0
- package/coverage/html/backend/src/schema/audit-log/registry.ts.html +436 -0
- package/coverage/html/backend/src/schema/audit-log/schema.ts.html +223 -0
- package/coverage/html/backend/src/schema/audit-log/table.ts.html +640 -0
- package/coverage/html/backend/src/schema/consent/index.html +146 -0
- package/coverage/html/backend/src/schema/consent/registry.ts.html +616 -0
- package/coverage/html/backend/src/schema/consent/schema.ts.html +238 -0
- package/coverage/html/backend/src/schema/consent/table.ts.html +748 -0
- package/coverage/html/backend/src/schema/consent-policy/index.html +146 -0
- package/coverage/html/backend/src/schema/consent-policy/registry.ts.html +1063 -0
- package/coverage/html/backend/src/schema/consent-policy/schema.ts.html +265 -0
- package/coverage/html/backend/src/schema/consent-policy/table.ts.html +535 -0
- package/coverage/html/backend/src/schema/consent-purpose/index.html +146 -0
- package/coverage/html/backend/src/schema/consent-purpose/registry.ts.html +589 -0
- package/coverage/html/backend/src/schema/consent-purpose/schema.ts.html +259 -0
- package/coverage/html/backend/src/schema/consent-purpose/table.ts.html +547 -0
- package/coverage/html/backend/src/schema/consent-record/index.html +131 -0
- package/coverage/html/backend/src/schema/consent-record/schema.ts.html +211 -0
- package/coverage/html/backend/src/schema/consent-record/table.ts.html +457 -0
- package/coverage/html/backend/src/schema/create-registry.ts.html +148 -0
- package/coverage/html/backend/src/schema/definition.ts.html +685 -0
- package/coverage/html/backend/src/schema/domain/index.html +146 -0
- package/coverage/html/backend/src/schema/domain/registry.ts.html +973 -0
- package/coverage/html/backend/src/schema/domain/schema.ts.html +214 -0
- package/coverage/html/backend/src/schema/domain/table.ts.html +496 -0
- package/coverage/html/backend/src/schema/index.html +146 -0
- package/coverage/html/backend/src/schema/schemas.ts.html +166 -0
- package/coverage/html/backend/src/schema/subject/index.html +146 -0
- package/coverage/html/backend/src/schema/subject/registry.ts.html +973 -0
- package/coverage/html/backend/src/schema/subject/schema.ts.html +208 -0
- package/coverage/html/backend/src/schema/subject/table.ts.html +499 -0
- package/coverage/html/backend/src/server.ts.html +475 -0
- package/coverage/html/backend/src/testing/contract-testing.ts.html +1348 -0
- package/coverage/html/backend/src/testing/index.html +116 -0
- package/coverage/html/base.css +224 -0
- package/coverage/html/block-navigation.js +87 -0
- package/coverage/html/favicon.png +0 -0
- package/coverage/html/index.html +626 -0
- package/coverage/html/prettify.css +1 -0
- package/coverage/html/prettify.js +2 -0
- package/coverage/html/sort-arrow-sprite.png +0 -0
- package/coverage/html/sorter.js +196 -0
- package/dist/contracts/consent/index.d.ts +2 -2
- package/dist/contracts/consent/post.contract.d.ts +2 -2
- package/dist/contracts/consent/post.contract.d.ts.map +1 -1
- package/dist/contracts/index.d.ts +5 -5
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/core.cjs +244 -388
- package/dist/core.d.ts +5 -3
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +244 -388
- package/dist/handlers/consent/index.d.ts +2 -2
- package/dist/handlers/consent/post.handler.d.ts +2 -2
- package/dist/handlers/consent/show-banner.handler.d.ts.map +1 -1
- package/dist/pkgs/api-router/utils/core.test.d.ts +2 -0
- package/dist/pkgs/api-router/utils/core.test.d.ts.map +1 -0
- package/dist/pkgs/api-router/utils/cors.d.ts +14 -0
- package/dist/pkgs/api-router/utils/cors.d.ts.map +1 -0
- package/dist/pkgs/data-model/fields/zod-fields.d.ts +32 -32
- package/dist/pkgs/data-model/index.cjs +39 -59
- package/dist/pkgs/data-model/index.js +39 -59
- package/dist/pkgs/data-model/schema/index.cjs +39 -59
- package/dist/pkgs/data-model/schema/index.js +39 -59
- package/dist/pkgs/db-adapters/adapters/drizzle-adapter/index.cjs +1 -0
- package/dist/pkgs/db-adapters/adapters/drizzle-adapter/index.js +1 -0
- package/dist/pkgs/db-adapters/adapters/kysely-adapter/index.cjs +1 -0
- package/dist/pkgs/db-adapters/adapters/kysely-adapter/index.js +1 -0
- package/dist/pkgs/db-adapters/adapters/memory-adapter/index.cjs +1 -0
- package/dist/pkgs/db-adapters/adapters/memory-adapter/index.js +1 -0
- package/dist/pkgs/db-adapters/adapters/prisma-adapter/index.cjs +1 -0
- package/dist/pkgs/db-adapters/adapters/prisma-adapter/index.js +1 -0
- package/dist/pkgs/db-adapters/index.cjs +1 -0
- package/dist/pkgs/db-adapters/index.js +1 -0
- package/dist/pkgs/migrations/index.cjs +1 -0
- package/dist/pkgs/migrations/index.js +1 -0
- package/dist/router.cjs +5 -3
- package/dist/router.d.ts +2 -2
- package/dist/router.js +5 -3
- package/dist/schema/consent-policy/registry.d.ts +4 -4
- package/dist/schema/consent-policy/registry.d.ts.map +1 -1
- package/dist/schema/consent-policy/schema.d.ts +2 -2
- package/dist/schema/consent-policy/table.d.ts +2 -2
- package/dist/schema/consent-purpose/registry.d.ts +2 -2
- package/dist/schema/consent-purpose/schema.d.ts +2 -2
- package/dist/schema/consent-purpose/table.d.ts +2 -2
- package/dist/schema/create-registry.d.ts +6 -6
- package/dist/schema/create-registry.d.ts.map +1 -1
- package/dist/schema/definition.d.ts +4 -4
- package/dist/schema/index.cjs +39 -59
- package/dist/schema/index.js +39 -59
- package/dist/schema/schemas.d.ts +4 -4
- package/package.json +2 -8
- package/rslib.config.ts +0 -1
- package/src/contracts/consent/post.contract.ts +6 -1
- package/src/contracts/index.ts +0 -2
- package/src/core.ts +195 -96
- package/src/handlers/consent/show-banner.handler.test.ts +1 -1
- package/src/handlers/consent/show-banner.handler.ts +2 -1
- package/src/{middleware/cors/is-origin-trusted.test.ts → pkgs/api-router/utils/core.test.ts} +1 -1
- package/src/pkgs/api-router/utils/cors.ts +73 -0
- package/src/schema/consent-policy/registry.ts +50 -76
- package/src/server.ts +5 -1
- package/dist/__tests__/server.test.d.ts +0 -2
- package/dist/__tests__/server.test.d.ts.map +0 -1
- package/dist/contracts.cjs +0 -708
- package/dist/contracts.js +0 -661
- package/dist/middleware/cors/cors.d.ts +0 -37
- package/dist/middleware/cors/cors.d.ts.map +0 -1
- package/dist/middleware/cors/cors.test.d.ts +0 -2
- package/dist/middleware/cors/cors.test.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 +0 -49
- package/dist/middleware/cors/is-origin-trusted.d.ts.map +0 -1
- package/dist/middleware/cors/is-origin-trusted.test.d.ts +0 -2
- package/dist/middleware/cors/is-origin-trusted.test.d.ts.map +0 -1
- package/dist/middleware/cors/process-cors.d.ts +0 -31
- package/dist/middleware/cors/process-cors.d.ts.map +0 -1
- package/dist/middleware/openapi/config.d.ts +0 -28
- package/dist/middleware/openapi/config.d.ts.map +0 -1
- package/dist/middleware/openapi/handlers.d.ts +0 -29
- package/dist/middleware/openapi/handlers.d.ts.map +0 -1
- package/dist/middleware/openapi/index.d.ts +0 -11
- package/dist/middleware/openapi/index.d.ts.map +0 -1
- package/src/__tests__/server.test.ts +0 -96
- package/src/middleware/cors/cors.test.ts +0 -419
- package/src/middleware/cors/cors.ts +0 -192
- package/src/middleware/cors/index.ts +0 -30
- package/src/middleware/cors/is-origin-trusted.ts +0 -126
- package/src/middleware/cors/process-cors.ts +0 -91
- package/src/middleware/openapi/config.ts +0 -28
- package/src/middleware/openapi/handlers.ts +0 -132
- package/src/middleware/openapi/index.ts +0 -11
|
@@ -1254,21 +1254,10 @@ function consentRegistry({ adapter, ...ctx }) {
|
|
|
1254
1254
|
};
|
|
1255
1255
|
return registry;
|
|
1256
1256
|
}
|
|
1257
|
-
|
|
1257
|
+
const external_node_crypto_namespaceObject = require("node:crypto");
|
|
1258
|
+
function generatePolicyPlaceholder(name, date) {
|
|
1258
1259
|
const content = `[PLACEHOLDER] This is an automatically generated version of the ${name} policy.\n\nThis placeholder content should be replaced with actual policy terms before being presented to users.\n\nGenerated on: ${date.toISOString()}`;
|
|
1259
|
-
|
|
1260
|
-
try {
|
|
1261
|
-
const encoder = new TextEncoder();
|
|
1262
|
-
const data = encoder.encode(content);
|
|
1263
|
-
const hashBuffer = await crypto.subtle.digest('SHA-256', data);
|
|
1264
|
-
contentHash = Array.from(new Uint8Array(hashBuffer)).map((b)=>b.toString(16).padStart(2, '0')).join('');
|
|
1265
|
-
} catch (error) {
|
|
1266
|
-
throw new error_class_DoubleTieError('Failed to generate policy content hash', {
|
|
1267
|
-
code: error_codes_ERROR_CODES.INTERNAL_SERVER_ERROR,
|
|
1268
|
-
status: 500,
|
|
1269
|
-
cause: error instanceof Error ? error : new Error(String(error))
|
|
1270
|
-
});
|
|
1271
|
-
}
|
|
1260
|
+
const contentHash = (0, external_node_crypto_namespaceObject.createHash)('sha256').update(content).digest('hex');
|
|
1272
1261
|
return {
|
|
1273
1262
|
content,
|
|
1274
1263
|
contentHash
|
|
@@ -1328,53 +1317,44 @@ function policyRegistry({ adapter, ...ctx }) {
|
|
|
1328
1317
|
});
|
|
1329
1318
|
return policy ? validateEntityOutput('consentPolicy', policy, ctx.options) : null;
|
|
1330
1319
|
},
|
|
1331
|
-
findOrCreatePolicy: async (type)=>
|
|
1320
|
+
findOrCreatePolicy: async (type)=>adapter.transaction({
|
|
1332
1321
|
callback: async (txAdapter)=>{
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
value: type
|
|
1349
|
-
}
|
|
1350
|
-
],
|
|
1351
|
-
sortBy: {
|
|
1352
|
-
field: 'effectiveDate',
|
|
1353
|
-
direction: 'desc'
|
|
1322
|
+
const now = new Date();
|
|
1323
|
+
const txRegistry = policyRegistry({
|
|
1324
|
+
adapter: txAdapter,
|
|
1325
|
+
...ctx
|
|
1326
|
+
});
|
|
1327
|
+
const rawLatestPolicy = await txAdapter.findOne({
|
|
1328
|
+
model: 'consentPolicy',
|
|
1329
|
+
where: [
|
|
1330
|
+
{
|
|
1331
|
+
field: 'isActive',
|
|
1332
|
+
value: true
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
field: 'type',
|
|
1336
|
+
value: type
|
|
1354
1337
|
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
cause: error instanceof Error ? error : new Error(String(error))
|
|
1376
|
-
});
|
|
1377
|
-
}
|
|
1338
|
+
],
|
|
1339
|
+
sortBy: {
|
|
1340
|
+
field: 'effectiveDate',
|
|
1341
|
+
direction: 'desc'
|
|
1342
|
+
}
|
|
1343
|
+
});
|
|
1344
|
+
const latestPolicy = rawLatestPolicy ? validateEntityOutput('consentPolicy', rawLatestPolicy, ctx.options) : null;
|
|
1345
|
+
if (latestPolicy) return latestPolicy;
|
|
1346
|
+
const { content: defaultContent, contentHash } = generatePolicyPlaceholder(type, now);
|
|
1347
|
+
return txRegistry.createConsentPolicy({
|
|
1348
|
+
version: '1.0.0',
|
|
1349
|
+
type,
|
|
1350
|
+
name: type,
|
|
1351
|
+
effectiveDate: now,
|
|
1352
|
+
content: defaultContent,
|
|
1353
|
+
contentHash,
|
|
1354
|
+
isActive: true,
|
|
1355
|
+
updatedAt: now,
|
|
1356
|
+
expirationDate: null
|
|
1357
|
+
});
|
|
1378
1358
|
}
|
|
1379
1359
|
})
|
|
1380
1360
|
};
|
|
@@ -4,6 +4,7 @@ import "neverthrow";
|
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE__orpc_server_0dae8408__ from "@orpc/server";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opentelemetry/api";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__doubletie_logger_91c58a8f__ from "@doubletie/logger";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_crypto_9ba42079__ from "node:crypto";
|
|
7
8
|
const COMMON_TIMEZONES = {
|
|
8
9
|
UTC: 'UTC',
|
|
9
10
|
GMT: 'GMT',
|
|
@@ -1196,21 +1197,9 @@ function consentRegistry({ adapter, ...ctx }) {
|
|
|
1196
1197
|
};
|
|
1197
1198
|
return registry;
|
|
1198
1199
|
}
|
|
1199
|
-
|
|
1200
|
+
function generatePolicyPlaceholder(name, date) {
|
|
1200
1201
|
const content = `[PLACEHOLDER] This is an automatically generated version of the ${name} policy.\n\nThis placeholder content should be replaced with actual policy terms before being presented to users.\n\nGenerated on: ${date.toISOString()}`;
|
|
1201
|
-
|
|
1202
|
-
try {
|
|
1203
|
-
const encoder = new TextEncoder();
|
|
1204
|
-
const data = encoder.encode(content);
|
|
1205
|
-
const hashBuffer = await crypto.subtle.digest('SHA-256', data);
|
|
1206
|
-
contentHash = Array.from(new Uint8Array(hashBuffer)).map((b)=>b.toString(16).padStart(2, '0')).join('');
|
|
1207
|
-
} catch (error) {
|
|
1208
|
-
throw new error_class_DoubleTieError('Failed to generate policy content hash', {
|
|
1209
|
-
code: error_codes_ERROR_CODES.INTERNAL_SERVER_ERROR,
|
|
1210
|
-
status: 500,
|
|
1211
|
-
cause: error instanceof Error ? error : new Error(String(error))
|
|
1212
|
-
});
|
|
1213
|
-
}
|
|
1202
|
+
const contentHash = (0, __WEBPACK_EXTERNAL_MODULE_node_crypto_9ba42079__.createHash)('sha256').update(content).digest('hex');
|
|
1214
1203
|
return {
|
|
1215
1204
|
content,
|
|
1216
1205
|
contentHash
|
|
@@ -1270,53 +1259,44 @@ function policyRegistry({ adapter, ...ctx }) {
|
|
|
1270
1259
|
});
|
|
1271
1260
|
return policy ? validateEntityOutput('consentPolicy', policy, ctx.options) : null;
|
|
1272
1261
|
},
|
|
1273
|
-
findOrCreatePolicy: async (type)=>
|
|
1262
|
+
findOrCreatePolicy: async (type)=>adapter.transaction({
|
|
1274
1263
|
callback: async (txAdapter)=>{
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
value: type
|
|
1291
|
-
}
|
|
1292
|
-
],
|
|
1293
|
-
sortBy: {
|
|
1294
|
-
field: 'effectiveDate',
|
|
1295
|
-
direction: 'desc'
|
|
1264
|
+
const now = new Date();
|
|
1265
|
+
const txRegistry = policyRegistry({
|
|
1266
|
+
adapter: txAdapter,
|
|
1267
|
+
...ctx
|
|
1268
|
+
});
|
|
1269
|
+
const rawLatestPolicy = await txAdapter.findOne({
|
|
1270
|
+
model: 'consentPolicy',
|
|
1271
|
+
where: [
|
|
1272
|
+
{
|
|
1273
|
+
field: 'isActive',
|
|
1274
|
+
value: true
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
field: 'type',
|
|
1278
|
+
value: type
|
|
1296
1279
|
}
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
cause: error instanceof Error ? error : new Error(String(error))
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1280
|
+
],
|
|
1281
|
+
sortBy: {
|
|
1282
|
+
field: 'effectiveDate',
|
|
1283
|
+
direction: 'desc'
|
|
1284
|
+
}
|
|
1285
|
+
});
|
|
1286
|
+
const latestPolicy = rawLatestPolicy ? validateEntityOutput('consentPolicy', rawLatestPolicy, ctx.options) : null;
|
|
1287
|
+
if (latestPolicy) return latestPolicy;
|
|
1288
|
+
const { content: defaultContent, contentHash } = generatePolicyPlaceholder(type, now);
|
|
1289
|
+
return txRegistry.createConsentPolicy({
|
|
1290
|
+
version: '1.0.0',
|
|
1291
|
+
type,
|
|
1292
|
+
name: type,
|
|
1293
|
+
effectiveDate: now,
|
|
1294
|
+
content: defaultContent,
|
|
1295
|
+
contentHash,
|
|
1296
|
+
isActive: true,
|
|
1297
|
+
updatedAt: now,
|
|
1298
|
+
expirationDate: null
|
|
1299
|
+
});
|
|
1320
1300
|
}
|
|
1321
1301
|
})
|
|
1322
1302
|
};
|
|
@@ -926,6 +926,7 @@ const getConsentTables = (options)=>{
|
|
|
926
926
|
...pluginTables
|
|
927
927
|
};
|
|
928
928
|
};
|
|
929
|
+
require("node:crypto");
|
|
929
930
|
function applyDefaultValue(inputValue, field, operation) {
|
|
930
931
|
if ('update' === operation) return inputValue;
|
|
931
932
|
if (null == inputValue && field.defaultValue) {
|
|
@@ -5,6 +5,7 @@ import "neverthrow";
|
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__orpc_server_0dae8408__ from "@orpc/server";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opentelemetry/api";
|
|
7
7
|
import "@doubletie/logger";
|
|
8
|
+
import "node:crypto";
|
|
8
9
|
const COMMON_TIMEZONES = {
|
|
9
10
|
UTC: 'UTC',
|
|
10
11
|
GMT: 'GMT',
|
|
@@ -894,6 +894,7 @@ const definition_getConsentTables = (options)=>{
|
|
|
894
894
|
...pluginTables
|
|
895
895
|
};
|
|
896
896
|
};
|
|
897
|
+
require("node:crypto");
|
|
897
898
|
function utils_applyDefaultValue(inputValue, field, operation) {
|
|
898
899
|
if ('update' === operation) return inputValue;
|
|
899
900
|
if (null == inputValue && field.defaultValue) {
|
|
@@ -5,6 +5,7 @@ import "neverthrow";
|
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__orpc_server_0dae8408__ from "@orpc/server";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opentelemetry/api";
|
|
7
7
|
import "@doubletie/logger";
|
|
8
|
+
import "node:crypto";
|
|
8
9
|
import * as __WEBPACK_EXTERNAL_MODULE_kysely__ from "kysely";
|
|
9
10
|
import "drizzle-orm";
|
|
10
11
|
const COMMON_TIMEZONES = {
|
|
@@ -891,6 +891,7 @@ const getConsentTables = (options)=>{
|
|
|
891
891
|
...pluginTables
|
|
892
892
|
};
|
|
893
893
|
};
|
|
894
|
+
require("node:crypto");
|
|
894
895
|
function applyDefaultValue(inputValue, field, operation) {
|
|
895
896
|
if ('update' === operation) return inputValue;
|
|
896
897
|
if (null == inputValue && field.defaultValue) {
|
|
@@ -4,6 +4,7 @@ import "neverthrow";
|
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE__orpc_server_0dae8408__ from "@orpc/server";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opentelemetry/api";
|
|
6
6
|
import "@doubletie/logger";
|
|
7
|
+
import "node:crypto";
|
|
7
8
|
const COMMON_TIMEZONES = {
|
|
8
9
|
UTC: 'UTC',
|
|
9
10
|
GMT: 'GMT',
|
|
@@ -925,6 +925,7 @@ const getConsentTables = (options)=>{
|
|
|
925
925
|
...pluginTables
|
|
926
926
|
};
|
|
927
927
|
};
|
|
928
|
+
require("node:crypto");
|
|
928
929
|
function applyDefaultValue(inputValue, field, operation) {
|
|
929
930
|
if ('update' === operation) return inputValue;
|
|
930
931
|
if (null == inputValue && field.defaultValue) {
|
|
@@ -4,6 +4,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opent
|
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_base_x_aeb88370__ from "base-x";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_zod__ from "zod";
|
|
6
6
|
import "@doubletie/logger";
|
|
7
|
+
import "node:crypto";
|
|
7
8
|
const error_codes_ERROR_CODES = Object.freeze({
|
|
8
9
|
NOT_FOUND: 'Resource not found',
|
|
9
10
|
BAD_REQUEST: 'Bad request',
|
|
@@ -5,6 +5,7 @@ import "neverthrow";
|
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__orpc_server_0dae8408__ from "@orpc/server";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opentelemetry/api";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE__doubletie_logger_91c58a8f__ from "@doubletie/logger";
|
|
8
|
+
import "node:crypto";
|
|
8
9
|
import * as __WEBPACK_EXTERNAL_MODULE_drizzle_orm_51e552b8__ from "drizzle-orm";
|
|
9
10
|
import * as __WEBPACK_EXTERNAL_MODULE_kysely__ from "kysely";
|
|
10
11
|
function applyDefaultValue(inputValue, field, operation) {
|
|
@@ -5,6 +5,7 @@ import "neverthrow";
|
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__orpc_server_0dae8408__ from "@orpc/server";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opentelemetry/api";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE__doubletie_logger_91c58a8f__ from "@doubletie/logger";
|
|
8
|
+
import "node:crypto";
|
|
8
9
|
import * as __WEBPACK_EXTERNAL_MODULE_kysely__ from "kysely";
|
|
9
10
|
import "drizzle-orm";
|
|
10
11
|
const COMMON_TIMEZONES = {
|
package/dist/router.cjs
CHANGED
|
@@ -359,10 +359,11 @@ external_zod_namespaceObject.z.object({
|
|
|
359
359
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
360
360
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
|
361
361
|
});
|
|
362
|
+
require("node:crypto");
|
|
362
363
|
const baseConsentSchema = external_zod_namespaceObject.z.object({
|
|
363
364
|
subjectId: external_zod_namespaceObject.z.string().optional(),
|
|
364
365
|
externalSubjectId: external_zod_namespaceObject.z.string().optional(),
|
|
365
|
-
domain: external_zod_namespaceObject.z.string(),
|
|
366
|
+
domain: external_zod_namespaceObject.z.string().regex(/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/i, 'invalid domain'),
|
|
366
367
|
type: PolicyTypeSchema,
|
|
367
368
|
metadata: external_zod_namespaceObject.z.record(external_zod_namespaceObject.z.unknown()).optional()
|
|
368
369
|
});
|
|
@@ -952,7 +953,7 @@ function checkJurisdiction(countryCode) {
|
|
|
952
953
|
'KR'
|
|
953
954
|
])
|
|
954
955
|
};
|
|
955
|
-
|
|
956
|
+
let showConsentBanner = false;
|
|
956
957
|
let jurisdictionCode = 'NONE';
|
|
957
958
|
if (countryCode) {
|
|
958
959
|
const jurisdictionMap = [
|
|
@@ -1002,6 +1003,7 @@ function checkJurisdiction(countryCode) {
|
|
|
1002
1003
|
}
|
|
1003
1004
|
];
|
|
1004
1005
|
for (const { sets, code } of jurisdictionMap)if (sets.some((set)=>set.has(countryCode))) {
|
|
1006
|
+
showConsentBanner = true;
|
|
1005
1007
|
jurisdictionCode = code;
|
|
1006
1008
|
break;
|
|
1007
1009
|
}
|
|
@@ -1167,7 +1169,7 @@ const consentHandlers = {
|
|
|
1167
1169
|
showBanner: show_banner_handler_showConsentBanner,
|
|
1168
1170
|
verify: verifyConsent
|
|
1169
1171
|
};
|
|
1170
|
-
var package_namespaceObject = JSON.parse('{"i8":"1.2.0-canary.
|
|
1172
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.2.0-canary.2"}');
|
|
1171
1173
|
const statusHandler = os.meta.status.handler(({ context })=>{
|
|
1172
1174
|
const typedContext = context;
|
|
1173
1175
|
const headers = typedContext.headers;
|
package/dist/router.d.ts
CHANGED
|
@@ -84,8 +84,8 @@ export declare const router: {
|
|
|
84
84
|
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
85
85
|
givenAt: import("zod").ZodDate;
|
|
86
86
|
}, "strip", import("zod").ZodTypeAny, {
|
|
87
|
-
status: string;
|
|
88
87
|
type: "cookie_banner" | "privacy_policy" | "dpa" | "terms_and_conditions" | "marketing_communications" | "age_verification" | "other";
|
|
88
|
+
status: string;
|
|
89
89
|
id: string;
|
|
90
90
|
domain: string;
|
|
91
91
|
domainId: string;
|
|
@@ -95,8 +95,8 @@ export declare const router: {
|
|
|
95
95
|
metadata?: Record<string, unknown> | undefined;
|
|
96
96
|
externalSubjectId?: string | undefined;
|
|
97
97
|
}, {
|
|
98
|
-
status: string;
|
|
99
98
|
type: "cookie_banner" | "privacy_policy" | "dpa" | "terms_and_conditions" | "marketing_communications" | "age_verification" | "other";
|
|
99
|
+
status: string;
|
|
100
100
|
id: string;
|
|
101
101
|
domain: string;
|
|
102
102
|
domainId: string;
|
package/dist/router.js
CHANGED
|
@@ -5,6 +5,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_base_x_aeb88370__ from "base-x";
|
|
|
5
5
|
import "neverthrow";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opentelemetry/api";
|
|
7
7
|
import "@doubletie/logger";
|
|
8
|
+
import "node:crypto";
|
|
8
9
|
(0, __WEBPACK_EXTERNAL_MODULE_base_x_aeb88370__["default"])('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz');
|
|
9
10
|
const fieldConfigSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
10
11
|
required: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
@@ -324,7 +325,7 @@ __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
324
325
|
const baseConsentSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
325
326
|
subjectId: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().optional(),
|
|
326
327
|
externalSubjectId: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().optional(),
|
|
327
|
-
domain: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
328
|
+
domain: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().regex(/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/i, 'invalid domain'),
|
|
328
329
|
type: PolicyTypeSchema,
|
|
329
330
|
metadata: __WEBPACK_EXTERNAL_MODULE_zod__.z.record(__WEBPACK_EXTERNAL_MODULE_zod__.z.unknown()).optional()
|
|
330
331
|
});
|
|
@@ -914,7 +915,7 @@ function checkJurisdiction(countryCode) {
|
|
|
914
915
|
'KR'
|
|
915
916
|
])
|
|
916
917
|
};
|
|
917
|
-
|
|
918
|
+
let showConsentBanner = false;
|
|
918
919
|
let jurisdictionCode = 'NONE';
|
|
919
920
|
if (countryCode) {
|
|
920
921
|
const jurisdictionMap = [
|
|
@@ -964,6 +965,7 @@ function checkJurisdiction(countryCode) {
|
|
|
964
965
|
}
|
|
965
966
|
];
|
|
966
967
|
for (const { sets, code } of jurisdictionMap)if (sets.some((set)=>set.has(countryCode))) {
|
|
968
|
+
showConsentBanner = true;
|
|
967
969
|
jurisdictionCode = code;
|
|
968
970
|
break;
|
|
969
971
|
}
|
|
@@ -1129,7 +1131,7 @@ const consentHandlers = {
|
|
|
1129
1131
|
showBanner: show_banner_handler_showConsentBanner,
|
|
1130
1132
|
verify: verifyConsent
|
|
1131
1133
|
};
|
|
1132
|
-
var package_namespaceObject = JSON.parse('{"i8":"1.2.0-canary.
|
|
1134
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.2.0-canary.2"}');
|
|
1133
1135
|
const statusHandler = os.meta.status.handler(({ context })=>{
|
|
1134
1136
|
const typedContext = context;
|
|
1135
1137
|
const headers = typedContext.headers;
|
|
@@ -64,8 +64,8 @@ export declare function policyRegistry({ adapter, ...ctx }: RegistryContext): {
|
|
|
64
64
|
* @see {@link GenericEndpointContext} For details on the context object
|
|
65
65
|
*/
|
|
66
66
|
createConsentPolicy: (policy: Omit<ConsentPolicy, "id" | "createdAt"> & Partial<ConsentPolicy>, context?: GenericEndpointContext) => Promise<{
|
|
67
|
-
name: string;
|
|
68
67
|
type: "cookie_banner" | "privacy_policy" | "dpa" | "terms_and_conditions" | "marketing_communications" | "age_verification" | "other";
|
|
68
|
+
name: string;
|
|
69
69
|
id: string;
|
|
70
70
|
createdAt: Date;
|
|
71
71
|
updatedAt: Date;
|
|
@@ -110,8 +110,8 @@ export declare function policyRegistry({ adapter, ...ctx }: RegistryContext): {
|
|
|
110
110
|
version?: string;
|
|
111
111
|
includeInactive?: boolean;
|
|
112
112
|
}) => Promise<{
|
|
113
|
-
name: string;
|
|
114
113
|
type: "cookie_banner" | "privacy_policy" | "dpa" | "terms_and_conditions" | "marketing_communications" | "age_verification" | "other";
|
|
114
|
+
name: string;
|
|
115
115
|
id: string;
|
|
116
116
|
createdAt: Date;
|
|
117
117
|
updatedAt: Date;
|
|
@@ -146,8 +146,8 @@ export declare function policyRegistry({ adapter, ...ctx }: RegistryContext): {
|
|
|
146
146
|
* @see {@link ConsentPolicy} For the structure of the returned policy object
|
|
147
147
|
*/
|
|
148
148
|
findConsentPolicyById: (policyId: string) => Promise<{
|
|
149
|
-
name: string;
|
|
150
149
|
type: "cookie_banner" | "privacy_policy" | "dpa" | "terms_and_conditions" | "marketing_communications" | "age_verification" | "other";
|
|
150
|
+
name: string;
|
|
151
151
|
id: string;
|
|
152
152
|
createdAt: Date;
|
|
153
153
|
updatedAt: Date;
|
|
@@ -184,8 +184,8 @@ export declare function policyRegistry({ adapter, ...ctx }: RegistryContext): {
|
|
|
184
184
|
* @see {@link generatePolicyPlaceholder} For details on how placeholder content is generated
|
|
185
185
|
*/
|
|
186
186
|
findOrCreatePolicy: (type: PolicyType) => Promise<{
|
|
187
|
-
name: string;
|
|
188
187
|
type: "cookie_banner" | "privacy_policy" | "dpa" | "terms_and_conditions" | "marketing_communications" | "age_verification" | "other";
|
|
188
|
+
name: string;
|
|
189
189
|
id: string;
|
|
190
190
|
createdAt: Date;
|
|
191
191
|
updatedAt: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/schema/consent-policy/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/schema/consent-policy/registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI5E,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA+B1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,GAAG,GAAG,EAAE,EAAE,eAAe;IAGjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;kCAEM,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,WAAW,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,YAC9D,sBAAsB;;;;;;;;;;;;;IAwBjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;4BAEM;QACP,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,eAAe,CAAC,EAAE,OAAO,CAAC;KAC1B;;;;;;;;;;;;;IAuCF;;;;;;;;;;;;;;;;;;;;;;OAsBG;sCACqC,MAAM;;;;;;;;;;;;;IAe9C;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;+BAC8B,UAAU;;;;;;;;;;;;;EA2D5C"}
|
|
@@ -38,8 +38,8 @@ export declare const consentPolicySchema: z.ZodObject<{
|
|
|
38
38
|
createdAt: z.ZodDefault<z.ZodDate>;
|
|
39
39
|
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
40
40
|
}, "strip", z.ZodTypeAny, {
|
|
41
|
-
name: string;
|
|
42
41
|
type: "cookie_banner" | "privacy_policy" | "dpa" | "terms_and_conditions" | "marketing_communications" | "age_verification" | "other";
|
|
42
|
+
name: string;
|
|
43
43
|
id: string;
|
|
44
44
|
createdAt: Date;
|
|
45
45
|
updatedAt: Date;
|
|
@@ -50,8 +50,8 @@ export declare const consentPolicySchema: z.ZodObject<{
|
|
|
50
50
|
contentHash: string;
|
|
51
51
|
expirationDate?: Date | null | undefined;
|
|
52
52
|
}, {
|
|
53
|
-
name: string;
|
|
54
53
|
type: "cookie_banner" | "privacy_policy" | "dpa" | "terms_and_conditions" | "marketing_communications" | "age_verification" | "other";
|
|
54
|
+
name: string;
|
|
55
55
|
id: string;
|
|
56
56
|
version: string;
|
|
57
57
|
effectiveDate: Date;
|
|
@@ -44,8 +44,8 @@ export declare function getConsentPolicyTable(options: C15TOptions, policyFields
|
|
|
44
44
|
createdAt: import("zod").ZodDefault<import("zod").ZodDate>;
|
|
45
45
|
updatedAt: import("zod").ZodDefault<import("zod").ZodDate>;
|
|
46
46
|
}, "strip", import("zod").ZodTypeAny, {
|
|
47
|
-
name: string;
|
|
48
47
|
type: "cookie_banner" | "privacy_policy" | "dpa" | "terms_and_conditions" | "marketing_communications" | "age_verification" | "other";
|
|
48
|
+
name: string;
|
|
49
49
|
id: string;
|
|
50
50
|
createdAt: Date;
|
|
51
51
|
updatedAt: Date;
|
|
@@ -56,8 +56,8 @@ export declare function getConsentPolicyTable(options: C15TOptions, policyFields
|
|
|
56
56
|
contentHash: string;
|
|
57
57
|
expirationDate?: Date | null | undefined;
|
|
58
58
|
}, {
|
|
59
|
-
name: string;
|
|
60
59
|
type: "cookie_banner" | "privacy_policy" | "dpa" | "terms_and_conditions" | "marketing_communications" | "age_verification" | "other";
|
|
60
|
+
name: string;
|
|
61
61
|
id: string;
|
|
62
62
|
version: string;
|
|
63
63
|
effectiveDate: Date;
|
|
@@ -86,9 +86,9 @@ export declare function consentPurposeRegistry({ adapter, ...ctx }: RegistryCont
|
|
|
86
86
|
* @see {@link GenericEndpointContext} For details on the context object
|
|
87
87
|
*/
|
|
88
88
|
createConsentPurpose: (consentPurpose: Omit<ConsentPurpose, "id" | "createdAt" | "updatedAt"> & Partial<ConsentPurpose>, context?: GenericEndpointContext) => Promise<{
|
|
89
|
+
description: string;
|
|
89
90
|
code: string;
|
|
90
91
|
name: string;
|
|
91
|
-
description: string;
|
|
92
92
|
id: string;
|
|
93
93
|
createdAt: Date;
|
|
94
94
|
updatedAt: Date;
|
|
@@ -123,9 +123,9 @@ export declare function consentPurposeRegistry({ adapter, ...ctx }: RegistryCont
|
|
|
123
123
|
* @see {@link ConsentPurpose} For the structure of the returned purpose object
|
|
124
124
|
*/
|
|
125
125
|
findConsentPurposeByCode: (code: string) => Promise<{
|
|
126
|
+
description: string;
|
|
126
127
|
code: string;
|
|
127
128
|
name: string;
|
|
128
|
-
description: string;
|
|
129
129
|
id: string;
|
|
130
130
|
createdAt: Date;
|
|
131
131
|
updatedAt: Date;
|
|
@@ -46,9 +46,9 @@ export declare const purposeSchema: z.ZodObject<{
|
|
|
46
46
|
createdAt: z.ZodDefault<z.ZodDate>;
|
|
47
47
|
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
48
48
|
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
description: string;
|
|
49
50
|
code: string;
|
|
50
51
|
name: string;
|
|
51
|
-
description: string;
|
|
52
52
|
id: string;
|
|
53
53
|
createdAt: Date;
|
|
54
54
|
updatedAt: Date;
|
|
@@ -57,9 +57,9 @@ export declare const purposeSchema: z.ZodObject<{
|
|
|
57
57
|
dataCategory?: string | undefined;
|
|
58
58
|
legalBasis?: string | undefined;
|
|
59
59
|
}, {
|
|
60
|
+
description: string;
|
|
60
61
|
code: string;
|
|
61
62
|
name: string;
|
|
62
|
-
description: string;
|
|
63
63
|
id: string;
|
|
64
64
|
createdAt?: Date | undefined;
|
|
65
65
|
updatedAt?: Date | undefined;
|
|
@@ -43,9 +43,9 @@ export declare function getPurposeTable(options: C15TOptions, purposeFields?: Re
|
|
|
43
43
|
createdAt: import("zod").ZodDefault<import("zod").ZodDate>;
|
|
44
44
|
updatedAt: import("zod").ZodDefault<import("zod").ZodDate>;
|
|
45
45
|
}, "strip", import("zod").ZodTypeAny, {
|
|
46
|
+
description: string;
|
|
46
47
|
code: string;
|
|
47
48
|
name: string;
|
|
48
|
-
description: string;
|
|
49
49
|
id: string;
|
|
50
50
|
createdAt: Date;
|
|
51
51
|
updatedAt: Date;
|
|
@@ -54,9 +54,9 @@ export declare function getPurposeTable(options: C15TOptions, purposeFields?: Re
|
|
|
54
54
|
dataCategory?: string | undefined;
|
|
55
55
|
legalBasis?: string | undefined;
|
|
56
56
|
}, {
|
|
57
|
+
description: string;
|
|
57
58
|
code: string;
|
|
58
59
|
name: string;
|
|
59
|
-
description: string;
|
|
60
60
|
id: string;
|
|
61
61
|
createdAt?: Date | undefined;
|
|
62
62
|
updatedAt?: Date | undefined;
|