@tantainnovative/ndpr-toolkit 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breach.d.mts +437 -3
- package/dist/breach.d.ts +437 -3
- package/dist/dsr.d.mts +306 -3
- package/dist/dsr.d.ts +306 -3
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/breach-ouXoVTWs.d.ts +0 -438
- package/dist/breach-yRiyyc4n.d.mts +0 -438
- package/dist/dsr-190YpijW.d.ts +0 -307
- package/dist/dsr-BTT-Xd7H.d.mts +0 -307
package/dist/breach.d.ts
CHANGED
|
@@ -1,5 +1,439 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { B as BreachCategory, a as BreachReport, b as RiskAssessment, R as RegulatoryNotification } from './breach-Eu9byel8.js';
|
|
3
|
+
export { N as NotificationRequirement } from './breach-Eu9byel8.js';
|
|
2
4
|
export { u as useBreach } from './useBreach-lFLbSyAN.js';
|
|
3
5
|
export { c as calculateBreachSeverity } from './breach-CzXqSsaY.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Represents the data submitted by the breach report form.
|
|
9
|
+
*/
|
|
10
|
+
interface BreachFormSubmission {
|
|
11
|
+
/** Title/summary of the breach */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Detailed description of the breach */
|
|
14
|
+
description: string;
|
|
15
|
+
/** Breach category identifier */
|
|
16
|
+
category: string;
|
|
17
|
+
/** Timestamp (ms) when the breach was discovered */
|
|
18
|
+
discoveredAt: number;
|
|
19
|
+
/** Timestamp (ms) when the breach occurred (if known) */
|
|
20
|
+
occurredAt?: number;
|
|
21
|
+
/** Timestamp (ms) when the form was submitted */
|
|
22
|
+
reportedAt: number;
|
|
23
|
+
/** Person reporting the breach */
|
|
24
|
+
reporter: {
|
|
25
|
+
name: string;
|
|
26
|
+
email: string;
|
|
27
|
+
department: string;
|
|
28
|
+
phone?: string;
|
|
29
|
+
};
|
|
30
|
+
/** Systems or applications affected by the breach */
|
|
31
|
+
affectedSystems: string[];
|
|
32
|
+
/** Types of data involved in the breach */
|
|
33
|
+
dataTypes: string[];
|
|
34
|
+
/** Estimated number of affected data subjects */
|
|
35
|
+
estimatedAffectedSubjects?: number;
|
|
36
|
+
/** Current status of the breach */
|
|
37
|
+
status: 'ongoing' | 'contained' | 'resolved';
|
|
38
|
+
/** Initial actions taken to address the breach */
|
|
39
|
+
initialActions?: string;
|
|
40
|
+
/** File attachments included with the report */
|
|
41
|
+
attachments: Array<{
|
|
42
|
+
name: string;
|
|
43
|
+
type: string;
|
|
44
|
+
size: number;
|
|
45
|
+
file: File;
|
|
46
|
+
}>;
|
|
47
|
+
}
|
|
48
|
+
interface BreachReportFormClassNames {
|
|
49
|
+
root?: string;
|
|
50
|
+
title?: string;
|
|
51
|
+
form?: string;
|
|
52
|
+
fieldGroup?: string;
|
|
53
|
+
label?: string;
|
|
54
|
+
input?: string;
|
|
55
|
+
select?: string;
|
|
56
|
+
textarea?: string;
|
|
57
|
+
submitButton?: string;
|
|
58
|
+
/** Alias for submitButton */
|
|
59
|
+
primaryButton?: string;
|
|
60
|
+
notice?: string;
|
|
61
|
+
/** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
|
|
62
|
+
loadingOverlay?: string;
|
|
63
|
+
}
|
|
64
|
+
interface BreachReportFormProps {
|
|
65
|
+
/**
|
|
66
|
+
* Available breach categories
|
|
67
|
+
*/
|
|
68
|
+
categories: BreachCategory[];
|
|
69
|
+
/**
|
|
70
|
+
* Callback function called when form is submitted
|
|
71
|
+
*/
|
|
72
|
+
onSubmit: (data: BreachFormSubmission) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Callback function called when form validation fails
|
|
75
|
+
*/
|
|
76
|
+
onValidationError?: (errors: Record<string, string>) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Title displayed on the form
|
|
79
|
+
* @default "Report a Data Breach"
|
|
80
|
+
*/
|
|
81
|
+
title?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Description text displayed on the form
|
|
84
|
+
* @default "Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required."
|
|
85
|
+
*/
|
|
86
|
+
formDescription?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Text for the submit button
|
|
89
|
+
* @default "Submit Report"
|
|
90
|
+
*/
|
|
91
|
+
submitButtonText?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Custom CSS class for the form
|
|
94
|
+
*/
|
|
95
|
+
className?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Custom CSS class for the submit button
|
|
98
|
+
*/
|
|
99
|
+
buttonClassName?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Override class names for individual elements
|
|
102
|
+
*/
|
|
103
|
+
classNames?: BreachReportFormClassNames;
|
|
104
|
+
/**
|
|
105
|
+
* Remove all default styles, only applying classNames overrides
|
|
106
|
+
*/
|
|
107
|
+
unstyled?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Whether the form is currently submitting.
|
|
110
|
+
* When true, the submit button is disabled and shows "Submitting..." text.
|
|
111
|
+
*/
|
|
112
|
+
isSubmitting?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Whether to show a confirmation message after submission
|
|
115
|
+
* @default true
|
|
116
|
+
*/
|
|
117
|
+
showConfirmation?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Confirmation message to display after submission
|
|
120
|
+
* @default "Your breach report has been submitted successfully. The data protection team has been notified."
|
|
121
|
+
*/
|
|
122
|
+
confirmationMessage?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Whether to allow file attachments
|
|
125
|
+
* @default true
|
|
126
|
+
*/
|
|
127
|
+
allowAttachments?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Maximum number of attachments allowed
|
|
130
|
+
* @default 5
|
|
131
|
+
*/
|
|
132
|
+
maxAttachments?: number;
|
|
133
|
+
/**
|
|
134
|
+
* Maximum file size for attachments (in bytes)
|
|
135
|
+
* @default 5242880 (5MB)
|
|
136
|
+
*/
|
|
137
|
+
maxFileSize?: number;
|
|
138
|
+
/**
|
|
139
|
+
* Allowed file types for attachments
|
|
140
|
+
* @default ['.pdf', '.jpg', '.jpeg', '.png', '.doc', '.docx', '.xls', '.xlsx', '.txt']
|
|
141
|
+
*/
|
|
142
|
+
allowedFileTypes?: string[];
|
|
143
|
+
/**
|
|
144
|
+
* Default values to pre-fill form fields.
|
|
145
|
+
* Useful for editing existing breach reports or pre-populating known data.
|
|
146
|
+
*/
|
|
147
|
+
defaultValues?: Partial<BreachFormSubmission>;
|
|
148
|
+
/**
|
|
149
|
+
* Callback fired when the form is reset via the Reset button.
|
|
150
|
+
* To fully remount the component (clearing all internal state),
|
|
151
|
+
* change the `key` prop from the parent.
|
|
152
|
+
*/
|
|
153
|
+
onReset?: () => void;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Breach report form component. Implements NDPA Section 40 breach notification requirements,
|
|
157
|
+
* enabling organizations to document and report data breaches within the mandated 72-hour window.
|
|
158
|
+
*/
|
|
159
|
+
declare const BreachReportForm: React.FC<BreachReportFormProps>;
|
|
160
|
+
|
|
161
|
+
interface BreachRiskAssessmentClassNames {
|
|
162
|
+
root?: string;
|
|
163
|
+
header?: string;
|
|
164
|
+
title?: string;
|
|
165
|
+
slider?: string;
|
|
166
|
+
riskBadge?: string;
|
|
167
|
+
riskScore?: string;
|
|
168
|
+
notificationStatus?: string;
|
|
169
|
+
submitButton?: string;
|
|
170
|
+
/** Alias for submitButton */
|
|
171
|
+
primaryButton?: string;
|
|
172
|
+
}
|
|
173
|
+
interface BreachRiskAssessmentProps {
|
|
174
|
+
/**
|
|
175
|
+
* The breach data to assess
|
|
176
|
+
*/
|
|
177
|
+
breachData: BreachReport;
|
|
178
|
+
/**
|
|
179
|
+
* Initial assessment data (if editing an existing assessment)
|
|
180
|
+
*/
|
|
181
|
+
initialAssessment?: Partial<RiskAssessment>;
|
|
182
|
+
/**
|
|
183
|
+
* Callback function called when assessment is completed
|
|
184
|
+
*/
|
|
185
|
+
onComplete: (assessment: RiskAssessment) => void;
|
|
186
|
+
/**
|
|
187
|
+
* Title displayed on the assessment form
|
|
188
|
+
* @default "Breach Risk Assessment"
|
|
189
|
+
*/
|
|
190
|
+
title?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Description text displayed on the assessment form
|
|
193
|
+
* @default "Assess the risk level of this data breach to determine notification requirements under NDPA Section 40."
|
|
194
|
+
*/
|
|
195
|
+
description?: string;
|
|
196
|
+
/**
|
|
197
|
+
* Text for the submit button
|
|
198
|
+
* @default "Complete Assessment"
|
|
199
|
+
*/
|
|
200
|
+
submitButtonText?: string;
|
|
201
|
+
/**
|
|
202
|
+
* Custom CSS class for the form
|
|
203
|
+
*/
|
|
204
|
+
className?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Custom CSS class for the submit button
|
|
207
|
+
*/
|
|
208
|
+
buttonClassName?: string;
|
|
209
|
+
/**
|
|
210
|
+
* Override class names for individual elements
|
|
211
|
+
*/
|
|
212
|
+
classNames?: BreachRiskAssessmentClassNames;
|
|
213
|
+
/**
|
|
214
|
+
* Remove all default styles, only applying classNames overrides
|
|
215
|
+
*/
|
|
216
|
+
unstyled?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Whether to show the breach summary
|
|
219
|
+
* @default true
|
|
220
|
+
*/
|
|
221
|
+
showBreachSummary?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Whether to show notification requirements after assessment
|
|
224
|
+
* @default true
|
|
225
|
+
*/
|
|
226
|
+
showNotificationRequirements?: boolean;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Breach risk assessment component. Implements NDPA Section 40 requirements for assessing
|
|
230
|
+
* breach severity and determining whether NDPC notification is required within 72 hours.
|
|
231
|
+
*/
|
|
232
|
+
declare const BreachRiskAssessment: React.FC<BreachRiskAssessmentProps>;
|
|
233
|
+
|
|
234
|
+
interface BreachNotificationManagerClassNames {
|
|
235
|
+
root?: string;
|
|
236
|
+
header?: string;
|
|
237
|
+
title?: string;
|
|
238
|
+
breachList?: string;
|
|
239
|
+
breachItem?: string;
|
|
240
|
+
statusBadge?: string;
|
|
241
|
+
timeline?: string;
|
|
242
|
+
timelineStep?: string;
|
|
243
|
+
detailPanel?: string;
|
|
244
|
+
}
|
|
245
|
+
interface BreachNotificationManagerProps {
|
|
246
|
+
/**
|
|
247
|
+
* List of breach reports to manage
|
|
248
|
+
*/
|
|
249
|
+
breachReports: BreachReport[];
|
|
250
|
+
/**
|
|
251
|
+
* List of risk assessments
|
|
252
|
+
*/
|
|
253
|
+
riskAssessments: RiskAssessment[];
|
|
254
|
+
/**
|
|
255
|
+
* List of regulatory notifications
|
|
256
|
+
*/
|
|
257
|
+
regulatoryNotifications: RegulatoryNotification[];
|
|
258
|
+
/**
|
|
259
|
+
* Callback function called when a breach is selected
|
|
260
|
+
*/
|
|
261
|
+
onSelectBreach?: (breachId: string) => void;
|
|
262
|
+
/**
|
|
263
|
+
* Callback function called when a risk assessment is requested
|
|
264
|
+
*/
|
|
265
|
+
onRequestAssessment?: (breachId: string) => void;
|
|
266
|
+
/**
|
|
267
|
+
* Callback function called when a notification is requested
|
|
268
|
+
*/
|
|
269
|
+
onRequestNotification?: (breachId: string) => void;
|
|
270
|
+
/**
|
|
271
|
+
* Title displayed on the manager
|
|
272
|
+
* @default "Breach Notification Manager"
|
|
273
|
+
*/
|
|
274
|
+
title?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Description text displayed on the manager
|
|
277
|
+
* @default "Manage data breach notifications and track compliance with NDPA Section 40 requirements."
|
|
278
|
+
*/
|
|
279
|
+
description?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Custom CSS class for the manager
|
|
282
|
+
*/
|
|
283
|
+
className?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Custom CSS class for the buttons
|
|
286
|
+
*/
|
|
287
|
+
buttonClassName?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Override class names for individual elements
|
|
290
|
+
*/
|
|
291
|
+
classNames?: BreachNotificationManagerClassNames;
|
|
292
|
+
/**
|
|
293
|
+
* Remove all default styles, only applying classNames overrides
|
|
294
|
+
*/
|
|
295
|
+
unstyled?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Whether to show the breach details
|
|
298
|
+
* @default true
|
|
299
|
+
*/
|
|
300
|
+
showBreachDetails?: boolean;
|
|
301
|
+
/**
|
|
302
|
+
* Whether to show the notification timeline
|
|
303
|
+
* @default true
|
|
304
|
+
*/
|
|
305
|
+
showNotificationTimeline?: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Whether to show the deadline alerts
|
|
308
|
+
* @default true
|
|
309
|
+
*/
|
|
310
|
+
showDeadlineAlerts?: boolean;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Breach notification management component. Implements NDPA Section 40 requirements for
|
|
314
|
+
* managing breach notifications, tracking 72-hour NDPC reporting deadlines, and coordinating
|
|
315
|
+
* data subject notifications.
|
|
316
|
+
*/
|
|
317
|
+
declare const BreachNotificationManager: React.FC<BreachNotificationManagerProps>;
|
|
318
|
+
|
|
319
|
+
interface RegulatoryReportGeneratorClassNames {
|
|
320
|
+
root?: string;
|
|
321
|
+
header?: string;
|
|
322
|
+
title?: string;
|
|
323
|
+
reportPreview?: string;
|
|
324
|
+
field?: string;
|
|
325
|
+
fieldLabel?: string;
|
|
326
|
+
fieldValue?: string;
|
|
327
|
+
generateButton?: string;
|
|
328
|
+
/** Alias for generateButton */
|
|
329
|
+
primaryButton?: string;
|
|
330
|
+
downloadButton?: string;
|
|
331
|
+
/** Alias for downloadButton */
|
|
332
|
+
secondaryButton?: string;
|
|
333
|
+
}
|
|
334
|
+
interface OrganizationInfo {
|
|
335
|
+
/**
|
|
336
|
+
* Name of the organization
|
|
337
|
+
*/
|
|
338
|
+
name: string;
|
|
339
|
+
/**
|
|
340
|
+
* Registration number or business ID
|
|
341
|
+
*/
|
|
342
|
+
registrationNumber?: string;
|
|
343
|
+
/**
|
|
344
|
+
* Physical address of the organization
|
|
345
|
+
*/
|
|
346
|
+
address: string;
|
|
347
|
+
/**
|
|
348
|
+
* Website URL
|
|
349
|
+
*/
|
|
350
|
+
website?: string;
|
|
351
|
+
/**
|
|
352
|
+
* Name of the Data Protection Officer
|
|
353
|
+
*/
|
|
354
|
+
dpoName: string;
|
|
355
|
+
/**
|
|
356
|
+
* Email of the Data Protection Officer
|
|
357
|
+
*/
|
|
358
|
+
dpoEmail: string;
|
|
359
|
+
/**
|
|
360
|
+
* Phone number of the Data Protection Officer
|
|
361
|
+
*/
|
|
362
|
+
dpoPhone?: string;
|
|
363
|
+
}
|
|
364
|
+
interface RegulatoryReportGeneratorProps {
|
|
365
|
+
/**
|
|
366
|
+
* The breach data to include in the report
|
|
367
|
+
*/
|
|
368
|
+
breachData: BreachReport;
|
|
369
|
+
/**
|
|
370
|
+
* The risk assessment data
|
|
371
|
+
*/
|
|
372
|
+
assessmentData?: RiskAssessment;
|
|
373
|
+
/**
|
|
374
|
+
* Organization information to include in the report
|
|
375
|
+
*/
|
|
376
|
+
organizationInfo: OrganizationInfo;
|
|
377
|
+
/**
|
|
378
|
+
* Callback function called when the report is generated
|
|
379
|
+
*/
|
|
380
|
+
onGenerate: (report: RegulatoryNotification) => void;
|
|
381
|
+
/**
|
|
382
|
+
* Title displayed on the generator form
|
|
383
|
+
* @default "Generate NDPC Notification Report"
|
|
384
|
+
*/
|
|
385
|
+
title?: string;
|
|
386
|
+
/**
|
|
387
|
+
* Description text displayed on the generator form
|
|
388
|
+
* @default "Generate a report for submission to the NDPC in compliance with NDPA Section 40 breach notification requirements."
|
|
389
|
+
*/
|
|
390
|
+
description?: string;
|
|
391
|
+
/**
|
|
392
|
+
* Text for the generate button
|
|
393
|
+
* @default "Generate Report"
|
|
394
|
+
*/
|
|
395
|
+
generateButtonText?: string;
|
|
396
|
+
/**
|
|
397
|
+
* Custom CSS class for the form
|
|
398
|
+
*/
|
|
399
|
+
className?: string;
|
|
400
|
+
/**
|
|
401
|
+
* Custom CSS class for the buttons
|
|
402
|
+
*/
|
|
403
|
+
buttonClassName?: string;
|
|
404
|
+
/**
|
|
405
|
+
* Override class names for individual elements
|
|
406
|
+
*/
|
|
407
|
+
classNames?: RegulatoryReportGeneratorClassNames;
|
|
408
|
+
/**
|
|
409
|
+
* Remove all default styles, only applying classNames overrides
|
|
410
|
+
*/
|
|
411
|
+
unstyled?: boolean;
|
|
412
|
+
/**
|
|
413
|
+
* Whether to show a preview of the generated report
|
|
414
|
+
* @default true
|
|
415
|
+
*/
|
|
416
|
+
showPreview?: boolean;
|
|
417
|
+
/**
|
|
418
|
+
* Whether to allow editing the report content
|
|
419
|
+
* @default true
|
|
420
|
+
*/
|
|
421
|
+
allowEditing?: boolean;
|
|
422
|
+
/**
|
|
423
|
+
* Whether to allow downloading the report
|
|
424
|
+
* @default true
|
|
425
|
+
*/
|
|
426
|
+
allowDownload?: boolean;
|
|
427
|
+
/**
|
|
428
|
+
* Format for downloading the report
|
|
429
|
+
* @default "pdf"
|
|
430
|
+
*/
|
|
431
|
+
downloadFormat?: 'pdf' | 'docx' | 'html';
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Regulatory report generator component. Implements NDPA Section 40 requirements for
|
|
435
|
+
* generating formal breach notification reports for submission to the NDPC.
|
|
436
|
+
*/
|
|
437
|
+
declare const RegulatoryReportGenerator: React.FC<RegulatoryReportGeneratorProps>;
|
|
438
|
+
|
|
439
|
+
export { BreachCategory, type BreachFormSubmission, BreachNotificationManager, type BreachNotificationManagerClassNames, BreachReport, BreachReportForm, type BreachReportFormClassNames, BreachRiskAssessment, type BreachRiskAssessmentClassNames, RegulatoryNotification, RegulatoryReportGenerator, type RegulatoryReportGeneratorClassNames, RiskAssessment };
|