@c15t/backend 1.2.0 → 1.2.2-canary-20250514183211
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 +54 -53
- package/.turbo/turbo-fmt.log +7 -0
- package/CHANGELOG.md +14 -0
- package/dist/contracts.cjs +2 -2
- package/dist/contracts.js +2 -2
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/pkgs/data-model/index.cjs +2 -2
- package/dist/pkgs/data-model/index.js +2 -2
- package/dist/pkgs/data-model/schema/index.cjs +2 -2
- package/dist/pkgs/data-model/schema/index.js +2 -2
- package/dist/pkgs/db-adapters/adapters/drizzle-adapter/index.cjs +2 -2
- package/dist/pkgs/db-adapters/adapters/drizzle-adapter/index.js +2 -2
- package/dist/pkgs/db-adapters/adapters/kysely-adapter/index.cjs +2 -2
- package/dist/pkgs/db-adapters/adapters/kysely-adapter/index.js +2 -2
- package/dist/pkgs/db-adapters/adapters/memory-adapter/index.cjs +2 -2
- package/dist/pkgs/db-adapters/adapters/memory-adapter/index.js +2 -2
- package/dist/pkgs/db-adapters/adapters/prisma-adapter/index.cjs +2 -2
- package/dist/pkgs/db-adapters/adapters/prisma-adapter/index.js +2 -2
- package/dist/pkgs/db-adapters/index.cjs +2 -2
- package/dist/pkgs/db-adapters/index.js +2 -2
- package/dist/pkgs/migrations/index.cjs +2 -2
- package/dist/pkgs/migrations/index.js +2 -2
- package/dist/router.cjs +3 -3
- package/dist/router.js +3 -3
- package/dist/schema/consent-purpose/registry.d.ts +4 -4
- package/dist/schema/consent-purpose/schema.d.ts +6 -6
- package/dist/schema/consent-purpose/table.d.ts +6 -6
- package/dist/schema/create-registry.d.ts +4 -4
- package/dist/schema/definition.d.ts +6 -6
- package/dist/schema/index.cjs +2 -2
- package/dist/schema/index.js +2 -2
- package/dist/schema/schemas.d.ts +6 -6
- package/package.json +3 -2
- package/src/contracts/consent/show-banner.contract.test.ts +37 -0
- package/src/contracts/consent/show-banner.contract.ts +27 -1
- package/src/handlers/consent/show-banner.handler.test.ts +46 -0
- package/src/handlers/consent/show-banner.handler.ts +37 -2
- package/src/schema/consent-purpose/schema.ts +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,53 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[2mdist/pkgs/
|
|
17
|
-
[2mdist/pkgs/
|
|
18
|
-
[2mdist/[22m[
|
|
19
|
-
[2mdist
|
|
20
|
-
[2mdist/pkgs/db-adapters/adapters/
|
|
21
|
-
[2mdist/[22m[
|
|
22
|
-
[2mdist
|
|
23
|
-
[2mdist/pkgs/
|
|
24
|
-
[2mdist/pkgs/
|
|
25
|
-
[2mdist/pkgs/
|
|
26
|
-
[2mdist/schema/[22m[36mindex.js[39m
|
|
27
|
-
[2mdist/
|
|
28
|
-
[2mdist/pkgs/
|
|
29
|
-
[2mdist/[22m[
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
[2mdist/pkgs/
|
|
38
|
-
[2mdist/pkgs/
|
|
39
|
-
[2mdist/[22m[
|
|
40
|
-
[2mdist
|
|
41
|
-
[2mdist/[22m[
|
|
42
|
-
[2mdist
|
|
43
|
-
[2mdist/pkgs/db-adapters/adapters/
|
|
44
|
-
[2mdist/pkgs/
|
|
45
|
-
[2mdist/pkgs/
|
|
46
|
-
[2mdist/pkgs/
|
|
47
|
-
[2mdist/schema/[22m[36mindex.cjs[39m
|
|
48
|
-
[2mdist/
|
|
49
|
-
[2mdist/pkgs/
|
|
50
|
-
[2mdist/[22m[
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @c15t/backend@1.2.1 build /Users/christopherburns/glados/k/c15t/packages/backend
|
|
4
|
+
> rslib build
|
|
5
|
+
|
|
6
|
+
[1m[38;2;189;255;243m [39m[38;2;189;255;243m [39m[38;2;179;249;235mR[39m[38;2;168;244;227ms[39m[38;2;158;238;219ml[39m[38;2;147;233;211mi[39m[38;2;137;227;203mb[39m[38;2;137;227;203m [39m[38;2;126;222;194mv[39m[38;2;116;216;186m0[39m[38;2;105;211;178m.[39m[38;2;95;205;170m6[39m[38;2;84;200;162m.[39m[38;2;74;194;154m2[39m[38;2;74;194;154m
|
|
7
|
+
[39m[22m
|
|
8
|
+
[1m[32mready [39m[22m built in [1m0.23[22m s[90m (esm)[39m
|
|
9
|
+
[1m[32mready [39m[22m built in [1m0.23[22m s[90m (cjs)[39m
|
|
10
|
+
[1m[36mstart [39m[22m generating declaration files... [90m(esm)[39m
|
|
11
|
+
[1m[36mstart [39m[22m generating declaration files... [90m(cjs)[39m
|
|
12
|
+
[1m[32mready [39m[22m declaration files generated in [1m3.49[22m s [90m(cjs)[39m
|
|
13
|
+
[1m[32mready [39m[22m declaration files generated in [1m3.51[22m s [90m(esm)[39m
|
|
14
|
+
|
|
15
|
+
[34m File (esm) Size [39m
|
|
16
|
+
[2mdist/pkgs/types/[22m[36mindex.js[39m 0.00 kB
|
|
17
|
+
[2mdist/pkgs/data-model/fields/[22m[36mindex.js[39m 5.6 kB
|
|
18
|
+
[2mdist/pkgs/results/[22m[36mindex.js[39m 16.4 kB
|
|
19
|
+
[2mdist/[22m[36mcontracts.js[39m 30.2 kB
|
|
20
|
+
[2mdist/pkgs/db-adapters/adapters/memory-adapter/[22m[36mindex.js[39m 44.3 kB
|
|
21
|
+
[2mdist/pkgs/db-adapters/adapters/prisma-adapter/[22m[36mindex.js[39m 47.5 kB
|
|
22
|
+
[2mdist/[22m[36mrouter.js[39m 48.4 kB
|
|
23
|
+
[2mdist/pkgs/db-adapters/adapters/drizzle-adapter/[22m[36mindex.js[39m 50.0 kB
|
|
24
|
+
[2mdist/pkgs/migrations/[22m[36mindex.js[39m 50.7 kB
|
|
25
|
+
[2mdist/pkgs/db-adapters/adapters/kysely-adapter/[22m[36mindex.js[39m 55.3 kB
|
|
26
|
+
[2mdist/pkgs/data-model/schema/[22m[36mindex.js[39m 60.9 kB
|
|
27
|
+
[2mdist/schema/[22m[36mindex.js[39m 61.2 kB
|
|
28
|
+
[2mdist/pkgs/data-model/[22m[36mindex.js[39m 61.8 kB
|
|
29
|
+
[2mdist/pkgs/db-adapters/[22m[36mindex.js[39m 89.6 kB
|
|
30
|
+
[2mdist/[22m[36mcore.js[39m 153.1 kB
|
|
31
|
+
|
|
32
|
+
[34mTotal:[39m 774.9 kB
|
|
33
|
+
|
|
34
|
+
[2m -----[22m
|
|
35
|
+
|
|
36
|
+
[34m File (cjs) Size [39m
|
|
37
|
+
[2mdist/pkgs/types/[22m[36mindex.cjs[39m 0.60 kB
|
|
38
|
+
[2mdist/pkgs/data-model/fields/[22m[36mindex.cjs[39m 7.3 kB
|
|
39
|
+
[2mdist/pkgs/results/[22m[36mindex.cjs[39m 18.5 kB
|
|
40
|
+
[2mdist/[22m[36mcontracts.cjs[39m 30.6 kB
|
|
41
|
+
[2mdist/pkgs/db-adapters/adapters/memory-adapter/[22m[36mindex.cjs[39m 45.3 kB
|
|
42
|
+
[2mdist/[22m[36mrouter.cjs[39m 48.3 kB
|
|
43
|
+
[2mdist/pkgs/db-adapters/adapters/prisma-adapter/[22m[36mindex.cjs[39m 48.4 kB
|
|
44
|
+
[2mdist/pkgs/db-adapters/adapters/drizzle-adapter/[22m[36mindex.cjs[39m 50.7 kB
|
|
45
|
+
[2mdist/pkgs/migrations/[22m[36mindex.cjs[39m 52.3 kB
|
|
46
|
+
[2mdist/pkgs/db-adapters/adapters/kysely-adapter/[22m[36mindex.cjs[39m 56.3 kB
|
|
47
|
+
[2mdist/pkgs/data-model/schema/[22m[36mindex.cjs[39m 64.0 kB
|
|
48
|
+
[2mdist/schema/[22m[36mindex.cjs[39m 64.5 kB
|
|
49
|
+
[2mdist/pkgs/data-model/[22m[36mindex.cjs[39m 66.0 kB
|
|
50
|
+
[2mdist/pkgs/db-adapters/[22m[36mindex.cjs[39m 90.8 kB
|
|
51
|
+
[2mdist/[22m[36mcore.cjs[39m 152.1 kB
|
|
52
|
+
|
|
53
|
+
[34mTotal:[39m 795.7 kB
|
|
54
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @c15t/backend@1.0.5 fmt /Users/christopherburns/glados/k/c15t/packages/backend
|
|
4
|
+
> pnpm biome format --write . && pnpm biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=true --write
|
|
5
|
+
|
|
6
|
+
[0m[34mFormatted [0m[0m[34m163[0m[0m[34m [0m[0m[34mfiles[0m[0m[34m in [0m[0m[34m31[0m[0m[2m[34mms[0m[0m[34m.[0m[0m[34m No fixes applied.[0m
|
|
7
|
+
[0m[34mChecked [0m[0m[34m163[0m[0m[34m [0m[0m[34mfiles[0m[0m[34m in [0m[0m[34m13[0m[0m[2m[34mms[0m[0m[34m.[0m[0m[34m No fixes applied.[0m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @c15t/backend
|
|
2
2
|
|
|
3
|
+
## 1.2.2-canary-20250514183211
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f64f000: feat: added @c15t/nextjs, @c15t/translations for better integration, server-side translations & fetching of consent banner
|
|
8
|
+
- Updated dependencies [f64f000]
|
|
9
|
+
- @c15t/translations@1.2.2-canary-20250514183211
|
|
10
|
+
|
|
11
|
+
## 1.2.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#226](https://github.com/c15t/c15t/pull/226) [`aca32d3`](https://github.com/c15t/c15t/commit/aca32d3f0f76d75ad618a8ba3386ce385ac612e4) Thanks [@KayleeWilliams](https://github.com/KayleeWilliams)! - fix(backend): set consent validation error
|
|
16
|
+
|
|
3
17
|
## 1.2.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/contracts.cjs
CHANGED
|
@@ -307,8 +307,8 @@ external_zod_namespaceObject.z.object({
|
|
|
307
307
|
name: external_zod_namespaceObject.z.string(),
|
|
308
308
|
description: external_zod_namespaceObject.z.string(),
|
|
309
309
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
310
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
311
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
310
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
311
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
312
312
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
313
313
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
314
314
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
package/dist/contracts.js
CHANGED
|
@@ -268,8 +268,8 @@ __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
268
268
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
269
269
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
270
270
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
271
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
272
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
271
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
272
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
273
273
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
274
274
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
275
275
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
package/dist/core.cjs
CHANGED
|
@@ -607,8 +607,8 @@ const schema_purposeSchema = external_zod_namespaceObject.z.object({
|
|
|
607
607
|
name: external_zod_namespaceObject.z.string(),
|
|
608
608
|
description: external_zod_namespaceObject.z.string(),
|
|
609
609
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
610
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
611
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
610
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
611
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
612
612
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
613
613
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
614
614
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
|
@@ -2234,7 +2234,7 @@ function getBaseURL(url, path) {
|
|
|
2234
2234
|
if (fromEnv) return withPath(fromEnv, path);
|
|
2235
2235
|
}
|
|
2236
2236
|
var package_namespaceObject = {
|
|
2237
|
-
i8: "1.2.
|
|
2237
|
+
i8: "1.2.1"
|
|
2238
2238
|
};
|
|
2239
2239
|
const createRegistry = (ctx)=>({
|
|
2240
2240
|
...auditLogRegistry(ctx),
|
package/dist/core.js
CHANGED
|
@@ -573,8 +573,8 @@ const schema_purposeSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
573
573
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
574
574
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
575
575
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
576
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
577
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
576
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
577
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
578
578
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
579
579
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
580
580
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
|
@@ -2198,7 +2198,7 @@ function getBaseURL(url, path) {
|
|
|
2198
2198
|
if (fromEnv) return withPath(fromEnv, path);
|
|
2199
2199
|
}
|
|
2200
2200
|
var package_namespaceObject = {
|
|
2201
|
-
i8: "1.2.
|
|
2201
|
+
i8: "1.2.1"
|
|
2202
2202
|
};
|
|
2203
2203
|
const createRegistry = (ctx)=>({
|
|
2204
2204
|
...auditLogRegistry(ctx),
|
|
@@ -684,8 +684,8 @@ const purposeSchema = external_zod_namespaceObject.z.object({
|
|
|
684
684
|
name: external_zod_namespaceObject.z.string(),
|
|
685
685
|
description: external_zod_namespaceObject.z.string(),
|
|
686
686
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
687
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
688
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
687
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
688
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
689
689
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
690
690
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
691
691
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
|
@@ -616,8 +616,8 @@ const purposeSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
616
616
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
617
617
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
618
618
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
619
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
620
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
619
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
620
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
621
621
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
622
622
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
623
623
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
|
@@ -651,8 +651,8 @@ const purposeSchema = external_zod_namespaceObject.z.object({
|
|
|
651
651
|
name: external_zod_namespaceObject.z.string(),
|
|
652
652
|
description: external_zod_namespaceObject.z.string(),
|
|
653
653
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
654
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
655
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
654
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
655
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
656
656
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
657
657
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
658
658
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
|
@@ -593,8 +593,8 @@ const purposeSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
593
593
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
594
594
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
595
595
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
596
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
597
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
596
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
597
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
598
598
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
599
599
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
600
600
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
|
@@ -529,8 +529,8 @@ const purposeSchema = external_zod_namespaceObject.z.object({
|
|
|
529
529
|
name: external_zod_namespaceObject.z.string(),
|
|
530
530
|
description: external_zod_namespaceObject.z.string(),
|
|
531
531
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
532
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
533
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
532
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
533
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
534
534
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
535
535
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
536
536
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
|
@@ -491,8 +491,8 @@ const purposeSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
491
491
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
492
492
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
493
493
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
494
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
495
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
494
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
495
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
496
496
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
497
497
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
498
498
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
|
@@ -497,8 +497,8 @@ const schema_purposeSchema = external_zod_namespaceObject.z.object({
|
|
|
497
497
|
name: external_zod_namespaceObject.z.string(),
|
|
498
498
|
description: external_zod_namespaceObject.z.string(),
|
|
499
499
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
500
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
501
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
500
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
501
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
502
502
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
503
503
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
504
504
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
|
@@ -459,8 +459,8 @@ const schema_purposeSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
459
459
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
460
460
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
461
461
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
462
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
463
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
462
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
463
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
464
464
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
465
465
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
466
466
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
|
@@ -494,8 +494,8 @@ const schema_purposeSchema = external_zod_namespaceObject.z.object({
|
|
|
494
494
|
name: external_zod_namespaceObject.z.string(),
|
|
495
495
|
description: external_zod_namespaceObject.z.string(),
|
|
496
496
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
497
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
498
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
497
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
498
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
499
499
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
500
500
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
501
501
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
|
@@ -456,8 +456,8 @@ const schema_purposeSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
456
456
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
457
457
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
458
458
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
459
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
460
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
459
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
460
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
461
461
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
462
462
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
463
463
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
|
@@ -528,8 +528,8 @@ const purposeSchema = external_zod_namespaceObject.z.object({
|
|
|
528
528
|
name: external_zod_namespaceObject.z.string(),
|
|
529
529
|
description: external_zod_namespaceObject.z.string(),
|
|
530
530
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
531
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
532
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
531
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
532
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
533
533
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
534
534
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
535
535
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
|
@@ -490,8 +490,8 @@ const purposeSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
490
490
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
491
491
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
492
492
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
493
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
494
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
493
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
494
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
495
495
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
496
496
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
497
497
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
|
@@ -544,8 +544,8 @@ const schema_purposeSchema = external_zod_namespaceObject.z.object({
|
|
|
544
544
|
name: external_zod_namespaceObject.z.string(),
|
|
545
545
|
description: external_zod_namespaceObject.z.string(),
|
|
546
546
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
547
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
548
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
547
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
548
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
549
549
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
550
550
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
551
551
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
|
@@ -501,8 +501,8 @@ const schema_purposeSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
501
501
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
502
502
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
503
503
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
504
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
505
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
504
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
505
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
506
506
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
507
507
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
508
508
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
|
@@ -486,8 +486,8 @@ const schema_purposeSchema = external_zod_namespaceObject.z.object({
|
|
|
486
486
|
name: external_zod_namespaceObject.z.string(),
|
|
487
487
|
description: external_zod_namespaceObject.z.string(),
|
|
488
488
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
489
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
490
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
489
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
490
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
491
491
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
492
492
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
493
493
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
|
@@ -443,8 +443,8 @@ const schema_purposeSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
443
443
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
444
444
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
445
445
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
446
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
447
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
446
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
447
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
448
448
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
449
449
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
450
450
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
package/dist/router.cjs
CHANGED
|
@@ -306,8 +306,8 @@ external_zod_namespaceObject.z.object({
|
|
|
306
306
|
name: external_zod_namespaceObject.z.string(),
|
|
307
307
|
description: external_zod_namespaceObject.z.string(),
|
|
308
308
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
309
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
310
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
309
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
310
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
311
311
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
312
312
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
313
313
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
|
@@ -1168,7 +1168,7 @@ const consentHandlers = {
|
|
|
1168
1168
|
verify: verifyConsent
|
|
1169
1169
|
};
|
|
1170
1170
|
var package_namespaceObject = {
|
|
1171
|
-
i8: "1.2.
|
|
1171
|
+
i8: "1.2.1"
|
|
1172
1172
|
};
|
|
1173
1173
|
const statusHandler = os.meta.status.handler(({ context })=>{
|
|
1174
1174
|
const typedContext = context;
|
package/dist/router.js
CHANGED
|
@@ -268,8 +268,8 @@ __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
268
268
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
269
269
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
270
270
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
271
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
272
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
271
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
272
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
273
273
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
274
274
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
275
275
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
|
@@ -1130,7 +1130,7 @@ const consentHandlers = {
|
|
|
1130
1130
|
verify: verifyConsent
|
|
1131
1131
|
};
|
|
1132
1132
|
var package_namespaceObject = {
|
|
1133
|
-
i8: "1.2.
|
|
1133
|
+
i8: "1.2.1"
|
|
1134
1134
|
};
|
|
1135
1135
|
const statusHandler = os.meta.status.handler(({ context })=>{
|
|
1136
1136
|
const typedContext = context;
|
|
@@ -94,8 +94,8 @@ export declare function consentPurposeRegistry({ adapter, ...ctx }: RegistryCont
|
|
|
94
94
|
updatedAt: Date;
|
|
95
95
|
isEssential: boolean;
|
|
96
96
|
isActive: boolean;
|
|
97
|
-
dataCategory?: string | undefined;
|
|
98
|
-
legalBasis?: string | undefined;
|
|
97
|
+
dataCategory?: string | null | undefined;
|
|
98
|
+
legalBasis?: string | null | undefined;
|
|
99
99
|
}>;
|
|
100
100
|
/**
|
|
101
101
|
* Finds a consent purpose by its unique code.
|
|
@@ -131,8 +131,8 @@ export declare function consentPurposeRegistry({ adapter, ...ctx }: RegistryCont
|
|
|
131
131
|
updatedAt: Date;
|
|
132
132
|
isEssential: boolean;
|
|
133
133
|
isActive: boolean;
|
|
134
|
-
dataCategory?: string | undefined;
|
|
135
|
-
legalBasis?: string | undefined;
|
|
134
|
+
dataCategory?: string | null | undefined;
|
|
135
|
+
legalBasis?: string | null | undefined;
|
|
136
136
|
} | null>;
|
|
137
137
|
};
|
|
138
138
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -40,8 +40,8 @@ export declare const purposeSchema: z.ZodObject<{
|
|
|
40
40
|
name: z.ZodString;
|
|
41
41
|
description: z.ZodString;
|
|
42
42
|
isEssential: z.ZodDefault<z.ZodBoolean>;
|
|
43
|
-
dataCategory: z.ZodOptional<z.ZodString
|
|
44
|
-
legalBasis: z.ZodOptional<z.ZodString
|
|
43
|
+
dataCategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
44
|
+
legalBasis: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
45
|
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
46
46
|
createdAt: z.ZodDefault<z.ZodDate>;
|
|
47
47
|
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
@@ -54,8 +54,8 @@ export declare const purposeSchema: z.ZodObject<{
|
|
|
54
54
|
updatedAt: Date;
|
|
55
55
|
isEssential: boolean;
|
|
56
56
|
isActive: boolean;
|
|
57
|
-
dataCategory?: string | undefined;
|
|
58
|
-
legalBasis?: string | undefined;
|
|
57
|
+
dataCategory?: string | null | undefined;
|
|
58
|
+
legalBasis?: string | null | undefined;
|
|
59
59
|
}, {
|
|
60
60
|
code: string;
|
|
61
61
|
name: string;
|
|
@@ -64,8 +64,8 @@ export declare const purposeSchema: z.ZodObject<{
|
|
|
64
64
|
createdAt?: Date | undefined;
|
|
65
65
|
updatedAt?: Date | undefined;
|
|
66
66
|
isEssential?: boolean | undefined;
|
|
67
|
-
dataCategory?: string | undefined;
|
|
68
|
-
legalBasis?: string | undefined;
|
|
67
|
+
dataCategory?: string | null | undefined;
|
|
68
|
+
legalBasis?: string | null | undefined;
|
|
69
69
|
isActive?: boolean | undefined;
|
|
70
70
|
}>;
|
|
71
71
|
/**
|
|
@@ -37,8 +37,8 @@ export declare function getPurposeTable(options: C15TOptions, purposeFields?: Re
|
|
|
37
37
|
name: import("zod").ZodString;
|
|
38
38
|
description: import("zod").ZodString;
|
|
39
39
|
isEssential: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
40
|
-
dataCategory: import("zod").ZodOptional<import("zod").ZodString
|
|
41
|
-
legalBasis: import("zod").ZodOptional<import("zod").ZodString
|
|
40
|
+
dataCategory: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
41
|
+
legalBasis: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
42
42
|
isActive: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
43
43
|
createdAt: import("zod").ZodDefault<import("zod").ZodDate>;
|
|
44
44
|
updatedAt: import("zod").ZodDefault<import("zod").ZodDate>;
|
|
@@ -51,8 +51,8 @@ export declare function getPurposeTable(options: C15TOptions, purposeFields?: Re
|
|
|
51
51
|
updatedAt: Date;
|
|
52
52
|
isEssential: boolean;
|
|
53
53
|
isActive: boolean;
|
|
54
|
-
dataCategory?: string | undefined;
|
|
55
|
-
legalBasis?: string | undefined;
|
|
54
|
+
dataCategory?: string | null | undefined;
|
|
55
|
+
legalBasis?: string | null | undefined;
|
|
56
56
|
}, {
|
|
57
57
|
code: string;
|
|
58
58
|
name: string;
|
|
@@ -61,8 +61,8 @@ export declare function getPurposeTable(options: C15TOptions, purposeFields?: Re
|
|
|
61
61
|
createdAt?: Date | undefined;
|
|
62
62
|
updatedAt?: Date | undefined;
|
|
63
63
|
isEssential?: boolean | undefined;
|
|
64
|
-
dataCategory?: string | undefined;
|
|
65
|
-
legalBasis?: string | undefined;
|
|
64
|
+
dataCategory?: string | null | undefined;
|
|
65
|
+
legalBasis?: string | null | undefined;
|
|
66
66
|
isActive?: boolean | undefined;
|
|
67
67
|
}>;
|
|
68
68
|
/**
|
|
@@ -106,8 +106,8 @@ export declare const createRegistry: (ctx: RegistryContext) => {
|
|
|
106
106
|
updatedAt: Date;
|
|
107
107
|
isEssential: boolean;
|
|
108
108
|
isActive: boolean;
|
|
109
|
-
dataCategory?: string | undefined;
|
|
110
|
-
legalBasis?: string | undefined;
|
|
109
|
+
dataCategory?: string | null | undefined;
|
|
110
|
+
legalBasis?: string | null | undefined;
|
|
111
111
|
}>;
|
|
112
112
|
findConsentPurposeByCode: (code: string) => Promise<{
|
|
113
113
|
code: string;
|
|
@@ -118,8 +118,8 @@ export declare const createRegistry: (ctx: RegistryContext) => {
|
|
|
118
118
|
updatedAt: Date;
|
|
119
119
|
isEssential: boolean;
|
|
120
120
|
isActive: boolean;
|
|
121
|
-
dataCategory?: string | undefined;
|
|
122
|
-
legalBasis?: string | undefined;
|
|
121
|
+
dataCategory?: string | null | undefined;
|
|
122
|
+
legalBasis?: string | null | undefined;
|
|
123
123
|
} | null>;
|
|
124
124
|
createDomain: (domain: Omit<import("./domain").Domain, "id" | "createdAt" | "updatedAt"> & Partial<import("./domain").Domain>, context?: import("../pkgs/types").GenericEndpointContext) => Promise<{
|
|
125
125
|
name: string;
|
|
@@ -106,8 +106,8 @@ export declare const getConsentTables: (options: C15TOptions) => {
|
|
|
106
106
|
name: import("zod").ZodString;
|
|
107
107
|
description: import("zod").ZodString;
|
|
108
108
|
isEssential: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
109
|
-
dataCategory: import("zod").ZodOptional<import("zod").ZodString
|
|
110
|
-
legalBasis: import("zod").ZodOptional<import("zod").ZodString
|
|
109
|
+
dataCategory: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
110
|
+
legalBasis: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
111
111
|
isActive: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
112
112
|
createdAt: import("zod").ZodDefault<import("zod").ZodDate>;
|
|
113
113
|
updatedAt: import("zod").ZodDefault<import("zod").ZodDate>;
|
|
@@ -120,8 +120,8 @@ export declare const getConsentTables: (options: C15TOptions) => {
|
|
|
120
120
|
updatedAt: Date;
|
|
121
121
|
isEssential: boolean;
|
|
122
122
|
isActive: boolean;
|
|
123
|
-
dataCategory?: string | undefined;
|
|
124
|
-
legalBasis?: string | undefined;
|
|
123
|
+
dataCategory?: string | null | undefined;
|
|
124
|
+
legalBasis?: string | null | undefined;
|
|
125
125
|
}, {
|
|
126
126
|
code: string;
|
|
127
127
|
name: string;
|
|
@@ -130,8 +130,8 @@ export declare const getConsentTables: (options: C15TOptions) => {
|
|
|
130
130
|
createdAt?: Date | undefined;
|
|
131
131
|
updatedAt?: Date | undefined;
|
|
132
132
|
isEssential?: boolean | undefined;
|
|
133
|
-
dataCategory?: string | undefined;
|
|
134
|
-
legalBasis?: string | undefined;
|
|
133
|
+
dataCategory?: string | null | undefined;
|
|
134
|
+
legalBasis?: string | null | undefined;
|
|
135
135
|
isActive?: boolean | undefined;
|
|
136
136
|
}>;
|
|
137
137
|
fields: {
|
package/dist/schema/index.cjs
CHANGED
|
@@ -534,8 +534,8 @@ const purposeSchema = external_zod_namespaceObject.z.object({
|
|
|
534
534
|
name: external_zod_namespaceObject.z.string(),
|
|
535
535
|
description: external_zod_namespaceObject.z.string(),
|
|
536
536
|
isEssential: external_zod_namespaceObject.z.boolean().default(false),
|
|
537
|
-
dataCategory: external_zod_namespaceObject.z.string().
|
|
538
|
-
legalBasis: external_zod_namespaceObject.z.string().
|
|
537
|
+
dataCategory: external_zod_namespaceObject.z.string().nullish(),
|
|
538
|
+
legalBasis: external_zod_namespaceObject.z.string().nullish(),
|
|
539
539
|
isActive: external_zod_namespaceObject.z.boolean().default(true),
|
|
540
540
|
createdAt: external_zod_namespaceObject.z.date().default(()=>new Date()),
|
|
541
541
|
updatedAt: external_zod_namespaceObject.z.date().default(()=>new Date())
|
package/dist/schema/index.js
CHANGED
|
@@ -474,8 +474,8 @@ const purposeSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
|
474
474
|
name: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
475
475
|
description: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
476
476
|
isEssential: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(false),
|
|
477
|
-
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
478
|
-
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().
|
|
477
|
+
dataCategory: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
478
|
+
legalBasis: __WEBPACK_EXTERNAL_MODULE_zod__.z.string().nullish(),
|
|
479
479
|
isActive: __WEBPACK_EXTERNAL_MODULE_zod__.z.boolean().default(true),
|
|
480
480
|
createdAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date()),
|
|
481
481
|
updatedAt: __WEBPACK_EXTERNAL_MODULE_zod__.z.date().default(()=>new Date())
|
package/dist/schema/schemas.d.ts
CHANGED
|
@@ -120,8 +120,8 @@ export declare const schemas: {
|
|
|
120
120
|
name: z.ZodString;
|
|
121
121
|
description: z.ZodString;
|
|
122
122
|
isEssential: z.ZodDefault<z.ZodBoolean>;
|
|
123
|
-
dataCategory: z.ZodOptional<z.ZodString
|
|
124
|
-
legalBasis: z.ZodOptional<z.ZodString
|
|
123
|
+
dataCategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
124
|
+
legalBasis: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
125
|
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
126
126
|
createdAt: z.ZodDefault<z.ZodDate>;
|
|
127
127
|
updatedAt: z.ZodDefault<z.ZodDate>;
|
|
@@ -134,8 +134,8 @@ export declare const schemas: {
|
|
|
134
134
|
updatedAt: Date;
|
|
135
135
|
isEssential: boolean;
|
|
136
136
|
isActive: boolean;
|
|
137
|
-
dataCategory?: string | undefined;
|
|
138
|
-
legalBasis?: string | undefined;
|
|
137
|
+
dataCategory?: string | null | undefined;
|
|
138
|
+
legalBasis?: string | null | undefined;
|
|
139
139
|
}, {
|
|
140
140
|
code: string;
|
|
141
141
|
name: string;
|
|
@@ -144,8 +144,8 @@ export declare const schemas: {
|
|
|
144
144
|
createdAt?: Date | undefined;
|
|
145
145
|
updatedAt?: Date | undefined;
|
|
146
146
|
isEssential?: boolean | undefined;
|
|
147
|
-
dataCategory?: string | undefined;
|
|
148
|
-
legalBasis?: string | undefined;
|
|
147
|
+
dataCategory?: string | null | undefined;
|
|
148
|
+
legalBasis?: string | null | undefined;
|
|
149
149
|
isActive?: boolean | undefined;
|
|
150
150
|
}>;
|
|
151
151
|
readonly consentRecord: z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/backend",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2-canary-20250514183211",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -99,7 +99,8 @@
|
|
|
99
99
|
"kysely": "^0.27.6",
|
|
100
100
|
"neverthrow": "^8.2.0",
|
|
101
101
|
"superjson": "^2.2.2",
|
|
102
|
-
"zod": "^3.24.2"
|
|
102
|
+
"zod": "^3.24.2",
|
|
103
|
+
"@c15t/translations": "1.2.2-canary-20250514183211"
|
|
103
104
|
},
|
|
104
105
|
"devDependencies": {
|
|
105
106
|
"@electric-sql/pglite": "0.2.17",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { baseTranslations } from '@c15t/translations';
|
|
1
2
|
import { describe, expect, it } from 'vitest';
|
|
2
3
|
|
|
3
4
|
// import { createContractTests } from '~/testing/contract-testing';
|
|
@@ -34,6 +35,10 @@ describe('Show Consent Banner Contract Custom Tests', () => {
|
|
|
34
35
|
countryCode: 'DE',
|
|
35
36
|
regionCode: null,
|
|
36
37
|
},
|
|
38
|
+
translations: {
|
|
39
|
+
translations: baseTranslations.en,
|
|
40
|
+
language: 'en',
|
|
41
|
+
},
|
|
37
42
|
};
|
|
38
43
|
|
|
39
44
|
const result = validateOutput(validOutput);
|
|
@@ -75,6 +80,10 @@ describe('Show Consent Banner Contract Custom Tests', () => {
|
|
|
75
80
|
countryCode: 'US',
|
|
76
81
|
regionCode: null,
|
|
77
82
|
},
|
|
83
|
+
translations: {
|
|
84
|
+
translations: baseTranslations.en,
|
|
85
|
+
language: 'en',
|
|
86
|
+
},
|
|
78
87
|
};
|
|
79
88
|
|
|
80
89
|
const result = validateOutput(output);
|
|
@@ -93,6 +102,10 @@ describe('Show Consent Banner Contract Custom Tests', () => {
|
|
|
93
102
|
countryCode: 'US',
|
|
94
103
|
regionCode: null,
|
|
95
104
|
},
|
|
105
|
+
translations: {
|
|
106
|
+
translations: baseTranslations.en,
|
|
107
|
+
language: 'en',
|
|
108
|
+
},
|
|
96
109
|
};
|
|
97
110
|
|
|
98
111
|
const result = validateOutput(output);
|
|
@@ -112,6 +125,10 @@ describe('Show Consent Banner Contract Custom Tests', () => {
|
|
|
112
125
|
countryCode: null,
|
|
113
126
|
regionCode: null,
|
|
114
127
|
},
|
|
128
|
+
translations: {
|
|
129
|
+
translations: baseTranslations.en,
|
|
130
|
+
language: 'en',
|
|
131
|
+
},
|
|
115
132
|
};
|
|
116
133
|
|
|
117
134
|
const result = validateOutput(output);
|
|
@@ -129,6 +146,10 @@ describe('Show Consent Banner Contract Custom Tests', () => {
|
|
|
129
146
|
countryCode: 'DE',
|
|
130
147
|
regionCode: 'BY',
|
|
131
148
|
},
|
|
149
|
+
translations: {
|
|
150
|
+
translations: baseTranslations.en,
|
|
151
|
+
language: 'en',
|
|
152
|
+
},
|
|
132
153
|
};
|
|
133
154
|
|
|
134
155
|
const result = validateOutput(output);
|
|
@@ -146,6 +167,10 @@ describe('Show Consent Banner Contract Custom Tests', () => {
|
|
|
146
167
|
countryCode: 123, // Invalid type
|
|
147
168
|
regionCode: null,
|
|
148
169
|
},
|
|
170
|
+
translations: {
|
|
171
|
+
translations: baseTranslations.en,
|
|
172
|
+
language: 'en',
|
|
173
|
+
},
|
|
149
174
|
};
|
|
150
175
|
|
|
151
176
|
// Need to use type assertion to bypass TypeScript
|
|
@@ -166,6 +191,10 @@ describe('Show Consent Banner Contract Custom Tests', () => {
|
|
|
166
191
|
countryCode: 'DE',
|
|
167
192
|
regionCode: null,
|
|
168
193
|
},
|
|
194
|
+
translations: {
|
|
195
|
+
translations: baseTranslations.en,
|
|
196
|
+
language: 'en',
|
|
197
|
+
},
|
|
169
198
|
};
|
|
170
199
|
|
|
171
200
|
const falseOutput = {
|
|
@@ -178,6 +207,10 @@ describe('Show Consent Banner Contract Custom Tests', () => {
|
|
|
178
207
|
countryCode: 'US',
|
|
179
208
|
regionCode: null,
|
|
180
209
|
},
|
|
210
|
+
translations: {
|
|
211
|
+
translations: baseTranslations.en,
|
|
212
|
+
language: 'en',
|
|
213
|
+
},
|
|
181
214
|
};
|
|
182
215
|
|
|
183
216
|
expect(validateOutput(trueOutput)?.success).toBe(true);
|
|
@@ -195,6 +228,10 @@ describe('Show Consent Banner Contract Custom Tests', () => {
|
|
|
195
228
|
countryCode: 'DE',
|
|
196
229
|
regionCode: null,
|
|
197
230
|
},
|
|
231
|
+
translations: {
|
|
232
|
+
translations: baseTranslations.en,
|
|
233
|
+
language: 'en',
|
|
234
|
+
},
|
|
198
235
|
};
|
|
199
236
|
|
|
200
237
|
// Need to use type assertion to bypass TypeScript
|
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
import { oc } from '@orpc/contract';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
|
|
4
3
|
import { JurisdictionInfoSchema } from '../shared/jurisdiction.schema';
|
|
5
4
|
|
|
5
|
+
const TitleDescriptionSchema = z.object({
|
|
6
|
+
title: z.string(),
|
|
7
|
+
description: z.string(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const TranslationsSchema = z.object({
|
|
11
|
+
common: z.object({
|
|
12
|
+
acceptAll: z.string(),
|
|
13
|
+
rejectAll: z.string(),
|
|
14
|
+
customize: z.string(),
|
|
15
|
+
save: z.string(),
|
|
16
|
+
}),
|
|
17
|
+
cookieBanner: TitleDescriptionSchema,
|
|
18
|
+
consentManagerDialog: TitleDescriptionSchema,
|
|
19
|
+
consentTypes: z.object({
|
|
20
|
+
experience: TitleDescriptionSchema,
|
|
21
|
+
functionality: TitleDescriptionSchema,
|
|
22
|
+
marketing: TitleDescriptionSchema,
|
|
23
|
+
measurement: TitleDescriptionSchema,
|
|
24
|
+
necessary: TitleDescriptionSchema,
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
|
|
6
28
|
export const showConsentBannerContract = oc
|
|
7
29
|
.route({
|
|
8
30
|
method: 'GET',
|
|
@@ -41,5 +63,9 @@ Use this endpoint to implement geo-targeted consent banners and ensure complianc
|
|
|
41
63
|
countryCode: z.string().nullable(),
|
|
42
64
|
regionCode: z.string().nullable(),
|
|
43
65
|
}),
|
|
66
|
+
translations: z.object({
|
|
67
|
+
language: z.string(),
|
|
68
|
+
translations: TranslationsSchema,
|
|
69
|
+
}),
|
|
44
70
|
})
|
|
45
71
|
);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { baseTranslations } from '@c15t/translations';
|
|
1
2
|
import { describe, expect, it, vi } from 'vitest';
|
|
2
3
|
import { JurisdictionMessages } from '~/contracts/shared/jurisdiction.schema';
|
|
3
4
|
import { showConsentBanner } from './show-banner.handler';
|
|
@@ -125,6 +126,47 @@ describe('Show Consent Banner Handler', () => {
|
|
|
125
126
|
});
|
|
126
127
|
});
|
|
127
128
|
|
|
129
|
+
describe('Translation handling', () => {
|
|
130
|
+
it('returns default translations when no language is detected', async () => {
|
|
131
|
+
//@ts-expect-error
|
|
132
|
+
const result = await showConsentBanner(
|
|
133
|
+
createMockContext({ 'cf-ipcountry': 'DE' })
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
expect(result.translations).toEqual({
|
|
137
|
+
translations: baseTranslations.en,
|
|
138
|
+
language: 'en',
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it('returns translations for detected language', async () => {
|
|
143
|
+
//@ts-expect-error
|
|
144
|
+
const result = await showConsentBanner(
|
|
145
|
+
createMockContext({ 'cf-ipcountry': 'DE', 'accept-language': 'de-DE' })
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
expect(result.translations).toEqual({
|
|
149
|
+
translations: baseTranslations.de,
|
|
150
|
+
language: 'de',
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it('returns default translations when language is not supported', async () => {
|
|
155
|
+
//@ts-expect-error
|
|
156
|
+
const result = await showConsentBanner(
|
|
157
|
+
createMockContext({
|
|
158
|
+
'cf-ipcountry': 'DE',
|
|
159
|
+
'accept-language': 'foobar',
|
|
160
|
+
})
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
expect(result.translations).toEqual({
|
|
164
|
+
translations: baseTranslations.en,
|
|
165
|
+
language: 'en',
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
|
|
128
170
|
describe('Response format', () => {
|
|
129
171
|
it('returns properly structured response', async () => {
|
|
130
172
|
//@ts-expect-error
|
|
@@ -142,6 +184,10 @@ describe('Show Consent Banner Handler', () => {
|
|
|
142
184
|
countryCode: 'DE',
|
|
143
185
|
regionCode: null,
|
|
144
186
|
},
|
|
187
|
+
translations: {
|
|
188
|
+
translations: baseTranslations.en,
|
|
189
|
+
language: 'en',
|
|
190
|
+
},
|
|
145
191
|
});
|
|
146
192
|
});
|
|
147
193
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { baseTranslations } from '@c15t/translations';
|
|
1
2
|
import { ORPCError } from '@orpc/server';
|
|
2
3
|
import { os } from '~/contracts';
|
|
3
4
|
import {
|
|
@@ -6,6 +7,34 @@ import {
|
|
|
6
7
|
} from '~/contracts/shared/jurisdiction.schema';
|
|
7
8
|
import type { C15TContext } from '~/types';
|
|
8
9
|
|
|
10
|
+
type SupportedLanguage = keyof typeof baseTranslations;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Extracts the preferred language from Accept-Language header
|
|
14
|
+
* Falls back to 'en' if no supported language is found
|
|
15
|
+
*/
|
|
16
|
+
function getPreferredLanguage(
|
|
17
|
+
acceptLanguage: string | null
|
|
18
|
+
): SupportedLanguage {
|
|
19
|
+
if (!acceptLanguage) {
|
|
20
|
+
return 'en';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Get the primary language code
|
|
24
|
+
const primaryLang = acceptLanguage
|
|
25
|
+
.split(',')[0]
|
|
26
|
+
?.split(';')[0]
|
|
27
|
+
?.split('-')[0]
|
|
28
|
+
?.toLowerCase();
|
|
29
|
+
|
|
30
|
+
// Check if it's a supported language
|
|
31
|
+
if (primaryLang && primaryLang in baseTranslations) {
|
|
32
|
+
return primaryLang as SupportedLanguage;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return 'en';
|
|
36
|
+
}
|
|
37
|
+
|
|
9
38
|
/**
|
|
10
39
|
* Handler for the show consent banner endpoint
|
|
11
40
|
* Determines if a user should see a consent banner based on their location
|
|
@@ -45,13 +74,15 @@ export const showConsentBanner = os.consent.showBanner.handler(
|
|
|
45
74
|
normalizeHeader(headers.get('x-vercel-ip-country-region')) ??
|
|
46
75
|
normalizeHeader(headers.get('x-region-code'));
|
|
47
76
|
|
|
48
|
-
//
|
|
77
|
+
// Get preferred language from Accept-Language header
|
|
78
|
+
const acceptLanguage = normalizeHeader(headers.get('accept-language'));
|
|
79
|
+
const preferredLanguage = getPreferredLanguage(acceptLanguage);
|
|
49
80
|
|
|
50
81
|
// Determine jurisdiction based on country
|
|
51
82
|
const { showConsentBanner, jurisdictionCode, message } =
|
|
52
83
|
checkJurisdiction(countryCode);
|
|
53
84
|
|
|
54
|
-
// Return properly structured response
|
|
85
|
+
// Return properly structured response with translations
|
|
55
86
|
return {
|
|
56
87
|
showConsentBanner,
|
|
57
88
|
jurisdiction: {
|
|
@@ -59,6 +90,10 @@ export const showConsentBanner = os.consent.showBanner.handler(
|
|
|
59
90
|
message,
|
|
60
91
|
},
|
|
61
92
|
location: { countryCode, regionCode },
|
|
93
|
+
translations: {
|
|
94
|
+
translations: baseTranslations[preferredLanguage],
|
|
95
|
+
language: preferredLanguage,
|
|
96
|
+
},
|
|
62
97
|
};
|
|
63
98
|
}
|
|
64
99
|
);
|
|
@@ -41,8 +41,8 @@ export const purposeSchema = z.object({
|
|
|
41
41
|
name: z.string(),
|
|
42
42
|
description: z.string(),
|
|
43
43
|
isEssential: z.boolean().default(false),
|
|
44
|
-
dataCategory: z.string().
|
|
45
|
-
legalBasis: z.string().
|
|
44
|
+
dataCategory: z.string().nullish(),
|
|
45
|
+
legalBasis: z.string().nullish(),
|
|
46
46
|
isActive: z.boolean().default(true),
|
|
47
47
|
createdAt: z.date().default(() => new Date()),
|
|
48
48
|
updatedAt: z.date().default(() => new Date()),
|