@tantainnovative/ndpr-toolkit 1.0.10 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +293 -136
  3. package/dist/breach-6z0r-KuE.d.mts +17 -0
  4. package/dist/breach-BFfnvtRk.d.ts +17 -0
  5. package/dist/breach-BtFbDOmV.d.mts +185 -0
  6. package/dist/breach-BtFbDOmV.d.ts +185 -0
  7. package/dist/breach.d.mts +275 -0
  8. package/dist/breach.d.ts +275 -0
  9. package/dist/breach.js +2 -0
  10. package/dist/breach.js.map +1 -0
  11. package/dist/breach.mjs +2 -0
  12. package/dist/breach.mjs.map +1 -0
  13. package/dist/chunk-2SYNHRP6.mjs +2 -0
  14. package/dist/chunk-2SYNHRP6.mjs.map +1 -0
  15. package/dist/chunk-2XHD22J7.mjs +7 -0
  16. package/dist/chunk-2XHD22J7.mjs.map +1 -0
  17. package/dist/chunk-3YCV2BA6.js +2 -0
  18. package/dist/chunk-3YCV2BA6.js.map +1 -0
  19. package/dist/chunk-4A354HL3.js +2 -0
  20. package/dist/chunk-4A354HL3.js.map +1 -0
  21. package/dist/chunk-4DKT6IB6.js +94 -0
  22. package/dist/chunk-4DKT6IB6.js.map +1 -0
  23. package/dist/chunk-5ZBO2UPH.js +2 -0
  24. package/dist/chunk-5ZBO2UPH.js.map +1 -0
  25. package/dist/chunk-6GGGTRDZ.mjs +2 -0
  26. package/dist/chunk-6GGGTRDZ.mjs.map +1 -0
  27. package/dist/chunk-6JFTAYXV.mjs +2 -0
  28. package/dist/chunk-6JFTAYXV.mjs.map +1 -0
  29. package/dist/chunk-6JVYYLS7.js +2 -0
  30. package/dist/chunk-6JVYYLS7.js.map +1 -0
  31. package/dist/chunk-6SGG6WPA.mjs +2 -0
  32. package/dist/chunk-6SGG6WPA.mjs.map +1 -0
  33. package/dist/chunk-AQEGDEQM.js +7 -0
  34. package/dist/chunk-AQEGDEQM.js.map +1 -0
  35. package/dist/chunk-C2IJWCZQ.mjs +2 -0
  36. package/dist/chunk-C2IJWCZQ.mjs.map +1 -0
  37. package/dist/chunk-CMZTI7SG.js +2 -0
  38. package/dist/chunk-CMZTI7SG.js.map +1 -0
  39. package/dist/chunk-DB3JH4DS.mjs +2 -0
  40. package/dist/chunk-DB3JH4DS.mjs.map +1 -0
  41. package/dist/chunk-FFW7RUAG.mjs +94 -0
  42. package/dist/chunk-FFW7RUAG.mjs.map +1 -0
  43. package/dist/chunk-FK3CSFLJ.js +2 -0
  44. package/dist/chunk-FK3CSFLJ.js.map +1 -0
  45. package/dist/chunk-GIV2OHE6.mjs +2 -0
  46. package/dist/chunk-GIV2OHE6.mjs.map +1 -0
  47. package/dist/chunk-GMLNWS2N.mjs +2 -0
  48. package/dist/chunk-GMLNWS2N.mjs.map +1 -0
  49. package/dist/chunk-IQF726GS.js +2 -0
  50. package/dist/chunk-IQF726GS.js.map +1 -0
  51. package/dist/chunk-IWUUVRLJ.js +2 -0
  52. package/dist/chunk-IWUUVRLJ.js.map +1 -0
  53. package/dist/chunk-JUN6YPLL.mjs +72 -0
  54. package/dist/chunk-JUN6YPLL.mjs.map +1 -0
  55. package/dist/chunk-L3FKTBGV.js +72 -0
  56. package/dist/chunk-L3FKTBGV.js.map +1 -0
  57. package/dist/chunk-L52PDW6O.mjs +2 -0
  58. package/dist/chunk-L52PDW6O.mjs.map +1 -0
  59. package/dist/chunk-LI6WJ3LZ.js +2 -0
  60. package/dist/chunk-LI6WJ3LZ.js.map +1 -0
  61. package/dist/chunk-LXRXDTPI.js +2 -0
  62. package/dist/chunk-LXRXDTPI.js.map +1 -0
  63. package/dist/chunk-MQFZHA2D.js +2 -0
  64. package/dist/chunk-MQFZHA2D.js.map +1 -0
  65. package/dist/chunk-OITITR6K.mjs +2 -0
  66. package/dist/chunk-OITITR6K.mjs.map +1 -0
  67. package/dist/chunk-PDJGTQMY.mjs +2 -0
  68. package/dist/chunk-PDJGTQMY.mjs.map +1 -0
  69. package/dist/chunk-PGSA2O5P.mjs +2 -0
  70. package/dist/chunk-PGSA2O5P.mjs.map +1 -0
  71. package/dist/chunk-PM7CMTMB.js +4 -0
  72. package/dist/chunk-PM7CMTMB.js.map +1 -0
  73. package/dist/chunk-PYEX7DFR.mjs +4 -0
  74. package/dist/chunk-PYEX7DFR.mjs.map +1 -0
  75. package/dist/chunk-QKK5S54L.mjs +2 -0
  76. package/dist/chunk-QKK5S54L.mjs.map +1 -0
  77. package/dist/chunk-RB26MIRI.js +2 -0
  78. package/dist/chunk-RB26MIRI.js.map +1 -0
  79. package/dist/chunk-RGYK4VAY.mjs +2 -0
  80. package/dist/chunk-RGYK4VAY.mjs.map +1 -0
  81. package/dist/chunk-RHWW5FDP.js +16 -0
  82. package/dist/chunk-RHWW5FDP.js.map +1 -0
  83. package/dist/chunk-RYZEIDNR.js +2 -0
  84. package/dist/chunk-RYZEIDNR.js.map +1 -0
  85. package/dist/chunk-SLNMKGQ2.mjs +2 -0
  86. package/dist/chunk-SLNMKGQ2.mjs.map +1 -0
  87. package/dist/chunk-SSGJREE3.js +2 -0
  88. package/dist/chunk-SSGJREE3.js.map +1 -0
  89. package/dist/chunk-SWF3YVE5.js +4 -0
  90. package/dist/chunk-SWF3YVE5.js.map +1 -0
  91. package/dist/chunk-T44JQT2O.mjs +2 -0
  92. package/dist/chunk-T44JQT2O.mjs.map +1 -0
  93. package/dist/chunk-TDDAYVKK.js +2 -0
  94. package/dist/chunk-TDDAYVKK.js.map +1 -0
  95. package/dist/chunk-TXBZPCGF.mjs +2 -0
  96. package/dist/chunk-TXBZPCGF.mjs.map +1 -0
  97. package/dist/chunk-UUWVBENC.js +2 -0
  98. package/dist/chunk-UUWVBENC.js.map +1 -0
  99. package/dist/chunk-UYP64PV7.mjs +4 -0
  100. package/dist/chunk-UYP64PV7.mjs.map +1 -0
  101. package/dist/chunk-VMJBW3EF.mjs +2 -0
  102. package/dist/chunk-VMJBW3EF.mjs.map +1 -0
  103. package/dist/chunk-WW3X3ELF.js +2 -0
  104. package/dist/chunk-WW3X3ELF.js.map +1 -0
  105. package/dist/chunk-WWT2ZSNU.mjs +2 -0
  106. package/dist/chunk-WWT2ZSNU.mjs.map +1 -0
  107. package/dist/chunk-XMKA6GVK.mjs +16 -0
  108. package/dist/chunk-XMKA6GVK.mjs.map +1 -0
  109. package/dist/chunk-Y34DQYS7.js +2 -0
  110. package/dist/chunk-Y34DQYS7.js.map +1 -0
  111. package/dist/chunk-ZU73VG3X.js +2 -0
  112. package/dist/chunk-ZU73VG3X.js.map +1 -0
  113. package/dist/consent-CmVzqZUk.d.mts +99 -0
  114. package/dist/consent-CmVzqZUk.d.ts +99 -0
  115. package/dist/consent-DCc5zjXI.d.mts +24 -0
  116. package/dist/consent-DLWb5ota.d.ts +24 -0
  117. package/dist/consent.d.mts +197 -0
  118. package/dist/consent.d.ts +197 -0
  119. package/dist/consent.js +2 -0
  120. package/dist/consent.js.map +1 -0
  121. package/dist/consent.mjs +2 -0
  122. package/dist/consent.mjs.map +1 -0
  123. package/dist/core.d.mts +14 -0
  124. package/dist/core.d.ts +14 -0
  125. package/dist/core.js +2 -0
  126. package/dist/core.js.map +1 -0
  127. package/dist/core.mjs +2 -0
  128. package/dist/core.mjs.map +1 -0
  129. package/dist/cross-border-BrIy1ieh.d.mts +192 -0
  130. package/dist/cross-border-BrIy1ieh.d.ts +192 -0
  131. package/dist/cross-border.d.mts +58 -0
  132. package/dist/cross-border.d.ts +58 -0
  133. package/dist/cross-border.js +2 -0
  134. package/dist/cross-border.js.map +1 -0
  135. package/dist/cross-border.mjs +2 -0
  136. package/dist/cross-border.mjs.map +1 -0
  137. package/dist/dpia-B9ZZJG5a.d.mts +15 -0
  138. package/dist/dpia-fdtTd2DI.d.ts +15 -0
  139. package/dist/dpia-vWfE_9bO.d.mts +137 -0
  140. package/dist/dpia-vWfE_9bO.d.ts +137 -0
  141. package/dist/dpia.d.mts +179 -0
  142. package/dist/dpia.d.ts +179 -0
  143. package/dist/dpia.js +2 -0
  144. package/dist/dpia.js.map +1 -0
  145. package/dist/dpia.mjs +2 -0
  146. package/dist/dpia.mjs.map +1 -0
  147. package/dist/dsr-jq5NUEdz.d.ts +14 -0
  148. package/dist/dsr-pQzQ3H1O.d.mts +128 -0
  149. package/dist/dsr-pQzQ3H1O.d.ts +128 -0
  150. package/dist/dsr-whPkiI0_.d.mts +14 -0
  151. package/dist/dsr.d.mts +192 -0
  152. package/dist/dsr.d.ts +192 -0
  153. package/dist/dsr.js +2 -0
  154. package/dist/dsr.js.map +1 -0
  155. package/dist/dsr.mjs +2 -0
  156. package/dist/dsr.mjs.map +1 -0
  157. package/dist/hooks.d.mts +17 -0
  158. package/dist/hooks.d.ts +17 -0
  159. package/dist/hooks.js +2 -0
  160. package/dist/hooks.js.map +1 -0
  161. package/dist/hooks.mjs +2 -0
  162. package/dist/hooks.mjs.map +1 -0
  163. package/dist/index.d.mts +31 -448
  164. package/dist/index.d.ts +31 -448
  165. package/dist/index.js +1 -190
  166. package/dist/index.js.map +1 -1
  167. package/dist/index.mjs +1 -190
  168. package/dist/index.mjs.map +1 -1
  169. package/dist/lawful-basis-CWtvDG1x.d.mts +112 -0
  170. package/dist/lawful-basis-CWtvDG1x.d.ts +112 -0
  171. package/dist/lawful-basis-D-oXFizg.d.mts +57 -0
  172. package/dist/lawful-basis-v04AhbK2.d.ts +57 -0
  173. package/dist/lawful-basis.d.mts +55 -0
  174. package/dist/lawful-basis.d.ts +55 -0
  175. package/dist/lawful-basis.js +2 -0
  176. package/dist/lawful-basis.js.map +1 -0
  177. package/dist/lawful-basis.mjs +2 -0
  178. package/dist/lawful-basis.mjs.map +1 -0
  179. package/dist/policy.d.mts +195 -0
  180. package/dist/policy.d.ts +195 -0
  181. package/dist/policy.js +2 -0
  182. package/dist/policy.js.map +1 -0
  183. package/dist/policy.mjs +2 -0
  184. package/dist/policy.mjs.map +1 -0
  185. package/dist/privacy-9FcJceMr.d.mts +15 -0
  186. package/dist/privacy-BXz7O2ej.d.ts +15 -0
  187. package/dist/privacy-Ca6te9Ir.d.mts +138 -0
  188. package/dist/privacy-Ca6te9Ir.d.ts +138 -0
  189. package/dist/ropa-BebGfqKQ.d.ts +200 -0
  190. package/dist/ropa-Rb4dsFSz.d.mts +200 -0
  191. package/dist/ropa.d.mts +45 -0
  192. package/dist/ropa.d.ts +45 -0
  193. package/dist/ropa.js +2 -0
  194. package/dist/ropa.js.map +1 -0
  195. package/dist/ropa.mjs +2 -0
  196. package/dist/ropa.mjs.map +1 -0
  197. package/dist/unstyled.d.mts +4 -4
  198. package/dist/unstyled.d.ts +4 -4
  199. package/dist/unstyled.js +1 -1
  200. package/dist/unstyled.js.map +1 -1
  201. package/dist/unstyled.mjs +1 -1
  202. package/dist/unstyled.mjs.map +1 -1
  203. package/dist/useBreach-WrZzJilM.d.mts +99 -0
  204. package/dist/useBreach-vrh_XMpI.d.ts +99 -0
  205. package/dist/useConsent-D0pAfTlb.d.ts +65 -0
  206. package/dist/useConsent-DOt2Njst.d.mts +65 -0
  207. package/dist/useCrossBorderTransfer-D4FQYfFt.d.ts +66 -0
  208. package/dist/useCrossBorderTransfer-TVnY8_UX.d.mts +66 -0
  209. package/dist/useDPIA-DFDHBLSa.d.ts +94 -0
  210. package/dist/useDPIA-FqPofFaV.d.mts +94 -0
  211. package/dist/useDSR-DAqqOBXb.d.ts +74 -0
  212. package/dist/useDSR-OXM5Q9rf.d.mts +74 -0
  213. package/dist/useLawfulBasis-DNQ8YszQ.d.mts +68 -0
  214. package/dist/useLawfulBasis-RILM_xsx.d.ts +68 -0
  215. package/dist/usePrivacyPolicy-CfySfBLS.d.ts +89 -0
  216. package/dist/usePrivacyPolicy-Dit2sFuV.d.mts +89 -0
  217. package/dist/useROPA-Bcs6cRdi.d.ts +64 -0
  218. package/dist/useROPA-nmcSiUYv.d.mts +64 -0
  219. package/package.json +146 -20
@@ -0,0 +1,195 @@
1
+ import React from 'react';
2
+ import { P as PolicySection, b as PolicyVariable } from './privacy-Ca6te9Ir.js';
3
+ export { O as OrganizationInfo, a as PolicyTemplate, c as PrivacyPolicy } from './privacy-Ca6te9Ir.js';
4
+ export { u as usePrivacyPolicy } from './usePrivacyPolicy-CfySfBLS.js';
5
+ export { g as generatePolicyText } from './privacy-BXz7O2ej.js';
6
+
7
+ interface PolicyGeneratorProps {
8
+ /**
9
+ * List of policy sections
10
+ */
11
+ sections: PolicySection[];
12
+ /**
13
+ * List of policy variables
14
+ */
15
+ variables: PolicyVariable[];
16
+ /**
17
+ * Callback function called when the policy is generated
18
+ */
19
+ onGenerate: (policy: {
20
+ sections: PolicySection[];
21
+ variables: PolicyVariable[];
22
+ content: string;
23
+ }) => void;
24
+ /**
25
+ * Title displayed on the generator
26
+ * @default "NDPA Privacy Policy Generator"
27
+ */
28
+ title?: string;
29
+ /**
30
+ * Description text displayed on the generator
31
+ * @default "Generate an NDPA-compliant privacy policy for your organization."
32
+ */
33
+ description?: string;
34
+ /**
35
+ * Custom CSS class for the generator
36
+ */
37
+ className?: string;
38
+ /**
39
+ * Custom CSS class for the buttons
40
+ */
41
+ buttonClassName?: string;
42
+ /**
43
+ * Text for the generate button
44
+ * @default "Generate Policy"
45
+ */
46
+ generateButtonText?: string;
47
+ /**
48
+ * Whether to show a preview of the generated policy
49
+ * @default true
50
+ */
51
+ showPreview?: boolean;
52
+ /**
53
+ * Whether to allow editing the policy content
54
+ * @default true
55
+ */
56
+ allowEditing?: boolean;
57
+ }
58
+ declare const PolicyGenerator: React.FC<PolicyGeneratorProps>;
59
+
60
+ interface PolicyPreviewProps {
61
+ /**
62
+ * The policy content to preview
63
+ */
64
+ content: string;
65
+ /**
66
+ * The policy sections
67
+ */
68
+ sections?: PolicySection[];
69
+ /**
70
+ * The policy variables
71
+ */
72
+ variables?: PolicyVariable[];
73
+ /**
74
+ * Callback function called when the policy is exported
75
+ */
76
+ onExport?: (format: 'pdf' | 'html' | 'markdown' | 'docx') => void;
77
+ /**
78
+ * Callback function called when the policy is edited
79
+ */
80
+ onEdit?: () => void;
81
+ /**
82
+ * Title displayed on the preview
83
+ * @default "Privacy Policy Preview"
84
+ */
85
+ title?: string;
86
+ /**
87
+ * Description text displayed on the preview
88
+ * @default "Preview your NDPA-compliant privacy policy before exporting."
89
+ */
90
+ description?: string;
91
+ /**
92
+ * Custom CSS class for the preview
93
+ */
94
+ className?: string;
95
+ /**
96
+ * Custom CSS class for the buttons
97
+ */
98
+ buttonClassName?: string;
99
+ /**
100
+ * Whether to show the export options
101
+ * @default true
102
+ */
103
+ showExportOptions?: boolean;
104
+ /**
105
+ * Whether to show the edit button
106
+ * @default true
107
+ */
108
+ showEditButton?: boolean;
109
+ /**
110
+ * Whether to show the table of contents
111
+ * @default true
112
+ */
113
+ showTableOfContents?: boolean;
114
+ /**
115
+ * Whether to show the policy metadata
116
+ * @default true
117
+ */
118
+ showMetadata?: boolean;
119
+ /**
120
+ * The organization name to display in the policy
121
+ */
122
+ organizationName?: string;
123
+ /**
124
+ * The last updated date to display in the policy
125
+ */
126
+ lastUpdated?: Date;
127
+ }
128
+ declare const PolicyPreview: React.FC<PolicyPreviewProps>;
129
+
130
+ interface PolicyExporterProps {
131
+ /**
132
+ * The policy content to export
133
+ */
134
+ content: string;
135
+ /**
136
+ * The policy title
137
+ */
138
+ title?: string;
139
+ /**
140
+ * The organization name to include in the exported policy
141
+ */
142
+ organizationName?: string;
143
+ /**
144
+ * The last updated date to include in the exported policy
145
+ */
146
+ lastUpdated?: Date;
147
+ /**
148
+ * Callback function called when the export is complete
149
+ */
150
+ onExportComplete?: (format: string, url: string) => void;
151
+ /**
152
+ * Title displayed on the exporter
153
+ * @default "Export Privacy Policy"
154
+ */
155
+ componentTitle?: string;
156
+ /**
157
+ * Description text displayed on the exporter
158
+ * @default "Export your NDPA-compliant privacy policy in various formats."
159
+ */
160
+ description?: string;
161
+ /**
162
+ * Custom CSS class for the exporter
163
+ */
164
+ className?: string;
165
+ /**
166
+ * Custom CSS class for the buttons
167
+ */
168
+ buttonClassName?: string;
169
+ /**
170
+ * Whether to show the export history
171
+ * @default true
172
+ */
173
+ showExportHistory?: boolean;
174
+ /**
175
+ * Whether to include the NDPA compliance notice in the exported policy
176
+ * @default true
177
+ */
178
+ includeComplianceNotice?: boolean;
179
+ /**
180
+ * Whether to include the organization logo in the exported policy
181
+ * @default false
182
+ */
183
+ includeLogo?: boolean;
184
+ /**
185
+ * URL of the organization logo
186
+ */
187
+ logoUrl?: string;
188
+ /**
189
+ * Custom CSS styles for the exported policy
190
+ */
191
+ customStyles?: string;
192
+ }
193
+ declare const PolicyExporter: React.FC<PolicyExporterProps>;
194
+
195
+ export { PolicyExporter, PolicyGenerator, PolicyPreview, PolicySection, PolicyVariable };
package/dist/policy.js ADDED
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunk4DKT6IB6_js=require('./chunk-4DKT6IB6.js'),chunkIWUUVRLJ_js=require('./chunk-IWUUVRLJ.js'),chunkPM7CMTMB_js=require('./chunk-PM7CMTMB.js');require('./chunk-MQFZHA2D.js');Object.defineProperty(exports,"PolicyExporter",{enumerable:true,get:function(){return chunk4DKT6IB6_js.c}});Object.defineProperty(exports,"PolicyGenerator",{enumerable:true,get:function(){return chunk4DKT6IB6_js.a}});Object.defineProperty(exports,"PolicyPreview",{enumerable:true,get:function(){return chunk4DKT6IB6_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkIWUUVRLJ_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkPM7CMTMB_js.a}});//# sourceMappingURL=policy.js.map
2
+ //# sourceMappingURL=policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"policy.js"}
@@ -0,0 +1,2 @@
1
+ export{c as PolicyExporter,a as PolicyGenerator,b as PolicyPreview}from'./chunk-FFW7RUAG.mjs';export{a as usePrivacyPolicy}from'./chunk-DB3JH4DS.mjs';export{a as generatePolicyText}from'./chunk-UYP64PV7.mjs';import'./chunk-WWT2ZSNU.mjs';//# sourceMappingURL=policy.mjs.map
2
+ //# sourceMappingURL=policy.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"policy.mjs"}
@@ -0,0 +1,15 @@
1
+ import { P as PolicySection, O as OrganizationInfo } from './privacy-Ca6te9Ir.mjs';
2
+
3
+ /**
4
+ * Generates policy text by replacing variables in a template with organization-specific values
5
+ * @param sectionsOrTemplate The policy sections or template string to generate text for
6
+ * @param organizationInfoOrVariables The organization information or variable map to use for replacement
7
+ * @returns The generated policy text or an object with the generated text and metadata
8
+ */
9
+ declare function generatePolicyText(sectionsOrTemplate: PolicySection[] | string, organizationInfoOrVariables: OrganizationInfo | Record<string, string>): string | {
10
+ fullText: string;
11
+ sectionTexts: Record<string, string>;
12
+ missingVariables: string[];
13
+ };
14
+
15
+ export { generatePolicyText as g };
@@ -0,0 +1,15 @@
1
+ import { P as PolicySection, O as OrganizationInfo } from './privacy-Ca6te9Ir.js';
2
+
3
+ /**
4
+ * Generates policy text by replacing variables in a template with organization-specific values
5
+ * @param sectionsOrTemplate The policy sections or template string to generate text for
6
+ * @param organizationInfoOrVariables The organization information or variable map to use for replacement
7
+ * @returns The generated policy text or an object with the generated text and metadata
8
+ */
9
+ declare function generatePolicyText(sectionsOrTemplate: PolicySection[] | string, organizationInfoOrVariables: OrganizationInfo | Record<string, string>): string | {
10
+ fullText: string;
11
+ sectionTexts: Record<string, string>;
12
+ missingVariables: string[];
13
+ };
14
+
15
+ export { generatePolicyText as g };
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Privacy policy types aligned with NDPA 2023
3
+ * Privacy policies must clearly inform data subjects of their rights under the NDPA
4
+ */
5
+ /**
6
+ * Represents a section in a privacy policy
7
+ */
8
+ interface PolicySection {
9
+ /** Unique identifier for the section */
10
+ id: string;
11
+ /** Title of the section */
12
+ title: string;
13
+ /** Description of the section */
14
+ description?: string;
15
+ /** Order of the section in the policy */
16
+ order?: number;
17
+ /** Whether the section is required by NDPA */
18
+ required: boolean;
19
+ /** Template text for the section */
20
+ template: string;
21
+ /**
22
+ * Default content for the section (legacy field)
23
+ * @deprecated Use template instead
24
+ */
25
+ defaultContent?: string;
26
+ /**
27
+ * Custom content for the section (overrides default content)
28
+ * @deprecated Use template instead
29
+ */
30
+ customContent?: string;
31
+ /** Whether the section is included in the policy */
32
+ included: boolean;
33
+ /** Variables that can be used in the section content */
34
+ variables?: string[];
35
+ }
36
+ /**
37
+ * Represents a privacy policy template
38
+ */
39
+ interface PolicyTemplate {
40
+ /** Unique identifier for the template */
41
+ id: string;
42
+ /** Name of the template */
43
+ name: string;
44
+ /** Description of the template */
45
+ description: string;
46
+ /** Type of organization the template is designed for */
47
+ organizationType: 'business' | 'nonprofit' | 'government' | 'educational';
48
+ /** Sections included in the template */
49
+ sections: PolicySection[];
50
+ /** Variables used across the template */
51
+ variables: Record<string, {
52
+ name: string;
53
+ description: string;
54
+ required: boolean;
55
+ defaultValue?: string;
56
+ }>;
57
+ /** Version of the template */
58
+ version: string;
59
+ /** Last updated date of the template */
60
+ lastUpdated: number;
61
+ /**
62
+ * Whether this template is NDPA 2023 compliant
63
+ */
64
+ ndpaCompliant: boolean;
65
+ }
66
+ /**
67
+ * Represents organization information for a privacy policy
68
+ */
69
+ interface OrganizationInfo {
70
+ /** Name of the organization */
71
+ name: string;
72
+ /** Website URL of the organization */
73
+ website: string;
74
+ /** Contact email for privacy inquiries */
75
+ privacyEmail: string;
76
+ /** Physical address of the organization */
77
+ address?: string;
78
+ /** Phone number for privacy inquiries */
79
+ privacyPhone?: string;
80
+ /** Name of the Data Protection Officer */
81
+ dpoName?: string;
82
+ /** Email of the Data Protection Officer */
83
+ dpoEmail?: string;
84
+ /** Industry or sector of the organization */
85
+ industry?: string;
86
+ /** NDPC registration number (if registered) */
87
+ ndpcRegistrationNumber?: string;
88
+ }
89
+ /**
90
+ * Represents a variable in a privacy policy
91
+ */
92
+ interface PolicyVariable {
93
+ /** Unique identifier for the variable */
94
+ id: string;
95
+ /** Name of the variable as it appears in the template */
96
+ name: string;
97
+ /** Description of the variable */
98
+ description: string;
99
+ /** Default value for the variable */
100
+ defaultValue?: string;
101
+ /** Current value of the variable */
102
+ value: string;
103
+ /** Type of input for the variable */
104
+ inputType: 'text' | 'textarea' | 'email' | 'url' | 'date' | 'select';
105
+ /** Options for select inputs */
106
+ options?: string[];
107
+ /** Whether the variable is required */
108
+ required: boolean;
109
+ }
110
+ /**
111
+ * Represents a generated privacy policy
112
+ */
113
+ interface PrivacyPolicy {
114
+ /** Unique identifier for the policy */
115
+ id: string;
116
+ /** Title of the policy */
117
+ title: string;
118
+ /** Template used to generate the policy */
119
+ templateId: string;
120
+ /** Organization information */
121
+ organizationInfo: OrganizationInfo;
122
+ /** Sections of the policy */
123
+ sections: PolicySection[];
124
+ /** Values for the variables used in the policy */
125
+ variableValues: Record<string, string>;
126
+ /** Effective date of the policy */
127
+ effectiveDate: number;
128
+ /** Last updated date of the policy */
129
+ lastUpdated: number;
130
+ /** Version of the policy */
131
+ version: string;
132
+ /**
133
+ * Applicable legal frameworks
134
+ */
135
+ applicableFrameworks?: ('ndpa' | 'ndpr' | 'gdpr' | 'ccpa')[];
136
+ }
137
+
138
+ export type { OrganizationInfo as O, PolicySection as P, PolicyTemplate as a, PolicyVariable as b, PrivacyPolicy as c };
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Privacy policy types aligned with NDPA 2023
3
+ * Privacy policies must clearly inform data subjects of their rights under the NDPA
4
+ */
5
+ /**
6
+ * Represents a section in a privacy policy
7
+ */
8
+ interface PolicySection {
9
+ /** Unique identifier for the section */
10
+ id: string;
11
+ /** Title of the section */
12
+ title: string;
13
+ /** Description of the section */
14
+ description?: string;
15
+ /** Order of the section in the policy */
16
+ order?: number;
17
+ /** Whether the section is required by NDPA */
18
+ required: boolean;
19
+ /** Template text for the section */
20
+ template: string;
21
+ /**
22
+ * Default content for the section (legacy field)
23
+ * @deprecated Use template instead
24
+ */
25
+ defaultContent?: string;
26
+ /**
27
+ * Custom content for the section (overrides default content)
28
+ * @deprecated Use template instead
29
+ */
30
+ customContent?: string;
31
+ /** Whether the section is included in the policy */
32
+ included: boolean;
33
+ /** Variables that can be used in the section content */
34
+ variables?: string[];
35
+ }
36
+ /**
37
+ * Represents a privacy policy template
38
+ */
39
+ interface PolicyTemplate {
40
+ /** Unique identifier for the template */
41
+ id: string;
42
+ /** Name of the template */
43
+ name: string;
44
+ /** Description of the template */
45
+ description: string;
46
+ /** Type of organization the template is designed for */
47
+ organizationType: 'business' | 'nonprofit' | 'government' | 'educational';
48
+ /** Sections included in the template */
49
+ sections: PolicySection[];
50
+ /** Variables used across the template */
51
+ variables: Record<string, {
52
+ name: string;
53
+ description: string;
54
+ required: boolean;
55
+ defaultValue?: string;
56
+ }>;
57
+ /** Version of the template */
58
+ version: string;
59
+ /** Last updated date of the template */
60
+ lastUpdated: number;
61
+ /**
62
+ * Whether this template is NDPA 2023 compliant
63
+ */
64
+ ndpaCompliant: boolean;
65
+ }
66
+ /**
67
+ * Represents organization information for a privacy policy
68
+ */
69
+ interface OrganizationInfo {
70
+ /** Name of the organization */
71
+ name: string;
72
+ /** Website URL of the organization */
73
+ website: string;
74
+ /** Contact email for privacy inquiries */
75
+ privacyEmail: string;
76
+ /** Physical address of the organization */
77
+ address?: string;
78
+ /** Phone number for privacy inquiries */
79
+ privacyPhone?: string;
80
+ /** Name of the Data Protection Officer */
81
+ dpoName?: string;
82
+ /** Email of the Data Protection Officer */
83
+ dpoEmail?: string;
84
+ /** Industry or sector of the organization */
85
+ industry?: string;
86
+ /** NDPC registration number (if registered) */
87
+ ndpcRegistrationNumber?: string;
88
+ }
89
+ /**
90
+ * Represents a variable in a privacy policy
91
+ */
92
+ interface PolicyVariable {
93
+ /** Unique identifier for the variable */
94
+ id: string;
95
+ /** Name of the variable as it appears in the template */
96
+ name: string;
97
+ /** Description of the variable */
98
+ description: string;
99
+ /** Default value for the variable */
100
+ defaultValue?: string;
101
+ /** Current value of the variable */
102
+ value: string;
103
+ /** Type of input for the variable */
104
+ inputType: 'text' | 'textarea' | 'email' | 'url' | 'date' | 'select';
105
+ /** Options for select inputs */
106
+ options?: string[];
107
+ /** Whether the variable is required */
108
+ required: boolean;
109
+ }
110
+ /**
111
+ * Represents a generated privacy policy
112
+ */
113
+ interface PrivacyPolicy {
114
+ /** Unique identifier for the policy */
115
+ id: string;
116
+ /** Title of the policy */
117
+ title: string;
118
+ /** Template used to generate the policy */
119
+ templateId: string;
120
+ /** Organization information */
121
+ organizationInfo: OrganizationInfo;
122
+ /** Sections of the policy */
123
+ sections: PolicySection[];
124
+ /** Values for the variables used in the policy */
125
+ variableValues: Record<string, string>;
126
+ /** Effective date of the policy */
127
+ effectiveDate: number;
128
+ /** Last updated date of the policy */
129
+ lastUpdated: number;
130
+ /** Version of the policy */
131
+ version: string;
132
+ /**
133
+ * Applicable legal frameworks
134
+ */
135
+ applicableFrameworks?: ('ndpa' | 'ndpr' | 'gdpr' | 'ccpa')[];
136
+ }
137
+
138
+ export type { OrganizationInfo as O, PolicySection as P, PolicyTemplate as a, PolicyVariable as b, PrivacyPolicy as c };