@tantainnovative/ndpr-toolkit 5.5.1 → 5.7.0
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/CHANGELOG.md +28 -0
- package/README.md +36 -0
- package/dist/{chunk-C77CRJLD.mjs → chunk-2T5MY2Q6.mjs} +1 -1
- package/dist/chunk-7PV64WEZ.js +1 -0
- package/dist/{chunk-VTBHDHYK.js → chunk-NTEYQLYM.js} +1 -1
- package/dist/chunk-PEUAA5EC.js +1 -0
- package/dist/chunk-PYSYBUIV.mjs +1 -0
- package/dist/chunk-QNXLY5EJ.mjs +1 -0
- package/dist/chunk-YMKN3YQL.js +1 -0
- package/dist/chunk-ZY4RCV5C.mjs +1 -0
- package/dist/consent.d.mts +114 -0
- package/dist/consent.d.ts +114 -0
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/core.d.mts +88 -0
- package/dist/core.d.ts +88 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/headless.d.mts +163 -0
- package/dist/headless.d.ts +163 -0
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/hooks.d.mts +90 -0
- package/dist/hooks.d.ts +90 -0
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +131 -0
- package/dist/index.d.ts +131 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/presets-consent.d.mts +2 -0
- package/dist/presets-consent.d.ts +2 -0
- package/dist/presets-consent.js +1 -1
- package/dist/presets-consent.mjs +1 -1
- package/dist/presets.d.mts +2 -0
- package/dist/presets.d.ts +2 -0
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/server.d.mts +88 -0
- package/dist/server.d.ts +88 -0
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/unstyled.d.mts +64 -0
- package/dist/unstyled.d.ts +64 -0
- package/dist/unstyled.js +1 -1
- package/dist/unstyled.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-HMKXK23C.mjs +0 -1
- package/dist/chunk-L2VO3MEJ.js +0 -1
- package/dist/chunk-PXUX4FYM.js +0 -1
- package/dist/chunk-YTU4FNM2.mjs +0 -1
- /package/dist/{chunk-YQTZWPOS.mjs → chunk-23CULZBM.mjs} +0 -0
- /package/dist/{chunk-OVW5ASY3.js → chunk-VKDW2IHV.js} +0 -0
package/dist/core.d.mts
CHANGED
|
@@ -615,6 +615,44 @@ export declare interface ConsentStorageOptions {
|
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
617
|
|
|
618
|
+
/** How a present cookie was classified. */
|
|
619
|
+
export declare type CookieMatchSource = 'declared' | 'known' | 'none';
|
|
620
|
+
|
|
621
|
+
export declare interface CookieScanOptions {
|
|
622
|
+
/**
|
|
623
|
+
* The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
|
|
624
|
+
* Defaults to `document.cookie` in the browser, or `''` on the server.
|
|
625
|
+
*/
|
|
626
|
+
cookieString?: string;
|
|
627
|
+
/** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
|
|
628
|
+
asOf?: number;
|
|
629
|
+
/** Extra known cookies, checked before the built-in registry (so they can override it). */
|
|
630
|
+
knownCookies?: DeclaredCookie[];
|
|
631
|
+
/** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
|
|
632
|
+
useKnownRegistry?: boolean;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
export declare interface CookieScanResult {
|
|
636
|
+
/** When the scan ran (epoch ms). */
|
|
637
|
+
scannedAt: number;
|
|
638
|
+
/** Number of cookies present. */
|
|
639
|
+
total: number;
|
|
640
|
+
/** Every present cookie, classified. */
|
|
641
|
+
cookies: ScannedCookie[];
|
|
642
|
+
/** Cookies that matched one of your declared cookies. */
|
|
643
|
+
declared: ScannedCookie[];
|
|
644
|
+
/** Cookies present but NOT in your declaration — the compliance gap. */
|
|
645
|
+
undeclared: ScannedCookie[];
|
|
646
|
+
/** Undeclared cookies the built-in registry could still identify. */
|
|
647
|
+
identified: ScannedCookie[];
|
|
648
|
+
/** Undeclared cookies that could not be identified at all. */
|
|
649
|
+
unknown: ScannedCookie[];
|
|
650
|
+
/** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
|
|
651
|
+
byCategory: Record<string, ScannedCookie[]>;
|
|
652
|
+
/** True when there are no undeclared cookies. */
|
|
653
|
+
complete: boolean;
|
|
654
|
+
}
|
|
655
|
+
|
|
618
656
|
/**
|
|
619
657
|
* Creates a new audit entry from consent settings. If `previousSettings` is
|
|
620
658
|
* provided, the action is automatically determined by comparing old and new
|
|
@@ -828,6 +866,30 @@ export declare interface DCPMIThresholds {
|
|
|
828
866
|
*/
|
|
829
867
|
export declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
|
|
830
868
|
|
|
869
|
+
/**
|
|
870
|
+
* Cookie scanner — audits the cookies actually present in the browser against
|
|
871
|
+
* the cookies you have declared, surfacing undeclared cookies that put you out
|
|
872
|
+
* of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
|
|
873
|
+
* specific, informed consent).
|
|
874
|
+
*
|
|
875
|
+
* Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
|
|
876
|
+
* `Cookie:` header on the server, a test fixture), or call it in the browser
|
|
877
|
+
* and it reads `document.cookie`. Safe to import from a server bundle.
|
|
878
|
+
*/
|
|
879
|
+
/** A cookie you declare against a consent category. */
|
|
880
|
+
export declare interface DeclaredCookie {
|
|
881
|
+
/** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
|
|
882
|
+
name: string | RegExp;
|
|
883
|
+
/** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
|
|
884
|
+
category: string;
|
|
885
|
+
/** Who sets the cookie (e.g. 'Google Analytics'). */
|
|
886
|
+
provider?: string;
|
|
887
|
+
/** What the cookie is used for — surfaced in your cookie policy. */
|
|
888
|
+
purpose?: string;
|
|
889
|
+
/** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
|
|
890
|
+
prefix?: boolean;
|
|
891
|
+
}
|
|
892
|
+
|
|
831
893
|
/** September 2025 GAID baseline annual fees (NGN). */
|
|
832
894
|
export declare const DEFAULT_DCPMI_FEES_NGN: DCPMIFees;
|
|
833
895
|
|
|
@@ -1323,6 +1385,14 @@ declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' | 'educa
|
|
|
1323
1385
|
*/
|
|
1324
1386
|
export declare function isNDPCApprovalRequired(mechanism: TransferMechanism): boolean;
|
|
1325
1387
|
|
|
1388
|
+
/**
|
|
1389
|
+
* Built-in registry of widely deployed third-party cookies, so an undeclared
|
|
1390
|
+
* cookie can often still be identified (provider + likely category). Override
|
|
1391
|
+
* or extend via {@link CookieScanOptions.knownCookies}; categories follow the
|
|
1392
|
+
* common necessary / functional / analytics / marketing taxonomy.
|
|
1393
|
+
*/
|
|
1394
|
+
export declare const KNOWN_COOKIES: DeclaredCookie[];
|
|
1395
|
+
|
|
1326
1396
|
/**
|
|
1327
1397
|
* Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
|
|
1328
1398
|
* Every processing activity must have a documented lawful basis
|
|
@@ -2330,6 +2400,24 @@ export declare function runNdprAudit(input: NdprAuditInput, options?: NdprAuditO
|
|
|
2330
2400
|
*/
|
|
2331
2401
|
export declare function sanitizeInput(input: string): string;
|
|
2332
2402
|
|
|
2403
|
+
/**
|
|
2404
|
+
* Scan the cookies present against your declared cookies and a registry of
|
|
2405
|
+
* well-known third-party cookies. Returns which cookies are declared, which are
|
|
2406
|
+
* undeclared (and whether they can still be identified), and a per-category view.
|
|
2407
|
+
*/
|
|
2408
|
+
export declare function scanCookies(declared?: DeclaredCookie[], options?: CookieScanOptions): CookieScanResult;
|
|
2409
|
+
|
|
2410
|
+
export declare interface ScannedCookie {
|
|
2411
|
+
/** The cookie name as found in the cookie string. */
|
|
2412
|
+
name: string;
|
|
2413
|
+
/** Resolved consent category, or `null` when it could not be classified. */
|
|
2414
|
+
category: string | null;
|
|
2415
|
+
/** Whether it matched your declaration, only the known registry, or nothing. */
|
|
2416
|
+
matchedBy: CookieMatchSource;
|
|
2417
|
+
provider?: string;
|
|
2418
|
+
purpose?: string;
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2333
2421
|
/**
|
|
2334
2422
|
* Additional conditions required for processing sensitive personal data
|
|
2335
2423
|
* per NDPA Section 30
|
package/dist/core.d.ts
CHANGED
|
@@ -615,6 +615,44 @@ export declare interface ConsentStorageOptions {
|
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
617
|
|
|
618
|
+
/** How a present cookie was classified. */
|
|
619
|
+
export declare type CookieMatchSource = 'declared' | 'known' | 'none';
|
|
620
|
+
|
|
621
|
+
export declare interface CookieScanOptions {
|
|
622
|
+
/**
|
|
623
|
+
* The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
|
|
624
|
+
* Defaults to `document.cookie` in the browser, or `''` on the server.
|
|
625
|
+
*/
|
|
626
|
+
cookieString?: string;
|
|
627
|
+
/** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
|
|
628
|
+
asOf?: number;
|
|
629
|
+
/** Extra known cookies, checked before the built-in registry (so they can override it). */
|
|
630
|
+
knownCookies?: DeclaredCookie[];
|
|
631
|
+
/** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
|
|
632
|
+
useKnownRegistry?: boolean;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
export declare interface CookieScanResult {
|
|
636
|
+
/** When the scan ran (epoch ms). */
|
|
637
|
+
scannedAt: number;
|
|
638
|
+
/** Number of cookies present. */
|
|
639
|
+
total: number;
|
|
640
|
+
/** Every present cookie, classified. */
|
|
641
|
+
cookies: ScannedCookie[];
|
|
642
|
+
/** Cookies that matched one of your declared cookies. */
|
|
643
|
+
declared: ScannedCookie[];
|
|
644
|
+
/** Cookies present but NOT in your declaration — the compliance gap. */
|
|
645
|
+
undeclared: ScannedCookie[];
|
|
646
|
+
/** Undeclared cookies the built-in registry could still identify. */
|
|
647
|
+
identified: ScannedCookie[];
|
|
648
|
+
/** Undeclared cookies that could not be identified at all. */
|
|
649
|
+
unknown: ScannedCookie[];
|
|
650
|
+
/** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
|
|
651
|
+
byCategory: Record<string, ScannedCookie[]>;
|
|
652
|
+
/** True when there are no undeclared cookies. */
|
|
653
|
+
complete: boolean;
|
|
654
|
+
}
|
|
655
|
+
|
|
618
656
|
/**
|
|
619
657
|
* Creates a new audit entry from consent settings. If `previousSettings` is
|
|
620
658
|
* provided, the action is automatically determined by comparing old and new
|
|
@@ -828,6 +866,30 @@ export declare interface DCPMIThresholds {
|
|
|
828
866
|
*/
|
|
829
867
|
export declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
|
|
830
868
|
|
|
869
|
+
/**
|
|
870
|
+
* Cookie scanner — audits the cookies actually present in the browser against
|
|
871
|
+
* the cookies you have declared, surfacing undeclared cookies that put you out
|
|
872
|
+
* of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
|
|
873
|
+
* specific, informed consent).
|
|
874
|
+
*
|
|
875
|
+
* Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
|
|
876
|
+
* `Cookie:` header on the server, a test fixture), or call it in the browser
|
|
877
|
+
* and it reads `document.cookie`. Safe to import from a server bundle.
|
|
878
|
+
*/
|
|
879
|
+
/** A cookie you declare against a consent category. */
|
|
880
|
+
export declare interface DeclaredCookie {
|
|
881
|
+
/** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
|
|
882
|
+
name: string | RegExp;
|
|
883
|
+
/** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
|
|
884
|
+
category: string;
|
|
885
|
+
/** Who sets the cookie (e.g. 'Google Analytics'). */
|
|
886
|
+
provider?: string;
|
|
887
|
+
/** What the cookie is used for — surfaced in your cookie policy. */
|
|
888
|
+
purpose?: string;
|
|
889
|
+
/** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
|
|
890
|
+
prefix?: boolean;
|
|
891
|
+
}
|
|
892
|
+
|
|
831
893
|
/** September 2025 GAID baseline annual fees (NGN). */
|
|
832
894
|
export declare const DEFAULT_DCPMI_FEES_NGN: DCPMIFees;
|
|
833
895
|
|
|
@@ -1323,6 +1385,14 @@ declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' | 'educa
|
|
|
1323
1385
|
*/
|
|
1324
1386
|
export declare function isNDPCApprovalRequired(mechanism: TransferMechanism): boolean;
|
|
1325
1387
|
|
|
1388
|
+
/**
|
|
1389
|
+
* Built-in registry of widely deployed third-party cookies, so an undeclared
|
|
1390
|
+
* cookie can often still be identified (provider + likely category). Override
|
|
1391
|
+
* or extend via {@link CookieScanOptions.knownCookies}; categories follow the
|
|
1392
|
+
* common necessary / functional / analytics / marketing taxonomy.
|
|
1393
|
+
*/
|
|
1394
|
+
export declare const KNOWN_COOKIES: DeclaredCookie[];
|
|
1395
|
+
|
|
1326
1396
|
/**
|
|
1327
1397
|
* Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
|
|
1328
1398
|
* Every processing activity must have a documented lawful basis
|
|
@@ -2330,6 +2400,24 @@ export declare function runNdprAudit(input: NdprAuditInput, options?: NdprAuditO
|
|
|
2330
2400
|
*/
|
|
2331
2401
|
export declare function sanitizeInput(input: string): string;
|
|
2332
2402
|
|
|
2403
|
+
/**
|
|
2404
|
+
* Scan the cookies present against your declared cookies and a registry of
|
|
2405
|
+
* well-known third-party cookies. Returns which cookies are declared, which are
|
|
2406
|
+
* undeclared (and whether they can still be identified), and a per-category view.
|
|
2407
|
+
*/
|
|
2408
|
+
export declare function scanCookies(declared?: DeclaredCookie[], options?: CookieScanOptions): CookieScanResult;
|
|
2409
|
+
|
|
2410
|
+
export declare interface ScannedCookie {
|
|
2411
|
+
/** The cookie name as found in the cookie string. */
|
|
2412
|
+
name: string;
|
|
2413
|
+
/** Resolved consent category, or `null` when it could not be classified. */
|
|
2414
|
+
category: string | null;
|
|
2415
|
+
/** Whether it matched your declaration, only the known registry, or nothing. */
|
|
2416
|
+
matchedBy: CookieMatchSource;
|
|
2417
|
+
provider?: string;
|
|
2418
|
+
purpose?: string;
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2333
2421
|
/**
|
|
2334
2422
|
* Additional conditions required for processing sensitive personal data
|
|
2335
2423
|
* per NDPA Section 30
|
package/dist/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkLP5KXMBY_js=require('./chunk-LP5KXMBY.js'),chunkNUOHT3LO_js=require('./chunk-NUOHT3LO.js'),chunkHCZDQWHY_js=require('./chunk-HCZDQWHY.js'),chunkVFRGCBJY_js=require('./chunk-VFRGCBJY.js'),chunk7TTXS7JX_js=require('./chunk-7TTXS7JX.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkY346CURW_js=require('./chunk-Y346CURW.js'),chunkD2ZKDQVL_js=require('./chunk-D2ZKDQVL.js'),chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js'),chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkDKLJ5DYN_js=require('./chunk-DKLJ5DYN.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkR2ZZMATR_js=require('./chunk-R2ZZMATR.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkI5ZDNSX5_js=require('./chunk-I5ZDNSX5.js'),chunk7563FVMY_js=require('./chunk-7563FVMY.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"arabicLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.e}});Object.defineProperty(exports,"frenchLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.f}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunkNUOHT3LO_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"formatNdprAuditReport",{enumerable:true,get:function(){return chunkHCZDQWHY_js.b}});Object.defineProperty(exports,"runNdprAudit",{enumerable:true,get:function(){return chunkHCZDQWHY_js.a}});Object.defineProperty(exports,"DEFAULT_DCPMI_FEES_NGN",{enumerable:true,get:function(){return chunkVFRGCBJY_js.b}});Object.defineProperty(exports,"DEFAULT_DCPMI_THRESHOLDS",{enumerable:true,get:function(){return chunkVFRGCBJY_js.a}});Object.defineProperty(exports,"classifyDCPMI",{enumerable:true,get:function(){return chunkVFRGCBJY_js.c}});Object.defineProperty(exports,"generateComplianceAuditReturn",{enumerable:true,get:function(){return chunkVFRGCBJY_js.d}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunk7TTXS7JX_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"assessBreachNotification",{enumerable:true,get:function(){return chunkY346CURW_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunk6LJHLE6G_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunk6LJHLE6G_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunk6LJHLE6G_js.f}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"validateConsentOptionsStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.b}});Object.defineProperty(exports,"validateConsentStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.a}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequestStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.b}});Object.defineProperty(exports,"validateDsrSubmissionStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"NDPRProvider",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.a}});Object.defineProperty(exports,"useNDPRConfig",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.b}});Object.defineProperty(exports,"useNDPRLocale",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.b}});
|
|
1
|
+
'use strict';var chunkLP5KXMBY_js=require('./chunk-LP5KXMBY.js'),chunkNUOHT3LO_js=require('./chunk-NUOHT3LO.js'),chunkHCZDQWHY_js=require('./chunk-HCZDQWHY.js'),chunkVFRGCBJY_js=require('./chunk-VFRGCBJY.js'),chunk7TTXS7JX_js=require('./chunk-7TTXS7JX.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkY346CURW_js=require('./chunk-Y346CURW.js'),chunkD2ZKDQVL_js=require('./chunk-D2ZKDQVL.js'),chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js'),chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkDKLJ5DYN_js=require('./chunk-DKLJ5DYN.js'),chunkPEUAA5EC_js=require('./chunk-PEUAA5EC.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkR2ZZMATR_js=require('./chunk-R2ZZMATR.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkI5ZDNSX5_js=require('./chunk-I5ZDNSX5.js'),chunk7563FVMY_js=require('./chunk-7563FVMY.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"arabicLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.e}});Object.defineProperty(exports,"frenchLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.f}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunkNUOHT3LO_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"formatNdprAuditReport",{enumerable:true,get:function(){return chunkHCZDQWHY_js.b}});Object.defineProperty(exports,"runNdprAudit",{enumerable:true,get:function(){return chunkHCZDQWHY_js.a}});Object.defineProperty(exports,"DEFAULT_DCPMI_FEES_NGN",{enumerable:true,get:function(){return chunkVFRGCBJY_js.b}});Object.defineProperty(exports,"DEFAULT_DCPMI_THRESHOLDS",{enumerable:true,get:function(){return chunkVFRGCBJY_js.a}});Object.defineProperty(exports,"classifyDCPMI",{enumerable:true,get:function(){return chunkVFRGCBJY_js.c}});Object.defineProperty(exports,"generateComplianceAuditReturn",{enumerable:true,get:function(){return chunkVFRGCBJY_js.d}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunk7TTXS7JX_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"assessBreachNotification",{enumerable:true,get:function(){return chunkY346CURW_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunk6LJHLE6G_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunk6LJHLE6G_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunk6LJHLE6G_js.f}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"validateConsentOptionsStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.b}});Object.defineProperty(exports,"validateConsentStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.a}});Object.defineProperty(exports,"KNOWN_COOKIES",{enumerable:true,get:function(){return chunkPEUAA5EC_js.a}});Object.defineProperty(exports,"scanCookies",{enumerable:true,get:function(){return chunkPEUAA5EC_js.b}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequestStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.b}});Object.defineProperty(exports,"validateDsrSubmissionStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"NDPRProvider",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.a}});Object.defineProperty(exports,"useNDPRConfig",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.b}});Object.defineProperty(exports,"useNDPRLocale",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.b}});
|
package/dist/core.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as arabicLocale,f as frenchLocale,c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-KUI5W44P.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-CWY2FMIC.mjs';export{b as formatNdprAuditReport,a as runNdprAudit}from'./chunk-ME77GU4Q.mjs';export{b as DEFAULT_DCPMI_FEES_NGN,a as DEFAULT_DCPMI_THRESHOLDS,c as classifyDCPMI,d as generateComplianceAuditReturn}from'./chunk-MGXWQW5I.mjs';export{a as getComplianceScore}from'./chunk-6A7M4CGJ.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{a as assessBreachNotification}from'./chunk-WJSUVPYX.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';export{c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{b as validateConsentOptionsStructured,a as validateConsentStructured}from'./chunk-R3ZKV2J7.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as NDPRProvider,b as useNDPRConfig,c as useNDPRLocale}from'./chunk-PHA3YMFO.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-5LJ652AH.mjs';import'./chunk-ZJYULEER.mjs';
|
|
1
|
+
export{e as arabicLocale,f as frenchLocale,c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-KUI5W44P.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-CWY2FMIC.mjs';export{b as formatNdprAuditReport,a as runNdprAudit}from'./chunk-ME77GU4Q.mjs';export{b as DEFAULT_DCPMI_FEES_NGN,a as DEFAULT_DCPMI_THRESHOLDS,c as classifyDCPMI,d as generateComplianceAuditReturn}from'./chunk-MGXWQW5I.mjs';export{a as getComplianceScore}from'./chunk-6A7M4CGJ.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{a as assessBreachNotification}from'./chunk-WJSUVPYX.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';export{c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{b as validateConsentOptionsStructured,a as validateConsentStructured}from'./chunk-R3ZKV2J7.mjs';export{a as KNOWN_COOKIES,b as scanCookies}from'./chunk-ZY4RCV5C.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as NDPRProvider,b as useNDPRConfig,c as useNDPRLocale}from'./chunk-PHA3YMFO.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-5LJ652AH.mjs';import'./chunk-ZJYULEER.mjs';
|
package/dist/headless.d.mts
CHANGED
|
@@ -794,6 +794,82 @@ export declare interface ConsentStorageOptions {
|
|
|
794
794
|
};
|
|
795
795
|
}
|
|
796
796
|
|
|
797
|
+
/** How a present cookie was classified. */
|
|
798
|
+
export declare type CookieMatchSource = 'declared' | 'known' | 'none';
|
|
799
|
+
|
|
800
|
+
/** How a present cookie was classified. */
|
|
801
|
+
declare type CookieMatchSource_2 = 'declared' | 'known' | 'none';
|
|
802
|
+
|
|
803
|
+
export declare interface CookieScanOptions {
|
|
804
|
+
/**
|
|
805
|
+
* The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
|
|
806
|
+
* Defaults to `document.cookie` in the browser, or `''` on the server.
|
|
807
|
+
*/
|
|
808
|
+
cookieString?: string;
|
|
809
|
+
/** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
|
|
810
|
+
asOf?: number;
|
|
811
|
+
/** Extra known cookies, checked before the built-in registry (so they can override it). */
|
|
812
|
+
knownCookies?: DeclaredCookie[];
|
|
813
|
+
/** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
|
|
814
|
+
useKnownRegistry?: boolean;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
declare interface CookieScanOptions_2 {
|
|
818
|
+
/**
|
|
819
|
+
* The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
|
|
820
|
+
* Defaults to `document.cookie` in the browser, or `''` on the server.
|
|
821
|
+
*/
|
|
822
|
+
cookieString?: string;
|
|
823
|
+
/** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
|
|
824
|
+
asOf?: number;
|
|
825
|
+
/** Extra known cookies, checked before the built-in registry (so they can override it). */
|
|
826
|
+
knownCookies?: DeclaredCookie_2[];
|
|
827
|
+
/** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
|
|
828
|
+
useKnownRegistry?: boolean;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
export declare interface CookieScanResult {
|
|
832
|
+
/** When the scan ran (epoch ms). */
|
|
833
|
+
scannedAt: number;
|
|
834
|
+
/** Number of cookies present. */
|
|
835
|
+
total: number;
|
|
836
|
+
/** Every present cookie, classified. */
|
|
837
|
+
cookies: ScannedCookie[];
|
|
838
|
+
/** Cookies that matched one of your declared cookies. */
|
|
839
|
+
declared: ScannedCookie[];
|
|
840
|
+
/** Cookies present but NOT in your declaration — the compliance gap. */
|
|
841
|
+
undeclared: ScannedCookie[];
|
|
842
|
+
/** Undeclared cookies the built-in registry could still identify. */
|
|
843
|
+
identified: ScannedCookie[];
|
|
844
|
+
/** Undeclared cookies that could not be identified at all. */
|
|
845
|
+
unknown: ScannedCookie[];
|
|
846
|
+
/** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
|
|
847
|
+
byCategory: Record<string, ScannedCookie[]>;
|
|
848
|
+
/** True when there are no undeclared cookies. */
|
|
849
|
+
complete: boolean;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
declare interface CookieScanResult_2 {
|
|
853
|
+
/** When the scan ran (epoch ms). */
|
|
854
|
+
scannedAt: number;
|
|
855
|
+
/** Number of cookies present. */
|
|
856
|
+
total: number;
|
|
857
|
+
/** Every present cookie, classified. */
|
|
858
|
+
cookies: ScannedCookie_2[];
|
|
859
|
+
/** Cookies that matched one of your declared cookies. */
|
|
860
|
+
declared: ScannedCookie_2[];
|
|
861
|
+
/** Cookies present but NOT in your declaration — the compliance gap. */
|
|
862
|
+
undeclared: ScannedCookie_2[];
|
|
863
|
+
/** Undeclared cookies the built-in registry could still identify. */
|
|
864
|
+
identified: ScannedCookie_2[];
|
|
865
|
+
/** Undeclared cookies that could not be identified at all. */
|
|
866
|
+
unknown: ScannedCookie_2[];
|
|
867
|
+
/** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
|
|
868
|
+
byCategory: Record<string, ScannedCookie_2[]>;
|
|
869
|
+
/** True when there are no undeclared cookies. */
|
|
870
|
+
complete: boolean;
|
|
871
|
+
}
|
|
872
|
+
|
|
797
873
|
/**
|
|
798
874
|
* Summary of cross-border transfer compliance
|
|
799
875
|
*/
|
|
@@ -1061,6 +1137,54 @@ declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
|
|
|
1061
1137
|
*/
|
|
1062
1138
|
declare type DCPMITier_2 = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
|
|
1063
1139
|
|
|
1140
|
+
/**
|
|
1141
|
+
* Cookie scanner — audits the cookies actually present in the browser against
|
|
1142
|
+
* the cookies you have declared, surfacing undeclared cookies that put you out
|
|
1143
|
+
* of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
|
|
1144
|
+
* specific, informed consent).
|
|
1145
|
+
*
|
|
1146
|
+
* Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
|
|
1147
|
+
* `Cookie:` header on the server, a test fixture), or call it in the browser
|
|
1148
|
+
* and it reads `document.cookie`. Safe to import from a server bundle.
|
|
1149
|
+
*/
|
|
1150
|
+
/** A cookie you declare against a consent category. */
|
|
1151
|
+
export declare interface DeclaredCookie {
|
|
1152
|
+
/** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
|
|
1153
|
+
name: string | RegExp;
|
|
1154
|
+
/** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
|
|
1155
|
+
category: string;
|
|
1156
|
+
/** Who sets the cookie (e.g. 'Google Analytics'). */
|
|
1157
|
+
provider?: string;
|
|
1158
|
+
/** What the cookie is used for — surfaced in your cookie policy. */
|
|
1159
|
+
purpose?: string;
|
|
1160
|
+
/** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
|
|
1161
|
+
prefix?: boolean;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* Cookie scanner — audits the cookies actually present in the browser against
|
|
1166
|
+
* the cookies you have declared, surfacing undeclared cookies that put you out
|
|
1167
|
+
* of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
|
|
1168
|
+
* specific, informed consent).
|
|
1169
|
+
*
|
|
1170
|
+
* Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
|
|
1171
|
+
* `Cookie:` header on the server, a test fixture), or call it in the browser
|
|
1172
|
+
* and it reads `document.cookie`. Safe to import from a server bundle.
|
|
1173
|
+
*/
|
|
1174
|
+
/** A cookie you declare against a consent category. */
|
|
1175
|
+
declare interface DeclaredCookie_2 {
|
|
1176
|
+
/** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
|
|
1177
|
+
name: string | RegExp;
|
|
1178
|
+
/** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
|
|
1179
|
+
category: string;
|
|
1180
|
+
/** Who sets the cookie (e.g. 'Google Analytics'). */
|
|
1181
|
+
provider?: string;
|
|
1182
|
+
/** What the cookie is used for — surfaced in your cookie policy. */
|
|
1183
|
+
purpose?: string;
|
|
1184
|
+
/** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
|
|
1185
|
+
prefix?: boolean;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1064
1188
|
/** Options for DOCX export of the finalised policy. */
|
|
1065
1189
|
declare interface DOCXExportOptions {
|
|
1066
1190
|
includeTOC?: boolean;
|
|
@@ -2073,6 +2197,28 @@ export declare interface ROPASummary {
|
|
|
2073
2197
|
lastUpdated: number;
|
|
2074
2198
|
}
|
|
2075
2199
|
|
|
2200
|
+
export declare interface ScannedCookie {
|
|
2201
|
+
/** The cookie name as found in the cookie string. */
|
|
2202
|
+
name: string;
|
|
2203
|
+
/** Resolved consent category, or `null` when it could not be classified. */
|
|
2204
|
+
category: string | null;
|
|
2205
|
+
/** Whether it matched your declaration, only the known registry, or nothing. */
|
|
2206
|
+
matchedBy: CookieMatchSource;
|
|
2207
|
+
provider?: string;
|
|
2208
|
+
purpose?: string;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
declare interface ScannedCookie_2 {
|
|
2212
|
+
/** The cookie name as found in the cookie string. */
|
|
2213
|
+
name: string;
|
|
2214
|
+
/** Resolved consent category, or `null` when it could not be classified. */
|
|
2215
|
+
category: string | null;
|
|
2216
|
+
/** Whether it matched your declaration, only the known registry, or nothing. */
|
|
2217
|
+
matchedBy: CookieMatchSource_2;
|
|
2218
|
+
provider?: string;
|
|
2219
|
+
purpose?: string;
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2076
2222
|
/**
|
|
2077
2223
|
* Additional conditions required for processing sensitive personal data
|
|
2078
2224
|
* per NDPA Section 30
|
|
@@ -2505,6 +2651,23 @@ export declare interface UseConsentReturn {
|
|
|
2505
2651
|
isLoading: boolean;
|
|
2506
2652
|
}
|
|
2507
2653
|
|
|
2654
|
+
/**
|
|
2655
|
+
* React hook that scans `document.cookie` against your declared cookies on
|
|
2656
|
+
* mount and exposes a `rescan()` to re-run after you set or clear cookies.
|
|
2657
|
+
*
|
|
2658
|
+
* `result` is `null` until the first client-side scan, so server and first
|
|
2659
|
+
* client render agree (no hydration mismatch). `rescan` is stable and always
|
|
2660
|
+
* reads the latest `declared`/`options` — callers don't need to memoise them.
|
|
2661
|
+
*/
|
|
2662
|
+
export declare function useCookieScan(declared?: DeclaredCookie_2[], options?: CookieScanOptions_2): UseCookieScanReturn;
|
|
2663
|
+
|
|
2664
|
+
export declare interface UseCookieScanReturn {
|
|
2665
|
+
/** The latest scan, or `null` before the first client-side scan (e.g. during SSR). */
|
|
2666
|
+
result: CookieScanResult_2 | null;
|
|
2667
|
+
/** Re-read the cookies and recompute the scan with the current arguments. */
|
|
2668
|
+
rescan: () => void;
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2508
2671
|
/**
|
|
2509
2672
|
* Hook for managing cross-border data transfers in compliance with NDPA Part VIII (Sections 41-43).
|
|
2510
2673
|
*
|
package/dist/headless.d.ts
CHANGED
|
@@ -794,6 +794,82 @@ export declare interface ConsentStorageOptions {
|
|
|
794
794
|
};
|
|
795
795
|
}
|
|
796
796
|
|
|
797
|
+
/** How a present cookie was classified. */
|
|
798
|
+
export declare type CookieMatchSource = 'declared' | 'known' | 'none';
|
|
799
|
+
|
|
800
|
+
/** How a present cookie was classified. */
|
|
801
|
+
declare type CookieMatchSource_2 = 'declared' | 'known' | 'none';
|
|
802
|
+
|
|
803
|
+
export declare interface CookieScanOptions {
|
|
804
|
+
/**
|
|
805
|
+
* The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
|
|
806
|
+
* Defaults to `document.cookie` in the browser, or `''` on the server.
|
|
807
|
+
*/
|
|
808
|
+
cookieString?: string;
|
|
809
|
+
/** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
|
|
810
|
+
asOf?: number;
|
|
811
|
+
/** Extra known cookies, checked before the built-in registry (so they can override it). */
|
|
812
|
+
knownCookies?: DeclaredCookie[];
|
|
813
|
+
/** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
|
|
814
|
+
useKnownRegistry?: boolean;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
declare interface CookieScanOptions_2 {
|
|
818
|
+
/**
|
|
819
|
+
* The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
|
|
820
|
+
* Defaults to `document.cookie` in the browser, or `''` on the server.
|
|
821
|
+
*/
|
|
822
|
+
cookieString?: string;
|
|
823
|
+
/** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
|
|
824
|
+
asOf?: number;
|
|
825
|
+
/** Extra known cookies, checked before the built-in registry (so they can override it). */
|
|
826
|
+
knownCookies?: DeclaredCookie_2[];
|
|
827
|
+
/** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
|
|
828
|
+
useKnownRegistry?: boolean;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
export declare interface CookieScanResult {
|
|
832
|
+
/** When the scan ran (epoch ms). */
|
|
833
|
+
scannedAt: number;
|
|
834
|
+
/** Number of cookies present. */
|
|
835
|
+
total: number;
|
|
836
|
+
/** Every present cookie, classified. */
|
|
837
|
+
cookies: ScannedCookie[];
|
|
838
|
+
/** Cookies that matched one of your declared cookies. */
|
|
839
|
+
declared: ScannedCookie[];
|
|
840
|
+
/** Cookies present but NOT in your declaration — the compliance gap. */
|
|
841
|
+
undeclared: ScannedCookie[];
|
|
842
|
+
/** Undeclared cookies the built-in registry could still identify. */
|
|
843
|
+
identified: ScannedCookie[];
|
|
844
|
+
/** Undeclared cookies that could not be identified at all. */
|
|
845
|
+
unknown: ScannedCookie[];
|
|
846
|
+
/** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
|
|
847
|
+
byCategory: Record<string, ScannedCookie[]>;
|
|
848
|
+
/** True when there are no undeclared cookies. */
|
|
849
|
+
complete: boolean;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
declare interface CookieScanResult_2 {
|
|
853
|
+
/** When the scan ran (epoch ms). */
|
|
854
|
+
scannedAt: number;
|
|
855
|
+
/** Number of cookies present. */
|
|
856
|
+
total: number;
|
|
857
|
+
/** Every present cookie, classified. */
|
|
858
|
+
cookies: ScannedCookie_2[];
|
|
859
|
+
/** Cookies that matched one of your declared cookies. */
|
|
860
|
+
declared: ScannedCookie_2[];
|
|
861
|
+
/** Cookies present but NOT in your declaration — the compliance gap. */
|
|
862
|
+
undeclared: ScannedCookie_2[];
|
|
863
|
+
/** Undeclared cookies the built-in registry could still identify. */
|
|
864
|
+
identified: ScannedCookie_2[];
|
|
865
|
+
/** Undeclared cookies that could not be identified at all. */
|
|
866
|
+
unknown: ScannedCookie_2[];
|
|
867
|
+
/** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
|
|
868
|
+
byCategory: Record<string, ScannedCookie_2[]>;
|
|
869
|
+
/** True when there are no undeclared cookies. */
|
|
870
|
+
complete: boolean;
|
|
871
|
+
}
|
|
872
|
+
|
|
797
873
|
/**
|
|
798
874
|
* Summary of cross-border transfer compliance
|
|
799
875
|
*/
|
|
@@ -1061,6 +1137,54 @@ declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
|
|
|
1061
1137
|
*/
|
|
1062
1138
|
declare type DCPMITier_2 = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
|
|
1063
1139
|
|
|
1140
|
+
/**
|
|
1141
|
+
* Cookie scanner — audits the cookies actually present in the browser against
|
|
1142
|
+
* the cookies you have declared, surfacing undeclared cookies that put you out
|
|
1143
|
+
* of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
|
|
1144
|
+
* specific, informed consent).
|
|
1145
|
+
*
|
|
1146
|
+
* Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
|
|
1147
|
+
* `Cookie:` header on the server, a test fixture), or call it in the browser
|
|
1148
|
+
* and it reads `document.cookie`. Safe to import from a server bundle.
|
|
1149
|
+
*/
|
|
1150
|
+
/** A cookie you declare against a consent category. */
|
|
1151
|
+
export declare interface DeclaredCookie {
|
|
1152
|
+
/** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
|
|
1153
|
+
name: string | RegExp;
|
|
1154
|
+
/** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
|
|
1155
|
+
category: string;
|
|
1156
|
+
/** Who sets the cookie (e.g. 'Google Analytics'). */
|
|
1157
|
+
provider?: string;
|
|
1158
|
+
/** What the cookie is used for — surfaced in your cookie policy. */
|
|
1159
|
+
purpose?: string;
|
|
1160
|
+
/** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
|
|
1161
|
+
prefix?: boolean;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* Cookie scanner — audits the cookies actually present in the browser against
|
|
1166
|
+
* the cookies you have declared, surfacing undeclared cookies that put you out
|
|
1167
|
+
* of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
|
|
1168
|
+
* specific, informed consent).
|
|
1169
|
+
*
|
|
1170
|
+
* Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
|
|
1171
|
+
* `Cookie:` header on the server, a test fixture), or call it in the browser
|
|
1172
|
+
* and it reads `document.cookie`. Safe to import from a server bundle.
|
|
1173
|
+
*/
|
|
1174
|
+
/** A cookie you declare against a consent category. */
|
|
1175
|
+
declare interface DeclaredCookie_2 {
|
|
1176
|
+
/** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
|
|
1177
|
+
name: string | RegExp;
|
|
1178
|
+
/** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
|
|
1179
|
+
category: string;
|
|
1180
|
+
/** Who sets the cookie (e.g. 'Google Analytics'). */
|
|
1181
|
+
provider?: string;
|
|
1182
|
+
/** What the cookie is used for — surfaced in your cookie policy. */
|
|
1183
|
+
purpose?: string;
|
|
1184
|
+
/** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
|
|
1185
|
+
prefix?: boolean;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1064
1188
|
/** Options for DOCX export of the finalised policy. */
|
|
1065
1189
|
declare interface DOCXExportOptions {
|
|
1066
1190
|
includeTOC?: boolean;
|
|
@@ -2073,6 +2197,28 @@ export declare interface ROPASummary {
|
|
|
2073
2197
|
lastUpdated: number;
|
|
2074
2198
|
}
|
|
2075
2199
|
|
|
2200
|
+
export declare interface ScannedCookie {
|
|
2201
|
+
/** The cookie name as found in the cookie string. */
|
|
2202
|
+
name: string;
|
|
2203
|
+
/** Resolved consent category, or `null` when it could not be classified. */
|
|
2204
|
+
category: string | null;
|
|
2205
|
+
/** Whether it matched your declaration, only the known registry, or nothing. */
|
|
2206
|
+
matchedBy: CookieMatchSource;
|
|
2207
|
+
provider?: string;
|
|
2208
|
+
purpose?: string;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
declare interface ScannedCookie_2 {
|
|
2212
|
+
/** The cookie name as found in the cookie string. */
|
|
2213
|
+
name: string;
|
|
2214
|
+
/** Resolved consent category, or `null` when it could not be classified. */
|
|
2215
|
+
category: string | null;
|
|
2216
|
+
/** Whether it matched your declaration, only the known registry, or nothing. */
|
|
2217
|
+
matchedBy: CookieMatchSource_2;
|
|
2218
|
+
provider?: string;
|
|
2219
|
+
purpose?: string;
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2076
2222
|
/**
|
|
2077
2223
|
* Additional conditions required for processing sensitive personal data
|
|
2078
2224
|
* per NDPA Section 30
|
|
@@ -2505,6 +2651,23 @@ export declare interface UseConsentReturn {
|
|
|
2505
2651
|
isLoading: boolean;
|
|
2506
2652
|
}
|
|
2507
2653
|
|
|
2654
|
+
/**
|
|
2655
|
+
* React hook that scans `document.cookie` against your declared cookies on
|
|
2656
|
+
* mount and exposes a `rescan()` to re-run after you set or clear cookies.
|
|
2657
|
+
*
|
|
2658
|
+
* `result` is `null` until the first client-side scan, so server and first
|
|
2659
|
+
* client render agree (no hydration mismatch). `rescan` is stable and always
|
|
2660
|
+
* reads the latest `declared`/`options` — callers don't need to memoise them.
|
|
2661
|
+
*/
|
|
2662
|
+
export declare function useCookieScan(declared?: DeclaredCookie_2[], options?: CookieScanOptions_2): UseCookieScanReturn;
|
|
2663
|
+
|
|
2664
|
+
export declare interface UseCookieScanReturn {
|
|
2665
|
+
/** The latest scan, or `null` before the first client-side scan (e.g. during SSR). */
|
|
2666
|
+
result: CookieScanResult_2 | null;
|
|
2667
|
+
/** Re-read the cookies and recompute the scan with the current arguments. */
|
|
2668
|
+
rescan: () => void;
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2508
2671
|
/**
|
|
2509
2672
|
* Hook for managing cross-border data transfers in compliance with NDPA Part VIII (Sections 41-43).
|
|
2510
2673
|
*
|