@tantainnovative/ndpr-toolkit 3.4.1 → 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 +12 -0
- 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 +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/{chunk-ASLMPY54.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-MLOWRZXO.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-NFJ4CB63.mjs → chunk-ID2NYIVE.mjs} +3 -3
- package/dist/chunk-J5WCPZLW.js +2 -0
- 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-4BOEFDDE.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/consent.d.mts +648 -84
- package/dist/consent.d.ts +648 -84
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -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/dpia.d.mts +591 -37
- package/dist/dpia.d.ts +591 -37
- package/dist/dsr.d.mts +654 -37
- package/dist/dsr.d.ts +654 -37
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/hooks.d.mts +2174 -30
- package/dist/hooks.d.ts +2174 -30
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +4428 -43
- package/dist/index.d.ts +4428 -43
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lawful-basis.d.mts +368 -32
- package/dist/lawful-basis.d.ts +368 -32
- package/dist/policy.d.mts +1178 -83
- package/dist/policy.d.ts +1178 -83
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/presets.d.mts +1020 -114
- package/dist/presets.d.ts +1020 -114
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/ropa.d.mts +396 -31
- package/dist/ropa.d.ts +396 -31
- package/dist/ropa.js +1 -1
- package/dist/ropa.mjs +1 -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 +1 -1
- package/dist/unstyled.mjs +1 -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-2L7BSG7G.mjs +0 -2
- package/dist/chunk-5X32J5IA.mjs +0 -2
- package/dist/chunk-7D2OIPHH.mjs +0 -2
- package/dist/chunk-JKKRPS4P.js +0 -2
- package/dist/chunk-UHTJ6UFW.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-4n8g4zul.d.mts +0 -64
- package/dist/docx-VvcTLYZM.d.ts +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-5qTfp2z4.d.mts +0 -174
- package/dist/policy-engine-DzPxskOK.d.ts +0 -174
- package/dist/policy-sections-9tCb7VU7.d.ts +0 -56
- package/dist/policy-sections-CBWcJv-R.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-BSLyltzZ.d.mts +0 -52
- package/dist/useAdaptivePolicyWizard-CL7C7MTZ.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/index.d.mts
CHANGED
|
@@ -1,43 +1,4428 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
import { ErrorInfo } from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Adequacy status of a destination country
|
|
7
|
+
*/
|
|
8
|
+
export declare type AdequacyStatus = 'adequate' | 'inadequate' | 'pending_review' | 'unknown';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Appends a single audit entry to the consent audit log in localStorage.
|
|
12
|
+
* The log is append-only; existing entries are never modified.
|
|
13
|
+
*
|
|
14
|
+
* @param entry - The audit entry to append
|
|
15
|
+
* @param storageKey - Base storage key (the audit key is derived as `${storageKey}_audit`)
|
|
16
|
+
*/
|
|
17
|
+
export declare function appendAuditEntry(entry: ConsentAuditEntry, storageKey?: string): void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Analyzes all processing activities and returns compliance gaps including
|
|
21
|
+
* missing DPO approval, overdue reviews, undocumented justifications,
|
|
22
|
+
* missing LIA for legitimate interests, and other documentation issues.
|
|
23
|
+
*
|
|
24
|
+
* @param activities Array of processing activities to analyze
|
|
25
|
+
* @returns Array of identified compliance gaps
|
|
26
|
+
*/
|
|
27
|
+
export declare function assessComplianceGaps(activities: ProcessingActivity[]): LawfulBasisComplianceGap[];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Assesses the risk level of a DPIA based on the identified risks
|
|
31
|
+
* @param dpiaResult The DPIA result containing risks to assess
|
|
32
|
+
* @returns Assessment result with overall risk level and recommendations
|
|
33
|
+
*/
|
|
34
|
+
export declare function assessDPIARisk(dpiaResult: DPIAResult): {
|
|
35
|
+
overallRiskLevel: 'low' | 'medium' | 'high' | 'critical';
|
|
36
|
+
requiresConsultation: boolean;
|
|
37
|
+
canProceed: boolean;
|
|
38
|
+
recommendations: string[];
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Performs a basic risk assessment of a cross-border transfer based on adequacy status,
|
|
43
|
+
* transfer mechanism, and data sensitivity.
|
|
44
|
+
*
|
|
45
|
+
* @param transfer The cross-border transfer to assess
|
|
46
|
+
* @returns Risk assessment result with score, factors, and recommendations
|
|
47
|
+
*/
|
|
48
|
+
export declare function assessTransferRisk(transfer: CrossBorderTransfer): TransferRiskResult;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Breach notification types aligned with NDPA 2023 Section 40
|
|
52
|
+
* Data controllers must notify the NDPC within 72 hours of becoming aware of a breach
|
|
53
|
+
* Data subjects must be notified without undue delay when breach is likely to result in high risk
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* Represents a data breach category
|
|
57
|
+
*/
|
|
58
|
+
export declare interface BreachCategory {
|
|
59
|
+
/** Unique identifier for the category */
|
|
60
|
+
id: string;
|
|
61
|
+
/** Display name for the category */
|
|
62
|
+
name: string;
|
|
63
|
+
/** Description of this breach category */
|
|
64
|
+
description: string;
|
|
65
|
+
/** Default severity level for this category */
|
|
66
|
+
defaultSeverity: 'low' | 'medium' | 'high' | 'critical';
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare type BreachCompositeState = {
|
|
70
|
+
reports: BreachReport[];
|
|
71
|
+
assessments: RiskAssessment[];
|
|
72
|
+
notifications: RegulatoryNotification[];
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Represents the data submitted by the breach report form.
|
|
77
|
+
*/
|
|
78
|
+
export declare interface BreachFormSubmission {
|
|
79
|
+
/** Title/summary of the breach */
|
|
80
|
+
title: string;
|
|
81
|
+
/** Detailed description of the breach */
|
|
82
|
+
description: string;
|
|
83
|
+
/** Breach category identifier */
|
|
84
|
+
category: string;
|
|
85
|
+
/** Timestamp (ms) when the breach was discovered */
|
|
86
|
+
discoveredAt: number;
|
|
87
|
+
/** Timestamp (ms) when the breach occurred (if known) */
|
|
88
|
+
occurredAt?: number;
|
|
89
|
+
/** Timestamp (ms) when the form was submitted */
|
|
90
|
+
reportedAt: number;
|
|
91
|
+
/** Person reporting the breach */
|
|
92
|
+
reporter: {
|
|
93
|
+
name: string;
|
|
94
|
+
email: string;
|
|
95
|
+
department: string;
|
|
96
|
+
phone?: string;
|
|
97
|
+
};
|
|
98
|
+
/** Systems or applications affected by the breach */
|
|
99
|
+
affectedSystems: string[];
|
|
100
|
+
/** Types of data involved in the breach */
|
|
101
|
+
dataTypes: string[];
|
|
102
|
+
/** Estimated number of affected data subjects */
|
|
103
|
+
estimatedAffectedSubjects?: number;
|
|
104
|
+
/** Current status of the breach */
|
|
105
|
+
status: 'ongoing' | 'contained' | 'resolved';
|
|
106
|
+
/** Initial actions taken to address the breach */
|
|
107
|
+
initialActions?: string;
|
|
108
|
+
/** File attachments included with the report */
|
|
109
|
+
attachments: Array<{
|
|
110
|
+
name: string;
|
|
111
|
+
type: string;
|
|
112
|
+
size: number;
|
|
113
|
+
file: File;
|
|
114
|
+
}>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Breach notification management component. Implements NDPA Section 40 requirements for
|
|
119
|
+
* managing breach notifications, tracking 72-hour NDPC reporting deadlines, and coordinating
|
|
120
|
+
* data subject notifications.
|
|
121
|
+
*/
|
|
122
|
+
export declare const BreachNotificationManager: React__default.FC<BreachNotificationManagerProps>;
|
|
123
|
+
|
|
124
|
+
export declare interface BreachNotificationManagerClassNames {
|
|
125
|
+
root?: string;
|
|
126
|
+
header?: string;
|
|
127
|
+
title?: string;
|
|
128
|
+
breachList?: string;
|
|
129
|
+
breachItem?: string;
|
|
130
|
+
statusBadge?: string;
|
|
131
|
+
timeline?: string;
|
|
132
|
+
timelineStep?: string;
|
|
133
|
+
detailPanel?: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
declare interface BreachNotificationManagerProps {
|
|
137
|
+
/**
|
|
138
|
+
* List of breach reports to manage
|
|
139
|
+
*/
|
|
140
|
+
breachReports: BreachReport[];
|
|
141
|
+
/**
|
|
142
|
+
* List of risk assessments
|
|
143
|
+
*/
|
|
144
|
+
riskAssessments: RiskAssessment[];
|
|
145
|
+
/**
|
|
146
|
+
* List of regulatory notifications
|
|
147
|
+
*/
|
|
148
|
+
regulatoryNotifications: RegulatoryNotification[];
|
|
149
|
+
/**
|
|
150
|
+
* Callback function called when a breach is selected
|
|
151
|
+
*/
|
|
152
|
+
onSelectBreach?: (breachId: string) => void;
|
|
153
|
+
/**
|
|
154
|
+
* Callback function called when a risk assessment is requested
|
|
155
|
+
*/
|
|
156
|
+
onRequestAssessment?: (breachId: string) => void;
|
|
157
|
+
/**
|
|
158
|
+
* Callback function called when a notification is requested
|
|
159
|
+
*/
|
|
160
|
+
onRequestNotification?: (breachId: string) => void;
|
|
161
|
+
/**
|
|
162
|
+
* Title displayed on the manager
|
|
163
|
+
* @default "Breach Notification Manager"
|
|
164
|
+
*/
|
|
165
|
+
title?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Description text displayed on the manager
|
|
168
|
+
* @default "Manage data breach notifications and track compliance with NDPA Section 40 requirements."
|
|
169
|
+
*/
|
|
170
|
+
description?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Custom CSS class for the manager
|
|
173
|
+
*/
|
|
174
|
+
className?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Custom CSS class for the buttons
|
|
177
|
+
*/
|
|
178
|
+
buttonClassName?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Override class names for individual elements
|
|
181
|
+
*/
|
|
182
|
+
classNames?: BreachNotificationManagerClassNames;
|
|
183
|
+
/**
|
|
184
|
+
* Remove all default styles, only applying classNames overrides
|
|
185
|
+
*/
|
|
186
|
+
unstyled?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Whether to show the breach details
|
|
189
|
+
* @default true
|
|
190
|
+
*/
|
|
191
|
+
showBreachDetails?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Whether to show the notification timeline
|
|
194
|
+
* @default true
|
|
195
|
+
*/
|
|
196
|
+
showNotificationTimeline?: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Whether to show the deadline alerts
|
|
199
|
+
* @default true
|
|
200
|
+
*/
|
|
201
|
+
showDeadlineAlerts?: boolean;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Represents a data breach report
|
|
206
|
+
*/
|
|
207
|
+
export declare interface BreachReport {
|
|
208
|
+
/** Unique identifier for the breach report */
|
|
209
|
+
id: string;
|
|
210
|
+
/** Title/summary of the breach */
|
|
211
|
+
title: string;
|
|
212
|
+
/** Detailed description of the breach */
|
|
213
|
+
description: string;
|
|
214
|
+
/** Category of the breach */
|
|
215
|
+
category: string;
|
|
216
|
+
/** Timestamp when the breach was discovered */
|
|
217
|
+
discoveredAt: number;
|
|
218
|
+
/** Timestamp when the breach occurred (if known) */
|
|
219
|
+
occurredAt?: number;
|
|
220
|
+
/** Timestamp when the breach was reported internally */
|
|
221
|
+
reportedAt: number;
|
|
222
|
+
/** Person who reported the breach */
|
|
223
|
+
reporter: {
|
|
224
|
+
name: string;
|
|
225
|
+
email: string;
|
|
226
|
+
department: string;
|
|
227
|
+
phone?: string;
|
|
228
|
+
};
|
|
229
|
+
/** Systems or data affected by the breach */
|
|
230
|
+
affectedSystems: string[];
|
|
231
|
+
/** Types of data involved in the breach */
|
|
232
|
+
dataTypes: string[];
|
|
233
|
+
/** Whether sensitive personal data is involved (NDPA Section 27) */
|
|
234
|
+
involvesSensitiveData?: boolean;
|
|
235
|
+
/** Estimated number of data subjects affected */
|
|
236
|
+
estimatedAffectedSubjects?: number;
|
|
237
|
+
/** Whether the breach is ongoing or contained */
|
|
238
|
+
status: 'ongoing' | 'contained' | 'resolved';
|
|
239
|
+
/** Initial actions taken to address the breach */
|
|
240
|
+
initialActions?: string;
|
|
241
|
+
/** Attachments related to the breach */
|
|
242
|
+
attachments?: Array<{
|
|
243
|
+
id: string;
|
|
244
|
+
name: string;
|
|
245
|
+
type: string;
|
|
246
|
+
url: string;
|
|
247
|
+
addedAt: number;
|
|
248
|
+
}>;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Breach report form component. Implements NDPA Section 40 breach notification requirements,
|
|
253
|
+
* enabling organizations to document and report data breaches within the mandated 72-hour window.
|
|
254
|
+
*/
|
|
255
|
+
export declare const BreachReportForm: React__default.FC<BreachReportFormProps>;
|
|
256
|
+
|
|
257
|
+
export declare interface BreachReportFormClassNames {
|
|
258
|
+
root?: string;
|
|
259
|
+
title?: string;
|
|
260
|
+
form?: string;
|
|
261
|
+
fieldGroup?: string;
|
|
262
|
+
label?: string;
|
|
263
|
+
input?: string;
|
|
264
|
+
select?: string;
|
|
265
|
+
textarea?: string;
|
|
266
|
+
submitButton?: string;
|
|
267
|
+
/** Alias for submitButton */
|
|
268
|
+
primaryButton?: string;
|
|
269
|
+
notice?: string;
|
|
270
|
+
/** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
|
|
271
|
+
loadingOverlay?: string;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
declare interface BreachReportFormProps {
|
|
275
|
+
/**
|
|
276
|
+
* Available breach categories
|
|
277
|
+
*/
|
|
278
|
+
categories: BreachCategory[];
|
|
279
|
+
/**
|
|
280
|
+
* Callback function called when form is submitted
|
|
281
|
+
*/
|
|
282
|
+
onSubmit: (data: BreachFormSubmission) => void;
|
|
283
|
+
/**
|
|
284
|
+
* Callback function called when form validation fails
|
|
285
|
+
*/
|
|
286
|
+
onValidationError?: (errors: Record<string, string>) => void;
|
|
287
|
+
/**
|
|
288
|
+
* Title displayed on the form
|
|
289
|
+
* @default "Report a Data Breach"
|
|
290
|
+
*/
|
|
291
|
+
title?: string;
|
|
292
|
+
/**
|
|
293
|
+
* Description text displayed on the form
|
|
294
|
+
* @default "Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required."
|
|
295
|
+
*/
|
|
296
|
+
formDescription?: string;
|
|
297
|
+
/**
|
|
298
|
+
* Text for the submit button
|
|
299
|
+
* @default "Submit Report"
|
|
300
|
+
*/
|
|
301
|
+
submitButtonText?: string;
|
|
302
|
+
/**
|
|
303
|
+
* Custom CSS class for the form
|
|
304
|
+
*/
|
|
305
|
+
className?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Custom CSS class for the submit button
|
|
308
|
+
*/
|
|
309
|
+
buttonClassName?: string;
|
|
310
|
+
/**
|
|
311
|
+
* Override class names for individual elements
|
|
312
|
+
*/
|
|
313
|
+
classNames?: BreachReportFormClassNames;
|
|
314
|
+
/**
|
|
315
|
+
* Remove all default styles, only applying classNames overrides
|
|
316
|
+
*/
|
|
317
|
+
unstyled?: boolean;
|
|
318
|
+
/**
|
|
319
|
+
* Whether the form is currently submitting.
|
|
320
|
+
* When true, the submit button is disabled and shows "Submitting..." text.
|
|
321
|
+
*/
|
|
322
|
+
isSubmitting?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Whether to show a confirmation message after submission
|
|
325
|
+
* @default true
|
|
326
|
+
*/
|
|
327
|
+
showConfirmation?: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* Confirmation message to display after submission
|
|
330
|
+
* @default "Your breach report has been submitted successfully. The data protection team has been notified."
|
|
331
|
+
*/
|
|
332
|
+
confirmationMessage?: string;
|
|
333
|
+
/**
|
|
334
|
+
* Whether to allow file attachments
|
|
335
|
+
* @default true
|
|
336
|
+
*/
|
|
337
|
+
allowAttachments?: boolean;
|
|
338
|
+
/**
|
|
339
|
+
* Maximum number of attachments allowed
|
|
340
|
+
* @default 5
|
|
341
|
+
*/
|
|
342
|
+
maxAttachments?: number;
|
|
343
|
+
/**
|
|
344
|
+
* Maximum file size for attachments (in bytes)
|
|
345
|
+
* @default 5242880 (5MB)
|
|
346
|
+
*/
|
|
347
|
+
maxFileSize?: number;
|
|
348
|
+
/**
|
|
349
|
+
* Allowed file types for attachments
|
|
350
|
+
* @default ['.pdf', '.jpg', '.jpeg', '.png', '.doc', '.docx', '.xls', '.xlsx', '.txt']
|
|
351
|
+
*/
|
|
352
|
+
allowedFileTypes?: string[];
|
|
353
|
+
/**
|
|
354
|
+
* Default values to pre-fill form fields.
|
|
355
|
+
* Useful for editing existing breach reports or pre-populating known data.
|
|
356
|
+
*/
|
|
357
|
+
defaultValues?: Partial<BreachFormSubmission>;
|
|
358
|
+
/**
|
|
359
|
+
* Callback fired when the form is reset via the Reset button.
|
|
360
|
+
* To fully remount the component (clearing all internal state),
|
|
361
|
+
* change the `key` prop from the parent.
|
|
362
|
+
*/
|
|
363
|
+
onReset?: () => void;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Breach risk assessment component. Implements NDPA Section 40 requirements for assessing
|
|
368
|
+
* breach severity and determining whether NDPC notification is required within 72 hours.
|
|
369
|
+
*/
|
|
370
|
+
export declare const BreachRiskAssessment: React__default.FC<BreachRiskAssessmentProps>;
|
|
371
|
+
|
|
372
|
+
export declare interface BreachRiskAssessmentClassNames {
|
|
373
|
+
root?: string;
|
|
374
|
+
header?: string;
|
|
375
|
+
title?: string;
|
|
376
|
+
slider?: string;
|
|
377
|
+
riskBadge?: string;
|
|
378
|
+
riskScore?: string;
|
|
379
|
+
notificationStatus?: string;
|
|
380
|
+
submitButton?: string;
|
|
381
|
+
/** Alias for submitButton */
|
|
382
|
+
primaryButton?: string;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
declare interface BreachRiskAssessmentProps {
|
|
386
|
+
/**
|
|
387
|
+
* The breach data to assess
|
|
388
|
+
*/
|
|
389
|
+
breachData: BreachReport;
|
|
390
|
+
/**
|
|
391
|
+
* Initial assessment data (if editing an existing assessment)
|
|
392
|
+
*/
|
|
393
|
+
initialAssessment?: Partial<RiskAssessment>;
|
|
394
|
+
/**
|
|
395
|
+
* Callback function called when assessment is completed
|
|
396
|
+
*/
|
|
397
|
+
onComplete: (assessment: RiskAssessment) => void;
|
|
398
|
+
/**
|
|
399
|
+
* Title displayed on the assessment form
|
|
400
|
+
* @default "Breach Risk Assessment"
|
|
401
|
+
*/
|
|
402
|
+
title?: string;
|
|
403
|
+
/**
|
|
404
|
+
* Description text displayed on the assessment form
|
|
405
|
+
* @default "Assess the risk level of this data breach to determine notification requirements under NDPA Section 40."
|
|
406
|
+
*/
|
|
407
|
+
description?: string;
|
|
408
|
+
/**
|
|
409
|
+
* Text for the submit button
|
|
410
|
+
* @default "Complete Assessment"
|
|
411
|
+
*/
|
|
412
|
+
submitButtonText?: string;
|
|
413
|
+
/**
|
|
414
|
+
* Custom CSS class for the form
|
|
415
|
+
*/
|
|
416
|
+
className?: string;
|
|
417
|
+
/**
|
|
418
|
+
* Custom CSS class for the submit button
|
|
419
|
+
*/
|
|
420
|
+
buttonClassName?: string;
|
|
421
|
+
/**
|
|
422
|
+
* Override class names for individual elements
|
|
423
|
+
*/
|
|
424
|
+
classNames?: BreachRiskAssessmentClassNames;
|
|
425
|
+
/**
|
|
426
|
+
* Remove all default styles, only applying classNames overrides
|
|
427
|
+
*/
|
|
428
|
+
unstyled?: boolean;
|
|
429
|
+
/**
|
|
430
|
+
* Whether to show the breach summary
|
|
431
|
+
* @default true
|
|
432
|
+
*/
|
|
433
|
+
showBreachSummary?: boolean;
|
|
434
|
+
/**
|
|
435
|
+
* Whether to show notification requirements after assessment
|
|
436
|
+
* @default true
|
|
437
|
+
*/
|
|
438
|
+
showNotificationRequirements?: boolean;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Calculates the severity of a data breach based on various factors
|
|
443
|
+
* @param report The breach report
|
|
444
|
+
* @param assessment The risk assessment (if available)
|
|
445
|
+
* @returns The calculated severity and notification requirements
|
|
446
|
+
*/
|
|
447
|
+
export declare function calculateBreachSeverity(report: BreachReport, assessment?: RiskAssessment): {
|
|
448
|
+
severityLevel: 'low' | 'medium' | 'high' | 'critical';
|
|
449
|
+
notificationRequired: boolean;
|
|
450
|
+
urgentNotificationRequired: boolean;
|
|
451
|
+
timeframeHours: number;
|
|
452
|
+
justification: string;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
export declare interface ComplianceInput {
|
|
456
|
+
consent: {
|
|
457
|
+
hasConsentMechanism: boolean;
|
|
458
|
+
hasPurposeSpecification: boolean;
|
|
459
|
+
hasWithdrawalMechanism: boolean;
|
|
460
|
+
hasMinorProtection: boolean;
|
|
461
|
+
consentRecordsRetained: boolean;
|
|
462
|
+
};
|
|
463
|
+
dsr: {
|
|
464
|
+
hasRequestMechanism: boolean;
|
|
465
|
+
supportsAccess: boolean;
|
|
466
|
+
supportsRectification: boolean;
|
|
467
|
+
supportsErasure: boolean;
|
|
468
|
+
supportsPortability: boolean;
|
|
469
|
+
supportsObjection: boolean;
|
|
470
|
+
/** Expected max response time in days (>30 counts as a gap) */
|
|
471
|
+
responseTimelineDays: number;
|
|
472
|
+
};
|
|
473
|
+
dpia: {
|
|
474
|
+
conductedForHighRisk: boolean;
|
|
475
|
+
documentedRisks: boolean;
|
|
476
|
+
mitigationMeasures: boolean;
|
|
477
|
+
};
|
|
478
|
+
breach: {
|
|
479
|
+
hasNotificationProcess: boolean;
|
|
480
|
+
notifiesWithin72Hours: boolean;
|
|
481
|
+
hasRiskAssessment: boolean;
|
|
482
|
+
hasRecordKeeping: boolean;
|
|
483
|
+
};
|
|
484
|
+
policy: {
|
|
485
|
+
hasPrivacyPolicy: boolean;
|
|
486
|
+
isPubliclyAccessible: boolean;
|
|
487
|
+
/** ISO date string (YYYY-MM-DD); >13 months old counts as a gap */
|
|
488
|
+
lastUpdated: string;
|
|
489
|
+
coversAllSections: boolean;
|
|
490
|
+
};
|
|
491
|
+
lawfulBasis: {
|
|
492
|
+
documentedForAllProcessing: boolean;
|
|
493
|
+
hasLegitimateInterestAssessment: boolean;
|
|
494
|
+
};
|
|
495
|
+
crossBorder: {
|
|
496
|
+
hasTransferMechanisms: boolean;
|
|
497
|
+
adequacyAssessed: boolean;
|
|
498
|
+
ndpcApprovalObtained: boolean;
|
|
499
|
+
};
|
|
500
|
+
ropa: {
|
|
501
|
+
maintained: boolean;
|
|
502
|
+
includesAllProcessing: boolean;
|
|
503
|
+
/** ISO date string (YYYY-MM-DD); >6 months since review counts as a gap */
|
|
504
|
+
lastReviewed: string;
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Compliance Score Engine
|
|
510
|
+
*
|
|
511
|
+
* Evaluates an organisation's NDPA compliance posture across eight modules and
|
|
512
|
+
* returns a scored, rated report with per-module breakdowns and sorted
|
|
513
|
+
* recommendations.
|
|
514
|
+
*
|
|
515
|
+
* Pure utility — zero React dependency.
|
|
516
|
+
*/
|
|
517
|
+
export declare type ComplianceRating = 'excellent' | 'good' | 'needs-work' | 'critical';
|
|
518
|
+
|
|
519
|
+
export declare interface ComplianceReport {
|
|
520
|
+
/** Overall compliance score, 0–100 */
|
|
521
|
+
score: number;
|
|
522
|
+
/** Rating bucket */
|
|
523
|
+
rating: ComplianceRating;
|
|
524
|
+
/** Per-module breakdown keyed by module name */
|
|
525
|
+
modules: Record<string, ModuleScore>;
|
|
526
|
+
/** Recommendations sorted by priority (critical first) */
|
|
527
|
+
recommendations: Recommendation[];
|
|
528
|
+
/** Top-level regulatory references */
|
|
529
|
+
regulatoryReferences: RegulatoryReference[];
|
|
530
|
+
/** ISO date of when the report was generated */
|
|
531
|
+
generatedAt: string;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export declare interface ConsentAnalyticsEvent {
|
|
535
|
+
action: 'shown' | 'accepted_all' | 'rejected_all' | 'customized' | 'dismissed';
|
|
536
|
+
timestamp: number;
|
|
537
|
+
version: string;
|
|
538
|
+
categories?: Record<string, boolean>;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Represents a single entry in the consent audit trail.
|
|
543
|
+
* Each entry captures what happened, when, and the full consent state
|
|
544
|
+
* at that point in time, satisfying NDPA recordkeeping requirements.
|
|
545
|
+
*/
|
|
546
|
+
export declare interface ConsentAuditEntry {
|
|
547
|
+
/** The type of consent action that occurred */
|
|
548
|
+
action: 'consent_given' | 'consent_withdrawn' | 'consent_updated' | 'consent_expired';
|
|
549
|
+
/** Unix timestamp (ms) when the action occurred */
|
|
550
|
+
timestamp: number;
|
|
551
|
+
/** Version of the consent form at the time of the action */
|
|
552
|
+
version: string;
|
|
553
|
+
/** Full snapshot of consent category states */
|
|
554
|
+
categories: Record<string, boolean>;
|
|
555
|
+
/** How consent was collected (e.g. "banner", "customize", "api") */
|
|
556
|
+
method: string;
|
|
557
|
+
/** Browser user-agent string for forensic traceability */
|
|
558
|
+
userAgent?: string;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Consent banner component. Implements NDPA Sections 25-26 consent requirements
|
|
563
|
+
* for obtaining and managing data subject consent.
|
|
564
|
+
*/
|
|
565
|
+
export declare const ConsentBanner: React__default.FC<ConsentBannerProps>;
|
|
566
|
+
|
|
567
|
+
export declare interface ConsentBannerClassNames {
|
|
568
|
+
root?: string;
|
|
569
|
+
container?: string;
|
|
570
|
+
title?: string;
|
|
571
|
+
description?: string;
|
|
572
|
+
optionsList?: string;
|
|
573
|
+
optionItem?: string;
|
|
574
|
+
optionCheckbox?: string;
|
|
575
|
+
optionLabel?: string;
|
|
576
|
+
optionDescription?: string;
|
|
577
|
+
buttonGroup?: string;
|
|
578
|
+
acceptButton?: string;
|
|
579
|
+
rejectButton?: string;
|
|
580
|
+
customizeButton?: string;
|
|
581
|
+
saveButton?: string;
|
|
582
|
+
customizePanel?: string;
|
|
583
|
+
selectAllButton?: string;
|
|
584
|
+
/** Alias for acceptButton */
|
|
585
|
+
primaryButton?: string;
|
|
586
|
+
/** Alias for rejectButton */
|
|
587
|
+
secondaryButton?: string;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
declare interface ConsentBannerProps {
|
|
591
|
+
/**
|
|
592
|
+
* Array of consent options to display
|
|
593
|
+
*/
|
|
594
|
+
options: ConsentOption[];
|
|
595
|
+
/**
|
|
596
|
+
* Callback function called when user saves their consent choices
|
|
597
|
+
*/
|
|
598
|
+
onSave: (settings: ConsentSettings) => void;
|
|
599
|
+
/**
|
|
600
|
+
* Title displayed on the banner
|
|
601
|
+
* @default "We Value Your Privacy"
|
|
602
|
+
*/
|
|
603
|
+
title?: string;
|
|
604
|
+
/**
|
|
605
|
+
* Description text displayed on the banner
|
|
606
|
+
* @default "We use cookies and similar technologies to provide our services and enhance your experience. Your consent is collected in accordance with NDPA Sections 25-26."
|
|
607
|
+
*/
|
|
608
|
+
description?: string;
|
|
609
|
+
/**
|
|
610
|
+
* Text for the accept all button
|
|
611
|
+
* @default "Accept All"
|
|
612
|
+
*/
|
|
613
|
+
acceptAllButtonText?: string;
|
|
614
|
+
/**
|
|
615
|
+
* Text for the reject all button
|
|
616
|
+
* @default "Reject All"
|
|
617
|
+
*/
|
|
618
|
+
rejectAllButtonText?: string;
|
|
619
|
+
/**
|
|
620
|
+
* Text for the customize button
|
|
621
|
+
* @default "Customize"
|
|
622
|
+
*/
|
|
623
|
+
customizeButtonText?: string;
|
|
624
|
+
/**
|
|
625
|
+
* Text for the save button
|
|
626
|
+
* @default "Save Preferences"
|
|
627
|
+
*/
|
|
628
|
+
saveButtonText?: string;
|
|
629
|
+
/**
|
|
630
|
+
* Position of the banner.
|
|
631
|
+
* 'top', 'bottom', and 'center' render via a portal to document.body
|
|
632
|
+
* with fixed positioning so the banner overlays the page.
|
|
633
|
+
* 'inline' renders in the normal DOM tree without a portal.
|
|
634
|
+
* @default "bottom"
|
|
635
|
+
*/
|
|
636
|
+
position?: 'top' | 'bottom' | 'center' | 'inline';
|
|
637
|
+
/**
|
|
638
|
+
* Visual treatment.
|
|
639
|
+
* - 'bar' (default): full-width strip pinned to the edge.
|
|
640
|
+
* - 'card' : bounded floating card with rounded corners and a margin
|
|
641
|
+
* from the screen edges. Pairs well with `position="bottom"`.
|
|
642
|
+
* - 'modal' : centered card with a backdrop overlay. Forces center
|
|
643
|
+
* placement regardless of `position`.
|
|
644
|
+
* @default "bar"
|
|
645
|
+
*/
|
|
646
|
+
variant?: 'bar' | 'card' | 'modal';
|
|
647
|
+
/**
|
|
648
|
+
* z-index applied to the fixed-position banner.
|
|
649
|
+
* Ignored when position is 'inline'.
|
|
650
|
+
* @default 9999
|
|
651
|
+
*/
|
|
652
|
+
zIndex?: number;
|
|
653
|
+
/**
|
|
654
|
+
* Version of the consent form
|
|
655
|
+
* @default "1.0"
|
|
656
|
+
*/
|
|
657
|
+
version?: string;
|
|
658
|
+
/**
|
|
659
|
+
* Whether to show the banner
|
|
660
|
+
* If not provided, the banner will be shown if no consent has been saved
|
|
661
|
+
*/
|
|
662
|
+
show?: boolean;
|
|
663
|
+
/**
|
|
664
|
+
* Storage key for consent settings
|
|
665
|
+
* @default "ndpr_consent"
|
|
666
|
+
*/
|
|
667
|
+
storageKey?: string;
|
|
668
|
+
/**
|
|
669
|
+
* Whether the banner manages its own localStorage persistence.
|
|
670
|
+
* Set to false when an external storage mechanism (e.g., ConsentStorage)
|
|
671
|
+
* is responsible for persisting consent settings under the same key.
|
|
672
|
+
* This avoids race conditions where two writers target the same storage key.
|
|
673
|
+
* @default true
|
|
674
|
+
*/
|
|
675
|
+
manageStorage?: boolean;
|
|
676
|
+
/**
|
|
677
|
+
* Custom CSS class for the banner
|
|
678
|
+
*/
|
|
679
|
+
className?: string;
|
|
680
|
+
/**
|
|
681
|
+
* Custom CSS class for the buttons
|
|
682
|
+
*/
|
|
683
|
+
buttonClassName?: string;
|
|
684
|
+
/**
|
|
685
|
+
* Custom CSS class for the primary button
|
|
686
|
+
*/
|
|
687
|
+
primaryButtonClassName?: string;
|
|
688
|
+
/**
|
|
689
|
+
* Custom CSS class for the secondary button
|
|
690
|
+
*/
|
|
691
|
+
secondaryButtonClassName?: string;
|
|
692
|
+
/**
|
|
693
|
+
* Object of CSS class overrides keyed by semantic section name.
|
|
694
|
+
* Takes priority over buttonClassName / primaryButtonClassName / secondaryButtonClassName.
|
|
695
|
+
*/
|
|
696
|
+
classNames?: ConsentBannerClassNames;
|
|
697
|
+
/**
|
|
698
|
+
* When true, all default Tailwind classes are removed so consumers
|
|
699
|
+
* can style from scratch using classNames.
|
|
700
|
+
*/
|
|
701
|
+
unstyled?: boolean;
|
|
702
|
+
/**
|
|
703
|
+
* Optional analytics callback fired on each user interaction.
|
|
704
|
+
* Called when the banner is shown, accepted, rejected, customized, or dismissed.
|
|
705
|
+
*/
|
|
706
|
+
onAnalytics?: (event: ConsentAnalyticsEvent) => void;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Consent management component. Implements NDPA Sections 25-26 consent requirements,
|
|
711
|
+
* allowing data subjects to review and update their consent preferences.
|
|
712
|
+
*/
|
|
713
|
+
export declare const ConsentManager: React__default.FC<ConsentManagerProps>;
|
|
714
|
+
|
|
715
|
+
export declare interface ConsentManagerClassNames {
|
|
716
|
+
root?: string;
|
|
717
|
+
header?: string;
|
|
718
|
+
title?: string;
|
|
719
|
+
description?: string;
|
|
720
|
+
optionsList?: string;
|
|
721
|
+
optionItem?: string;
|
|
722
|
+
toggle?: string;
|
|
723
|
+
saveButton?: string;
|
|
724
|
+
resetButton?: string;
|
|
725
|
+
/** Alias for saveButton */
|
|
726
|
+
primaryButton?: string;
|
|
727
|
+
/** Alias for resetButton */
|
|
728
|
+
secondaryButton?: string;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
declare interface ConsentManagerProps {
|
|
732
|
+
/**
|
|
733
|
+
* Array of consent options to display
|
|
734
|
+
*/
|
|
735
|
+
options: ConsentOption[];
|
|
736
|
+
/**
|
|
737
|
+
* Current consent settings
|
|
738
|
+
*/
|
|
739
|
+
settings?: ConsentSettings;
|
|
740
|
+
/**
|
|
741
|
+
* Callback function called when user saves their consent choices
|
|
742
|
+
*/
|
|
743
|
+
onSave: (settings: ConsentSettings) => void;
|
|
744
|
+
/**
|
|
745
|
+
* Title displayed in the manager
|
|
746
|
+
* @default "Manage Your Privacy Settings"
|
|
747
|
+
*/
|
|
748
|
+
title?: string;
|
|
749
|
+
/**
|
|
750
|
+
* Description text displayed in the manager
|
|
751
|
+
* @default "Update your consent preferences at any time. Required cookies cannot be disabled as they are necessary for the website to function. Consent management is provided in accordance with NDPA Sections 25-26."
|
|
752
|
+
*/
|
|
753
|
+
description?: string;
|
|
754
|
+
/**
|
|
755
|
+
* Text for the save button
|
|
756
|
+
* @default "Save Preferences"
|
|
757
|
+
*/
|
|
758
|
+
saveButtonText?: string;
|
|
759
|
+
/**
|
|
760
|
+
* Text for the reset button
|
|
761
|
+
* @default "Reset to Defaults"
|
|
762
|
+
*/
|
|
763
|
+
resetButtonText?: string;
|
|
764
|
+
/**
|
|
765
|
+
* Version of the consent form
|
|
766
|
+
* @default "1.0"
|
|
767
|
+
*/
|
|
768
|
+
version?: string;
|
|
769
|
+
/**
|
|
770
|
+
* Custom CSS class for the manager
|
|
771
|
+
*/
|
|
772
|
+
className?: string;
|
|
773
|
+
/**
|
|
774
|
+
* Custom CSS class for the buttons
|
|
775
|
+
*/
|
|
776
|
+
buttonClassName?: string;
|
|
777
|
+
/**
|
|
778
|
+
* Custom CSS class for the primary button
|
|
779
|
+
*/
|
|
780
|
+
primaryButtonClassName?: string;
|
|
781
|
+
/**
|
|
782
|
+
* Custom CSS class for the secondary button
|
|
783
|
+
*/
|
|
784
|
+
secondaryButtonClassName?: string;
|
|
785
|
+
/**
|
|
786
|
+
* Object of CSS class overrides keyed by semantic section name.
|
|
787
|
+
* Takes priority over buttonClassName / primaryButtonClassName / secondaryButtonClassName.
|
|
788
|
+
*/
|
|
789
|
+
classNames?: ConsentManagerClassNames;
|
|
790
|
+
/**
|
|
791
|
+
* When true, all default Tailwind classes are removed so consumers
|
|
792
|
+
* can style from scratch using classNames.
|
|
793
|
+
*/
|
|
794
|
+
unstyled?: boolean;
|
|
795
|
+
/**
|
|
796
|
+
* Whether to show a success message after saving
|
|
797
|
+
* @default true
|
|
798
|
+
*/
|
|
799
|
+
showSuccessMessage?: boolean;
|
|
800
|
+
/**
|
|
801
|
+
* Success message to display after saving
|
|
802
|
+
* @default "Your preferences have been saved."
|
|
803
|
+
*/
|
|
804
|
+
successMessage?: string;
|
|
805
|
+
/**
|
|
806
|
+
* Duration to show the success message (in milliseconds)
|
|
807
|
+
* @default 3000
|
|
808
|
+
*/
|
|
809
|
+
successMessageDuration?: number;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* Consent types aligned with NDPA 2023 Section 25-26
|
|
814
|
+
* Consent must be freely given, specific, informed, and unambiguous
|
|
815
|
+
*/
|
|
816
|
+
/**
|
|
817
|
+
* Represents a consent option that can be presented to users
|
|
818
|
+
*/
|
|
819
|
+
export declare interface ConsentOption {
|
|
820
|
+
/** Unique identifier for the consent option */
|
|
821
|
+
id: string;
|
|
822
|
+
/** Display label for the consent option */
|
|
823
|
+
label: string;
|
|
824
|
+
/** Detailed description of what this consent option covers */
|
|
825
|
+
description: string;
|
|
826
|
+
/** Whether this consent option is required (cannot be declined) */
|
|
827
|
+
required: boolean;
|
|
828
|
+
/**
|
|
829
|
+
* The specific purpose for which data will be processed
|
|
830
|
+
* NDPA Section 25(2) requires consent to be specific to each purpose
|
|
831
|
+
*/
|
|
832
|
+
purpose: string;
|
|
833
|
+
/**
|
|
834
|
+
* Default state of the consent option
|
|
835
|
+
* @default false
|
|
836
|
+
*/
|
|
837
|
+
defaultValue?: boolean;
|
|
838
|
+
/**
|
|
839
|
+
* Categories of personal data covered by this consent option
|
|
840
|
+
*/
|
|
841
|
+
dataCategories?: string[];
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Represents the user's consent settings
|
|
846
|
+
*/
|
|
847
|
+
export declare interface ConsentSettings {
|
|
848
|
+
/** Map of consent option IDs to boolean values indicating consent status */
|
|
849
|
+
consents: Record<string, boolean>;
|
|
850
|
+
/** Timestamp when consent was last updated */
|
|
851
|
+
timestamp: number;
|
|
852
|
+
/** Version of the consent form that was accepted */
|
|
853
|
+
version: string;
|
|
854
|
+
/** Method used to collect consent (e.g., "banner", "settings", "api") */
|
|
855
|
+
method: string;
|
|
856
|
+
/** Whether the user has actively made a choice (as opposed to default settings) */
|
|
857
|
+
hasInteracted: boolean;
|
|
858
|
+
/**
|
|
859
|
+
* The lawful basis under which processing is conducted
|
|
860
|
+
* Required by NDPA Section 25(1)
|
|
861
|
+
*/
|
|
862
|
+
lawfulBasis?: LawfulBasisType;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export declare const ConsentStorage: ({ settings, storageOptions, onLoad, onSave, autoSave, autoLoad, classNames, unstyled, children }: ConsentStorageProps) => React__default.ReactElement | null;
|
|
866
|
+
|
|
867
|
+
export declare interface ConsentStorageClassNames {
|
|
868
|
+
root?: string;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* Represents the storage mechanism for consent settings
|
|
873
|
+
*/
|
|
874
|
+
export declare interface ConsentStorageOptions {
|
|
875
|
+
/**
|
|
876
|
+
* Storage key for consent settings
|
|
877
|
+
* @default "ndpr_consent"
|
|
878
|
+
*/
|
|
879
|
+
storageKey?: string;
|
|
880
|
+
/**
|
|
881
|
+
* Storage type to use
|
|
882
|
+
* @default "localStorage"
|
|
883
|
+
*/
|
|
884
|
+
storageType?: 'localStorage' | 'sessionStorage' | 'cookie';
|
|
885
|
+
/**
|
|
886
|
+
* Cookie options (only used when storageType is "cookie")
|
|
887
|
+
*/
|
|
888
|
+
cookieOptions?: {
|
|
889
|
+
/** Domain for the cookie */
|
|
890
|
+
domain?: string;
|
|
891
|
+
/**
|
|
892
|
+
* Path for the cookie
|
|
893
|
+
* @default "/"
|
|
894
|
+
*/
|
|
895
|
+
path?: string;
|
|
896
|
+
/**
|
|
897
|
+
* Expiration days for the cookie
|
|
898
|
+
* @default 365
|
|
899
|
+
*/
|
|
900
|
+
expires?: number;
|
|
901
|
+
/**
|
|
902
|
+
* Whether the cookie should be secure
|
|
903
|
+
* @default true
|
|
904
|
+
*/
|
|
905
|
+
secure?: boolean;
|
|
906
|
+
/**
|
|
907
|
+
* SameSite attribute for the cookie
|
|
908
|
+
* @default "Lax"
|
|
909
|
+
*/
|
|
910
|
+
sameSite?: 'Strict' | 'Lax' | 'None';
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
declare interface ConsentStorageProps {
|
|
915
|
+
/**
|
|
916
|
+
* Current consent settings
|
|
917
|
+
*/
|
|
918
|
+
settings: ConsentSettings;
|
|
919
|
+
/**
|
|
920
|
+
* Storage options for consent settings
|
|
921
|
+
*/
|
|
922
|
+
storageOptions?: ConsentStorageOptions;
|
|
923
|
+
/**
|
|
924
|
+
* Callback function called when settings are loaded from storage
|
|
925
|
+
*/
|
|
926
|
+
onLoad?: (settings: ConsentSettings | null) => void;
|
|
927
|
+
/**
|
|
928
|
+
* Callback function called when settings are saved to storage
|
|
929
|
+
*/
|
|
930
|
+
onSave?: (settings: ConsentSettings) => void;
|
|
931
|
+
/**
|
|
932
|
+
* Whether to automatically save settings to storage
|
|
933
|
+
* @default true
|
|
934
|
+
*/
|
|
935
|
+
autoSave?: boolean;
|
|
936
|
+
/**
|
|
937
|
+
* Whether to automatically load settings from storage on mount
|
|
938
|
+
* @default true
|
|
939
|
+
*/
|
|
940
|
+
autoLoad?: boolean;
|
|
941
|
+
/**
|
|
942
|
+
* Object of CSS class overrides keyed by semantic section name.
|
|
943
|
+
*/
|
|
944
|
+
classNames?: ConsentStorageClassNames;
|
|
945
|
+
/**
|
|
946
|
+
* When true, all default classes are removed so consumers
|
|
947
|
+
* can style from scratch using classNames.
|
|
948
|
+
*/
|
|
949
|
+
unstyled?: boolean;
|
|
950
|
+
/**
|
|
951
|
+
* Children to render
|
|
952
|
+
* Can be either React nodes or a render prop function that receives storage methods
|
|
953
|
+
*/
|
|
954
|
+
children?: React__default.ReactNode | ((props: {
|
|
955
|
+
loadSettings: () => ConsentSettings | null;
|
|
956
|
+
saveSettings: (settings: ConsentSettings) => void;
|
|
957
|
+
clearSettings: () => void;
|
|
958
|
+
loaded: boolean;
|
|
959
|
+
}) => React__default.ReactNode);
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Creates a new audit entry from consent settings. If `previousSettings` is
|
|
964
|
+
* provided, the action is automatically determined by comparing old and new
|
|
965
|
+
* states. Otherwise `action` defaults to `'consent_given'`.
|
|
966
|
+
*/
|
|
967
|
+
export declare function createAuditEntry(settings: ConsentSettings, previousSettings?: ConsentSettings | null, actionOverride?: ConsentAuditEntry['action']): ConsentAuditEntry;
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* Creates a complete business privacy policy template with default
|
|
971
|
+
* NDPA-compliant sections and variables.
|
|
972
|
+
*
|
|
973
|
+
* @returns An object containing the default sections and variables.
|
|
974
|
+
*/
|
|
975
|
+
export declare function createBusinessPolicyTemplate(): {
|
|
976
|
+
sections: PolicySection[];
|
|
977
|
+
variables: PolicyVariable[];
|
|
978
|
+
};
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Summary of cross-border transfer compliance
|
|
982
|
+
*/
|
|
983
|
+
export declare interface CrossBorderSummary {
|
|
984
|
+
/** Total number of active transfers */
|
|
985
|
+
totalActiveTransfers: number;
|
|
986
|
+
/** Breakdown by transfer mechanism */
|
|
987
|
+
byMechanism: Record<TransferMechanism, number>;
|
|
988
|
+
/** Breakdown by adequacy status */
|
|
989
|
+
byAdequacy: Record<AdequacyStatus, number>;
|
|
990
|
+
/** Transfers pending NDPC approval */
|
|
991
|
+
pendingApproval: CrossBorderTransfer[];
|
|
992
|
+
/** Transfers due for review */
|
|
993
|
+
dueForReview: CrossBorderTransfer[];
|
|
994
|
+
/** Transfers missing TIA */
|
|
995
|
+
missingTIA: CrossBorderTransfer[];
|
|
996
|
+
/** High-risk transfers */
|
|
997
|
+
highRiskTransfers: CrossBorderTransfer[];
|
|
998
|
+
/** Last updated timestamp */
|
|
999
|
+
lastUpdated: number;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* Represents a cross-border data transfer record
|
|
1004
|
+
*/
|
|
1005
|
+
export declare interface CrossBorderTransfer {
|
|
1006
|
+
/** Unique identifier */
|
|
1007
|
+
id: string;
|
|
1008
|
+
/** Destination country or territory */
|
|
1009
|
+
destinationCountry: string;
|
|
1010
|
+
/** ISO country code */
|
|
1011
|
+
destinationCountryCode?: string;
|
|
1012
|
+
/** Adequacy status of the destination */
|
|
1013
|
+
adequacyStatus: AdequacyStatus;
|
|
1014
|
+
/** The transfer mechanism being relied upon */
|
|
1015
|
+
transferMechanism: TransferMechanism;
|
|
1016
|
+
/** Categories of personal data being transferred */
|
|
1017
|
+
dataCategories: string[];
|
|
1018
|
+
/** Whether sensitive personal data is included */
|
|
1019
|
+
includesSensitiveData: boolean;
|
|
1020
|
+
/** Estimated number of data subjects whose data is transferred */
|
|
1021
|
+
estimatedDataSubjects?: number;
|
|
1022
|
+
/** Name of the recipient organization */
|
|
1023
|
+
recipientOrganization: string;
|
|
1024
|
+
/** Contact details of the recipient */
|
|
1025
|
+
recipientContact: {
|
|
1026
|
+
name: string;
|
|
1027
|
+
email: string;
|
|
1028
|
+
phone?: string;
|
|
1029
|
+
address?: string;
|
|
1030
|
+
};
|
|
1031
|
+
/** Purpose of the data transfer */
|
|
1032
|
+
purpose: string;
|
|
1033
|
+
/** Safeguards in place to protect the data */
|
|
1034
|
+
safeguards: string[];
|
|
1035
|
+
/** Risk assessment summary */
|
|
1036
|
+
riskAssessment: string;
|
|
1037
|
+
/** Risk level of the transfer */
|
|
1038
|
+
riskLevel: 'low' | 'medium' | 'high';
|
|
1039
|
+
/** NDPC approval details (required for some transfer mechanisms) */
|
|
1040
|
+
ndpcApproval?: {
|
|
1041
|
+
required: boolean;
|
|
1042
|
+
applied: boolean;
|
|
1043
|
+
approved?: boolean;
|
|
1044
|
+
referenceNumber?: string;
|
|
1045
|
+
appliedAt?: number;
|
|
1046
|
+
approvedAt?: number;
|
|
1047
|
+
};
|
|
1048
|
+
/** Whether a Transfer Impact Assessment has been conducted */
|
|
1049
|
+
tiaCompleted: boolean;
|
|
1050
|
+
/** Reference to the TIA document */
|
|
1051
|
+
tiaReference?: string;
|
|
1052
|
+
/** Frequency of the transfer */
|
|
1053
|
+
frequency: 'one_time' | 'periodic' | 'continuous';
|
|
1054
|
+
/** Start date of the transfer */
|
|
1055
|
+
startDate: number;
|
|
1056
|
+
/** End date of the transfer (if applicable) */
|
|
1057
|
+
endDate?: number;
|
|
1058
|
+
/** Status of the transfer */
|
|
1059
|
+
status: 'active' | 'suspended' | 'terminated' | 'pending_approval';
|
|
1060
|
+
/** Timestamp when the record was created */
|
|
1061
|
+
createdAt: number;
|
|
1062
|
+
/** Timestamp when the record was last updated */
|
|
1063
|
+
updatedAt: number;
|
|
1064
|
+
/** Next review date */
|
|
1065
|
+
reviewDate?: number;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Cross-border data transfer management component. Implements NDPA Sections 41-45 requirements
|
|
1070
|
+
* for managing international data transfers, including adequacy decisions, standard contractual
|
|
1071
|
+
* clauses, and NDPC authorization.
|
|
1072
|
+
*/
|
|
1073
|
+
export declare const CrossBorderTransferManager: React__default.FC<CrossBorderTransferManagerProps>;
|
|
1074
|
+
|
|
1075
|
+
export declare interface CrossBorderTransferManagerClassNames {
|
|
1076
|
+
root?: string;
|
|
1077
|
+
header?: string;
|
|
1078
|
+
title?: string;
|
|
1079
|
+
summary?: string;
|
|
1080
|
+
summaryCard?: string;
|
|
1081
|
+
transferList?: string;
|
|
1082
|
+
transferItem?: string;
|
|
1083
|
+
form?: string;
|
|
1084
|
+
input?: string;
|
|
1085
|
+
select?: string;
|
|
1086
|
+
submitButton?: string;
|
|
1087
|
+
/** Alias for submitButton */
|
|
1088
|
+
primaryButton?: string;
|
|
1089
|
+
riskBadge?: string;
|
|
1090
|
+
statusBadge?: string;
|
|
1091
|
+
detailPanel?: string;
|
|
1092
|
+
approvalStatus?: string;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
declare interface CrossBorderTransferManagerProps {
|
|
1096
|
+
/**
|
|
1097
|
+
* List of cross-border transfers to display
|
|
1098
|
+
*/
|
|
1099
|
+
transfers: CrossBorderTransfer[];
|
|
1100
|
+
/**
|
|
1101
|
+
* Callback when a new transfer is added
|
|
1102
|
+
*/
|
|
1103
|
+
onAddTransfer?: (transfer: Omit<CrossBorderTransfer, 'id' | 'createdAt' | 'updatedAt'>) => void;
|
|
1104
|
+
/**
|
|
1105
|
+
* Callback when a transfer is updated
|
|
1106
|
+
*/
|
|
1107
|
+
onUpdateTransfer?: (id: string, updates: Partial<CrossBorderTransfer>) => void;
|
|
1108
|
+
/**
|
|
1109
|
+
* Callback when a transfer is removed
|
|
1110
|
+
*/
|
|
1111
|
+
onRemoveTransfer?: (id: string) => void;
|
|
1112
|
+
/**
|
|
1113
|
+
* Compliance summary data
|
|
1114
|
+
*/
|
|
1115
|
+
summary?: CrossBorderSummary;
|
|
1116
|
+
/**
|
|
1117
|
+
* Title displayed on the manager
|
|
1118
|
+
* @default "Cross-Border Data Transfer Manager"
|
|
1119
|
+
*/
|
|
1120
|
+
title?: string;
|
|
1121
|
+
/**
|
|
1122
|
+
* Description text displayed on the manager
|
|
1123
|
+
* @default "Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VI (Sections 41-45)."
|
|
1124
|
+
*/
|
|
1125
|
+
description?: string;
|
|
1126
|
+
/**
|
|
1127
|
+
* Custom CSS class for the manager container
|
|
1128
|
+
*/
|
|
1129
|
+
className?: string;
|
|
1130
|
+
/**
|
|
1131
|
+
* Custom CSS class for buttons
|
|
1132
|
+
*/
|
|
1133
|
+
buttonClassName?: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* Whether to show the compliance summary section
|
|
1136
|
+
* @default true
|
|
1137
|
+
*/
|
|
1138
|
+
showSummary?: boolean;
|
|
1139
|
+
/**
|
|
1140
|
+
* Whether to show the TIA section in the form
|
|
1141
|
+
* @default true
|
|
1142
|
+
*/
|
|
1143
|
+
showTIA?: boolean;
|
|
1144
|
+
/**
|
|
1145
|
+
* Override class names for individual sections of the component.
|
|
1146
|
+
* Takes priority over className / buttonClassName.
|
|
1147
|
+
*/
|
|
1148
|
+
classNames?: CrossBorderTransferManagerClassNames;
|
|
1149
|
+
/**
|
|
1150
|
+
* When true, all default styling is removed so consumers
|
|
1151
|
+
* can style from scratch using classNames.
|
|
1152
|
+
*/
|
|
1153
|
+
unstyled?: boolean;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Default NDPA-compliant privacy policy sections.
|
|
1158
|
+
* Each section uses {{variable}} placeholders that are resolved at generation time.
|
|
1159
|
+
*/
|
|
1160
|
+
export declare const DEFAULT_POLICY_SECTIONS: PolicySection[];
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Default policy variables for NDPA-compliant privacy policies.
|
|
1164
|
+
* These map to the {{variable}} placeholders used in DEFAULT_POLICY_SECTIONS.
|
|
1165
|
+
*/
|
|
1166
|
+
export declare const DEFAULT_POLICY_VARIABLES: PolicyVariable[];
|
|
1167
|
+
|
|
1168
|
+
/** A map of question IDs to their answer values */
|
|
1169
|
+
declare type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
|
|
1170
|
+
|
|
1171
|
+
/** Possible value types for a DPIA answer */
|
|
1172
|
+
declare type DPIAAnswerValue = string | number | boolean | string[];
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
|
|
1176
|
+
* A DPIA is required when processing is likely to result in high risk to data subjects
|
|
1177
|
+
*/
|
|
1178
|
+
/**
|
|
1179
|
+
* Represents a question in the DPIA questionnaire
|
|
1180
|
+
*/
|
|
1181
|
+
export declare interface DPIAQuestion {
|
|
1182
|
+
/** Unique identifier for the question */
|
|
1183
|
+
id: string;
|
|
1184
|
+
/** The text of the question */
|
|
1185
|
+
text: string;
|
|
1186
|
+
/** Additional guidance for answering the question */
|
|
1187
|
+
guidance?: string;
|
|
1188
|
+
/** Type of input required for the answer */
|
|
1189
|
+
type: 'text' | 'textarea' | 'select' | 'radio' | 'checkbox' | 'scale';
|
|
1190
|
+
/** Options for select, radio, or checkbox questions */
|
|
1191
|
+
options?: Array<{
|
|
1192
|
+
value: string;
|
|
1193
|
+
label: string;
|
|
1194
|
+
riskLevel?: 'low' | 'medium' | 'high';
|
|
1195
|
+
}>;
|
|
1196
|
+
/** For scale questions, the minimum value */
|
|
1197
|
+
minValue?: number;
|
|
1198
|
+
/** For scale questions, the maximum value */
|
|
1199
|
+
maxValue?: number;
|
|
1200
|
+
/** For scale questions, labels for the scale points */
|
|
1201
|
+
scaleLabels?: Record<number, string>;
|
|
1202
|
+
/** Whether the question is required */
|
|
1203
|
+
required: boolean;
|
|
1204
|
+
/** Risk level associated with this question */
|
|
1205
|
+
riskLevel?: 'low' | 'medium' | 'high';
|
|
1206
|
+
/** Whether this question triggers additional questions based on the answer */
|
|
1207
|
+
hasDependentQuestions?: boolean;
|
|
1208
|
+
/** Conditions that determine when this question should be shown */
|
|
1209
|
+
showWhen?: Array<{
|
|
1210
|
+
questionId: string;
|
|
1211
|
+
operator: 'equals' | 'contains' | 'greaterThan' | 'lessThan';
|
|
1212
|
+
value: string | number | boolean;
|
|
1213
|
+
}>;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* DPIA questionnaire component. Implements NDPA Section 38 requirements
|
|
1218
|
+
* for conducting Data Protection Impact Assessments on high-risk processing activities.
|
|
1219
|
+
*/
|
|
1220
|
+
export declare const DPIAQuestionnaire: React__default.FC<DPIAQuestionnaireProps>;
|
|
1221
|
+
|
|
1222
|
+
export declare interface DPIAQuestionnaireClassNames {
|
|
1223
|
+
/** Outermost wrapper */
|
|
1224
|
+
root?: string;
|
|
1225
|
+
/** Header area containing progress indicator */
|
|
1226
|
+
header?: string;
|
|
1227
|
+
/** Section title */
|
|
1228
|
+
title?: string;
|
|
1229
|
+
/** Section container */
|
|
1230
|
+
section?: string;
|
|
1231
|
+
/** Section title heading */
|
|
1232
|
+
sectionTitle?: string;
|
|
1233
|
+
/** Individual question wrapper */
|
|
1234
|
+
question?: string;
|
|
1235
|
+
/** Question label text */
|
|
1236
|
+
questionText?: string;
|
|
1237
|
+
/** Guidance / help text below a question */
|
|
1238
|
+
guidance?: string;
|
|
1239
|
+
/** Text / textarea / select inputs */
|
|
1240
|
+
input?: string;
|
|
1241
|
+
/** Radio option group container */
|
|
1242
|
+
radioGroup?: string;
|
|
1243
|
+
/** Individual radio option row */
|
|
1244
|
+
radioOption?: string;
|
|
1245
|
+
/** Navigation button container */
|
|
1246
|
+
navigation?: string;
|
|
1247
|
+
/** Next / submit button */
|
|
1248
|
+
nextButton?: string;
|
|
1249
|
+
/** Previous button */
|
|
1250
|
+
prevButton?: string;
|
|
1251
|
+
/** Alias for nextButton */
|
|
1252
|
+
primaryButton?: string;
|
|
1253
|
+
/** Alias for prevButton */
|
|
1254
|
+
secondaryButton?: string;
|
|
1255
|
+
/** Progress bar wrapper */
|
|
1256
|
+
progressBar?: string;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
declare interface DPIAQuestionnaireProps {
|
|
1260
|
+
/**
|
|
1261
|
+
* Sections of the DPIA questionnaire
|
|
1262
|
+
*/
|
|
1263
|
+
sections: DPIASection[];
|
|
1264
|
+
/**
|
|
1265
|
+
* Current answers to the questionnaire
|
|
1266
|
+
*/
|
|
1267
|
+
answers: Record<string, string | number | boolean | string[]>;
|
|
1268
|
+
/**
|
|
1269
|
+
* Callback function called when an answer is updated
|
|
1270
|
+
*/
|
|
1271
|
+
onAnswerChange: (questionId: string, value: string | number | boolean | string[]) => void;
|
|
1272
|
+
/**
|
|
1273
|
+
* Current section index
|
|
1274
|
+
*/
|
|
1275
|
+
currentSectionIndex: number;
|
|
1276
|
+
/**
|
|
1277
|
+
* Callback function called when user navigates to the next section
|
|
1278
|
+
*/
|
|
1279
|
+
onNextSection?: () => void;
|
|
1280
|
+
/**
|
|
1281
|
+
* Callback function called when user navigates to the previous section
|
|
1282
|
+
*/
|
|
1283
|
+
onPrevSection?: () => void;
|
|
1284
|
+
/**
|
|
1285
|
+
* Validation errors for the current section
|
|
1286
|
+
*/
|
|
1287
|
+
validationErrors?: Record<string, string>;
|
|
1288
|
+
/**
|
|
1289
|
+
* Whether the questionnaire is in read-only mode
|
|
1290
|
+
* @default false
|
|
1291
|
+
*/
|
|
1292
|
+
readOnly?: boolean;
|
|
1293
|
+
/**
|
|
1294
|
+
* Custom CSS class for the questionnaire
|
|
1295
|
+
*/
|
|
1296
|
+
className?: string;
|
|
1297
|
+
/**
|
|
1298
|
+
* Custom CSS class for the buttons
|
|
1299
|
+
*/
|
|
1300
|
+
buttonClassName?: string;
|
|
1301
|
+
/**
|
|
1302
|
+
* Text for the next button
|
|
1303
|
+
* @default "Next"
|
|
1304
|
+
*/
|
|
1305
|
+
nextButtonText?: string;
|
|
1306
|
+
/**
|
|
1307
|
+
* Text for the previous button
|
|
1308
|
+
* @default "Previous"
|
|
1309
|
+
*/
|
|
1310
|
+
prevButtonText?: string;
|
|
1311
|
+
/**
|
|
1312
|
+
* Text for the submit button (shown on the last section)
|
|
1313
|
+
* @default "Submit"
|
|
1314
|
+
*/
|
|
1315
|
+
submitButtonText?: string;
|
|
1316
|
+
/**
|
|
1317
|
+
* Whether to show a progress indicator
|
|
1318
|
+
* @default true
|
|
1319
|
+
*/
|
|
1320
|
+
showProgress?: boolean;
|
|
1321
|
+
/**
|
|
1322
|
+
* Current progress percentage (0-100)
|
|
1323
|
+
*/
|
|
1324
|
+
progress?: number;
|
|
1325
|
+
/**
|
|
1326
|
+
* Per-section class name overrides
|
|
1327
|
+
*/
|
|
1328
|
+
classNames?: DPIAQuestionnaireClassNames;
|
|
1329
|
+
/**
|
|
1330
|
+
* When true, all default classes are stripped.
|
|
1331
|
+
* Only explicit overrides from `classNames` are applied.
|
|
1332
|
+
* @default false
|
|
1333
|
+
*/
|
|
1334
|
+
unstyled?: boolean;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* DPIA report component. Implements NDPA Sections 38-39 requirements for documenting
|
|
1339
|
+
* and presenting Data Protection Impact Assessment findings, risks, and recommendations.
|
|
1340
|
+
*/
|
|
1341
|
+
export declare const DPIAReport: React__default.FC<DPIAReportProps>;
|
|
1342
|
+
|
|
1343
|
+
export declare interface DPIAReportClassNames {
|
|
1344
|
+
/** Outermost wrapper */
|
|
1345
|
+
root?: string;
|
|
1346
|
+
/** Report header area */
|
|
1347
|
+
header?: string;
|
|
1348
|
+
/** Main report title */
|
|
1349
|
+
title?: string;
|
|
1350
|
+
/** Executive summary section */
|
|
1351
|
+
summary?: string;
|
|
1352
|
+
/** Risk level badge */
|
|
1353
|
+
riskBadge?: string;
|
|
1354
|
+
/** Risks table element */
|
|
1355
|
+
riskTable?: string;
|
|
1356
|
+
/** Individual risk row */
|
|
1357
|
+
riskRow?: string;
|
|
1358
|
+
/** Recommendation list item */
|
|
1359
|
+
recommendation?: string;
|
|
1360
|
+
/** Conclusion text */
|
|
1361
|
+
conclusion?: string;
|
|
1362
|
+
/** Print button */
|
|
1363
|
+
printButton?: string;
|
|
1364
|
+
/** Alias for printButton */
|
|
1365
|
+
primaryButton?: string;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
declare interface DPIAReportProps {
|
|
1369
|
+
/**
|
|
1370
|
+
* The DPIA result to display
|
|
1371
|
+
*/
|
|
1372
|
+
result: DPIAResult;
|
|
1373
|
+
/**
|
|
1374
|
+
* The sections of the DPIA questionnaire
|
|
1375
|
+
*/
|
|
1376
|
+
sections: DPIASection[];
|
|
1377
|
+
/**
|
|
1378
|
+
* Whether to show the full report or just a summary
|
|
1379
|
+
* @default true
|
|
1380
|
+
*/
|
|
1381
|
+
showFullReport?: boolean;
|
|
1382
|
+
/**
|
|
1383
|
+
* Whether to allow printing the report
|
|
1384
|
+
* @default true
|
|
1385
|
+
*/
|
|
1386
|
+
allowPrint?: boolean;
|
|
1387
|
+
/**
|
|
1388
|
+
* Whether to allow exporting the report as PDF
|
|
1389
|
+
* @default true
|
|
1390
|
+
*/
|
|
1391
|
+
allowExport?: boolean;
|
|
1392
|
+
/**
|
|
1393
|
+
* Callback function called when the report is exported
|
|
1394
|
+
*/
|
|
1395
|
+
onExport?: (format: 'pdf' | 'docx' | 'html') => void;
|
|
1396
|
+
/**
|
|
1397
|
+
* Custom CSS class for the report container
|
|
1398
|
+
*/
|
|
1399
|
+
className?: string;
|
|
1400
|
+
/**
|
|
1401
|
+
* Custom CSS class for the buttons
|
|
1402
|
+
*/
|
|
1403
|
+
buttonClassName?: string;
|
|
1404
|
+
/**
|
|
1405
|
+
* Per-section class name overrides
|
|
1406
|
+
*/
|
|
1407
|
+
classNames?: DPIAReportClassNames;
|
|
1408
|
+
/**
|
|
1409
|
+
* When true, all default classes are stripped.
|
|
1410
|
+
* Only explicit overrides from `classNames` are applied.
|
|
1411
|
+
* @default false
|
|
1412
|
+
*/
|
|
1413
|
+
unstyled?: boolean;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* Represents the result of a completed DPIA
|
|
1418
|
+
*/
|
|
1419
|
+
export declare interface DPIAResult {
|
|
1420
|
+
/** Unique identifier for the DPIA */
|
|
1421
|
+
id: string;
|
|
1422
|
+
/** Title of the DPIA */
|
|
1423
|
+
title: string;
|
|
1424
|
+
/** Description of the processing activity being assessed */
|
|
1425
|
+
processingDescription: string;
|
|
1426
|
+
/** Timestamp when the DPIA was started */
|
|
1427
|
+
startedAt: number;
|
|
1428
|
+
/** Timestamp when the DPIA was completed */
|
|
1429
|
+
completedAt?: number;
|
|
1430
|
+
/** Person responsible for conducting the DPIA */
|
|
1431
|
+
assessor: {
|
|
1432
|
+
name: string;
|
|
1433
|
+
role: string;
|
|
1434
|
+
email: string;
|
|
1435
|
+
};
|
|
1436
|
+
/** Answers to all questions in the DPIA */
|
|
1437
|
+
answers: Record<string, string | number | boolean | string[]>;
|
|
1438
|
+
/** Risks identified in the DPIA */
|
|
1439
|
+
risks: DPIARisk[];
|
|
1440
|
+
/** Overall risk level of the processing activity */
|
|
1441
|
+
overallRiskLevel: 'low' | 'medium' | 'high' | 'critical';
|
|
1442
|
+
/** Whether the DPIA concluded that the processing can proceed */
|
|
1443
|
+
canProceed: boolean;
|
|
1444
|
+
/** Reasons why the processing can or cannot proceed */
|
|
1445
|
+
conclusion: string;
|
|
1446
|
+
/** Recommendations for the processing activity */
|
|
1447
|
+
recommendations?: string[];
|
|
1448
|
+
/** Next review date for the DPIA */
|
|
1449
|
+
reviewDate?: number;
|
|
1450
|
+
/** Version of the DPIA questionnaire used */
|
|
1451
|
+
version: string;
|
|
1452
|
+
/**
|
|
1453
|
+
* Whether prior consultation with NDPC is required
|
|
1454
|
+
* Per NDPA Section 39, consultation is required when DPIA indicates high residual risk
|
|
1455
|
+
*/
|
|
1456
|
+
ndpcConsultationRequired?: boolean;
|
|
1457
|
+
/** Date when NDPC consultation was initiated */
|
|
1458
|
+
ndpcConsultationDate?: number;
|
|
1459
|
+
/** Reference number from NDPC consultation */
|
|
1460
|
+
ndpcConsultationReference?: string;
|
|
1461
|
+
/**
|
|
1462
|
+
* The lawful basis for the processing activity being assessed
|
|
1463
|
+
*/
|
|
1464
|
+
lawfulBasis?: string;
|
|
1465
|
+
/**
|
|
1466
|
+
* Whether this DPIA involves cross-border data transfers
|
|
1467
|
+
*/
|
|
1468
|
+
involvesCrossBorderTransfer?: boolean;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
/**
|
|
1472
|
+
* Represents a risk identified in the DPIA
|
|
1473
|
+
*/
|
|
1474
|
+
export declare interface DPIARisk {
|
|
1475
|
+
/** Unique identifier for the risk */
|
|
1476
|
+
id: string;
|
|
1477
|
+
/** Description of the risk */
|
|
1478
|
+
description: string;
|
|
1479
|
+
/** Likelihood of the risk occurring (1-5) */
|
|
1480
|
+
likelihood: number;
|
|
1481
|
+
/** Impact if the risk occurs (1-5) */
|
|
1482
|
+
impact: number;
|
|
1483
|
+
/** Overall risk score (likelihood * impact) */
|
|
1484
|
+
score: number;
|
|
1485
|
+
/** Risk level based on the score */
|
|
1486
|
+
level: 'low' | 'medium' | 'high' | 'critical';
|
|
1487
|
+
/** Measures to mitigate the risk */
|
|
1488
|
+
mitigationMeasures?: string[];
|
|
1489
|
+
/** Whether the risk has been mitigated */
|
|
1490
|
+
mitigated: boolean;
|
|
1491
|
+
/** Residual risk score after mitigation */
|
|
1492
|
+
residualScore?: number;
|
|
1493
|
+
/** Questions that identified this risk */
|
|
1494
|
+
relatedQuestionIds: string[];
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
/**
|
|
1498
|
+
* Represents a section in the DPIA questionnaire
|
|
1499
|
+
*/
|
|
1500
|
+
export declare interface DPIASection {
|
|
1501
|
+
/** Unique identifier for the section */
|
|
1502
|
+
id: string;
|
|
1503
|
+
/** Title of the section */
|
|
1504
|
+
title: string;
|
|
1505
|
+
/** Description of the section */
|
|
1506
|
+
description?: string;
|
|
1507
|
+
/** Questions in this section */
|
|
1508
|
+
questions: DPIAQuestion[];
|
|
1509
|
+
/** Order of the section in the questionnaire */
|
|
1510
|
+
order: number;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Data Subject Request dashboard component. Supports compliance with NDPA Part IV,
|
|
1515
|
+
* providing tools to track, manage, and respond to data subject requests within required timeframes.
|
|
1516
|
+
*/
|
|
1517
|
+
export declare const DSRDashboard: React__default.FC<DSRDashboardProps>;
|
|
1518
|
+
|
|
1519
|
+
export declare interface DSRDashboardClassNames {
|
|
1520
|
+
root?: string;
|
|
1521
|
+
header?: string;
|
|
1522
|
+
title?: string;
|
|
1523
|
+
filters?: string;
|
|
1524
|
+
requestList?: string;
|
|
1525
|
+
requestItem?: string;
|
|
1526
|
+
statusBadge?: string;
|
|
1527
|
+
detailPanel?: string;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
declare interface DSRDashboardProps {
|
|
1531
|
+
/**
|
|
1532
|
+
* List of DSR requests to display
|
|
1533
|
+
*/
|
|
1534
|
+
requests: DSRRequest[];
|
|
1535
|
+
/**
|
|
1536
|
+
* Callback function called when a request is selected
|
|
1537
|
+
*/
|
|
1538
|
+
onSelectRequest?: (requestId: string) => void;
|
|
1539
|
+
/**
|
|
1540
|
+
* Callback function called when a request status is updated
|
|
1541
|
+
*/
|
|
1542
|
+
onUpdateStatus?: (requestId: string, status: DSRStatus) => void;
|
|
1543
|
+
/**
|
|
1544
|
+
* Callback function called when a request is assigned
|
|
1545
|
+
*/
|
|
1546
|
+
onAssignRequest?: (requestId: string, assignee: string) => void;
|
|
1547
|
+
/**
|
|
1548
|
+
* Title displayed on the dashboard
|
|
1549
|
+
* @default "Data Subject Request Dashboard"
|
|
1550
|
+
*/
|
|
1551
|
+
title?: string;
|
|
1552
|
+
/**
|
|
1553
|
+
* Description text displayed on the dashboard
|
|
1554
|
+
* @default "Track and manage data subject requests in compliance with NDPA Part IV requirements."
|
|
1555
|
+
*/
|
|
1556
|
+
description?: string;
|
|
1557
|
+
/**
|
|
1558
|
+
* Custom CSS class for the dashboard
|
|
1559
|
+
*/
|
|
1560
|
+
className?: string;
|
|
1561
|
+
/**
|
|
1562
|
+
* Custom CSS class for the buttons
|
|
1563
|
+
*/
|
|
1564
|
+
buttonClassName?: string;
|
|
1565
|
+
/**
|
|
1566
|
+
* Whether to show the request details
|
|
1567
|
+
* @default true
|
|
1568
|
+
*/
|
|
1569
|
+
showRequestDetails?: boolean;
|
|
1570
|
+
/**
|
|
1571
|
+
* Whether to show the request timeline
|
|
1572
|
+
* @default true
|
|
1573
|
+
*/
|
|
1574
|
+
showRequestTimeline?: boolean;
|
|
1575
|
+
/**
|
|
1576
|
+
* Whether to show the deadline alerts
|
|
1577
|
+
* @default true
|
|
1578
|
+
*/
|
|
1579
|
+
showDeadlineAlerts?: boolean;
|
|
1580
|
+
/**
|
|
1581
|
+
* List of possible assignees
|
|
1582
|
+
*/
|
|
1583
|
+
assignees?: string[];
|
|
1584
|
+
/**
|
|
1585
|
+
* Object of CSS class overrides keyed by semantic section name.
|
|
1586
|
+
*/
|
|
1587
|
+
classNames?: DSRDashboardClassNames;
|
|
1588
|
+
/**
|
|
1589
|
+
* When true, all default Tailwind classes are removed so consumers
|
|
1590
|
+
* can style from scratch using classNames.
|
|
1591
|
+
*/
|
|
1592
|
+
unstyled?: boolean;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* Represents the data submitted by the DSR request form.
|
|
1597
|
+
*/
|
|
1598
|
+
export declare interface DSRFormSubmission {
|
|
1599
|
+
/** The selected request type identifier */
|
|
1600
|
+
requestType: string;
|
|
1601
|
+
/** Data subject personal information */
|
|
1602
|
+
dataSubject: {
|
|
1603
|
+
fullName: string;
|
|
1604
|
+
email: string;
|
|
1605
|
+
phone?: string;
|
|
1606
|
+
identifierType: string;
|
|
1607
|
+
identifierValue: string;
|
|
1608
|
+
};
|
|
1609
|
+
/** Additional information provided for the selected request type */
|
|
1610
|
+
additionalInfo?: Record<string, string | number | boolean | null>;
|
|
1611
|
+
/** Timestamp (ms) when the form was submitted */
|
|
1612
|
+
submittedAt: number;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* Represents a data subject request
|
|
1617
|
+
*/
|
|
1618
|
+
export declare interface DSRRequest {
|
|
1619
|
+
/** Unique identifier for the request */
|
|
1620
|
+
id: string;
|
|
1621
|
+
/** Type of request */
|
|
1622
|
+
type: DSRType;
|
|
1623
|
+
/** Current status of the request */
|
|
1624
|
+
status: DSRStatus;
|
|
1625
|
+
/** Timestamp when the request was submitted */
|
|
1626
|
+
createdAt: number;
|
|
1627
|
+
/** Timestamp when the request was last updated */
|
|
1628
|
+
updatedAt: number;
|
|
1629
|
+
/** Timestamp when the request was completed (if applicable) */
|
|
1630
|
+
completedAt?: number;
|
|
1631
|
+
/** Timestamp when the identity was verified (if applicable) */
|
|
1632
|
+
verifiedAt?: number;
|
|
1633
|
+
/**
|
|
1634
|
+
* Due date for responding to the request (timestamp)
|
|
1635
|
+
* NDPA requires response within 30 days of receipt
|
|
1636
|
+
*/
|
|
1637
|
+
dueDate?: number;
|
|
1638
|
+
/** Description or details of the request */
|
|
1639
|
+
description?: string;
|
|
1640
|
+
/**
|
|
1641
|
+
* The lawful basis under which the data was originally processed
|
|
1642
|
+
* Relevant for evaluating objection and erasure requests
|
|
1643
|
+
*/
|
|
1644
|
+
lawfulBasis?: string;
|
|
1645
|
+
/** Data subject information */
|
|
1646
|
+
subject: {
|
|
1647
|
+
name: string;
|
|
1648
|
+
email: string;
|
|
1649
|
+
phone?: string;
|
|
1650
|
+
identifierValue?: string;
|
|
1651
|
+
identifierType?: string;
|
|
1652
|
+
};
|
|
1653
|
+
/** Additional information provided by the data subject */
|
|
1654
|
+
additionalInfo?: Record<string, string | number | boolean | null>;
|
|
1655
|
+
/** Notes added by staff processing the request */
|
|
1656
|
+
internalNotes?: Array<{
|
|
1657
|
+
timestamp: number;
|
|
1658
|
+
author: string;
|
|
1659
|
+
note: string;
|
|
1660
|
+
}>;
|
|
1661
|
+
/** Verification status */
|
|
1662
|
+
verification?: {
|
|
1663
|
+
verified: boolean;
|
|
1664
|
+
method?: string;
|
|
1665
|
+
verifiedAt?: number;
|
|
1666
|
+
verifiedBy?: string;
|
|
1667
|
+
};
|
|
1668
|
+
/** Reason for rejection (if status is 'rejected') */
|
|
1669
|
+
rejectionReason?: string;
|
|
1670
|
+
/** Files attached to the request */
|
|
1671
|
+
attachments?: Array<{
|
|
1672
|
+
id: string;
|
|
1673
|
+
name: string;
|
|
1674
|
+
type: string;
|
|
1675
|
+
url: string;
|
|
1676
|
+
addedAt: number;
|
|
1677
|
+
}>;
|
|
1678
|
+
/**
|
|
1679
|
+
* Whether an extension was requested for this DSR
|
|
1680
|
+
* NDPA allows a one-time extension of 30 days with justification
|
|
1681
|
+
*/
|
|
1682
|
+
extensionRequested?: boolean;
|
|
1683
|
+
/** Reason for the extension, if requested */
|
|
1684
|
+
extensionReason?: string;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
/**
|
|
1688
|
+
* Data Subject Request form component. Implements NDPA Part IV, Sections 29-36
|
|
1689
|
+
* covering data subject rights including access, rectification, erasure, and portability.
|
|
1690
|
+
*/
|
|
1691
|
+
export declare const DSRRequestForm: React__default.FC<DSRRequestFormProps>;
|
|
1692
|
+
|
|
1693
|
+
export declare interface DSRRequestFormClassNames {
|
|
1694
|
+
root?: string;
|
|
1695
|
+
title?: string;
|
|
1696
|
+
description?: string;
|
|
1697
|
+
form?: string;
|
|
1698
|
+
fieldGroup?: string;
|
|
1699
|
+
label?: string;
|
|
1700
|
+
input?: string;
|
|
1701
|
+
select?: string;
|
|
1702
|
+
textarea?: string;
|
|
1703
|
+
submitButton?: string;
|
|
1704
|
+
/** Alias for submitButton */
|
|
1705
|
+
primaryButton?: string;
|
|
1706
|
+
successMessage?: string;
|
|
1707
|
+
/** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
|
|
1708
|
+
loadingOverlay?: string;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
declare interface DSRRequestFormProps {
|
|
1712
|
+
/**
|
|
1713
|
+
* Array of request types that can be submitted
|
|
1714
|
+
*/
|
|
1715
|
+
requestTypes: RequestType[];
|
|
1716
|
+
/**
|
|
1717
|
+
* Callback function called when form is submitted
|
|
1718
|
+
*/
|
|
1719
|
+
onSubmit: (data: DSRFormSubmission) => void;
|
|
1720
|
+
/**
|
|
1721
|
+
* Callback function called when form validation fails
|
|
1722
|
+
*/
|
|
1723
|
+
onValidationError?: (errors: Record<string, string>) => void;
|
|
1724
|
+
/**
|
|
1725
|
+
* Title displayed on the form
|
|
1726
|
+
* @default "Submit a Data Subject Request"
|
|
1727
|
+
*/
|
|
1728
|
+
title?: string;
|
|
1729
|
+
/**
|
|
1730
|
+
* Description text displayed on the form
|
|
1731
|
+
* @default "Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part IV, Sections 29-36."
|
|
1732
|
+
*/
|
|
1733
|
+
description?: string;
|
|
1734
|
+
/**
|
|
1735
|
+
* Text for the submit button
|
|
1736
|
+
* @default "Submit Request"
|
|
1737
|
+
*/
|
|
1738
|
+
submitButtonText?: string;
|
|
1739
|
+
/**
|
|
1740
|
+
* Custom CSS class for the form
|
|
1741
|
+
*/
|
|
1742
|
+
className?: string;
|
|
1743
|
+
/**
|
|
1744
|
+
* Custom CSS class for the submit button
|
|
1745
|
+
*/
|
|
1746
|
+
buttonClassName?: string;
|
|
1747
|
+
/**
|
|
1748
|
+
* Whether to show a confirmation message after submission
|
|
1749
|
+
* @default true
|
|
1750
|
+
*/
|
|
1751
|
+
showConfirmation?: boolean;
|
|
1752
|
+
/**
|
|
1753
|
+
* Confirmation message to display after submission
|
|
1754
|
+
* @default "Your request has been submitted successfully. You will receive a confirmation email shortly."
|
|
1755
|
+
*/
|
|
1756
|
+
confirmationMessage?: string;
|
|
1757
|
+
/**
|
|
1758
|
+
* Whether to require identity verification
|
|
1759
|
+
* @default true
|
|
1760
|
+
*/
|
|
1761
|
+
requireIdentityVerification?: boolean;
|
|
1762
|
+
/**
|
|
1763
|
+
* Types of identifiers accepted for verification
|
|
1764
|
+
* @default ["email", "account", "customer_id"]
|
|
1765
|
+
*/
|
|
1766
|
+
identifierTypes?: Array<{
|
|
1767
|
+
id: string;
|
|
1768
|
+
label: string;
|
|
1769
|
+
}>;
|
|
1770
|
+
/**
|
|
1771
|
+
* Whether to collect additional contact information
|
|
1772
|
+
* @default true
|
|
1773
|
+
*/
|
|
1774
|
+
collectAdditionalContact?: boolean;
|
|
1775
|
+
/**
|
|
1776
|
+
* Custom labels for form fields
|
|
1777
|
+
*/
|
|
1778
|
+
labels?: {
|
|
1779
|
+
name?: string;
|
|
1780
|
+
email?: string;
|
|
1781
|
+
requestType?: string;
|
|
1782
|
+
description?: string;
|
|
1783
|
+
submit?: string;
|
|
1784
|
+
};
|
|
1785
|
+
/**
|
|
1786
|
+
* Object of CSS class overrides keyed by semantic section name.
|
|
1787
|
+
*/
|
|
1788
|
+
classNames?: DSRRequestFormClassNames;
|
|
1789
|
+
/**
|
|
1790
|
+
* When true, all default Tailwind classes are removed so consumers
|
|
1791
|
+
* can style from scratch using classNames.
|
|
1792
|
+
*/
|
|
1793
|
+
unstyled?: boolean;
|
|
1794
|
+
/**
|
|
1795
|
+
* Whether the form is currently submitting.
|
|
1796
|
+
* When true, the submit button is disabled and shows "Submitting..." text.
|
|
1797
|
+
*/
|
|
1798
|
+
isSubmitting?: boolean;
|
|
1799
|
+
/**
|
|
1800
|
+
* Default values to pre-fill form fields.
|
|
1801
|
+
* Useful for editing existing requests or pre-populating known data.
|
|
1802
|
+
*/
|
|
1803
|
+
defaultValues?: Partial<DSRFormSubmission>;
|
|
1804
|
+
/**
|
|
1805
|
+
* Callback fired when the form is reset via the Reset button.
|
|
1806
|
+
* To fully remount the component (clearing all internal state),
|
|
1807
|
+
* change the `key` prop from the parent.
|
|
1808
|
+
*/
|
|
1809
|
+
onReset?: () => void;
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
/**
|
|
1813
|
+
* Status of a data subject request
|
|
1814
|
+
*/
|
|
1815
|
+
export declare type DSRStatus = 'pending' | 'awaitingVerification' | 'inProgress' | 'completed' | 'rejected';
|
|
1816
|
+
|
|
1817
|
+
/**
|
|
1818
|
+
* DSR tracking and analytics component. Supports compliance with NDPA Part IV,
|
|
1819
|
+
* providing summary statistics, deadline tracking, and compliance metrics for data subject requests.
|
|
1820
|
+
*/
|
|
1821
|
+
export declare const DSRTracker: React__default.FC<DSRTrackerProps>;
|
|
1822
|
+
|
|
1823
|
+
export declare interface DSRTrackerClassNames {
|
|
1824
|
+
root?: string;
|
|
1825
|
+
header?: string;
|
|
1826
|
+
title?: string;
|
|
1827
|
+
stats?: string;
|
|
1828
|
+
statCard?: string;
|
|
1829
|
+
table?: string;
|
|
1830
|
+
tableHeader?: string;
|
|
1831
|
+
tableRow?: string;
|
|
1832
|
+
statusBadge?: string;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
declare interface DSRTrackerProps {
|
|
1836
|
+
/**
|
|
1837
|
+
* List of DSR requests to track
|
|
1838
|
+
*/
|
|
1839
|
+
requests: DSRRequest[];
|
|
1840
|
+
/**
|
|
1841
|
+
* Callback function called when a request is selected
|
|
1842
|
+
*/
|
|
1843
|
+
onSelectRequest?: (requestId: string) => void;
|
|
1844
|
+
/**
|
|
1845
|
+
* Title displayed on the tracker
|
|
1846
|
+
* @default "DSR Request Tracker"
|
|
1847
|
+
*/
|
|
1848
|
+
title?: string;
|
|
1849
|
+
/**
|
|
1850
|
+
* Description text displayed on the tracker
|
|
1851
|
+
* @default "Track the status and progress of data subject requests as required by NDPA Part IV."
|
|
1852
|
+
*/
|
|
1853
|
+
description?: string;
|
|
1854
|
+
/**
|
|
1855
|
+
* Custom CSS class for the tracker
|
|
1856
|
+
*/
|
|
1857
|
+
className?: string;
|
|
1858
|
+
/**
|
|
1859
|
+
* Custom CSS class for the buttons
|
|
1860
|
+
*/
|
|
1861
|
+
buttonClassName?: string;
|
|
1862
|
+
/**
|
|
1863
|
+
* Whether to show the summary statistics
|
|
1864
|
+
* @default true
|
|
1865
|
+
*/
|
|
1866
|
+
showSummaryStats?: boolean;
|
|
1867
|
+
/**
|
|
1868
|
+
* Whether to show the request type breakdown
|
|
1869
|
+
* @default true
|
|
1870
|
+
*/
|
|
1871
|
+
showTypeBreakdown?: boolean;
|
|
1872
|
+
/**
|
|
1873
|
+
* Whether to show the status breakdown
|
|
1874
|
+
* @default true
|
|
1875
|
+
*/
|
|
1876
|
+
showStatusBreakdown?: boolean;
|
|
1877
|
+
/**
|
|
1878
|
+
* Whether to show the timeline chart
|
|
1879
|
+
* @default true
|
|
1880
|
+
*/
|
|
1881
|
+
showTimelineChart?: boolean;
|
|
1882
|
+
/**
|
|
1883
|
+
* Whether to show the overdue requests
|
|
1884
|
+
* @default true
|
|
1885
|
+
*/
|
|
1886
|
+
showOverdueRequests?: boolean;
|
|
1887
|
+
/**
|
|
1888
|
+
* Object of CSS class overrides keyed by semantic section name.
|
|
1889
|
+
*/
|
|
1890
|
+
classNames?: DSRTrackerClassNames;
|
|
1891
|
+
/**
|
|
1892
|
+
* When true, all default Tailwind classes are removed so consumers
|
|
1893
|
+
* can style from scratch using classNames.
|
|
1894
|
+
*/
|
|
1895
|
+
unstyled?: boolean;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
/**
|
|
1899
|
+
* Data Subject Rights types aligned with NDPA 2023 Part IV (Sections 29-36)
|
|
1900
|
+
*/
|
|
1901
|
+
/**
|
|
1902
|
+
* Types of data subject requests per NDPA Part IV
|
|
1903
|
+
* - 'information': Right to be informed (Section 29)
|
|
1904
|
+
* - 'access': Right of access (Section 30)
|
|
1905
|
+
* - 'rectification': Right to rectification (Section 31)
|
|
1906
|
+
* - 'erasure': Right to erasure (Section 32)
|
|
1907
|
+
* - 'restriction': Right to restrict processing (Section 33)
|
|
1908
|
+
* - 'portability': Right to data portability (Section 34)
|
|
1909
|
+
* - 'objection': Right to object (Section 35)
|
|
1910
|
+
* - 'automated_decision_making': Rights related to automated decision-making (Section 36)
|
|
1911
|
+
*/
|
|
1912
|
+
export declare type DSRType = 'information' | 'access' | 'rectification' | 'erasure' | 'restriction' | 'portability' | 'objection' | 'automated_decision_making';
|
|
1913
|
+
|
|
1914
|
+
export declare type EffortLevel = 'low' | 'medium' | 'high';
|
|
1915
|
+
|
|
1916
|
+
/**
|
|
1917
|
+
* Exports the Record of Processing Activities to a CSV string.
|
|
1918
|
+
* The CSV includes all key fields from each processing record.
|
|
1919
|
+
*
|
|
1920
|
+
* @param ropa - The full Record of Processing Activities
|
|
1921
|
+
* @returns CSV-formatted string
|
|
1922
|
+
*/
|
|
1923
|
+
export declare function exportROPAToCSV(ropa: RecordOfProcessingActivities): string;
|
|
1924
|
+
|
|
1925
|
+
/**
|
|
1926
|
+
* Formats a DSR request for display or submission
|
|
1927
|
+
* @param request The DSR request to format
|
|
1928
|
+
* @returns Formatted request data
|
|
1929
|
+
*/
|
|
1930
|
+
export declare function formatDSRRequest(request: DSRRequest): {
|
|
1931
|
+
formattedRequest: Record<string, unknown>;
|
|
1932
|
+
isValid: boolean;
|
|
1933
|
+
validationErrors: string[];
|
|
1934
|
+
};
|
|
1935
|
+
|
|
1936
|
+
/**
|
|
1937
|
+
* Generates a summary of all lawful basis documentation across processing activities.
|
|
1938
|
+
*
|
|
1939
|
+
* @param activities Array of processing activities to summarize
|
|
1940
|
+
* @returns LawfulBasisSummary with counts, breakdowns, and flagged activities
|
|
1941
|
+
*/
|
|
1942
|
+
export declare function generateLawfulBasisSummary(activities: ProcessingActivity[]): LawfulBasisSummary;
|
|
1943
|
+
|
|
1944
|
+
/**
|
|
1945
|
+
* Generates policy text by replacing variables in a template with organization-specific values
|
|
1946
|
+
* @param sectionsOrTemplate The policy sections or template string to generate text for
|
|
1947
|
+
* @param organizationInfoOrVariables The organization information or variable map to use for replacement
|
|
1948
|
+
* @returns The generated policy text or an object with the generated text and metadata
|
|
1949
|
+
*/
|
|
1950
|
+
export declare function generatePolicyText(sectionsOrTemplate: PolicySection[] | string, organizationInfoOrVariables: OrganizationInfo | Record<string, string>): string | {
|
|
1951
|
+
fullText: string;
|
|
1952
|
+
sectionTexts: Record<string, string>;
|
|
1953
|
+
missingVariables: string[];
|
|
1954
|
+
};
|
|
1955
|
+
|
|
1956
|
+
/**
|
|
1957
|
+
* Generates a summary of the Record of Processing Activities.
|
|
1958
|
+
* Provides statistics and identifies records that are due for review.
|
|
1959
|
+
*
|
|
1960
|
+
* @param ropa - The full Record of Processing Activities
|
|
1961
|
+
* @returns Summary statistics for the ROPA
|
|
1962
|
+
*/
|
|
1963
|
+
export declare function generateROPASummary(ropa: RecordOfProcessingActivities): ROPASummary;
|
|
1964
|
+
|
|
1965
|
+
/**
|
|
1966
|
+
* Retrieves the full consent audit log from localStorage.
|
|
1967
|
+
* Returns an empty array if no log exists or parsing fails.
|
|
1968
|
+
*
|
|
1969
|
+
* @param storageKey - Base storage key (the audit key is derived as `${storageKey}_audit`)
|
|
1970
|
+
*/
|
|
1971
|
+
export declare function getAuditLog(storageKey?: string): ConsentAuditEntry[];
|
|
1972
|
+
|
|
1973
|
+
/**
|
|
1974
|
+
* Evaluate an organisation's NDPA compliance across all modules.
|
|
1975
|
+
*
|
|
1976
|
+
* @param input - Compliance input object
|
|
1977
|
+
* @returns ComplianceReport with overall score, per-module breakdown, and sorted recommendations
|
|
1978
|
+
*/
|
|
1979
|
+
export declare function getComplianceScore(input: ComplianceInput): ComplianceReport;
|
|
1980
|
+
|
|
1981
|
+
/**
|
|
1982
|
+
* Returns a human-readable description of a lawful basis with the relevant
|
|
1983
|
+
* NDPA section reference.
|
|
1984
|
+
*
|
|
1985
|
+
* @param basis The lawful basis to describe
|
|
1986
|
+
* @returns Description string including NDPA section reference
|
|
1987
|
+
*/
|
|
1988
|
+
export declare function getLawfulBasisDescription(basis: LawfulBasis): string;
|
|
1989
|
+
|
|
1990
|
+
/**
|
|
1991
|
+
* Returns a human-readable description of a transfer mechanism with its NDPA section reference.
|
|
1992
|
+
*
|
|
1993
|
+
* @param mechanism The transfer mechanism
|
|
1994
|
+
* @returns Description including the relevant NDPA section
|
|
1995
|
+
*/
|
|
1996
|
+
export declare function getTransferMechanismDescription(mechanism: TransferMechanism): string;
|
|
1997
|
+
|
|
1998
|
+
/**
|
|
1999
|
+
* Identifies compliance gaps in the Record of Processing Activities.
|
|
2000
|
+
* Finds records that are missing required information per NDPA 2023.
|
|
2001
|
+
*
|
|
2002
|
+
* @param ropa - The full Record of Processing Activities
|
|
2003
|
+
* @returns Array of compliance gaps grouped by record
|
|
2004
|
+
*/
|
|
2005
|
+
export declare function identifyComplianceGaps(ropa: RecordOfProcessingActivities): ROPAComplianceGap[];
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* Returns whether NDPC approval is required for a given transfer mechanism.
|
|
2009
|
+
* Approval is required for standard contractual clauses (Section 42),
|
|
2010
|
+
* binding corporate rules (Section 43), and specific NDPC authorization (Section 44).
|
|
2011
|
+
*
|
|
2012
|
+
* @param mechanism The transfer mechanism
|
|
2013
|
+
* @returns Whether NDPC approval is required
|
|
2014
|
+
*/
|
|
2015
|
+
export declare function isNDPCApprovalRequired(mechanism: TransferMechanism): boolean;
|
|
2016
|
+
|
|
2017
|
+
/**
|
|
2018
|
+
* Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
|
|
2019
|
+
* Every processing activity must have a documented lawful basis
|
|
2020
|
+
*/
|
|
2021
|
+
/**
|
|
2022
|
+
* The six lawful bases for processing personal data per NDPA Section 25(1)
|
|
2023
|
+
*/
|
|
2024
|
+
export declare type LawfulBasis = 'consent' | 'contract' | 'legal_obligation' | 'vital_interests' | 'public_interest' | 'legitimate_interests';
|
|
2025
|
+
|
|
2026
|
+
/**
|
|
2027
|
+
* Compliance gap identified across processing activities
|
|
2028
|
+
*/
|
|
2029
|
+
export declare interface LawfulBasisComplianceGap {
|
|
2030
|
+
activityId: string;
|
|
2031
|
+
activityName: string;
|
|
2032
|
+
type: 'missing_approval' | 'overdue_review' | 'missing_justification' | 'missing_lia' | 'missing_sensitive_condition' | 'missing_retention' | 'missing_data_categories' | 'missing_purposes';
|
|
2033
|
+
severity: 'high' | 'medium' | 'low';
|
|
2034
|
+
description: string;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
/**
|
|
2038
|
+
* Summary of all lawful basis documentation for compliance reporting
|
|
2039
|
+
*/
|
|
2040
|
+
export declare interface LawfulBasisSummary {
|
|
2041
|
+
/** Total number of processing activities */
|
|
2042
|
+
totalActivities: number;
|
|
2043
|
+
/** Breakdown by lawful basis */
|
|
2044
|
+
byBasis: Record<LawfulBasis, number>;
|
|
2045
|
+
/** Number of activities involving sensitive data */
|
|
2046
|
+
sensitiveDataActivities: number;
|
|
2047
|
+
/** Number of activities involving cross-border transfers */
|
|
2048
|
+
crossBorderActivities: number;
|
|
2049
|
+
/** Activities due for review */
|
|
2050
|
+
activitiesDueForReview: ProcessingActivity[];
|
|
2051
|
+
/** Activities without DPO approval */
|
|
2052
|
+
activitiesWithoutApproval: ProcessingActivity[];
|
|
2053
|
+
/** Last updated timestamp */
|
|
2054
|
+
lastUpdated: number;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* Lawful basis tracker component. Implements NDPA Section 25 requirements for documenting
|
|
2059
|
+
* and tracking the lawful basis for each personal data processing activity.
|
|
2060
|
+
*/
|
|
2061
|
+
export declare const LawfulBasisTracker: React__default.FC<LawfulBasisTrackerProps>;
|
|
2062
|
+
|
|
2063
|
+
export declare interface LawfulBasisTrackerClassNames {
|
|
2064
|
+
root?: string;
|
|
2065
|
+
header?: string;
|
|
2066
|
+
title?: string;
|
|
2067
|
+
summary?: string;
|
|
2068
|
+
summaryCard?: string;
|
|
2069
|
+
table?: string;
|
|
2070
|
+
tableHeader?: string;
|
|
2071
|
+
tableRow?: string;
|
|
2072
|
+
form?: string;
|
|
2073
|
+
input?: string;
|
|
2074
|
+
select?: string;
|
|
2075
|
+
submitButton?: string;
|
|
2076
|
+
/** Alias for submitButton */
|
|
2077
|
+
primaryButton?: string;
|
|
2078
|
+
statusBadge?: string;
|
|
2079
|
+
complianceScore?: string;
|
|
2080
|
+
gapAlert?: string;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
declare interface LawfulBasisTrackerProps {
|
|
2084
|
+
/**
|
|
2085
|
+
* List of processing activities to display
|
|
2086
|
+
*/
|
|
2087
|
+
activities: ProcessingActivity[];
|
|
2088
|
+
/**
|
|
2089
|
+
* Callback when a new activity is created
|
|
2090
|
+
*/
|
|
2091
|
+
onAddActivity?: (activity: Omit<ProcessingActivity, 'id' | 'createdAt' | 'updatedAt'>) => void;
|
|
2092
|
+
/**
|
|
2093
|
+
* Callback when an activity is updated
|
|
2094
|
+
*/
|
|
2095
|
+
onUpdateActivity?: (id: string, updates: Partial<ProcessingActivity>) => void;
|
|
2096
|
+
/**
|
|
2097
|
+
* Callback when an activity is archived
|
|
2098
|
+
*/
|
|
2099
|
+
onArchiveActivity?: (id: string) => void;
|
|
2100
|
+
/**
|
|
2101
|
+
* Title displayed on the tracker
|
|
2102
|
+
* @default "Lawful Basis Tracker"
|
|
2103
|
+
*/
|
|
2104
|
+
title?: string;
|
|
2105
|
+
/**
|
|
2106
|
+
* Description text displayed on the tracker
|
|
2107
|
+
* @default "Document and track the lawful basis for each processing activity as required by NDPA 2023 Section 25."
|
|
2108
|
+
*/
|
|
2109
|
+
description?: string;
|
|
2110
|
+
/**
|
|
2111
|
+
* Custom CSS class for the tracker container
|
|
2112
|
+
*/
|
|
2113
|
+
className?: string;
|
|
2114
|
+
/**
|
|
2115
|
+
* Custom CSS class for buttons
|
|
2116
|
+
*/
|
|
2117
|
+
buttonClassName?: string;
|
|
2118
|
+
/**
|
|
2119
|
+
* Whether to show the compliance summary at the top
|
|
2120
|
+
* @default true
|
|
2121
|
+
*/
|
|
2122
|
+
showSummary?: boolean;
|
|
2123
|
+
/**
|
|
2124
|
+
* Whether to show compliance gap alerts
|
|
2125
|
+
* @default true
|
|
2126
|
+
*/
|
|
2127
|
+
showComplianceGaps?: boolean;
|
|
2128
|
+
/**
|
|
2129
|
+
* Override class names for individual sections of the component.
|
|
2130
|
+
* Takes priority over className / buttonClassName.
|
|
2131
|
+
*/
|
|
2132
|
+
classNames?: LawfulBasisTrackerClassNames;
|
|
2133
|
+
/**
|
|
2134
|
+
* When true, all default styling is removed so consumers
|
|
2135
|
+
* can style from scratch using classNames.
|
|
2136
|
+
*/
|
|
2137
|
+
unstyled?: boolean;
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
/**
|
|
2141
|
+
* Lawful basis for processing personal data per NDPA Section 25(1)
|
|
2142
|
+
*/
|
|
2143
|
+
export declare type LawfulBasisType = 'consent' | 'contract' | 'legal_obligation' | 'vital_interests' | 'public_interest' | 'legitimate_interests';
|
|
2144
|
+
|
|
2145
|
+
/**
|
|
2146
|
+
* Validation result for a processing activity
|
|
2147
|
+
*/
|
|
2148
|
+
export declare interface LawfulBasisValidationResult {
|
|
2149
|
+
isValid: boolean;
|
|
2150
|
+
errors: string[];
|
|
2151
|
+
warnings: string[];
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
/**
|
|
2155
|
+
* Represents a Legitimate Interest Assessment (LIA)
|
|
2156
|
+
* Required when the lawful basis is 'legitimate_interests'
|
|
2157
|
+
*/
|
|
2158
|
+
export declare interface LegitimateInterestAssessment {
|
|
2159
|
+
/** Unique identifier */
|
|
2160
|
+
id: string;
|
|
2161
|
+
/** ID of the associated processing activity */
|
|
2162
|
+
processingActivityId: string;
|
|
2163
|
+
/** Date the assessment was conducted */
|
|
2164
|
+
assessmentDate: number;
|
|
2165
|
+
/** Person who conducted the assessment */
|
|
2166
|
+
assessor: {
|
|
2167
|
+
name: string;
|
|
2168
|
+
role: string;
|
|
2169
|
+
email: string;
|
|
2170
|
+
};
|
|
2171
|
+
/** Description of the legitimate interest being pursued */
|
|
2172
|
+
purposeTest: string;
|
|
2173
|
+
/** Why the processing is necessary for this purpose */
|
|
2174
|
+
necessityTest: string;
|
|
2175
|
+
/** Balancing test: rights of data subject vs. legitimate interest */
|
|
2176
|
+
balancingTest: string;
|
|
2177
|
+
/** Safeguards applied to protect data subject rights */
|
|
2178
|
+
safeguards: string[];
|
|
2179
|
+
/** Overall conclusion */
|
|
2180
|
+
conclusion: string;
|
|
2181
|
+
/** Whether the assessment concluded the processing is justified */
|
|
2182
|
+
approved: boolean;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
export declare interface ModuleScore {
|
|
2186
|
+
/** Module name (e.g. "consent") */
|
|
2187
|
+
name: string;
|
|
2188
|
+
/** Raw module score 0-100 */
|
|
2189
|
+
score: number;
|
|
2190
|
+
/** Maximum possible score for this module (always 100) */
|
|
2191
|
+
maxScore: number;
|
|
2192
|
+
/** Weighted contribution to the overall score */
|
|
2193
|
+
weightedScore: number;
|
|
2194
|
+
/** NDPA sections this module maps to */
|
|
2195
|
+
ndpaSections: string[];
|
|
2196
|
+
/** Gaps found — list of human-readable gap descriptions */
|
|
2197
|
+
gaps: string[];
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
/**
|
|
2201
|
+
* Configuration for the NDPR toolkit provider.
|
|
2202
|
+
*/
|
|
2203
|
+
export declare interface NDPRConfig {
|
|
2204
|
+
/** The official name of the organisation */
|
|
2205
|
+
organizationName?: string;
|
|
2206
|
+
/** Email address of the Data Protection Officer */
|
|
2207
|
+
dpoEmail?: string;
|
|
2208
|
+
/** NDPC registration number, if registered */
|
|
2209
|
+
ndpcRegistrationNumber?: string;
|
|
2210
|
+
/** Prefix for localStorage/sessionStorage keys used by toolkit components */
|
|
2211
|
+
storageKeyPrefix?: string;
|
|
2212
|
+
/** When true, removes all default styles from toolkit components */
|
|
2213
|
+
unstyled?: boolean;
|
|
2214
|
+
/** Theme overrides applied as CSS custom properties */
|
|
2215
|
+
theme?: {
|
|
2216
|
+
/** Primary brand colour (e.g. "#0070f3") */
|
|
2217
|
+
primary?: string;
|
|
2218
|
+
/** Hover state for primary colour */
|
|
2219
|
+
primaryHover?: string;
|
|
2220
|
+
/** Foreground colour used on primary backgrounds */
|
|
2221
|
+
primaryForeground?: string;
|
|
2222
|
+
};
|
|
2223
|
+
/**
|
|
2224
|
+
* Locale strings for all toolkit components.
|
|
2225
|
+
* Pass partial overrides — missing keys fall back to English defaults.
|
|
2226
|
+
*/
|
|
2227
|
+
locale?: NDPRLocale;
|
|
2228
|
+
/**
|
|
2229
|
+
* Custom fallback UI to render when a child component throws during rendering.
|
|
2230
|
+
* Receives the error and a reset function. If omitted, a default fallback is shown.
|
|
2231
|
+
*/
|
|
2232
|
+
fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode);
|
|
2233
|
+
/**
|
|
2234
|
+
* Called when the error boundary catches an error.
|
|
2235
|
+
* Useful for sending errors to an external reporting service.
|
|
2236
|
+
*/
|
|
2237
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
/**
|
|
2241
|
+
* Read-only compliance dashboard.
|
|
2242
|
+
*
|
|
2243
|
+
* Visualises a `ComplianceReport` (from `getComplianceScore()`) showing the
|
|
2244
|
+
* overall score, per-module cards, and a prioritised recommendations list.
|
|
2245
|
+
*/
|
|
2246
|
+
export declare const NDPRDashboard: React__default.FC<NDPRDashboardProps>;
|
|
2247
|
+
|
|
2248
|
+
export declare interface NDPRDashboardClassNames {
|
|
2249
|
+
root?: string;
|
|
2250
|
+
header?: string;
|
|
2251
|
+
scoreCircle?: string;
|
|
2252
|
+
scoreValue?: string;
|
|
2253
|
+
ratingBadge?: string;
|
|
2254
|
+
modulesGrid?: string;
|
|
2255
|
+
moduleCard?: string;
|
|
2256
|
+
moduleTitle?: string;
|
|
2257
|
+
moduleScore?: string;
|
|
2258
|
+
moduleGaps?: string;
|
|
2259
|
+
recommendationsSection?: string;
|
|
2260
|
+
recommendationItem?: string;
|
|
2261
|
+
recommendationPriority?: string;
|
|
2262
|
+
recommendationTitle?: string;
|
|
2263
|
+
primaryButton?: string;
|
|
2264
|
+
secondaryButton?: string;
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
export declare interface NDPRDashboardProps {
|
|
2268
|
+
/** Compliance report produced by getComplianceScore() */
|
|
2269
|
+
report: ComplianceReport;
|
|
2270
|
+
/** Dashboard heading. Defaults to "NDPA Compliance Dashboard" */
|
|
2271
|
+
title?: string;
|
|
2272
|
+
/** Show/hide the recommendations section. Defaults to true */
|
|
2273
|
+
showRecommendations?: boolean;
|
|
2274
|
+
/** Maximum number of recommendations to render. Defaults to 5 */
|
|
2275
|
+
maxRecommendations?: number;
|
|
2276
|
+
/** Per-section class name overrides */
|
|
2277
|
+
classNames?: NDPRDashboardClassNames;
|
|
2278
|
+
/** When true, strips all default classes so consumers can style from scratch */
|
|
2279
|
+
unstyled?: boolean;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
/**
|
|
2283
|
+
* Locale strings for all toolkit components.
|
|
2284
|
+
* Pass partial overrides — missing keys fall back to English defaults.
|
|
2285
|
+
*/
|
|
2286
|
+
declare interface NDPRLocale {
|
|
2287
|
+
consent?: {
|
|
2288
|
+
title?: string;
|
|
2289
|
+
description?: string;
|
|
2290
|
+
acceptAll?: string;
|
|
2291
|
+
rejectAll?: string;
|
|
2292
|
+
customize?: string;
|
|
2293
|
+
savePreferences?: string;
|
|
2294
|
+
selectAll?: string;
|
|
2295
|
+
deselectAll?: string;
|
|
2296
|
+
required?: string;
|
|
2297
|
+
cookieNotice?: string;
|
|
2298
|
+
};
|
|
2299
|
+
dsr?: {
|
|
2300
|
+
title?: string;
|
|
2301
|
+
description?: string;
|
|
2302
|
+
submitRequest?: string;
|
|
2303
|
+
reset?: string;
|
|
2304
|
+
fullName?: string;
|
|
2305
|
+
email?: string;
|
|
2306
|
+
phone?: string;
|
|
2307
|
+
requestType?: string;
|
|
2308
|
+
additionalInfo?: string;
|
|
2309
|
+
identityVerification?: string;
|
|
2310
|
+
identifierType?: string;
|
|
2311
|
+
identifierValue?: string;
|
|
2312
|
+
privacyNotice?: string;
|
|
2313
|
+
successMessage?: string;
|
|
2314
|
+
};
|
|
2315
|
+
breach?: {
|
|
2316
|
+
title?: string;
|
|
2317
|
+
description?: string;
|
|
2318
|
+
submitReport?: string;
|
|
2319
|
+
breachTitle?: string;
|
|
2320
|
+
category?: string;
|
|
2321
|
+
discoveredAt?: string;
|
|
2322
|
+
detailedDescription?: string;
|
|
2323
|
+
};
|
|
2324
|
+
dpia?: {
|
|
2325
|
+
title?: string;
|
|
2326
|
+
next?: string;
|
|
2327
|
+
previous?: string;
|
|
2328
|
+
complete?: string;
|
|
2329
|
+
progress?: string;
|
|
2330
|
+
};
|
|
2331
|
+
policy?: {
|
|
2332
|
+
title?: string;
|
|
2333
|
+
generate?: string;
|
|
2334
|
+
preview?: string;
|
|
2335
|
+
export?: string;
|
|
2336
|
+
sections?: string;
|
|
2337
|
+
variables?: string;
|
|
2338
|
+
};
|
|
2339
|
+
compliance?: {
|
|
2340
|
+
score?: string;
|
|
2341
|
+
excellent?: string;
|
|
2342
|
+
good?: string;
|
|
2343
|
+
needsWork?: string;
|
|
2344
|
+
critical?: string;
|
|
2345
|
+
recommendations?: string;
|
|
2346
|
+
passed?: string;
|
|
2347
|
+
gaps?: string;
|
|
2348
|
+
};
|
|
2349
|
+
common?: {
|
|
2350
|
+
loading?: string;
|
|
2351
|
+
error?: string;
|
|
2352
|
+
save?: string;
|
|
2353
|
+
cancel?: string;
|
|
2354
|
+
delete?: string;
|
|
2355
|
+
edit?: string;
|
|
2356
|
+
add?: string;
|
|
2357
|
+
back?: string;
|
|
2358
|
+
next?: string;
|
|
2359
|
+
search?: string;
|
|
2360
|
+
noResults?: string;
|
|
2361
|
+
};
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
/**
|
|
2365
|
+
* Provides NDPR configuration to all descendant toolkit components.
|
|
2366
|
+
*
|
|
2367
|
+
* When a `theme` is supplied, the corresponding CSS custom properties
|
|
2368
|
+
* (`--ndpr-primary`, `--ndpr-primary-hover`, `--ndpr-primary-foreground`)
|
|
2369
|
+
* are set on the wrapping element so components can reference them.
|
|
2370
|
+
*
|
|
2371
|
+
* Wraps children in an error boundary so that a rendering failure in any
|
|
2372
|
+
* toolkit component does not crash the host application.
|
|
2373
|
+
*/
|
|
2374
|
+
export declare const NDPRProvider: React__default.FC<NDPRConfig & {
|
|
2375
|
+
children: React__default.ReactNode;
|
|
2376
|
+
}>;
|
|
2377
|
+
|
|
2378
|
+
/**
|
|
2379
|
+
* Represents notification requirements for a data breach per NDPA Section 40
|
|
2380
|
+
*/
|
|
2381
|
+
export declare interface NotificationRequirement {
|
|
2382
|
+
/**
|
|
2383
|
+
* Whether NDPC notification is required
|
|
2384
|
+
* Per NDPA Section 40, notification to NDPC is required for all breaches
|
|
2385
|
+
* that pose a risk to data subjects' rights and freedoms
|
|
2386
|
+
*/
|
|
2387
|
+
ndpcNotificationRequired: boolean;
|
|
2388
|
+
/**
|
|
2389
|
+
* Deadline for NDPC notification (72 hours from discovery)
|
|
2390
|
+
* NDPA Section 40(1)
|
|
2391
|
+
*/
|
|
2392
|
+
ndpcNotificationDeadline: number;
|
|
2393
|
+
/**
|
|
2394
|
+
* Whether data subject notification is required
|
|
2395
|
+
* Per NDPA Section 40(4), required when breach is likely to result in
|
|
2396
|
+
* high risk to rights and freedoms of data subjects
|
|
2397
|
+
*/
|
|
2398
|
+
dataSubjectNotificationRequired: boolean;
|
|
2399
|
+
/** Justification for the notification decision */
|
|
2400
|
+
justification: string;
|
|
2401
|
+
/**
|
|
2402
|
+
* @deprecated Use ndpcNotificationRequired instead. Kept for backward compatibility.
|
|
2403
|
+
*/
|
|
2404
|
+
nitdaNotificationRequired?: boolean;
|
|
2405
|
+
/**
|
|
2406
|
+
* @deprecated Use ndpcNotificationDeadline instead. Kept for backward compatibility.
|
|
2407
|
+
*/
|
|
2408
|
+
nitdaNotificationDeadline?: number;
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
/**
|
|
2412
|
+
* Represents organization information for a privacy policy
|
|
2413
|
+
*/
|
|
2414
|
+
export declare interface OrganizationInfo {
|
|
2415
|
+
/** Name of the organization */
|
|
2416
|
+
name: string;
|
|
2417
|
+
/** Website URL of the organization */
|
|
2418
|
+
website: string;
|
|
2419
|
+
/** Contact email for privacy inquiries */
|
|
2420
|
+
privacyEmail: string;
|
|
2421
|
+
/** Physical address of the organization */
|
|
2422
|
+
address?: string;
|
|
2423
|
+
/** Phone number for privacy inquiries */
|
|
2424
|
+
privacyPhone?: string;
|
|
2425
|
+
/** Name of the Data Protection Officer */
|
|
2426
|
+
dpoName?: string;
|
|
2427
|
+
/** Email of the Data Protection Officer */
|
|
2428
|
+
dpoEmail?: string;
|
|
2429
|
+
/** Industry or sector of the organization */
|
|
2430
|
+
industry?: string;
|
|
2431
|
+
/** NDPC registration number (if registered) */
|
|
2432
|
+
ndpcRegistrationNumber?: string;
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
declare interface OrganizationInfo_2 {
|
|
2436
|
+
/**
|
|
2437
|
+
* Name of the organization
|
|
2438
|
+
*/
|
|
2439
|
+
name: string;
|
|
2440
|
+
/**
|
|
2441
|
+
* Registration number or business ID
|
|
2442
|
+
*/
|
|
2443
|
+
registrationNumber?: string;
|
|
2444
|
+
/**
|
|
2445
|
+
* Physical address of the organization
|
|
2446
|
+
*/
|
|
2447
|
+
address: string;
|
|
2448
|
+
/**
|
|
2449
|
+
* Website URL
|
|
2450
|
+
*/
|
|
2451
|
+
website?: string;
|
|
2452
|
+
/**
|
|
2453
|
+
* Name of the Data Protection Officer
|
|
2454
|
+
*/
|
|
2455
|
+
dpoName: string;
|
|
2456
|
+
/**
|
|
2457
|
+
* Email of the Data Protection Officer
|
|
2458
|
+
*/
|
|
2459
|
+
dpoEmail: string;
|
|
2460
|
+
/**
|
|
2461
|
+
* Phone number of the Data Protection Officer
|
|
2462
|
+
*/
|
|
2463
|
+
dpoPhone?: string;
|
|
2464
|
+
}
|
|
2465
|
+
|
|
2466
|
+
export declare const PolicyExporter: React__default.FC<PolicyExporterProps>;
|
|
2467
|
+
|
|
2468
|
+
export declare interface PolicyExporterClassNames {
|
|
2469
|
+
/** Root container */
|
|
2470
|
+
root?: string;
|
|
2471
|
+
/** Header area containing title and description */
|
|
2472
|
+
header?: string;
|
|
2473
|
+
/** Title element */
|
|
2474
|
+
title?: string;
|
|
2475
|
+
/** Description element */
|
|
2476
|
+
description?: string;
|
|
2477
|
+
/** Format selector container */
|
|
2478
|
+
formatSelector?: string;
|
|
2479
|
+
/** Individual format option */
|
|
2480
|
+
formatOption?: string;
|
|
2481
|
+
/** Export button */
|
|
2482
|
+
exportButton?: string;
|
|
2483
|
+
/** Alias for exportButton */
|
|
2484
|
+
primaryButton?: string;
|
|
2485
|
+
/** NDPA compliance / export tips notice */
|
|
2486
|
+
complianceNotice?: string;
|
|
2487
|
+
/** Preview / export history area */
|
|
2488
|
+
preview?: string;
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
declare interface PolicyExporterProps {
|
|
2492
|
+
/**
|
|
2493
|
+
* The policy content to export
|
|
2494
|
+
*/
|
|
2495
|
+
content: string;
|
|
2496
|
+
/**
|
|
2497
|
+
* The policy title
|
|
2498
|
+
*/
|
|
2499
|
+
title?: string;
|
|
2500
|
+
/**
|
|
2501
|
+
* The organization name to include in the exported policy
|
|
2502
|
+
*/
|
|
2503
|
+
organizationName?: string;
|
|
2504
|
+
/**
|
|
2505
|
+
* The last updated date to include in the exported policy
|
|
2506
|
+
*/
|
|
2507
|
+
lastUpdated?: Date;
|
|
2508
|
+
/**
|
|
2509
|
+
* Callback function called when the export is complete
|
|
2510
|
+
*/
|
|
2511
|
+
onExportComplete?: (format: string, url: string) => void;
|
|
2512
|
+
/**
|
|
2513
|
+
* Title displayed on the exporter
|
|
2514
|
+
* @default "Export Privacy Policy"
|
|
2515
|
+
*/
|
|
2516
|
+
componentTitle?: string;
|
|
2517
|
+
/**
|
|
2518
|
+
* Description text displayed on the exporter
|
|
2519
|
+
* @default "Export your NDPA-compliant privacy policy in various formats."
|
|
2520
|
+
*/
|
|
2521
|
+
description?: string;
|
|
2522
|
+
/**
|
|
2523
|
+
* Custom CSS class for the exporter
|
|
2524
|
+
*/
|
|
2525
|
+
className?: string;
|
|
2526
|
+
/**
|
|
2527
|
+
* Custom CSS class for the buttons
|
|
2528
|
+
*/
|
|
2529
|
+
buttonClassName?: string;
|
|
2530
|
+
/**
|
|
2531
|
+
* Whether to show the export history
|
|
2532
|
+
* @default true
|
|
2533
|
+
*/
|
|
2534
|
+
showExportHistory?: boolean;
|
|
2535
|
+
/**
|
|
2536
|
+
* Whether to include the NDPA compliance notice in the exported policy
|
|
2537
|
+
* @default true
|
|
2538
|
+
*/
|
|
2539
|
+
includeComplianceNotice?: boolean;
|
|
2540
|
+
/**
|
|
2541
|
+
* Whether to include the organization logo in the exported policy
|
|
2542
|
+
* @default false
|
|
2543
|
+
*/
|
|
2544
|
+
includeLogo?: boolean;
|
|
2545
|
+
/**
|
|
2546
|
+
* URL of the organization logo
|
|
2547
|
+
*/
|
|
2548
|
+
logoUrl?: string;
|
|
2549
|
+
/**
|
|
2550
|
+
* Custom CSS styles for the exported policy
|
|
2551
|
+
*/
|
|
2552
|
+
customStyles?: string;
|
|
2553
|
+
/**
|
|
2554
|
+
* Override class names for internal elements
|
|
2555
|
+
*/
|
|
2556
|
+
classNames?: PolicyExporterClassNames;
|
|
2557
|
+
/**
|
|
2558
|
+
* If true, removes all default styles. Use with classNames to apply your own.
|
|
2559
|
+
* @default false
|
|
2560
|
+
*/
|
|
2561
|
+
unstyled?: boolean;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
/**
|
|
2565
|
+
* Privacy policy generator component. Implements NDPA Section 24 transparency requirements,
|
|
2566
|
+
* helping organizations generate compliant privacy policies that disclose required information.
|
|
2567
|
+
*/
|
|
2568
|
+
export declare const PolicyGenerator: React__default.FC<PolicyGeneratorProps>;
|
|
2569
|
+
|
|
2570
|
+
export declare interface PolicyGeneratorClassNames {
|
|
2571
|
+
/** Root container */
|
|
2572
|
+
root?: string;
|
|
2573
|
+
/** Header area containing title and description */
|
|
2574
|
+
header?: string;
|
|
2575
|
+
/** Title element */
|
|
2576
|
+
title?: string;
|
|
2577
|
+
/** Description element */
|
|
2578
|
+
description?: string;
|
|
2579
|
+
/** Section list container */
|
|
2580
|
+
sectionList?: string;
|
|
2581
|
+
/** Individual section item */
|
|
2582
|
+
sectionItem?: string;
|
|
2583
|
+
/** Variable form container */
|
|
2584
|
+
form?: string;
|
|
2585
|
+
/** Form input fields */
|
|
2586
|
+
input?: string;
|
|
2587
|
+
/** Generate button */
|
|
2588
|
+
generateButton?: string;
|
|
2589
|
+
/** Alias for generateButton */
|
|
2590
|
+
primaryButton?: string;
|
|
2591
|
+
/** NDPA compliance notice */
|
|
2592
|
+
complianceNotice?: string;
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
declare interface PolicyGeneratorProps {
|
|
2596
|
+
/**
|
|
2597
|
+
* List of policy sections
|
|
2598
|
+
* @default DEFAULT_POLICY_SECTIONS
|
|
2599
|
+
*/
|
|
2600
|
+
sections?: PolicySection[];
|
|
2601
|
+
/**
|
|
2602
|
+
* List of policy variables
|
|
2603
|
+
* @default DEFAULT_POLICY_VARIABLES
|
|
2604
|
+
*/
|
|
2605
|
+
variables?: PolicyVariable[];
|
|
2606
|
+
/**
|
|
2607
|
+
* Callback function called when the policy is generated
|
|
2608
|
+
*/
|
|
2609
|
+
onGenerate: (policy: {
|
|
2610
|
+
sections: PolicySection[];
|
|
2611
|
+
variables: PolicyVariable[];
|
|
2612
|
+
content: string;
|
|
2613
|
+
}) => void;
|
|
2614
|
+
/**
|
|
2615
|
+
* Title displayed on the generator
|
|
2616
|
+
* @default "NDPA Privacy Policy Generator"
|
|
2617
|
+
*/
|
|
2618
|
+
title?: string;
|
|
2619
|
+
/**
|
|
2620
|
+
* Description text displayed on the generator
|
|
2621
|
+
* @default "Generate an NDPA-compliant privacy policy for your organization in accordance with NDPA Section 24."
|
|
2622
|
+
*/
|
|
2623
|
+
description?: string;
|
|
2624
|
+
/**
|
|
2625
|
+
* Custom CSS class for the generator
|
|
2626
|
+
*/
|
|
2627
|
+
className?: string;
|
|
2628
|
+
/**
|
|
2629
|
+
* Custom CSS class for the buttons
|
|
2630
|
+
*/
|
|
2631
|
+
buttonClassName?: string;
|
|
2632
|
+
/**
|
|
2633
|
+
* Text for the generate button
|
|
2634
|
+
* @default "Generate Policy"
|
|
2635
|
+
*/
|
|
2636
|
+
generateButtonText?: string;
|
|
2637
|
+
/**
|
|
2638
|
+
* Whether to show a preview of the generated policy
|
|
2639
|
+
* @default true
|
|
2640
|
+
*/
|
|
2641
|
+
showPreview?: boolean;
|
|
2642
|
+
/**
|
|
2643
|
+
* Whether to allow editing the policy content
|
|
2644
|
+
* @default true
|
|
2645
|
+
*/
|
|
2646
|
+
allowEditing?: boolean;
|
|
2647
|
+
/**
|
|
2648
|
+
* Override class names for internal elements
|
|
2649
|
+
*/
|
|
2650
|
+
classNames?: PolicyGeneratorClassNames;
|
|
2651
|
+
/**
|
|
2652
|
+
* If true, removes all default styles. Use with classNames to apply your own.
|
|
2653
|
+
* @default false
|
|
2654
|
+
*/
|
|
2655
|
+
unstyled?: boolean;
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2658
|
+
export declare const PolicyPreview: React__default.FC<PolicyPreviewProps>;
|
|
2659
|
+
|
|
2660
|
+
export declare interface PolicyPreviewClassNames {
|
|
2661
|
+
/** Root container */
|
|
2662
|
+
root?: string;
|
|
2663
|
+
/** Header area containing title and description */
|
|
2664
|
+
header?: string;
|
|
2665
|
+
/** Title element */
|
|
2666
|
+
title?: string;
|
|
2667
|
+
/** Description element */
|
|
2668
|
+
description?: string;
|
|
2669
|
+
/** Content area wrapping the rendered policy */
|
|
2670
|
+
content?: string;
|
|
2671
|
+
/** Individual rendered section container */
|
|
2672
|
+
section?: string;
|
|
2673
|
+
/** Section title within rendered content */
|
|
2674
|
+
sectionTitle?: string;
|
|
2675
|
+
/** Section content within rendered content */
|
|
2676
|
+
sectionContent?: string;
|
|
2677
|
+
/** NDPA compliance notice */
|
|
2678
|
+
complianceNotice?: string;
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
declare interface PolicyPreviewProps {
|
|
2682
|
+
/**
|
|
2683
|
+
* The policy content to preview
|
|
2684
|
+
*/
|
|
2685
|
+
content: string;
|
|
2686
|
+
/**
|
|
2687
|
+
* The policy sections
|
|
2688
|
+
*/
|
|
2689
|
+
sections?: PolicySection[];
|
|
2690
|
+
/**
|
|
2691
|
+
* The policy variables
|
|
2692
|
+
*/
|
|
2693
|
+
variables?: PolicyVariable[];
|
|
2694
|
+
/**
|
|
2695
|
+
* Callback function called when the policy is exported
|
|
2696
|
+
*/
|
|
2697
|
+
onExport?: (format: 'pdf' | 'html' | 'markdown' | 'docx') => void;
|
|
2698
|
+
/**
|
|
2699
|
+
* Callback function called when the policy is edited
|
|
2700
|
+
*/
|
|
2701
|
+
onEdit?: () => void;
|
|
2702
|
+
/**
|
|
2703
|
+
* Title displayed on the preview
|
|
2704
|
+
* @default "Privacy Policy Preview"
|
|
2705
|
+
*/
|
|
2706
|
+
title?: string;
|
|
2707
|
+
/**
|
|
2708
|
+
* Description text displayed on the preview
|
|
2709
|
+
* @default "Preview your NDPA-compliant privacy policy before exporting."
|
|
2710
|
+
*/
|
|
2711
|
+
description?: string;
|
|
2712
|
+
/**
|
|
2713
|
+
* Custom CSS class for the preview
|
|
2714
|
+
*/
|
|
2715
|
+
className?: string;
|
|
2716
|
+
/**
|
|
2717
|
+
* Custom CSS class for the buttons
|
|
2718
|
+
*/
|
|
2719
|
+
buttonClassName?: string;
|
|
2720
|
+
/**
|
|
2721
|
+
* Whether to show the export options
|
|
2722
|
+
* @default true
|
|
2723
|
+
*/
|
|
2724
|
+
showExportOptions?: boolean;
|
|
2725
|
+
/**
|
|
2726
|
+
* Whether to show the edit button
|
|
2727
|
+
* @default true
|
|
2728
|
+
*/
|
|
2729
|
+
showEditButton?: boolean;
|
|
2730
|
+
/**
|
|
2731
|
+
* Whether to show the table of contents
|
|
2732
|
+
* @default true
|
|
2733
|
+
*/
|
|
2734
|
+
showTableOfContents?: boolean;
|
|
2735
|
+
/**
|
|
2736
|
+
* Whether to show the policy metadata
|
|
2737
|
+
* @default true
|
|
2738
|
+
*/
|
|
2739
|
+
showMetadata?: boolean;
|
|
2740
|
+
/**
|
|
2741
|
+
* The organization name to display in the policy
|
|
2742
|
+
*/
|
|
2743
|
+
organizationName?: string;
|
|
2744
|
+
/**
|
|
2745
|
+
* The last updated date to display in the policy
|
|
2746
|
+
*/
|
|
2747
|
+
lastUpdated?: Date;
|
|
2748
|
+
/**
|
|
2749
|
+
* Override class names for internal elements
|
|
2750
|
+
*/
|
|
2751
|
+
classNames?: PolicyPreviewClassNames;
|
|
2752
|
+
/**
|
|
2753
|
+
* If true, removes all default styles. Use with classNames to apply your own.
|
|
2754
|
+
* @default false
|
|
2755
|
+
*/
|
|
2756
|
+
unstyled?: boolean;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
/**
|
|
2760
|
+
* Privacy policy types aligned with NDPA 2023
|
|
2761
|
+
* Privacy policies must clearly inform data subjects of their rights under the NDPA
|
|
2762
|
+
*/
|
|
2763
|
+
/**
|
|
2764
|
+
* Represents a section in a privacy policy
|
|
2765
|
+
*/
|
|
2766
|
+
export declare interface PolicySection {
|
|
2767
|
+
/** Unique identifier for the section */
|
|
2768
|
+
id: string;
|
|
2769
|
+
/** Title of the section */
|
|
2770
|
+
title: string;
|
|
2771
|
+
/** Description of the section */
|
|
2772
|
+
description?: string;
|
|
2773
|
+
/** Order of the section in the policy */
|
|
2774
|
+
order?: number;
|
|
2775
|
+
/** Whether the section is required by NDPA */
|
|
2776
|
+
required: boolean;
|
|
2777
|
+
/** Template text for the section */
|
|
2778
|
+
template: string;
|
|
2779
|
+
/**
|
|
2780
|
+
* Default content for the section (legacy field)
|
|
2781
|
+
* @deprecated Use template instead
|
|
2782
|
+
*/
|
|
2783
|
+
defaultContent?: string;
|
|
2784
|
+
/**
|
|
2785
|
+
* Custom content for the section (overrides default content)
|
|
2786
|
+
* @deprecated Use template instead
|
|
2787
|
+
*/
|
|
2788
|
+
customContent?: string;
|
|
2789
|
+
/** Whether the section is included in the policy */
|
|
2790
|
+
included: boolean;
|
|
2791
|
+
/** Variables that can be used in the section content */
|
|
2792
|
+
variables?: string[];
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
/**
|
|
2796
|
+
* Represents a privacy policy template
|
|
2797
|
+
*/
|
|
2798
|
+
export declare interface PolicyTemplate {
|
|
2799
|
+
/** Unique identifier for the template */
|
|
2800
|
+
id: string;
|
|
2801
|
+
/** Name of the template */
|
|
2802
|
+
name: string;
|
|
2803
|
+
/** Description of the template */
|
|
2804
|
+
description: string;
|
|
2805
|
+
/** Type of organization the template is designed for */
|
|
2806
|
+
organizationType: 'business' | 'nonprofit' | 'government' | 'educational';
|
|
2807
|
+
/** Sections included in the template */
|
|
2808
|
+
sections: PolicySection[];
|
|
2809
|
+
/** Variables used across the template */
|
|
2810
|
+
variables: Record<string, {
|
|
2811
|
+
name: string;
|
|
2812
|
+
description: string;
|
|
2813
|
+
required: boolean;
|
|
2814
|
+
defaultValue?: string;
|
|
2815
|
+
}>;
|
|
2816
|
+
/** Version of the template */
|
|
2817
|
+
version: string;
|
|
2818
|
+
/** Last updated date of the template */
|
|
2819
|
+
lastUpdated: number;
|
|
2820
|
+
/**
|
|
2821
|
+
* Whether this template is NDPA 2023 compliant
|
|
2822
|
+
*/
|
|
2823
|
+
ndpaCompliant: boolean;
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2826
|
+
/**
|
|
2827
|
+
* Represents a variable in a privacy policy
|
|
2828
|
+
*/
|
|
2829
|
+
export declare interface PolicyVariable {
|
|
2830
|
+
/** Unique identifier for the variable */
|
|
2831
|
+
id: string;
|
|
2832
|
+
/** Name of the variable as it appears in the template */
|
|
2833
|
+
name: string;
|
|
2834
|
+
/** Description of the variable */
|
|
2835
|
+
description: string;
|
|
2836
|
+
/** Default value for the variable */
|
|
2837
|
+
defaultValue?: string;
|
|
2838
|
+
/** Current value of the variable */
|
|
2839
|
+
value: string;
|
|
2840
|
+
/** Type of input for the variable */
|
|
2841
|
+
inputType: 'text' | 'textarea' | 'email' | 'url' | 'date' | 'select';
|
|
2842
|
+
/** Options for select inputs */
|
|
2843
|
+
options?: string[];
|
|
2844
|
+
/** Whether the variable is required */
|
|
2845
|
+
required: boolean;
|
|
2846
|
+
}
|
|
2847
|
+
|
|
2848
|
+
/**
|
|
2849
|
+
* Represents a generated privacy policy
|
|
2850
|
+
*/
|
|
2851
|
+
export declare interface PrivacyPolicy {
|
|
2852
|
+
/** Unique identifier for the policy */
|
|
2853
|
+
id: string;
|
|
2854
|
+
/** Title of the policy */
|
|
2855
|
+
title: string;
|
|
2856
|
+
/** Template used to generate the policy */
|
|
2857
|
+
templateId: string;
|
|
2858
|
+
/** Organization information */
|
|
2859
|
+
organizationInfo: OrganizationInfo;
|
|
2860
|
+
/** Sections of the policy */
|
|
2861
|
+
sections: PolicySection[];
|
|
2862
|
+
/** Values for the variables used in the policy */
|
|
2863
|
+
variableValues: Record<string, string>;
|
|
2864
|
+
/** Effective date of the policy */
|
|
2865
|
+
effectiveDate: number;
|
|
2866
|
+
/** Last updated date of the policy */
|
|
2867
|
+
lastUpdated: number;
|
|
2868
|
+
/** Version of the policy */
|
|
2869
|
+
version: string;
|
|
2870
|
+
/**
|
|
2871
|
+
* Applicable legal frameworks
|
|
2872
|
+
*/
|
|
2873
|
+
applicableFrameworks?: ('ndpa' | 'ndpr' | 'gdpr' | 'ccpa')[];
|
|
2874
|
+
}
|
|
2875
|
+
|
|
2876
|
+
/**
|
|
2877
|
+
* Represents a processing activity and its lawful basis
|
|
2878
|
+
*/
|
|
2879
|
+
export declare interface ProcessingActivity {
|
|
2880
|
+
/** Unique identifier */
|
|
2881
|
+
id: string;
|
|
2882
|
+
/** Name of the processing activity */
|
|
2883
|
+
name: string;
|
|
2884
|
+
/** Description of what processing is performed */
|
|
2885
|
+
description: string;
|
|
2886
|
+
/** The lawful basis for this processing activity */
|
|
2887
|
+
lawfulBasis: LawfulBasis;
|
|
2888
|
+
/** Justification for why this lawful basis applies */
|
|
2889
|
+
lawfulBasisJustification: string;
|
|
2890
|
+
/** Categories of personal data being processed */
|
|
2891
|
+
dataCategories: string[];
|
|
2892
|
+
/** Whether sensitive personal data is involved */
|
|
2893
|
+
involvesSensitiveData: boolean;
|
|
2894
|
+
/** Condition for processing sensitive data (required if involvesSensitiveData is true) */
|
|
2895
|
+
sensitiveDataCondition?: SensitiveDataCondition;
|
|
2896
|
+
/** Categories of data subjects */
|
|
2897
|
+
dataSubjectCategories: string[];
|
|
2898
|
+
/** Purposes of the processing */
|
|
2899
|
+
purposes: string[];
|
|
2900
|
+
/** Data retention period */
|
|
2901
|
+
retentionPeriod: string;
|
|
2902
|
+
/** Justification for the retention period */
|
|
2903
|
+
retentionJustification?: string;
|
|
2904
|
+
/** Recipients or categories of recipients */
|
|
2905
|
+
recipients?: string[];
|
|
2906
|
+
/** Whether data is transferred outside Nigeria */
|
|
2907
|
+
crossBorderTransfer: boolean;
|
|
2908
|
+
/** Timestamp when the record was created */
|
|
2909
|
+
createdAt: number;
|
|
2910
|
+
/** Timestamp when the record was last updated */
|
|
2911
|
+
updatedAt: number;
|
|
2912
|
+
/** Next review date */
|
|
2913
|
+
reviewDate?: number;
|
|
2914
|
+
/** Status of the processing activity */
|
|
2915
|
+
status: 'active' | 'inactive' | 'under_review' | 'archived';
|
|
2916
|
+
/** DPO approval details */
|
|
2917
|
+
dpoApproval?: {
|
|
2918
|
+
approved: boolean;
|
|
2919
|
+
approvedBy: string;
|
|
2920
|
+
approvedAt: number;
|
|
2921
|
+
notes?: string;
|
|
2922
|
+
};
|
|
2923
|
+
}
|
|
2924
|
+
|
|
2925
|
+
/**
|
|
2926
|
+
* Record of Processing Activities (ROPA) types aligned with NDPA 2023
|
|
2927
|
+
* Data controllers must maintain comprehensive records of all processing activities
|
|
2928
|
+
*/
|
|
2929
|
+
|
|
2930
|
+
/**
|
|
2931
|
+
* Represents a single processing record in the ROPA
|
|
2932
|
+
*/
|
|
2933
|
+
export declare interface ProcessingRecord {
|
|
2934
|
+
/** Unique identifier */
|
|
2935
|
+
id: string;
|
|
2936
|
+
/** Name of the processing activity */
|
|
2937
|
+
name: string;
|
|
2938
|
+
/** Detailed description of the processing */
|
|
2939
|
+
description: string;
|
|
2940
|
+
/** Data controller details */
|
|
2941
|
+
controllerDetails: {
|
|
2942
|
+
name: string;
|
|
2943
|
+
contact: string;
|
|
2944
|
+
address: string;
|
|
2945
|
+
registrationNumber?: string;
|
|
2946
|
+
dpoContact?: string;
|
|
2947
|
+
};
|
|
2948
|
+
/** Joint controller details (if applicable) */
|
|
2949
|
+
jointControllerDetails?: {
|
|
2950
|
+
name: string;
|
|
2951
|
+
contact: string;
|
|
2952
|
+
address: string;
|
|
2953
|
+
responsibilities: string;
|
|
2954
|
+
};
|
|
2955
|
+
/** Data processor details (if processing is outsourced) */
|
|
2956
|
+
processorDetails?: {
|
|
2957
|
+
name: string;
|
|
2958
|
+
contact: string;
|
|
2959
|
+
address: string;
|
|
2960
|
+
contractReference?: string;
|
|
2961
|
+
};
|
|
2962
|
+
/** Lawful basis for the processing */
|
|
2963
|
+
lawfulBasis: LawfulBasis;
|
|
2964
|
+
/** Justification for the chosen lawful basis */
|
|
2965
|
+
lawfulBasisJustification: string;
|
|
2966
|
+
/** Purposes of the processing */
|
|
2967
|
+
purposes: string[];
|
|
2968
|
+
/** Categories of personal data processed */
|
|
2969
|
+
dataCategories: string[];
|
|
2970
|
+
/** Categories of sensitive personal data (if any) */
|
|
2971
|
+
sensitiveDataCategories?: string[];
|
|
2972
|
+
/** Categories of data subjects */
|
|
2973
|
+
dataSubjectCategories: string[];
|
|
2974
|
+
/** Recipients or categories of recipients */
|
|
2975
|
+
recipients: string[];
|
|
2976
|
+
/** Cross-border transfer details */
|
|
2977
|
+
crossBorderTransfers?: Array<{
|
|
2978
|
+
destinationCountry: string;
|
|
2979
|
+
countryCode?: string;
|
|
2980
|
+
safeguards: string;
|
|
2981
|
+
transferMechanism: string;
|
|
2982
|
+
}>;
|
|
2983
|
+
/** Data retention period */
|
|
2984
|
+
retentionPeriod: string;
|
|
2985
|
+
/** Justification for the retention period */
|
|
2986
|
+
retentionJustification?: string;
|
|
2987
|
+
/** Technical and organizational security measures */
|
|
2988
|
+
securityMeasures: string[];
|
|
2989
|
+
/** Data source (directly from data subject or from third party) */
|
|
2990
|
+
dataSource: 'data_subject' | 'third_party' | 'public_source' | 'other';
|
|
2991
|
+
/** Third-party source details (if dataSource is 'third_party') */
|
|
2992
|
+
thirdPartySourceDetails?: string;
|
|
2993
|
+
/** Whether a DPIA is required for this processing */
|
|
2994
|
+
dpiaRequired: boolean;
|
|
2995
|
+
/** Reference to the DPIA (if conducted) */
|
|
2996
|
+
dpiaReference?: string;
|
|
2997
|
+
/** Whether automated decision-making is involved */
|
|
2998
|
+
automatedDecisionMaking: boolean;
|
|
2999
|
+
/** Details of automated decision-making (if applicable) */
|
|
3000
|
+
automatedDecisionMakingDetails?: string;
|
|
3001
|
+
/** Status of the processing record */
|
|
3002
|
+
status: 'active' | 'inactive' | 'archived';
|
|
3003
|
+
/** Department or business unit responsible */
|
|
3004
|
+
department?: string;
|
|
3005
|
+
/** System or application used for processing */
|
|
3006
|
+
systemsUsed?: string[];
|
|
3007
|
+
/** Timestamp when the record was created */
|
|
3008
|
+
createdAt: number;
|
|
3009
|
+
/** Timestamp when the record was last updated */
|
|
3010
|
+
updatedAt: number;
|
|
3011
|
+
/** Timestamp when the record was last reviewed */
|
|
3012
|
+
lastReviewedAt?: number;
|
|
3013
|
+
/** Next review date */
|
|
3014
|
+
nextReviewDate?: number;
|
|
3015
|
+
}
|
|
3016
|
+
|
|
3017
|
+
export declare interface Recommendation {
|
|
3018
|
+
module: string;
|
|
3019
|
+
key: string;
|
|
3020
|
+
label: string;
|
|
3021
|
+
priority: RecommendationPriority;
|
|
3022
|
+
effort: EffortLevel;
|
|
3023
|
+
recommendation: string;
|
|
3024
|
+
ndpaSection: string;
|
|
3025
|
+
}
|
|
3026
|
+
|
|
3027
|
+
export declare type RecommendationPriority = 'critical' | 'high' | 'medium' | 'low';
|
|
3028
|
+
|
|
3029
|
+
/**
|
|
3030
|
+
* Represents a complete Record of Processing Activities
|
|
3031
|
+
*/
|
|
3032
|
+
export declare interface RecordOfProcessingActivities {
|
|
3033
|
+
/** Unique identifier */
|
|
3034
|
+
id: string;
|
|
3035
|
+
/** Organization name */
|
|
3036
|
+
organizationName: string;
|
|
3037
|
+
/** Organization contact information */
|
|
3038
|
+
organizationContact: string;
|
|
3039
|
+
/** Organization address */
|
|
3040
|
+
organizationAddress: string;
|
|
3041
|
+
/** Data Protection Officer details */
|
|
3042
|
+
dpoDetails?: {
|
|
3043
|
+
name: string;
|
|
3044
|
+
email: string;
|
|
3045
|
+
phone?: string;
|
|
3046
|
+
};
|
|
3047
|
+
/** NDPC registration number */
|
|
3048
|
+
ndpcRegistrationNumber?: string;
|
|
3049
|
+
/** All processing records */
|
|
3050
|
+
records: ProcessingRecord[];
|
|
3051
|
+
/** Timestamp when the ROPA was last updated */
|
|
3052
|
+
lastUpdated: number;
|
|
3053
|
+
/** Version of the ROPA */
|
|
3054
|
+
version: string;
|
|
3055
|
+
/** Export format options */
|
|
3056
|
+
exportFormats?: ('pdf' | 'csv' | 'json' | 'xlsx')[];
|
|
3057
|
+
}
|
|
3058
|
+
|
|
3059
|
+
/**
|
|
3060
|
+
* Represents a notification sent to the NDPC (Nigeria Data Protection Commission)
|
|
3061
|
+
*/
|
|
3062
|
+
export declare interface RegulatoryNotification {
|
|
3063
|
+
/** Unique identifier for the notification */
|
|
3064
|
+
id: string;
|
|
3065
|
+
/** ID of the breach this notification is for */
|
|
3066
|
+
breachId: string;
|
|
3067
|
+
/** Timestamp when the notification was sent */
|
|
3068
|
+
sentAt: number;
|
|
3069
|
+
/** Method used to send the notification */
|
|
3070
|
+
method: 'email' | 'portal' | 'letter' | 'other';
|
|
3071
|
+
/** Reference number assigned by the NDPC (if available) */
|
|
3072
|
+
referenceNumber?: string;
|
|
3073
|
+
/** Contact person at the NDPC */
|
|
3074
|
+
ndpcContact?: {
|
|
3075
|
+
name: string;
|
|
3076
|
+
email: string;
|
|
3077
|
+
phone?: string;
|
|
3078
|
+
};
|
|
3079
|
+
/** Content of the notification */
|
|
3080
|
+
content: string;
|
|
3081
|
+
/** Attachments included with the notification */
|
|
3082
|
+
attachments?: Array<{
|
|
3083
|
+
id: string;
|
|
3084
|
+
name: string;
|
|
3085
|
+
type: string;
|
|
3086
|
+
url: string;
|
|
3087
|
+
}>;
|
|
3088
|
+
/** Follow-up communications with the NDPC */
|
|
3089
|
+
followUps?: Array<{
|
|
3090
|
+
timestamp: number;
|
|
3091
|
+
direction: 'sent' | 'received';
|
|
3092
|
+
content: string;
|
|
3093
|
+
attachments?: Array<{
|
|
3094
|
+
id: string;
|
|
3095
|
+
name: string;
|
|
3096
|
+
type: string;
|
|
3097
|
+
url: string;
|
|
3098
|
+
}>;
|
|
3099
|
+
}>;
|
|
3100
|
+
/**
|
|
3101
|
+
* @deprecated Use ndpcContact instead. Kept for backward compatibility.
|
|
3102
|
+
*/
|
|
3103
|
+
nitdaContact?: {
|
|
3104
|
+
name: string;
|
|
3105
|
+
email: string;
|
|
3106
|
+
phone?: string;
|
|
3107
|
+
};
|
|
3108
|
+
}
|
|
3109
|
+
|
|
3110
|
+
export declare interface RegulatoryReference {
|
|
3111
|
+
section: string;
|
|
3112
|
+
title: string;
|
|
3113
|
+
url?: string;
|
|
3114
|
+
}
|
|
3115
|
+
|
|
3116
|
+
/**
|
|
3117
|
+
* Regulatory report generator component. Implements NDPA Section 40 requirements for
|
|
3118
|
+
* generating formal breach notification reports for submission to the NDPC.
|
|
3119
|
+
*/
|
|
3120
|
+
export declare const RegulatoryReportGenerator: React__default.FC<RegulatoryReportGeneratorProps>;
|
|
3121
|
+
|
|
3122
|
+
export declare interface RegulatoryReportGeneratorClassNames {
|
|
3123
|
+
root?: string;
|
|
3124
|
+
header?: string;
|
|
3125
|
+
title?: string;
|
|
3126
|
+
reportPreview?: string;
|
|
3127
|
+
field?: string;
|
|
3128
|
+
fieldLabel?: string;
|
|
3129
|
+
fieldValue?: string;
|
|
3130
|
+
generateButton?: string;
|
|
3131
|
+
/** Alias for generateButton */
|
|
3132
|
+
primaryButton?: string;
|
|
3133
|
+
downloadButton?: string;
|
|
3134
|
+
/** Alias for downloadButton */
|
|
3135
|
+
secondaryButton?: string;
|
|
3136
|
+
}
|
|
3137
|
+
|
|
3138
|
+
declare interface RegulatoryReportGeneratorProps {
|
|
3139
|
+
/**
|
|
3140
|
+
* The breach data to include in the report
|
|
3141
|
+
*/
|
|
3142
|
+
breachData: BreachReport;
|
|
3143
|
+
/**
|
|
3144
|
+
* The risk assessment data
|
|
3145
|
+
*/
|
|
3146
|
+
assessmentData?: RiskAssessment;
|
|
3147
|
+
/**
|
|
3148
|
+
* Organization information to include in the report
|
|
3149
|
+
*/
|
|
3150
|
+
organizationInfo: OrganizationInfo_2;
|
|
3151
|
+
/**
|
|
3152
|
+
* Callback function called when the report is generated
|
|
3153
|
+
*/
|
|
3154
|
+
onGenerate: (report: RegulatoryNotification) => void;
|
|
3155
|
+
/**
|
|
3156
|
+
* Title displayed on the generator form
|
|
3157
|
+
* @default "Generate NDPC Notification Report"
|
|
3158
|
+
*/
|
|
3159
|
+
title?: string;
|
|
3160
|
+
/**
|
|
3161
|
+
* Description text displayed on the generator form
|
|
3162
|
+
* @default "Generate a report for submission to the NDPC in compliance with NDPA Section 40 breach notification requirements."
|
|
3163
|
+
*/
|
|
3164
|
+
description?: string;
|
|
3165
|
+
/**
|
|
3166
|
+
* Text for the generate button
|
|
3167
|
+
* @default "Generate Report"
|
|
3168
|
+
*/
|
|
3169
|
+
generateButtonText?: string;
|
|
3170
|
+
/**
|
|
3171
|
+
* Custom CSS class for the form
|
|
3172
|
+
*/
|
|
3173
|
+
className?: string;
|
|
3174
|
+
/**
|
|
3175
|
+
* Custom CSS class for the buttons
|
|
3176
|
+
*/
|
|
3177
|
+
buttonClassName?: string;
|
|
3178
|
+
/**
|
|
3179
|
+
* Override class names for individual elements
|
|
3180
|
+
*/
|
|
3181
|
+
classNames?: RegulatoryReportGeneratorClassNames;
|
|
3182
|
+
/**
|
|
3183
|
+
* Remove all default styles, only applying classNames overrides
|
|
3184
|
+
*/
|
|
3185
|
+
unstyled?: boolean;
|
|
3186
|
+
/**
|
|
3187
|
+
* Whether to show a preview of the generated report
|
|
3188
|
+
* @default true
|
|
3189
|
+
*/
|
|
3190
|
+
showPreview?: boolean;
|
|
3191
|
+
/**
|
|
3192
|
+
* Whether to allow editing the report content
|
|
3193
|
+
* @default true
|
|
3194
|
+
*/
|
|
3195
|
+
allowEditing?: boolean;
|
|
3196
|
+
/**
|
|
3197
|
+
* Whether to allow downloading the report
|
|
3198
|
+
* @default true
|
|
3199
|
+
*/
|
|
3200
|
+
allowDownload?: boolean;
|
|
3201
|
+
/**
|
|
3202
|
+
* Format for downloading the report
|
|
3203
|
+
* @default "pdf"
|
|
3204
|
+
*/
|
|
3205
|
+
downloadFormat?: 'pdf' | 'docx' | 'html';
|
|
3206
|
+
}
|
|
3207
|
+
|
|
3208
|
+
/**
|
|
3209
|
+
* Legacy status of a data subject request
|
|
3210
|
+
* @deprecated Use DSRStatus instead
|
|
3211
|
+
*/
|
|
3212
|
+
export declare type RequestStatus = 'pending' | 'verifying' | 'processing' | 'completed' | 'rejected';
|
|
3213
|
+
|
|
3214
|
+
/**
|
|
3215
|
+
* Represents a type of data subject request (detailed configuration)
|
|
3216
|
+
*/
|
|
3217
|
+
export declare interface RequestType {
|
|
3218
|
+
/** Unique identifier for the request type */
|
|
3219
|
+
id: string;
|
|
3220
|
+
/** Display name for the request type */
|
|
3221
|
+
name: string;
|
|
3222
|
+
/** Description of what this request type entails */
|
|
3223
|
+
description: string;
|
|
3224
|
+
/**
|
|
3225
|
+
* NDPA section reference (e.g., "Section 30" for access requests)
|
|
3226
|
+
*/
|
|
3227
|
+
ndpaSection?: string;
|
|
3228
|
+
/**
|
|
3229
|
+
* Estimated time to fulfill this type of request (in days)
|
|
3230
|
+
* NDPA requires response within 30 days
|
|
3231
|
+
*/
|
|
3232
|
+
estimatedCompletionTime: number;
|
|
3233
|
+
/** Whether additional information is required for this request type */
|
|
3234
|
+
requiresAdditionalInfo: boolean;
|
|
3235
|
+
/** Custom fields required for this request type */
|
|
3236
|
+
additionalFields?: Array<{
|
|
3237
|
+
id: string;
|
|
3238
|
+
label: string;
|
|
3239
|
+
type: 'text' | 'textarea' | 'select' | 'checkbox' | 'file';
|
|
3240
|
+
options?: string[];
|
|
3241
|
+
required: boolean;
|
|
3242
|
+
placeholder?: string;
|
|
3243
|
+
}>;
|
|
3244
|
+
}
|
|
3245
|
+
|
|
3246
|
+
/**
|
|
3247
|
+
* Resolves class names for a component section.
|
|
3248
|
+
* If unstyled is true, only the override class is used (or empty string).
|
|
3249
|
+
* If an override is provided, it fully REPLACES the default — no appending.
|
|
3250
|
+
* Otherwise the default class string is returned as-is.
|
|
3251
|
+
*/
|
|
3252
|
+
export declare function resolveClass(defaultClass: string, override?: string, unstyled?: boolean): string;
|
|
3253
|
+
|
|
3254
|
+
/**
|
|
3255
|
+
* Represents a risk assessment for a data breach
|
|
3256
|
+
*/
|
|
3257
|
+
export declare interface RiskAssessment {
|
|
3258
|
+
/** Unique identifier for the risk assessment */
|
|
3259
|
+
id: string;
|
|
3260
|
+
/** ID of the breach this assessment is for */
|
|
3261
|
+
breachId: string;
|
|
3262
|
+
/** Timestamp when the assessment was conducted */
|
|
3263
|
+
assessedAt: number;
|
|
3264
|
+
/** Person who conducted the assessment */
|
|
3265
|
+
assessor: {
|
|
3266
|
+
name: string;
|
|
3267
|
+
role: string;
|
|
3268
|
+
email: string;
|
|
3269
|
+
};
|
|
3270
|
+
/** Confidentiality impact (1-5) */
|
|
3271
|
+
confidentialityImpact: number;
|
|
3272
|
+
/** Integrity impact (1-5) */
|
|
3273
|
+
integrityImpact: number;
|
|
3274
|
+
/** Availability impact (1-5) */
|
|
3275
|
+
availabilityImpact: number;
|
|
3276
|
+
/** Likelihood of harm to data subjects (1-5) */
|
|
3277
|
+
harmLikelihood: number;
|
|
3278
|
+
/** Severity of potential harm to data subjects (1-5) */
|
|
3279
|
+
harmSeverity: number;
|
|
3280
|
+
/** Overall risk score */
|
|
3281
|
+
overallRiskScore: number;
|
|
3282
|
+
/** Risk level based on the overall score */
|
|
3283
|
+
riskLevel: 'low' | 'medium' | 'high' | 'critical';
|
|
3284
|
+
/** Whether the breach is likely to result in a risk to rights and freedoms */
|
|
3285
|
+
risksToRightsAndFreedoms: boolean;
|
|
3286
|
+
/** Whether the breach is likely to result in a high risk to rights and freedoms */
|
|
3287
|
+
highRisksToRightsAndFreedoms: boolean;
|
|
3288
|
+
/** Justification for the risk assessment */
|
|
3289
|
+
justification: string;
|
|
3290
|
+
}
|
|
3291
|
+
|
|
3292
|
+
/**
|
|
3293
|
+
* Compliance gap found in a processing record
|
|
3294
|
+
*/
|
|
3295
|
+
export declare interface ROPAComplianceGap {
|
|
3296
|
+
recordId: string;
|
|
3297
|
+
recordName: string;
|
|
3298
|
+
gaps: string[];
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
/**
|
|
3302
|
+
* Record of Processing Activities (ROPA) management component. Implements the NDPA
|
|
3303
|
+
* accountability principle, requiring organizations to maintain comprehensive records
|
|
3304
|
+
* of all personal data processing activities.
|
|
3305
|
+
*/
|
|
3306
|
+
export declare const ROPAManager: React__default.FC<ROPAManagerProps>;
|
|
3307
|
+
|
|
3308
|
+
export declare interface ROPAManagerClassNames {
|
|
3309
|
+
root?: string;
|
|
3310
|
+
header?: string;
|
|
3311
|
+
title?: string;
|
|
3312
|
+
orgInfo?: string;
|
|
3313
|
+
summary?: string;
|
|
3314
|
+
summaryCard?: string;
|
|
3315
|
+
table?: string;
|
|
3316
|
+
tableHeader?: string;
|
|
3317
|
+
tableRow?: string;
|
|
3318
|
+
form?: string;
|
|
3319
|
+
input?: string;
|
|
3320
|
+
select?: string;
|
|
3321
|
+
submitButton?: string;
|
|
3322
|
+
/** Alias for submitButton */
|
|
3323
|
+
primaryButton?: string;
|
|
3324
|
+
statusBadge?: string;
|
|
3325
|
+
exportButton?: string;
|
|
3326
|
+
/** Alias for exportButton */
|
|
3327
|
+
secondaryButton?: string;
|
|
3328
|
+
complianceGap?: string;
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3331
|
+
declare interface ROPAManagerProps {
|
|
3332
|
+
/**
|
|
3333
|
+
* The full Record of Processing Activities
|
|
3334
|
+
*/
|
|
3335
|
+
ropa: RecordOfProcessingActivities;
|
|
3336
|
+
/**
|
|
3337
|
+
* Callback when a new record is added
|
|
3338
|
+
*/
|
|
3339
|
+
onAddRecord?: (record: ProcessingRecord) => void;
|
|
3340
|
+
/**
|
|
3341
|
+
* Callback when a record is updated
|
|
3342
|
+
*/
|
|
3343
|
+
onUpdateRecord?: (id: string, updates: Partial<ProcessingRecord>) => void;
|
|
3344
|
+
/**
|
|
3345
|
+
* Callback when a record is archived
|
|
3346
|
+
*/
|
|
3347
|
+
onArchiveRecord?: (id: string) => void;
|
|
3348
|
+
/**
|
|
3349
|
+
* Title displayed on the manager
|
|
3350
|
+
* @default "Record of Processing Activities (ROPA)"
|
|
3351
|
+
*/
|
|
3352
|
+
title?: string;
|
|
3353
|
+
/**
|
|
3354
|
+
* Description text
|
|
3355
|
+
* @default "Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle."
|
|
3356
|
+
*/
|
|
3357
|
+
description?: string;
|
|
3358
|
+
/**
|
|
3359
|
+
* Custom CSS class
|
|
3360
|
+
*/
|
|
3361
|
+
className?: string;
|
|
3362
|
+
/**
|
|
3363
|
+
* Custom CSS class for buttons
|
|
3364
|
+
*/
|
|
3365
|
+
buttonClassName?: string;
|
|
3366
|
+
/**
|
|
3367
|
+
* Override class names for individual sections of the component.
|
|
3368
|
+
* Takes priority over className / buttonClassName.
|
|
3369
|
+
*/
|
|
3370
|
+
classNames?: ROPAManagerClassNames;
|
|
3371
|
+
/**
|
|
3372
|
+
* When true, all default styling is removed so consumers
|
|
3373
|
+
* can style from scratch using classNames.
|
|
3374
|
+
*/
|
|
3375
|
+
unstyled?: boolean;
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
/**
|
|
3379
|
+
* Summary statistics for the ROPA
|
|
3380
|
+
*/
|
|
3381
|
+
export declare interface ROPASummary {
|
|
3382
|
+
/** Total number of processing records */
|
|
3383
|
+
totalRecords: number;
|
|
3384
|
+
/** Active processing records */
|
|
3385
|
+
activeRecords: number;
|
|
3386
|
+
/** Records by lawful basis */
|
|
3387
|
+
byLawfulBasis: Record<LawfulBasis, number>;
|
|
3388
|
+
/** Records involving sensitive data */
|
|
3389
|
+
sensitiveDataRecords: number;
|
|
3390
|
+
/** Records involving cross-border transfers */
|
|
3391
|
+
crossBorderRecords: number;
|
|
3392
|
+
/** Records requiring DPIA */
|
|
3393
|
+
dpiaRequiredRecords: number;
|
|
3394
|
+
/** Records involving automated decision-making */
|
|
3395
|
+
automatedDecisionRecords: number;
|
|
3396
|
+
/** Records due for review */
|
|
3397
|
+
recordsDueForReview: ProcessingRecord[];
|
|
3398
|
+
/** Departments with most processing activities */
|
|
3399
|
+
topDepartments: Array<{
|
|
3400
|
+
department: string;
|
|
3401
|
+
count: number;
|
|
3402
|
+
}>;
|
|
3403
|
+
/** Last updated timestamp */
|
|
3404
|
+
lastUpdated: number;
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
/**
|
|
3408
|
+
* Validation result for a processing record
|
|
3409
|
+
*/
|
|
3410
|
+
export declare interface ROPAValidationResult {
|
|
3411
|
+
valid: boolean;
|
|
3412
|
+
errors: string[];
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
/**
|
|
3416
|
+
* Sanitizes user input to prevent XSS attacks.
|
|
3417
|
+
* Escapes HTML special characters so that data rendered in dashboards
|
|
3418
|
+
* or other consumer UIs cannot execute embedded scripts.
|
|
3419
|
+
*/
|
|
3420
|
+
export declare function sanitizeInput(input: string): string;
|
|
3421
|
+
|
|
3422
|
+
/**
|
|
3423
|
+
* Additional conditions required for processing sensitive personal data
|
|
3424
|
+
* per NDPA Section 27
|
|
3425
|
+
*/
|
|
3426
|
+
export declare type SensitiveDataCondition = 'explicit_consent' | 'employment_law' | 'vital_interests_incapable' | 'nonprofit_legitimate' | 'publicly_available' | 'legal_claims' | 'substantial_public_interest' | 'health_purposes' | 'public_health' | 'archiving_research';
|
|
3427
|
+
|
|
3428
|
+
declare interface Step {
|
|
3429
|
+
/**
|
|
3430
|
+
* Unique identifier for the step
|
|
3431
|
+
*/
|
|
3432
|
+
id: string;
|
|
3433
|
+
/**
|
|
3434
|
+
* Display label for the step
|
|
3435
|
+
*/
|
|
3436
|
+
label: string;
|
|
3437
|
+
/**
|
|
3438
|
+
* Optional description for the step
|
|
3439
|
+
*/
|
|
3440
|
+
description?: string;
|
|
3441
|
+
/**
|
|
3442
|
+
* Whether the step is completed
|
|
3443
|
+
*/
|
|
3444
|
+
completed: boolean;
|
|
3445
|
+
/**
|
|
3446
|
+
* Whether the step is the current active step
|
|
3447
|
+
*/
|
|
3448
|
+
active: boolean;
|
|
3449
|
+
/**
|
|
3450
|
+
* Optional icon for the step
|
|
3451
|
+
*/
|
|
3452
|
+
icon?: React__default.ReactNode;
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
export declare const StepIndicator: React__default.FC<StepIndicatorProps>;
|
|
3456
|
+
|
|
3457
|
+
export declare interface StepIndicatorClassNames {
|
|
3458
|
+
/** Outermost wrapper */
|
|
3459
|
+
root?: string;
|
|
3460
|
+
/** Individual step wrapper */
|
|
3461
|
+
step?: string;
|
|
3462
|
+
/** Active step circle / indicator */
|
|
3463
|
+
stepActive?: string;
|
|
3464
|
+
/** Completed step circle / indicator */
|
|
3465
|
+
stepCompleted?: string;
|
|
3466
|
+
/** Pending (incomplete, inactive) step circle / indicator */
|
|
3467
|
+
stepPending?: string;
|
|
3468
|
+
/** Connector line between steps */
|
|
3469
|
+
connector?: string;
|
|
3470
|
+
/** Step label text */
|
|
3471
|
+
label?: string;
|
|
3472
|
+
}
|
|
3473
|
+
|
|
3474
|
+
declare interface StepIndicatorProps {
|
|
3475
|
+
/**
|
|
3476
|
+
* Array of steps to display
|
|
3477
|
+
*/
|
|
3478
|
+
steps: Step[];
|
|
3479
|
+
/**
|
|
3480
|
+
* Callback function called when a step is clicked
|
|
3481
|
+
*/
|
|
3482
|
+
onStepClick?: (stepId: string) => void;
|
|
3483
|
+
/**
|
|
3484
|
+
* Whether the steps are clickable
|
|
3485
|
+
* @default true
|
|
3486
|
+
*/
|
|
3487
|
+
clickable?: boolean;
|
|
3488
|
+
/**
|
|
3489
|
+
* Orientation of the step indicator
|
|
3490
|
+
* @default "horizontal"
|
|
3491
|
+
*/
|
|
3492
|
+
orientation?: 'horizontal' | 'vertical';
|
|
3493
|
+
/**
|
|
3494
|
+
* Custom CSS class for the container
|
|
3495
|
+
*/
|
|
3496
|
+
className?: string;
|
|
3497
|
+
/**
|
|
3498
|
+
* Custom CSS class for the active step
|
|
3499
|
+
*/
|
|
3500
|
+
activeStepClassName?: string;
|
|
3501
|
+
/**
|
|
3502
|
+
* Custom CSS class for completed steps
|
|
3503
|
+
*/
|
|
3504
|
+
completedStepClassName?: string;
|
|
3505
|
+
/**
|
|
3506
|
+
* Custom CSS class for incomplete steps
|
|
3507
|
+
*/
|
|
3508
|
+
incompleteStepClassName?: string;
|
|
3509
|
+
/**
|
|
3510
|
+
* Per-section class name overrides
|
|
3511
|
+
*/
|
|
3512
|
+
classNames?: StepIndicatorClassNames;
|
|
3513
|
+
/**
|
|
3514
|
+
* When true, all default classes are stripped.
|
|
3515
|
+
* Only explicit overrides from `classNames` are applied.
|
|
3516
|
+
* @default false
|
|
3517
|
+
*/
|
|
3518
|
+
unstyled?: boolean;
|
|
3519
|
+
}
|
|
3520
|
+
|
|
3521
|
+
declare interface StorageAdapter<T = unknown> {
|
|
3522
|
+
/** Load persisted data. Called once on hook mount. */
|
|
3523
|
+
load(): T | null | Promise<T | null>;
|
|
3524
|
+
/** Persist data. Called on every state change. */
|
|
3525
|
+
save(data: T): void | Promise<void>;
|
|
3526
|
+
/** Clear persisted data. Called on reset. */
|
|
3527
|
+
remove(): void | Promise<void>;
|
|
3528
|
+
}
|
|
3529
|
+
|
|
3530
|
+
/**
|
|
3531
|
+
* Transfer Impact Assessment (TIA) for cross-border transfers
|
|
3532
|
+
*/
|
|
3533
|
+
export declare interface TransferImpactAssessment {
|
|
3534
|
+
/** Unique identifier */
|
|
3535
|
+
id: string;
|
|
3536
|
+
/** ID of the associated cross-border transfer */
|
|
3537
|
+
transferId: string;
|
|
3538
|
+
/** Date the assessment was conducted */
|
|
3539
|
+
assessmentDate: number;
|
|
3540
|
+
/** Person who conducted the assessment */
|
|
3541
|
+
assessor: {
|
|
3542
|
+
name: string;
|
|
3543
|
+
role: string;
|
|
3544
|
+
email: string;
|
|
3545
|
+
};
|
|
3546
|
+
/** Analysis of the destination country's legal framework */
|
|
3547
|
+
destinationLegalFramework: string;
|
|
3548
|
+
/** Whether the destination has data protection legislation */
|
|
3549
|
+
hasDataProtectionLaw: boolean;
|
|
3550
|
+
/** Whether the destination has an independent supervisory authority */
|
|
3551
|
+
hasIndependentAuthority: boolean;
|
|
3552
|
+
/** Risk of government access to the data */
|
|
3553
|
+
governmentAccessRisk: 'low' | 'medium' | 'high';
|
|
3554
|
+
/** Overall assessment of data protection level */
|
|
3555
|
+
dataProtectionLevel: 'adequate' | 'partially_adequate' | 'inadequate';
|
|
3556
|
+
/** Supplementary measures to address gaps */
|
|
3557
|
+
supplementaryMeasures: string[];
|
|
3558
|
+
/** Technical measures (encryption, pseudonymization, etc.) */
|
|
3559
|
+
technicalMeasures: string[];
|
|
3560
|
+
/** Contractual measures */
|
|
3561
|
+
contractualMeasures: string[];
|
|
3562
|
+
/** Organizational measures */
|
|
3563
|
+
organizationalMeasures: string[];
|
|
3564
|
+
/** Overall conclusion */
|
|
3565
|
+
conclusion: string;
|
|
3566
|
+
/** Whether the transfer can proceed based on the assessment */
|
|
3567
|
+
approved: boolean;
|
|
3568
|
+
/** Conditions for the transfer (if approved with conditions) */
|
|
3569
|
+
conditions?: string[];
|
|
3570
|
+
}
|
|
3571
|
+
|
|
3572
|
+
/**
|
|
3573
|
+
* Cross-Border Data Transfer types aligned with NDPA 2023 Part VI (Sections 41-45)
|
|
3574
|
+
* Personal data may only be transferred outside Nigeria under specific conditions
|
|
3575
|
+
*/
|
|
3576
|
+
/**
|
|
3577
|
+
* Transfer mechanisms recognized under the NDPA
|
|
3578
|
+
*/
|
|
3579
|
+
export declare type TransferMechanism = 'adequacy_decision' | 'standard_clauses' | 'binding_corporate_rules' | 'ndpc_authorization' | 'explicit_consent' | 'contract_performance' | 'public_interest' | 'legal_claims' | 'vital_interests';
|
|
3580
|
+
|
|
3581
|
+
/**
|
|
3582
|
+
* Risk assessment result for a cross-border transfer
|
|
3583
|
+
*/
|
|
3584
|
+
export declare interface TransferRiskResult {
|
|
3585
|
+
riskLevel: 'low' | 'medium' | 'high';
|
|
3586
|
+
riskScore: number;
|
|
3587
|
+
factors: string[];
|
|
3588
|
+
recommendations: string[];
|
|
3589
|
+
}
|
|
3590
|
+
|
|
3591
|
+
/**
|
|
3592
|
+
* Validation result for a cross-border transfer
|
|
3593
|
+
*/
|
|
3594
|
+
export declare interface TransferValidationResult {
|
|
3595
|
+
isValid: boolean;
|
|
3596
|
+
errors: string[];
|
|
3597
|
+
warnings: string[];
|
|
3598
|
+
}
|
|
3599
|
+
|
|
3600
|
+
/**
|
|
3601
|
+
* Hook for managing data breach notifications in compliance with the NDPA (Section 40)
|
|
3602
|
+
*/
|
|
3603
|
+
export declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
|
|
3604
|
+
|
|
3605
|
+
declare interface UseBreachOptions {
|
|
3606
|
+
/**
|
|
3607
|
+
* Available breach categories
|
|
3608
|
+
*/
|
|
3609
|
+
categories: BreachCategory[];
|
|
3610
|
+
/**
|
|
3611
|
+
* Initial breach reports
|
|
3612
|
+
*/
|
|
3613
|
+
initialReports?: BreachReport[];
|
|
3614
|
+
/**
|
|
3615
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
3616
|
+
*/
|
|
3617
|
+
adapter?: StorageAdapter<BreachCompositeState>;
|
|
3618
|
+
/**
|
|
3619
|
+
* Storage key for breach data
|
|
3620
|
+
* @default "ndpr_breach_data"
|
|
3621
|
+
* @deprecated Use adapter instead
|
|
3622
|
+
*/
|
|
3623
|
+
storageKey?: string;
|
|
3624
|
+
/**
|
|
3625
|
+
* Whether to use local storage to persist breach data
|
|
3626
|
+
* @default true
|
|
3627
|
+
* @deprecated Use adapter instead
|
|
3628
|
+
*/
|
|
3629
|
+
useLocalStorage?: boolean;
|
|
3630
|
+
/**
|
|
3631
|
+
* Callback function called when a breach is reported
|
|
3632
|
+
*/
|
|
3633
|
+
onReport?: (report: BreachReport) => void;
|
|
3634
|
+
/**
|
|
3635
|
+
* Callback function called when a risk assessment is completed
|
|
3636
|
+
*/
|
|
3637
|
+
onAssessment?: (assessment: RiskAssessment) => void;
|
|
3638
|
+
/**
|
|
3639
|
+
* Callback function called when a notification is sent
|
|
3640
|
+
*/
|
|
3641
|
+
onNotification?: (notification: RegulatoryNotification) => void;
|
|
3642
|
+
}
|
|
3643
|
+
|
|
3644
|
+
declare interface UseBreachReturn {
|
|
3645
|
+
/**
|
|
3646
|
+
* All breach reports
|
|
3647
|
+
*/
|
|
3648
|
+
reports: BreachReport[];
|
|
3649
|
+
/**
|
|
3650
|
+
* All risk assessments
|
|
3651
|
+
*/
|
|
3652
|
+
assessments: RiskAssessment[];
|
|
3653
|
+
/**
|
|
3654
|
+
* All regulatory notifications
|
|
3655
|
+
*/
|
|
3656
|
+
notifications: RegulatoryNotification[];
|
|
3657
|
+
/**
|
|
3658
|
+
* Submit a new breach report
|
|
3659
|
+
*/
|
|
3660
|
+
reportBreach: (reportData: Omit<BreachReport, 'id' | 'reportedAt'>) => BreachReport;
|
|
3661
|
+
/**
|
|
3662
|
+
* Update an existing breach report
|
|
3663
|
+
*/
|
|
3664
|
+
updateReport: (id: string, updates: Partial<BreachReport>) => BreachReport | null;
|
|
3665
|
+
/**
|
|
3666
|
+
* Get a breach report by ID
|
|
3667
|
+
*/
|
|
3668
|
+
getReport: (id: string) => BreachReport | null;
|
|
3669
|
+
/**
|
|
3670
|
+
* Conduct a risk assessment for a breach
|
|
3671
|
+
*/
|
|
3672
|
+
assessRisk: (breachId: string, assessmentData: Omit<RiskAssessment, 'id' | 'breachId' | 'assessedAt'>) => RiskAssessment;
|
|
3673
|
+
/**
|
|
3674
|
+
* Get a risk assessment for a breach
|
|
3675
|
+
*/
|
|
3676
|
+
getAssessment: (breachId: string) => RiskAssessment | null;
|
|
3677
|
+
/**
|
|
3678
|
+
* Calculate notification requirements based on a risk assessment
|
|
3679
|
+
*/
|
|
3680
|
+
calculateNotificationRequirements: (breachId: string) => NotificationRequirement | null;
|
|
3681
|
+
/**
|
|
3682
|
+
* Send a regulatory notification
|
|
3683
|
+
*/
|
|
3684
|
+
sendNotification: (breachId: string, notificationData: Omit<RegulatoryNotification, 'id' | 'breachId' | 'sentAt'>) => RegulatoryNotification;
|
|
3685
|
+
/**
|
|
3686
|
+
* Get a regulatory notification for a breach
|
|
3687
|
+
*/
|
|
3688
|
+
getNotification: (breachId: string) => RegulatoryNotification | null;
|
|
3689
|
+
/**
|
|
3690
|
+
* Get breaches that require notification within the next X hours
|
|
3691
|
+
*/
|
|
3692
|
+
getBreachesRequiringNotification: (hoursThreshold?: number) => Array<{
|
|
3693
|
+
report: BreachReport;
|
|
3694
|
+
assessment: RiskAssessment;
|
|
3695
|
+
requirements: NotificationRequirement;
|
|
3696
|
+
hoursRemaining: number;
|
|
3697
|
+
}>;
|
|
3698
|
+
/**
|
|
3699
|
+
* Clear all breach data
|
|
3700
|
+
*/
|
|
3701
|
+
clearBreachData: () => void;
|
|
3702
|
+
/**
|
|
3703
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
3704
|
+
*/
|
|
3705
|
+
isLoading: boolean;
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
/**
|
|
3709
|
+
* Hook for managing user consent in compliance with NDPA
|
|
3710
|
+
*/
|
|
3711
|
+
export declare function useConsent({ options, adapter, storageOptions, version, onChange, }: UseConsentOptions): UseConsentReturn;
|
|
3712
|
+
|
|
3713
|
+
declare interface UseConsentOptions {
|
|
3714
|
+
/**
|
|
3715
|
+
* Consent options to present to the user
|
|
3716
|
+
*/
|
|
3717
|
+
options: ConsentOption[];
|
|
3718
|
+
/**
|
|
3719
|
+
* Pluggable storage adapter. When provided, takes precedence over storageOptions.
|
|
3720
|
+
*/
|
|
3721
|
+
adapter?: StorageAdapter<ConsentSettings>;
|
|
3722
|
+
/**
|
|
3723
|
+
* Storage options for consent settings
|
|
3724
|
+
* @deprecated Use adapter instead
|
|
3725
|
+
*/
|
|
3726
|
+
storageOptions?: ConsentStorageOptions;
|
|
3727
|
+
/**
|
|
3728
|
+
* Version of the consent form
|
|
3729
|
+
* @default "1.0"
|
|
3730
|
+
*/
|
|
3731
|
+
version?: string;
|
|
3732
|
+
/**
|
|
3733
|
+
* Callback function called when consent settings change
|
|
3734
|
+
*/
|
|
3735
|
+
onChange?: (settings: ConsentSettings) => void;
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
declare interface UseConsentReturn {
|
|
3739
|
+
/**
|
|
3740
|
+
* Current consent settings
|
|
3741
|
+
*/
|
|
3742
|
+
settings: ConsentSettings | null;
|
|
3743
|
+
/**
|
|
3744
|
+
* Whether consent has been given for a specific option
|
|
3745
|
+
*/
|
|
3746
|
+
hasConsent: (optionId: string) => boolean;
|
|
3747
|
+
/**
|
|
3748
|
+
* Update consent settings
|
|
3749
|
+
*/
|
|
3750
|
+
updateConsent: (consents: Record<string, boolean>) => void;
|
|
3751
|
+
/**
|
|
3752
|
+
* Accept all consent options
|
|
3753
|
+
*/
|
|
3754
|
+
acceptAll: () => void;
|
|
3755
|
+
/**
|
|
3756
|
+
* Reject all non-required consent options
|
|
3757
|
+
*/
|
|
3758
|
+
rejectAll: () => void;
|
|
3759
|
+
/**
|
|
3760
|
+
* Whether the consent banner should be shown
|
|
3761
|
+
*/
|
|
3762
|
+
shouldShowBanner: boolean;
|
|
3763
|
+
/**
|
|
3764
|
+
* Whether consent settings are valid
|
|
3765
|
+
*/
|
|
3766
|
+
isValid: boolean;
|
|
3767
|
+
/**
|
|
3768
|
+
* Validation errors (if any)
|
|
3769
|
+
*/
|
|
3770
|
+
validationErrors: string[];
|
|
3771
|
+
/**
|
|
3772
|
+
* Reset consent settings (clear from storage)
|
|
3773
|
+
*/
|
|
3774
|
+
resetConsent: () => void;
|
|
3775
|
+
/**
|
|
3776
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
3777
|
+
*/
|
|
3778
|
+
isLoading: boolean;
|
|
3779
|
+
}
|
|
3780
|
+
|
|
3781
|
+
/**
|
|
3782
|
+
* Hook for managing cross-border data transfers in compliance with NDPA Part VI (Sections 41-45)
|
|
3783
|
+
*/
|
|
3784
|
+
export declare function useCrossBorderTransfer({ initialTransfers, adapter, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseCrossBorderTransferOptions): UseCrossBorderTransferReturn;
|
|
3785
|
+
|
|
3786
|
+
declare interface UseCrossBorderTransferOptions {
|
|
3787
|
+
/**
|
|
3788
|
+
* Initial transfers to load
|
|
3789
|
+
*/
|
|
3790
|
+
initialTransfers?: CrossBorderTransfer[];
|
|
3791
|
+
/**
|
|
3792
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
3793
|
+
*/
|
|
3794
|
+
adapter?: StorageAdapter<CrossBorderTransfer[]>;
|
|
3795
|
+
/**
|
|
3796
|
+
* Storage key for transfer data
|
|
3797
|
+
* @default "ndpr_cross_border_transfers"
|
|
3798
|
+
* @deprecated Use adapter instead
|
|
3799
|
+
*/
|
|
3800
|
+
storageKey?: string;
|
|
3801
|
+
/**
|
|
3802
|
+
* Whether to use local storage to persist transfers
|
|
3803
|
+
* @default true
|
|
3804
|
+
* @deprecated Use adapter instead
|
|
3805
|
+
*/
|
|
3806
|
+
useLocalStorage?: boolean;
|
|
3807
|
+
/**
|
|
3808
|
+
* Callback function called when a transfer is added
|
|
3809
|
+
*/
|
|
3810
|
+
onAdd?: (transfer: CrossBorderTransfer) => void;
|
|
3811
|
+
/**
|
|
3812
|
+
* Callback function called when a transfer is updated
|
|
3813
|
+
*/
|
|
3814
|
+
onUpdate?: (transfer: CrossBorderTransfer) => void;
|
|
3815
|
+
/**
|
|
3816
|
+
* Callback function called when a transfer is removed
|
|
3817
|
+
*/
|
|
3818
|
+
onRemove?: (id: string) => void;
|
|
3819
|
+
}
|
|
3820
|
+
|
|
3821
|
+
declare interface UseCrossBorderTransferReturn {
|
|
3822
|
+
/**
|
|
3823
|
+
* All cross-border transfers
|
|
3824
|
+
*/
|
|
3825
|
+
transfers: CrossBorderTransfer[];
|
|
3826
|
+
/**
|
|
3827
|
+
* Add a new cross-border transfer
|
|
3828
|
+
*/
|
|
3829
|
+
addTransfer: (transfer: Omit<CrossBorderTransfer, 'id' | 'createdAt' | 'updatedAt'>) => CrossBorderTransfer;
|
|
3830
|
+
/**
|
|
3831
|
+
* Update an existing cross-border transfer
|
|
3832
|
+
*/
|
|
3833
|
+
updateTransfer: (id: string, updates: Partial<CrossBorderTransfer>) => CrossBorderTransfer | null;
|
|
3834
|
+
/**
|
|
3835
|
+
* Remove a cross-border transfer
|
|
3836
|
+
*/
|
|
3837
|
+
removeTransfer: (id: string) => void;
|
|
3838
|
+
/**
|
|
3839
|
+
* Get a cross-border transfer by ID
|
|
3840
|
+
*/
|
|
3841
|
+
getTransfer: (id: string) => CrossBorderTransfer | null;
|
|
3842
|
+
/**
|
|
3843
|
+
* Get a compliance summary of all cross-border transfers
|
|
3844
|
+
*/
|
|
3845
|
+
getSummary: () => CrossBorderSummary;
|
|
3846
|
+
/**
|
|
3847
|
+
* Validate a cross-border transfer
|
|
3848
|
+
*/
|
|
3849
|
+
validateTransfer: (transfer: CrossBorderTransfer) => TransferValidationResult;
|
|
3850
|
+
/**
|
|
3851
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
3852
|
+
*/
|
|
3853
|
+
isLoading: boolean;
|
|
3854
|
+
}
|
|
3855
|
+
|
|
3856
|
+
/**
|
|
3857
|
+
* Convenience wrapper around `usePrivacyPolicy`. With `orgInfo` provided
|
|
3858
|
+
* and `autoGenerate` enabled (default), `policy` is non-null on the first
|
|
3859
|
+
* post-load render — no manual `selectTemplate` / `generatePolicy` chaining
|
|
3860
|
+
* required.
|
|
3861
|
+
*
|
|
3862
|
+
* @example
|
|
3863
|
+
* ```tsx
|
|
3864
|
+
* const { policy } = useDefaultPrivacyPolicy({
|
|
3865
|
+
* orgInfo: { name: 'Acme Ltd', email: 'privacy@acme.ng' }
|
|
3866
|
+
* });
|
|
3867
|
+
* return policy ? <PolicyPage policy={policy} /> : <Spinner />;
|
|
3868
|
+
* ```
|
|
3869
|
+
*/
|
|
3870
|
+
export declare function useDefaultPrivacyPolicy(options?: UseDefaultPrivacyPolicyOptions): UsePrivacyPolicyReturn;
|
|
3871
|
+
|
|
3872
|
+
declare interface UseDefaultPrivacyPolicyOptions {
|
|
3873
|
+
/**
|
|
3874
|
+
* Organisation information to pre-fill into the policy. When provided and
|
|
3875
|
+
* `autoGenerate` is true (the default), the hook will auto-select the
|
|
3876
|
+
* default template and generate a renderable policy on first commit, so
|
|
3877
|
+
* `policy` is non-null on the first useful render.
|
|
3878
|
+
*/
|
|
3879
|
+
orgInfo?: {
|
|
3880
|
+
/** Organisation name (maps to `organizationInfo.name` and `orgName` variable) */
|
|
3881
|
+
name?: string;
|
|
3882
|
+
/** Privacy contact email (maps to `privacyEmail`) */
|
|
3883
|
+
email?: string;
|
|
3884
|
+
/** Organisation website URL */
|
|
3885
|
+
website?: string;
|
|
3886
|
+
/** Physical address */
|
|
3887
|
+
address?: string;
|
|
3888
|
+
/** Industry / sector descriptor */
|
|
3889
|
+
industry?: string;
|
|
3890
|
+
/** Data Protection Officer name */
|
|
3891
|
+
dpoName?: string;
|
|
3892
|
+
/** DPO email address */
|
|
3893
|
+
dpoEmail?: string;
|
|
3894
|
+
};
|
|
3895
|
+
/**
|
|
3896
|
+
* Whether the hook should auto-select the default template and generate
|
|
3897
|
+
* the policy as soon as it's mounted with `orgInfo`. Set to false to
|
|
3898
|
+
* retain manual control via `selectTemplate` / `generatePolicy`.
|
|
3899
|
+
* @default true
|
|
3900
|
+
*/
|
|
3901
|
+
autoGenerate?: boolean;
|
|
3902
|
+
/**
|
|
3903
|
+
* Storage key for policy data.
|
|
3904
|
+
* @default "ndpr_privacy_policy"
|
|
3905
|
+
*/
|
|
3906
|
+
storageKey?: string;
|
|
3907
|
+
/**
|
|
3908
|
+
* Whether to persist policy data in storage. When `false`, the hook
|
|
3909
|
+
* uses an in-memory no-op adapter and nothing survives a page reload.
|
|
3910
|
+
* @default true
|
|
3911
|
+
*/
|
|
3912
|
+
persist?: boolean;
|
|
3913
|
+
/**
|
|
3914
|
+
* @deprecated Renamed to `persist` in v3.5.0 — `useLocalStorage` is
|
|
3915
|
+
* still accepted for backward compatibility and will be removed in
|
|
3916
|
+
* v4.0. Use `persist` (or pass an explicit `adapter`) instead.
|
|
3917
|
+
* @default true
|
|
3918
|
+
*/
|
|
3919
|
+
useLocalStorage?: boolean;
|
|
3920
|
+
/**
|
|
3921
|
+
* Pluggable storage adapter. When provided, takes precedence over
|
|
3922
|
+
* storageKey/persist/useLocalStorage.
|
|
3923
|
+
*/
|
|
3924
|
+
adapter?: StorageAdapter<PrivacyPolicy>;
|
|
3925
|
+
}
|
|
3926
|
+
|
|
3927
|
+
/**
|
|
3928
|
+
* Hook for conducting Data Protection Impact Assessments in compliance with the NDPA 2023
|
|
3929
|
+
*/
|
|
3930
|
+
export declare function useDPIA({ sections, initialAnswers, adapter, storageKey, useLocalStorage, onComplete, }: UseDPIAOptions): UseDPIAReturn;
|
|
3931
|
+
|
|
3932
|
+
declare interface UseDPIAOptions {
|
|
3933
|
+
/**
|
|
3934
|
+
* Sections of the DPIA questionnaire
|
|
3935
|
+
*/
|
|
3936
|
+
sections: DPIASection[];
|
|
3937
|
+
/**
|
|
3938
|
+
* Initial answers (if resuming a DPIA)
|
|
3939
|
+
*/
|
|
3940
|
+
initialAnswers?: DPIAAnswerMap;
|
|
3941
|
+
/**
|
|
3942
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
3943
|
+
*/
|
|
3944
|
+
adapter?: StorageAdapter<DPIAAnswerMap>;
|
|
3945
|
+
/**
|
|
3946
|
+
* Storage key for DPIA data
|
|
3947
|
+
* @default "ndpr_dpia_data"
|
|
3948
|
+
* @deprecated Use adapter instead
|
|
3949
|
+
*/
|
|
3950
|
+
storageKey?: string;
|
|
3951
|
+
/**
|
|
3952
|
+
* Whether to use local storage to persist DPIA data
|
|
3953
|
+
* @default true
|
|
3954
|
+
* @deprecated Use adapter instead
|
|
3955
|
+
*/
|
|
3956
|
+
useLocalStorage?: boolean;
|
|
3957
|
+
/**
|
|
3958
|
+
* Callback function called when the DPIA is completed
|
|
3959
|
+
*/
|
|
3960
|
+
onComplete?: (result: DPIAResult) => void;
|
|
3961
|
+
}
|
|
3962
|
+
|
|
3963
|
+
declare interface UseDPIAReturn {
|
|
3964
|
+
/**
|
|
3965
|
+
* Current section index
|
|
3966
|
+
*/
|
|
3967
|
+
currentSectionIndex: number;
|
|
3968
|
+
/**
|
|
3969
|
+
* Current section
|
|
3970
|
+
*/
|
|
3971
|
+
currentSection: DPIASection | null;
|
|
3972
|
+
/**
|
|
3973
|
+
* All answers
|
|
3974
|
+
*/
|
|
3975
|
+
answers: DPIAAnswerMap;
|
|
3976
|
+
/**
|
|
3977
|
+
* Update an answer
|
|
3978
|
+
*/
|
|
3979
|
+
updateAnswer: (questionId: string, value: DPIAAnswerValue) => void;
|
|
3980
|
+
/**
|
|
3981
|
+
* Go to the next section
|
|
3982
|
+
*/
|
|
3983
|
+
nextSection: () => boolean;
|
|
3984
|
+
/**
|
|
3985
|
+
* Go to the previous section
|
|
3986
|
+
*/
|
|
3987
|
+
prevSection: () => boolean;
|
|
3988
|
+
/**
|
|
3989
|
+
* Go to a specific section
|
|
3990
|
+
*/
|
|
3991
|
+
goToSection: (index: number) => boolean;
|
|
3992
|
+
/**
|
|
3993
|
+
* Check if the current section is valid
|
|
3994
|
+
*/
|
|
3995
|
+
isCurrentSectionValid: () => boolean;
|
|
3996
|
+
/**
|
|
3997
|
+
* Get validation errors for the current section
|
|
3998
|
+
*/
|
|
3999
|
+
getCurrentSectionErrors: () => Record<string, string>;
|
|
4000
|
+
/**
|
|
4001
|
+
* Check if the DPIA is complete
|
|
4002
|
+
*/
|
|
4003
|
+
isComplete: () => boolean;
|
|
4004
|
+
/**
|
|
4005
|
+
* Complete the DPIA and generate a result
|
|
4006
|
+
*/
|
|
4007
|
+
completeDPIA: (assessorInfo: {
|
|
4008
|
+
name: string;
|
|
4009
|
+
role: string;
|
|
4010
|
+
email: string;
|
|
4011
|
+
}, title: string, processingDescription: string) => DPIAResult;
|
|
4012
|
+
/**
|
|
4013
|
+
* Get the visible questions for the current section
|
|
4014
|
+
*/
|
|
4015
|
+
getVisibleQuestions: () => DPIAQuestion[];
|
|
4016
|
+
/**
|
|
4017
|
+
* Reset the DPIA
|
|
4018
|
+
*/
|
|
4019
|
+
resetDPIA: () => void;
|
|
4020
|
+
/**
|
|
4021
|
+
* Progress percentage
|
|
4022
|
+
*/
|
|
4023
|
+
progress: number;
|
|
4024
|
+
/**
|
|
4025
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
4026
|
+
*/
|
|
4027
|
+
isLoading: boolean;
|
|
4028
|
+
}
|
|
4029
|
+
|
|
4030
|
+
/**
|
|
4031
|
+
* Hook for managing Data Subject Requests in compliance with the NDPA
|
|
4032
|
+
*/
|
|
4033
|
+
export declare function useDSR({ initialRequests, requestTypes, adapter, storageKey, useLocalStorage, onSubmit, onUpdate, }: UseDSROptions): UseDSRReturn;
|
|
4034
|
+
|
|
4035
|
+
declare interface UseDSROptions {
|
|
4036
|
+
/**
|
|
4037
|
+
* Initial requests to load
|
|
4038
|
+
*/
|
|
4039
|
+
initialRequests?: DSRRequest[];
|
|
4040
|
+
/**
|
|
4041
|
+
* Available request types
|
|
4042
|
+
*/
|
|
4043
|
+
requestTypes: RequestType[];
|
|
4044
|
+
/**
|
|
4045
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
4046
|
+
*/
|
|
4047
|
+
adapter?: StorageAdapter<DSRRequest[]>;
|
|
4048
|
+
/**
|
|
4049
|
+
* Storage key for requests
|
|
4050
|
+
* @default "ndpr_dsr_requests"
|
|
4051
|
+
* @deprecated Use adapter instead
|
|
4052
|
+
*/
|
|
4053
|
+
storageKey?: string;
|
|
4054
|
+
/**
|
|
4055
|
+
* Whether to use local storage to persist requests
|
|
4056
|
+
* @default true
|
|
4057
|
+
* @deprecated Use adapter instead
|
|
4058
|
+
*/
|
|
4059
|
+
useLocalStorage?: boolean;
|
|
4060
|
+
/**
|
|
4061
|
+
* Callback function called when a request is submitted
|
|
4062
|
+
*/
|
|
4063
|
+
onSubmit?: (request: DSRRequest) => void;
|
|
4064
|
+
/**
|
|
4065
|
+
* Callback function called when a request is updated
|
|
4066
|
+
*/
|
|
4067
|
+
onUpdate?: (request: DSRRequest) => void;
|
|
4068
|
+
}
|
|
4069
|
+
|
|
4070
|
+
declare interface UseDSRReturn {
|
|
4071
|
+
/**
|
|
4072
|
+
* All requests
|
|
4073
|
+
*/
|
|
4074
|
+
requests: DSRRequest[];
|
|
4075
|
+
/**
|
|
4076
|
+
* Submit a new request
|
|
4077
|
+
*/
|
|
4078
|
+
submitRequest: (requestData: Omit<DSRRequest, 'id' | 'status' | 'submittedAt' | 'updatedAt' | 'estimatedCompletionDate'>) => DSRRequest;
|
|
4079
|
+
/**
|
|
4080
|
+
* Update an existing request
|
|
4081
|
+
*/
|
|
4082
|
+
updateRequest: (id: string, updates: Partial<DSRRequest>) => DSRRequest | null;
|
|
4083
|
+
/**
|
|
4084
|
+
* Get a request by ID
|
|
4085
|
+
*/
|
|
4086
|
+
getRequest: (id: string) => DSRRequest | null;
|
|
4087
|
+
/**
|
|
4088
|
+
* Get requests by status
|
|
4089
|
+
*/
|
|
4090
|
+
getRequestsByStatus: (status: RequestStatus) => DSRRequest[];
|
|
4091
|
+
/**
|
|
4092
|
+
* Get requests by type
|
|
4093
|
+
*/
|
|
4094
|
+
getRequestsByType: (type: string) => DSRRequest[];
|
|
4095
|
+
/**
|
|
4096
|
+
* Get the request type definition by ID
|
|
4097
|
+
*/
|
|
4098
|
+
getRequestType: (typeId: string) => RequestType | undefined;
|
|
4099
|
+
/**
|
|
4100
|
+
* Format a request for display or submission
|
|
4101
|
+
*/
|
|
4102
|
+
formatRequest: (request: DSRRequest) => Record<string, unknown>;
|
|
4103
|
+
/**
|
|
4104
|
+
* Clear all requests
|
|
4105
|
+
*/
|
|
4106
|
+
clearRequests: () => void;
|
|
4107
|
+
/**
|
|
4108
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
4109
|
+
*/
|
|
4110
|
+
isLoading: boolean;
|
|
4111
|
+
}
|
|
4112
|
+
|
|
4113
|
+
/**
|
|
4114
|
+
* Hook for managing lawful basis documentation for processing activities
|
|
4115
|
+
* in compliance with NDPA 2023 Section 25.
|
|
4116
|
+
*/
|
|
4117
|
+
export declare function useLawfulBasis({ initialActivities, adapter, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseLawfulBasisOptions): UseLawfulBasisReturn;
|
|
4118
|
+
|
|
4119
|
+
declare interface UseLawfulBasisOptions {
|
|
4120
|
+
/**
|
|
4121
|
+
* Initial processing activities to load
|
|
4122
|
+
*/
|
|
4123
|
+
initialActivities?: ProcessingActivity[];
|
|
4124
|
+
/**
|
|
4125
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
4126
|
+
*/
|
|
4127
|
+
adapter?: StorageAdapter<ProcessingActivity[]>;
|
|
4128
|
+
/**
|
|
4129
|
+
* Storage key for persisting activities
|
|
4130
|
+
* @default "ndpr_lawful_basis_activities"
|
|
4131
|
+
* @deprecated Use adapter instead
|
|
4132
|
+
*/
|
|
4133
|
+
storageKey?: string;
|
|
4134
|
+
/**
|
|
4135
|
+
* Whether to use local storage to persist activities
|
|
4136
|
+
* @default true
|
|
4137
|
+
* @deprecated Use adapter instead
|
|
4138
|
+
*/
|
|
4139
|
+
useLocalStorage?: boolean;
|
|
4140
|
+
/**
|
|
4141
|
+
* Callback when an activity is added
|
|
4142
|
+
*/
|
|
4143
|
+
onAdd?: (activity: ProcessingActivity) => void;
|
|
4144
|
+
/**
|
|
4145
|
+
* Callback when an activity is updated
|
|
4146
|
+
*/
|
|
4147
|
+
onUpdate?: (activity: ProcessingActivity) => void;
|
|
4148
|
+
/**
|
|
4149
|
+
* Callback when an activity is removed
|
|
4150
|
+
*/
|
|
4151
|
+
onRemove?: (id: string) => void;
|
|
4152
|
+
}
|
|
4153
|
+
|
|
4154
|
+
declare interface UseLawfulBasisReturn {
|
|
4155
|
+
/**
|
|
4156
|
+
* All processing activities
|
|
4157
|
+
*/
|
|
4158
|
+
activities: ProcessingActivity[];
|
|
4159
|
+
/**
|
|
4160
|
+
* Add a new processing activity
|
|
4161
|
+
*/
|
|
4162
|
+
addActivity: (activity: Omit<ProcessingActivity, 'id' | 'createdAt' | 'updatedAt'>) => ProcessingActivity;
|
|
4163
|
+
/**
|
|
4164
|
+
* Update an existing processing activity
|
|
4165
|
+
*/
|
|
4166
|
+
updateActivity: (id: string, updates: Partial<ProcessingActivity>) => ProcessingActivity | null;
|
|
4167
|
+
/**
|
|
4168
|
+
* Remove a processing activity
|
|
4169
|
+
*/
|
|
4170
|
+
removeActivity: (id: string) => void;
|
|
4171
|
+
/**
|
|
4172
|
+
* Get a specific processing activity by ID
|
|
4173
|
+
*/
|
|
4174
|
+
getActivity: (id: string) => ProcessingActivity | null;
|
|
4175
|
+
/**
|
|
4176
|
+
* Get a summary of all lawful basis documentation
|
|
4177
|
+
*/
|
|
4178
|
+
getSummary: () => LawfulBasisSummary;
|
|
4179
|
+
/**
|
|
4180
|
+
* Validate a processing activity
|
|
4181
|
+
*/
|
|
4182
|
+
validateActivity: (activity: ProcessingActivity) => LawfulBasisValidationResult;
|
|
4183
|
+
/**
|
|
4184
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
4185
|
+
*/
|
|
4186
|
+
isLoading: boolean;
|
|
4187
|
+
}
|
|
4188
|
+
|
|
4189
|
+
/**
|
|
4190
|
+
* Returns the current NDPR configuration from the nearest `NDPRProvider`.
|
|
4191
|
+
* If no provider is found, returns an empty config object.
|
|
4192
|
+
*/
|
|
4193
|
+
export declare function useNDPRConfig(): NDPRConfig;
|
|
4194
|
+
|
|
4195
|
+
/**
|
|
4196
|
+
* Hook for generating NDPA-compliant privacy policies
|
|
4197
|
+
*/
|
|
4198
|
+
export declare function usePrivacyPolicy({ templates, initialPolicy, adapter, storageKey, persist, useLocalStorage, onGenerate, }: UsePrivacyPolicyOptions): UsePrivacyPolicyReturn;
|
|
4199
|
+
|
|
4200
|
+
declare interface UsePrivacyPolicyOptions {
|
|
4201
|
+
/**
|
|
4202
|
+
* Available policy templates
|
|
4203
|
+
*/
|
|
4204
|
+
templates: PolicyTemplate[];
|
|
4205
|
+
/**
|
|
4206
|
+
* Initial policy data (if editing an existing policy)
|
|
4207
|
+
*/
|
|
4208
|
+
initialPolicy?: PrivacyPolicy;
|
|
4209
|
+
/**
|
|
4210
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
4211
|
+
*/
|
|
4212
|
+
adapter?: StorageAdapter<PrivacyPolicy>;
|
|
4213
|
+
/**
|
|
4214
|
+
* Storage key for policy data
|
|
4215
|
+
* @default "ndpr_privacy_policy"
|
|
4216
|
+
* @deprecated Use adapter instead
|
|
4217
|
+
*/
|
|
4218
|
+
storageKey?: string;
|
|
4219
|
+
/**
|
|
4220
|
+
* Whether to persist policy data in storage. When `false`, the hook
|
|
4221
|
+
* uses an in-memory no-op adapter and nothing survives a page reload.
|
|
4222
|
+
* Prefer `adapter` for richer control (custom backends, async APIs).
|
|
4223
|
+
*
|
|
4224
|
+
* @default true
|
|
4225
|
+
*/
|
|
4226
|
+
persist?: boolean;
|
|
4227
|
+
/**
|
|
4228
|
+
* @deprecated Renamed to `persist` in v3.5.0 — `useLocalStorage` is
|
|
4229
|
+
* still accepted for backward compatibility and will be removed in
|
|
4230
|
+
* v4.0. Use `persist` (or pass an explicit `adapter`) instead.
|
|
4231
|
+
* @default true
|
|
4232
|
+
*/
|
|
4233
|
+
useLocalStorage?: boolean;
|
|
4234
|
+
/**
|
|
4235
|
+
* Callback function called when a policy is generated
|
|
4236
|
+
*/
|
|
4237
|
+
onGenerate?: (policy: PrivacyPolicy) => void;
|
|
4238
|
+
}
|
|
4239
|
+
|
|
4240
|
+
declare interface UsePrivacyPolicyReturn {
|
|
4241
|
+
/**
|
|
4242
|
+
* Current policy data
|
|
4243
|
+
*/
|
|
4244
|
+
policy: PrivacyPolicy | null;
|
|
4245
|
+
/**
|
|
4246
|
+
* Selected template
|
|
4247
|
+
*/
|
|
4248
|
+
selectedTemplate: PolicyTemplate | null;
|
|
4249
|
+
/**
|
|
4250
|
+
* Organization information
|
|
4251
|
+
*/
|
|
4252
|
+
organizationInfo: OrganizationInfo;
|
|
4253
|
+
/**
|
|
4254
|
+
* Select a template
|
|
4255
|
+
*/
|
|
4256
|
+
selectTemplate: (templateId: string) => boolean;
|
|
4257
|
+
/**
|
|
4258
|
+
* Update organization information
|
|
4259
|
+
*/
|
|
4260
|
+
updateOrganizationInfo: (updates: Partial<OrganizationInfo>) => void;
|
|
4261
|
+
/**
|
|
4262
|
+
* Toggle whether a section is included in the policy
|
|
4263
|
+
*/
|
|
4264
|
+
toggleSection: (sectionId: string, included: boolean) => void;
|
|
4265
|
+
/**
|
|
4266
|
+
* Update section content
|
|
4267
|
+
*/
|
|
4268
|
+
updateSectionContent: (sectionId: string, content: string) => void;
|
|
4269
|
+
/**
|
|
4270
|
+
* Update variable values
|
|
4271
|
+
*/
|
|
4272
|
+
updateVariableValue: (variable: string, value: string) => void;
|
|
4273
|
+
/**
|
|
4274
|
+
* Generate the policy
|
|
4275
|
+
*/
|
|
4276
|
+
generatePolicy: () => PrivacyPolicy | null;
|
|
4277
|
+
/**
|
|
4278
|
+
* Get the generated policy text
|
|
4279
|
+
*/
|
|
4280
|
+
getPolicyText: () => {
|
|
4281
|
+
fullText: string;
|
|
4282
|
+
sectionTexts: Record<string, string>;
|
|
4283
|
+
missingVariables: string[];
|
|
4284
|
+
};
|
|
4285
|
+
/**
|
|
4286
|
+
* Reset the policy
|
|
4287
|
+
*/
|
|
4288
|
+
resetPolicy: () => void;
|
|
4289
|
+
/**
|
|
4290
|
+
* Check if the policy is valid
|
|
4291
|
+
*/
|
|
4292
|
+
isValid: () => {
|
|
4293
|
+
valid: boolean;
|
|
4294
|
+
errors: string[];
|
|
4295
|
+
};
|
|
4296
|
+
/**
|
|
4297
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
4298
|
+
*/
|
|
4299
|
+
isLoading: boolean;
|
|
4300
|
+
}
|
|
4301
|
+
|
|
4302
|
+
/**
|
|
4303
|
+
* Hook for managing a Record of Processing Activities (ROPA)
|
|
4304
|
+
* in compliance with NDPA 2023 requirements.
|
|
4305
|
+
*
|
|
4306
|
+
* Provides state management and utility functions for maintaining
|
|
4307
|
+
* a comprehensive register of all data processing activities.
|
|
4308
|
+
*/
|
|
4309
|
+
export declare function useROPA({ initialData, adapter, onRecordAdd, onRecordUpdate, onRecordArchive, }: UseROPAOptions): UseROPAReturn;
|
|
4310
|
+
|
|
4311
|
+
export declare interface UseROPAOptions {
|
|
4312
|
+
/**
|
|
4313
|
+
* Initial ROPA state
|
|
4314
|
+
*/
|
|
4315
|
+
initialData: RecordOfProcessingActivities;
|
|
4316
|
+
/**
|
|
4317
|
+
* Pluggable storage adapter. When provided, adapter data is loaded on mount
|
|
4318
|
+
* and the ROPA is persisted after every mutation. Falls back to initialData
|
|
4319
|
+
* when no adapter data is found.
|
|
4320
|
+
*/
|
|
4321
|
+
adapter?: StorageAdapter<RecordOfProcessingActivities>;
|
|
4322
|
+
/**
|
|
4323
|
+
* Callback when a record is added
|
|
4324
|
+
*/
|
|
4325
|
+
onRecordAdd?: (record: ProcessingRecord) => void;
|
|
4326
|
+
/**
|
|
4327
|
+
* Callback when a record is updated
|
|
4328
|
+
*/
|
|
4329
|
+
onRecordUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
|
|
4330
|
+
/**
|
|
4331
|
+
* Callback when a record is archived
|
|
4332
|
+
*/
|
|
4333
|
+
onRecordArchive?: (id: string) => void;
|
|
4334
|
+
}
|
|
4335
|
+
|
|
4336
|
+
export declare interface UseROPAReturn {
|
|
4337
|
+
/**
|
|
4338
|
+
* Current state of the Record of Processing Activities
|
|
4339
|
+
*/
|
|
4340
|
+
ropa: RecordOfProcessingActivities;
|
|
4341
|
+
/**
|
|
4342
|
+
* Add a new processing record
|
|
4343
|
+
*/
|
|
4344
|
+
addRecord: (record: ProcessingRecord) => void;
|
|
4345
|
+
/**
|
|
4346
|
+
* Update an existing processing record
|
|
4347
|
+
*/
|
|
4348
|
+
updateRecord: (id: string, updates: Partial<ProcessingRecord>) => void;
|
|
4349
|
+
/**
|
|
4350
|
+
* Archive a processing record by setting its status to 'archived'
|
|
4351
|
+
*/
|
|
4352
|
+
archiveRecord: (id: string) => void;
|
|
4353
|
+
/**
|
|
4354
|
+
* Get a single processing record by ID
|
|
4355
|
+
*/
|
|
4356
|
+
getRecord: (id: string) => ProcessingRecord | undefined;
|
|
4357
|
+
/**
|
|
4358
|
+
* Get a summary of the ROPA including statistics
|
|
4359
|
+
*/
|
|
4360
|
+
getSummary: () => ROPASummary;
|
|
4361
|
+
/**
|
|
4362
|
+
* Export the ROPA as a CSV string
|
|
4363
|
+
*/
|
|
4364
|
+
exportCSV: () => string;
|
|
4365
|
+
/**
|
|
4366
|
+
* Identify compliance gaps across all records
|
|
4367
|
+
*/
|
|
4368
|
+
getComplianceGaps: () => ROPAComplianceGap[];
|
|
4369
|
+
/**
|
|
4370
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
4371
|
+
*/
|
|
4372
|
+
isLoading: boolean;
|
|
4373
|
+
}
|
|
4374
|
+
|
|
4375
|
+
/**
|
|
4376
|
+
* Validates consent settings to ensure they meet NDPA requirements
|
|
4377
|
+
* @param settings The consent settings to validate
|
|
4378
|
+
* @returns An object containing validation result and any error messages
|
|
4379
|
+
*/
|
|
4380
|
+
export declare function validateConsent(settings: ConsentSettings): {
|
|
4381
|
+
valid: boolean;
|
|
4382
|
+
errors: string[];
|
|
4383
|
+
};
|
|
4384
|
+
|
|
4385
|
+
/**
|
|
4386
|
+
* Validates that consent options meet NDPA Section 26 requirements.
|
|
4387
|
+
* Each consent option must specify a purpose for which data will be processed,
|
|
4388
|
+
* as consent must be specific and informed per the Nigeria Data Protection Act.
|
|
4389
|
+
* @param options The consent options to validate
|
|
4390
|
+
* @returns An object containing validation result and any error messages
|
|
4391
|
+
*/
|
|
4392
|
+
export declare function validateConsentOptions(options: ConsentOption[]): {
|
|
4393
|
+
valid: boolean;
|
|
4394
|
+
errors: string[];
|
|
4395
|
+
};
|
|
4396
|
+
|
|
4397
|
+
/**
|
|
4398
|
+
* Validates that all required fields are present on a processing activity
|
|
4399
|
+
* and that the lawful basis is properly documented.
|
|
4400
|
+
*
|
|
4401
|
+
* If lawfulBasis is 'legitimate_interests', ensures a LIA justification exists.
|
|
4402
|
+
* If involvesSensitiveData is true, ensures sensitiveDataCondition is set.
|
|
4403
|
+
*
|
|
4404
|
+
* @param activity The processing activity to validate
|
|
4405
|
+
* @returns Validation result with errors and warnings
|
|
4406
|
+
*/
|
|
4407
|
+
export declare function validateProcessingActivity(activity: ProcessingActivity): LawfulBasisValidationResult;
|
|
4408
|
+
|
|
4409
|
+
/**
|
|
4410
|
+
* Validates a processing record to ensure all required fields are present
|
|
4411
|
+
* and properly filled per NDPA 2023 requirements.
|
|
4412
|
+
*
|
|
4413
|
+
* @param record - The processing record to validate
|
|
4414
|
+
* @returns Validation result with any errors found
|
|
4415
|
+
*/
|
|
4416
|
+
export declare function validateProcessingRecord(record: ProcessingRecord): ROPAValidationResult;
|
|
4417
|
+
|
|
4418
|
+
/**
|
|
4419
|
+
* Validates a cross-border transfer record for completeness and compliance.
|
|
4420
|
+
* Checks required fields, verifies that NDPC approval is documented when required,
|
|
4421
|
+
* and ensures safeguards are in place.
|
|
4422
|
+
*
|
|
4423
|
+
* @param transfer The cross-border transfer to validate
|
|
4424
|
+
* @returns Validation result with errors and warnings
|
|
4425
|
+
*/
|
|
4426
|
+
export declare function validateTransfer(transfer: CrossBorderTransfer): TransferValidationResult;
|
|
4427
|
+
|
|
4428
|
+
export { }
|