@tantainnovative/ndpr-toolkit 3.13.0 → 4.1.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 (102) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/README.md +1 -1
  3. package/dist/breach.d.mts +2 -7
  4. package/dist/breach.d.ts +2 -7
  5. package/dist/breach.js +1 -1
  6. package/dist/breach.mjs +1 -1
  7. package/dist/chunk-3APT25XO.mjs +1 -0
  8. package/dist/chunk-45D7AMB3.js +1 -0
  9. package/dist/chunk-63WM5PHZ.js +1 -0
  10. package/dist/chunk-65J4P5ID.js +1 -0
  11. package/dist/chunk-6A6VI7ZP.mjs +1 -0
  12. package/dist/{chunk-NB6SKG76.mjs → chunk-6H6IXTHA.mjs} +1 -1
  13. package/dist/chunk-6OPGI27L.mjs +1 -0
  14. package/dist/{chunk-3XU6FL2I.js → chunk-6YFPDGNB.js} +1 -1
  15. package/dist/{chunk-IHNAFXDM.mjs → chunk-7Z7NURIA.mjs} +1 -1
  16. package/dist/chunk-D2UWB5OI.js +2 -0
  17. package/dist/chunk-D3HHDWBR.js +1 -0
  18. package/dist/chunk-DK7P5JEG.mjs +2 -0
  19. package/dist/chunk-DSIIEUAD.mjs +1 -0
  20. package/dist/chunk-H2FDWK4F.js +6 -0
  21. package/dist/chunk-HLFS3NXG.js +1 -0
  22. package/dist/chunk-JGY65SHX.mjs +1 -0
  23. package/dist/chunk-NI54X543.mjs +1 -0
  24. package/dist/chunk-O4ATGGVK.js +1 -0
  25. package/dist/chunk-P5MPUC5F.js +1 -0
  26. package/dist/{chunk-BGV2AKT7.mjs → chunk-PSPYIRIF.mjs} +1 -1
  27. package/dist/{chunk-HOAC5VUF.js → chunk-ROOUYQD4.js} +1 -1
  28. package/dist/{chunk-WMISQDSV.js → chunk-UJGNW6CH.js} +1 -1
  29. package/dist/chunk-UTXDZDYF.mjs +6 -0
  30. package/dist/chunk-W6VVLHRQ.mjs +1 -0
  31. package/dist/consent.d.mts +2 -0
  32. package/dist/consent.d.ts +2 -0
  33. package/dist/consent.js +1 -1
  34. package/dist/consent.mjs +1 -1
  35. package/dist/core.d.mts +13 -0
  36. package/dist/core.d.ts +13 -0
  37. package/dist/core.js +1 -1
  38. package/dist/core.mjs +1 -1
  39. package/dist/cross-border.d.mts +24 -0
  40. package/dist/cross-border.d.ts +24 -0
  41. package/dist/cross-border.js +1 -1
  42. package/dist/cross-border.mjs +1 -1
  43. package/dist/dsr.d.mts +15 -3
  44. package/dist/dsr.d.ts +15 -3
  45. package/dist/dsr.js +1 -1
  46. package/dist/dsr.mjs +1 -1
  47. package/dist/headless.d.mts +34 -4
  48. package/dist/headless.d.ts +34 -4
  49. package/dist/headless.js +1 -1
  50. package/dist/headless.mjs +1 -1
  51. package/dist/hooks.d.mts +34 -4
  52. package/dist/hooks.d.ts +34 -4
  53. package/dist/hooks.js +1 -1
  54. package/dist/hooks.mjs +1 -1
  55. package/dist/index.d.mts +229 -11
  56. package/dist/index.d.ts +229 -11
  57. package/dist/index.js +1 -1
  58. package/dist/index.mjs +1 -1
  59. package/dist/lawful-basis.d.mts +21 -0
  60. package/dist/lawful-basis.d.ts +21 -0
  61. package/dist/lawful-basis.js +1 -1
  62. package/dist/lawful-basis.mjs +1 -1
  63. package/dist/presets-consent.d.mts +5 -1
  64. package/dist/presets-consent.d.ts +5 -1
  65. package/dist/presets-consent.js +1 -1
  66. package/dist/presets-consent.mjs +1 -1
  67. package/dist/presets.d.mts +103 -22
  68. package/dist/presets.d.ts +103 -22
  69. package/dist/presets.js +1 -1
  70. package/dist/presets.mjs +1 -1
  71. package/dist/ropa-lite.d.mts +13 -1
  72. package/dist/ropa-lite.d.ts +13 -1
  73. package/dist/ropa-lite.js +1 -1
  74. package/dist/ropa-lite.mjs +1 -1
  75. package/dist/ropa.d.mts +43 -1
  76. package/dist/ropa.d.ts +43 -1
  77. package/dist/ropa.js +1 -1
  78. package/dist/ropa.mjs +1 -1
  79. package/dist/server.d.mts +135 -0
  80. package/dist/server.d.ts +135 -0
  81. package/dist/server.js +1 -1
  82. package/dist/server.mjs +1 -1
  83. package/dist/styles.css +18 -16
  84. package/package.json +3 -3
  85. package/dist/chunk-42JPSNVV.mjs +0 -6
  86. package/dist/chunk-737EMUUC.mjs +0 -1
  87. package/dist/chunk-7FXNGGMO.js +0 -1
  88. package/dist/chunk-B46SJB5V.js +0 -1
  89. package/dist/chunk-BL5W472Q.js +0 -1
  90. package/dist/chunk-NUIRMJKQ.mjs +0 -2
  91. package/dist/chunk-O2WEABB3.js +0 -1
  92. package/dist/chunk-OZHUINWS.js +0 -1
  93. package/dist/chunk-PJNKQPQP.mjs +0 -1
  94. package/dist/chunk-PXDSPF5B.js +0 -2
  95. package/dist/chunk-QGUOFGVJ.js +0 -2
  96. package/dist/chunk-RBKFNCGO.mjs +0 -1
  97. package/dist/chunk-VPNK7OID.mjs +0 -1
  98. package/dist/chunk-WHQ4PEYS.mjs +0 -2
  99. package/dist/chunk-WKUC65HL.mjs +0 -1
  100. package/dist/chunk-XYGGUGTO.js +0 -6
  101. package/dist/chunk-Z2M5VJX2.mjs +0 -1
  102. package/dist/chunk-ZM5DLFCZ.js +0 -1
package/dist/ropa.d.mts CHANGED
@@ -212,16 +212,37 @@ declare interface ROPAManagerProps {
212
212
  ropa: RecordOfProcessingActivities;
213
213
  /**
214
214
  * Callback when a new record is added
215
+ * @deprecated Renamed to `onAdd` in 4.1. The legacy name still fires
216
+ * for backward compatibility and will be removed in 5.0.
215
217
  */
216
218
  onAddRecord?: (record: ProcessingRecord) => void;
217
219
  /**
218
220
  * Callback when a record is updated
221
+ * @deprecated Renamed to `onUpdate` in 4.1. The legacy name still fires
222
+ * for backward compatibility and will be removed in 5.0.
219
223
  */
220
224
  onUpdateRecord?: (id: string, updates: Partial<ProcessingRecord>) => void;
221
225
  /**
222
226
  * Callback when a record is archived
227
+ * @deprecated Renamed to `onArchive` in 4.1. The legacy name still fires
228
+ * for backward compatibility and will be removed in 5.0.
223
229
  */
224
230
  onArchiveRecord?: (id: string) => void;
231
+ /**
232
+ * Callback when a new record is added (uniform 4.1+ name).
233
+ * Takes precedence over `onAddRecord` when both are provided.
234
+ */
235
+ onAdd?: (record: ProcessingRecord) => void;
236
+ /**
237
+ * Callback when a record is updated (uniform 4.1+ name).
238
+ * Takes precedence over `onUpdateRecord` when both are provided.
239
+ */
240
+ onUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
241
+ /**
242
+ * Callback when a record is archived (uniform 4.1+ name).
243
+ * Takes precedence over `onArchiveRecord` when both are provided.
244
+ */
245
+ onArchive?: (id: string) => void;
225
246
  /**
226
247
  * Title displayed on the manager
227
248
  * @default "Record of Processing Activities (ROPA)"
@@ -331,7 +352,7 @@ export declare interface StorageAdapter<T = unknown> {
331
352
  * }
332
353
  * ```
333
354
  */
334
- export declare function useROPA({ initialData, adapter, onRecordAdd, onRecordUpdate, onRecordArchive, }: UseROPAOptions): UseROPAReturn;
355
+ export declare function useROPA({ initialData, adapter, onRecordAdd, onRecordUpdate, onRecordArchive, onAdd, onUpdate, onArchive, }: UseROPAOptions): UseROPAReturn;
335
356
 
336
357
  export declare function useROPACompound(): ROPAContextValue;
337
358
 
@@ -348,16 +369,37 @@ export declare interface UseROPAOptions {
348
369
  adapter?: StorageAdapter<RecordOfProcessingActivities>;
349
370
  /**
350
371
  * Callback when a record is added
372
+ * @deprecated Renamed to `onAdd` in 4.1. The legacy name still fires
373
+ * for backward compatibility and will be removed in 5.0.
351
374
  */
352
375
  onRecordAdd?: (record: ProcessingRecord) => void;
353
376
  /**
354
377
  * Callback when a record is updated
378
+ * @deprecated Renamed to `onUpdate` in 4.1. The legacy name still fires
379
+ * for backward compatibility and will be removed in 5.0.
355
380
  */
356
381
  onRecordUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
357
382
  /**
358
383
  * Callback when a record is archived
384
+ * @deprecated Renamed to `onArchive` in 4.1. The legacy name still fires
385
+ * for backward compatibility and will be removed in 5.0.
359
386
  */
360
387
  onRecordArchive?: (id: string) => void;
388
+ /**
389
+ * Callback when a record is added (uniform 4.1+ name).
390
+ * Takes precedence over `onRecordAdd` when both are provided.
391
+ */
392
+ onAdd?: (record: ProcessingRecord) => void;
393
+ /**
394
+ * Callback when a record is updated (uniform 4.1+ name).
395
+ * Takes precedence over `onRecordUpdate` when both are provided.
396
+ */
397
+ onUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
398
+ /**
399
+ * Callback when a record is archived (uniform 4.1+ name).
400
+ * Takes precedence over `onRecordArchive` when both are provided.
401
+ */
402
+ onArchive?: (id: string) => void;
361
403
  }
362
404
 
363
405
  export declare interface UseROPAReturn {
package/dist/ropa.d.ts CHANGED
@@ -212,16 +212,37 @@ declare interface ROPAManagerProps {
212
212
  ropa: RecordOfProcessingActivities;
213
213
  /**
214
214
  * Callback when a new record is added
215
+ * @deprecated Renamed to `onAdd` in 4.1. The legacy name still fires
216
+ * for backward compatibility and will be removed in 5.0.
215
217
  */
216
218
  onAddRecord?: (record: ProcessingRecord) => void;
217
219
  /**
218
220
  * Callback when a record is updated
221
+ * @deprecated Renamed to `onUpdate` in 4.1. The legacy name still fires
222
+ * for backward compatibility and will be removed in 5.0.
219
223
  */
220
224
  onUpdateRecord?: (id: string, updates: Partial<ProcessingRecord>) => void;
221
225
  /**
222
226
  * Callback when a record is archived
227
+ * @deprecated Renamed to `onArchive` in 4.1. The legacy name still fires
228
+ * for backward compatibility and will be removed in 5.0.
223
229
  */
224
230
  onArchiveRecord?: (id: string) => void;
231
+ /**
232
+ * Callback when a new record is added (uniform 4.1+ name).
233
+ * Takes precedence over `onAddRecord` when both are provided.
234
+ */
235
+ onAdd?: (record: ProcessingRecord) => void;
236
+ /**
237
+ * Callback when a record is updated (uniform 4.1+ name).
238
+ * Takes precedence over `onUpdateRecord` when both are provided.
239
+ */
240
+ onUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
241
+ /**
242
+ * Callback when a record is archived (uniform 4.1+ name).
243
+ * Takes precedence over `onArchiveRecord` when both are provided.
244
+ */
245
+ onArchive?: (id: string) => void;
225
246
  /**
226
247
  * Title displayed on the manager
227
248
  * @default "Record of Processing Activities (ROPA)"
@@ -331,7 +352,7 @@ export declare interface StorageAdapter<T = unknown> {
331
352
  * }
332
353
  * ```
333
354
  */
334
- export declare function useROPA({ initialData, adapter, onRecordAdd, onRecordUpdate, onRecordArchive, }: UseROPAOptions): UseROPAReturn;
355
+ export declare function useROPA({ initialData, adapter, onRecordAdd, onRecordUpdate, onRecordArchive, onAdd, onUpdate, onArchive, }: UseROPAOptions): UseROPAReturn;
335
356
 
336
357
  export declare function useROPACompound(): ROPAContextValue;
337
358
 
@@ -348,16 +369,37 @@ export declare interface UseROPAOptions {
348
369
  adapter?: StorageAdapter<RecordOfProcessingActivities>;
349
370
  /**
350
371
  * Callback when a record is added
372
+ * @deprecated Renamed to `onAdd` in 4.1. The legacy name still fires
373
+ * for backward compatibility and will be removed in 5.0.
351
374
  */
352
375
  onRecordAdd?: (record: ProcessingRecord) => void;
353
376
  /**
354
377
  * Callback when a record is updated
378
+ * @deprecated Renamed to `onUpdate` in 4.1. The legacy name still fires
379
+ * for backward compatibility and will be removed in 5.0.
355
380
  */
356
381
  onRecordUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
357
382
  /**
358
383
  * Callback when a record is archived
384
+ * @deprecated Renamed to `onArchive` in 4.1. The legacy name still fires
385
+ * for backward compatibility and will be removed in 5.0.
359
386
  */
360
387
  onRecordArchive?: (id: string) => void;
388
+ /**
389
+ * Callback when a record is added (uniform 4.1+ name).
390
+ * Takes precedence over `onRecordAdd` when both are provided.
391
+ */
392
+ onAdd?: (record: ProcessingRecord) => void;
393
+ /**
394
+ * Callback when a record is updated (uniform 4.1+ name).
395
+ * Takes precedence over `onRecordUpdate` when both are provided.
396
+ */
397
+ onUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
398
+ /**
399
+ * Callback when a record is archived (uniform 4.1+ name).
400
+ * Takes precedence over `onRecordArchive` when both are provided.
401
+ */
402
+ onArchive?: (id: string) => void;
361
403
  }
362
404
 
363
405
  export declare interface UseROPAReturn {
package/dist/ropa.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkBL5W472Q_js=require('./chunk-BL5W472Q.js'),chunkO2WEABB3_js=require('./chunk-O2WEABB3.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js');require('./chunk-AME4HJR4.js'),require('./chunk-YDKWD6MQ.js'),require('./chunk-TTMGFC6C.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var t=react.createContext(null);function u(){let r=react.useContext(t);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var p=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=chunkO2WEABB3_js.a({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsxRuntime.jsx(t.Provider,{value:R,children:s})};var v={Provider:p,Manager:chunkBL5W472Q_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunkBL5W472Q_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkO2WEABB3_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});exports.ROPA=v;exports.ROPAProvider=p;exports.useROPACompound=u;
2
+ 'use strict';var chunkHLFS3NXG_js=require('./chunk-HLFS3NXG.js'),chunkP5MPUC5F_js=require('./chunk-P5MPUC5F.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js');require('./chunk-AME4HJR4.js'),require('./chunk-YDKWD6MQ.js'),require('./chunk-TTMGFC6C.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var t=react.createContext(null);function u(){let r=react.useContext(t);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var p=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=chunkP5MPUC5F_js.a({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsxRuntime.jsx(t.Provider,{value:R,children:s})};var v={Provider:p,Manager:chunkHLFS3NXG_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunkHLFS3NXG_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkP5MPUC5F_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});exports.ROPA=v;exports.ROPAProvider=p;exports.useROPACompound=u;
package/dist/ropa.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a}from'./chunk-Z2M5VJX2.mjs';export{a as ROPAManager}from'./chunk-Z2M5VJX2.mjs';import {a as a$1}from'./chunk-WKUC65HL.mjs';export{a as useROPA}from'./chunk-WKUC65HL.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var t=createContext(null);function u(){let r=useContext(t);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var p=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=a$1({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsx(t.Provider,{value:R,children:s})};var v={Provider:p,Manager:a};export{v as ROPA,p as ROPAProvider,u as useROPACompound};
2
+ import {a}from'./chunk-W6VVLHRQ.mjs';export{a as ROPAManager}from'./chunk-W6VVLHRQ.mjs';import {a as a$1}from'./chunk-JGY65SHX.mjs';export{a as useROPA}from'./chunk-JGY65SHX.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var t=createContext(null);function u(){let r=useContext(t);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var p=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=a$1({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsx(t.Provider,{value:R,children:s})};var v={Provider:p,Manager:a};export{v as ROPA,p as ROPAProvider,u as useROPACompound};
package/dist/server.d.mts CHANGED
@@ -152,6 +152,10 @@ declare interface ApiAdapterSuccessContext<T = unknown> {
152
152
  */
153
153
  export declare function appendAuditEntry(entry: ConsentAuditEntry, storageKey?: string): void;
154
154
 
155
+ export declare const arabicLocale: Required<{
156
+ [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
157
+ }>;
158
+
155
159
  /**
156
160
  * Assemble an ordered, NDPA-aligned array of privacy-policy sections from
157
161
  * a {@link TemplateContext}. This is the canonical "compute the policy"
@@ -1199,6 +1203,7 @@ export declare function findUnfilledTokens(rendered: string): string[];
1199
1203
  * Formats a DSR request for display or submission
1200
1204
  * @param request The DSR request to format
1201
1205
  * @returns Formatted request data
1206
+ * @deprecated Use `formatDSRRequestStructured()` for typed `{ field, code, message }[]` errors. The legacy string-returning shape will be removed in 5.0.
1202
1207
  */
1203
1208
  export declare function formatDSRRequest(request: DSRRequest): {
1204
1209
  formattedRequest: Record<string, unknown>;
@@ -1206,6 +1211,35 @@ export declare function formatDSRRequest(request: DSRRequest): {
1206
1211
  validationErrors: string[];
1207
1212
  };
1208
1213
 
1214
+ /**
1215
+ * Structured-result variant of {@link formatDSRRequest}. Same formatting
1216
+ * output, but `validationErrors` is replaced with a typed `errors` array
1217
+ * of `{ field, code, message }`.
1218
+ *
1219
+ * Codes emitted:
1220
+ * - `request_id_required`
1221
+ * - `request_type_required`
1222
+ * - `request_status_required`
1223
+ * - `created_at_required`
1224
+ * - `subject_name_required`
1225
+ * - `subject_email_required`
1226
+ */
1227
+ export declare function formatDSRRequestStructured(request: DSRRequest): FormatDSRRequestStructuredResult;
1228
+
1229
+ /** Result of {@link formatDSRRequestStructured}. */
1230
+ export declare interface FormatDSRRequestStructuredResult {
1231
+ valid: boolean;
1232
+ errors: StructuredValidationError[];
1233
+ /** Formatted request payload — always populated regardless of `valid`. */
1234
+ formattedRequest: Record<string, unknown>;
1235
+ /** Narrowed input — populated only on `valid: true`. */
1236
+ data?: DSRRequest;
1237
+ }
1238
+
1239
+ export declare const frenchLocale: Required<{
1240
+ [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
1241
+ }>;
1242
+
1209
1243
  /**
1210
1244
  * Generates a summary of all lawful basis documentation across processing activities.
1211
1245
  *
@@ -2302,6 +2336,30 @@ export declare interface StorageAdapter<T = unknown> {
2302
2336
  remove(): void | Promise<void>;
2303
2337
  }
2304
2338
 
2339
+ /**
2340
+ * Single structured validation error with a stable, locale-independent
2341
+ * `code` consumers can switch on programmatically.
2342
+ */
2343
+ export declare interface StructuredValidationError {
2344
+ /** Dot-path of the offending field (e.g. `'timestamp'`, `'dataSubject.email'`, `'options[0].purpose'`). */
2345
+ field: string;
2346
+ /** Stable, snake_case error code — safe to switch on across locales. */
2347
+ code: string;
2348
+ /** Human-readable English message — informational only; do not regex-match. */
2349
+ message: string;
2350
+ }
2351
+
2352
+ /**
2353
+ * Result of a structured validator. `errors` is an array (one entry per
2354
+ * failed rule). `data` is the narrowed, typed payload, only populated on
2355
+ * `valid: true`.
2356
+ */
2357
+ export declare interface StructuredValidationResult<T> {
2358
+ valid: boolean;
2359
+ errors: StructuredValidationError[];
2360
+ data?: T;
2361
+ }
2362
+
2305
2363
  /** Full context used to generate an adaptive privacy policy. */
2306
2364
  export declare interface TemplateContext {
2307
2365
  /** Organisation details, extended with industry and size. */
@@ -2444,6 +2502,7 @@ export declare const UNFILLED_SUFFIX = "\u00BB";
2444
2502
  * Validates consent settings to ensure they meet NDPA requirements
2445
2503
  * @param settings The consent settings to validate
2446
2504
  * @returns An object containing validation result and any error messages
2505
+ * @deprecated Use `validateConsentStructured()` for typed `{ field, code, message }[]` errors. The legacy string-returning shape will be removed in 5.0.
2447
2506
  */
2448
2507
  export declare function validateConsent(settings: ConsentSettings): {
2449
2508
  valid: boolean;
@@ -2456,12 +2515,50 @@ export declare function validateConsent(settings: ConsentSettings): {
2456
2515
  * as consent must be specific and informed per the Nigeria Data Protection Act.
2457
2516
  * @param options The consent options to validate
2458
2517
  * @returns An object containing validation result and any error messages
2518
+ * @deprecated Use `validateConsentOptionsStructured()` for typed `{ field, code, message }[]` errors. The legacy string-returning shape will be removed in 5.0.
2459
2519
  */
2460
2520
  export declare function validateConsentOptions(options: ConsentOption[]): {
2461
2521
  valid: boolean;
2462
2522
  errors: string[];
2463
2523
  };
2464
2524
 
2525
+ /**
2526
+ * Structured-result variant of {@link validateConsentOptions}. Each option
2527
+ * is checked for a non-empty `purpose` (NDPA Section 26). Failing options
2528
+ * are reported with `field: 'options[i].purpose'` so consumers can map
2529
+ * errors back to the originating option index.
2530
+ *
2531
+ * Codes emitted:
2532
+ * - `options_required` — empty / missing options array
2533
+ * - `purpose_required` — single option missing a purpose
2534
+ */
2535
+ export declare function validateConsentOptionsStructured(options: ConsentOption[]): StructuredValidationResult<ConsentOption[]>;
2536
+
2537
+ /**
2538
+ * Structured-result variant of {@link validateConsent}. Returns the same
2539
+ * checks as `{ field, code, message }[]` so consumers can switch on `code`
2540
+ * across locales without regex-matching English strings.
2541
+ *
2542
+ * Codes emitted:
2543
+ * - `consents_required`
2544
+ * - `timestamp_required`
2545
+ * - `timestamp_invalid`
2546
+ * - `version_required`
2547
+ * - `method_required`
2548
+ * - `has_interacted_required`
2549
+ * - `consent_stale`
2550
+ *
2551
+ * @example
2552
+ * ```ts
2553
+ * const { valid, errors, data } = validateConsentStructured(settings);
2554
+ * if (!valid) {
2555
+ * const stale = errors.find((e) => e.code === 'consent_stale');
2556
+ * if (stale) showRefreshBanner();
2557
+ * }
2558
+ * ```
2559
+ */
2560
+ export declare function validateConsentStructured(settings: ConsentSettings): StructuredValidationResult<ConsentSettings>;
2561
+
2465
2562
  /**
2466
2563
  * Validate a raw DSR submission payload against the same rules
2467
2564
  * `<DSRRequestForm />` enforces client-side. Designed to be called from a
@@ -2497,6 +2594,8 @@ export declare function validateConsentOptions(options: ConsentOption[]): {
2497
2594
  * ```ts
2498
2595
  * validateDsrSubmission(payload, { requireIdentityVerification: false });
2499
2596
  * ```
2597
+ *
2598
+ * @deprecated Use `validateDsrSubmissionStructured()` for typed `{ field, code, message }[]` errors. The legacy string-returning shape will be removed in 5.0.
2500
2599
  */
2501
2600
  export declare function validateDsrSubmission(payload: unknown, options?: ValidateDsrSubmissionOptions): DsrSubmissionValidationResult;
2502
2601
 
@@ -2517,6 +2616,42 @@ export declare interface ValidateDsrSubmissionOptions {
2517
2616
  allowedRequestTypes?: string[];
2518
2617
  }
2519
2618
 
2619
+ /**
2620
+ * Structured-result variant of {@link validateDsrSubmission}. Same rules,
2621
+ * but returns an array of `{ field, code, message }` so callers can switch
2622
+ * on `code` programmatically across locales.
2623
+ *
2624
+ * Codes emitted:
2625
+ * - `payload_not_object`
2626
+ * - `request_type_required`
2627
+ * - `request_type_not_allowed`
2628
+ * - `data_subject_required`
2629
+ * - `full_name_required`
2630
+ * - `email_required`
2631
+ * - `email_invalid_format`
2632
+ * - `phone_invalid_type`
2633
+ * - `identifier_type_required`
2634
+ * - `identifier_value_required`
2635
+ * - `submitted_at_invalid`
2636
+ * - `additional_info_invalid_type`
2637
+ * - `payload_final_narrowing_failed`
2638
+ *
2639
+ * @example **Next.js Route Handler**
2640
+ * ```ts
2641
+ * import { validateDsrSubmissionStructured } from '@tantainnovative/ndpr-toolkit/server';
2642
+ *
2643
+ * export async function POST(req: Request) {
2644
+ * const { valid, errors, data } = validateDsrSubmissionStructured(await req.json());
2645
+ * if (!valid) {
2646
+ * return Response.json({ errors }, { status: 422 });
2647
+ * }
2648
+ * await dsrStore.create(data);
2649
+ * return Response.json({ ok: true }, { status: 201 });
2650
+ * }
2651
+ * ```
2652
+ */
2653
+ export declare function validateDsrSubmissionStructured(payload: unknown, options?: ValidateDsrSubmissionOptions): StructuredValidationResult<DsrSubmissionPayload>;
2654
+
2520
2655
  /**
2521
2656
  * Validates that all required fields are present on a processing activity
2522
2657
  * and that the lawful basis is properly documented.
package/dist/server.d.ts CHANGED
@@ -152,6 +152,10 @@ declare interface ApiAdapterSuccessContext<T = unknown> {
152
152
  */
153
153
  export declare function appendAuditEntry(entry: ConsentAuditEntry, storageKey?: string): void;
154
154
 
155
+ export declare const arabicLocale: Required<{
156
+ [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
157
+ }>;
158
+
155
159
  /**
156
160
  * Assemble an ordered, NDPA-aligned array of privacy-policy sections from
157
161
  * a {@link TemplateContext}. This is the canonical "compute the policy"
@@ -1199,6 +1203,7 @@ export declare function findUnfilledTokens(rendered: string): string[];
1199
1203
  * Formats a DSR request for display or submission
1200
1204
  * @param request The DSR request to format
1201
1205
  * @returns Formatted request data
1206
+ * @deprecated Use `formatDSRRequestStructured()` for typed `{ field, code, message }[]` errors. The legacy string-returning shape will be removed in 5.0.
1202
1207
  */
1203
1208
  export declare function formatDSRRequest(request: DSRRequest): {
1204
1209
  formattedRequest: Record<string, unknown>;
@@ -1206,6 +1211,35 @@ export declare function formatDSRRequest(request: DSRRequest): {
1206
1211
  validationErrors: string[];
1207
1212
  };
1208
1213
 
1214
+ /**
1215
+ * Structured-result variant of {@link formatDSRRequest}. Same formatting
1216
+ * output, but `validationErrors` is replaced with a typed `errors` array
1217
+ * of `{ field, code, message }`.
1218
+ *
1219
+ * Codes emitted:
1220
+ * - `request_id_required`
1221
+ * - `request_type_required`
1222
+ * - `request_status_required`
1223
+ * - `created_at_required`
1224
+ * - `subject_name_required`
1225
+ * - `subject_email_required`
1226
+ */
1227
+ export declare function formatDSRRequestStructured(request: DSRRequest): FormatDSRRequestStructuredResult;
1228
+
1229
+ /** Result of {@link formatDSRRequestStructured}. */
1230
+ export declare interface FormatDSRRequestStructuredResult {
1231
+ valid: boolean;
1232
+ errors: StructuredValidationError[];
1233
+ /** Formatted request payload — always populated regardless of `valid`. */
1234
+ formattedRequest: Record<string, unknown>;
1235
+ /** Narrowed input — populated only on `valid: true`. */
1236
+ data?: DSRRequest;
1237
+ }
1238
+
1239
+ export declare const frenchLocale: Required<{
1240
+ [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
1241
+ }>;
1242
+
1209
1243
  /**
1210
1244
  * Generates a summary of all lawful basis documentation across processing activities.
1211
1245
  *
@@ -2302,6 +2336,30 @@ export declare interface StorageAdapter<T = unknown> {
2302
2336
  remove(): void | Promise<void>;
2303
2337
  }
2304
2338
 
2339
+ /**
2340
+ * Single structured validation error with a stable, locale-independent
2341
+ * `code` consumers can switch on programmatically.
2342
+ */
2343
+ export declare interface StructuredValidationError {
2344
+ /** Dot-path of the offending field (e.g. `'timestamp'`, `'dataSubject.email'`, `'options[0].purpose'`). */
2345
+ field: string;
2346
+ /** Stable, snake_case error code — safe to switch on across locales. */
2347
+ code: string;
2348
+ /** Human-readable English message — informational only; do not regex-match. */
2349
+ message: string;
2350
+ }
2351
+
2352
+ /**
2353
+ * Result of a structured validator. `errors` is an array (one entry per
2354
+ * failed rule). `data` is the narrowed, typed payload, only populated on
2355
+ * `valid: true`.
2356
+ */
2357
+ export declare interface StructuredValidationResult<T> {
2358
+ valid: boolean;
2359
+ errors: StructuredValidationError[];
2360
+ data?: T;
2361
+ }
2362
+
2305
2363
  /** Full context used to generate an adaptive privacy policy. */
2306
2364
  export declare interface TemplateContext {
2307
2365
  /** Organisation details, extended with industry and size. */
@@ -2444,6 +2502,7 @@ export declare const UNFILLED_SUFFIX = "\u00BB";
2444
2502
  * Validates consent settings to ensure they meet NDPA requirements
2445
2503
  * @param settings The consent settings to validate
2446
2504
  * @returns An object containing validation result and any error messages
2505
+ * @deprecated Use `validateConsentStructured()` for typed `{ field, code, message }[]` errors. The legacy string-returning shape will be removed in 5.0.
2447
2506
  */
2448
2507
  export declare function validateConsent(settings: ConsentSettings): {
2449
2508
  valid: boolean;
@@ -2456,12 +2515,50 @@ export declare function validateConsent(settings: ConsentSettings): {
2456
2515
  * as consent must be specific and informed per the Nigeria Data Protection Act.
2457
2516
  * @param options The consent options to validate
2458
2517
  * @returns An object containing validation result and any error messages
2518
+ * @deprecated Use `validateConsentOptionsStructured()` for typed `{ field, code, message }[]` errors. The legacy string-returning shape will be removed in 5.0.
2459
2519
  */
2460
2520
  export declare function validateConsentOptions(options: ConsentOption[]): {
2461
2521
  valid: boolean;
2462
2522
  errors: string[];
2463
2523
  };
2464
2524
 
2525
+ /**
2526
+ * Structured-result variant of {@link validateConsentOptions}. Each option
2527
+ * is checked for a non-empty `purpose` (NDPA Section 26). Failing options
2528
+ * are reported with `field: 'options[i].purpose'` so consumers can map
2529
+ * errors back to the originating option index.
2530
+ *
2531
+ * Codes emitted:
2532
+ * - `options_required` — empty / missing options array
2533
+ * - `purpose_required` — single option missing a purpose
2534
+ */
2535
+ export declare function validateConsentOptionsStructured(options: ConsentOption[]): StructuredValidationResult<ConsentOption[]>;
2536
+
2537
+ /**
2538
+ * Structured-result variant of {@link validateConsent}. Returns the same
2539
+ * checks as `{ field, code, message }[]` so consumers can switch on `code`
2540
+ * across locales without regex-matching English strings.
2541
+ *
2542
+ * Codes emitted:
2543
+ * - `consents_required`
2544
+ * - `timestamp_required`
2545
+ * - `timestamp_invalid`
2546
+ * - `version_required`
2547
+ * - `method_required`
2548
+ * - `has_interacted_required`
2549
+ * - `consent_stale`
2550
+ *
2551
+ * @example
2552
+ * ```ts
2553
+ * const { valid, errors, data } = validateConsentStructured(settings);
2554
+ * if (!valid) {
2555
+ * const stale = errors.find((e) => e.code === 'consent_stale');
2556
+ * if (stale) showRefreshBanner();
2557
+ * }
2558
+ * ```
2559
+ */
2560
+ export declare function validateConsentStructured(settings: ConsentSettings): StructuredValidationResult<ConsentSettings>;
2561
+
2465
2562
  /**
2466
2563
  * Validate a raw DSR submission payload against the same rules
2467
2564
  * `<DSRRequestForm />` enforces client-side. Designed to be called from a
@@ -2497,6 +2594,8 @@ export declare function validateConsentOptions(options: ConsentOption[]): {
2497
2594
  * ```ts
2498
2595
  * validateDsrSubmission(payload, { requireIdentityVerification: false });
2499
2596
  * ```
2597
+ *
2598
+ * @deprecated Use `validateDsrSubmissionStructured()` for typed `{ field, code, message }[]` errors. The legacy string-returning shape will be removed in 5.0.
2500
2599
  */
2501
2600
  export declare function validateDsrSubmission(payload: unknown, options?: ValidateDsrSubmissionOptions): DsrSubmissionValidationResult;
2502
2601
 
@@ -2517,6 +2616,42 @@ export declare interface ValidateDsrSubmissionOptions {
2517
2616
  allowedRequestTypes?: string[];
2518
2617
  }
2519
2618
 
2619
+ /**
2620
+ * Structured-result variant of {@link validateDsrSubmission}. Same rules,
2621
+ * but returns an array of `{ field, code, message }` so callers can switch
2622
+ * on `code` programmatically across locales.
2623
+ *
2624
+ * Codes emitted:
2625
+ * - `payload_not_object`
2626
+ * - `request_type_required`
2627
+ * - `request_type_not_allowed`
2628
+ * - `data_subject_required`
2629
+ * - `full_name_required`
2630
+ * - `email_required`
2631
+ * - `email_invalid_format`
2632
+ * - `phone_invalid_type`
2633
+ * - `identifier_type_required`
2634
+ * - `identifier_value_required`
2635
+ * - `submitted_at_invalid`
2636
+ * - `additional_info_invalid_type`
2637
+ * - `payload_final_narrowing_failed`
2638
+ *
2639
+ * @example **Next.js Route Handler**
2640
+ * ```ts
2641
+ * import { validateDsrSubmissionStructured } from '@tantainnovative/ndpr-toolkit/server';
2642
+ *
2643
+ * export async function POST(req: Request) {
2644
+ * const { valid, errors, data } = validateDsrSubmissionStructured(await req.json());
2645
+ * if (!valid) {
2646
+ * return Response.json({ errors }, { status: 422 });
2647
+ * }
2648
+ * await dsrStore.create(data);
2649
+ * return Response.json({ ok: true }, { status: 201 });
2650
+ * }
2651
+ * ```
2652
+ */
2653
+ export declare function validateDsrSubmissionStructured(payload: unknown, options?: ValidateDsrSubmissionOptions): StructuredValidationResult<DsrSubmissionPayload>;
2654
+
2520
2655
  /**
2521
2656
  * Validates that all required fields are present on a processing activity
2522
2657
  * and that the lawful basis is properly documented.
package/dist/server.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkR3CU7DTT_js=require('./chunk-R3CU7DTT.js'),chunk3XU6FL2I_js=require('./chunk-3XU6FL2I.js'),chunkNUOHT3LO_js=require('./chunk-NUOHT3LO.js'),chunkJS7SYL5P_js=require('./chunk-JS7SYL5P.js'),chunkRDALAH3Y_js=require('./chunk-RDALAH3Y.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkD2ZKDQVL_js=require('./chunk-D2ZKDQVL.js'),chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js'),chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkC2KEXHRX_js=require('./chunk-C2KEXHRX.js'),chunkB46SJB5V_js=require('./chunk-B46SJB5V.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkOZHUINWS_js=require('./chunk-OZHUINWS.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkTTMGFC6C_js=require('./chunk-TTMGFC6C.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"apiAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.a}});Object.defineProperty(exports,"composeAdapters",{enumerable:true,get:function(){return chunkR3CU7DTT_js.c}});Object.defineProperty(exports,"memoryAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.b}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunk3XU6FL2I_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunk3XU6FL2I_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunk3XU6FL2I_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunk3XU6FL2I_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunkNUOHT3LO_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"exportDOCX",{enumerable:true,get:function(){return chunkJS7SYL5P_js.d}});Object.defineProperty(exports,"exportHTML",{enumerable:true,get:function(){return chunkJS7SYL5P_js.a}});Object.defineProperty(exports,"exportMarkdown",{enumerable:true,get:function(){return chunkJS7SYL5P_js.b}});Object.defineProperty(exports,"exportPDF",{enumerable:true,get:function(){return chunkJS7SYL5P_js.c}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunkRDALAH3Y_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.b}});Object.defineProperty(exports,"DEFAULT_DATA_CATEGORIES",{enumerable:true,get:function(){return chunk6LJHLE6G_js.d}});Object.defineProperty(exports,"UNFILLED_PREFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.a}});Object.defineProperty(exports,"UNFILLED_SUFFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunk6LJHLE6G_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunk6LJHLE6G_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunk6LJHLE6G_js.f}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"cookieAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.b}});Object.defineProperty(exports,"sessionStorageAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.a}});Object.defineProperty(exports,"validateConsent",{enumerable:true,get:function(){return chunkB46SJB5V_js.a}});Object.defineProperty(exports,"validateConsentOptions",{enumerable:true,get:function(){return chunkB46SJB5V_js.b}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequest",{enumerable:true,get:function(){return chunkOZHUINWS_js.b}});Object.defineProperty(exports,"validateDsrSubmission",{enumerable:true,get:function(){return chunkOZHUINWS_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunkTTMGFC6C_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunkTTMGFC6C_js.b}});Object.defineProperty(exports,"localStorageAdapter",{enumerable:true,get:function(){return chunkVWED6UTN_js.a}});
1
+ 'use strict';var chunkR3CU7DTT_js=require('./chunk-R3CU7DTT.js'),chunk6YFPDGNB_js=require('./chunk-6YFPDGNB.js'),chunkNUOHT3LO_js=require('./chunk-NUOHT3LO.js'),chunkJS7SYL5P_js=require('./chunk-JS7SYL5P.js'),chunkRDALAH3Y_js=require('./chunk-RDALAH3Y.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkD2ZKDQVL_js=require('./chunk-D2ZKDQVL.js'),chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js'),chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkC2KEXHRX_js=require('./chunk-C2KEXHRX.js'),chunkD3HHDWBR_js=require('./chunk-D3HHDWBR.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunk45D7AMB3_js=require('./chunk-45D7AMB3.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkTTMGFC6C_js=require('./chunk-TTMGFC6C.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"apiAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.a}});Object.defineProperty(exports,"composeAdapters",{enumerable:true,get:function(){return chunkR3CU7DTT_js.c}});Object.defineProperty(exports,"memoryAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.b}});Object.defineProperty(exports,"arabicLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.e}});Object.defineProperty(exports,"frenchLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.f}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunkNUOHT3LO_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"exportDOCX",{enumerable:true,get:function(){return chunkJS7SYL5P_js.d}});Object.defineProperty(exports,"exportHTML",{enumerable:true,get:function(){return chunkJS7SYL5P_js.a}});Object.defineProperty(exports,"exportMarkdown",{enumerable:true,get:function(){return chunkJS7SYL5P_js.b}});Object.defineProperty(exports,"exportPDF",{enumerable:true,get:function(){return chunkJS7SYL5P_js.c}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunkRDALAH3Y_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.b}});Object.defineProperty(exports,"DEFAULT_DATA_CATEGORIES",{enumerable:true,get:function(){return chunk6LJHLE6G_js.d}});Object.defineProperty(exports,"UNFILLED_PREFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.a}});Object.defineProperty(exports,"UNFILLED_SUFFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunk6LJHLE6G_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunk6LJHLE6G_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunk6LJHLE6G_js.f}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"cookieAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.b}});Object.defineProperty(exports,"sessionStorageAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.a}});Object.defineProperty(exports,"validateConsent",{enumerable:true,get:function(){return chunkD3HHDWBR_js.a}});Object.defineProperty(exports,"validateConsentOptions",{enumerable:true,get:function(){return chunkD3HHDWBR_js.c}});Object.defineProperty(exports,"validateConsentOptionsStructured",{enumerable:true,get:function(){return chunkD3HHDWBR_js.d}});Object.defineProperty(exports,"validateConsentStructured",{enumerable:true,get:function(){return chunkD3HHDWBR_js.b}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequest",{enumerable:true,get:function(){return chunk45D7AMB3_js.b}});Object.defineProperty(exports,"formatDSRRequestStructured",{enumerable:true,get:function(){return chunk45D7AMB3_js.d}});Object.defineProperty(exports,"validateDsrSubmission",{enumerable:true,get:function(){return chunk45D7AMB3_js.a}});Object.defineProperty(exports,"validateDsrSubmissionStructured",{enumerable:true,get:function(){return chunk45D7AMB3_js.c}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunkTTMGFC6C_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunkTTMGFC6C_js.b}});Object.defineProperty(exports,"localStorageAdapter",{enumerable:true,get:function(){return chunkVWED6UTN_js.a}});
package/dist/server.mjs CHANGED
@@ -1 +1 @@
1
- export{a as apiAdapter,c as composeAdapters,b as memoryAdapter}from'./chunk-7PMPKVY3.mjs';export{c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-BGV2AKT7.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-CWY2FMIC.mjs';export{d as exportDOCX,a as exportHTML,b as exportMarkdown,c as exportPDF}from'./chunk-IVSNHT24.mjs';export{a as getComplianceScore}from'./chunk-7RBO42IW.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';export{d as DEFAULT_DATA_CATEGORIES,a as UNFILLED_PREFIX,b as UNFILLED_SUFFIX,c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{b as cookieAdapter,a as sessionStorageAdapter}from'./chunk-XC3DLYEG.mjs';export{a as validateConsent,b as validateConsentOptions}from'./chunk-PJNKQPQP.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequest,a as validateDsrSubmission}from'./chunk-VPNK7OID.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-V5TZJJWU.mjs';export{a as localStorageAdapter}from'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
1
+ export{a as apiAdapter,c as composeAdapters,b as memoryAdapter}from'./chunk-7PMPKVY3.mjs';export{e as arabicLocale,f as frenchLocale,c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-PSPYIRIF.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-CWY2FMIC.mjs';export{d as exportDOCX,a as exportHTML,b as exportMarkdown,c as exportPDF}from'./chunk-IVSNHT24.mjs';export{a as getComplianceScore}from'./chunk-7RBO42IW.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';export{d as DEFAULT_DATA_CATEGORIES,a as UNFILLED_PREFIX,b as UNFILLED_SUFFIX,c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{b as cookieAdapter,a as sessionStorageAdapter}from'./chunk-XC3DLYEG.mjs';export{a as validateConsent,c as validateConsentOptions,d as validateConsentOptionsStructured,b as validateConsentStructured}from'./chunk-NI54X543.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequest,d as formatDSRRequestStructured,a as validateDsrSubmission,c as validateDsrSubmissionStructured}from'./chunk-3APT25XO.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-V5TZJJWU.mjs';export{a as localStorageAdapter}from'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';