@tantainnovative/ndpr-toolkit 3.4.0 → 3.5.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 +25 -0
- package/README.md +80 -38
- package/dist/adapters.d.mts +34 -25
- package/dist/adapters.d.ts +34 -25
- package/dist/breach.d.mts +803 -44
- package/dist/breach.d.ts +803 -44
- package/dist/breach.js +2 -1
- package/dist/breach.mjs +2 -1
- package/dist/{chunk-2WH4DLV5.js → chunk-3EGQWLJ6.js} +3 -3
- package/dist/chunk-B4Z5MBUC.mjs +2 -0
- package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
- package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
- package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
- package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
- package/dist/{chunk-KSERBMXW.mjs → chunk-F5TXUA4O.mjs} +3 -3
- package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
- package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
- package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
- package/dist/{chunk-MG73MOZC.mjs → chunk-I557S566.mjs} +2 -2
- package/dist/{chunk-QVULSG6J.mjs → chunk-ID2NYIVE.mjs} +3 -3
- package/dist/chunk-J5WCPZLW.js +2 -0
- package/dist/{chunk-4R42ZNO7.mjs → chunk-JFFOPHU3.mjs} +57 -57
- package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
- package/dist/chunk-LU7PKE7Y.mjs +2 -0
- package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
- package/dist/{chunk-XMBSJJ5U.js → chunk-ORFC66EA.js} +3 -3
- package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
- package/dist/chunk-SCWNM4PC.mjs +2 -0
- package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
- package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
- package/dist/chunk-TV4U6AIS.js +2 -0
- package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
- package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
- package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
- package/dist/{chunk-RNTNHVKZ.js → chunk-YPKUHSK4.js} +2 -2
- package/dist/{chunk-UFPSUO52.js → chunk-Z73T6MWY.js} +57 -57
- package/dist/consent.d.mts +648 -84
- package/dist/consent.d.ts +648 -84
- package/dist/consent.js +2 -1
- package/dist/consent.mjs +2 -1
- package/dist/core.d.mts +2049 -23
- package/dist/core.d.ts +2049 -23
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border.d.mts +470 -99
- package/dist/cross-border.d.ts +470 -99
- package/dist/cross-border.js +1 -0
- package/dist/cross-border.mjs +1 -0
- package/dist/dpia.d.mts +591 -37
- package/dist/dpia.d.ts +591 -37
- package/dist/dpia.js +1 -0
- package/dist/dpia.mjs +1 -0
- package/dist/dsr.d.mts +654 -37
- package/dist/dsr.d.ts +654 -37
- package/dist/dsr.js +2 -1
- package/dist/dsr.mjs +2 -1
- package/dist/hooks.d.mts +2174 -30
- package/dist/hooks.d.ts +2174 -30
- package/dist/hooks.js +2 -1
- package/dist/hooks.mjs +2 -1
- package/dist/index.d.mts +4428 -43
- package/dist/index.d.ts +4428 -43
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/dist/lawful-basis.d.mts +368 -32
- package/dist/lawful-basis.d.ts +368 -32
- package/dist/lawful-basis.js +1 -0
- package/dist/lawful-basis.mjs +1 -0
- package/dist/policy.d.mts +1178 -83
- package/dist/policy.d.ts +1178 -83
- package/dist/policy.js +2 -1
- package/dist/policy.mjs +2 -1
- package/dist/presets.d.mts +1020 -114
- package/dist/presets.d.ts +1020 -114
- package/dist/presets.js +2 -1
- package/dist/presets.mjs +2 -1
- package/dist/ropa.d.mts +396 -31
- package/dist/ropa.d.ts +396 -31
- package/dist/ropa.js +2 -1
- package/dist/ropa.mjs +2 -1
- package/dist/server.d.mts +2133 -24
- package/dist/server.d.ts +2133 -24
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/unstyled.d.mts +523 -55
- package/dist/unstyled.d.ts +523 -55
- package/dist/unstyled.js +2 -1
- package/dist/unstyled.mjs +2 -1
- package/package.json +3 -3
- package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
- package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
- package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
- package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
- package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
- package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
- package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
- package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
- package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
- package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
- package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
- package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
- package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
- package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
- package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
- package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
- package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
- package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
- package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
- package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
- package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
- package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
- package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
- package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
- package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
- package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
- package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
- package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
- package/dist/breach-B_-6lDqS.d.mts +0 -17
- package/dist/breach-CzXqSsaY.d.ts +0 -17
- package/dist/breach-Eu9byel8.d.mts +0 -185
- package/dist/breach-Eu9byel8.d.ts +0 -185
- package/dist/chunk-5X32J5IA.mjs +0 -2
- package/dist/chunk-7D2OIPHH.mjs +0 -2
- package/dist/chunk-JKKRPS4P.js +0 -2
- package/dist/chunk-NCOZB2WU.mjs +0 -2
- package/dist/chunk-RGNP45VR.js +0 -2
- package/dist/compliance-score-racQe_E_.d.mts +0 -115
- package/dist/compliance-score-racQe_E_.d.ts +0 -115
- package/dist/consent-CmVzqZUk.d.mts +0 -99
- package/dist/consent-CmVzqZUk.d.ts +0 -99
- package/dist/consent-audit-BdByjYlM.d.mts +0 -65
- package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
- package/dist/cross-border-BBi9rZyO.d.mts +0 -54
- package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
- package/dist/cross-border-UyT00llA.d.mts +0 -141
- package/dist/cross-border-UyT00llA.d.ts +0 -141
- package/dist/docx-BxKascXN.d.ts +0 -64
- package/dist/docx-CV7Vsry_.d.mts +0 -64
- package/dist/dpia-D82hUrJe.d.ts +0 -15
- package/dist/dpia-DQDFw2_l.d.mts +0 -15
- package/dist/dpia-c9GiiOq0.d.mts +0 -137
- package/dist/dpia-c9GiiOq0.d.ts +0 -137
- package/dist/dsr-CIx5sd7e.d.ts +0 -14
- package/dist/dsr-XZ_HqTlA.d.mts +0 -14
- package/dist/dsr-yKbqX531.d.mts +0 -128
- package/dist/dsr-yKbqX531.d.ts +0 -128
- package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
- package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
- package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
- package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
- package/dist/locale-CxJx2tzn.d.mts +0 -25
- package/dist/locale-DSkrtf-c.d.ts +0 -25
- package/dist/policy-engine-CCUCud2T.d.ts +0 -154
- package/dist/policy-engine-fYSqEqSW.d.mts +0 -154
- package/dist/policy-sections-BYx6fEFk.d.ts +0 -56
- package/dist/policy-sections-Dm97Nq8m.d.mts +0 -56
- package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
- package/dist/policy-templates-DwYl2329.d.mts +0 -43
- package/dist/privacy-Ca6te9Ir.d.mts +0 -138
- package/dist/privacy-Ca6te9Ir.d.ts +0 -138
- package/dist/ropa-BDTM06tr.d.ts +0 -152
- package/dist/ropa-CFHuT7jE.d.mts +0 -152
- package/dist/ropa-CyynscU6.d.ts +0 -51
- package/dist/ropa-NIgxd8uP.d.mts +0 -51
- package/dist/sanitize-CxxwKxAx.d.mts +0 -94
- package/dist/sanitize-CxxwKxAx.d.ts +0 -94
- package/dist/styling-BMDGQDgS.d.mts +0 -64
- package/dist/styling-BaoQtV06.d.ts +0 -64
- package/dist/types-DK2CoKOC.d.mts +0 -10
- package/dist/types-DK2CoKOC.d.ts +0 -10
- package/dist/useAdaptivePolicyWizard-BnjW4OR4.d.mts +0 -52
- package/dist/useAdaptivePolicyWizard-sb3m4-Zk.d.ts +0 -52
- package/dist/useBreach-CPr86Yan.d.mts +0 -115
- package/dist/useBreach-DkVXvtJK.d.ts +0 -115
- package/dist/useConsent-DCNkIJHR.d.mts +0 -75
- package/dist/useConsent-dOcELSfX.d.ts +0 -75
- package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
- package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
- package/dist/useDPIA-B6180UQn.d.mts +0 -109
- package/dist/useDPIA-CTqbNbww.d.ts +0 -109
- package/dist/useDSR-WvHk8_iu.d.mts +0 -85
- package/dist/useDSR-wH4H6hSM.d.ts +0 -85
- package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
- package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
- package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
- package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
- package/dist/useROPA-BSSU1rfx.d.ts +0 -76
- package/dist/useROPA-C2hjaBTz.d.mts +0 -76
package/dist/breach.d.ts
CHANGED
|
@@ -1,44 +1,803 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
declare
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
export
|
|
1
|
+
import * as React_2 from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
export declare const Breach: {
|
|
5
|
+
Provider: React_2.FC<BreachProviderProps>;
|
|
6
|
+
ReportForm: React_2.FC<BreachReportFormProps>;
|
|
7
|
+
RiskAssessment: React_2.FC<BreachRiskAssessmentProps>;
|
|
8
|
+
NotificationManager: React_2.FC<BreachNotificationManagerProps>;
|
|
9
|
+
ReportGenerator: React_2.FC<RegulatoryReportGeneratorProps>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Breach notification types aligned with NDPA 2023 Section 40
|
|
14
|
+
* Data controllers must notify the NDPC within 72 hours of becoming aware of a breach
|
|
15
|
+
* Data subjects must be notified without undue delay when breach is likely to result in high risk
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Represents a data breach category
|
|
19
|
+
*/
|
|
20
|
+
export declare interface BreachCategory {
|
|
21
|
+
/** Unique identifier for the category */
|
|
22
|
+
id: string;
|
|
23
|
+
/** Display name for the category */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Description of this breach category */
|
|
26
|
+
description: string;
|
|
27
|
+
/** Default severity level for this category */
|
|
28
|
+
defaultSeverity: 'low' | 'medium' | 'high' | 'critical';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare type BreachCompositeState = {
|
|
32
|
+
reports: BreachReport[];
|
|
33
|
+
assessments: RiskAssessment[];
|
|
34
|
+
notifications: RegulatoryNotification[];
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
declare interface BreachContextValue extends UseBreachReturn {
|
|
38
|
+
categories: BreachCategory[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Represents the data submitted by the breach report form.
|
|
43
|
+
*/
|
|
44
|
+
export declare interface BreachFormSubmission {
|
|
45
|
+
/** Title/summary of the breach */
|
|
46
|
+
title: string;
|
|
47
|
+
/** Detailed description of the breach */
|
|
48
|
+
description: string;
|
|
49
|
+
/** Breach category identifier */
|
|
50
|
+
category: string;
|
|
51
|
+
/** Timestamp (ms) when the breach was discovered */
|
|
52
|
+
discoveredAt: number;
|
|
53
|
+
/** Timestamp (ms) when the breach occurred (if known) */
|
|
54
|
+
occurredAt?: number;
|
|
55
|
+
/** Timestamp (ms) when the form was submitted */
|
|
56
|
+
reportedAt: number;
|
|
57
|
+
/** Person reporting the breach */
|
|
58
|
+
reporter: {
|
|
59
|
+
name: string;
|
|
60
|
+
email: string;
|
|
61
|
+
department: string;
|
|
62
|
+
phone?: string;
|
|
63
|
+
};
|
|
64
|
+
/** Systems or applications affected by the breach */
|
|
65
|
+
affectedSystems: string[];
|
|
66
|
+
/** Types of data involved in the breach */
|
|
67
|
+
dataTypes: string[];
|
|
68
|
+
/** Estimated number of affected data subjects */
|
|
69
|
+
estimatedAffectedSubjects?: number;
|
|
70
|
+
/** Current status of the breach */
|
|
71
|
+
status: 'ongoing' | 'contained' | 'resolved';
|
|
72
|
+
/** Initial actions taken to address the breach */
|
|
73
|
+
initialActions?: string;
|
|
74
|
+
/** File attachments included with the report */
|
|
75
|
+
attachments: Array<{
|
|
76
|
+
name: string;
|
|
77
|
+
type: string;
|
|
78
|
+
size: number;
|
|
79
|
+
file: File;
|
|
80
|
+
}>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Breach notification management component. Implements NDPA Section 40 requirements for
|
|
85
|
+
* managing breach notifications, tracking 72-hour NDPC reporting deadlines, and coordinating
|
|
86
|
+
* data subject notifications.
|
|
87
|
+
*/
|
|
88
|
+
export declare const BreachNotificationManager: React__default.FC<BreachNotificationManagerProps>;
|
|
89
|
+
|
|
90
|
+
export declare interface BreachNotificationManagerClassNames {
|
|
91
|
+
root?: string;
|
|
92
|
+
header?: string;
|
|
93
|
+
title?: string;
|
|
94
|
+
breachList?: string;
|
|
95
|
+
breachItem?: string;
|
|
96
|
+
statusBadge?: string;
|
|
97
|
+
timeline?: string;
|
|
98
|
+
timelineStep?: string;
|
|
99
|
+
detailPanel?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
declare interface BreachNotificationManagerProps {
|
|
103
|
+
/**
|
|
104
|
+
* List of breach reports to manage
|
|
105
|
+
*/
|
|
106
|
+
breachReports: BreachReport[];
|
|
107
|
+
/**
|
|
108
|
+
* List of risk assessments
|
|
109
|
+
*/
|
|
110
|
+
riskAssessments: RiskAssessment[];
|
|
111
|
+
/**
|
|
112
|
+
* List of regulatory notifications
|
|
113
|
+
*/
|
|
114
|
+
regulatoryNotifications: RegulatoryNotification[];
|
|
115
|
+
/**
|
|
116
|
+
* Callback function called when a breach is selected
|
|
117
|
+
*/
|
|
118
|
+
onSelectBreach?: (breachId: string) => void;
|
|
119
|
+
/**
|
|
120
|
+
* Callback function called when a risk assessment is requested
|
|
121
|
+
*/
|
|
122
|
+
onRequestAssessment?: (breachId: string) => void;
|
|
123
|
+
/**
|
|
124
|
+
* Callback function called when a notification is requested
|
|
125
|
+
*/
|
|
126
|
+
onRequestNotification?: (breachId: string) => void;
|
|
127
|
+
/**
|
|
128
|
+
* Title displayed on the manager
|
|
129
|
+
* @default "Breach Notification Manager"
|
|
130
|
+
*/
|
|
131
|
+
title?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Description text displayed on the manager
|
|
134
|
+
* @default "Manage data breach notifications and track compliance with NDPA Section 40 requirements."
|
|
135
|
+
*/
|
|
136
|
+
description?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Custom CSS class for the manager
|
|
139
|
+
*/
|
|
140
|
+
className?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Custom CSS class for the buttons
|
|
143
|
+
*/
|
|
144
|
+
buttonClassName?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Override class names for individual elements
|
|
147
|
+
*/
|
|
148
|
+
classNames?: BreachNotificationManagerClassNames;
|
|
149
|
+
/**
|
|
150
|
+
* Remove all default styles, only applying classNames overrides
|
|
151
|
+
*/
|
|
152
|
+
unstyled?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Whether to show the breach details
|
|
155
|
+
* @default true
|
|
156
|
+
*/
|
|
157
|
+
showBreachDetails?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Whether to show the notification timeline
|
|
160
|
+
* @default true
|
|
161
|
+
*/
|
|
162
|
+
showNotificationTimeline?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Whether to show the deadline alerts
|
|
165
|
+
* @default true
|
|
166
|
+
*/
|
|
167
|
+
showDeadlineAlerts?: boolean;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export declare const BreachProvider: React__default.FC<BreachProviderProps>;
|
|
171
|
+
|
|
172
|
+
export declare interface BreachProviderProps {
|
|
173
|
+
categories: BreachCategory[];
|
|
174
|
+
adapter?: StorageAdapter<{
|
|
175
|
+
reports: BreachReport[];
|
|
176
|
+
assessments: RiskAssessment[];
|
|
177
|
+
notifications: RegulatoryNotification[];
|
|
178
|
+
}>;
|
|
179
|
+
storageKey?: string;
|
|
180
|
+
useLocalStorage?: boolean;
|
|
181
|
+
initialReports?: BreachReport[];
|
|
182
|
+
onReport?: (report: BreachReport) => void;
|
|
183
|
+
onAssessment?: (assessment: RiskAssessment) => void;
|
|
184
|
+
onNotification?: (notification: RegulatoryNotification) => void;
|
|
185
|
+
children: React__default.ReactNode;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Represents a data breach report
|
|
190
|
+
*/
|
|
191
|
+
export declare interface BreachReport {
|
|
192
|
+
/** Unique identifier for the breach report */
|
|
193
|
+
id: string;
|
|
194
|
+
/** Title/summary of the breach */
|
|
195
|
+
title: string;
|
|
196
|
+
/** Detailed description of the breach */
|
|
197
|
+
description: string;
|
|
198
|
+
/** Category of the breach */
|
|
199
|
+
category: string;
|
|
200
|
+
/** Timestamp when the breach was discovered */
|
|
201
|
+
discoveredAt: number;
|
|
202
|
+
/** Timestamp when the breach occurred (if known) */
|
|
203
|
+
occurredAt?: number;
|
|
204
|
+
/** Timestamp when the breach was reported internally */
|
|
205
|
+
reportedAt: number;
|
|
206
|
+
/** Person who reported the breach */
|
|
207
|
+
reporter: {
|
|
208
|
+
name: string;
|
|
209
|
+
email: string;
|
|
210
|
+
department: string;
|
|
211
|
+
phone?: string;
|
|
212
|
+
};
|
|
213
|
+
/** Systems or data affected by the breach */
|
|
214
|
+
affectedSystems: string[];
|
|
215
|
+
/** Types of data involved in the breach */
|
|
216
|
+
dataTypes: string[];
|
|
217
|
+
/** Whether sensitive personal data is involved (NDPA Section 27) */
|
|
218
|
+
involvesSensitiveData?: boolean;
|
|
219
|
+
/** Estimated number of data subjects affected */
|
|
220
|
+
estimatedAffectedSubjects?: number;
|
|
221
|
+
/** Whether the breach is ongoing or contained */
|
|
222
|
+
status: 'ongoing' | 'contained' | 'resolved';
|
|
223
|
+
/** Initial actions taken to address the breach */
|
|
224
|
+
initialActions?: string;
|
|
225
|
+
/** Attachments related to the breach */
|
|
226
|
+
attachments?: Array<{
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
type: string;
|
|
230
|
+
url: string;
|
|
231
|
+
addedAt: number;
|
|
232
|
+
}>;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Breach report form component. Implements NDPA Section 40 breach notification requirements,
|
|
237
|
+
* enabling organizations to document and report data breaches within the mandated 72-hour window.
|
|
238
|
+
*/
|
|
239
|
+
export declare const BreachReportForm: React__default.FC<BreachReportFormProps>;
|
|
240
|
+
|
|
241
|
+
export declare interface BreachReportFormClassNames {
|
|
242
|
+
root?: string;
|
|
243
|
+
title?: string;
|
|
244
|
+
form?: string;
|
|
245
|
+
fieldGroup?: string;
|
|
246
|
+
label?: string;
|
|
247
|
+
input?: string;
|
|
248
|
+
select?: string;
|
|
249
|
+
textarea?: string;
|
|
250
|
+
submitButton?: string;
|
|
251
|
+
/** Alias for submitButton */
|
|
252
|
+
primaryButton?: string;
|
|
253
|
+
notice?: string;
|
|
254
|
+
/** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
|
|
255
|
+
loadingOverlay?: string;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
declare interface BreachReportFormProps {
|
|
259
|
+
/**
|
|
260
|
+
* Available breach categories
|
|
261
|
+
*/
|
|
262
|
+
categories: BreachCategory[];
|
|
263
|
+
/**
|
|
264
|
+
* Callback function called when form is submitted
|
|
265
|
+
*/
|
|
266
|
+
onSubmit: (data: BreachFormSubmission) => void;
|
|
267
|
+
/**
|
|
268
|
+
* Callback function called when form validation fails
|
|
269
|
+
*/
|
|
270
|
+
onValidationError?: (errors: Record<string, string>) => void;
|
|
271
|
+
/**
|
|
272
|
+
* Title displayed on the form
|
|
273
|
+
* @default "Report a Data Breach"
|
|
274
|
+
*/
|
|
275
|
+
title?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Description text displayed on the form
|
|
278
|
+
* @default "Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required."
|
|
279
|
+
*/
|
|
280
|
+
formDescription?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Text for the submit button
|
|
283
|
+
* @default "Submit Report"
|
|
284
|
+
*/
|
|
285
|
+
submitButtonText?: string;
|
|
286
|
+
/**
|
|
287
|
+
* Custom CSS class for the form
|
|
288
|
+
*/
|
|
289
|
+
className?: string;
|
|
290
|
+
/**
|
|
291
|
+
* Custom CSS class for the submit button
|
|
292
|
+
*/
|
|
293
|
+
buttonClassName?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Override class names for individual elements
|
|
296
|
+
*/
|
|
297
|
+
classNames?: BreachReportFormClassNames;
|
|
298
|
+
/**
|
|
299
|
+
* Remove all default styles, only applying classNames overrides
|
|
300
|
+
*/
|
|
301
|
+
unstyled?: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* Whether the form is currently submitting.
|
|
304
|
+
* When true, the submit button is disabled and shows "Submitting..." text.
|
|
305
|
+
*/
|
|
306
|
+
isSubmitting?: boolean;
|
|
307
|
+
/**
|
|
308
|
+
* Whether to show a confirmation message after submission
|
|
309
|
+
* @default true
|
|
310
|
+
*/
|
|
311
|
+
showConfirmation?: boolean;
|
|
312
|
+
/**
|
|
313
|
+
* Confirmation message to display after submission
|
|
314
|
+
* @default "Your breach report has been submitted successfully. The data protection team has been notified."
|
|
315
|
+
*/
|
|
316
|
+
confirmationMessage?: string;
|
|
317
|
+
/**
|
|
318
|
+
* Whether to allow file attachments
|
|
319
|
+
* @default true
|
|
320
|
+
*/
|
|
321
|
+
allowAttachments?: boolean;
|
|
322
|
+
/**
|
|
323
|
+
* Maximum number of attachments allowed
|
|
324
|
+
* @default 5
|
|
325
|
+
*/
|
|
326
|
+
maxAttachments?: number;
|
|
327
|
+
/**
|
|
328
|
+
* Maximum file size for attachments (in bytes)
|
|
329
|
+
* @default 5242880 (5MB)
|
|
330
|
+
*/
|
|
331
|
+
maxFileSize?: number;
|
|
332
|
+
/**
|
|
333
|
+
* Allowed file types for attachments
|
|
334
|
+
* @default ['.pdf', '.jpg', '.jpeg', '.png', '.doc', '.docx', '.xls', '.xlsx', '.txt']
|
|
335
|
+
*/
|
|
336
|
+
allowedFileTypes?: string[];
|
|
337
|
+
/**
|
|
338
|
+
* Default values to pre-fill form fields.
|
|
339
|
+
* Useful for editing existing breach reports or pre-populating known data.
|
|
340
|
+
*/
|
|
341
|
+
defaultValues?: Partial<BreachFormSubmission>;
|
|
342
|
+
/**
|
|
343
|
+
* Callback fired when the form is reset via the Reset button.
|
|
344
|
+
* To fully remount the component (clearing all internal state),
|
|
345
|
+
* change the `key` prop from the parent.
|
|
346
|
+
*/
|
|
347
|
+
onReset?: () => void;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Breach risk assessment component. Implements NDPA Section 40 requirements for assessing
|
|
352
|
+
* breach severity and determining whether NDPC notification is required within 72 hours.
|
|
353
|
+
*/
|
|
354
|
+
export declare const BreachRiskAssessment: React__default.FC<BreachRiskAssessmentProps>;
|
|
355
|
+
|
|
356
|
+
export declare interface BreachRiskAssessmentClassNames {
|
|
357
|
+
root?: string;
|
|
358
|
+
header?: string;
|
|
359
|
+
title?: string;
|
|
360
|
+
slider?: string;
|
|
361
|
+
riskBadge?: string;
|
|
362
|
+
riskScore?: string;
|
|
363
|
+
notificationStatus?: string;
|
|
364
|
+
submitButton?: string;
|
|
365
|
+
/** Alias for submitButton */
|
|
366
|
+
primaryButton?: string;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
declare interface BreachRiskAssessmentProps {
|
|
370
|
+
/**
|
|
371
|
+
* The breach data to assess
|
|
372
|
+
*/
|
|
373
|
+
breachData: BreachReport;
|
|
374
|
+
/**
|
|
375
|
+
* Initial assessment data (if editing an existing assessment)
|
|
376
|
+
*/
|
|
377
|
+
initialAssessment?: Partial<RiskAssessment>;
|
|
378
|
+
/**
|
|
379
|
+
* Callback function called when assessment is completed
|
|
380
|
+
*/
|
|
381
|
+
onComplete: (assessment: RiskAssessment) => void;
|
|
382
|
+
/**
|
|
383
|
+
* Title displayed on the assessment form
|
|
384
|
+
* @default "Breach Risk Assessment"
|
|
385
|
+
*/
|
|
386
|
+
title?: string;
|
|
387
|
+
/**
|
|
388
|
+
* Description text displayed on the assessment form
|
|
389
|
+
* @default "Assess the risk level of this data breach to determine notification requirements under NDPA Section 40."
|
|
390
|
+
*/
|
|
391
|
+
description?: string;
|
|
392
|
+
/**
|
|
393
|
+
* Text for the submit button
|
|
394
|
+
* @default "Complete Assessment"
|
|
395
|
+
*/
|
|
396
|
+
submitButtonText?: string;
|
|
397
|
+
/**
|
|
398
|
+
* Custom CSS class for the form
|
|
399
|
+
*/
|
|
400
|
+
className?: string;
|
|
401
|
+
/**
|
|
402
|
+
* Custom CSS class for the submit button
|
|
403
|
+
*/
|
|
404
|
+
buttonClassName?: string;
|
|
405
|
+
/**
|
|
406
|
+
* Override class names for individual elements
|
|
407
|
+
*/
|
|
408
|
+
classNames?: BreachRiskAssessmentClassNames;
|
|
409
|
+
/**
|
|
410
|
+
* Remove all default styles, only applying classNames overrides
|
|
411
|
+
*/
|
|
412
|
+
unstyled?: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* Whether to show the breach summary
|
|
415
|
+
* @default true
|
|
416
|
+
*/
|
|
417
|
+
showBreachSummary?: boolean;
|
|
418
|
+
/**
|
|
419
|
+
* Whether to show notification requirements after assessment
|
|
420
|
+
* @default true
|
|
421
|
+
*/
|
|
422
|
+
showNotificationRequirements?: boolean;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Calculates the severity of a data breach based on various factors
|
|
427
|
+
* @param report The breach report
|
|
428
|
+
* @param assessment The risk assessment (if available)
|
|
429
|
+
* @returns The calculated severity and notification requirements
|
|
430
|
+
*/
|
|
431
|
+
export declare function calculateBreachSeverity(report: BreachReport, assessment?: RiskAssessment): {
|
|
432
|
+
severityLevel: 'low' | 'medium' | 'high' | 'critical';
|
|
433
|
+
notificationRequired: boolean;
|
|
434
|
+
urgentNotificationRequired: boolean;
|
|
435
|
+
timeframeHours: number;
|
|
436
|
+
justification: string;
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Represents notification requirements for a data breach per NDPA Section 40
|
|
441
|
+
*/
|
|
442
|
+
export declare interface NotificationRequirement {
|
|
443
|
+
/**
|
|
444
|
+
* Whether NDPC notification is required
|
|
445
|
+
* Per NDPA Section 40, notification to NDPC is required for all breaches
|
|
446
|
+
* that pose a risk to data subjects' rights and freedoms
|
|
447
|
+
*/
|
|
448
|
+
ndpcNotificationRequired: boolean;
|
|
449
|
+
/**
|
|
450
|
+
* Deadline for NDPC notification (72 hours from discovery)
|
|
451
|
+
* NDPA Section 40(1)
|
|
452
|
+
*/
|
|
453
|
+
ndpcNotificationDeadline: number;
|
|
454
|
+
/**
|
|
455
|
+
* Whether data subject notification is required
|
|
456
|
+
* Per NDPA Section 40(4), required when breach is likely to result in
|
|
457
|
+
* high risk to rights and freedoms of data subjects
|
|
458
|
+
*/
|
|
459
|
+
dataSubjectNotificationRequired: boolean;
|
|
460
|
+
/** Justification for the notification decision */
|
|
461
|
+
justification: string;
|
|
462
|
+
/**
|
|
463
|
+
* @deprecated Use ndpcNotificationRequired instead. Kept for backward compatibility.
|
|
464
|
+
*/
|
|
465
|
+
nitdaNotificationRequired?: boolean;
|
|
466
|
+
/**
|
|
467
|
+
* @deprecated Use ndpcNotificationDeadline instead. Kept for backward compatibility.
|
|
468
|
+
*/
|
|
469
|
+
nitdaNotificationDeadline?: number;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
declare interface OrganizationInfo {
|
|
473
|
+
/**
|
|
474
|
+
* Name of the organization
|
|
475
|
+
*/
|
|
476
|
+
name: string;
|
|
477
|
+
/**
|
|
478
|
+
* Registration number or business ID
|
|
479
|
+
*/
|
|
480
|
+
registrationNumber?: string;
|
|
481
|
+
/**
|
|
482
|
+
* Physical address of the organization
|
|
483
|
+
*/
|
|
484
|
+
address: string;
|
|
485
|
+
/**
|
|
486
|
+
* Website URL
|
|
487
|
+
*/
|
|
488
|
+
website?: string;
|
|
489
|
+
/**
|
|
490
|
+
* Name of the Data Protection Officer
|
|
491
|
+
*/
|
|
492
|
+
dpoName: string;
|
|
493
|
+
/**
|
|
494
|
+
* Email of the Data Protection Officer
|
|
495
|
+
*/
|
|
496
|
+
dpoEmail: string;
|
|
497
|
+
/**
|
|
498
|
+
* Phone number of the Data Protection Officer
|
|
499
|
+
*/
|
|
500
|
+
dpoPhone?: string;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Represents a notification sent to the NDPC (Nigeria Data Protection Commission)
|
|
505
|
+
*/
|
|
506
|
+
export declare interface RegulatoryNotification {
|
|
507
|
+
/** Unique identifier for the notification */
|
|
508
|
+
id: string;
|
|
509
|
+
/** ID of the breach this notification is for */
|
|
510
|
+
breachId: string;
|
|
511
|
+
/** Timestamp when the notification was sent */
|
|
512
|
+
sentAt: number;
|
|
513
|
+
/** Method used to send the notification */
|
|
514
|
+
method: 'email' | 'portal' | 'letter' | 'other';
|
|
515
|
+
/** Reference number assigned by the NDPC (if available) */
|
|
516
|
+
referenceNumber?: string;
|
|
517
|
+
/** Contact person at the NDPC */
|
|
518
|
+
ndpcContact?: {
|
|
519
|
+
name: string;
|
|
520
|
+
email: string;
|
|
521
|
+
phone?: string;
|
|
522
|
+
};
|
|
523
|
+
/** Content of the notification */
|
|
524
|
+
content: string;
|
|
525
|
+
/** Attachments included with the notification */
|
|
526
|
+
attachments?: Array<{
|
|
527
|
+
id: string;
|
|
528
|
+
name: string;
|
|
529
|
+
type: string;
|
|
530
|
+
url: string;
|
|
531
|
+
}>;
|
|
532
|
+
/** Follow-up communications with the NDPC */
|
|
533
|
+
followUps?: Array<{
|
|
534
|
+
timestamp: number;
|
|
535
|
+
direction: 'sent' | 'received';
|
|
536
|
+
content: string;
|
|
537
|
+
attachments?: Array<{
|
|
538
|
+
id: string;
|
|
539
|
+
name: string;
|
|
540
|
+
type: string;
|
|
541
|
+
url: string;
|
|
542
|
+
}>;
|
|
543
|
+
}>;
|
|
544
|
+
/**
|
|
545
|
+
* @deprecated Use ndpcContact instead. Kept for backward compatibility.
|
|
546
|
+
*/
|
|
547
|
+
nitdaContact?: {
|
|
548
|
+
name: string;
|
|
549
|
+
email: string;
|
|
550
|
+
phone?: string;
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Regulatory report generator component. Implements NDPA Section 40 requirements for
|
|
556
|
+
* generating formal breach notification reports for submission to the NDPC.
|
|
557
|
+
*/
|
|
558
|
+
export declare const RegulatoryReportGenerator: React__default.FC<RegulatoryReportGeneratorProps>;
|
|
559
|
+
|
|
560
|
+
export declare interface RegulatoryReportGeneratorClassNames {
|
|
561
|
+
root?: string;
|
|
562
|
+
header?: string;
|
|
563
|
+
title?: string;
|
|
564
|
+
reportPreview?: string;
|
|
565
|
+
field?: string;
|
|
566
|
+
fieldLabel?: string;
|
|
567
|
+
fieldValue?: string;
|
|
568
|
+
generateButton?: string;
|
|
569
|
+
/** Alias for generateButton */
|
|
570
|
+
primaryButton?: string;
|
|
571
|
+
downloadButton?: string;
|
|
572
|
+
/** Alias for downloadButton */
|
|
573
|
+
secondaryButton?: string;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
declare interface RegulatoryReportGeneratorProps {
|
|
577
|
+
/**
|
|
578
|
+
* The breach data to include in the report
|
|
579
|
+
*/
|
|
580
|
+
breachData: BreachReport;
|
|
581
|
+
/**
|
|
582
|
+
* The risk assessment data
|
|
583
|
+
*/
|
|
584
|
+
assessmentData?: RiskAssessment;
|
|
585
|
+
/**
|
|
586
|
+
* Organization information to include in the report
|
|
587
|
+
*/
|
|
588
|
+
organizationInfo: OrganizationInfo;
|
|
589
|
+
/**
|
|
590
|
+
* Callback function called when the report is generated
|
|
591
|
+
*/
|
|
592
|
+
onGenerate: (report: RegulatoryNotification) => void;
|
|
593
|
+
/**
|
|
594
|
+
* Title displayed on the generator form
|
|
595
|
+
* @default "Generate NDPC Notification Report"
|
|
596
|
+
*/
|
|
597
|
+
title?: string;
|
|
598
|
+
/**
|
|
599
|
+
* Description text displayed on the generator form
|
|
600
|
+
* @default "Generate a report for submission to the NDPC in compliance with NDPA Section 40 breach notification requirements."
|
|
601
|
+
*/
|
|
602
|
+
description?: string;
|
|
603
|
+
/**
|
|
604
|
+
* Text for the generate button
|
|
605
|
+
* @default "Generate Report"
|
|
606
|
+
*/
|
|
607
|
+
generateButtonText?: string;
|
|
608
|
+
/**
|
|
609
|
+
* Custom CSS class for the form
|
|
610
|
+
*/
|
|
611
|
+
className?: string;
|
|
612
|
+
/**
|
|
613
|
+
* Custom CSS class for the buttons
|
|
614
|
+
*/
|
|
615
|
+
buttonClassName?: string;
|
|
616
|
+
/**
|
|
617
|
+
* Override class names for individual elements
|
|
618
|
+
*/
|
|
619
|
+
classNames?: RegulatoryReportGeneratorClassNames;
|
|
620
|
+
/**
|
|
621
|
+
* Remove all default styles, only applying classNames overrides
|
|
622
|
+
*/
|
|
623
|
+
unstyled?: boolean;
|
|
624
|
+
/**
|
|
625
|
+
* Whether to show a preview of the generated report
|
|
626
|
+
* @default true
|
|
627
|
+
*/
|
|
628
|
+
showPreview?: boolean;
|
|
629
|
+
/**
|
|
630
|
+
* Whether to allow editing the report content
|
|
631
|
+
* @default true
|
|
632
|
+
*/
|
|
633
|
+
allowEditing?: boolean;
|
|
634
|
+
/**
|
|
635
|
+
* Whether to allow downloading the report
|
|
636
|
+
* @default true
|
|
637
|
+
*/
|
|
638
|
+
allowDownload?: boolean;
|
|
639
|
+
/**
|
|
640
|
+
* Format for downloading the report
|
|
641
|
+
* @default "pdf"
|
|
642
|
+
*/
|
|
643
|
+
downloadFormat?: 'pdf' | 'docx' | 'html';
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Represents a risk assessment for a data breach
|
|
648
|
+
*/
|
|
649
|
+
export declare interface RiskAssessment {
|
|
650
|
+
/** Unique identifier for the risk assessment */
|
|
651
|
+
id: string;
|
|
652
|
+
/** ID of the breach this assessment is for */
|
|
653
|
+
breachId: string;
|
|
654
|
+
/** Timestamp when the assessment was conducted */
|
|
655
|
+
assessedAt: number;
|
|
656
|
+
/** Person who conducted the assessment */
|
|
657
|
+
assessor: {
|
|
658
|
+
name: string;
|
|
659
|
+
role: string;
|
|
660
|
+
email: string;
|
|
661
|
+
};
|
|
662
|
+
/** Confidentiality impact (1-5) */
|
|
663
|
+
confidentialityImpact: number;
|
|
664
|
+
/** Integrity impact (1-5) */
|
|
665
|
+
integrityImpact: number;
|
|
666
|
+
/** Availability impact (1-5) */
|
|
667
|
+
availabilityImpact: number;
|
|
668
|
+
/** Likelihood of harm to data subjects (1-5) */
|
|
669
|
+
harmLikelihood: number;
|
|
670
|
+
/** Severity of potential harm to data subjects (1-5) */
|
|
671
|
+
harmSeverity: number;
|
|
672
|
+
/** Overall risk score */
|
|
673
|
+
overallRiskScore: number;
|
|
674
|
+
/** Risk level based on the overall score */
|
|
675
|
+
riskLevel: 'low' | 'medium' | 'high' | 'critical';
|
|
676
|
+
/** Whether the breach is likely to result in a risk to rights and freedoms */
|
|
677
|
+
risksToRightsAndFreedoms: boolean;
|
|
678
|
+
/** Whether the breach is likely to result in a high risk to rights and freedoms */
|
|
679
|
+
highRisksToRightsAndFreedoms: boolean;
|
|
680
|
+
/** Justification for the risk assessment */
|
|
681
|
+
justification: string;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
export declare interface StorageAdapter<T = unknown> {
|
|
685
|
+
/** Load persisted data. Called once on hook mount. */
|
|
686
|
+
load(): T | null | Promise<T | null>;
|
|
687
|
+
/** Persist data. Called on every state change. */
|
|
688
|
+
save(data: T): void | Promise<void>;
|
|
689
|
+
/** Clear persisted data. Called on reset. */
|
|
690
|
+
remove(): void | Promise<void>;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Hook for managing data breach notifications in compliance with the NDPA (Section 40)
|
|
695
|
+
*/
|
|
696
|
+
export declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
|
|
697
|
+
|
|
698
|
+
export declare function useBreachCompound(): BreachContextValue;
|
|
699
|
+
|
|
700
|
+
declare interface UseBreachOptions {
|
|
701
|
+
/**
|
|
702
|
+
* Available breach categories
|
|
703
|
+
*/
|
|
704
|
+
categories: BreachCategory[];
|
|
705
|
+
/**
|
|
706
|
+
* Initial breach reports
|
|
707
|
+
*/
|
|
708
|
+
initialReports?: BreachReport[];
|
|
709
|
+
/**
|
|
710
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
711
|
+
*/
|
|
712
|
+
adapter?: StorageAdapter<BreachCompositeState>;
|
|
713
|
+
/**
|
|
714
|
+
* Storage key for breach data
|
|
715
|
+
* @default "ndpr_breach_data"
|
|
716
|
+
* @deprecated Use adapter instead
|
|
717
|
+
*/
|
|
718
|
+
storageKey?: string;
|
|
719
|
+
/**
|
|
720
|
+
* Whether to use local storage to persist breach data
|
|
721
|
+
* @default true
|
|
722
|
+
* @deprecated Use adapter instead
|
|
723
|
+
*/
|
|
724
|
+
useLocalStorage?: boolean;
|
|
725
|
+
/**
|
|
726
|
+
* Callback function called when a breach is reported
|
|
727
|
+
*/
|
|
728
|
+
onReport?: (report: BreachReport) => void;
|
|
729
|
+
/**
|
|
730
|
+
* Callback function called when a risk assessment is completed
|
|
731
|
+
*/
|
|
732
|
+
onAssessment?: (assessment: RiskAssessment) => void;
|
|
733
|
+
/**
|
|
734
|
+
* Callback function called when a notification is sent
|
|
735
|
+
*/
|
|
736
|
+
onNotification?: (notification: RegulatoryNotification) => void;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
declare interface UseBreachReturn {
|
|
740
|
+
/**
|
|
741
|
+
* All breach reports
|
|
742
|
+
*/
|
|
743
|
+
reports: BreachReport[];
|
|
744
|
+
/**
|
|
745
|
+
* All risk assessments
|
|
746
|
+
*/
|
|
747
|
+
assessments: RiskAssessment[];
|
|
748
|
+
/**
|
|
749
|
+
* All regulatory notifications
|
|
750
|
+
*/
|
|
751
|
+
notifications: RegulatoryNotification[];
|
|
752
|
+
/**
|
|
753
|
+
* Submit a new breach report
|
|
754
|
+
*/
|
|
755
|
+
reportBreach: (reportData: Omit<BreachReport, 'id' | 'reportedAt'>) => BreachReport;
|
|
756
|
+
/**
|
|
757
|
+
* Update an existing breach report
|
|
758
|
+
*/
|
|
759
|
+
updateReport: (id: string, updates: Partial<BreachReport>) => BreachReport | null;
|
|
760
|
+
/**
|
|
761
|
+
* Get a breach report by ID
|
|
762
|
+
*/
|
|
763
|
+
getReport: (id: string) => BreachReport | null;
|
|
764
|
+
/**
|
|
765
|
+
* Conduct a risk assessment for a breach
|
|
766
|
+
*/
|
|
767
|
+
assessRisk: (breachId: string, assessmentData: Omit<RiskAssessment, 'id' | 'breachId' | 'assessedAt'>) => RiskAssessment;
|
|
768
|
+
/**
|
|
769
|
+
* Get a risk assessment for a breach
|
|
770
|
+
*/
|
|
771
|
+
getAssessment: (breachId: string) => RiskAssessment | null;
|
|
772
|
+
/**
|
|
773
|
+
* Calculate notification requirements based on a risk assessment
|
|
774
|
+
*/
|
|
775
|
+
calculateNotificationRequirements: (breachId: string) => NotificationRequirement | null;
|
|
776
|
+
/**
|
|
777
|
+
* Send a regulatory notification
|
|
778
|
+
*/
|
|
779
|
+
sendNotification: (breachId: string, notificationData: Omit<RegulatoryNotification, 'id' | 'breachId' | 'sentAt'>) => RegulatoryNotification;
|
|
780
|
+
/**
|
|
781
|
+
* Get a regulatory notification for a breach
|
|
782
|
+
*/
|
|
783
|
+
getNotification: (breachId: string) => RegulatoryNotification | null;
|
|
784
|
+
/**
|
|
785
|
+
* Get breaches that require notification within the next X hours
|
|
786
|
+
*/
|
|
787
|
+
getBreachesRequiringNotification: (hoursThreshold?: number) => Array<{
|
|
788
|
+
report: BreachReport;
|
|
789
|
+
assessment: RiskAssessment;
|
|
790
|
+
requirements: NotificationRequirement;
|
|
791
|
+
hoursRemaining: number;
|
|
792
|
+
}>;
|
|
793
|
+
/**
|
|
794
|
+
* Clear all breach data
|
|
795
|
+
*/
|
|
796
|
+
clearBreachData: () => void;
|
|
797
|
+
/**
|
|
798
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
799
|
+
*/
|
|
800
|
+
isLoading: boolean;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
export { }
|