@nice2dev/ui-tools 1.0.10

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 (158) hide show
  1. package/README.md +36 -0
  2. package/dist/access-control.d.ts +726 -0
  3. package/dist/access-control.d.ts.map +1 -0
  4. package/dist/accessibility-i18n.d.ts +1017 -0
  5. package/dist/accessibility-i18n.d.ts.map +1 -0
  6. package/dist/ai-assistant.d.ts +263 -0
  7. package/dist/ai-assistant.d.ts.map +1 -0
  8. package/dist/ai-playgrounds.d.ts +842 -0
  9. package/dist/ai-playgrounds.d.ts.map +1 -0
  10. package/dist/alerting-incidents.d.ts +558 -0
  11. package/dist/alerting-incidents.d.ts.map +1 -0
  12. package/dist/api-designer.d.ts +1568 -0
  13. package/dist/api-designer.d.ts.map +1 -0
  14. package/dist/api-testing.d.ts +1146 -0
  15. package/dist/api-testing.d.ts.map +1 -0
  16. package/dist/apm-profiling.d.ts +656 -0
  17. package/dist/apm-profiling.d.ts.map +1 -0
  18. package/dist/artifacts.d.ts +421 -0
  19. package/dist/artifacts.d.ts.map +1 -0
  20. package/dist/audit-compliance.d.ts +752 -0
  21. package/dist/audit-compliance.d.ts.map +1 -0
  22. package/dist/certificates.d.ts +256 -0
  23. package/dist/certificates.d.ts.map +1 -0
  24. package/dist/chart-builder.d.ts +1404 -0
  25. package/dist/chart-builder.d.ts.map +1 -0
  26. package/dist/cloud-instances.d.ts +169 -0
  27. package/dist/cloud-instances.d.ts.map +1 -0
  28. package/dist/config-management.d.ts +350 -0
  29. package/dist/config-management.d.ts.map +1 -0
  30. package/dist/containers.d.ts +256 -0
  31. package/dist/containers.d.ts.map +1 -0
  32. package/dist/dashboard-designer.d.ts +1238 -0
  33. package/dist/dashboard-designer.d.ts.map +1 -0
  34. package/dist/data-management.d.ts +496 -0
  35. package/dist/data-management.d.ts.map +1 -0
  36. package/dist/data-pipeline.d.ts +1105 -0
  37. package/dist/data-pipeline.d.ts.map +1 -0
  38. package/dist/data-warehouse.d.ts +1097 -0
  39. package/dist/data-warehouse.d.ts.map +1 -0
  40. package/dist/dataset-management.d.ts +782 -0
  41. package/dist/dataset-management.d.ts.map +1 -0
  42. package/dist/db-adapters.d.ts +704 -0
  43. package/dist/db-adapters.d.ts.map +1 -0
  44. package/dist/db-admin.d.ts +699 -0
  45. package/dist/db-admin.d.ts.map +1 -0
  46. package/dist/db-designer.d.ts +366 -0
  47. package/dist/db-designer.d.ts.map +1 -0
  48. package/dist/debugger.d.ts +356 -0
  49. package/dist/debugger.d.ts.map +1 -0
  50. package/dist/device-management.d.ts +871 -0
  51. package/dist/device-management.d.ts.map +1 -0
  52. package/dist/distributed-tracing.d.ts +427 -0
  53. package/dist/distributed-tracing.d.ts.map +1 -0
  54. package/dist/dns-management.d.ts +215 -0
  55. package/dist/dns-management.d.ts.map +1 -0
  56. package/dist/download-manager.d.ts +271 -0
  57. package/dist/download-manager.d.ts.map +1 -0
  58. package/dist/download-torrent.d.ts +1062 -0
  59. package/dist/download-torrent.d.ts.map +1 -0
  60. package/dist/edge-computing.d.ts +720 -0
  61. package/dist/edge-computing.d.ts.map +1 -0
  62. package/dist/education.d.ts +1135 -0
  63. package/dist/education.d.ts.map +1 -0
  64. package/dist/email-template.d.ts +1141 -0
  65. package/dist/email-template.d.ts.map +1 -0
  66. package/dist/erp-enterprise.d.ts +1270 -0
  67. package/dist/erp-enterprise.d.ts.map +1 -0
  68. package/dist/form-builder.d.ts +1117 -0
  69. package/dist/form-builder.d.ts.map +1 -0
  70. package/dist/game-engine-advanced.d.ts +1049 -0
  71. package/dist/game-engine-advanced.d.ts.map +1 -0
  72. package/dist/git.d.ts +415 -0
  73. package/dist/git.d.ts.map +1 -0
  74. package/dist/hardware-integration.d.ts +966 -0
  75. package/dist/hardware-integration.d.ts.map +1 -0
  76. package/dist/iac.d.ts +318 -0
  77. package/dist/iac.d.ts.map +1 -0
  78. package/dist/icon-tools.d.ts +1023 -0
  79. package/dist/icon-tools.d.ts.map +1 -0
  80. package/dist/ide.d.ts +322 -0
  81. package/dist/ide.d.ts.map +1 -0
  82. package/dist/index.cjs +2 -0
  83. package/dist/index.cjs.map +1 -0
  84. package/dist/index.d.ts +176 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.mjs +1887 -0
  87. package/dist/index.mjs.map +1 -0
  88. package/dist/integration-platform.d.ts +857 -0
  89. package/dist/integration-platform.d.ts.map +1 -0
  90. package/dist/kubernetes.d.ts +278 -0
  91. package/dist/kubernetes.d.ts.map +1 -0
  92. package/dist/life-management.d.ts +1132 -0
  93. package/dist/life-management.d.ts.map +1 -0
  94. package/dist/log-management.d.ts +473 -0
  95. package/dist/log-management.d.ts.map +1 -0
  96. package/dist/mathematics.d.ts +870 -0
  97. package/dist/mathematics.d.ts.map +1 -0
  98. package/dist/message-queue.d.ts +1006 -0
  99. package/dist/message-queue.d.ts.map +1 -0
  100. package/dist/metrics-dashboard.d.ts +596 -0
  101. package/dist/metrics-dashboard.d.ts.map +1 -0
  102. package/dist/mobile-components.d.ts +766 -0
  103. package/dist/mobile-components.d.ts.map +1 -0
  104. package/dist/model-deployment.d.ts +787 -0
  105. package/dist/model-deployment.d.ts.map +1 -0
  106. package/dist/model-registry.d.ts +740 -0
  107. package/dist/model-registry.d.ts.map +1 -0
  108. package/dist/model-training.d.ts +706 -0
  109. package/dist/model-training.d.ts.map +1 -0
  110. package/dist/network-config.d.ts +334 -0
  111. package/dist/network-config.d.ts.map +1 -0
  112. package/dist/network-monitoring.d.ts +291 -0
  113. package/dist/network-monitoring.d.ts.map +1 -0
  114. package/dist/pdf-tools.d.ts +1003 -0
  115. package/dist/pdf-tools.d.ts.map +1 -0
  116. package/dist/pipelines.d.ts +250 -0
  117. package/dist/pipelines.d.ts.map +1 -0
  118. package/dist/remote-desktop.d.ts +207 -0
  119. package/dist/remote-desktop.d.ts.map +1 -0
  120. package/dist/report-designer.d.ts +1153 -0
  121. package/dist/report-designer.d.ts.map +1 -0
  122. package/dist/scada-industrial.d.ts +848 -0
  123. package/dist/scada-industrial.d.ts.map +1 -0
  124. package/dist/scientific-research.d.ts +1149 -0
  125. package/dist/scientific-research.d.ts.map +1 -0
  126. package/dist/secret-management.d.ts +617 -0
  127. package/dist/secret-management.d.ts.map +1 -0
  128. package/dist/security-scanning.d.ts +714 -0
  129. package/dist/security-scanning.d.ts.map +1 -0
  130. package/dist/self-service-analytics.d.ts +1208 -0
  131. package/dist/self-service-analytics.d.ts.map +1 -0
  132. package/dist/sensor-dashboard.d.ts +845 -0
  133. package/dist/sensor-dashboard.d.ts.map +1 -0
  134. package/dist/server-management.d.ts +331 -0
  135. package/dist/server-management.d.ts.map +1 -0
  136. package/dist/smart-home.d.ts +861 -0
  137. package/dist/smart-home.d.ts.map +1 -0
  138. package/dist/spreadsheet.d.ts +1043 -0
  139. package/dist/spreadsheet.d.ts.map +1 -0
  140. package/dist/sql-editor.d.ts +402 -0
  141. package/dist/sql-editor.d.ts.map +1 -0
  142. package/dist/terminal.d.ts +245 -0
  143. package/dist/terminal.d.ts.map +1 -0
  144. package/dist/testing-qa.d.ts +1013 -0
  145. package/dist/testing-qa.d.ts.map +1 -0
  146. package/dist/torrent-client.d.ts +298 -0
  147. package/dist/torrent-client.d.ts.map +1 -0
  148. package/dist/traceless.d.ts +759 -0
  149. package/dist/traceless.d.ts.map +1 -0
  150. package/dist/virtual-machines.d.ts +199 -0
  151. package/dist/virtual-machines.d.ts.map +1 -0
  152. package/dist/visual-scripting.d.ts +381 -0
  153. package/dist/visual-scripting.d.ts.map +1 -0
  154. package/dist/word-processor.d.ts +1124 -0
  155. package/dist/word-processor.d.ts.map +1 -0
  156. package/dist/workspace.d.ts +333 -0
  157. package/dist/workspace.d.ts.map +1 -0
  158. package/package.json +62 -0
@@ -0,0 +1,759 @@
1
+ /**
2
+ * @fileoverview SEC-008: Traceless™ — Zero-Trace Privacy Architecture
3
+ *
4
+ * "Your ERP. Zero traces. No cookie banners. Ever."
5
+ *
6
+ * This module provides TypeScript types and interfaces for the Traceless™
7
+ * privacy architecture - a flagship feature that allows enterprise applications
8
+ * to operate with zero client-side storage when required.
9
+ *
10
+ * @module @nice2dev/ui-tools/traceless
11
+ */
12
+ /**
13
+ * Privacy mode levels from most restrictive to least restrictive.
14
+ *
15
+ * - `traceless`: Zero client-side storage. In-memory only. Full privacy.
16
+ * - `ephemeral`: sessionStorage only. Cleared on tab close.
17
+ * - `private`: sessionStorage + 1 httpOnly auth cookie.
18
+ * - `balanced`: sessionStorage + localStorage. No cookies.
19
+ * - `full`: All storage types including cookies. Requires consent banner.
20
+ * - `custom`: Manually configured storage permissions.
21
+ */
22
+ export type TracelessMode = 'traceless' | 'ephemeral' | 'private' | 'balanced' | 'full' | 'custom';
23
+ /**
24
+ * Storage capability flags for granular control.
25
+ */
26
+ export interface StorageCapabilities {
27
+ /** Whether cookies are allowed */
28
+ cookiesAllowed: boolean;
29
+ /** Whether localStorage is allowed */
30
+ localStorageAllowed: boolean;
31
+ /** Whether sessionStorage is allowed */
32
+ sessionStorageAllowed: boolean;
33
+ /** Whether IndexedDB is allowed */
34
+ indexedDBAllowed?: boolean;
35
+ /** Whether Web SQL is allowed (deprecated but still used) */
36
+ webSQLAllowed?: boolean;
37
+ /** Whether Service Workers can cache data */
38
+ serviceWorkerCacheAllowed?: boolean;
39
+ }
40
+ /**
41
+ * Main Traceless Policy interface - injected per-request.
42
+ */
43
+ export interface ITracelessPolicy extends StorageCapabilities {
44
+ /** Effective mode after resolution */
45
+ effectiveMode: TracelessMode;
46
+ /** Whether consent banner is required */
47
+ consentRequired: boolean;
48
+ /** Whether any form of persistence is allowed */
49
+ canPersist: boolean;
50
+ /** Source of the policy (instance, tenant, group, user) */
51
+ policySource: PolicySource;
52
+ /** Timestamp when policy was resolved */
53
+ resolvedAt: string;
54
+ /** Cache TTL in seconds */
55
+ cacheTTL?: number;
56
+ }
57
+ /**
58
+ * Source of the privacy policy in the hierarchy.
59
+ */
60
+ export type PolicySource = 'instance' | 'tenant' | 'group' | 'user' | 'module' | 'computed';
61
+ /**
62
+ * Instance-level ceiling - the maximum permissions any tenant can have.
63
+ */
64
+ export interface InstanceStorageCeiling {
65
+ /** Maximum cookies permission for the instance */
66
+ maxCookies: boolean;
67
+ /** Maximum localStorage permission for the instance */
68
+ maxLocalStorage: boolean;
69
+ /** Maximum sessionStorage permission for the instance */
70
+ maxSessionStorage: boolean;
71
+ /** Maximum IndexedDB permission */
72
+ maxIndexedDB?: boolean;
73
+ /** Description of why ceiling is set this way */
74
+ reason?: string;
75
+ /** Who set this ceiling */
76
+ configuredBy?: string;
77
+ /** When ceiling was last modified */
78
+ lastModified?: string;
79
+ }
80
+ /**
81
+ * Tenant-level policy configuration.
82
+ */
83
+ export interface TenantStoragePolicy {
84
+ /** Tenant identifier */
85
+ tenantId: string;
86
+ /** Tenant's chosen privacy mode (must be <= instance ceiling) */
87
+ mode: TracelessMode;
88
+ /** Override for cookies (cannot exceed instance ceiling) */
89
+ cookiesAllowed?: boolean;
90
+ /** Override for localStorage (cannot exceed instance ceiling) */
91
+ localStorageAllowed?: boolean;
92
+ /** Override for sessionStorage (cannot exceed instance ceiling) */
93
+ sessionStorageAllowed?: boolean;
94
+ /** Default mode for new users */
95
+ defaultUserMode?: TracelessMode;
96
+ /** Whether users can adjust their privacy level */
97
+ userAdjustmentAllowed: boolean;
98
+ /** Minimum mode users must have (cannot go more permissive) */
99
+ minimumUserMode?: TracelessMode;
100
+ }
101
+ /**
102
+ * User group policy configuration.
103
+ */
104
+ export interface GroupStoragePolicy {
105
+ /** Group identifier */
106
+ groupId: string;
107
+ /** Group name for display */
108
+ groupName: string;
109
+ /** Privacy mode for this group */
110
+ mode: TracelessMode;
111
+ /** Custom storage capabilities for the group */
112
+ capabilities?: Partial<StorageCapabilities>;
113
+ /** Whether users in this group can adjust their level */
114
+ userAdjustmentAllowed: boolean;
115
+ /** Priority when user belongs to multiple groups */
116
+ priority: number;
117
+ }
118
+ /**
119
+ * User-level privacy preferences (self-lockdown).
120
+ */
121
+ export interface UserPrivacyPreferences {
122
+ /** User identifier */
123
+ userId: string;
124
+ /** User's chosen mode (can only be more restrictive than group) */
125
+ mode: TracelessMode;
126
+ /** Custom restrictions */
127
+ restrictions?: Partial<StorageCapabilities>;
128
+ /** When user last modified their preferences */
129
+ lastModified: string;
130
+ /** Device-specific overrides */
131
+ deviceOverrides?: Record<string, TracelessMode>;
132
+ }
133
+ /**
134
+ * Module minimum storage requirements.
135
+ */
136
+ export interface ModuleStorageRequirement {
137
+ /** Module identifier */
138
+ moduleId: string;
139
+ /** Module name */
140
+ moduleName: string;
141
+ /** Minimum storage needed for basic functionality */
142
+ minStorageRequirement: Partial<StorageCapabilities>;
143
+ /** Features that degrade gracefully without storage */
144
+ degradableFeatures: DegradableFeature[];
145
+ /** Features that are completely disabled without storage */
146
+ disabledFeatures: string[];
147
+ /** Warning message when storage is insufficient */
148
+ insufficientStorageWarning?: string;
149
+ }
150
+ /**
151
+ * A feature that can work with reduced functionality.
152
+ */
153
+ export interface DegradableFeature {
154
+ /** Feature identifier */
155
+ featureId: string;
156
+ /** Feature name */
157
+ name: string;
158
+ /** Description of full functionality */
159
+ fullDescription: string;
160
+ /** Description of degraded functionality */
161
+ degradedDescription: string;
162
+ /** What storage is needed for full functionality */
163
+ requiredStorage: Partial<StorageCapabilities>;
164
+ /** Impact level when degraded */
165
+ degradedImpact: 'minor' | 'moderate' | 'significant';
166
+ }
167
+ /**
168
+ * Policy resolution request.
169
+ */
170
+ export interface PolicyResolutionRequest {
171
+ /** Tenant context */
172
+ tenantId?: string;
173
+ /** User context */
174
+ userId?: string;
175
+ /** Device identifier for device-specific policies */
176
+ deviceId?: string;
177
+ /** Module requesting the policy */
178
+ moduleId?: string;
179
+ /** Whether to include detailed resolution trace */
180
+ includeTrace?: boolean;
181
+ }
182
+ /**
183
+ * Policy resolution response with computed policy.
184
+ */
185
+ export interface PolicyResolutionResponse {
186
+ /** The computed effective policy */
187
+ policy: ITracelessPolicy;
188
+ /** Resolution trace showing how policy was computed */
189
+ trace?: PolicyResolutionTrace;
190
+ /** Warnings about capability limitations */
191
+ warnings?: PolicyWarning[];
192
+ /** Cache key for this resolution */
193
+ cacheKey?: string;
194
+ }
195
+ /**
196
+ * Trace of how policy was resolved through the hierarchy.
197
+ */
198
+ export interface PolicyResolutionTrace {
199
+ /** Instance ceiling that was applied */
200
+ instanceCeiling: InstanceStorageCeiling;
201
+ /** Tenant policy that was applied */
202
+ tenantPolicy?: TenantStoragePolicy;
203
+ /** Group policies that were considered (in priority order) */
204
+ groupPolicies?: GroupStoragePolicy[];
205
+ /** User preferences that were applied */
206
+ userPreferences?: UserPrivacyPreferences;
207
+ /** Module requirements that were checked */
208
+ moduleRequirements?: ModuleStorageRequirement[];
209
+ /** Final computed result */
210
+ computedResult: ITracelessPolicy;
211
+ /** Resolution timestamp */
212
+ resolvedAt: string;
213
+ }
214
+ /**
215
+ * Warning about policy limitations.
216
+ */
217
+ export interface PolicyWarning {
218
+ /** Warning code */
219
+ code: string;
220
+ /** Warning message */
221
+ message: string;
222
+ /** Severity of the warning */
223
+ severity: 'info' | 'warning' | 'error';
224
+ /** Affected module or feature */
225
+ affectedModule?: string;
226
+ /** Suggestion for resolution */
227
+ suggestion?: string;
228
+ }
229
+ /**
230
+ * Storage backend types.
231
+ */
232
+ export type StorageBackend = 'memory' | 'sessionStorage' | 'localStorage' | 'indexedDB' | 'cookie';
233
+ /**
234
+ * Unified Storage Adapter interface for all platforms.
235
+ */
236
+ export interface IStorageAdapter {
237
+ /** Get a value by key */
238
+ get<T = unknown>(key: string): T | null;
239
+ /** Get a value asynchronously (for IndexedDB) */
240
+ getAsync<T = unknown>(key: string): Promise<T | null>;
241
+ /** Set a value */
242
+ set<T = unknown>(key: string, value: T): void;
243
+ /** Set a value asynchronously */
244
+ setAsync<T = unknown>(key: string, value: T): Promise<void>;
245
+ /** Remove a value */
246
+ remove(key: string): void;
247
+ /** Remove a value asynchronously */
248
+ removeAsync(key: string): Promise<void>;
249
+ /** Clear all values (within namespace) */
250
+ clear(): void;
251
+ /** Clear all values asynchronously */
252
+ clearAsync(): Promise<void>;
253
+ /** Check if a key exists */
254
+ has(key: string): boolean;
255
+ /** Get all keys (within namespace) */
256
+ keys(): string[];
257
+ /** Get the current storage backend being used */
258
+ getCurrentBackend(): StorageBackend;
259
+ /** Check if storage is available */
260
+ isAvailable(): boolean;
261
+ }
262
+ /**
263
+ * Storage adapter configuration.
264
+ */
265
+ export interface StorageAdapterConfig {
266
+ /** Namespace prefix for all keys */
267
+ namespace: string;
268
+ /** Policy to respect */
269
+ policy: ITracelessPolicy;
270
+ /** Preferred backend (will fallback if not available) */
271
+ preferredBackend?: StorageBackend;
272
+ /** Whether to encrypt values */
273
+ encrypt?: boolean;
274
+ /** Encryption key (required if encrypt is true) */
275
+ encryptionKey?: string;
276
+ /** Default TTL for values in seconds */
277
+ defaultTTL?: number;
278
+ /** Event handlers */
279
+ onStorageUnavailable?: (requestedBackend: StorageBackend) => void;
280
+ onValueExpired?: (key: string) => void;
281
+ onPolicyViolation?: (operation: string, requestedBackend: StorageBackend) => void;
282
+ }
283
+ /**
284
+ * Storage item with metadata.
285
+ */
286
+ export interface StorageItem<T = unknown> {
287
+ /** The stored value */
288
+ value: T;
289
+ /** When the item was created */
290
+ createdAt: string;
291
+ /** When the item was last accessed */
292
+ lastAccessedAt?: string;
293
+ /** When the item expires (if applicable) */
294
+ expiresAt?: string;
295
+ /** Which backend is storing this item */
296
+ backend: StorageBackend;
297
+ /** Whether the item is encrypted */
298
+ encrypted: boolean;
299
+ }
300
+ /**
301
+ * React hook return type for useTracelessPolicy.
302
+ */
303
+ export interface UseTracelessPolicyResult extends ITracelessPolicy {
304
+ /** Whether policy is still loading */
305
+ isLoading: boolean;
306
+ /** Error if policy couldn't be loaded */
307
+ error: Error | null;
308
+ /** Refresh the policy */
309
+ refresh: () => Promise<void>;
310
+ /** Check if a specific operation is allowed */
311
+ isAllowed: (operation: StorageOperation) => boolean;
312
+ }
313
+ /**
314
+ * Storage operations that can be checked.
315
+ */
316
+ export type StorageOperation = 'setCookie' | 'readCookie' | 'setLocalStorage' | 'readLocalStorage' | 'setSessionStorage' | 'readSessionStorage' | 'useIndexedDB' | 'useServiceWorker';
317
+ /**
318
+ * Props for traceless-aware components.
319
+ */
320
+ export interface TracelessAwareProps {
321
+ /** Whether this component can use cookies */
322
+ cookies?: boolean;
323
+ /** Whether this component can use localStorage */
324
+ localStorage?: boolean;
325
+ /** Storage mode override */
326
+ storageMode?: 'traceless' | 'ephemeral' | 'persistent' | 'auto';
327
+ }
328
+ /**
329
+ * Context value for TracelessProvider.
330
+ */
331
+ export interface TracelessContextValue {
332
+ /** Current policy */
333
+ policy: ITracelessPolicy;
334
+ /** Storage adapter instance */
335
+ storageAdapter: IStorageAdapter;
336
+ /** Update user preferences */
337
+ updatePreferences: (prefs: Partial<UserPrivacyPreferences>) => Promise<void>;
338
+ /** Check if mode change is allowed */
339
+ canChangeTo: (mode: TracelessMode) => boolean;
340
+ }
341
+ /**
342
+ * Flutter storage adapter configuration.
343
+ */
344
+ export interface FlutterStorageAdapterConfig {
345
+ /** Namespace for SharedPreferences keys */
346
+ namespace: string;
347
+ /** Policy to respect */
348
+ policy: ITracelessPolicy;
349
+ /** Use flutter_secure_storage for sensitive data */
350
+ useSecureStorage: boolean;
351
+ /** Use Hive for complex data structures */
352
+ useHive: boolean;
353
+ /** Hive box name */
354
+ hiveBoxName?: string;
355
+ }
356
+ /**
357
+ * Storage scope for different component types.
358
+ */
359
+ export interface ComponentStorageScope {
360
+ /** Component type identifier */
361
+ componentType: string;
362
+ /** What data this component wants to store */
363
+ dataCategories: ComponentDataCategory[];
364
+ /** Required storage for basic functionality */
365
+ requiredStorage: Partial<StorageCapabilities>;
366
+ /** Behavior when storage is restricted */
367
+ restrictedBehavior: RestrictedBehavior;
368
+ }
369
+ /**
370
+ * Categories of data components might store.
371
+ */
372
+ export type ComponentDataCategory = 'layout' | 'filters' | 'sorting' | 'selection' | 'view' | 'draft' | 'preferences' | 'history' | 'cache' | 'session' | 'auth';
373
+ /**
374
+ * How component behaves when storage is restricted.
375
+ */
376
+ export interface RestrictedBehavior {
377
+ /** Behavior in traceless mode */
378
+ traceless: GracefulDegradation;
379
+ /** Behavior in ephemeral mode */
380
+ ephemeral: GracefulDegradation;
381
+ /** Behavior in private mode */
382
+ private: GracefulDegradation;
383
+ }
384
+ /**
385
+ * Graceful degradation configuration.
386
+ */
387
+ export interface GracefulDegradation {
388
+ /** What features work */
389
+ availableFeatures: string[];
390
+ /** What features are disabled */
391
+ disabledFeatures: string[];
392
+ /** Warning message to show user */
393
+ userWarning?: string;
394
+ /** Default values to use */
395
+ defaults: Record<string, unknown>;
396
+ }
397
+ /**
398
+ * NiceDataGrid storage config.
399
+ */
400
+ export interface DataGridStorageConfig extends TracelessAwareProps {
401
+ /** What to store */
402
+ persist?: {
403
+ columnOrder?: boolean;
404
+ columnWidths?: boolean;
405
+ sortState?: boolean;
406
+ filterState?: boolean;
407
+ pageSize?: boolean;
408
+ hiddenColumns?: boolean;
409
+ };
410
+ /** Storage key for this grid instance */
411
+ storageKey?: string;
412
+ }
413
+ /**
414
+ * NiceKanban storage config.
415
+ */
416
+ export interface KanbanStorageConfig extends TracelessAwareProps {
417
+ /** What to store */
418
+ persist?: {
419
+ collapsedColumns?: boolean;
420
+ swimlaneState?: boolean;
421
+ filterState?: boolean;
422
+ scrollPosition?: boolean;
423
+ };
424
+ /** Storage key for this board instance */
425
+ storageKey?: string;
426
+ }
427
+ /**
428
+ * NiceRichTextEditor storage config.
429
+ */
430
+ export interface RichTextEditorStorageConfig extends TracelessAwareProps {
431
+ /** Auto-save draft configuration */
432
+ autosave?: {
433
+ enabled: boolean;
434
+ intervalMs: number;
435
+ maxDrafts: number;
436
+ };
437
+ /** Storage key for drafts */
438
+ draftKey?: string;
439
+ /** Warning when draft might be lost */
440
+ showDraftLossWarning?: boolean;
441
+ }
442
+ /**
443
+ * NiceCalendar storage config.
444
+ */
445
+ export interface CalendarStorageConfig extends TracelessAwareProps {
446
+ /** What to store */
447
+ persist?: {
448
+ viewMode?: boolean;
449
+ selectedDate?: boolean;
450
+ timezone?: boolean;
451
+ hiddenCalendars?: boolean;
452
+ };
453
+ /** Fall back to these defaults when no storage */
454
+ defaults?: {
455
+ viewMode?: 'day' | 'week' | 'month' | 'year';
456
+ showWeekends?: boolean;
457
+ };
458
+ }
459
+ /**
460
+ * NiceLoginForm storage config.
461
+ */
462
+ export interface LoginFormStorageConfig extends TracelessAwareProps {
463
+ /** Whether "Remember me" option is shown */
464
+ showRememberMe?: boolean;
465
+ /** Whether to remember username */
466
+ rememberUsername?: boolean;
467
+ /** Cookie expiration for "Remember me" in days */
468
+ rememberMeDays?: number;
469
+ }
470
+ /**
471
+ * Consent state for cookie/storage usage.
472
+ */
473
+ export interface ConsentState {
474
+ /** Whether any consent has been given */
475
+ hasConsent: boolean;
476
+ /** Consent version (for managing consent changes) */
477
+ consentVersion: string;
478
+ /** When consent was last updated */
479
+ consentUpdatedAt: string;
480
+ /** Granular consent choices */
481
+ choices: ConsentChoices;
482
+ }
483
+ /**
484
+ * Granular consent choices.
485
+ */
486
+ export interface ConsentChoices {
487
+ /** Strictly necessary (cannot be disabled) */
488
+ necessary: true;
489
+ /** Functional cookies */
490
+ functional?: boolean;
491
+ /** Analytics cookies */
492
+ analytics?: boolean;
493
+ /** Marketing/targeting cookies */
494
+ marketing?: boolean;
495
+ /** Third-party cookies */
496
+ thirdParty?: boolean;
497
+ /** Custom consent categories */
498
+ custom?: Record<string, boolean>;
499
+ }
500
+ /**
501
+ * Consent panel configuration.
502
+ */
503
+ export interface ConsentPanelConfig {
504
+ /** Privacy mode determines if panel is shown */
505
+ policyMode: TracelessMode;
506
+ /** Available consent categories */
507
+ categories: ConsentCategory[];
508
+ /** Privacy policy URL */
509
+ privacyPolicyUrl?: string;
510
+ /** Cookie policy URL */
511
+ cookiePolicyUrl?: string;
512
+ /** Position of the banner */
513
+ position?: 'top' | 'bottom' | 'center';
514
+ /** Theme */
515
+ theme?: 'light' | 'dark' | 'auto';
516
+ /** Text customization */
517
+ text?: ConsentPanelText;
518
+ }
519
+ /**
520
+ * Consent category definition.
521
+ */
522
+ export interface ConsentCategory {
523
+ /** Category identifier */
524
+ id: string;
525
+ /** Display name */
526
+ name: string;
527
+ /** Description */
528
+ description: string;
529
+ /** Whether category is required */
530
+ required: boolean;
531
+ /** Default state if not required */
532
+ defaultEnabled?: boolean;
533
+ /** Cookies/storage used by this category */
534
+ items?: ConsentItem[];
535
+ }
536
+ /**
537
+ * Individual consent item (cookie or storage key).
538
+ */
539
+ export interface ConsentItem {
540
+ /** Item name */
541
+ name: string;
542
+ /** Provider/domain */
543
+ provider: string;
544
+ /** Purpose */
545
+ purpose: string;
546
+ /** Expiry */
547
+ expiry?: string;
548
+ /** Type */
549
+ type: 'cookie' | 'localStorage' | 'sessionStorage' | 'indexedDB';
550
+ }
551
+ /**
552
+ * Text customization for consent panel.
553
+ */
554
+ export interface ConsentPanelText {
555
+ /** Banner title */
556
+ title?: string;
557
+ /** Banner description */
558
+ description?: string;
559
+ /** Accept all button */
560
+ acceptAll?: string;
561
+ /** Reject all button */
562
+ rejectAll?: string;
563
+ /** Customize button */
564
+ customize?: string;
565
+ /** Save preferences button */
566
+ savePreferences?: string;
567
+ }
568
+ /**
569
+ * Privacy policy change audit entry.
570
+ */
571
+ export interface PolicyAuditEntry {
572
+ /** Entry ID */
573
+ id: string;
574
+ /** Timestamp */
575
+ timestamp: string;
576
+ /** Who made the change */
577
+ changedBy: string;
578
+ /** What changed */
579
+ changeType: PolicyChangeType;
580
+ /** Previous mode */
581
+ previousMode?: TracelessMode;
582
+ /** New mode */
583
+ newMode?: TracelessMode;
584
+ /** Previous capabilities */
585
+ previousCapabilities?: Partial<StorageCapabilities>;
586
+ /** New capabilities */
587
+ newCapabilities?: Partial<StorageCapabilities>;
588
+ /** Reason for change */
589
+ reason?: string;
590
+ /** IP address */
591
+ ipAddress?: string;
592
+ /** User agent */
593
+ userAgent?: string;
594
+ /** Additional metadata */
595
+ metadata?: Record<string, unknown>;
596
+ }
597
+ /**
598
+ * Types of policy changes.
599
+ */
600
+ export type PolicyChangeType = 'mode_change' | 'capability_change' | 'user_lockdown' | 'admin_override' | 'tenant_policy_update' | 'instance_ceiling_update' | 'group_policy_update';
601
+ /**
602
+ * Compliance report for Traceless mode.
603
+ */
604
+ export interface TracelessComplianceReport {
605
+ /** Report ID */
606
+ reportId: string;
607
+ /** Generated timestamp */
608
+ generatedAt: string;
609
+ /** Instance identifier */
610
+ instanceId: string;
611
+ /** Tenant identifier */
612
+ tenantId?: string;
613
+ /** Current mode */
614
+ mode: TracelessMode;
615
+ /** Storage capabilities summary */
616
+ storageCapabilities: StorageCapabilities;
617
+ /** Cookie count (should be 0 in traceless) */
618
+ cookieCount: number;
619
+ /** localStorage keys count */
620
+ localStorageKeys: number;
621
+ /** sessionStorage keys count */
622
+ sessionStorageKeys: number;
623
+ /** Whether consent banner is required */
624
+ consentBannerRequired: boolean;
625
+ /** Compliance statements */
626
+ complianceStatements: ComplianceStatement[];
627
+ /** Legal disclaimer */
628
+ legalDisclaimer: string;
629
+ }
630
+ /**
631
+ * Compliance statement for regulations.
632
+ */
633
+ export interface ComplianceStatement {
634
+ /** Regulation name */
635
+ regulation: string;
636
+ /** Relevant article/section */
637
+ article?: string;
638
+ /** Compliance status */
639
+ status: 'compliant' | 'exempt' | 'requires_review';
640
+ /** Explanation */
641
+ explanation: string;
642
+ }
643
+ /**
644
+ * Privacy API endpoint definitions.
645
+ */
646
+ export interface PrivacyAPI {
647
+ /** Get effective policy */
648
+ getPolicy: () => Promise<ITracelessPolicy>;
649
+ /** Update user preferences */
650
+ updatePolicy: (prefs: Partial<UserPrivacyPreferences>) => Promise<ITracelessPolicy>;
651
+ /** Get capabilities for current mode */
652
+ getCapabilities: () => Promise<StorageCapabilities>;
653
+ /** Get audit log */
654
+ getAuditLog: (params: AuditLogParams) => Promise<PolicyAuditEntry[]>;
655
+ /** Generate compliance report */
656
+ generateComplianceReport: () => Promise<TracelessComplianceReport>;
657
+ }
658
+ /**
659
+ * Audit log query parameters.
660
+ */
661
+ export interface AuditLogParams {
662
+ /** Start date */
663
+ from?: string;
664
+ /** End date */
665
+ to?: string;
666
+ /** Filter by user */
667
+ userId?: string;
668
+ /** Filter by change type */
669
+ changeType?: PolicyChangeType;
670
+ /** Page number */
671
+ page?: number;
672
+ /** Page size */
673
+ pageSize?: number;
674
+ }
675
+ /**
676
+ * Storage scanner configuration for CI/CD.
677
+ */
678
+ export interface StorageScannerConfig {
679
+ /** Base URL to scan */
680
+ baseUrl: string;
681
+ /** Pages to visit */
682
+ pages: string[];
683
+ /** Expected mode */
684
+ expectedMode: TracelessMode;
685
+ /** Whether to fail on any cookie */
686
+ failOnCookie: boolean;
687
+ /** Whether to fail on any localStorage */
688
+ failOnLocalStorage: boolean;
689
+ /** Whether to fail on any sessionStorage */
690
+ failOnSessionStorage: boolean;
691
+ /** Timeout per page in ms */
692
+ pageTimeout: number;
693
+ /** Output format */
694
+ outputFormat: 'json' | 'junit' | 'console';
695
+ }
696
+ /**
697
+ * Storage scan result.
698
+ */
699
+ export interface StorageScanResult {
700
+ /** Scan timestamp */
701
+ timestamp: string;
702
+ /** Base URL scanned */
703
+ baseUrl: string;
704
+ /** Pages scanned */
705
+ pagesScanned: number;
706
+ /** Overall pass/fail */
707
+ passed: boolean;
708
+ /** Violations found */
709
+ violations: StorageViolation[];
710
+ /** Summary statistics */
711
+ summary: StorageScanSummary;
712
+ }
713
+ /**
714
+ * A storage violation found during scan.
715
+ */
716
+ export interface StorageViolation {
717
+ /** Page URL where violation occurred */
718
+ pageUrl: string;
719
+ /** Type of violation */
720
+ type: 'cookie' | 'localStorage' | 'sessionStorage' | 'indexedDB';
721
+ /** Key name */
722
+ key: string;
723
+ /** Value (may be truncated) */
724
+ value?: string;
725
+ /** Likely source/framework */
726
+ suspectedSource?: string;
727
+ /** Severity */
728
+ severity: 'critical' | 'high' | 'medium' | 'low';
729
+ }
730
+ /**
731
+ * Scan summary statistics.
732
+ */
733
+ export interface StorageScanSummary {
734
+ /** Total cookies found */
735
+ totalCookies: number;
736
+ /** Total localStorage keys */
737
+ totalLocalStorageKeys: number;
738
+ /** Total sessionStorage keys */
739
+ totalSessionStorageKeys: number;
740
+ /** Total IndexedDB databases */
741
+ totalIndexedDBDatabases: number;
742
+ /** Total violations */
743
+ totalViolations: number;
744
+ /** Violations by severity */
745
+ violationsBySeverity: Record<string, number>;
746
+ }
747
+ /**
748
+ * Default traceless policy - maximum privacy.
749
+ */
750
+ export declare const DEFAULT_TRACELESS_POLICY: ITracelessPolicy;
751
+ /**
752
+ * Default full policy - all storage allowed.
753
+ */
754
+ export declare const DEFAULT_FULL_POLICY: ITracelessPolicy;
755
+ /**
756
+ * Mode to capabilities mapping.
757
+ */
758
+ export declare const MODE_CAPABILITIES: Record<TracelessMode, StorageCapabilities>;
759
+ //# sourceMappingURL=traceless.d.ts.map