@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,99 +0,0 @@
1
- /**
2
- * Consent types aligned with NDPA 2023 Section 25-26
3
- * Consent must be freely given, specific, informed, and unambiguous
4
- */
5
- /**
6
- * Represents a consent option that can be presented to users
7
- */
8
- interface ConsentOption {
9
- /** Unique identifier for the consent option */
10
- id: string;
11
- /** Display label for the consent option */
12
- label: string;
13
- /** Detailed description of what this consent option covers */
14
- description: string;
15
- /** Whether this consent option is required (cannot be declined) */
16
- required: boolean;
17
- /**
18
- * The specific purpose for which data will be processed
19
- * NDPA Section 25(2) requires consent to be specific to each purpose
20
- */
21
- purpose: string;
22
- /**
23
- * Default state of the consent option
24
- * @default false
25
- */
26
- defaultValue?: boolean;
27
- /**
28
- * Categories of personal data covered by this consent option
29
- */
30
- dataCategories?: string[];
31
- }
32
- /**
33
- * Represents the user's consent settings
34
- */
35
- interface ConsentSettings {
36
- /** Map of consent option IDs to boolean values indicating consent status */
37
- consents: Record<string, boolean>;
38
- /** Timestamp when consent was last updated */
39
- timestamp: number;
40
- /** Version of the consent form that was accepted */
41
- version: string;
42
- /** Method used to collect consent (e.g., "banner", "settings", "api") */
43
- method: string;
44
- /** Whether the user has actively made a choice (as opposed to default settings) */
45
- hasInteracted: boolean;
46
- /**
47
- * The lawful basis under which processing is conducted
48
- * Required by NDPA Section 25(1)
49
- */
50
- lawfulBasis?: LawfulBasisType;
51
- }
52
- /**
53
- * Lawful basis for processing personal data per NDPA Section 25(1)
54
- */
55
- type LawfulBasisType = 'consent' | 'contract' | 'legal_obligation' | 'vital_interests' | 'public_interest' | 'legitimate_interests';
56
- /**
57
- * Represents the storage mechanism for consent settings
58
- */
59
- interface ConsentStorageOptions {
60
- /**
61
- * Storage key for consent settings
62
- * @default "ndpr_consent"
63
- */
64
- storageKey?: string;
65
- /**
66
- * Storage type to use
67
- * @default "localStorage"
68
- */
69
- storageType?: 'localStorage' | 'sessionStorage' | 'cookie';
70
- /**
71
- * Cookie options (only used when storageType is "cookie")
72
- */
73
- cookieOptions?: {
74
- /** Domain for the cookie */
75
- domain?: string;
76
- /**
77
- * Path for the cookie
78
- * @default "/"
79
- */
80
- path?: string;
81
- /**
82
- * Expiration days for the cookie
83
- * @default 365
84
- */
85
- expires?: number;
86
- /**
87
- * Whether the cookie should be secure
88
- * @default true
89
- */
90
- secure?: boolean;
91
- /**
92
- * SameSite attribute for the cookie
93
- * @default "Lax"
94
- */
95
- sameSite?: 'Strict' | 'Lax' | 'None';
96
- };
97
- }
98
-
99
- export type { ConsentOption as C, LawfulBasisType as L, ConsentSettings as a, ConsentStorageOptions as b };
@@ -1,65 +0,0 @@
1
- import { a as ConsentSettings, C as ConsentOption } from './consent-CmVzqZUk.mjs';
2
-
3
- /**
4
- * Validates consent settings to ensure they meet NDPA requirements
5
- * @param settings The consent settings to validate
6
- * @returns An object containing validation result and any error messages
7
- */
8
- declare function validateConsent(settings: ConsentSettings): {
9
- valid: boolean;
10
- errors: string[];
11
- };
12
- /**
13
- * Validates that consent options meet NDPA Section 26 requirements.
14
- * Each consent option must specify a purpose for which data will be processed,
15
- * as consent must be specific and informed per the Nigeria Data Protection Act.
16
- * @param options The consent options to validate
17
- * @returns An object containing validation result and any error messages
18
- */
19
- declare function validateConsentOptions(options: ConsentOption[]): {
20
- valid: boolean;
21
- errors: string[];
22
- };
23
-
24
- /**
25
- * Represents a single entry in the consent audit trail.
26
- * Each entry captures what happened, when, and the full consent state
27
- * at that point in time, satisfying NDPA recordkeeping requirements.
28
- */
29
- interface ConsentAuditEntry {
30
- /** The type of consent action that occurred */
31
- action: 'consent_given' | 'consent_withdrawn' | 'consent_updated' | 'consent_expired';
32
- /** Unix timestamp (ms) when the action occurred */
33
- timestamp: number;
34
- /** Version of the consent form at the time of the action */
35
- version: string;
36
- /** Full snapshot of consent category states */
37
- categories: Record<string, boolean>;
38
- /** How consent was collected (e.g. "banner", "customize", "api") */
39
- method: string;
40
- /** Browser user-agent string for forensic traceability */
41
- userAgent?: string;
42
- }
43
- /**
44
- * Creates a new audit entry from consent settings. If `previousSettings` is
45
- * provided, the action is automatically determined by comparing old and new
46
- * states. Otherwise `action` defaults to `'consent_given'`.
47
- */
48
- declare function createAuditEntry(settings: ConsentSettings, previousSettings?: ConsentSettings | null, actionOverride?: ConsentAuditEntry['action']): ConsentAuditEntry;
49
- /**
50
- * Retrieves the full consent audit log from localStorage.
51
- * Returns an empty array if no log exists or parsing fails.
52
- *
53
- * @param storageKey - Base storage key (the audit key is derived as `${storageKey}_audit`)
54
- */
55
- declare function getAuditLog(storageKey?: string): ConsentAuditEntry[];
56
- /**
57
- * Appends a single audit entry to the consent audit log in localStorage.
58
- * The log is append-only; existing entries are never modified.
59
- *
60
- * @param entry - The audit entry to append
61
- * @param storageKey - Base storage key (the audit key is derived as `${storageKey}_audit`)
62
- */
63
- declare function appendAuditEntry(entry: ConsentAuditEntry, storageKey?: string): void;
64
-
65
- export { type ConsentAuditEntry as C, appendAuditEntry as a, validateConsentOptions as b, createAuditEntry as c, getAuditLog as g, validateConsent as v };
@@ -1,65 +0,0 @@
1
- import { a as ConsentSettings, C as ConsentOption } from './consent-CmVzqZUk.js';
2
-
3
- /**
4
- * Validates consent settings to ensure they meet NDPA requirements
5
- * @param settings The consent settings to validate
6
- * @returns An object containing validation result and any error messages
7
- */
8
- declare function validateConsent(settings: ConsentSettings): {
9
- valid: boolean;
10
- errors: string[];
11
- };
12
- /**
13
- * Validates that consent options meet NDPA Section 26 requirements.
14
- * Each consent option must specify a purpose for which data will be processed,
15
- * as consent must be specific and informed per the Nigeria Data Protection Act.
16
- * @param options The consent options to validate
17
- * @returns An object containing validation result and any error messages
18
- */
19
- declare function validateConsentOptions(options: ConsentOption[]): {
20
- valid: boolean;
21
- errors: string[];
22
- };
23
-
24
- /**
25
- * Represents a single entry in the consent audit trail.
26
- * Each entry captures what happened, when, and the full consent state
27
- * at that point in time, satisfying NDPA recordkeeping requirements.
28
- */
29
- interface ConsentAuditEntry {
30
- /** The type of consent action that occurred */
31
- action: 'consent_given' | 'consent_withdrawn' | 'consent_updated' | 'consent_expired';
32
- /** Unix timestamp (ms) when the action occurred */
33
- timestamp: number;
34
- /** Version of the consent form at the time of the action */
35
- version: string;
36
- /** Full snapshot of consent category states */
37
- categories: Record<string, boolean>;
38
- /** How consent was collected (e.g. "banner", "customize", "api") */
39
- method: string;
40
- /** Browser user-agent string for forensic traceability */
41
- userAgent?: string;
42
- }
43
- /**
44
- * Creates a new audit entry from consent settings. If `previousSettings` is
45
- * provided, the action is automatically determined by comparing old and new
46
- * states. Otherwise `action` defaults to `'consent_given'`.
47
- */
48
- declare function createAuditEntry(settings: ConsentSettings, previousSettings?: ConsentSettings | null, actionOverride?: ConsentAuditEntry['action']): ConsentAuditEntry;
49
- /**
50
- * Retrieves the full consent audit log from localStorage.
51
- * Returns an empty array if no log exists or parsing fails.
52
- *
53
- * @param storageKey - Base storage key (the audit key is derived as `${storageKey}_audit`)
54
- */
55
- declare function getAuditLog(storageKey?: string): ConsentAuditEntry[];
56
- /**
57
- * Appends a single audit entry to the consent audit log in localStorage.
58
- * The log is append-only; existing entries are never modified.
59
- *
60
- * @param entry - The audit entry to append
61
- * @param storageKey - Base storage key (the audit key is derived as `${storageKey}_audit`)
62
- */
63
- declare function appendAuditEntry(entry: ConsentAuditEntry, storageKey?: string): void;
64
-
65
- export { type ConsentAuditEntry as C, appendAuditEntry as a, validateConsentOptions as b, createAuditEntry as c, getAuditLog as g, validateConsent as v };
@@ -1,54 +0,0 @@
1
- import { a as CrossBorderTransfer, b as TransferMechanism } from './cross-border-UyT00llA.mjs';
2
-
3
- /**
4
- * Validation result for a cross-border transfer
5
- */
6
- interface TransferValidationResult {
7
- isValid: boolean;
8
- errors: string[];
9
- warnings: string[];
10
- }
11
- /**
12
- * Risk assessment result for a cross-border transfer
13
- */
14
- interface TransferRiskResult {
15
- riskLevel: 'low' | 'medium' | 'high';
16
- riskScore: number;
17
- factors: string[];
18
- recommendations: string[];
19
- }
20
- /**
21
- * Returns whether NDPC approval is required for a given transfer mechanism.
22
- * Approval is required for standard contractual clauses (Section 42),
23
- * binding corporate rules (Section 43), and specific NDPC authorization (Section 44).
24
- *
25
- * @param mechanism The transfer mechanism
26
- * @returns Whether NDPC approval is required
27
- */
28
- declare function isNDPCApprovalRequired(mechanism: TransferMechanism): boolean;
29
- /**
30
- * Returns a human-readable description of a transfer mechanism with its NDPA section reference.
31
- *
32
- * @param mechanism The transfer mechanism
33
- * @returns Description including the relevant NDPA section
34
- */
35
- declare function getTransferMechanismDescription(mechanism: TransferMechanism): string;
36
- /**
37
- * Validates a cross-border transfer record for completeness and compliance.
38
- * Checks required fields, verifies that NDPC approval is documented when required,
39
- * and ensures safeguards are in place.
40
- *
41
- * @param transfer The cross-border transfer to validate
42
- * @returns Validation result with errors and warnings
43
- */
44
- declare function validateTransfer(transfer: CrossBorderTransfer): TransferValidationResult;
45
- /**
46
- * Performs a basic risk assessment of a cross-border transfer based on adequacy status,
47
- * transfer mechanism, and data sensitivity.
48
- *
49
- * @param transfer The cross-border transfer to assess
50
- * @returns Risk assessment result with score, factors, and recommendations
51
- */
52
- declare function assessTransferRisk(transfer: CrossBorderTransfer): TransferRiskResult;
53
-
54
- export { type TransferRiskResult as T, type TransferValidationResult as a, assessTransferRisk as b, getTransferMechanismDescription as g, isNDPCApprovalRequired as i, validateTransfer as v };
@@ -1,54 +0,0 @@
1
- import { a as CrossBorderTransfer, b as TransferMechanism } from './cross-border-UyT00llA.js';
2
-
3
- /**
4
- * Validation result for a cross-border transfer
5
- */
6
- interface TransferValidationResult {
7
- isValid: boolean;
8
- errors: string[];
9
- warnings: string[];
10
- }
11
- /**
12
- * Risk assessment result for a cross-border transfer
13
- */
14
- interface TransferRiskResult {
15
- riskLevel: 'low' | 'medium' | 'high';
16
- riskScore: number;
17
- factors: string[];
18
- recommendations: string[];
19
- }
20
- /**
21
- * Returns whether NDPC approval is required for a given transfer mechanism.
22
- * Approval is required for standard contractual clauses (Section 42),
23
- * binding corporate rules (Section 43), and specific NDPC authorization (Section 44).
24
- *
25
- * @param mechanism The transfer mechanism
26
- * @returns Whether NDPC approval is required
27
- */
28
- declare function isNDPCApprovalRequired(mechanism: TransferMechanism): boolean;
29
- /**
30
- * Returns a human-readable description of a transfer mechanism with its NDPA section reference.
31
- *
32
- * @param mechanism The transfer mechanism
33
- * @returns Description including the relevant NDPA section
34
- */
35
- declare function getTransferMechanismDescription(mechanism: TransferMechanism): string;
36
- /**
37
- * Validates a cross-border transfer record for completeness and compliance.
38
- * Checks required fields, verifies that NDPC approval is documented when required,
39
- * and ensures safeguards are in place.
40
- *
41
- * @param transfer The cross-border transfer to validate
42
- * @returns Validation result with errors and warnings
43
- */
44
- declare function validateTransfer(transfer: CrossBorderTransfer): TransferValidationResult;
45
- /**
46
- * Performs a basic risk assessment of a cross-border transfer based on adequacy status,
47
- * transfer mechanism, and data sensitivity.
48
- *
49
- * @param transfer The cross-border transfer to assess
50
- * @returns Risk assessment result with score, factors, and recommendations
51
- */
52
- declare function assessTransferRisk(transfer: CrossBorderTransfer): TransferRiskResult;
53
-
54
- export { type TransferRiskResult as T, type TransferValidationResult as a, assessTransferRisk as b, getTransferMechanismDescription as g, isNDPCApprovalRequired as i, validateTransfer as v };
@@ -1,141 +0,0 @@
1
- /**
2
- * Cross-Border Data Transfer types aligned with NDPA 2023 Part VI (Sections 41-45)
3
- * Personal data may only be transferred outside Nigeria under specific conditions
4
- */
5
- /**
6
- * Transfer mechanisms recognized under the NDPA
7
- */
8
- type TransferMechanism = 'adequacy_decision' | 'standard_clauses' | 'binding_corporate_rules' | 'ndpc_authorization' | 'explicit_consent' | 'contract_performance' | 'public_interest' | 'legal_claims' | 'vital_interests';
9
- /**
10
- * Adequacy status of a destination country
11
- */
12
- type AdequacyStatus = 'adequate' | 'inadequate' | 'pending_review' | 'unknown';
13
- /**
14
- * Represents a cross-border data transfer record
15
- */
16
- interface CrossBorderTransfer {
17
- /** Unique identifier */
18
- id: string;
19
- /** Destination country or territory */
20
- destinationCountry: string;
21
- /** ISO country code */
22
- destinationCountryCode?: string;
23
- /** Adequacy status of the destination */
24
- adequacyStatus: AdequacyStatus;
25
- /** The transfer mechanism being relied upon */
26
- transferMechanism: TransferMechanism;
27
- /** Categories of personal data being transferred */
28
- dataCategories: string[];
29
- /** Whether sensitive personal data is included */
30
- includesSensitiveData: boolean;
31
- /** Estimated number of data subjects whose data is transferred */
32
- estimatedDataSubjects?: number;
33
- /** Name of the recipient organization */
34
- recipientOrganization: string;
35
- /** Contact details of the recipient */
36
- recipientContact: {
37
- name: string;
38
- email: string;
39
- phone?: string;
40
- address?: string;
41
- };
42
- /** Purpose of the data transfer */
43
- purpose: string;
44
- /** Safeguards in place to protect the data */
45
- safeguards: string[];
46
- /** Risk assessment summary */
47
- riskAssessment: string;
48
- /** Risk level of the transfer */
49
- riskLevel: 'low' | 'medium' | 'high';
50
- /** NDPC approval details (required for some transfer mechanisms) */
51
- ndpcApproval?: {
52
- required: boolean;
53
- applied: boolean;
54
- approved?: boolean;
55
- referenceNumber?: string;
56
- appliedAt?: number;
57
- approvedAt?: number;
58
- };
59
- /** Whether a Transfer Impact Assessment has been conducted */
60
- tiaCompleted: boolean;
61
- /** Reference to the TIA document */
62
- tiaReference?: string;
63
- /** Frequency of the transfer */
64
- frequency: 'one_time' | 'periodic' | 'continuous';
65
- /** Start date of the transfer */
66
- startDate: number;
67
- /** End date of the transfer (if applicable) */
68
- endDate?: number;
69
- /** Status of the transfer */
70
- status: 'active' | 'suspended' | 'terminated' | 'pending_approval';
71
- /** Timestamp when the record was created */
72
- createdAt: number;
73
- /** Timestamp when the record was last updated */
74
- updatedAt: number;
75
- /** Next review date */
76
- reviewDate?: number;
77
- }
78
- /**
79
- * Transfer Impact Assessment (TIA) for cross-border transfers
80
- */
81
- interface TransferImpactAssessment {
82
- /** Unique identifier */
83
- id: string;
84
- /** ID of the associated cross-border transfer */
85
- transferId: string;
86
- /** Date the assessment was conducted */
87
- assessmentDate: number;
88
- /** Person who conducted the assessment */
89
- assessor: {
90
- name: string;
91
- role: string;
92
- email: string;
93
- };
94
- /** Analysis of the destination country's legal framework */
95
- destinationLegalFramework: string;
96
- /** Whether the destination has data protection legislation */
97
- hasDataProtectionLaw: boolean;
98
- /** Whether the destination has an independent supervisory authority */
99
- hasIndependentAuthority: boolean;
100
- /** Risk of government access to the data */
101
- governmentAccessRisk: 'low' | 'medium' | 'high';
102
- /** Overall assessment of data protection level */
103
- dataProtectionLevel: 'adequate' | 'partially_adequate' | 'inadequate';
104
- /** Supplementary measures to address gaps */
105
- supplementaryMeasures: string[];
106
- /** Technical measures (encryption, pseudonymization, etc.) */
107
- technicalMeasures: string[];
108
- /** Contractual measures */
109
- contractualMeasures: string[];
110
- /** Organizational measures */
111
- organizationalMeasures: string[];
112
- /** Overall conclusion */
113
- conclusion: string;
114
- /** Whether the transfer can proceed based on the assessment */
115
- approved: boolean;
116
- /** Conditions for the transfer (if approved with conditions) */
117
- conditions?: string[];
118
- }
119
- /**
120
- * Summary of cross-border transfer compliance
121
- */
122
- interface CrossBorderSummary {
123
- /** Total number of active transfers */
124
- totalActiveTransfers: number;
125
- /** Breakdown by transfer mechanism */
126
- byMechanism: Record<TransferMechanism, number>;
127
- /** Breakdown by adequacy status */
128
- byAdequacy: Record<AdequacyStatus, number>;
129
- /** Transfers pending NDPC approval */
130
- pendingApproval: CrossBorderTransfer[];
131
- /** Transfers due for review */
132
- dueForReview: CrossBorderTransfer[];
133
- /** Transfers missing TIA */
134
- missingTIA: CrossBorderTransfer[];
135
- /** High-risk transfers */
136
- highRiskTransfers: CrossBorderTransfer[];
137
- /** Last updated timestamp */
138
- lastUpdated: number;
139
- }
140
-
141
- export type { AdequacyStatus as A, CrossBorderSummary as C, TransferImpactAssessment as T, CrossBorderTransfer as a, TransferMechanism as b };
@@ -1,141 +0,0 @@
1
- /**
2
- * Cross-Border Data Transfer types aligned with NDPA 2023 Part VI (Sections 41-45)
3
- * Personal data may only be transferred outside Nigeria under specific conditions
4
- */
5
- /**
6
- * Transfer mechanisms recognized under the NDPA
7
- */
8
- type TransferMechanism = 'adequacy_decision' | 'standard_clauses' | 'binding_corporate_rules' | 'ndpc_authorization' | 'explicit_consent' | 'contract_performance' | 'public_interest' | 'legal_claims' | 'vital_interests';
9
- /**
10
- * Adequacy status of a destination country
11
- */
12
- type AdequacyStatus = 'adequate' | 'inadequate' | 'pending_review' | 'unknown';
13
- /**
14
- * Represents a cross-border data transfer record
15
- */
16
- interface CrossBorderTransfer {
17
- /** Unique identifier */
18
- id: string;
19
- /** Destination country or territory */
20
- destinationCountry: string;
21
- /** ISO country code */
22
- destinationCountryCode?: string;
23
- /** Adequacy status of the destination */
24
- adequacyStatus: AdequacyStatus;
25
- /** The transfer mechanism being relied upon */
26
- transferMechanism: TransferMechanism;
27
- /** Categories of personal data being transferred */
28
- dataCategories: string[];
29
- /** Whether sensitive personal data is included */
30
- includesSensitiveData: boolean;
31
- /** Estimated number of data subjects whose data is transferred */
32
- estimatedDataSubjects?: number;
33
- /** Name of the recipient organization */
34
- recipientOrganization: string;
35
- /** Contact details of the recipient */
36
- recipientContact: {
37
- name: string;
38
- email: string;
39
- phone?: string;
40
- address?: string;
41
- };
42
- /** Purpose of the data transfer */
43
- purpose: string;
44
- /** Safeguards in place to protect the data */
45
- safeguards: string[];
46
- /** Risk assessment summary */
47
- riskAssessment: string;
48
- /** Risk level of the transfer */
49
- riskLevel: 'low' | 'medium' | 'high';
50
- /** NDPC approval details (required for some transfer mechanisms) */
51
- ndpcApproval?: {
52
- required: boolean;
53
- applied: boolean;
54
- approved?: boolean;
55
- referenceNumber?: string;
56
- appliedAt?: number;
57
- approvedAt?: number;
58
- };
59
- /** Whether a Transfer Impact Assessment has been conducted */
60
- tiaCompleted: boolean;
61
- /** Reference to the TIA document */
62
- tiaReference?: string;
63
- /** Frequency of the transfer */
64
- frequency: 'one_time' | 'periodic' | 'continuous';
65
- /** Start date of the transfer */
66
- startDate: number;
67
- /** End date of the transfer (if applicable) */
68
- endDate?: number;
69
- /** Status of the transfer */
70
- status: 'active' | 'suspended' | 'terminated' | 'pending_approval';
71
- /** Timestamp when the record was created */
72
- createdAt: number;
73
- /** Timestamp when the record was last updated */
74
- updatedAt: number;
75
- /** Next review date */
76
- reviewDate?: number;
77
- }
78
- /**
79
- * Transfer Impact Assessment (TIA) for cross-border transfers
80
- */
81
- interface TransferImpactAssessment {
82
- /** Unique identifier */
83
- id: string;
84
- /** ID of the associated cross-border transfer */
85
- transferId: string;
86
- /** Date the assessment was conducted */
87
- assessmentDate: number;
88
- /** Person who conducted the assessment */
89
- assessor: {
90
- name: string;
91
- role: string;
92
- email: string;
93
- };
94
- /** Analysis of the destination country's legal framework */
95
- destinationLegalFramework: string;
96
- /** Whether the destination has data protection legislation */
97
- hasDataProtectionLaw: boolean;
98
- /** Whether the destination has an independent supervisory authority */
99
- hasIndependentAuthority: boolean;
100
- /** Risk of government access to the data */
101
- governmentAccessRisk: 'low' | 'medium' | 'high';
102
- /** Overall assessment of data protection level */
103
- dataProtectionLevel: 'adequate' | 'partially_adequate' | 'inadequate';
104
- /** Supplementary measures to address gaps */
105
- supplementaryMeasures: string[];
106
- /** Technical measures (encryption, pseudonymization, etc.) */
107
- technicalMeasures: string[];
108
- /** Contractual measures */
109
- contractualMeasures: string[];
110
- /** Organizational measures */
111
- organizationalMeasures: string[];
112
- /** Overall conclusion */
113
- conclusion: string;
114
- /** Whether the transfer can proceed based on the assessment */
115
- approved: boolean;
116
- /** Conditions for the transfer (if approved with conditions) */
117
- conditions?: string[];
118
- }
119
- /**
120
- * Summary of cross-border transfer compliance
121
- */
122
- interface CrossBorderSummary {
123
- /** Total number of active transfers */
124
- totalActiveTransfers: number;
125
- /** Breakdown by transfer mechanism */
126
- byMechanism: Record<TransferMechanism, number>;
127
- /** Breakdown by adequacy status */
128
- byAdequacy: Record<AdequacyStatus, number>;
129
- /** Transfers pending NDPC approval */
130
- pendingApproval: CrossBorderTransfer[];
131
- /** Transfers due for review */
132
- dueForReview: CrossBorderTransfer[];
133
- /** Transfers missing TIA */
134
- missingTIA: CrossBorderTransfer[];
135
- /** High-risk transfers */
136
- highRiskTransfers: CrossBorderTransfer[];
137
- /** Last updated timestamp */
138
- lastUpdated: number;
139
- }
140
-
141
- export type { AdequacyStatus as A, CrossBorderSummary as C, TransferImpactAssessment as T, CrossBorderTransfer as a, TransferMechanism as b };
@@ -1,64 +0,0 @@
1
- import { c as PrivacyPolicy } from './privacy-Ca6te9Ir.js';
2
- import { H as HTMLExportOptions, g as PDFExportOptions, f as DOCXExportOptions } from './policy-engine-CCUCud2T.js';
3
-
4
- /**
5
- * Export a PrivacyPolicy as a self-contained HTML string.
6
- *
7
- * The returned string includes:
8
- * - An embedded `<style>` block (responsive, dark/light, print-friendly)
9
- * - An `<article>` wrapper with semantic markup
10
- * - A `<nav>` table of contents with anchor links
11
- * - A `<section>` for every included policy section
12
- * - A metadata footer (org name, effective date, version, generator credit)
13
- * - Optional custom CSS injection via `options.customCSS`
14
- */
15
- declare function exportHTML(policy: PrivacyPolicy, options?: HTMLExportOptions): string;
16
-
17
- /**
18
- * Export a PrivacyPolicy as a clean Markdown string.
19
- *
20
- * Structure:
21
- * ```
22
- * # Policy Title
23
- * _Effective: date | Version: X | Org Name_
24
- *
25
- * ## Table of Contents
26
- * - [Section Title](#anchor)
27
- *
28
- * ## 1. Section Title
29
- * Section content...
30
- * ```
31
- */
32
- declare function exportMarkdown(policy: PrivacyPolicy): string;
33
-
34
- /**
35
- * Export a PrivacyPolicy to a PDF Blob using jspdf (optional peer dependency).
36
- *
37
- * Features:
38
- * - Optional cover page with title, organisation, date, version and compliance badge
39
- * - Optional table of contents page
40
- * - One section per heading, content reflowed to fit the page
41
- * - Automatic page breaks
42
- * - Page header (org name) and footer (page X of Y) on every page
43
- * - PDF metadata (title, author, subject, keywords)
44
- *
45
- * @throws {Error} if the `jspdf` package is not installed
46
- */
47
- declare function exportPDF(policy: PrivacyPolicy, options?: PDFExportOptions): Promise<Blob>;
48
-
49
- /**
50
- * Export a PrivacyPolicy as a Word (.docx) Blob using the `docx` library
51
- * (optional peer dependency).
52
- *
53
- * Features:
54
- * - Title paragraph with large bold text
55
- * - Organisation name + version subtitle
56
- * - Optional table of contents placeholder heading
57
- * - All included policy sections as Heading 1 + body paragraphs / bullet lists
58
- * - Running header (org name) and page-number footer on every page
59
- *
60
- * @throws {Error} if the `docx` package is not installed
61
- */
62
- declare function exportDOCX(policy: PrivacyPolicy, options?: DOCXExportOptions): Promise<Blob>;
63
-
64
- export { exportHTML as a, exportMarkdown as b, exportPDF as c, exportDOCX as e };