@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.
Files changed (177) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/adapters.d.mts +34 -25
  3. package/dist/adapters.d.ts +34 -25
  4. package/dist/breach.d.mts +803 -44
  5. package/dist/breach.d.ts +803 -44
  6. package/dist/breach.js +1 -1
  7. package/dist/breach.mjs +1 -1
  8. package/dist/{chunk-ASLMPY54.js → chunk-3EGQWLJ6.js} +3 -3
  9. package/dist/chunk-B4Z5MBUC.mjs +2 -0
  10. package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
  11. package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
  12. package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
  13. package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
  14. package/dist/{chunk-MLOWRZXO.mjs → chunk-F5TXUA4O.mjs} +3 -3
  15. package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
  16. package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
  17. package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
  18. package/dist/{chunk-NFJ4CB63.mjs → chunk-ID2NYIVE.mjs} +3 -3
  19. package/dist/chunk-J5WCPZLW.js +2 -0
  20. package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
  21. package/dist/chunk-LU7PKE7Y.mjs +2 -0
  22. package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
  23. package/dist/{chunk-4BOEFDDE.js → chunk-ORFC66EA.js} +3 -3
  24. package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
  25. package/dist/chunk-SCWNM4PC.mjs +2 -0
  26. package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
  27. package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
  28. package/dist/chunk-TV4U6AIS.js +2 -0
  29. package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
  30. package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
  31. package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
  32. package/dist/consent.d.mts +648 -84
  33. package/dist/consent.d.ts +648 -84
  34. package/dist/consent.js +1 -1
  35. package/dist/consent.mjs +1 -1
  36. package/dist/core.d.mts +2049 -23
  37. package/dist/core.d.ts +2049 -23
  38. package/dist/core.js +1 -1
  39. package/dist/core.mjs +1 -1
  40. package/dist/cross-border.d.mts +470 -99
  41. package/dist/cross-border.d.ts +470 -99
  42. package/dist/dpia.d.mts +591 -37
  43. package/dist/dpia.d.ts +591 -37
  44. package/dist/dsr.d.mts +654 -37
  45. package/dist/dsr.d.ts +654 -37
  46. package/dist/dsr.js +1 -1
  47. package/dist/dsr.mjs +1 -1
  48. package/dist/hooks.d.mts +2174 -30
  49. package/dist/hooks.d.ts +2174 -30
  50. package/dist/hooks.js +1 -1
  51. package/dist/hooks.mjs +1 -1
  52. package/dist/index.d.mts +4428 -43
  53. package/dist/index.d.ts +4428 -43
  54. package/dist/index.js +1 -1
  55. package/dist/index.mjs +1 -1
  56. package/dist/lawful-basis.d.mts +368 -32
  57. package/dist/lawful-basis.d.ts +368 -32
  58. package/dist/policy.d.mts +1178 -83
  59. package/dist/policy.d.ts +1178 -83
  60. package/dist/policy.js +1 -1
  61. package/dist/policy.mjs +1 -1
  62. package/dist/presets.d.mts +1020 -114
  63. package/dist/presets.d.ts +1020 -114
  64. package/dist/presets.js +1 -1
  65. package/dist/presets.mjs +1 -1
  66. package/dist/ropa.d.mts +396 -31
  67. package/dist/ropa.d.ts +396 -31
  68. package/dist/ropa.js +1 -1
  69. package/dist/ropa.mjs +1 -1
  70. package/dist/server.d.mts +2133 -24
  71. package/dist/server.d.ts +2133 -24
  72. package/dist/server.js +1 -1
  73. package/dist/server.mjs +1 -1
  74. package/dist/unstyled.d.mts +523 -55
  75. package/dist/unstyled.d.ts +523 -55
  76. package/dist/unstyled.js +1 -1
  77. package/dist/unstyled.mjs +1 -1
  78. package/package.json +3 -3
  79. package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
  80. package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
  81. package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
  82. package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
  83. package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
  84. package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
  85. package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
  86. package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
  87. package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
  88. package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
  89. package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
  90. package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
  91. package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
  92. package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
  93. package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
  94. package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
  95. package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
  96. package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
  97. package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
  98. package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
  99. package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
  100. package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
  101. package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
  102. package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
  103. package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
  104. package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
  105. package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
  106. package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
  107. package/dist/breach-B_-6lDqS.d.mts +0 -17
  108. package/dist/breach-CzXqSsaY.d.ts +0 -17
  109. package/dist/breach-Eu9byel8.d.mts +0 -185
  110. package/dist/breach-Eu9byel8.d.ts +0 -185
  111. package/dist/chunk-2L7BSG7G.mjs +0 -2
  112. package/dist/chunk-5X32J5IA.mjs +0 -2
  113. package/dist/chunk-7D2OIPHH.mjs +0 -2
  114. package/dist/chunk-JKKRPS4P.js +0 -2
  115. package/dist/chunk-UHTJ6UFW.js +0 -2
  116. package/dist/compliance-score-racQe_E_.d.mts +0 -115
  117. package/dist/compliance-score-racQe_E_.d.ts +0 -115
  118. package/dist/consent-CmVzqZUk.d.mts +0 -99
  119. package/dist/consent-CmVzqZUk.d.ts +0 -99
  120. package/dist/consent-audit-BdByjYlM.d.mts +0 -65
  121. package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
  122. package/dist/cross-border-BBi9rZyO.d.mts +0 -54
  123. package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
  124. package/dist/cross-border-UyT00llA.d.mts +0 -141
  125. package/dist/cross-border-UyT00llA.d.ts +0 -141
  126. package/dist/docx-4n8g4zul.d.mts +0 -64
  127. package/dist/docx-VvcTLYZM.d.ts +0 -64
  128. package/dist/dpia-D82hUrJe.d.ts +0 -15
  129. package/dist/dpia-DQDFw2_l.d.mts +0 -15
  130. package/dist/dpia-c9GiiOq0.d.mts +0 -137
  131. package/dist/dpia-c9GiiOq0.d.ts +0 -137
  132. package/dist/dsr-CIx5sd7e.d.ts +0 -14
  133. package/dist/dsr-XZ_HqTlA.d.mts +0 -14
  134. package/dist/dsr-yKbqX531.d.mts +0 -128
  135. package/dist/dsr-yKbqX531.d.ts +0 -128
  136. package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
  137. package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
  138. package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
  139. package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
  140. package/dist/locale-CxJx2tzn.d.mts +0 -25
  141. package/dist/locale-DSkrtf-c.d.ts +0 -25
  142. package/dist/policy-engine-5qTfp2z4.d.mts +0 -174
  143. package/dist/policy-engine-DzPxskOK.d.ts +0 -174
  144. package/dist/policy-sections-9tCb7VU7.d.ts +0 -56
  145. package/dist/policy-sections-CBWcJv-R.d.mts +0 -56
  146. package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
  147. package/dist/policy-templates-DwYl2329.d.mts +0 -43
  148. package/dist/privacy-Ca6te9Ir.d.mts +0 -138
  149. package/dist/privacy-Ca6te9Ir.d.ts +0 -138
  150. package/dist/ropa-BDTM06tr.d.ts +0 -152
  151. package/dist/ropa-CFHuT7jE.d.mts +0 -152
  152. package/dist/ropa-CyynscU6.d.ts +0 -51
  153. package/dist/ropa-NIgxd8uP.d.mts +0 -51
  154. package/dist/sanitize-CxxwKxAx.d.mts +0 -94
  155. package/dist/sanitize-CxxwKxAx.d.ts +0 -94
  156. package/dist/styling-BMDGQDgS.d.mts +0 -64
  157. package/dist/styling-BaoQtV06.d.ts +0 -64
  158. package/dist/types-DK2CoKOC.d.mts +0 -10
  159. package/dist/types-DK2CoKOC.d.ts +0 -10
  160. package/dist/useAdaptivePolicyWizard-BSLyltzZ.d.mts +0 -52
  161. package/dist/useAdaptivePolicyWizard-CL7C7MTZ.d.ts +0 -52
  162. package/dist/useBreach-CPr86Yan.d.mts +0 -115
  163. package/dist/useBreach-DkVXvtJK.d.ts +0 -115
  164. package/dist/useConsent-DCNkIJHR.d.mts +0 -75
  165. package/dist/useConsent-dOcELSfX.d.ts +0 -75
  166. package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
  167. package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
  168. package/dist/useDPIA-B6180UQn.d.mts +0 -109
  169. package/dist/useDPIA-CTqbNbww.d.ts +0 -109
  170. package/dist/useDSR-WvHk8_iu.d.mts +0 -85
  171. package/dist/useDSR-wH4H6hSM.d.ts +0 -85
  172. package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
  173. package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
  174. package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
  175. package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
  176. package/dist/useROPA-BSSU1rfx.d.ts +0 -76
  177. package/dist/useROPA-C2hjaBTz.d.mts +0 -76
@@ -1,57 +0,0 @@
1
- import { P as ProcessingActivity, a as LawfulBasisSummary, L as LawfulBasis } from './lawful-basis-Cv1VmDLn.js';
2
-
3
- /**
4
- * Validation result for a processing activity
5
- */
6
- interface LawfulBasisValidationResult {
7
- isValid: boolean;
8
- errors: string[];
9
- warnings: string[];
10
- }
11
- /**
12
- * Compliance gap identified across processing activities
13
- */
14
- interface LawfulBasisComplianceGap {
15
- activityId: string;
16
- activityName: string;
17
- type: 'missing_approval' | 'overdue_review' | 'missing_justification' | 'missing_lia' | 'missing_sensitive_condition' | 'missing_retention' | 'missing_data_categories' | 'missing_purposes';
18
- severity: 'high' | 'medium' | 'low';
19
- description: string;
20
- }
21
- /**
22
- * Validates that all required fields are present on a processing activity
23
- * and that the lawful basis is properly documented.
24
- *
25
- * If lawfulBasis is 'legitimate_interests', ensures a LIA justification exists.
26
- * If involvesSensitiveData is true, ensures sensitiveDataCondition is set.
27
- *
28
- * @param activity The processing activity to validate
29
- * @returns Validation result with errors and warnings
30
- */
31
- declare function validateProcessingActivity(activity: ProcessingActivity): LawfulBasisValidationResult;
32
- /**
33
- * Returns a human-readable description of a lawful basis with the relevant
34
- * NDPA section reference.
35
- *
36
- * @param basis The lawful basis to describe
37
- * @returns Description string including NDPA section reference
38
- */
39
- declare function getLawfulBasisDescription(basis: LawfulBasis): string;
40
- /**
41
- * Analyzes all processing activities and returns compliance gaps including
42
- * missing DPO approval, overdue reviews, undocumented justifications,
43
- * missing LIA for legitimate interests, and other documentation issues.
44
- *
45
- * @param activities Array of processing activities to analyze
46
- * @returns Array of identified compliance gaps
47
- */
48
- declare function assessComplianceGaps(activities: ProcessingActivity[]): LawfulBasisComplianceGap[];
49
- /**
50
- * Generates a summary of all lawful basis documentation across processing activities.
51
- *
52
- * @param activities Array of processing activities to summarize
53
- * @returns LawfulBasisSummary with counts, breakdowns, and flagged activities
54
- */
55
- declare function generateLawfulBasisSummary(activities: ProcessingActivity[]): LawfulBasisSummary;
56
-
57
- export { type LawfulBasisComplianceGap as L, type LawfulBasisValidationResult as a, assessComplianceGaps as b, getLawfulBasisDescription as c, generateLawfulBasisSummary as g, validateProcessingActivity as v };
@@ -1,57 +0,0 @@
1
- import { P as ProcessingActivity, a as LawfulBasisSummary, L as LawfulBasis } from './lawful-basis-Cv1VmDLn.mjs';
2
-
3
- /**
4
- * Validation result for a processing activity
5
- */
6
- interface LawfulBasisValidationResult {
7
- isValid: boolean;
8
- errors: string[];
9
- warnings: string[];
10
- }
11
- /**
12
- * Compliance gap identified across processing activities
13
- */
14
- interface LawfulBasisComplianceGap {
15
- activityId: string;
16
- activityName: string;
17
- type: 'missing_approval' | 'overdue_review' | 'missing_justification' | 'missing_lia' | 'missing_sensitive_condition' | 'missing_retention' | 'missing_data_categories' | 'missing_purposes';
18
- severity: 'high' | 'medium' | 'low';
19
- description: string;
20
- }
21
- /**
22
- * Validates that all required fields are present on a processing activity
23
- * and that the lawful basis is properly documented.
24
- *
25
- * If lawfulBasis is 'legitimate_interests', ensures a LIA justification exists.
26
- * If involvesSensitiveData is true, ensures sensitiveDataCondition is set.
27
- *
28
- * @param activity The processing activity to validate
29
- * @returns Validation result with errors and warnings
30
- */
31
- declare function validateProcessingActivity(activity: ProcessingActivity): LawfulBasisValidationResult;
32
- /**
33
- * Returns a human-readable description of a lawful basis with the relevant
34
- * NDPA section reference.
35
- *
36
- * @param basis The lawful basis to describe
37
- * @returns Description string including NDPA section reference
38
- */
39
- declare function getLawfulBasisDescription(basis: LawfulBasis): string;
40
- /**
41
- * Analyzes all processing activities and returns compliance gaps including
42
- * missing DPO approval, overdue reviews, undocumented justifications,
43
- * missing LIA for legitimate interests, and other documentation issues.
44
- *
45
- * @param activities Array of processing activities to analyze
46
- * @returns Array of identified compliance gaps
47
- */
48
- declare function assessComplianceGaps(activities: ProcessingActivity[]): LawfulBasisComplianceGap[];
49
- /**
50
- * Generates a summary of all lawful basis documentation across processing activities.
51
- *
52
- * @param activities Array of processing activities to summarize
53
- * @returns LawfulBasisSummary with counts, breakdowns, and flagged activities
54
- */
55
- declare function generateLawfulBasisSummary(activities: ProcessingActivity[]): LawfulBasisSummary;
56
-
57
- export { type LawfulBasisComplianceGap as L, type LawfulBasisValidationResult as a, assessComplianceGaps as b, getLawfulBasisDescription as c, generateLawfulBasisSummary as g, validateProcessingActivity as v };
@@ -1,112 +0,0 @@
1
- /**
2
- * Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
3
- * Every processing activity must have a documented lawful basis
4
- */
5
- /**
6
- * The six lawful bases for processing personal data per NDPA Section 25(1)
7
- */
8
- type LawfulBasis = 'consent' | 'contract' | 'legal_obligation' | 'vital_interests' | 'public_interest' | 'legitimate_interests';
9
- /**
10
- * Additional conditions required for processing sensitive personal data
11
- * per NDPA Section 27
12
- */
13
- type SensitiveDataCondition = 'explicit_consent' | 'employment_law' | 'vital_interests_incapable' | 'nonprofit_legitimate' | 'publicly_available' | 'legal_claims' | 'substantial_public_interest' | 'health_purposes' | 'public_health' | 'archiving_research';
14
- /**
15
- * Represents a processing activity and its lawful basis
16
- */
17
- interface ProcessingActivity {
18
- /** Unique identifier */
19
- id: string;
20
- /** Name of the processing activity */
21
- name: string;
22
- /** Description of what processing is performed */
23
- description: string;
24
- /** The lawful basis for this processing activity */
25
- lawfulBasis: LawfulBasis;
26
- /** Justification for why this lawful basis applies */
27
- lawfulBasisJustification: string;
28
- /** Categories of personal data being processed */
29
- dataCategories: string[];
30
- /** Whether sensitive personal data is involved */
31
- involvesSensitiveData: boolean;
32
- /** Condition for processing sensitive data (required if involvesSensitiveData is true) */
33
- sensitiveDataCondition?: SensitiveDataCondition;
34
- /** Categories of data subjects */
35
- dataSubjectCategories: string[];
36
- /** Purposes of the processing */
37
- purposes: string[];
38
- /** Data retention period */
39
- retentionPeriod: string;
40
- /** Justification for the retention period */
41
- retentionJustification?: string;
42
- /** Recipients or categories of recipients */
43
- recipients?: string[];
44
- /** Whether data is transferred outside Nigeria */
45
- crossBorderTransfer: boolean;
46
- /** Timestamp when the record was created */
47
- createdAt: number;
48
- /** Timestamp when the record was last updated */
49
- updatedAt: number;
50
- /** Next review date */
51
- reviewDate?: number;
52
- /** Status of the processing activity */
53
- status: 'active' | 'inactive' | 'under_review' | 'archived';
54
- /** DPO approval details */
55
- dpoApproval?: {
56
- approved: boolean;
57
- approvedBy: string;
58
- approvedAt: number;
59
- notes?: string;
60
- };
61
- }
62
- /**
63
- * Represents a Legitimate Interest Assessment (LIA)
64
- * Required when the lawful basis is 'legitimate_interests'
65
- */
66
- interface LegitimateInterestAssessment {
67
- /** Unique identifier */
68
- id: string;
69
- /** ID of the associated processing activity */
70
- processingActivityId: string;
71
- /** Date the assessment was conducted */
72
- assessmentDate: number;
73
- /** Person who conducted the assessment */
74
- assessor: {
75
- name: string;
76
- role: string;
77
- email: string;
78
- };
79
- /** Description of the legitimate interest being pursued */
80
- purposeTest: string;
81
- /** Why the processing is necessary for this purpose */
82
- necessityTest: string;
83
- /** Balancing test: rights of data subject vs. legitimate interest */
84
- balancingTest: string;
85
- /** Safeguards applied to protect data subject rights */
86
- safeguards: string[];
87
- /** Overall conclusion */
88
- conclusion: string;
89
- /** Whether the assessment concluded the processing is justified */
90
- approved: boolean;
91
- }
92
- /**
93
- * Summary of all lawful basis documentation for compliance reporting
94
- */
95
- interface LawfulBasisSummary {
96
- /** Total number of processing activities */
97
- totalActivities: number;
98
- /** Breakdown by lawful basis */
99
- byBasis: Record<LawfulBasis, number>;
100
- /** Number of activities involving sensitive data */
101
- sensitiveDataActivities: number;
102
- /** Number of activities involving cross-border transfers */
103
- crossBorderActivities: number;
104
- /** Activities due for review */
105
- activitiesDueForReview: ProcessingActivity[];
106
- /** Activities without DPO approval */
107
- activitiesWithoutApproval: ProcessingActivity[];
108
- /** Last updated timestamp */
109
- lastUpdated: number;
110
- }
111
-
112
- export type { LawfulBasis as L, ProcessingActivity as P, SensitiveDataCondition as S, LawfulBasisSummary as a, LegitimateInterestAssessment as b };
@@ -1,112 +0,0 @@
1
- /**
2
- * Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
3
- * Every processing activity must have a documented lawful basis
4
- */
5
- /**
6
- * The six lawful bases for processing personal data per NDPA Section 25(1)
7
- */
8
- type LawfulBasis = 'consent' | 'contract' | 'legal_obligation' | 'vital_interests' | 'public_interest' | 'legitimate_interests';
9
- /**
10
- * Additional conditions required for processing sensitive personal data
11
- * per NDPA Section 27
12
- */
13
- type SensitiveDataCondition = 'explicit_consent' | 'employment_law' | 'vital_interests_incapable' | 'nonprofit_legitimate' | 'publicly_available' | 'legal_claims' | 'substantial_public_interest' | 'health_purposes' | 'public_health' | 'archiving_research';
14
- /**
15
- * Represents a processing activity and its lawful basis
16
- */
17
- interface ProcessingActivity {
18
- /** Unique identifier */
19
- id: string;
20
- /** Name of the processing activity */
21
- name: string;
22
- /** Description of what processing is performed */
23
- description: string;
24
- /** The lawful basis for this processing activity */
25
- lawfulBasis: LawfulBasis;
26
- /** Justification for why this lawful basis applies */
27
- lawfulBasisJustification: string;
28
- /** Categories of personal data being processed */
29
- dataCategories: string[];
30
- /** Whether sensitive personal data is involved */
31
- involvesSensitiveData: boolean;
32
- /** Condition for processing sensitive data (required if involvesSensitiveData is true) */
33
- sensitiveDataCondition?: SensitiveDataCondition;
34
- /** Categories of data subjects */
35
- dataSubjectCategories: string[];
36
- /** Purposes of the processing */
37
- purposes: string[];
38
- /** Data retention period */
39
- retentionPeriod: string;
40
- /** Justification for the retention period */
41
- retentionJustification?: string;
42
- /** Recipients or categories of recipients */
43
- recipients?: string[];
44
- /** Whether data is transferred outside Nigeria */
45
- crossBorderTransfer: boolean;
46
- /** Timestamp when the record was created */
47
- createdAt: number;
48
- /** Timestamp when the record was last updated */
49
- updatedAt: number;
50
- /** Next review date */
51
- reviewDate?: number;
52
- /** Status of the processing activity */
53
- status: 'active' | 'inactive' | 'under_review' | 'archived';
54
- /** DPO approval details */
55
- dpoApproval?: {
56
- approved: boolean;
57
- approvedBy: string;
58
- approvedAt: number;
59
- notes?: string;
60
- };
61
- }
62
- /**
63
- * Represents a Legitimate Interest Assessment (LIA)
64
- * Required when the lawful basis is 'legitimate_interests'
65
- */
66
- interface LegitimateInterestAssessment {
67
- /** Unique identifier */
68
- id: string;
69
- /** ID of the associated processing activity */
70
- processingActivityId: string;
71
- /** Date the assessment was conducted */
72
- assessmentDate: number;
73
- /** Person who conducted the assessment */
74
- assessor: {
75
- name: string;
76
- role: string;
77
- email: string;
78
- };
79
- /** Description of the legitimate interest being pursued */
80
- purposeTest: string;
81
- /** Why the processing is necessary for this purpose */
82
- necessityTest: string;
83
- /** Balancing test: rights of data subject vs. legitimate interest */
84
- balancingTest: string;
85
- /** Safeguards applied to protect data subject rights */
86
- safeguards: string[];
87
- /** Overall conclusion */
88
- conclusion: string;
89
- /** Whether the assessment concluded the processing is justified */
90
- approved: boolean;
91
- }
92
- /**
93
- * Summary of all lawful basis documentation for compliance reporting
94
- */
95
- interface LawfulBasisSummary {
96
- /** Total number of processing activities */
97
- totalActivities: number;
98
- /** Breakdown by lawful basis */
99
- byBasis: Record<LawfulBasis, number>;
100
- /** Number of activities involving sensitive data */
101
- sensitiveDataActivities: number;
102
- /** Number of activities involving cross-border transfers */
103
- crossBorderActivities: number;
104
- /** Activities due for review */
105
- activitiesDueForReview: ProcessingActivity[];
106
- /** Activities without DPO approval */
107
- activitiesWithoutApproval: ProcessingActivity[];
108
- /** Last updated timestamp */
109
- lastUpdated: number;
110
- }
111
-
112
- export type { LawfulBasis as L, ProcessingActivity as P, SensitiveDataCondition as S, LawfulBasisSummary as a, LegitimateInterestAssessment as b };
@@ -1,25 +0,0 @@
1
- import { N as NDPRLocale, d as defaultLocale } from './sanitize-CxxwKxAx.mjs';
2
-
3
- declare const yorubaLocale: Required<{
4
- [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
5
- }>;
6
-
7
- declare const igboLocale: Required<{
8
- [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
9
- }>;
10
-
11
- declare const hausaLocale: Required<{
12
- [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
13
- }>;
14
-
15
- declare const pidginLocale: Required<{
16
- [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
17
- }>;
18
-
19
- /**
20
- * Deep merges a partial locale with the default English locale.
21
- * Any missing keys fall back to English.
22
- */
23
- declare function mergeLocale(partial?: NDPRLocale): typeof defaultLocale;
24
-
25
- export { hausaLocale as h, igboLocale as i, mergeLocale as m, pidginLocale as p, yorubaLocale as y };
@@ -1,25 +0,0 @@
1
- import { N as NDPRLocale, d as defaultLocale } from './sanitize-CxxwKxAx.js';
2
-
3
- declare const yorubaLocale: Required<{
4
- [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
5
- }>;
6
-
7
- declare const igboLocale: Required<{
8
- [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
9
- }>;
10
-
11
- declare const hausaLocale: Required<{
12
- [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
13
- }>;
14
-
15
- declare const pidginLocale: Required<{
16
- [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
17
- }>;
18
-
19
- /**
20
- * Deep merges a partial locale with the default English locale.
21
- * Any missing keys fall back to English.
22
- */
23
- declare function mergeLocale(partial?: NDPRLocale): typeof defaultLocale;
24
-
25
- export { hausaLocale as h, igboLocale as i, mergeLocale as m, pidginLocale as p, yorubaLocale as y };
@@ -1,174 +0,0 @@
1
- import { O as OrganizationInfo } from './privacy-Ca6te9Ir.mjs';
2
-
3
- /**
4
- * Policy engine types for the adaptive privacy policy generator.
5
- * These types power the wizard-driven policy builder, compliance checker,
6
- * and export functionality — all aligned with the NDPA 2023.
7
- */
8
-
9
- /** Industry verticals with sector-specific compliance requirements. */
10
- type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' | 'education' | 'government' | 'other';
11
- /** Organisation size tiers — affects complexity of generated language. */
12
- type OrgSize = 'startup' | 'midsize' | 'enterprise';
13
- /** Lawful processing purposes recognised under the NDPA. */
14
- type ProcessingPurpose = 'service_delivery' | 'marketing' | 'analytics' | 'research' | 'legal_compliance' | 'fraud_prevention';
15
- /** A logical category of personal data the organisation may collect. */
16
- interface DataCategory {
17
- /** Machine-readable identifier. */
18
- id: string;
19
- /** Human-readable label shown in the wizard. */
20
- label: string;
21
- /** Grouping for display and compliance checks. */
22
- group: 'identity' | 'financial' | 'behavioral' | 'sensitive' | 'children';
23
- /** Specific data points within this category. */
24
- dataPoints: string[];
25
- /** Whether this category is currently selected by the user. */
26
- selected: boolean;
27
- }
28
- /** A third-party entity that processes data on behalf of the organisation. */
29
- interface ThirdPartyProcessor {
30
- /** Name of the third party. */
31
- name: string;
32
- /** Purpose of sharing data with this processor. */
33
- purpose: string;
34
- /** Country where the processor is located. */
35
- country: string;
36
- }
37
- /** Full context used to generate an adaptive privacy policy. */
38
- interface TemplateContext {
39
- /** Organisation details, extended with industry and size. */
40
- org: OrganizationInfo & {
41
- industry: Industry;
42
- orgSize: OrgSize;
43
- country: string;
44
- };
45
- /** Data categories the organisation collects. */
46
- dataCategories: DataCategory[];
47
- /** Processing purposes relevant to the organisation. */
48
- purposes: ProcessingPurpose[];
49
- /** Whether the organisation processes children's data. */
50
- hasChildrenData: boolean;
51
- /** Whether the organisation processes sensitive/special-category data. */
52
- hasSensitiveData: boolean;
53
- /** Whether the organisation processes financial data. */
54
- hasFinancialData: boolean;
55
- /** Whether data is transferred outside Nigeria. */
56
- hasCrossBorderTransfer: boolean;
57
- /** Whether automated decision-making or profiling is used. */
58
- hasAutomatedDecisions: boolean;
59
- /** Third-party processors that receive personal data. */
60
- thirdPartyProcessors: ThirdPartyProcessor[];
61
- }
62
- /** A user-defined section added to the policy outside the generated ones. */
63
- interface CustomSection {
64
- id: string;
65
- title: string;
66
- content: string;
67
- order: number;
68
- required: false;
69
- }
70
- /** Represents an in-progress policy being built in the wizard. */
71
- interface PolicyDraft {
72
- /** Unique identifier for the draft. */
73
- id: string;
74
- /** The template context driving section generation. */
75
- templateContext: TemplateContext;
76
- /** Custom sections added by the user. */
77
- customSections: CustomSection[];
78
- /** Per-section content overrides keyed by section id. */
79
- sectionOverrides: Record<string, string>;
80
- /** Ordered list of section ids defining the final order. */
81
- sectionOrder: string[];
82
- /** Current wizard step (0-indexed). */
83
- currentStep: number;
84
- /** Timestamp of the last save. */
85
- lastSavedAt: number;
86
- /** The draft is always in "draft" status until finalised. */
87
- status: 'draft';
88
- }
89
- /** A single gap found during NDPA compliance evaluation. */
90
- interface ComplianceGap {
91
- /** Machine-readable requirement identifier. */
92
- requirementId: string;
93
- /** Human-readable name of the requirement. */
94
- requirement: string;
95
- /** Reference to the relevant NDPA section. */
96
- ndpaSection: string;
97
- /** How severe the gap is. */
98
- severity: 'critical' | 'important' | 'recommended';
99
- /** Explanation of what is missing. */
100
- message: string;
101
- /** Suggested fix type for the UI. */
102
- fixType: 'add_section' | 'add_content' | 'fill_field';
103
- /** Label for the fix action button. */
104
- fixLabel: string;
105
- /** Pre-written content the user can insert to close the gap. */
106
- suggestedContent?: string;
107
- }
108
- /** Result of evaluating a policy against NDPA requirements. */
109
- interface ComplianceResult {
110
- /** Points earned. */
111
- score: number;
112
- /** Maximum achievable points (115). */
113
- maxScore: number;
114
- /** Percentage score (0-100). */
115
- percentage: number;
116
- /** Overall compliance rating. */
117
- rating: 'compliant' | 'nearly_compliant' | 'not_compliant';
118
- /** List of identified compliance gaps. */
119
- gaps: ComplianceGap[];
120
- /** List of requirement ids that passed. */
121
- passed: string[];
122
- }
123
- /** Options for PDF export of the finalised policy. */
124
- interface PDFExportOptions {
125
- includeCoverPage?: boolean;
126
- includeTOC?: boolean;
127
- includeComplianceBadge?: boolean;
128
- logoUrl?: string;
129
- filename?: string;
130
- }
131
- /** Options for DOCX export of the finalised policy. */
132
- interface DOCXExportOptions {
133
- includeTOC?: boolean;
134
- filename?: string;
135
- }
136
- /** Options for HTML export of the finalised policy. */
137
- interface HTMLExportOptions {
138
- includeStyles?: boolean;
139
- includePrintCSS?: boolean;
140
- customCSS?: string;
141
- /**
142
- * Theme controlling the embedded design tokens.
143
- *
144
- * - `'light'` (default): emits the light token palette only. No
145
- * `prefers-color-scheme: dark` block is included, so a visitor's OS
146
- * dark-mode setting will NOT recolour the policy. This is the right
147
- * default for an embedded compliance widget — most consumer host sites
148
- * are single-theme and Shadow DOM does not isolate `prefers-color-scheme`.
149
- * - `'dark'`: emits the dark token palette as the primary style.
150
- * - `'auto'`: emits light tokens plus a `@media (prefers-color-scheme: dark)`
151
- * block that swaps to dark on the user's OS preference. Use this when
152
- * your host site genuinely follows OS dark mode and you want the policy
153
- * to match.
154
- *
155
- * Pre-3.4.1 the export effectively behaved like `'auto'` unconditionally,
156
- * which leaked dark colours into light-only host sites via Shadow DOM.
157
- *
158
- * @default 'light'
159
- */
160
- theme?: 'light' | 'dark' | 'auto';
161
- }
162
- /**
163
- * Comprehensive set of 16 data categories spanning identity, financial,
164
- * behavioral, sensitive, and children groups. Used to populate the wizard
165
- * and drive adaptive section generation.
166
- */
167
- declare const DEFAULT_DATA_CATEGORIES: DataCategory[];
168
- /**
169
- * Creates a default TemplateContext with sensible empty/initial values.
170
- * Useful for initialising the wizard state before the user begins editing.
171
- */
172
- declare function createDefaultContext(): TemplateContext;
173
-
174
- export { type ComplianceGap as C, type DataCategory as D, type HTMLExportOptions as H, type Industry as I, type OrgSize as O, type PolicyDraft as P, type TemplateContext as T, type ComplianceResult as a, type CustomSection as b, type ThirdPartyProcessor as c, createDefaultContext as d, DEFAULT_DATA_CATEGORIES as e, type DOCXExportOptions as f, type PDFExportOptions as g, type ProcessingPurpose as h };