@tantainnovative/ndpr-toolkit 5.2.0 → 5.4.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 +19 -0
- package/README.md +28 -0
- package/dist/breach.d.mts +9 -0
- package/dist/breach.d.ts +9 -0
- package/dist/breach.js +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/chunk-5ZMYNOMR.mjs +2 -0
- package/dist/chunk-LHQG25Y2.js +2 -0
- package/dist/chunk-SDV2C5OT.mjs +1 -0
- package/dist/chunk-UFTDY43A.js +1 -0
- package/dist/chunk-WJSUVPYX.mjs +1 -0
- package/dist/chunk-Y346CURW.js +1 -0
- package/dist/core.d.mts +93 -0
- package/dist/core.d.ts +93 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/headless.d.mts +364 -5
- package/dist/headless.d.ts +364 -5
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/hooks.d.mts +95 -0
- package/dist/hooks.d.ts +95 -0
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +110 -0
- package/dist/index.d.ts +110 -0
- package/dist/index.js +1 -1
- package/dist/index.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/package.json +1 -1
- package/dist/chunk-6MO3GS3B.js +0 -2
- package/dist/chunk-SDYLKJGC.js +0 -1
- package/dist/chunk-TQCKLZ4F.mjs +0 -1
- package/dist/chunk-WLZTATLL.mjs +0 -2
- /package/dist/{chunk-MR7YZZDU.js → chunk-OVW5ASY3.js} +0 -0
- /package/dist/{chunk-65TYKXUI.mjs → chunk-YQTZWPOS.mjs} +0 -0
package/dist/headless.d.ts
CHANGED
|
@@ -27,9 +27,183 @@ declare interface BreachCategory {
|
|
|
27
27
|
declare type BreachCompositeState = {
|
|
28
28
|
reports: BreachReport[];
|
|
29
29
|
assessments: RiskAssessment[];
|
|
30
|
-
notifications:
|
|
30
|
+
notifications: RegulatoryNotification_2[];
|
|
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
|
+
declare interface BreachNotificationAssessment_2 {
|
|
53
|
+
/** Whether all applicable mandated content items are satisfied. */
|
|
54
|
+
complete: boolean;
|
|
55
|
+
/** Completeness of applicable content items, 0–100. */
|
|
56
|
+
completeness: number;
|
|
57
|
+
/** GAID 2025 Article 33(5) / NDPA S. 40(2) content of the notification to the Commission. */
|
|
58
|
+
notificationToCommission: BreachNotificationItem_2[];
|
|
59
|
+
/** NDPA S. 40(3) communication to data subjects — populated only when high-risk. */
|
|
60
|
+
dataSubjectCommunication: BreachNotificationItem_2[];
|
|
61
|
+
/** Whether a data-subject communication is owed (high risk). */
|
|
62
|
+
dataSubjectCommunicationRequired: boolean;
|
|
63
|
+
timing: BreachNotificationTiming_2;
|
|
64
|
+
/** Labels of unsatisfied applicable items. */
|
|
65
|
+
missing: string[];
|
|
66
|
+
/** Actionable next steps, including timing warnings. */
|
|
67
|
+
recommendations: string[];
|
|
68
|
+
asOf: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare interface BreachNotificationItem {
|
|
72
|
+
/** Stable identifier for the requirement. */
|
|
73
|
+
id: string;
|
|
74
|
+
/** Human-readable requirement. */
|
|
75
|
+
label: string;
|
|
76
|
+
/** Authoritative citation, e.g. `GAID 2025 Art. 33(5)(a)`. */
|
|
77
|
+
section: string;
|
|
78
|
+
/** Whether the report satisfies it. */
|
|
79
|
+
satisfied: boolean;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
declare interface BreachNotificationItem_2 {
|
|
83
|
+
/** Stable identifier for the requirement. */
|
|
84
|
+
id: string;
|
|
85
|
+
/** Human-readable requirement. */
|
|
86
|
+
label: string;
|
|
87
|
+
/** Authoritative citation, e.g. `GAID 2025 Art. 33(5)(a)`. */
|
|
88
|
+
section: string;
|
|
89
|
+
/** Whether the report satisfies it. */
|
|
90
|
+
satisfied: boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Personal-data-breach notification completeness checker for NDPA 2023
|
|
95
|
+
* Section 40, as detailed by NDPC General Application and Implementation
|
|
96
|
+
* Directive (GAID) 2025 Article 33.
|
|
97
|
+
*
|
|
98
|
+
* Section 40(2) requires a data controller to notify the Commission within 72
|
|
99
|
+
* hours of becoming aware of a breach likely to result in a risk to data
|
|
100
|
+
* subjects' rights and freedoms. GAID 2025 Article 33(5)(a)–(h) enumerates the
|
|
101
|
+
* content that a notification to the Commission "shall include". Where the
|
|
102
|
+
* breach is likely to result in a *high* risk, Section 40(3) additionally
|
|
103
|
+
* requires the controller to communicate the breach to affected data subjects
|
|
104
|
+
* in plain and clear language.
|
|
105
|
+
*
|
|
106
|
+
* This assesses a `BreachReport` against those requirements: which mandated
|
|
107
|
+
* content items are present, whether the 72-hour window is met, and whether a
|
|
108
|
+
* data-subject communication is owed. It is a documentation-completeness aid,
|
|
109
|
+
* not legal advice — verify against current NDPC guidance.
|
|
110
|
+
*
|
|
111
|
+
* @see NDPA 2023 Section 40 (Personal data breaches)
|
|
112
|
+
* @see NDPC GAID 2025 Article 33 (Data Breach Notification)
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
export declare interface BreachNotificationOptions {
|
|
116
|
+
/** Risk assessment for the breach; drives whether data-subject communication is required. */
|
|
117
|
+
assessment?: RiskAssessment;
|
|
118
|
+
/** The regulatory notification actually sent, if any — used to judge timeliness. */
|
|
119
|
+
notification?: RegulatoryNotification_2;
|
|
120
|
+
/** Reference "now" in epoch ms. Defaults to `Date.now()`. */
|
|
121
|
+
asOf?: number;
|
|
122
|
+
/** Notification window in hours. Defaults to 72 (NDPA S. 40(2)). */
|
|
123
|
+
deadlineHours?: number;
|
|
124
|
+
/**
|
|
125
|
+
* Explicit high-risk flag (NDPA S. 40(3)). When omitted, derived from
|
|
126
|
+
* `assessment.highRisksToRightsAndFreedoms`.
|
|
127
|
+
*/
|
|
128
|
+
highRisk?: boolean;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Personal-data-breach notification completeness checker for NDPA 2023
|
|
133
|
+
* Section 40, as detailed by NDPC General Application and Implementation
|
|
134
|
+
* Directive (GAID) 2025 Article 33.
|
|
135
|
+
*
|
|
136
|
+
* Section 40(2) requires a data controller to notify the Commission within 72
|
|
137
|
+
* hours of becoming aware of a breach likely to result in a risk to data
|
|
138
|
+
* subjects' rights and freedoms. GAID 2025 Article 33(5)(a)–(h) enumerates the
|
|
139
|
+
* content that a notification to the Commission "shall include". Where the
|
|
140
|
+
* breach is likely to result in a *high* risk, Section 40(3) additionally
|
|
141
|
+
* requires the controller to communicate the breach to affected data subjects
|
|
142
|
+
* in plain and clear language.
|
|
143
|
+
*
|
|
144
|
+
* This assesses a `BreachReport` against those requirements: which mandated
|
|
145
|
+
* content items are present, whether the 72-hour window is met, and whether a
|
|
146
|
+
* data-subject communication is owed. It is a documentation-completeness aid,
|
|
147
|
+
* not legal advice — verify against current NDPC guidance.
|
|
148
|
+
*
|
|
149
|
+
* @see NDPA 2023 Section 40 (Personal data breaches)
|
|
150
|
+
* @see NDPC GAID 2025 Article 33 (Data Breach Notification)
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
declare interface BreachNotificationOptions_2 {
|
|
154
|
+
/** Risk assessment for the breach; drives whether data-subject communication is required. */
|
|
155
|
+
assessment?: RiskAssessment_2;
|
|
156
|
+
/** The regulatory notification actually sent, if any — used to judge timeliness. */
|
|
157
|
+
notification?: RegulatoryNotification;
|
|
158
|
+
/** Reference "now" in epoch ms. Defaults to `Date.now()`. */
|
|
159
|
+
asOf?: number;
|
|
160
|
+
/** Notification window in hours. Defaults to 72 (NDPA S. 40(2)). */
|
|
161
|
+
deadlineHours?: number;
|
|
162
|
+
/**
|
|
163
|
+
* Explicit high-risk flag (NDPA S. 40(3)). When omitted, derived from
|
|
164
|
+
* `assessment.highRisksToRightsAndFreedoms`.
|
|
165
|
+
*/
|
|
166
|
+
highRisk?: boolean;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export declare interface BreachNotificationTiming {
|
|
170
|
+
/** `discoveredAt` + the notification window. */
|
|
171
|
+
deadline: number;
|
|
172
|
+
/** Whole hours between discovery and `asOf`. */
|
|
173
|
+
hoursSinceDiscovery: number;
|
|
174
|
+
/** Whether a regulatory notification has been recorded. */
|
|
175
|
+
notified: boolean;
|
|
176
|
+
/** When the regulatory notification was sent, if any. */
|
|
177
|
+
notifiedAt?: number;
|
|
178
|
+
/** Whether the notification (or, if none, `asOf`) falls within the deadline. */
|
|
179
|
+
withinDeadline: boolean;
|
|
180
|
+
/** Whole hours from `asOf` to the deadline (negative once past). */
|
|
181
|
+
hoursRemaining: number;
|
|
182
|
+
/** Whether the deadline has been missed. */
|
|
183
|
+
overdue: boolean;
|
|
184
|
+
/** Late filings must state the reasons for the delay (NDPA S. 40(2)). */
|
|
185
|
+
requiresDelayJustification: boolean;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
declare interface BreachNotificationTiming_2 {
|
|
189
|
+
/** `discoveredAt` + the notification window. */
|
|
190
|
+
deadline: number;
|
|
191
|
+
/** Whole hours between discovery and `asOf`. */
|
|
192
|
+
hoursSinceDiscovery: number;
|
|
193
|
+
/** Whether a regulatory notification has been recorded. */
|
|
194
|
+
notified: boolean;
|
|
195
|
+
/** When the regulatory notification was sent, if any. */
|
|
196
|
+
notifiedAt?: number;
|
|
197
|
+
/** Whether the notification (or, if none, `asOf`) falls within the deadline. */
|
|
198
|
+
withinDeadline: boolean;
|
|
199
|
+
/** Whole hours from `asOf` to the deadline (negative once past). */
|
|
200
|
+
hoursRemaining: number;
|
|
201
|
+
/** Whether the deadline has been missed. */
|
|
202
|
+
overdue: boolean;
|
|
203
|
+
/** Late filings must state the reasons for the delay (NDPA S. 40(2)). */
|
|
204
|
+
requiresDelayJustification: boolean;
|
|
205
|
+
}
|
|
206
|
+
|
|
33
207
|
/**
|
|
34
208
|
* Represents a data breach report
|
|
35
209
|
*/
|
|
@@ -118,6 +292,94 @@ export declare interface BreachReport {
|
|
|
118
292
|
}>;
|
|
119
293
|
}
|
|
120
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Represents a data breach report
|
|
297
|
+
*/
|
|
298
|
+
declare interface BreachReport_2 {
|
|
299
|
+
/** Unique identifier for the breach report */
|
|
300
|
+
id: string;
|
|
301
|
+
/** Title/summary of the breach */
|
|
302
|
+
title: string;
|
|
303
|
+
/** Detailed description of the breach */
|
|
304
|
+
description: string;
|
|
305
|
+
/** Category of the breach */
|
|
306
|
+
category: string;
|
|
307
|
+
/** Timestamp when the breach was discovered */
|
|
308
|
+
discoveredAt: number;
|
|
309
|
+
/** Timestamp when the breach occurred (if known) */
|
|
310
|
+
occurredAt?: number;
|
|
311
|
+
/** Timestamp when the breach was reported internally */
|
|
312
|
+
reportedAt: number;
|
|
313
|
+
/** Person who reported the breach */
|
|
314
|
+
reporter: {
|
|
315
|
+
name: string;
|
|
316
|
+
email: string;
|
|
317
|
+
department: string;
|
|
318
|
+
phone?: string;
|
|
319
|
+
};
|
|
320
|
+
/** Systems or data affected by the breach */
|
|
321
|
+
affectedSystems: string[];
|
|
322
|
+
/** Types of data involved in the breach */
|
|
323
|
+
dataTypes: string[];
|
|
324
|
+
/** Whether sensitive personal data is involved (NDPA Section 30) */
|
|
325
|
+
involvesSensitiveData?: boolean;
|
|
326
|
+
/** Estimated number of data subjects affected */
|
|
327
|
+
estimatedAffectedSubjects?: number;
|
|
328
|
+
/**
|
|
329
|
+
* Approximate number of personal data RECORDS concerned (distinct from subject count).
|
|
330
|
+
* Required content under NDPA Section 40(1)(a) and Section 40(2).
|
|
331
|
+
*/
|
|
332
|
+
approximateRecordCount?: number;
|
|
333
|
+
/**
|
|
334
|
+
* Categories of data subjects affected (e.g. customers, employees, minors, patients).
|
|
335
|
+
* Required content under NDPA Section 40(1)(a) and Section 40(2).
|
|
336
|
+
*/
|
|
337
|
+
dataSubjectCategories?: string[];
|
|
338
|
+
/**
|
|
339
|
+
* Likely consequences of the breach for affected data subjects (e.g. identity theft,
|
|
340
|
+
* financial loss, reputational damage). Reported to the NDPC and, where applicable,
|
|
341
|
+
* communicated to data subjects under Section 40(3).
|
|
342
|
+
*/
|
|
343
|
+
likelyConsequences?: string;
|
|
344
|
+
/**
|
|
345
|
+
* Measures taken or proposed to mitigate adverse effects of the breach.
|
|
346
|
+
* Required content for Section 40(3) communications to data subjects.
|
|
347
|
+
*/
|
|
348
|
+
mitigationMeasures?: string;
|
|
349
|
+
/**
|
|
350
|
+
* Whether this is a phased / interim report submitted before full investigation
|
|
351
|
+
* is complete. The NDPC permits phased reporting where complete information is
|
|
352
|
+
* not available within 72 hours.
|
|
353
|
+
*/
|
|
354
|
+
isPhasedReport?: boolean;
|
|
355
|
+
/**
|
|
356
|
+
* ID of the prior phased report this report supplements, if any.
|
|
357
|
+
*/
|
|
358
|
+
supplementsReportId?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Data Protection Officer contact details. The DPO is the named contact point
|
|
361
|
+
* for the NDPC per NDPA Section 32(3)(c). Required content in the regulatory
|
|
362
|
+
* report (Section 40(2)).
|
|
363
|
+
*/
|
|
364
|
+
dpoContact?: {
|
|
365
|
+
name: string;
|
|
366
|
+
email: string;
|
|
367
|
+
phone?: string;
|
|
368
|
+
};
|
|
369
|
+
/** Whether the breach is ongoing or contained */
|
|
370
|
+
status: 'ongoing' | 'contained' | 'resolved';
|
|
371
|
+
/** Initial actions taken to address the breach */
|
|
372
|
+
initialActions?: string;
|
|
373
|
+
/** Attachments related to the breach */
|
|
374
|
+
attachments?: Array<{
|
|
375
|
+
id: string;
|
|
376
|
+
name: string;
|
|
377
|
+
type: string;
|
|
378
|
+
url: string;
|
|
379
|
+
addedAt: number;
|
|
380
|
+
}>;
|
|
381
|
+
}
|
|
382
|
+
|
|
121
383
|
/**
|
|
122
384
|
* Compliance Audit Returns (CAR) scheduling under the NDPC General Application
|
|
123
385
|
* and Implementation Directive (GAID) 2025.
|
|
@@ -1594,6 +1856,57 @@ declare interface RegulatoryNotification {
|
|
|
1594
1856
|
};
|
|
1595
1857
|
}
|
|
1596
1858
|
|
|
1859
|
+
/**
|
|
1860
|
+
* Represents a notification sent to the NDPC (Nigeria Data Protection Commission)
|
|
1861
|
+
*/
|
|
1862
|
+
declare interface RegulatoryNotification_2 {
|
|
1863
|
+
/** Unique identifier for the notification */
|
|
1864
|
+
id: string;
|
|
1865
|
+
/** ID of the breach this notification is for */
|
|
1866
|
+
breachId: string;
|
|
1867
|
+
/** Timestamp when the notification was sent */
|
|
1868
|
+
sentAt: number;
|
|
1869
|
+
/** Method used to send the notification */
|
|
1870
|
+
method: 'email' | 'portal' | 'letter' | 'other';
|
|
1871
|
+
/** Reference number assigned by the NDPC (if available) */
|
|
1872
|
+
referenceNumber?: string;
|
|
1873
|
+
/** Contact person at the NDPC */
|
|
1874
|
+
ndpcContact?: {
|
|
1875
|
+
name: string;
|
|
1876
|
+
email: string;
|
|
1877
|
+
phone?: string;
|
|
1878
|
+
};
|
|
1879
|
+
/** Content of the notification */
|
|
1880
|
+
content: string;
|
|
1881
|
+
/** Attachments included with the notification */
|
|
1882
|
+
attachments?: Array<{
|
|
1883
|
+
id: string;
|
|
1884
|
+
name: string;
|
|
1885
|
+
type: string;
|
|
1886
|
+
url: string;
|
|
1887
|
+
}>;
|
|
1888
|
+
/** Follow-up communications with the NDPC */
|
|
1889
|
+
followUps?: Array<{
|
|
1890
|
+
timestamp: number;
|
|
1891
|
+
direction: 'sent' | 'received';
|
|
1892
|
+
content: string;
|
|
1893
|
+
attachments?: Array<{
|
|
1894
|
+
id: string;
|
|
1895
|
+
name: string;
|
|
1896
|
+
type: string;
|
|
1897
|
+
url: string;
|
|
1898
|
+
}>;
|
|
1899
|
+
}>;
|
|
1900
|
+
/**
|
|
1901
|
+
* @deprecated Use ndpcContact instead. Kept for backward compatibility.
|
|
1902
|
+
*/
|
|
1903
|
+
nitdaContact?: {
|
|
1904
|
+
name: string;
|
|
1905
|
+
email: string;
|
|
1906
|
+
phone?: string;
|
|
1907
|
+
};
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1597
1910
|
declare interface RegulatoryReference {
|
|
1598
1911
|
section: string;
|
|
1599
1912
|
title: string;
|
|
@@ -1684,6 +1997,44 @@ export declare interface RiskAssessment {
|
|
|
1684
1997
|
justification: string;
|
|
1685
1998
|
}
|
|
1686
1999
|
|
|
2000
|
+
/**
|
|
2001
|
+
* Represents a risk assessment for a data breach
|
|
2002
|
+
*/
|
|
2003
|
+
declare interface RiskAssessment_2 {
|
|
2004
|
+
/** Unique identifier for the risk assessment */
|
|
2005
|
+
id: string;
|
|
2006
|
+
/** ID of the breach this assessment is for */
|
|
2007
|
+
breachId: string;
|
|
2008
|
+
/** Timestamp when the assessment was conducted */
|
|
2009
|
+
assessedAt: number;
|
|
2010
|
+
/** Person who conducted the assessment */
|
|
2011
|
+
assessor: {
|
|
2012
|
+
name: string;
|
|
2013
|
+
role: string;
|
|
2014
|
+
email: string;
|
|
2015
|
+
};
|
|
2016
|
+
/** Confidentiality impact (1-5) */
|
|
2017
|
+
confidentialityImpact: number;
|
|
2018
|
+
/** Integrity impact (1-5) */
|
|
2019
|
+
integrityImpact: number;
|
|
2020
|
+
/** Availability impact (1-5) */
|
|
2021
|
+
availabilityImpact: number;
|
|
2022
|
+
/** Likelihood of harm to data subjects (1-5) */
|
|
2023
|
+
harmLikelihood: number;
|
|
2024
|
+
/** Severity of potential harm to data subjects (1-5) */
|
|
2025
|
+
harmSeverity: number;
|
|
2026
|
+
/** Overall risk score */
|
|
2027
|
+
overallRiskScore: number;
|
|
2028
|
+
/** Risk level based on the overall score */
|
|
2029
|
+
riskLevel: 'low' | 'medium' | 'high' | 'critical';
|
|
2030
|
+
/** Whether the breach is likely to result in a risk to rights and freedoms */
|
|
2031
|
+
risksToRightsAndFreedoms: boolean;
|
|
2032
|
+
/** Whether the breach is likely to result in a high risk to rights and freedoms */
|
|
2033
|
+
highRisksToRightsAndFreedoms: boolean;
|
|
2034
|
+
/** Justification for the risk assessment */
|
|
2035
|
+
justification: string;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
1687
2038
|
/**
|
|
1688
2039
|
* Compliance gap found in a processing record
|
|
1689
2040
|
*/
|
|
@@ -1905,6 +2256,14 @@ export declare interface UseAdaptivePolicyWizardReturn {
|
|
|
1905
2256
|
*/
|
|
1906
2257
|
export declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
|
|
1907
2258
|
|
|
2259
|
+
/**
|
|
2260
|
+
* React hook that memoises the `assessBreachNotification` utility — checks a
|
|
2261
|
+
* breach report's completeness against the NDPA S. 40 / GAID 2025 Article 33
|
|
2262
|
+
* notification requirements (mandated content, the 72-hour window, and any
|
|
2263
|
+
* data-subject communication owed on high risk).
|
|
2264
|
+
*/
|
|
2265
|
+
export declare function useBreachNotificationAssessment(report: BreachReport_2, options?: BreachNotificationOptions_2): BreachNotificationAssessment_2;
|
|
2266
|
+
|
|
1908
2267
|
export declare interface UseBreachOptions {
|
|
1909
2268
|
/**
|
|
1910
2269
|
* Available breach categories
|
|
@@ -1941,7 +2300,7 @@ export declare interface UseBreachOptions {
|
|
|
1941
2300
|
/**
|
|
1942
2301
|
* Callback function called when a notification is sent
|
|
1943
2302
|
*/
|
|
1944
|
-
onNotification?: (notification:
|
|
2303
|
+
onNotification?: (notification: RegulatoryNotification_2) => void;
|
|
1945
2304
|
}
|
|
1946
2305
|
|
|
1947
2306
|
export declare interface UseBreachReturn {
|
|
@@ -1956,7 +2315,7 @@ export declare interface UseBreachReturn {
|
|
|
1956
2315
|
/**
|
|
1957
2316
|
* All regulatory notifications
|
|
1958
2317
|
*/
|
|
1959
|
-
notifications:
|
|
2318
|
+
notifications: RegulatoryNotification_2[];
|
|
1960
2319
|
/**
|
|
1961
2320
|
* Submit a new breach report
|
|
1962
2321
|
*/
|
|
@@ -1984,11 +2343,11 @@ export declare interface UseBreachReturn {
|
|
|
1984
2343
|
/**
|
|
1985
2344
|
* Send a regulatory notification
|
|
1986
2345
|
*/
|
|
1987
|
-
sendNotification: (breachId: string, notificationData: Omit<
|
|
2346
|
+
sendNotification: (breachId: string, notificationData: Omit<RegulatoryNotification_2, 'id' | 'breachId' | 'sentAt'>) => RegulatoryNotification_2;
|
|
1988
2347
|
/**
|
|
1989
2348
|
* Get a regulatory notification for a breach
|
|
1990
2349
|
*/
|
|
1991
|
-
getNotification: (breachId: string) =>
|
|
2350
|
+
getNotification: (breachId: string) => RegulatoryNotification_2 | null;
|
|
1992
2351
|
/**
|
|
1993
2352
|
* Get breaches that require notification within the next X hours
|
|
1994
2353
|
*/
|
package/dist/headless.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';require('./chunk-
|
|
2
|
+
'use strict';require('./chunk-OVW5ASY3.js');var chunkUFTDY43A_js=require('./chunk-UFTDY43A.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-WKY26JLT.js'),require('./chunk-Y346CURW.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 chunkUFTDY43A_js.a}});Object.defineProperty(exports,"useComplianceAuditReturn",{enumerable:true,get:function(){return chunkUFTDY43A_js.d}});Object.defineProperty(exports,"useComplianceScore",{enumerable:true,get:function(){return chunkUFTDY43A_js.b}});Object.defineProperty(exports,"useDCPMI",{enumerable:true,get:function(){return chunkUFTDY43A_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-
|
|
2
|
+
import'./chunk-YQTZWPOS.mjs';export{a as useBreachNotificationAssessment,d as useComplianceAuditReturn,b as useComplianceScore,c as useDCPMI}from'./chunk-SDV2C5OT.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-SZXHNJGG.mjs';import'./chunk-WJSUVPYX.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
|
*/
|
|
@@ -1651,6 +1738,14 @@ export declare interface UseAdaptivePolicyWizardReturn {
|
|
|
1651
1738
|
*/
|
|
1652
1739
|
export declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
|
|
1653
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
|
+
|
|
1654
1749
|
export declare interface UseBreachOptions {
|
|
1655
1750
|
/**
|
|
1656
1751
|
* Available breach categories
|
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
|
*/
|
|
@@ -1651,6 +1738,14 @@ export declare interface UseAdaptivePolicyWizardReturn {
|
|
|
1651
1738
|
*/
|
|
1652
1739
|
export declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
|
|
1653
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
|
+
|
|
1654
1749
|
export declare interface UseBreachOptions {
|
|
1655
1750
|
/**
|
|
1656
1751
|
* Available breach categories
|