@c15t/backend 2.0.0-rc.5 → 2.0.0-rc.6

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.
Files changed (47) hide show
  1. package/dist/302.js +473 -0
  2. package/dist/364.js +1140 -0
  3. package/dist/583.js +540 -0
  4. package/dist/cache.cjs +1 -1
  5. package/dist/cache.js +4 -415
  6. package/dist/core.cjs +21 -24
  7. package/dist/core.js +18 -2420
  8. package/dist/db/adapters/drizzle.cjs +1 -1
  9. package/dist/db/adapters/drizzle.js +1 -2
  10. package/dist/db/adapters/kysely.cjs +1 -1
  11. package/dist/db/adapters/kysely.js +1 -2
  12. package/dist/db/adapters/mongo.cjs +1 -1
  13. package/dist/db/adapters/mongo.js +1 -2
  14. package/dist/db/adapters/prisma.cjs +1 -1
  15. package/dist/db/adapters/prisma.js +1 -2
  16. package/dist/db/adapters/typeorm.cjs +1 -1
  17. package/dist/db/adapters/typeorm.js +1 -2
  18. package/dist/db/adapters.cjs +1 -1
  19. package/dist/db/migrator.cjs +1 -1
  20. package/dist/db/schema.cjs +1 -1
  21. package/dist/db/schema.js +1 -1
  22. package/dist/define-config.cjs +1 -1
  23. package/dist/edge.cjs +1 -1
  24. package/dist/edge.js +3 -882
  25. package/dist/router.cjs +17 -18
  26. package/dist/router.js +1 -2058
  27. package/dist/types/index.cjs +1 -1
  28. package/dist-types/cache/gvl-resolver.d.ts +1 -1
  29. package/dist-types/db/registry/runtime-policy-decision.d.ts +1 -1
  30. package/dist-types/db/schema/1.0.0/consent.d.ts +1 -1
  31. package/dist-types/db/schema/2.0.0/audit-log.d.ts +1 -1
  32. package/dist-types/db/schema/2.0.0/consent-policy.d.ts +1 -1
  33. package/dist-types/db/schema/2.0.0/consent-purpose.d.ts +1 -1
  34. package/dist-types/db/schema/2.0.0/consent.d.ts +1 -1
  35. package/dist-types/db/schema/2.0.0/domain.d.ts +1 -1
  36. package/dist-types/db/schema/2.0.0/runtime-policy-decision.d.ts +1 -1
  37. package/dist-types/db/schema/2.0.0/subject.d.ts +1 -1
  38. package/dist-types/handlers/init/index.d.ts +1 -1
  39. package/dist-types/handlers/init/policy.d.ts +1 -1
  40. package/dist-types/handlers/init/resolve-init.d.ts +1 -1
  41. package/dist-types/handlers/policy/snapshot.d.ts +1 -1
  42. package/dist-types/policies/defaults.d.ts +1 -1
  43. package/dist-types/policies/matchers.d.ts +2 -2
  44. package/dist-types/types/index.d.ts +2 -2
  45. package/dist-types/version.d.ts +1 -1
  46. package/docs/guides/policy-packs.md +1 -1
  47. package/package.json +15 -15
@@ -13,7 +13,7 @@ var __webpack_require__ = {};
13
13
  })();
14
14
  (()=>{
15
15
  __webpack_require__.r = (exports1)=>{
16
- if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
17
  value: 'Module'
18
18
  });
19
19
  Object.defineProperty(exports1, '__esModule', {
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * @packageDocumentation
11
11
  */
12
- import type { GlobalVendorList } from '../../../schema/dist-types/types.d';
12
+ import type { GlobalVendorList } from '../../../schema/dist-types/types';
13
13
  import type { CacheAdapter } from './types';
14
14
  /**
15
15
  * Options for creating a GVL resolver.
@@ -2,7 +2,7 @@ import type { PolicyModel } from '../../types';
2
2
  import type { Registry } from './types';
3
3
  interface RuntimePolicyDecisionUiSurface {
4
4
  allowedActions?: Array<'accept' | 'reject' | 'customize'>;
5
- primaryAction?: 'accept' | 'reject' | 'customize';
5
+ primaryActions?: Array<'accept' | 'reject' | 'customize'>;
6
6
  layout?: Array<'accept' | 'reject' | 'customize' | Array<'accept' | 'reject' | 'customize'>>;
7
7
  direction?: 'row' | 'column';
8
8
  uiProfile?: 'balanced' | 'compact' | 'strict';
@@ -14,4 +14,4 @@ export declare const consentTable: import("fumadb/schema").Table<{
14
14
  validUntil: import("fumadb/schema").Column<"timestamp", Date | null, Date | null>;
15
15
  isActive: import("fumadb/schema").Column<"bool", boolean | null, boolean>;
16
16
  }, {}>;
17
- export { consentSchema, type Consent };
17
+ export { type Consent, consentSchema };
@@ -12,4 +12,4 @@ export declare const auditLogTable: import("fumadb/schema").Table<{
12
12
  createdAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
13
13
  tenantId: import("fumadb/schema").Column<"string", string | null, string | null>;
14
14
  }, {}>;
15
- export { auditLogSchema, type AuditLog };
15
+ export { type AuditLog, auditLogSchema };
@@ -8,5 +8,5 @@ export declare const consentPolicyTable: import("fumadb/schema").Table<{
8
8
  createdAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
9
9
  tenantId: import("fumadb/schema").Column<"string", string | null, string | null>;
10
10
  }, {}>;
11
- export { consentPolicySchema, policyTypeSchema, type ConsentPolicy, type PolicyType, };
11
+ export { type ConsentPolicy, consentPolicySchema, type PolicyType, policyTypeSchema, };
12
12
  export declare const PolicyTypeSchema: import("valibot").PicklistSchema<["cookie_banner", "privacy_policy", "dpa", "terms_and_conditions", "marketing_communications", "age_verification", "other"], undefined>;
@@ -6,4 +6,4 @@ export declare const consentPurposeTable: import("fumadb/schema").Table<{
6
6
  updatedAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
7
7
  tenantId: import("fumadb/schema").Column<"string", string | null, string | null>;
8
8
  }, {}>;
9
- export { consentPurposeSchema, type ConsentPurpose };
9
+ export { type ConsentPurpose, consentPurposeSchema };
@@ -26,4 +26,4 @@ export declare const consentTable: import("fumadb/schema").Table<{
26
26
  runtimePolicySource: import("fumadb/schema").Column<"string", string | null, string | null>;
27
27
  tenantId: import("fumadb/schema").Column<"string", string | null, string | null>;
28
28
  }, {}>;
29
- export { consentSchema, type Consent };
29
+ export { type Consent, consentSchema };
@@ -6,4 +6,4 @@ export declare const domainTable: import("fumadb/schema").Table<{
6
6
  updatedAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
7
7
  tenantId: import("fumadb/schema").Column<"string", string | null, string | null>;
8
8
  }, {}>;
9
- export { domainSchema, type Domain };
9
+ export { type Domain, domainSchema };
@@ -20,4 +20,4 @@ export declare const runtimePolicyDecisionTable: import("fumadb/schema").Table<{
20
20
  dedupeKey: import("fumadb/schema").Column<"string", string, string>;
21
21
  createdAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
22
22
  }, {}>;
23
- export { runtimePolicyDecisionSchema, type RuntimePolicyDecision };
23
+ export { type RuntimePolicyDecision, runtimePolicyDecisionSchema };
@@ -7,4 +7,4 @@ export declare const subjectTable: import("fumadb/schema").Table<{
7
7
  updatedAt: import("fumadb/schema").Column<"timestamp", Date | null, Date>;
8
8
  tenantId: import("fumadb/schema").Column<"string", string | null, string | null>;
9
9
  }, {}>;
10
- export { subjectSchema, type Subject };
10
+ export { type Subject, subjectSchema };
@@ -1,4 +1,4 @@
1
- import type { GlobalVendorList, NonIABVendor } from '../../../../schema/dist-types/types.d';
1
+ import type { GlobalVendorList, NonIABVendor } from '../../../../schema/dist-types/types';
2
2
  import type { Translations } from '../../../../translations/dist-types/index.d.ts';
3
3
  import type { Branding } from '../../types';
4
4
  import type { JurisdictionCode } from '../../types/api';
@@ -1,4 +1,4 @@
1
- import type { PolicyMatchedBy, PolicyValidationResult, ResolvedPolicyDecision as SharedResolvedPolicyDecision, ResolvedPolicyMatch as SharedResolvedPolicyMatch, ResolvedPolicy as SharedResolvedRuntimePolicy } from '../../../../schema/dist-types/types.d';
1
+ import type { PolicyMatchedBy, PolicyValidationResult, ResolvedPolicyDecision as SharedResolvedPolicyDecision, ResolvedPolicyMatch as SharedResolvedPolicyMatch, ResolvedPolicy as SharedResolvedRuntimePolicy } from '../../../../schema/dist-types/types';
2
2
  import type { JurisdictionCode as BackendJurisdictionCode } from '../../types';
3
3
  export type { PolicyMatchedBy, PolicyValidationResult };
4
4
  export type ResolvedRuntimePolicy = SharedResolvedRuntimePolicy;
@@ -4,7 +4,7 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
  import type { Logger } from '../../../../logger/dist-types/index.d.ts';
7
- import type { ResolvedPolicy } from '../../../../schema/dist-types/types.d';
7
+ import type { ResolvedPolicy } from '../../../../schema/dist-types/types';
8
8
  import type { C15TEdgeOptions } from '../../edge/types';
9
9
  /**
10
10
  * Subset of C15TOptions needed by the init resolver.
@@ -11,7 +11,7 @@ export type PolicySnapshotVerificationResult = {
11
11
  };
12
12
  export interface PolicySnapshotUiSurface {
13
13
  allowedActions?: PolicyUiSurfaceConfig['allowedActions'];
14
- primaryAction?: PolicyUiSurfaceConfig['primaryAction'];
14
+ primaryActions?: PolicyUiSurfaceConfig['primaryActions'];
15
15
  layout?: PolicyUiSurfaceConfig['layout'];
16
16
  direction?: PolicyUiSurfaceConfig['direction'];
17
17
  uiProfile?: PolicyUiSurfaceConfig['uiProfile'];
@@ -1,2 +1,2 @@
1
1
  export { policyPackPresets } from '../../../schema/dist-types/index.d.ts';
2
- export type { EuropePolicyMode, PolicyPackPresets } from '../../../schema/dist-types/types.d';
2
+ export type { EuropePolicyMode, PolicyPackPresets } from '../../../schema/dist-types/types';
@@ -1,3 +1,3 @@
1
- import type { PolicyMatch } from '../../../schema/dist-types/types.d';
2
- export { EEA_COUNTRY_CODES, EU_COUNTRY_CODES, POLICY_MATCH_DATASET_VERSION, policyMatchers, UK_COUNTRY_CODES, } from '../../../schema/dist-types/types.d';
1
+ import type { PolicyMatch } from '../../../schema/dist-types/types';
2
+ export { EEA_COUNTRY_CODES, EU_COUNTRY_CODES, POLICY_MATCH_DATASET_VERSION, policyMatchers, UK_COUNTRY_CODES, } from '../../../schema/dist-types/types';
3
3
  export type { PolicyMatch };
@@ -1,5 +1,5 @@
1
1
  import type { createLogger, LoggerOptions } from '../../../logger/dist-types/index.d.ts';
2
- import { type Branding, type GlobalVendorList, type NonIABVendor, type PolicyConfig } from '../../../schema/dist-types/types.d';
2
+ import { type Branding, type GlobalVendorList, type NonIABVendor, type PolicyConfig } from '../../../schema/dist-types/types';
3
3
  import type { Translations } from '../../../translations/dist-types/index.d.ts';
4
4
  import type { Meter, Tracer } from '@opentelemetry/api';
5
5
  import type { FumaDB, InferFumaDB } from 'fumadb';
@@ -244,7 +244,7 @@ export interface I18nOptions {
244
244
  */
245
245
  defaultProfile?: string;
246
246
  }
247
- export type { PolicyConfig, PolicyModel, PolicyPack, PolicyScopeMode, PolicyUiAction, PolicyUiActionDirection, PolicyUiActionGroup, PolicyUiMode, PolicyUiProfile, PolicyUiSurfaceConfig, } from '../../../schema/dist-types/types.d';
247
+ export type { PolicyConfig, PolicyModel, PolicyPack, PolicyScopeMode, PolicyUiAction, PolicyUiActionDirection, PolicyUiActionGroup, PolicyUiMode, PolicyUiProfile, PolicyUiSurfaceConfig, } from '../../../schema/dist-types/types';
248
248
  export interface PolicySnapshotOptions {
249
249
  /**
250
250
  * Secret used for signing and verifying policy snapshot tokens.
@@ -1 +1 @@
1
- export declare const version = "2.0.0-rc.5";
1
+ export declare const version = "2.0.0-rc.6";
@@ -58,7 +58,7 @@ export const c15t = c15tInstance({
58
58
  uiMode: 'banner',
59
59
  banner: {
60
60
  allowedActions: ['accept', 'reject', 'customize'],
61
- primaryAction: 'customize',
61
+ primaryActions: ['accept', 'customize'],
62
62
  uiProfile: 'compact',
63
63
  },
64
64
  dialog: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c15t/backend",
3
- "version": "2.0.0-rc.5",
3
+ "version": "2.0.0-rc.6",
4
4
  "description": "Consent policy engine and API for c15t. Powers the cookie banner, consent manager, and preferences centre. Webhooks, audit logs, storage adapters. Self host or use consent.io",
5
5
  "keywords": [
6
6
  "consent",
@@ -124,30 +124,30 @@
124
124
  },
125
125
  "dependencies": {
126
126
  "@c15t/logger": "1.0.2-rc.0",
127
- "@c15t/schema": "2.0.0-rc.3",
127
+ "@c15t/schema": "2.0.0-rc.4",
128
128
  "@c15t/translations": "2.0.0-rc.5",
129
129
  "@hono/standard-validator": "^0.2.2",
130
130
  "@hono/valibot-validator": "0.6.1",
131
- "@opentelemetry/api": "1.9.0",
132
- "@orpc/server": "^1.13.4",
133
- "@scalar/hono-api-reference": "0.5.175",
134
- "@valibot/to-json-schema": "1.0.0",
131
+ "@opentelemetry/api": "1.9.1",
132
+ "@orpc/server": "^1.13.13",
133
+ "@scalar/hono-api-reference": "0.10.5",
134
+ "@valibot/to-json-schema": "1.6.0",
135
135
  "base-x": "5.0.1",
136
136
  "defu": "6.1.4",
137
- "fumadb": "0.2.1",
138
- "hono": "4.11.7",
139
- "hono-openapi": "1.2.0",
140
- "jose": "6.2.1",
141
- "valibot": "1.2.0"
137
+ "fumadb": "0.2.2",
138
+ "hono": "4.12.9",
139
+ "hono-openapi": "1.3.0",
140
+ "jose": "6.2.2",
141
+ "valibot": "1.3.1"
142
142
  },
143
143
  "devDependencies": {
144
144
  "@c15t/typescript-config": "0.0.1-beta.1",
145
145
  "@c15t/vitest-config": "1.0.0",
146
- "@opentelemetry/sdk-trace-base": "^1.30.0",
147
- "@types/node": "24.10.1",
148
- "@upstash/redis": "^1.0.0",
146
+ "@opentelemetry/sdk-trace-base": "^2.6.1",
147
+ "@types/node": "25.5.0",
148
+ "@upstash/redis": "^1.37.0",
149
149
  "genversion": "3.2.0",
150
- "typescript": "5.9.3"
150
+ "typescript": "6.0.2"
151
151
  },
152
152
  "peerDependencies": {
153
153
  "@upstash/redis": ">=1.0.0"