@tantainnovative/ndpr-toolkit 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +80 -38
  3. package/dist/adapters.d.mts +34 -25
  4. package/dist/adapters.d.ts +34 -25
  5. package/dist/breach.d.mts +803 -44
  6. package/dist/breach.d.ts +803 -44
  7. package/dist/breach.js +2 -1
  8. package/dist/breach.mjs +2 -1
  9. package/dist/{chunk-2WH4DLV5.js → chunk-3EGQWLJ6.js} +3 -3
  10. package/dist/chunk-B4Z5MBUC.mjs +2 -0
  11. package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
  12. package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
  13. package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
  14. package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
  15. package/dist/{chunk-KSERBMXW.mjs → chunk-F5TXUA4O.mjs} +3 -3
  16. package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
  17. package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
  18. package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
  19. package/dist/{chunk-MG73MOZC.mjs → chunk-I557S566.mjs} +2 -2
  20. package/dist/{chunk-QVULSG6J.mjs → chunk-ID2NYIVE.mjs} +3 -3
  21. package/dist/chunk-J5WCPZLW.js +2 -0
  22. package/dist/{chunk-4R42ZNO7.mjs → chunk-JFFOPHU3.mjs} +57 -57
  23. package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
  24. package/dist/chunk-LU7PKE7Y.mjs +2 -0
  25. package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
  26. package/dist/{chunk-XMBSJJ5U.js → chunk-ORFC66EA.js} +3 -3
  27. package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
  28. package/dist/chunk-SCWNM4PC.mjs +2 -0
  29. package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
  30. package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
  31. package/dist/chunk-TV4U6AIS.js +2 -0
  32. package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
  33. package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
  34. package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
  35. package/dist/{chunk-RNTNHVKZ.js → chunk-YPKUHSK4.js} +2 -2
  36. package/dist/{chunk-UFPSUO52.js → chunk-Z73T6MWY.js} +57 -57
  37. package/dist/consent.d.mts +648 -84
  38. package/dist/consent.d.ts +648 -84
  39. package/dist/consent.js +2 -1
  40. package/dist/consent.mjs +2 -1
  41. package/dist/core.d.mts +2049 -23
  42. package/dist/core.d.ts +2049 -23
  43. package/dist/core.js +1 -1
  44. package/dist/core.mjs +1 -1
  45. package/dist/cross-border.d.mts +470 -99
  46. package/dist/cross-border.d.ts +470 -99
  47. package/dist/cross-border.js +1 -0
  48. package/dist/cross-border.mjs +1 -0
  49. package/dist/dpia.d.mts +591 -37
  50. package/dist/dpia.d.ts +591 -37
  51. package/dist/dpia.js +1 -0
  52. package/dist/dpia.mjs +1 -0
  53. package/dist/dsr.d.mts +654 -37
  54. package/dist/dsr.d.ts +654 -37
  55. package/dist/dsr.js +2 -1
  56. package/dist/dsr.mjs +2 -1
  57. package/dist/hooks.d.mts +2174 -30
  58. package/dist/hooks.d.ts +2174 -30
  59. package/dist/hooks.js +2 -1
  60. package/dist/hooks.mjs +2 -1
  61. package/dist/index.d.mts +4428 -43
  62. package/dist/index.d.ts +4428 -43
  63. package/dist/index.js +2 -1
  64. package/dist/index.mjs +2 -1
  65. package/dist/lawful-basis.d.mts +368 -32
  66. package/dist/lawful-basis.d.ts +368 -32
  67. package/dist/lawful-basis.js +1 -0
  68. package/dist/lawful-basis.mjs +1 -0
  69. package/dist/policy.d.mts +1178 -83
  70. package/dist/policy.d.ts +1178 -83
  71. package/dist/policy.js +2 -1
  72. package/dist/policy.mjs +2 -1
  73. package/dist/presets.d.mts +1020 -114
  74. package/dist/presets.d.ts +1020 -114
  75. package/dist/presets.js +2 -1
  76. package/dist/presets.mjs +2 -1
  77. package/dist/ropa.d.mts +396 -31
  78. package/dist/ropa.d.ts +396 -31
  79. package/dist/ropa.js +2 -1
  80. package/dist/ropa.mjs +2 -1
  81. package/dist/server.d.mts +2133 -24
  82. package/dist/server.d.ts +2133 -24
  83. package/dist/server.js +1 -1
  84. package/dist/server.mjs +1 -1
  85. package/dist/unstyled.d.mts +523 -55
  86. package/dist/unstyled.d.ts +523 -55
  87. package/dist/unstyled.js +2 -1
  88. package/dist/unstyled.mjs +2 -1
  89. package/package.json +3 -3
  90. package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
  91. package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
  92. package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
  93. package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
  94. package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
  95. package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
  96. package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
  97. package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
  98. package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
  99. package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
  100. package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
  101. package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
  102. package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
  103. package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
  104. package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
  105. package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
  106. package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
  107. package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
  108. package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
  109. package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
  110. package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
  111. package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
  112. package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
  113. package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
  114. package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
  115. package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
  116. package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
  117. package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
  118. package/dist/breach-B_-6lDqS.d.mts +0 -17
  119. package/dist/breach-CzXqSsaY.d.ts +0 -17
  120. package/dist/breach-Eu9byel8.d.mts +0 -185
  121. package/dist/breach-Eu9byel8.d.ts +0 -185
  122. package/dist/chunk-5X32J5IA.mjs +0 -2
  123. package/dist/chunk-7D2OIPHH.mjs +0 -2
  124. package/dist/chunk-JKKRPS4P.js +0 -2
  125. package/dist/chunk-NCOZB2WU.mjs +0 -2
  126. package/dist/chunk-RGNP45VR.js +0 -2
  127. package/dist/compliance-score-racQe_E_.d.mts +0 -115
  128. package/dist/compliance-score-racQe_E_.d.ts +0 -115
  129. package/dist/consent-CmVzqZUk.d.mts +0 -99
  130. package/dist/consent-CmVzqZUk.d.ts +0 -99
  131. package/dist/consent-audit-BdByjYlM.d.mts +0 -65
  132. package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
  133. package/dist/cross-border-BBi9rZyO.d.mts +0 -54
  134. package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
  135. package/dist/cross-border-UyT00llA.d.mts +0 -141
  136. package/dist/cross-border-UyT00llA.d.ts +0 -141
  137. package/dist/docx-BxKascXN.d.ts +0 -64
  138. package/dist/docx-CV7Vsry_.d.mts +0 -64
  139. package/dist/dpia-D82hUrJe.d.ts +0 -15
  140. package/dist/dpia-DQDFw2_l.d.mts +0 -15
  141. package/dist/dpia-c9GiiOq0.d.mts +0 -137
  142. package/dist/dpia-c9GiiOq0.d.ts +0 -137
  143. package/dist/dsr-CIx5sd7e.d.ts +0 -14
  144. package/dist/dsr-XZ_HqTlA.d.mts +0 -14
  145. package/dist/dsr-yKbqX531.d.mts +0 -128
  146. package/dist/dsr-yKbqX531.d.ts +0 -128
  147. package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
  148. package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
  149. package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
  150. package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
  151. package/dist/locale-CxJx2tzn.d.mts +0 -25
  152. package/dist/locale-DSkrtf-c.d.ts +0 -25
  153. package/dist/policy-engine-CCUCud2T.d.ts +0 -154
  154. package/dist/policy-engine-fYSqEqSW.d.mts +0 -154
  155. package/dist/policy-sections-BYx6fEFk.d.ts +0 -56
  156. package/dist/policy-sections-Dm97Nq8m.d.mts +0 -56
  157. package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
  158. package/dist/policy-templates-DwYl2329.d.mts +0 -43
  159. package/dist/privacy-Ca6te9Ir.d.mts +0 -138
  160. package/dist/privacy-Ca6te9Ir.d.ts +0 -138
  161. package/dist/ropa-BDTM06tr.d.ts +0 -152
  162. package/dist/ropa-CFHuT7jE.d.mts +0 -152
  163. package/dist/ropa-CyynscU6.d.ts +0 -51
  164. package/dist/ropa-NIgxd8uP.d.mts +0 -51
  165. package/dist/sanitize-CxxwKxAx.d.mts +0 -94
  166. package/dist/sanitize-CxxwKxAx.d.ts +0 -94
  167. package/dist/styling-BMDGQDgS.d.mts +0 -64
  168. package/dist/styling-BaoQtV06.d.ts +0 -64
  169. package/dist/types-DK2CoKOC.d.mts +0 -10
  170. package/dist/types-DK2CoKOC.d.ts +0 -10
  171. package/dist/useAdaptivePolicyWizard-BnjW4OR4.d.mts +0 -52
  172. package/dist/useAdaptivePolicyWizard-sb3m4-Zk.d.ts +0 -52
  173. package/dist/useBreach-CPr86Yan.d.mts +0 -115
  174. package/dist/useBreach-DkVXvtJK.d.ts +0 -115
  175. package/dist/useConsent-DCNkIJHR.d.mts +0 -75
  176. package/dist/useConsent-dOcELSfX.d.ts +0 -75
  177. package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
  178. package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
  179. package/dist/useDPIA-B6180UQn.d.mts +0 -109
  180. package/dist/useDPIA-CTqbNbww.d.ts +0 -109
  181. package/dist/useDSR-WvHk8_iu.d.mts +0 -85
  182. package/dist/useDSR-wH4H6hSM.d.ts +0 -85
  183. package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
  184. package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
  185. package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
  186. package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
  187. package/dist/useROPA-BSSU1rfx.d.ts +0 -76
  188. 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,154 +0,0 @@
1
- import { O as OrganizationInfo } from './privacy-Ca6te9Ir.js';
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
- /**
143
- * Comprehensive set of 16 data categories spanning identity, financial,
144
- * behavioral, sensitive, and children groups. Used to populate the wizard
145
- * and drive adaptive section generation.
146
- */
147
- declare const DEFAULT_DATA_CATEGORIES: DataCategory[];
148
- /**
149
- * Creates a default TemplateContext with sensible empty/initial values.
150
- * Useful for initialising the wizard state before the user begins editing.
151
- */
152
- declare function createDefaultContext(): TemplateContext;
153
-
154
- 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 };