@tantainnovative/ndpr-toolkit 5.1.4 → 5.3.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/dist/headless.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';require('./chunk-OZCNFB5C.js');var chunkBHUJWWCO_js=require('./chunk-BHUJWWCO.js'),chunkEHQVTFYO_js=require('./chunk-EHQVTFYO.js'),chunkRC3XFXTJ_js=require('./chunk-RC3XFXTJ.js'),chunkQHW4UKGJ_js=require('./chunk-QHW4UKGJ.js'),chunkIRRUYR6M_js=require('./chunk-IRRUYR6M.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkTLIHFGIJ_js=require('./chunk-TLIHFGIJ.js');require('./chunk-JS7SYL5P.js'),require('./chunk-JVMHWM3I.js'),require('./chunk-3YTAOT5O.js'),require('./chunk-D2ZKDQVL.js'),require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js');var chunkQKXGVT2Q_js=require('./chunk-QKXGVT2Q.js'),chunkL2VO3MEJ_js=require('./chunk-L2VO3MEJ.js');require('./chunk-C2KEXHRX.js'),require('./chunk-DKLJ5DYN.js');var chunkTVA6D6S4_js=require('./chunk-TVA6D6S4.js');require('./chunk-R2ZZMATR.js');var chunkJLQT3W3E_js=require('./chunk-JLQT3W3E.js');require('./chunk-TQZWJGJ2.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"useComplianceScore",{enumerable:true,get:function(){return chunkBHUJWWCO_js.a}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkEHQVTFYO_js.a}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.a}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkQHW4UKGJ_js.a}});Object.defineProperty(exports,"useLawfulBasis",{enumerable:true,get:function(){return chunkIRRUYR6M_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkTLIHFGIJ_js.a}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkQKXGVT2Q_js.a}});Object.defineProperty(exports,"useFocusTrap",{enumerable:true,get:function(){return chunkL2VO3MEJ_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkTVA6D6S4_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkJLQT3W3E_js.a}});
2
+ 'use strict';require('./chunk-OVW5ASY3.js');var chunkGYLUTVKB_js=require('./chunk-GYLUTVKB.js'),chunkEHQVTFYO_js=require('./chunk-EHQVTFYO.js'),chunkRC3XFXTJ_js=require('./chunk-RC3XFXTJ.js'),chunkQHW4UKGJ_js=require('./chunk-QHW4UKGJ.js'),chunkIRRUYR6M_js=require('./chunk-IRRUYR6M.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkTLIHFGIJ_js=require('./chunk-TLIHFGIJ.js');require('./chunk-OXFULQTE.js'),require('./chunk-JS7SYL5P.js'),require('./chunk-7TTXS7JX.js'),require('./chunk-3YTAOT5O.js'),require('./chunk-D2ZKDQVL.js'),require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js');var chunkQKXGVT2Q_js=require('./chunk-QKXGVT2Q.js'),chunkL2VO3MEJ_js=require('./chunk-L2VO3MEJ.js');require('./chunk-C2KEXHRX.js'),require('./chunk-DKLJ5DYN.js');var chunkTVA6D6S4_js=require('./chunk-TVA6D6S4.js');require('./chunk-R2ZZMATR.js');var chunkJLQT3W3E_js=require('./chunk-JLQT3W3E.js');require('./chunk-TQZWJGJ2.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"useBreachNotificationAssessment",{enumerable:true,get:function(){return chunkGYLUTVKB_js.a}});Object.defineProperty(exports,"useComplianceAuditReturn",{enumerable:true,get:function(){return chunkGYLUTVKB_js.d}});Object.defineProperty(exports,"useComplianceScore",{enumerable:true,get:function(){return chunkGYLUTVKB_js.b}});Object.defineProperty(exports,"useDCPMI",{enumerable:true,get:function(){return chunkGYLUTVKB_js.c}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkEHQVTFYO_js.a}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.a}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkQHW4UKGJ_js.a}});Object.defineProperty(exports,"useLawfulBasis",{enumerable:true,get:function(){return chunkIRRUYR6M_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkTLIHFGIJ_js.a}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkQKXGVT2Q_js.a}});Object.defineProperty(exports,"useFocusTrap",{enumerable:true,get:function(){return chunkL2VO3MEJ_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkTVA6D6S4_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkJLQT3W3E_js.a}});
package/dist/headless.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import'./chunk-GQYBS3A7.mjs';export{a as useComplianceScore}from'./chunk-XAB5C2JG.mjs';export{a as useBreach}from'./chunk-RFXGD5NE.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-UVXS7KRV.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-KE2FZH2V.mjs';export{a as useLawfulBasis}from'./chunk-B6BRD5SL.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as useROPA}from'./chunk-FRMVSG4N.mjs';import'./chunk-IVSNHT24.mjs';import'./chunk-YX7DEHPA.mjs';import'./chunk-WTGKZX7J.mjs';import'./chunk-NBQQ2GN3.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';export{a as useConsent}from'./chunk-PQ5IPUJN.mjs';export{a as useFocusTrap}from'./chunk-YTU4FNM2.mjs';import'./chunk-XC3DLYEG.mjs';import'./chunk-R3ZKV2J7.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';import'./chunk-RRVML7CU.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';import'./chunk-LRRENTT5.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
2
+ import'./chunk-YQTZWPOS.mjs';export{a as useBreachNotificationAssessment,d as useComplianceAuditReturn,b as useComplianceScore,c as useDCPMI}from'./chunk-NKFTLFPD.mjs';export{a as useBreach}from'./chunk-RFXGD5NE.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-UVXS7KRV.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-KE2FZH2V.mjs';export{a as useLawfulBasis}from'./chunk-B6BRD5SL.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as useROPA}from'./chunk-FRMVSG4N.mjs';import'./chunk-KOHFQIV4.mjs';import'./chunk-IVSNHT24.mjs';import'./chunk-6A7M4CGJ.mjs';import'./chunk-WTGKZX7J.mjs';import'./chunk-NBQQ2GN3.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';export{a as useConsent}from'./chunk-PQ5IPUJN.mjs';export{a as useFocusTrap}from'./chunk-YTU4FNM2.mjs';import'./chunk-XC3DLYEG.mjs';import'./chunk-R3ZKV2J7.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';import'./chunk-RRVML7CU.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';import'./chunk-LRRENTT5.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
package/dist/hooks.d.mts CHANGED
@@ -30,6 +30,93 @@ declare type BreachCompositeState = {
30
30
  notifications: RegulatoryNotification[];
31
31
  };
32
32
 
33
+ export declare interface BreachNotificationAssessment {
34
+ /** Whether all applicable mandated content items are satisfied. */
35
+ complete: boolean;
36
+ /** Completeness of applicable content items, 0–100. */
37
+ completeness: number;
38
+ /** GAID 2025 Article 33(5) / NDPA S. 40(2) content of the notification to the Commission. */
39
+ notificationToCommission: BreachNotificationItem[];
40
+ /** NDPA S. 40(3) communication to data subjects — populated only when high-risk. */
41
+ dataSubjectCommunication: BreachNotificationItem[];
42
+ /** Whether a data-subject communication is owed (high risk). */
43
+ dataSubjectCommunicationRequired: boolean;
44
+ timing: BreachNotificationTiming;
45
+ /** Labels of unsatisfied applicable items. */
46
+ missing: string[];
47
+ /** Actionable next steps, including timing warnings. */
48
+ recommendations: string[];
49
+ asOf: number;
50
+ }
51
+
52
+ export declare interface BreachNotificationItem {
53
+ /** Stable identifier for the requirement. */
54
+ id: string;
55
+ /** Human-readable requirement. */
56
+ label: string;
57
+ /** Authoritative citation, e.g. `GAID 2025 Art. 33(5)(a)`. */
58
+ section: string;
59
+ /** Whether the report satisfies it. */
60
+ satisfied: boolean;
61
+ }
62
+
63
+ /**
64
+ * Personal-data-breach notification completeness checker for NDPA 2023
65
+ * Section 40, as detailed by NDPC General Application and Implementation
66
+ * Directive (GAID) 2025 Article 33.
67
+ *
68
+ * Section 40(2) requires a data controller to notify the Commission within 72
69
+ * hours of becoming aware of a breach likely to result in a risk to data
70
+ * subjects' rights and freedoms. GAID 2025 Article 33(5)(a)–(h) enumerates the
71
+ * content that a notification to the Commission "shall include". Where the
72
+ * breach is likely to result in a *high* risk, Section 40(3) additionally
73
+ * requires the controller to communicate the breach to affected data subjects
74
+ * in plain and clear language.
75
+ *
76
+ * This assesses a `BreachReport` against those requirements: which mandated
77
+ * content items are present, whether the 72-hour window is met, and whether a
78
+ * data-subject communication is owed. It is a documentation-completeness aid,
79
+ * not legal advice — verify against current NDPC guidance.
80
+ *
81
+ * @see NDPA 2023 Section 40 (Personal data breaches)
82
+ * @see NDPC GAID 2025 Article 33 (Data Breach Notification)
83
+ */
84
+
85
+ export declare interface BreachNotificationOptions {
86
+ /** Risk assessment for the breach; drives whether data-subject communication is required. */
87
+ assessment?: RiskAssessment;
88
+ /** The regulatory notification actually sent, if any — used to judge timeliness. */
89
+ notification?: RegulatoryNotification;
90
+ /** Reference "now" in epoch ms. Defaults to `Date.now()`. */
91
+ asOf?: number;
92
+ /** Notification window in hours. Defaults to 72 (NDPA S. 40(2)). */
93
+ deadlineHours?: number;
94
+ /**
95
+ * Explicit high-risk flag (NDPA S. 40(3)). When omitted, derived from
96
+ * `assessment.highRisksToRightsAndFreedoms`.
97
+ */
98
+ highRisk?: boolean;
99
+ }
100
+
101
+ export declare interface BreachNotificationTiming {
102
+ /** `discoveredAt` + the notification window. */
103
+ deadline: number;
104
+ /** Whole hours between discovery and `asOf`. */
105
+ hoursSinceDiscovery: number;
106
+ /** Whether a regulatory notification has been recorded. */
107
+ notified: boolean;
108
+ /** When the regulatory notification was sent, if any. */
109
+ notifiedAt?: number;
110
+ /** Whether the notification (or, if none, `asOf`) falls within the deadline. */
111
+ withinDeadline: boolean;
112
+ /** Whole hours from `asOf` to the deadline (negative once past). */
113
+ hoursRemaining: number;
114
+ /** Whether the deadline has been missed. */
115
+ overdue: boolean;
116
+ /** Late filings must state the reasons for the delay (NDPA S. 40(2)). */
117
+ requiresDelayJustification: boolean;
118
+ }
119
+
33
120
  /**
34
121
  * Represents a data breach report
35
122
  */
@@ -118,6 +205,68 @@ export declare interface BreachReport {
118
205
  }>;
119
206
  }
120
207
 
208
+ /**
209
+ * Compliance Audit Returns (CAR) scheduling under the NDPC General Application
210
+ * and Implementation Directive (GAID) 2025.
211
+ *
212
+ * A Data Controller/Processor of Major Importance (DCPMI) must conduct an
213
+ * initial compliance audit within 15 months of commencing data processing, and
214
+ * thereafter file a Compliance Audit Return with the NDPC annually (default
215
+ * deadline 31 March, filed through the NDPC Information Management Portal/NIMP).
216
+ *
217
+ * This computes the schedule (initial-audit due date, the next annual filing
218
+ * deadline relative to a reference date) and a light status. NDPC deadlines
219
+ * shift (the 2026 filing was extended to 30 May), so the annual deadline is
220
+ * configurable and per-year overrides are supported. The audit *content* itself
221
+ * is the organisation's compliance posture — pair this with `getComplianceScore`.
222
+ *
223
+ * @see NDPC General Application and Implementation Directive (GAID) 2025
224
+ */
225
+
226
+ export declare interface CARInput {
227
+ /** ISO date (YYYY-MM-DD) the organisation commenced data processing. */
228
+ commencementDate: string;
229
+ /** Reference date to evaluate against (YYYY-MM-DD). Defaults to today. */
230
+ asOf?: string;
231
+ /** DCPMI tier; CAR applies to DCPMIs only. Omit to assume applicable. */
232
+ tier?: DCPMITier;
233
+ }
234
+
235
+ export declare interface CAROptions {
236
+ /** Default annual filing deadline (month is 1-12). Defaults to 31 March. */
237
+ annualDeadline?: {
238
+ month: number;
239
+ day: number;
240
+ };
241
+ /** Per-year overrides for the annual deadline, e.g. `{ 2026: '2026-05-30' }`. */
242
+ deadlineOverrides?: Record<number, string>;
243
+ /** Months after commencement the initial audit is due. Defaults to 15. */
244
+ initialAuditWithinMonths?: number;
245
+ }
246
+
247
+ export declare interface ComplianceAuditReturn {
248
+ /** Whether CAR applies (false for non-DCPMI organisations). */
249
+ applicable: boolean;
250
+ schedule: {
251
+ commencementDate: string;
252
+ initialAuditWithinMonths: number;
253
+ /** Commencement date + the initial-audit window. */
254
+ initialAuditDueDate: string;
255
+ /** The next annual filing deadline on or after `asOf`. */
256
+ nextFilingDeadline: string;
257
+ /** The year the next filing deadline falls in. */
258
+ filingYear: number;
259
+ };
260
+ status: {
261
+ /** Whether the initial-audit obligation has arisen (asOf ≥ due date). */
262
+ initialAuditDue: boolean;
263
+ /** Whole days from `asOf` to the next filing deadline. */
264
+ daysUntilNextDeadline: number;
265
+ };
266
+ notes: string[];
267
+ asOf: string;
268
+ }
269
+
121
270
  /** A single gap found during NDPA compliance evaluation. */
122
271
  declare interface ComplianceGap {
123
272
  /** Machine-readable requirement identifier. */
@@ -440,6 +589,84 @@ declare interface DataCategory {
440
589
  selected: boolean;
441
590
  }
442
591
 
592
+ export declare interface DCPMIClassification {
593
+ /** Registration tier (or `'none'` when not a DCPMI). */
594
+ tier: DCPMITier;
595
+ /** Whether the organisation is a Data Controller/Processor of Major Importance. */
596
+ isDCPMI: boolean;
597
+ /** Annual registration fee in Nigerian Naira (0 when not a volume-tiered DCPMI). */
598
+ annualFeeNGN: number;
599
+ registration: {
600
+ /** Whether NDPC registration is required. */
601
+ required: boolean;
602
+ /** OHL renews registration annually; UHL/EHL register once and file CAR annually. */
603
+ renewsAnnually: boolean;
604
+ };
605
+ compliance: {
606
+ /** Whether the organisation must file annual Compliance Audit Returns (CAR). */
607
+ auditReturnsAnnual: boolean;
608
+ /** Initial compliance audit is due within this many months of commencing processing. */
609
+ initialAuditWithinMonths: number;
610
+ };
611
+ /** Human-readable caveats and next steps. */
612
+ notes: string[];
613
+ /** The count actually used for classification, after defensive normalisation. */
614
+ dataSubjectsConsidered: number;
615
+ }
616
+
617
+ export declare interface DCPMIClassificationOptions {
618
+ thresholds?: Partial<DCPMIThresholds>;
619
+ fees?: Partial<DCPMIFees>;
620
+ }
621
+
622
+ declare interface DCPMIFees {
623
+ UHL: number;
624
+ EHL: number;
625
+ OHL: number;
626
+ }
627
+
628
+ export declare interface DCPMIInput {
629
+ /** Distinct data subjects whose data was processed in the relevant six-month window. */
630
+ dataSubjectsInSixMonths?: number;
631
+ /** True if the Commission has separately designated/listed the organisation as a DCPMI. */
632
+ isDesignated?: boolean;
633
+ }
634
+
635
+ declare interface DCPMIThresholds {
636
+ /** Lower bound (inclusive) for OHL. */
637
+ ohl: number;
638
+ /** Lower bound (inclusive) for EHL. */
639
+ ehl: number;
640
+ /** A count strictly greater than this is UHL. */
641
+ uhl: number;
642
+ }
643
+
644
+ /**
645
+ * Data Controller/Processor of Major Importance (DCPMI) classification under the
646
+ * NDPC General Application and Implementation Directive (GAID) 2025.
647
+ *
648
+ * Volume-based tiers — data subjects processed within a six-month window:
649
+ * - UHL (Ultra High Level): more than 5,000 → ₦250,000 / year
650
+ * - EHL (Extra High Level): 1,000 – 5,000 → ₦100,000 / year
651
+ * - OHL (Ordinary High Level): 200 – 999 → ₦10,000 / year
652
+ * - below 200: not a DCPMI by volume
653
+ *
654
+ * Boundaries: the 1,000 mark resolves to EHL (so OHL is 200–999); UHL is
655
+ * strictly greater than 5,000 (so 5,000 itself is EHL). The NDPC has revised
656
+ * classification metrics before and shifts filing deadlines, so thresholds and
657
+ * fees are configurable — treat the defaults as the September 2025 GAID
658
+ * baseline, not a constant.
659
+ *
660
+ * `isDesignated` marks an organisation the Commission has otherwise listed as a
661
+ * DCPMI; it is then a DCPMI regardless of volume. Below the volume tiers such an
662
+ * organisation is reported as `'listed'` with the fee left at 0 and a note to
663
+ * confirm the applicable tier/fee with the NDPC.
664
+ *
665
+ * @see NDPC General Application and Implementation Directive (GAID) 2025
666
+ * @see NDPC Guidance Notice on the Registration of Data Controllers and Processors of Major Importance
667
+ */
668
+ declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
669
+
443
670
  /** Options for DOCX export of the finalised policy. */
444
671
  declare interface DOCXExportOptions {
445
672
  includeTOC?: boolean;
@@ -1511,6 +1738,14 @@ export declare interface UseAdaptivePolicyWizardReturn {
1511
1738
  */
1512
1739
  export declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
1513
1740
 
1741
+ /**
1742
+ * React hook that memoises the `assessBreachNotification` utility — checks a
1743
+ * breach report's completeness against the NDPA S. 40 / GAID 2025 Article 33
1744
+ * notification requirements (mandated content, the 72-hour window, and any
1745
+ * data-subject communication owed on high risk).
1746
+ */
1747
+ export declare function useBreachNotificationAssessment(report: BreachReport, options?: BreachNotificationOptions): BreachNotificationAssessment;
1748
+
1514
1749
  export declare interface UseBreachOptions {
1515
1750
  /**
1516
1751
  * Available breach categories
@@ -1614,6 +1849,13 @@ export declare interface UseBreachReturn {
1614
1849
  isLoading: boolean;
1615
1850
  }
1616
1851
 
1852
+ /**
1853
+ * React hook that memoises the `generateComplianceAuditReturn` utility — derives
1854
+ * a DCPMI's Compliance Audit Returns schedule (initial-audit due date, next
1855
+ * annual filing deadline) and status under NDPC GAID 2025.
1856
+ */
1857
+ export declare function useComplianceAuditReturn(input: CARInput, options?: CAROptions): ComplianceAuditReturn;
1858
+
1617
1859
  /**
1618
1860
  * Computes an NDPA compliance score and returns a structured report
1619
1861
  * (score, rating, per-module breakdown, recommendations).
@@ -1831,6 +2073,13 @@ export declare interface UseCrossBorderTransferReturn {
1831
2073
  isLoading: boolean;
1832
2074
  }
1833
2075
 
2076
+ /**
2077
+ * React hook that memoises the `classifyDCPMI` utility — derives an organisation's
2078
+ * Data Controller/Processor of Major Importance tier, annual registration fee,
2079
+ * and Compliance Audit Returns obligations under NDPC GAID 2025.
2080
+ */
2081
+ export declare function useDCPMI(input: DCPMIInput, options?: DCPMIClassificationOptions): DCPMIClassification;
2082
+
1834
2083
  /**
1835
2084
  * Convenience wrapper around `usePrivacyPolicy`. With `orgInfo` provided
1836
2085
  * and `autoGenerate` enabled (default), `policy` is non-null on the first
package/dist/hooks.d.ts CHANGED
@@ -30,6 +30,93 @@ declare type BreachCompositeState = {
30
30
  notifications: RegulatoryNotification[];
31
31
  };
32
32
 
33
+ export declare interface BreachNotificationAssessment {
34
+ /** Whether all applicable mandated content items are satisfied. */
35
+ complete: boolean;
36
+ /** Completeness of applicable content items, 0–100. */
37
+ completeness: number;
38
+ /** GAID 2025 Article 33(5) / NDPA S. 40(2) content of the notification to the Commission. */
39
+ notificationToCommission: BreachNotificationItem[];
40
+ /** NDPA S. 40(3) communication to data subjects — populated only when high-risk. */
41
+ dataSubjectCommunication: BreachNotificationItem[];
42
+ /** Whether a data-subject communication is owed (high risk). */
43
+ dataSubjectCommunicationRequired: boolean;
44
+ timing: BreachNotificationTiming;
45
+ /** Labels of unsatisfied applicable items. */
46
+ missing: string[];
47
+ /** Actionable next steps, including timing warnings. */
48
+ recommendations: string[];
49
+ asOf: number;
50
+ }
51
+
52
+ export declare interface BreachNotificationItem {
53
+ /** Stable identifier for the requirement. */
54
+ id: string;
55
+ /** Human-readable requirement. */
56
+ label: string;
57
+ /** Authoritative citation, e.g. `GAID 2025 Art. 33(5)(a)`. */
58
+ section: string;
59
+ /** Whether the report satisfies it. */
60
+ satisfied: boolean;
61
+ }
62
+
63
+ /**
64
+ * Personal-data-breach notification completeness checker for NDPA 2023
65
+ * Section 40, as detailed by NDPC General Application and Implementation
66
+ * Directive (GAID) 2025 Article 33.
67
+ *
68
+ * Section 40(2) requires a data controller to notify the Commission within 72
69
+ * hours of becoming aware of a breach likely to result in a risk to data
70
+ * subjects' rights and freedoms. GAID 2025 Article 33(5)(a)–(h) enumerates the
71
+ * content that a notification to the Commission "shall include". Where the
72
+ * breach is likely to result in a *high* risk, Section 40(3) additionally
73
+ * requires the controller to communicate the breach to affected data subjects
74
+ * in plain and clear language.
75
+ *
76
+ * This assesses a `BreachReport` against those requirements: which mandated
77
+ * content items are present, whether the 72-hour window is met, and whether a
78
+ * data-subject communication is owed. It is a documentation-completeness aid,
79
+ * not legal advice — verify against current NDPC guidance.
80
+ *
81
+ * @see NDPA 2023 Section 40 (Personal data breaches)
82
+ * @see NDPC GAID 2025 Article 33 (Data Breach Notification)
83
+ */
84
+
85
+ export declare interface BreachNotificationOptions {
86
+ /** Risk assessment for the breach; drives whether data-subject communication is required. */
87
+ assessment?: RiskAssessment;
88
+ /** The regulatory notification actually sent, if any — used to judge timeliness. */
89
+ notification?: RegulatoryNotification;
90
+ /** Reference "now" in epoch ms. Defaults to `Date.now()`. */
91
+ asOf?: number;
92
+ /** Notification window in hours. Defaults to 72 (NDPA S. 40(2)). */
93
+ deadlineHours?: number;
94
+ /**
95
+ * Explicit high-risk flag (NDPA S. 40(3)). When omitted, derived from
96
+ * `assessment.highRisksToRightsAndFreedoms`.
97
+ */
98
+ highRisk?: boolean;
99
+ }
100
+
101
+ export declare interface BreachNotificationTiming {
102
+ /** `discoveredAt` + the notification window. */
103
+ deadline: number;
104
+ /** Whole hours between discovery and `asOf`. */
105
+ hoursSinceDiscovery: number;
106
+ /** Whether a regulatory notification has been recorded. */
107
+ notified: boolean;
108
+ /** When the regulatory notification was sent, if any. */
109
+ notifiedAt?: number;
110
+ /** Whether the notification (or, if none, `asOf`) falls within the deadline. */
111
+ withinDeadline: boolean;
112
+ /** Whole hours from `asOf` to the deadline (negative once past). */
113
+ hoursRemaining: number;
114
+ /** Whether the deadline has been missed. */
115
+ overdue: boolean;
116
+ /** Late filings must state the reasons for the delay (NDPA S. 40(2)). */
117
+ requiresDelayJustification: boolean;
118
+ }
119
+
33
120
  /**
34
121
  * Represents a data breach report
35
122
  */
@@ -118,6 +205,68 @@ export declare interface BreachReport {
118
205
  }>;
119
206
  }
120
207
 
208
+ /**
209
+ * Compliance Audit Returns (CAR) scheduling under the NDPC General Application
210
+ * and Implementation Directive (GAID) 2025.
211
+ *
212
+ * A Data Controller/Processor of Major Importance (DCPMI) must conduct an
213
+ * initial compliance audit within 15 months of commencing data processing, and
214
+ * thereafter file a Compliance Audit Return with the NDPC annually (default
215
+ * deadline 31 March, filed through the NDPC Information Management Portal/NIMP).
216
+ *
217
+ * This computes the schedule (initial-audit due date, the next annual filing
218
+ * deadline relative to a reference date) and a light status. NDPC deadlines
219
+ * shift (the 2026 filing was extended to 30 May), so the annual deadline is
220
+ * configurable and per-year overrides are supported. The audit *content* itself
221
+ * is the organisation's compliance posture — pair this with `getComplianceScore`.
222
+ *
223
+ * @see NDPC General Application and Implementation Directive (GAID) 2025
224
+ */
225
+
226
+ export declare interface CARInput {
227
+ /** ISO date (YYYY-MM-DD) the organisation commenced data processing. */
228
+ commencementDate: string;
229
+ /** Reference date to evaluate against (YYYY-MM-DD). Defaults to today. */
230
+ asOf?: string;
231
+ /** DCPMI tier; CAR applies to DCPMIs only. Omit to assume applicable. */
232
+ tier?: DCPMITier;
233
+ }
234
+
235
+ export declare interface CAROptions {
236
+ /** Default annual filing deadline (month is 1-12). Defaults to 31 March. */
237
+ annualDeadline?: {
238
+ month: number;
239
+ day: number;
240
+ };
241
+ /** Per-year overrides for the annual deadline, e.g. `{ 2026: '2026-05-30' }`. */
242
+ deadlineOverrides?: Record<number, string>;
243
+ /** Months after commencement the initial audit is due. Defaults to 15. */
244
+ initialAuditWithinMonths?: number;
245
+ }
246
+
247
+ export declare interface ComplianceAuditReturn {
248
+ /** Whether CAR applies (false for non-DCPMI organisations). */
249
+ applicable: boolean;
250
+ schedule: {
251
+ commencementDate: string;
252
+ initialAuditWithinMonths: number;
253
+ /** Commencement date + the initial-audit window. */
254
+ initialAuditDueDate: string;
255
+ /** The next annual filing deadline on or after `asOf`. */
256
+ nextFilingDeadline: string;
257
+ /** The year the next filing deadline falls in. */
258
+ filingYear: number;
259
+ };
260
+ status: {
261
+ /** Whether the initial-audit obligation has arisen (asOf ≥ due date). */
262
+ initialAuditDue: boolean;
263
+ /** Whole days from `asOf` to the next filing deadline. */
264
+ daysUntilNextDeadline: number;
265
+ };
266
+ notes: string[];
267
+ asOf: string;
268
+ }
269
+
121
270
  /** A single gap found during NDPA compliance evaluation. */
122
271
  declare interface ComplianceGap {
123
272
  /** Machine-readable requirement identifier. */
@@ -440,6 +589,84 @@ declare interface DataCategory {
440
589
  selected: boolean;
441
590
  }
442
591
 
592
+ export declare interface DCPMIClassification {
593
+ /** Registration tier (or `'none'` when not a DCPMI). */
594
+ tier: DCPMITier;
595
+ /** Whether the organisation is a Data Controller/Processor of Major Importance. */
596
+ isDCPMI: boolean;
597
+ /** Annual registration fee in Nigerian Naira (0 when not a volume-tiered DCPMI). */
598
+ annualFeeNGN: number;
599
+ registration: {
600
+ /** Whether NDPC registration is required. */
601
+ required: boolean;
602
+ /** OHL renews registration annually; UHL/EHL register once and file CAR annually. */
603
+ renewsAnnually: boolean;
604
+ };
605
+ compliance: {
606
+ /** Whether the organisation must file annual Compliance Audit Returns (CAR). */
607
+ auditReturnsAnnual: boolean;
608
+ /** Initial compliance audit is due within this many months of commencing processing. */
609
+ initialAuditWithinMonths: number;
610
+ };
611
+ /** Human-readable caveats and next steps. */
612
+ notes: string[];
613
+ /** The count actually used for classification, after defensive normalisation. */
614
+ dataSubjectsConsidered: number;
615
+ }
616
+
617
+ export declare interface DCPMIClassificationOptions {
618
+ thresholds?: Partial<DCPMIThresholds>;
619
+ fees?: Partial<DCPMIFees>;
620
+ }
621
+
622
+ declare interface DCPMIFees {
623
+ UHL: number;
624
+ EHL: number;
625
+ OHL: number;
626
+ }
627
+
628
+ export declare interface DCPMIInput {
629
+ /** Distinct data subjects whose data was processed in the relevant six-month window. */
630
+ dataSubjectsInSixMonths?: number;
631
+ /** True if the Commission has separately designated/listed the organisation as a DCPMI. */
632
+ isDesignated?: boolean;
633
+ }
634
+
635
+ declare interface DCPMIThresholds {
636
+ /** Lower bound (inclusive) for OHL. */
637
+ ohl: number;
638
+ /** Lower bound (inclusive) for EHL. */
639
+ ehl: number;
640
+ /** A count strictly greater than this is UHL. */
641
+ uhl: number;
642
+ }
643
+
644
+ /**
645
+ * Data Controller/Processor of Major Importance (DCPMI) classification under the
646
+ * NDPC General Application and Implementation Directive (GAID) 2025.
647
+ *
648
+ * Volume-based tiers — data subjects processed within a six-month window:
649
+ * - UHL (Ultra High Level): more than 5,000 → ₦250,000 / year
650
+ * - EHL (Extra High Level): 1,000 – 5,000 → ₦100,000 / year
651
+ * - OHL (Ordinary High Level): 200 – 999 → ₦10,000 / year
652
+ * - below 200: not a DCPMI by volume
653
+ *
654
+ * Boundaries: the 1,000 mark resolves to EHL (so OHL is 200–999); UHL is
655
+ * strictly greater than 5,000 (so 5,000 itself is EHL). The NDPC has revised
656
+ * classification metrics before and shifts filing deadlines, so thresholds and
657
+ * fees are configurable — treat the defaults as the September 2025 GAID
658
+ * baseline, not a constant.
659
+ *
660
+ * `isDesignated` marks an organisation the Commission has otherwise listed as a
661
+ * DCPMI; it is then a DCPMI regardless of volume. Below the volume tiers such an
662
+ * organisation is reported as `'listed'` with the fee left at 0 and a note to
663
+ * confirm the applicable tier/fee with the NDPC.
664
+ *
665
+ * @see NDPC General Application and Implementation Directive (GAID) 2025
666
+ * @see NDPC Guidance Notice on the Registration of Data Controllers and Processors of Major Importance
667
+ */
668
+ declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
669
+
443
670
  /** Options for DOCX export of the finalised policy. */
444
671
  declare interface DOCXExportOptions {
445
672
  includeTOC?: boolean;
@@ -1511,6 +1738,14 @@ export declare interface UseAdaptivePolicyWizardReturn {
1511
1738
  */
1512
1739
  export declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
1513
1740
 
1741
+ /**
1742
+ * React hook that memoises the `assessBreachNotification` utility — checks a
1743
+ * breach report's completeness against the NDPA S. 40 / GAID 2025 Article 33
1744
+ * notification requirements (mandated content, the 72-hour window, and any
1745
+ * data-subject communication owed on high risk).
1746
+ */
1747
+ export declare function useBreachNotificationAssessment(report: BreachReport, options?: BreachNotificationOptions): BreachNotificationAssessment;
1748
+
1514
1749
  export declare interface UseBreachOptions {
1515
1750
  /**
1516
1751
  * Available breach categories
@@ -1614,6 +1849,13 @@ export declare interface UseBreachReturn {
1614
1849
  isLoading: boolean;
1615
1850
  }
1616
1851
 
1852
+ /**
1853
+ * React hook that memoises the `generateComplianceAuditReturn` utility — derives
1854
+ * a DCPMI's Compliance Audit Returns schedule (initial-audit due date, next
1855
+ * annual filing deadline) and status under NDPC GAID 2025.
1856
+ */
1857
+ export declare function useComplianceAuditReturn(input: CARInput, options?: CAROptions): ComplianceAuditReturn;
1858
+
1617
1859
  /**
1618
1860
  * Computes an NDPA compliance score and returns a structured report
1619
1861
  * (score, rating, per-module breakdown, recommendations).
@@ -1831,6 +2073,13 @@ export declare interface UseCrossBorderTransferReturn {
1831
2073
  isLoading: boolean;
1832
2074
  }
1833
2075
 
2076
+ /**
2077
+ * React hook that memoises the `classifyDCPMI` utility — derives an organisation's
2078
+ * Data Controller/Processor of Major Importance tier, annual registration fee,
2079
+ * and Compliance Audit Returns obligations under NDPC GAID 2025.
2080
+ */
2081
+ export declare function useDCPMI(input: DCPMIInput, options?: DCPMIClassificationOptions): DCPMIClassification;
2082
+
1834
2083
  /**
1835
2084
  * Convenience wrapper around `usePrivacyPolicy`. With `orgInfo` provided
1836
2085
  * and `autoGenerate` enabled (default), `policy` is non-null on the first
package/dist/hooks.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';require('./chunk-OZCNFB5C.js');var chunkBHUJWWCO_js=require('./chunk-BHUJWWCO.js'),chunkEHQVTFYO_js=require('./chunk-EHQVTFYO.js'),chunkRC3XFXTJ_js=require('./chunk-RC3XFXTJ.js'),chunkQHW4UKGJ_js=require('./chunk-QHW4UKGJ.js'),chunkIRRUYR6M_js=require('./chunk-IRRUYR6M.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkTLIHFGIJ_js=require('./chunk-TLIHFGIJ.js');require('./chunk-JS7SYL5P.js'),require('./chunk-JVMHWM3I.js'),require('./chunk-3YTAOT5O.js'),require('./chunk-D2ZKDQVL.js'),require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js');var chunkQKXGVT2Q_js=require('./chunk-QKXGVT2Q.js'),chunkL2VO3MEJ_js=require('./chunk-L2VO3MEJ.js');require('./chunk-C2KEXHRX.js'),require('./chunk-DKLJ5DYN.js');var chunkTVA6D6S4_js=require('./chunk-TVA6D6S4.js');require('./chunk-R2ZZMATR.js');var chunkJLQT3W3E_js=require('./chunk-JLQT3W3E.js');require('./chunk-TQZWJGJ2.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"useComplianceScore",{enumerable:true,get:function(){return chunkBHUJWWCO_js.a}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkEHQVTFYO_js.a}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.a}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkQHW4UKGJ_js.a}});Object.defineProperty(exports,"useLawfulBasis",{enumerable:true,get:function(){return chunkIRRUYR6M_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkTLIHFGIJ_js.a}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkQKXGVT2Q_js.a}});Object.defineProperty(exports,"useFocusTrap",{enumerable:true,get:function(){return chunkL2VO3MEJ_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkTVA6D6S4_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkJLQT3W3E_js.a}});
2
+ 'use strict';require('./chunk-OVW5ASY3.js');var chunkGYLUTVKB_js=require('./chunk-GYLUTVKB.js'),chunkEHQVTFYO_js=require('./chunk-EHQVTFYO.js'),chunkRC3XFXTJ_js=require('./chunk-RC3XFXTJ.js'),chunkQHW4UKGJ_js=require('./chunk-QHW4UKGJ.js'),chunkIRRUYR6M_js=require('./chunk-IRRUYR6M.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkTLIHFGIJ_js=require('./chunk-TLIHFGIJ.js');require('./chunk-OXFULQTE.js'),require('./chunk-JS7SYL5P.js'),require('./chunk-7TTXS7JX.js'),require('./chunk-3YTAOT5O.js'),require('./chunk-D2ZKDQVL.js'),require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js');var chunkQKXGVT2Q_js=require('./chunk-QKXGVT2Q.js'),chunkL2VO3MEJ_js=require('./chunk-L2VO3MEJ.js');require('./chunk-C2KEXHRX.js'),require('./chunk-DKLJ5DYN.js');var chunkTVA6D6S4_js=require('./chunk-TVA6D6S4.js');require('./chunk-R2ZZMATR.js');var chunkJLQT3W3E_js=require('./chunk-JLQT3W3E.js');require('./chunk-TQZWJGJ2.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"useBreachNotificationAssessment",{enumerable:true,get:function(){return chunkGYLUTVKB_js.a}});Object.defineProperty(exports,"useComplianceAuditReturn",{enumerable:true,get:function(){return chunkGYLUTVKB_js.d}});Object.defineProperty(exports,"useComplianceScore",{enumerable:true,get:function(){return chunkGYLUTVKB_js.b}});Object.defineProperty(exports,"useDCPMI",{enumerable:true,get:function(){return chunkGYLUTVKB_js.c}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkEHQVTFYO_js.a}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.a}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkQHW4UKGJ_js.a}});Object.defineProperty(exports,"useLawfulBasis",{enumerable:true,get:function(){return chunkIRRUYR6M_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkTLIHFGIJ_js.a}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkQKXGVT2Q_js.a}});Object.defineProperty(exports,"useFocusTrap",{enumerable:true,get:function(){return chunkL2VO3MEJ_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkTVA6D6S4_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkJLQT3W3E_js.a}});
package/dist/hooks.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import'./chunk-GQYBS3A7.mjs';export{a as useComplianceScore}from'./chunk-XAB5C2JG.mjs';export{a as useBreach}from'./chunk-RFXGD5NE.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-UVXS7KRV.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-KE2FZH2V.mjs';export{a as useLawfulBasis}from'./chunk-B6BRD5SL.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as useROPA}from'./chunk-FRMVSG4N.mjs';import'./chunk-IVSNHT24.mjs';import'./chunk-YX7DEHPA.mjs';import'./chunk-WTGKZX7J.mjs';import'./chunk-NBQQ2GN3.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';export{a as useConsent}from'./chunk-PQ5IPUJN.mjs';export{a as useFocusTrap}from'./chunk-YTU4FNM2.mjs';import'./chunk-XC3DLYEG.mjs';import'./chunk-R3ZKV2J7.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';import'./chunk-RRVML7CU.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';import'./chunk-LRRENTT5.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
2
+ import'./chunk-YQTZWPOS.mjs';export{a as useBreachNotificationAssessment,d as useComplianceAuditReturn,b as useComplianceScore,c as useDCPMI}from'./chunk-NKFTLFPD.mjs';export{a as useBreach}from'./chunk-RFXGD5NE.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-UVXS7KRV.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-KE2FZH2V.mjs';export{a as useLawfulBasis}from'./chunk-B6BRD5SL.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as useROPA}from'./chunk-FRMVSG4N.mjs';import'./chunk-KOHFQIV4.mjs';import'./chunk-IVSNHT24.mjs';import'./chunk-6A7M4CGJ.mjs';import'./chunk-WTGKZX7J.mjs';import'./chunk-NBQQ2GN3.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';export{a as useConsent}from'./chunk-PQ5IPUJN.mjs';export{a as useFocusTrap}from'./chunk-YTU4FNM2.mjs';import'./chunk-XC3DLYEG.mjs';import'./chunk-R3ZKV2J7.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';import'./chunk-RRVML7CU.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';import'./chunk-LRRENTT5.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';