@tantainnovative/ndpr-toolkit 3.5.1 → 3.6.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 (199) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/README.md +29 -8
  3. package/dist/adapters.d.mts +137 -3
  4. package/dist/adapters.d.ts +137 -3
  5. package/dist/adapters.js +1 -2
  6. package/dist/adapters.mjs +1 -2
  7. package/dist/breach.d.mts +80 -1
  8. package/dist/breach.d.ts +80 -1
  9. package/dist/breach.js +1 -2
  10. package/dist/breach.mjs +1 -2
  11. package/dist/{chunk-PATONNTZ.mjs → chunk-3HOXQNCH.mjs} +1 -2
  12. package/dist/{chunk-MJGOLP5M.js → chunk-3IA3KDII.js} +1 -2
  13. package/dist/{chunk-M2TPT5GB.js → chunk-3JPDTXGC.js} +1 -2
  14. package/dist/{chunk-BKRETVJ6.js → chunk-3YTAOT5O.js} +1 -2
  15. package/dist/{chunk-GOU6FU6Y.js → chunk-4CVBQC66.js} +1 -2
  16. package/dist/{chunk-E4NCJ7RD.mjs → chunk-4G3SRVRI.mjs} +1 -2
  17. package/dist/{chunk-6QPRDQZF.js → chunk-4QXTB3L6.js} +1 -2
  18. package/dist/{chunk-XNSZ7KUH.js → chunk-5GVMKUMP.js} +1 -2
  19. package/dist/chunk-66NQ5CVY.mjs +1 -0
  20. package/dist/chunk-732C2EVN.js +1 -0
  21. package/dist/chunk-7BJXI2HI.mjs +1 -0
  22. package/dist/{chunk-C5QO3SX4.js → chunk-7IFSWCQP.js} +1 -2
  23. package/dist/{chunk-A4PK7JB2.js → chunk-7ZZO7GVB.js} +1 -2
  24. package/dist/chunk-AME4HJR4.js +1 -0
  25. package/dist/chunk-AOHKVFAS.mjs +322 -0
  26. package/dist/{chunk-HO5M7M4M.js → chunk-B46SJB5V.js} +1 -2
  27. package/dist/chunk-BFAX7JQA.mjs +1 -0
  28. package/dist/{chunk-ID2NYIVE.mjs → chunk-BNHQFZHL.mjs} +2 -3
  29. package/dist/{chunk-RLYTX3MM.js → chunk-BRS52EDT.js} +1 -2
  30. package/dist/{chunk-OPYQIJKY.js → chunk-C7IDR2IV.js} +1 -2
  31. package/dist/{chunk-CISJAQ6W.mjs → chunk-COD3RMTL.mjs} +1 -2
  32. package/dist/chunk-CR2QZTGW.js +1 -0
  33. package/dist/{chunk-6WIP33TW.mjs → chunk-DBZSN4WP.mjs} +1 -2
  34. package/dist/{chunk-74Z23WUA.mjs → chunk-EEQALYOY.mjs} +1 -2
  35. package/dist/chunk-EFIBHKQE.mjs +1 -0
  36. package/dist/{chunk-GKKAK6ES.mjs → chunk-EWVK45Z3.mjs} +1 -2
  37. package/dist/{chunk-QSVVAZVT.mjs → chunk-EXEXUAF6.mjs} +1 -2
  38. package/dist/chunk-EZCGTHQV.js +6 -0
  39. package/dist/{chunk-SYMQJO2W.mjs → chunk-GTYXVAJX.mjs} +2 -3
  40. package/dist/{chunk-6FGCGLH5.mjs → chunk-H3XJV2IR.mjs} +1 -2
  41. package/dist/chunk-HBLGN4SD.js +1 -0
  42. package/dist/{chunk-MCWV7S2G.js → chunk-HHK5LHEG.js} +1 -2
  43. package/dist/{chunk-XHROISIF.mjs → chunk-HWHBINVN.mjs} +1 -2
  44. package/dist/{chunk-3EGQWLJ6.js → chunk-I2LMQWK3.js} +2 -3
  45. package/dist/{chunk-NQNFS3QI.js → chunk-I3Y4LOSL.js} +4 -5
  46. package/dist/chunk-ITCY2Z66.mjs +4 -0
  47. package/dist/{chunk-Z6IIMLZU.mjs → chunk-KDAZQO3N.mjs} +1 -2
  48. package/dist/{chunk-J5WCPZLW.js → chunk-L2BRFMVS.js} +1 -2
  49. package/dist/chunk-L2VO3MEJ.js +1 -0
  50. package/dist/{chunk-R5FW5XUQ.mjs → chunk-LQTARVPU.mjs} +1 -2
  51. package/dist/{chunk-6TA2MVTU.mjs → chunk-LRRENTT5.mjs} +1 -2
  52. package/dist/chunk-LTPSN2SU.mjs +1 -0
  53. package/dist/{chunk-LIM64IV2.js → chunk-LVGT3DLT.js} +2 -3
  54. package/dist/{chunk-TXBZPCGF.mjs → chunk-LWIKDDSU.mjs} +1 -2
  55. package/dist/chunk-MPBPAEZC.mjs +1 -0
  56. package/dist/{chunk-Z73T6MWY.js → chunk-N3MQQUQP.js} +39 -35
  57. package/dist/{chunk-HGGLW5TE.js → chunk-NUWVPRNI.js} +1 -2
  58. package/dist/chunk-O45PKBZA.mjs +6 -0
  59. package/dist/chunk-O6CUBNXK.mjs +3 -0
  60. package/dist/{chunk-7SMLHZ4B.js → chunk-P4LNLCSF.js} +1 -2
  61. package/dist/{chunk-VWPGIES4.mjs → chunk-PCU6GKBE.mjs} +1 -2
  62. package/dist/chunk-PGI2LM6P.js +103 -0
  63. package/dist/{chunk-U62QYKVG.mjs → chunk-PJNKQPQP.mjs} +1 -2
  64. package/dist/chunk-PL4XNCQA.mjs +1 -0
  65. package/dist/{chunk-LSNL4XR5.js → chunk-PZRQWPWD.js} +1 -2
  66. package/dist/chunk-Q64735OC.js +144 -0
  67. package/dist/chunk-QPRYXVH2.js +1 -0
  68. package/dist/{chunk-MQFZHA2D.js → chunk-RFPLZDIO.js} +1 -2
  69. package/dist/chunk-RMQ7OLNY.mjs +144 -0
  70. package/dist/chunk-ROTLSZMV.js +1 -0
  71. package/dist/{chunk-2AW7KAZO.mjs → chunk-RPXRPGHL.mjs} +1 -2
  72. package/dist/chunk-RV2VMWZJ.mjs +1 -0
  73. package/dist/chunk-RXZFYBUJ.js +1 -0
  74. package/dist/chunk-RYREGZVQ.js +1 -0
  75. package/dist/{chunk-B4Z5MBUC.mjs → chunk-RZ6GC6WN.mjs} +1 -2
  76. package/dist/chunk-S6COXIZA.js +2 -0
  77. package/dist/chunk-SFGW37LE.mjs +1 -0
  78. package/dist/{chunk-3NQQSU4P.js → chunk-SJDDNB6M.js} +1 -2
  79. package/dist/chunk-SJRIOZ4K.mjs +1 -0
  80. package/dist/{chunk-H3EYBSVP.mjs → chunk-TMXK4QKK.mjs} +2 -3
  81. package/dist/{chunk-P42Z5CFE.js → chunk-TQZWJGJ2.js} +1 -2
  82. package/dist/{chunk-EPT2K355.mjs → chunk-U5RWJRGA.mjs} +1 -2
  83. package/dist/{chunk-R3OYAJI6.mjs → chunk-UASG46LP.mjs} +1 -2
  84. package/dist/{chunk-RXL6CZAI.js → chunk-UAV7V4EM.js} +1 -2
  85. package/dist/chunk-UI536RU2.js +3 -0
  86. package/dist/{chunk-7AVN424U.js → chunk-UTFBKL73.js} +1 -2
  87. package/dist/{chunk-I54CDQGN.js → chunk-UXUMYP4L.js} +1 -2
  88. package/dist/chunk-V3RYHNHN.js +1 -0
  89. package/dist/{chunk-P3PULLYP.mjs → chunk-V7UFP6QU.mjs} +1 -2
  90. package/dist/{chunk-I4M2AA3N.js → chunk-VJTQXVAF.js} +1 -2
  91. package/dist/{chunk-ELKB2AFZ.js → chunk-VWED6UTN.js} +1 -2
  92. package/dist/{chunk-LU7PKE7Y.mjs → chunk-VYAL2TGT.mjs} +1 -2
  93. package/dist/chunk-W47OSMT6.js +2 -0
  94. package/dist/chunk-W65ZWTLD.mjs +1 -0
  95. package/dist/chunk-W7RBGZCC.js +1 -0
  96. package/dist/{chunk-5HL4UBFV.js → chunk-WDDCKYWA.js} +1 -2
  97. package/dist/{chunk-DJGS7SSN.mjs → chunk-WTGKZX7J.mjs} +1 -2
  98. package/dist/{chunk-TDDAYVKK.js → chunk-WZYCBW2R.js} +1 -2
  99. package/dist/chunk-X3GCGC3H.mjs +103 -0
  100. package/dist/chunk-XJO4DH3L.mjs +2 -0
  101. package/dist/{chunk-LWXZMKC2.js → chunk-XO3VQYTL.js} +7 -8
  102. package/dist/{chunk-IZCWCE7W.mjs → chunk-XOH4WXOZ.mjs} +1 -2
  103. package/dist/{chunk-SHMJNRHO.mjs → chunk-XP5PL6K7.mjs} +1 -2
  104. package/dist/{chunk-CKGJK4D7.mjs → chunk-Y3MKMAFQ.mjs} +2 -3
  105. package/dist/chunk-YFBDJ4FH.js +1 -0
  106. package/dist/chunk-YTU4FNM2.mjs +1 -0
  107. package/dist/{chunk-TV4U6AIS.js → chunk-Z763UI5U.js} +1 -2
  108. package/dist/chunk-ZHFLBL63.mjs +2 -0
  109. package/dist/{chunk-RRVKUCFR.mjs → chunk-ZIZL37BG.mjs} +1 -2
  110. package/dist/{chunk-WWT2ZSNU.mjs → chunk-ZJYULEER.mjs} +1 -2
  111. package/dist/{chunk-LJNNPAFU.mjs → chunk-ZQZJNKVB.mjs} +1 -2
  112. package/dist/chunk-ZVOIR4QH.js +4 -0
  113. package/dist/consent.js +1 -2
  114. package/dist/consent.mjs +1 -2
  115. package/dist/core.d.mts +98 -19
  116. package/dist/core.d.ts +98 -19
  117. package/dist/core.js +1 -2
  118. package/dist/core.mjs +1 -2
  119. package/dist/cross-border.d.mts +36 -14
  120. package/dist/cross-border.d.ts +36 -14
  121. package/dist/cross-border.js +1 -2
  122. package/dist/cross-border.mjs +1 -2
  123. package/dist/dpia.d.mts +4 -4
  124. package/dist/dpia.d.ts +4 -4
  125. package/dist/dpia.js +1 -2
  126. package/dist/dpia.mjs +1 -2
  127. package/dist/dsr.d.mts +30 -17
  128. package/dist/dsr.d.ts +30 -17
  129. package/dist/dsr.js +1 -2
  130. package/dist/dsr.mjs +1 -2
  131. package/dist/hooks.d.mts +113 -20
  132. package/dist/hooks.d.ts +113 -20
  133. package/dist/hooks.js +1 -2
  134. package/dist/hooks.mjs +1 -2
  135. package/dist/index.d.mts +422 -26
  136. package/dist/index.d.ts +422 -26
  137. package/dist/index.js +1 -2
  138. package/dist/index.mjs +1 -2
  139. package/dist/lawful-basis.js +1 -2
  140. package/dist/lawful-basis.mjs +1 -2
  141. package/dist/policy.js +1 -2
  142. package/dist/policy.mjs +1 -2
  143. package/dist/presets-consent.d.mts +139 -0
  144. package/dist/presets-consent.d.ts +139 -0
  145. package/dist/presets-consent.js +2 -0
  146. package/dist/presets-consent.mjs +2 -0
  147. package/dist/presets-dsr.d.mts +133 -0
  148. package/dist/presets-dsr.d.ts +133 -0
  149. package/dist/presets-dsr.js +2 -0
  150. package/dist/presets-dsr.mjs +2 -0
  151. package/dist/presets-policy.d.mts +203 -0
  152. package/dist/presets-policy.d.ts +203 -0
  153. package/dist/presets-policy.js +2 -0
  154. package/dist/presets-policy.mjs +2 -0
  155. package/dist/presets.d.mts +127 -5
  156. package/dist/presets.d.ts +127 -5
  157. package/dist/presets.js +1 -2
  158. package/dist/presets.mjs +1 -2
  159. package/dist/ropa.js +1 -2
  160. package/dist/ropa.mjs +1 -2
  161. package/dist/server.d.mts +226 -22
  162. package/dist/server.d.ts +226 -22
  163. package/dist/server.js +1 -2
  164. package/dist/server.mjs +1 -2
  165. package/dist/styles.css +34 -0
  166. package/dist/unstyled.d.mts +3 -1
  167. package/dist/unstyled.d.ts +3 -1
  168. package/dist/unstyled.js +1 -2
  169. package/dist/unstyled.mjs +1 -2
  170. package/package.json +83 -20
  171. package/dist/chunk-3VQAYQR7.js +0 -7
  172. package/dist/chunk-6HZL2WDU.mjs +0 -2
  173. package/dist/chunk-75TJPK2N.mjs +0 -2
  174. package/dist/chunk-ABDB7LEV.mjs +0 -2
  175. package/dist/chunk-AYKLAEOU.mjs +0 -2
  176. package/dist/chunk-C4YM4UMI.js +0 -2
  177. package/dist/chunk-CKJAECGV.js +0 -2
  178. package/dist/chunk-CPK5D5FY.js +0 -132
  179. package/dist/chunk-CWHBCQGT.mjs +0 -2
  180. package/dist/chunk-E64TU6IU.js +0 -2
  181. package/dist/chunk-F5TXUA4O.mjs +0 -4
  182. package/dist/chunk-GN5C32JB.mjs +0 -2
  183. package/dist/chunk-GRLIPT5V.mjs +0 -132
  184. package/dist/chunk-I557S566.mjs +0 -15
  185. package/dist/chunk-JBSCER34.js +0 -2
  186. package/dist/chunk-JFFOPHU3.mjs +0 -318
  187. package/dist/chunk-KF3EFJEF.mjs +0 -3
  188. package/dist/chunk-ORFC66EA.js +0 -4
  189. package/dist/chunk-RY3PGVLZ.mjs +0 -2
  190. package/dist/chunk-S4GRSNB4.js +0 -2
  191. package/dist/chunk-SCWNM4PC.mjs +0 -2
  192. package/dist/chunk-SKKOMFXH.js +0 -81
  193. package/dist/chunk-TCN22KYP.mjs +0 -7
  194. package/dist/chunk-TUNQUVHU.mjs +0 -81
  195. package/dist/chunk-VIQUXWJC.js +0 -2
  196. package/dist/chunk-WTJGLNTB.js +0 -3
  197. package/dist/chunk-XIM7KMD6.js +0 -2
  198. package/dist/chunk-YPKUHSK4.js +0 -15
  199. package/dist/chunk-ZPKVLTSX.js +0 -2
@@ -0,0 +1,203 @@
1
+ import React__default from 'react';
2
+
3
+ /** A user-defined section added to the policy outside the generated ones. */
4
+ declare interface CustomSection {
5
+ id: string;
6
+ title: string;
7
+ content: string;
8
+ order: number;
9
+ required: false;
10
+ }
11
+
12
+ /** A logical category of personal data the organisation may collect. */
13
+ declare interface DataCategory {
14
+ /** Machine-readable identifier. */
15
+ id: string;
16
+ /** Human-readable label shown in the wizard. */
17
+ label: string;
18
+ /** Grouping for display and compliance checks. */
19
+ group: 'identity' | 'financial' | 'behavioral' | 'sensitive' | 'children';
20
+ /** Specific data points within this category. */
21
+ dataPoints: string[];
22
+ /** Whether this category is currently selected by the user. */
23
+ selected: boolean;
24
+ }
25
+
26
+ /**
27
+ * Policy engine types for the adaptive privacy policy generator.
28
+ * These types power the wizard-driven policy builder, compliance checker,
29
+ * and export functionality — all aligned with the NDPA 2023.
30
+ */
31
+
32
+ /** Industry verticals with sector-specific compliance requirements. */
33
+ declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' | 'education' | 'government' | 'other';
34
+
35
+ export declare const NDPRPrivacyPolicy: React__default.FC<NDPRPrivacyPolicyProps>;
36
+
37
+ export declare interface NDPRPrivacyPolicyProps {
38
+ adapter?: StorageAdapter<PolicyDraft>;
39
+ onComplete?: (policy: PrivacyPolicy) => void;
40
+ classNames?: Record<string, string>;
41
+ unstyled?: boolean;
42
+ }
43
+
44
+ /**
45
+ * Represents organization information for a privacy policy
46
+ */
47
+ declare interface OrganizationInfo {
48
+ /** Name of the organization */
49
+ name: string;
50
+ /** Website URL of the organization */
51
+ website: string;
52
+ /** Contact email for privacy inquiries */
53
+ privacyEmail: string;
54
+ /** Physical address of the organization */
55
+ address?: string;
56
+ /** Phone number for privacy inquiries */
57
+ privacyPhone?: string;
58
+ /** Name of the Data Protection Officer */
59
+ dpoName?: string;
60
+ /** Email of the Data Protection Officer */
61
+ dpoEmail?: string;
62
+ /** Industry or sector of the organization */
63
+ industry?: string;
64
+ /** NDPC registration number (if registered) */
65
+ ndpcRegistrationNumber?: string;
66
+ }
67
+
68
+ /** Organisation size tiers — affects complexity of generated language. */
69
+ declare type OrgSize = 'startup' | 'midsize' | 'enterprise';
70
+
71
+ /** Represents an in-progress policy being built in the wizard. */
72
+ declare interface PolicyDraft {
73
+ /** Unique identifier for the draft. */
74
+ id: string;
75
+ /** The template context driving section generation. */
76
+ templateContext: TemplateContext;
77
+ /** Custom sections added by the user. */
78
+ customSections: CustomSection[];
79
+ /** Per-section content overrides keyed by section id. */
80
+ sectionOverrides: Record<string, string>;
81
+ /** Ordered list of section ids defining the final order. */
82
+ sectionOrder: string[];
83
+ /** Current wizard step (0-indexed). */
84
+ currentStep: number;
85
+ /** Timestamp of the last save. */
86
+ lastSavedAt: number;
87
+ /** The draft is always in "draft" status until finalised. */
88
+ status: 'draft';
89
+ }
90
+
91
+ /**
92
+ * Privacy policy types aligned with NDPA 2023
93
+ * Privacy policies must clearly inform data subjects of their rights under the NDPA
94
+ */
95
+ /**
96
+ * Represents a section in a privacy policy
97
+ */
98
+ declare interface PolicySection {
99
+ /** Unique identifier for the section */
100
+ id: string;
101
+ /** Title of the section */
102
+ title: string;
103
+ /** Description of the section */
104
+ description?: string;
105
+ /** Order of the section in the policy */
106
+ order?: number;
107
+ /** Whether the section is required by NDPA */
108
+ required: boolean;
109
+ /** Template text for the section */
110
+ template: string;
111
+ /**
112
+ * Default content for the section (legacy field)
113
+ * @deprecated Use template instead
114
+ */
115
+ defaultContent?: string;
116
+ /**
117
+ * Custom content for the section (overrides default content)
118
+ * @deprecated Use template instead
119
+ */
120
+ customContent?: string;
121
+ /** Whether the section is included in the policy */
122
+ included: boolean;
123
+ /** Variables that can be used in the section content */
124
+ variables?: string[];
125
+ }
126
+
127
+ /**
128
+ * Represents a generated privacy policy
129
+ */
130
+ declare interface PrivacyPolicy {
131
+ /** Unique identifier for the policy */
132
+ id: string;
133
+ /** Title of the policy */
134
+ title: string;
135
+ /** Template used to generate the policy */
136
+ templateId: string;
137
+ /** Organization information */
138
+ organizationInfo: OrganizationInfo;
139
+ /** Sections of the policy */
140
+ sections: PolicySection[];
141
+ /** Values for the variables used in the policy */
142
+ variableValues: Record<string, string>;
143
+ /** Effective date of the policy */
144
+ effectiveDate: number;
145
+ /** Last updated date of the policy */
146
+ lastUpdated: number;
147
+ /** Version of the policy */
148
+ version: string;
149
+ /**
150
+ * Applicable legal frameworks
151
+ */
152
+ applicableFrameworks?: ('ndpa' | 'ndpr' | 'gdpr' | 'ccpa')[];
153
+ }
154
+
155
+ /** Lawful processing purposes recognised under the NDPA. */
156
+ declare type ProcessingPurpose = 'service_delivery' | 'marketing' | 'analytics' | 'research' | 'legal_compliance' | 'fraud_prevention';
157
+
158
+ declare interface StorageAdapter<T = unknown> {
159
+ /** Load persisted data. Called once on hook mount. */
160
+ load(): T | null | Promise<T | null>;
161
+ /** Persist data. Called on every state change. */
162
+ save(data: T): void | Promise<void>;
163
+ /** Clear persisted data. Called on reset. */
164
+ remove(): void | Promise<void>;
165
+ }
166
+
167
+ /** Full context used to generate an adaptive privacy policy. */
168
+ declare interface TemplateContext {
169
+ /** Organisation details, extended with industry and size. */
170
+ org: OrganizationInfo & {
171
+ industry: Industry;
172
+ orgSize: OrgSize;
173
+ country: string;
174
+ };
175
+ /** Data categories the organisation collects. */
176
+ dataCategories: DataCategory[];
177
+ /** Processing purposes relevant to the organisation. */
178
+ purposes: ProcessingPurpose[];
179
+ /** Whether the organisation processes children's data. */
180
+ hasChildrenData: boolean;
181
+ /** Whether the organisation processes sensitive/special-category data. */
182
+ hasSensitiveData: boolean;
183
+ /** Whether the organisation processes financial data. */
184
+ hasFinancialData: boolean;
185
+ /** Whether data is transferred outside Nigeria. */
186
+ hasCrossBorderTransfer: boolean;
187
+ /** Whether automated decision-making or profiling is used. */
188
+ hasAutomatedDecisions: boolean;
189
+ /** Third-party processors that receive personal data. */
190
+ thirdPartyProcessors: ThirdPartyProcessor[];
191
+ }
192
+
193
+ /** A third-party entity that processes data on behalf of the organisation. */
194
+ declare interface ThirdPartyProcessor {
195
+ /** Name of the third party. */
196
+ name: string;
197
+ /** Purpose of sharing data with this processor. */
198
+ purpose: string;
199
+ /** Country where the processor is located. */
200
+ country: string;
201
+ }
202
+
203
+ export { }
@@ -0,0 +1,203 @@
1
+ import React__default from 'react';
2
+
3
+ /** A user-defined section added to the policy outside the generated ones. */
4
+ declare interface CustomSection {
5
+ id: string;
6
+ title: string;
7
+ content: string;
8
+ order: number;
9
+ required: false;
10
+ }
11
+
12
+ /** A logical category of personal data the organisation may collect. */
13
+ declare interface DataCategory {
14
+ /** Machine-readable identifier. */
15
+ id: string;
16
+ /** Human-readable label shown in the wizard. */
17
+ label: string;
18
+ /** Grouping for display and compliance checks. */
19
+ group: 'identity' | 'financial' | 'behavioral' | 'sensitive' | 'children';
20
+ /** Specific data points within this category. */
21
+ dataPoints: string[];
22
+ /** Whether this category is currently selected by the user. */
23
+ selected: boolean;
24
+ }
25
+
26
+ /**
27
+ * Policy engine types for the adaptive privacy policy generator.
28
+ * These types power the wizard-driven policy builder, compliance checker,
29
+ * and export functionality — all aligned with the NDPA 2023.
30
+ */
31
+
32
+ /** Industry verticals with sector-specific compliance requirements. */
33
+ declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' | 'education' | 'government' | 'other';
34
+
35
+ export declare const NDPRPrivacyPolicy: React__default.FC<NDPRPrivacyPolicyProps>;
36
+
37
+ export declare interface NDPRPrivacyPolicyProps {
38
+ adapter?: StorageAdapter<PolicyDraft>;
39
+ onComplete?: (policy: PrivacyPolicy) => void;
40
+ classNames?: Record<string, string>;
41
+ unstyled?: boolean;
42
+ }
43
+
44
+ /**
45
+ * Represents organization information for a privacy policy
46
+ */
47
+ declare interface OrganizationInfo {
48
+ /** Name of the organization */
49
+ name: string;
50
+ /** Website URL of the organization */
51
+ website: string;
52
+ /** Contact email for privacy inquiries */
53
+ privacyEmail: string;
54
+ /** Physical address of the organization */
55
+ address?: string;
56
+ /** Phone number for privacy inquiries */
57
+ privacyPhone?: string;
58
+ /** Name of the Data Protection Officer */
59
+ dpoName?: string;
60
+ /** Email of the Data Protection Officer */
61
+ dpoEmail?: string;
62
+ /** Industry or sector of the organization */
63
+ industry?: string;
64
+ /** NDPC registration number (if registered) */
65
+ ndpcRegistrationNumber?: string;
66
+ }
67
+
68
+ /** Organisation size tiers — affects complexity of generated language. */
69
+ declare type OrgSize = 'startup' | 'midsize' | 'enterprise';
70
+
71
+ /** Represents an in-progress policy being built in the wizard. */
72
+ declare interface PolicyDraft {
73
+ /** Unique identifier for the draft. */
74
+ id: string;
75
+ /** The template context driving section generation. */
76
+ templateContext: TemplateContext;
77
+ /** Custom sections added by the user. */
78
+ customSections: CustomSection[];
79
+ /** Per-section content overrides keyed by section id. */
80
+ sectionOverrides: Record<string, string>;
81
+ /** Ordered list of section ids defining the final order. */
82
+ sectionOrder: string[];
83
+ /** Current wizard step (0-indexed). */
84
+ currentStep: number;
85
+ /** Timestamp of the last save. */
86
+ lastSavedAt: number;
87
+ /** The draft is always in "draft" status until finalised. */
88
+ status: 'draft';
89
+ }
90
+
91
+ /**
92
+ * Privacy policy types aligned with NDPA 2023
93
+ * Privacy policies must clearly inform data subjects of their rights under the NDPA
94
+ */
95
+ /**
96
+ * Represents a section in a privacy policy
97
+ */
98
+ declare interface PolicySection {
99
+ /** Unique identifier for the section */
100
+ id: string;
101
+ /** Title of the section */
102
+ title: string;
103
+ /** Description of the section */
104
+ description?: string;
105
+ /** Order of the section in the policy */
106
+ order?: number;
107
+ /** Whether the section is required by NDPA */
108
+ required: boolean;
109
+ /** Template text for the section */
110
+ template: string;
111
+ /**
112
+ * Default content for the section (legacy field)
113
+ * @deprecated Use template instead
114
+ */
115
+ defaultContent?: string;
116
+ /**
117
+ * Custom content for the section (overrides default content)
118
+ * @deprecated Use template instead
119
+ */
120
+ customContent?: string;
121
+ /** Whether the section is included in the policy */
122
+ included: boolean;
123
+ /** Variables that can be used in the section content */
124
+ variables?: string[];
125
+ }
126
+
127
+ /**
128
+ * Represents a generated privacy policy
129
+ */
130
+ declare interface PrivacyPolicy {
131
+ /** Unique identifier for the policy */
132
+ id: string;
133
+ /** Title of the policy */
134
+ title: string;
135
+ /** Template used to generate the policy */
136
+ templateId: string;
137
+ /** Organization information */
138
+ organizationInfo: OrganizationInfo;
139
+ /** Sections of the policy */
140
+ sections: PolicySection[];
141
+ /** Values for the variables used in the policy */
142
+ variableValues: Record<string, string>;
143
+ /** Effective date of the policy */
144
+ effectiveDate: number;
145
+ /** Last updated date of the policy */
146
+ lastUpdated: number;
147
+ /** Version of the policy */
148
+ version: string;
149
+ /**
150
+ * Applicable legal frameworks
151
+ */
152
+ applicableFrameworks?: ('ndpa' | 'ndpr' | 'gdpr' | 'ccpa')[];
153
+ }
154
+
155
+ /** Lawful processing purposes recognised under the NDPA. */
156
+ declare type ProcessingPurpose = 'service_delivery' | 'marketing' | 'analytics' | 'research' | 'legal_compliance' | 'fraud_prevention';
157
+
158
+ declare interface StorageAdapter<T = unknown> {
159
+ /** Load persisted data. Called once on hook mount. */
160
+ load(): T | null | Promise<T | null>;
161
+ /** Persist data. Called on every state change. */
162
+ save(data: T): void | Promise<void>;
163
+ /** Clear persisted data. Called on reset. */
164
+ remove(): void | Promise<void>;
165
+ }
166
+
167
+ /** Full context used to generate an adaptive privacy policy. */
168
+ declare interface TemplateContext {
169
+ /** Organisation details, extended with industry and size. */
170
+ org: OrganizationInfo & {
171
+ industry: Industry;
172
+ orgSize: OrgSize;
173
+ country: string;
174
+ };
175
+ /** Data categories the organisation collects. */
176
+ dataCategories: DataCategory[];
177
+ /** Processing purposes relevant to the organisation. */
178
+ purposes: ProcessingPurpose[];
179
+ /** Whether the organisation processes children's data. */
180
+ hasChildrenData: boolean;
181
+ /** Whether the organisation processes sensitive/special-category data. */
182
+ hasSensitiveData: boolean;
183
+ /** Whether the organisation processes financial data. */
184
+ hasFinancialData: boolean;
185
+ /** Whether data is transferred outside Nigeria. */
186
+ hasCrossBorderTransfer: boolean;
187
+ /** Whether automated decision-making or profiling is used. */
188
+ hasAutomatedDecisions: boolean;
189
+ /** Third-party processors that receive personal data. */
190
+ thirdPartyProcessors: ThirdPartyProcessor[];
191
+ }
192
+
193
+ /** A third-party entity that processes data on behalf of the organisation. */
194
+ declare interface ThirdPartyProcessor {
195
+ /** Name of the third party. */
196
+ name: string;
197
+ /** Purpose of sharing data with this processor. */
198
+ purpose: string;
199
+ /** Country where the processor is located. */
200
+ country: string;
201
+ }
202
+
203
+ export { }
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ 'use strict';var chunkW7RBGZCC_js=require('./chunk-W7RBGZCC.js');require('./chunk-I2LMQWK3.js'),require('./chunk-UI536RU2.js'),require('./chunk-N3MQQUQP.js'),require('./chunk-Q64735OC.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"NDPRPrivacyPolicy",{enumerable:true,get:function(){return chunkW7RBGZCC_js.a}});
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ export{a as NDPRPrivacyPolicy}from'./chunk-RV2VMWZJ.mjs';import'./chunk-BNHQFZHL.mjs';import'./chunk-O6CUBNXK.mjs';import'./chunk-AOHKVFAS.mjs';import'./chunk-RMQ7OLNY.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
@@ -53,6 +53,44 @@ declare interface BreachFormSubmission {
53
53
  dataTypes: string[];
54
54
  /** Estimated number of affected data subjects */
55
55
  estimatedAffectedSubjects?: number;
56
+ /**
57
+ * Approximate number of personal data RECORDS concerned. Distinct from
58
+ * subject count (one subject may have many records). NDPA Section 40(2).
59
+ */
60
+ approximateRecordCount?: number;
61
+ /**
62
+ * Categories of data subjects affected (e.g. customers, employees, minors).
63
+ * NDPA Section 40(2).
64
+ */
65
+ dataSubjectCategories?: string[];
66
+ /** Whether sensitive personal data (NDPA Section 30) is involved */
67
+ involvesSensitiveData?: boolean;
68
+ /**
69
+ * Likely consequences of the breach for affected data subjects.
70
+ * Required content for the NDPC report and Section 40(3) communications.
71
+ */
72
+ likelyConsequences?: string;
73
+ /**
74
+ * Measures taken or proposed to mitigate adverse effects.
75
+ * NDPA Section 40(3).
76
+ */
77
+ mitigationMeasures?: string;
78
+ /**
79
+ * Data Protection Officer contact details (Section 32(3)(c) — DPO is the
80
+ * named NDPC contact). Falls back to organisation-level DPO if omitted.
81
+ */
82
+ dpoContact?: {
83
+ name: string;
84
+ email: string;
85
+ phone?: string;
86
+ };
87
+ /**
88
+ * Whether this is a phased / interim report submitted under Section 40(2)
89
+ * before complete information is available.
90
+ */
91
+ isPhasedReport?: boolean;
92
+ /** ID of the prior phased report this report supplements, if any. */
93
+ supplementsReportId?: string;
56
94
  /** Current status of the breach */
57
95
  status: 'ongoing' | 'contained' | 'resolved';
58
96
  /** Initial actions taken to address the breach */
@@ -321,6 +359,12 @@ declare interface DataCategory {
321
359
  selected: boolean;
322
360
  }
323
361
 
362
+ /** A map of question IDs to their answer values */
363
+ declare type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
364
+
365
+ /** Possible value types for a DPIA answer */
366
+ declare type DPIAAnswerValue = string | number | boolean | string[];
367
+
324
368
  /**
325
369
  * Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
326
370
  * A DPIA is required when processing is likely to result in high risk to data subjects
@@ -517,6 +561,35 @@ export declare const NDPRComplianceDashboard: React__default.FC<NDPRDashboardPre
517
561
 
518
562
  export declare const NDPRConsent: React__default.FC<NDPRConsentProps>;
519
563
 
564
+ /**
565
+ * UX copy overrides for the NDPRConsent preset. Pass any subset to
566
+ * replace the default text without dropping to the lower-level
567
+ * `<ConsentBanner>` API. Strings you omit fall back to the toolkit
568
+ * defaults (which already cite NDPA Section 26).
569
+ *
570
+ * @example
571
+ * <NDPRConsent copy={{
572
+ * title: 'Cookie preferences',
573
+ * description: 'Acme uses cookies to keep you signed in and improve our store.',
574
+ * acceptAll: 'Allow all',
575
+ * rejectAll: 'Only essentials',
576
+ * }} />
577
+ */
578
+ declare interface NDPRConsentCopy {
579
+ /** Banner heading. Default: "We Value Your Privacy" */
580
+ title?: string;
581
+ /** Body paragraph under the heading. Default cites NDPA Section 26. */
582
+ description?: string;
583
+ /** Primary CTA — accepts all categories. Default: "Accept All" */
584
+ acceptAll?: string;
585
+ /** Secondary CTA — rejects all non-essential categories. Default: "Reject All" */
586
+ rejectAll?: string;
587
+ /** Tertiary CTA — opens the per-category controls. Default: "Customize" */
588
+ customize?: string;
589
+ /** Submit button on the per-category panel. Default: "Save Preferences" */
590
+ save?: string;
591
+ }
592
+
520
593
  export declare interface NDPRConsentProps {
521
594
  extraOptions?: ConsentOption[];
522
595
  options?: ConsentOption[];
@@ -525,6 +598,11 @@ export declare interface NDPRConsentProps {
525
598
  classNames?: ConsentBannerClassNames;
526
599
  unstyled?: boolean;
527
600
  onSave?: (settings: ConsentSettings) => void;
601
+ /**
602
+ * UX copy overrides — see {@link NDPRConsentCopy}. Lets you brand the
603
+ * banner without dropping to the lower-level `<ConsentBanner>` API.
604
+ */
605
+ copy?: NDPRConsentCopy;
528
606
  }
529
607
 
530
608
  export declare const NDPRCrossBorder: React__default.FC<NDPRCrossBorderProps>;
@@ -574,10 +652,10 @@ export declare const NDPRDPIA: React__default.FC<NDPRDPIAProps>;
574
652
 
575
653
  export declare interface NDPRDPIAProps {
576
654
  sections?: DPIASection[];
577
- adapter?: StorageAdapter<Record<string, any>>;
655
+ adapter?: StorageAdapter<DPIAAnswerMap>;
578
656
  classNames?: DPIAQuestionnaireClassNames;
579
657
  unstyled?: boolean;
580
- onComplete?: (answers: Record<string, any>) => void;
658
+ onComplete?: (answers: DPIAAnswerMap) => void;
581
659
  }
582
660
 
583
661
  export declare const NDPRLawfulBasis: React__default.FC<NDPRLawfulBasisProps>;
@@ -615,6 +693,45 @@ export declare interface NDPRSubjectRightsProps {
615
693
  classNames?: DSRRequestFormClassNames;
616
694
  unstyled?: boolean;
617
695
  onSubmit?: (data: DSRFormSubmission) => void;
696
+ /**
697
+ * Public-form mode. Use when the form should submit to your existing
698
+ * backend workflow instead of being state-managed by an adapter.
699
+ *
700
+ * When `submitTo` is set:
701
+ * - the form does NOT require an `adapter`
702
+ * - on submit, the toolkit POSTs the JSON-serialised `DSRFormSubmission`
703
+ * to this URL (with `Content-Type: application/json`)
704
+ * - your `onSubmit` callback still fires (after the POST resolves)
705
+ * - submit failures are surfaced via `onSubmitError`
706
+ *
707
+ * For more control over headers, credentials, or retry behaviour, build
708
+ * an `apiAdapter` (which now supports CSRF, retry, and error hooks in
709
+ * 3.6.0) and pass that as `adapter` instead. `submitTo` is the
710
+ * fire-and-forget shortcut for public forms.
711
+ *
712
+ * @example
713
+ * <NDPRSubjectRights submitTo="/api/dsr" />
714
+ */
715
+ submitTo?: string;
716
+ /**
717
+ * Fetch options for the `submitTo` POST. Useful for adding `credentials`
718
+ * (cookies/auth), `X-CSRF-Token`, or any other header your backend
719
+ * requires. Ignored unless `submitTo` is set.
720
+ *
721
+ * @default { credentials: 'same-origin' }
722
+ */
723
+ submitOptions?: {
724
+ headers?: Record<string, string> | (() => Record<string, string>);
725
+ credentials?: RequestCredentials;
726
+ };
727
+ /**
728
+ * Called when a `submitTo` POST fails (network error or non-2xx
729
+ * response). Receives the underlying error or Response.
730
+ */
731
+ onSubmitError?: (ctx: {
732
+ error?: unknown;
733
+ response?: Response;
734
+ }) => void;
618
735
  }
619
736
 
620
737
  /**
@@ -913,7 +1030,9 @@ declare interface RequestType {
913
1030
  /** Description of what this request type entails */
914
1031
  description: string;
915
1032
  /**
916
- * NDPA section reference (e.g., "Section 30" for access requests)
1033
+ * NDPA 2023 section reference for this right
1034
+ * (e.g., "Section 34(1)(a)" for access, "Section 38" for portability).
1035
+ * Used for display purposes only — verify the exact subsection with counsel.
917
1036
  */
918
1037
  ndpaSection?: string;
919
1038
  /**
@@ -1009,8 +1128,11 @@ declare interface ThirdPartyProcessor {
1009
1128
  }
1010
1129
 
1011
1130
  /**
1012
- * Cross-Border Data Transfer types aligned with NDPA 2023 Part VI (Sections 41-45)
1013
- * Personal data may only be transferred outside Nigeria under specific conditions
1131
+ * Cross-Border Data Transfer types aligned with NDPA 2023 Part VIII (Sections 41-43).
1132
+ * Personal data may only be transferred outside Nigeria under the bases listed in
1133
+ * Section 41(1), where Section 42 defines adequacy and Section 43 lists derogations.
1134
+ *
1135
+ * Note: These are guidance labels — not legal advice. Verify with your DPO or counsel.
1014
1136
  */
1015
1137
  /**
1016
1138
  * Transfer mechanisms recognized under the NDPA