@redacto.io/consent-sdk-react 5.2.0 → 6.0.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 (84) hide show
  1. package/.turbo/turbo-build.log +24 -0
  2. package/CHANGELOG.md +12 -0
  3. package/dist/index.d.mts +24 -1
  4. package/dist/index.d.ts +24 -1
  5. package/dist/index.js +149 -206
  6. package/dist/index.mjs +148 -206
  7. package/dist/privacy-center.d.mts +178 -39
  8. package/dist/privacy-center.d.ts +178 -39
  9. package/dist/privacy-center.js +10534 -6795
  10. package/dist/privacy-center.mjs +7922 -4181
  11. package/package.json +1 -1
  12. package/src/RedactoNoticeConsent/RedactoNoticeConsent.tsx +16 -20
  13. package/src/RedactoNoticeConsent/api/index.ts +21 -103
  14. package/src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx +5 -4
  15. package/src/RedactoNoticeConsentInline/api/index.ts +64 -117
  16. package/src/RedactoPrivacyCenter/NotificationsPage.tsx +174 -0
  17. package/src/RedactoPrivacyCenter/PrivacyCenterHomePage.tsx +3 -0
  18. package/src/RedactoPrivacyCenter/api/actions.ts +136 -8
  19. package/src/RedactoPrivacyCenter/api/client.ts +176 -15
  20. package/src/RedactoPrivacyCenter/components/ConsentManager.tsx +722 -273
  21. package/src/RedactoPrivacyCenter/components/ConsentManagerCells.tsx +187 -0
  22. package/src/RedactoPrivacyCenter/components/ConsentManagerColumns.tsx +65 -165
  23. package/src/RedactoPrivacyCenter/components/ConsentManagerExpandedRow.tsx +179 -0
  24. package/src/RedactoPrivacyCenter/components/ConsentManagerGroupedColumns.tsx +318 -0
  25. package/src/RedactoPrivacyCenter/components/ConsentManagerProductCards.tsx +333 -0
  26. package/src/RedactoPrivacyCenter/components/ConsentManagerPurposeCards.tsx +102 -0
  27. package/src/RedactoPrivacyCenter/components/ConsentManagerTableSkeleton.tsx +6 -2
  28. package/src/RedactoPrivacyCenter/components/DataRequest/PurposeSelectionSection.tsx +15 -0
  29. package/src/RedactoPrivacyCenter/components/ModifyConsentModal.tsx +8 -5
  30. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationBell.tsx +160 -0
  31. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationCTAButton.tsx +18 -0
  32. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationDropdown.tsx +54 -0
  33. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationDropdownItem.tsx +57 -0
  34. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationIcon.tsx +19 -0
  35. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationListPanel.tsx +92 -0
  36. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationRefreshButton.tsx +20 -0
  37. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationRow.tsx +58 -0
  38. package/src/RedactoPrivacyCenter/components/NotificationHub/StatCard.tsx +10 -0
  39. package/src/RedactoPrivacyCenter/components/NotificationHub/useNotificationActions.ts +112 -0
  40. package/src/RedactoPrivacyCenter/components/NotificationHub/utils.ts +27 -0
  41. package/src/RedactoPrivacyCenter/components/PrivacyCenterLayout.tsx +105 -55
  42. package/src/RedactoPrivacyCenter/components/types.ts +2 -5
  43. package/src/RedactoPrivacyCenter/context/NavigationContext.tsx +2 -2
  44. package/src/RedactoPrivacyCenter/context/PageChromeContext.tsx +21 -1
  45. package/src/RedactoPrivacyCenter/lib/api.ts +147 -28
  46. package/src/RedactoPrivacyCenter/lib/consent-manager/utils.tsx +4 -2
  47. package/src/RedactoPrivacyCenter/lib/constants.ts +78 -1
  48. package/src/RedactoPrivacyCenter/lib/types.ts +205 -36
  49. package/src/RedactoPrivacyCenter/lib/utils.ts +3 -0
  50. package/src/RedactoPrivacyCenter/locales/as/translation.json +12 -1
  51. package/src/RedactoPrivacyCenter/locales/bho/translation.json +12 -1
  52. package/src/RedactoPrivacyCenter/locales/bn/translation.json +12 -1
  53. package/src/RedactoPrivacyCenter/locales/brx/translation.json +12 -1
  54. package/src/RedactoPrivacyCenter/locales/doi/translation.json +12 -1
  55. package/src/RedactoPrivacyCenter/locales/en/translation.json +42 -1
  56. package/src/RedactoPrivacyCenter/locales/gom/translation.json +12 -1
  57. package/src/RedactoPrivacyCenter/locales/gu/translation.json +12 -1
  58. package/src/RedactoPrivacyCenter/locales/hi/translation.json +15 -1
  59. package/src/RedactoPrivacyCenter/locales/kn/translation.json +12 -1
  60. package/src/RedactoPrivacyCenter/locales/ks/translation.json +12 -1
  61. package/src/RedactoPrivacyCenter/locales/mai/translation.json +12 -1
  62. package/src/RedactoPrivacyCenter/locales/ml/translation.json +12 -1
  63. package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +12 -1
  64. package/src/RedactoPrivacyCenter/locales/mr/translation.json +12 -1
  65. package/src/RedactoPrivacyCenter/locales/ne/translation.json +12 -1
  66. package/src/RedactoPrivacyCenter/locales/or/translation.json +12 -1
  67. package/src/RedactoPrivacyCenter/locales/pa/translation.json +12 -1
  68. package/src/RedactoPrivacyCenter/locales/sa/translation.json +12 -1
  69. package/src/RedactoPrivacyCenter/locales/sat/translation.json +12 -1
  70. package/src/RedactoPrivacyCenter/locales/sd/translation.json +12 -1
  71. package/src/RedactoPrivacyCenter/locales/ta/translation.json +12 -1
  72. package/src/RedactoPrivacyCenter/locales/te/translation.json +12 -1
  73. package/src/RedactoPrivacyCenter/locales/ur/translation.json +12 -1
  74. package/src/RedactoPrivacyCenter/styles/injectStyles.ts +1027 -0
  75. package/src/RedactoPrivacyCenter/styles/variables.css +5 -0
  76. package/src/RedactoPrivacyCenter/table/AdvancedTable.tsx +36 -16
  77. package/src/RedactoPrivacyCenter/table/AdvancedTablePagination.tsx +4 -12
  78. package/src/RedactoPrivacyCenter/ui/PCInput.tsx +1 -1
  79. package/src/RedactoPrivacyCenter/ui/PCPopover.tsx +23 -1
  80. package/src/RedactoPrivacyCenter/ui/PCSelect.tsx +51 -5
  81. package/src/RedactoPrivacyCenter/ui/ThemeToggle.tsx +2 -4
  82. package/src/index.ts +5 -0
  83. package/src/privacy-center.ts +8 -3
  84. package/src/shared/api-errors.ts +171 -0
@@ -69,7 +69,28 @@ declare function createConsentClient(baseUrl: string): {
69
69
  /**
70
70
  * Get user consents (privacy center)
71
71
  */
72
- getUserConsents(baseRequest: BaseRequest, contact: string, offset?: number, limit?: number, search?: string, status?: string, product_uuid?: string, language?: string, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
72
+ getUserConsents(baseRequest: BaseRequest, params: {
73
+ offset?: number;
74
+ limit?: number;
75
+ nominated_offset?: number;
76
+ nominated_limit?: number;
77
+ status?: string;
78
+ product_uuid?: string;
79
+ search?: string;
80
+ language?: string;
81
+ }, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
82
+ /**
83
+ * Get purposes for a single product card (privacy center) — sister endpoint
84
+ * for lazy-loading purposes when a card returns has_more_purposes: true.
85
+ */
86
+ getGroupPurposes(baseRequest: BaseRequest, productUuid: string, params: {
87
+ offset?: number;
88
+ limit?: number;
89
+ status?: string;
90
+ search?: string;
91
+ language?: string;
92
+ nominator_uuid?: string;
93
+ }, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
73
94
  /**
74
95
  * Manage consent (privacy center) - revoke, regrant, or renew
75
96
  */
@@ -102,6 +123,30 @@ declare function createConsentClient(baseUrl: string): {
102
123
  * Get document info/download URL for a case document (privacy center)
103
124
  */
104
125
  getCaseDocument(baseRequest: BaseRequest, caseUuid: string, documentUuid: string, authToken?: string): Promise<MessageDocument>;
126
+ /**
127
+ * List notifications (paginated, with filters)
128
+ */
129
+ getNotifications(baseRequest: BaseRequest, params?: NotificationQueryParams, authToken?: string): Promise<NotificationListResponse>;
130
+ /**
131
+ * Get notification summary (aggregated counts only)
132
+ */
133
+ getNotificationSummary(baseRequest: BaseRequest, authToken?: string): Promise<NotificationSummary>;
134
+ /**
135
+ * Get unread notification count (lightweight, for badge)
136
+ */
137
+ getUnreadCount(baseRequest: BaseRequest, authToken?: string): Promise<UnreadCountResponse>;
138
+ /**
139
+ * Mark a single notification as read
140
+ */
141
+ markNotificationRead(baseRequest: BaseRequest, notificationUuid: string, authToken?: string): Promise<NotificationActionResponse>;
142
+ /**
143
+ * Mark all notifications as read
144
+ */
145
+ markAllNotificationsRead(baseRequest: BaseRequest, authToken?: string): Promise<NotificationActionResponse>;
146
+ /**
147
+ * Acknowledge a notification (sets is_read and is_acknowledged to true)
148
+ */
149
+ acknowledgeNotification(baseRequest: BaseRequest, notificationUuid: string, authToken?: string): Promise<NotificationActionResponse>;
105
150
  };
106
151
 
107
152
  type Workspace = {
@@ -259,60 +304,70 @@ type ConsentDataElement = {
259
304
  required: boolean;
260
305
  selected: boolean;
261
306
  };
262
- type UserConsent = {
263
- purpose_uuid?: string;
264
- purpose: string;
265
- purpose_description: string;
266
- status: ConsentStatusEnum;
267
- given_date: string;
268
- valid_till: string;
269
- method: string;
270
- data_elements: ConsentDataElement[];
271
- product_uuid?: string;
272
- product_name?: string;
273
- product_description?: string | null;
274
- nominator_info?: NominatorInfo;
275
- };
276
307
  type NominatorInfo = {
277
308
  org_user_id: string;
278
309
  name: string | null;
279
310
  uuid: string;
280
311
  email: string | null;
281
312
  };
313
+ type PurposeItem = {
314
+ purpose_uuid: string;
315
+ name: string;
316
+ description: string | null;
317
+ status: ConsentStatusEnum | string;
318
+ given_date: string | null;
319
+ valid_till: string | null;
320
+ method: string;
321
+ data_elements: ConsentDataElement[];
322
+ link_reason: string | null;
323
+ };
324
+ type ConsentGroup = {
325
+ product_uuid: string;
326
+ product_name: string;
327
+ product_description: string | null;
328
+ nominator: NominatorInfo | null;
329
+ total_purposes: number;
330
+ active_purposes: number;
331
+ purposes: PurposeItem[];
332
+ has_more_purposes: boolean;
333
+ };
334
+ type PaginationMeta = {
335
+ total_count: number;
336
+ offset: number;
337
+ limit: number;
338
+ };
339
+ type Pagination = PaginationMeta;
282
340
  type ConsentHistoryStatusSummary = {
283
341
  total_purposes: number;
284
342
  direct_purposes: number;
285
343
  nominated_purposes: number;
286
- nominee_purposes?: number;
287
344
  active_purposes: number;
288
345
  inactive_purposes: number;
289
346
  };
290
- type ProductConsentHistoryGroup = {
347
+ type DisplayPurposeRow = PurposeItem & {
291
348
  product_uuid: string;
292
349
  product_name: string;
293
350
  product_description: string | null;
294
- purposes: UserConsent[];
295
- total_purposes: number;
296
- active_purposes: number;
351
+ nominator: NominatorInfo | null;
297
352
  };
298
- type NominatedPurposesGroup = {
299
- nominator_info: NominatorInfo;
300
- product_groups: ProductConsentHistoryGroup[];
301
- };
302
- type Pagination = {
303
- total_count: number;
304
- offset: number;
305
- limit: number;
353
+ type ConsentModalRecord = PurposeItem & {
354
+ product_uuid: string;
355
+ product_name: string;
356
+ product_description: string | null;
357
+ nominator: NominatorInfo | null;
306
358
  };
307
359
  type UserConsentDetail = {
308
- data?: UserConsent[];
309
- product_purpose_groups?: ProductConsentHistoryGroup[];
310
- pagination: Pagination;
311
- direct_product_groups?: ProductConsentHistoryGroup[];
312
- user_status?: 'ACTIVE' | 'TRANSFERRED' | null;
313
- nominated_purposes?: NominatedPurposesGroup[];
314
- nominators?: NominatorInfo[];
315
- status_summary?: ConsentHistoryStatusSummary | null;
360
+ direct: ConsentGroup[];
361
+ direct_pagination: PaginationMeta;
362
+ nominated: ConsentGroup[];
363
+ nominated_pagination: PaginationMeta;
364
+ user_status: 'ACTIVE' | 'TRANSFERRED' | null;
365
+ nominators: NominatorInfo[];
366
+ status_summary: ConsentHistoryStatusSummary;
367
+ };
368
+ type GroupPurposesOut = {
369
+ purposes: PurposeItem[];
370
+ pagination: PaginationMeta;
316
371
  };
317
372
  type UserConsentResponse = {
318
373
  code: number;
@@ -322,6 +377,7 @@ type UserConsentResponse = {
322
377
  declare enum ConsentStatusEnum {
323
378
  ACTIVE = "ACTIVE",
324
379
  WITHDRAWN = "WITHDRAW",
380
+ REVOKED = "REVOKED",
325
381
  EXPIRED = "EXPIRED",
326
382
  DECLINED = "DECLINED"
327
383
  }
@@ -440,8 +496,61 @@ type UploadDocumentResponse = {
440
496
  allow_ai_processing: boolean;
441
497
  metadata: Record<string, string> | null;
442
498
  };
499
+ type NotificationType = 'guardian_verification_request' | 'consent_expiry_warning' | 'new_consent_notice' | 'consent_withdrawal_confirmation' | 'data_request_status_update' | 'case_message' | 'grievance_status_update' | 'consent_regrant_prompt';
500
+ type NotificationCategory = 'consent' | 'request' | 'system';
501
+ type NotificationCTA = {
502
+ label: string;
503
+ style: 'primary' | 'secondary' | 'danger';
504
+ action_type: 'link' | 'acknowledge';
505
+ url?: string;
506
+ };
507
+ type Notification = {
508
+ uuid: string;
509
+ notification_type: NotificationType;
510
+ category: NotificationCategory;
511
+ title: string;
512
+ description: string;
513
+ is_read: boolean;
514
+ is_acknowledged: boolean;
515
+ source_type: string;
516
+ source_uuid: string | null;
517
+ request_type: string;
518
+ request_type_display?: string | null;
519
+ status_label: string;
520
+ status_label_display?: string | null;
521
+ ctas: NotificationCTA[];
522
+ created_at: string;
523
+ };
524
+ type NotificationSummary = {
525
+ total: number;
526
+ unread: number;
527
+ action_needed: number;
528
+ acknowledged: number;
529
+ };
530
+ type NotificationListResponse = {
531
+ data: Notification[];
532
+ total: number;
533
+ skip: number;
534
+ limit: number;
535
+ summary: NotificationSummary | null;
536
+ };
537
+ type UnreadCountResponse = {
538
+ count: number;
539
+ };
540
+ type NotificationActionResponse = {
541
+ message: string;
542
+ };
543
+ type NotificationQueryParams = {
544
+ category?: NotificationCategory;
545
+ notification_type?: NotificationType;
546
+ is_read?: boolean;
547
+ skip?: number;
548
+ limit?: number;
549
+ include_summary?: boolean;
550
+ language?: string;
551
+ };
443
552
 
444
- type InternalPage = 'consent-manager' | 'form' | 'activity' | 'case-details';
553
+ type InternalPage = 'consent-manager' | 'form' | 'activity' | 'case-details' | 'notifications';
445
554
  interface NavigationContextType {
446
555
  currentPage: InternalPage;
447
556
  navigateTo: (page: InternalPage) => void;
@@ -485,6 +594,8 @@ declare function PrivacyCenterActivityPage(): react_jsx_runtime.JSX.Element;
485
594
 
486
595
  declare const PrivacyCenterCaseDetailsPage: () => react_jsx_runtime.JSX.Element | null;
487
596
 
597
+ declare const NotificationsPage: () => react_jsx_runtime.JSX.Element;
598
+
488
599
  type AuthContextValue = Readonly<{
489
600
  accessToken: string;
490
601
  refreshToken: string;
@@ -609,7 +720,35 @@ declare const fetchProducts: (organizationId: string, workspaceId: string, skip?
609
720
  name: string;
610
721
  description?: string;
611
722
  }> | null>;
612
- declare const fetchUserConsents: (organizationId: string, workspaceId: string, contact: string, offset?: number, limit?: number, search?: string, status?: string, product_uuid?: string, authContext?: AuthContext, consentClient?: BaseUrlContextValue["consentClient"], language?: string) => Promise<UserConsentDetail | null>;
723
+ type FetchUserConsentsParams = {
724
+ organizationId: string;
725
+ workspaceId: string;
726
+ offset?: number;
727
+ limit?: number;
728
+ nominatedOffset?: number;
729
+ nominatedLimit?: number;
730
+ search?: string;
731
+ status?: string;
732
+ product_uuid?: string;
733
+ language?: string;
734
+ authContext?: AuthContext;
735
+ consentClient?: BaseUrlContextValue['consentClient'];
736
+ };
737
+ declare const fetchUserConsents: (params: FetchUserConsentsParams) => Promise<UserConsentDetail | null>;
738
+ type FetchGroupPurposesParams = {
739
+ organizationId: string;
740
+ workspaceId: string;
741
+ productUuid: string;
742
+ offset?: number;
743
+ limit?: number;
744
+ status?: string;
745
+ search?: string;
746
+ language?: string;
747
+ nominatorUuid?: string;
748
+ authContext?: AuthContext;
749
+ consentClient?: BaseUrlContextValue['consentClient'];
750
+ };
751
+ declare const fetchGroupPurposes: (params: FetchGroupPurposesParams) => Promise<GroupPurposesOut | null>;
613
752
  declare const manageConsent: ({ organizationId, workspaceId, purposeId, contact, action, authContext, consentClient, nominatorContact, dataElementUuids, }: {
614
753
  organizationId: string;
615
754
  workspaceId: string;
@@ -646,4 +785,4 @@ declare const useAuth: () => AuthContextValue;
646
785
  */
647
786
  declare const injectPCStyles: () => void;
648
787
 
649
- export { type Activity, type ActivityBadgeStatus$1 as ActivityBadgeStatus, type ActivityDetail, type ActivityResponse, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, type CaseHistoryDetail, type CaseHistoryResponse, type CaseRequest, type ConsentAction, type ConsentDataElement, type ConsentHistoryStatusSummary, ConsentStatusEnum, type CreateCaseResponse, type DataElement, type FetchOrgParams, type FormData, type FormDataResponse, type GrievanceOptions, type GrievanceTypeElement, GrievanceTypeEnum, type GrievanceValue, type InternalPage, type ManageConsentParams, type ManageConsentResponse, NavigationProvider, type NominatedPurposesGroup, type NominationData, type NominatorInfo, type OrganizationDetail, type OrganizationResponse, type OtpResponse, type OtpVerificationResponse, type Pagination, PrivacyCenterActivityPage, PrivacyCenterCaseDetailsPage, PrivacyCenterConsentManagerPage, PrivacyCenterFormPage, PrivacyCenterHomePage, PrivacyCenterLayout, type ProductConsentHistoryGroup, type Purpose, type RawPurposeWrapper, RedactoPrivacyCenter, RequestTypeEnum, type TokenExchangeResponse, type UpdateCorrectionDataItem, type UpdatePurpose, type UpdateRequestDetails, type UserConsent, type UserConsentDetail, type UserConsentResponse, type UserDataRequest, type Workspace, checkAndRefreshAuth, compareEmails, createCaseRequest, createConsentClient, createOtpServer as createOtp, decodeJwtToken, ensureValidToken, exchangeTokenServer as exchangeToken, fetchActivities, fetchCaseHistory, fetchProducts, fetchUserConsents, formatActivityType, getActivityTypeStatus, getCookieValue, getFormData, getInitialState, injectPCStyles, isJwtExpired, isUserAuthenticated, manageConsent, setRefreshTokenCookie, signOutPrivacyCenter, useAuth, useBaseUrl, useCaseHistory, useInternalNavigation, verifyOtpServer as verifyOtp };
788
+ export { type Activity, type ActivityBadgeStatus$1 as ActivityBadgeStatus, type ActivityDetail, type ActivityResponse, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, type CaseHistoryDetail, type CaseHistoryResponse, type CaseRequest, type ConsentAction, type ConsentDataElement, type ConsentGroup, type ConsentHistoryStatusSummary, type ConsentModalRecord, ConsentStatusEnum, type CreateCaseResponse, type DataElement, type DisplayPurposeRow, type FetchOrgParams, type FormData, type FormDataResponse, type GrievanceOptions, type GrievanceTypeElement, GrievanceTypeEnum, type GrievanceValue, type GroupPurposesOut, type InternalPage, type ManageConsentParams, type ManageConsentResponse, NavigationProvider, type NominationData, type NominatorInfo, NotificationsPage, type OrganizationDetail, type OrganizationResponse, type OtpResponse, type OtpVerificationResponse, type Pagination, type PaginationMeta, PrivacyCenterActivityPage, PrivacyCenterCaseDetailsPage, PrivacyCenterConsentManagerPage, PrivacyCenterFormPage, PrivacyCenterHomePage, PrivacyCenterLayout, type Purpose, type PurposeItem, type RawPurposeWrapper, RedactoPrivacyCenter, RequestTypeEnum, type TokenExchangeResponse, type UpdateCorrectionDataItem, type UpdatePurpose, type UpdateRequestDetails, type UserConsentDetail, type UserConsentResponse, type UserDataRequest, type Workspace, checkAndRefreshAuth, compareEmails, createCaseRequest, createConsentClient, createOtpServer as createOtp, decodeJwtToken, ensureValidToken, exchangeTokenServer as exchangeToken, fetchActivities, fetchCaseHistory, fetchGroupPurposes, fetchProducts, fetchUserConsents, formatActivityType, getActivityTypeStatus, getCookieValue, getFormData, getInitialState, injectPCStyles, isJwtExpired, isUserAuthenticated, manageConsent, setRefreshTokenCookie, signOutPrivacyCenter, useAuth, useBaseUrl, useCaseHistory, useInternalNavigation, verifyOtpServer as verifyOtp };
@@ -69,7 +69,28 @@ declare function createConsentClient(baseUrl: string): {
69
69
  /**
70
70
  * Get user consents (privacy center)
71
71
  */
72
- getUserConsents(baseRequest: BaseRequest, contact: string, offset?: number, limit?: number, search?: string, status?: string, product_uuid?: string, language?: string, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
72
+ getUserConsents(baseRequest: BaseRequest, params: {
73
+ offset?: number;
74
+ limit?: number;
75
+ nominated_offset?: number;
76
+ nominated_limit?: number;
77
+ status?: string;
78
+ product_uuid?: string;
79
+ search?: string;
80
+ language?: string;
81
+ }, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
82
+ /**
83
+ * Get purposes for a single product card (privacy center) — sister endpoint
84
+ * for lazy-loading purposes when a card returns has_more_purposes: true.
85
+ */
86
+ getGroupPurposes(baseRequest: BaseRequest, productUuid: string, params: {
87
+ offset?: number;
88
+ limit?: number;
89
+ status?: string;
90
+ search?: string;
91
+ language?: string;
92
+ nominator_uuid?: string;
93
+ }, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
73
94
  /**
74
95
  * Manage consent (privacy center) - revoke, regrant, or renew
75
96
  */
@@ -102,6 +123,30 @@ declare function createConsentClient(baseUrl: string): {
102
123
  * Get document info/download URL for a case document (privacy center)
103
124
  */
104
125
  getCaseDocument(baseRequest: BaseRequest, caseUuid: string, documentUuid: string, authToken?: string): Promise<MessageDocument>;
126
+ /**
127
+ * List notifications (paginated, with filters)
128
+ */
129
+ getNotifications(baseRequest: BaseRequest, params?: NotificationQueryParams, authToken?: string): Promise<NotificationListResponse>;
130
+ /**
131
+ * Get notification summary (aggregated counts only)
132
+ */
133
+ getNotificationSummary(baseRequest: BaseRequest, authToken?: string): Promise<NotificationSummary>;
134
+ /**
135
+ * Get unread notification count (lightweight, for badge)
136
+ */
137
+ getUnreadCount(baseRequest: BaseRequest, authToken?: string): Promise<UnreadCountResponse>;
138
+ /**
139
+ * Mark a single notification as read
140
+ */
141
+ markNotificationRead(baseRequest: BaseRequest, notificationUuid: string, authToken?: string): Promise<NotificationActionResponse>;
142
+ /**
143
+ * Mark all notifications as read
144
+ */
145
+ markAllNotificationsRead(baseRequest: BaseRequest, authToken?: string): Promise<NotificationActionResponse>;
146
+ /**
147
+ * Acknowledge a notification (sets is_read and is_acknowledged to true)
148
+ */
149
+ acknowledgeNotification(baseRequest: BaseRequest, notificationUuid: string, authToken?: string): Promise<NotificationActionResponse>;
105
150
  };
106
151
 
107
152
  type Workspace = {
@@ -259,60 +304,70 @@ type ConsentDataElement = {
259
304
  required: boolean;
260
305
  selected: boolean;
261
306
  };
262
- type UserConsent = {
263
- purpose_uuid?: string;
264
- purpose: string;
265
- purpose_description: string;
266
- status: ConsentStatusEnum;
267
- given_date: string;
268
- valid_till: string;
269
- method: string;
270
- data_elements: ConsentDataElement[];
271
- product_uuid?: string;
272
- product_name?: string;
273
- product_description?: string | null;
274
- nominator_info?: NominatorInfo;
275
- };
276
307
  type NominatorInfo = {
277
308
  org_user_id: string;
278
309
  name: string | null;
279
310
  uuid: string;
280
311
  email: string | null;
281
312
  };
313
+ type PurposeItem = {
314
+ purpose_uuid: string;
315
+ name: string;
316
+ description: string | null;
317
+ status: ConsentStatusEnum | string;
318
+ given_date: string | null;
319
+ valid_till: string | null;
320
+ method: string;
321
+ data_elements: ConsentDataElement[];
322
+ link_reason: string | null;
323
+ };
324
+ type ConsentGroup = {
325
+ product_uuid: string;
326
+ product_name: string;
327
+ product_description: string | null;
328
+ nominator: NominatorInfo | null;
329
+ total_purposes: number;
330
+ active_purposes: number;
331
+ purposes: PurposeItem[];
332
+ has_more_purposes: boolean;
333
+ };
334
+ type PaginationMeta = {
335
+ total_count: number;
336
+ offset: number;
337
+ limit: number;
338
+ };
339
+ type Pagination = PaginationMeta;
282
340
  type ConsentHistoryStatusSummary = {
283
341
  total_purposes: number;
284
342
  direct_purposes: number;
285
343
  nominated_purposes: number;
286
- nominee_purposes?: number;
287
344
  active_purposes: number;
288
345
  inactive_purposes: number;
289
346
  };
290
- type ProductConsentHistoryGroup = {
347
+ type DisplayPurposeRow = PurposeItem & {
291
348
  product_uuid: string;
292
349
  product_name: string;
293
350
  product_description: string | null;
294
- purposes: UserConsent[];
295
- total_purposes: number;
296
- active_purposes: number;
351
+ nominator: NominatorInfo | null;
297
352
  };
298
- type NominatedPurposesGroup = {
299
- nominator_info: NominatorInfo;
300
- product_groups: ProductConsentHistoryGroup[];
301
- };
302
- type Pagination = {
303
- total_count: number;
304
- offset: number;
305
- limit: number;
353
+ type ConsentModalRecord = PurposeItem & {
354
+ product_uuid: string;
355
+ product_name: string;
356
+ product_description: string | null;
357
+ nominator: NominatorInfo | null;
306
358
  };
307
359
  type UserConsentDetail = {
308
- data?: UserConsent[];
309
- product_purpose_groups?: ProductConsentHistoryGroup[];
310
- pagination: Pagination;
311
- direct_product_groups?: ProductConsentHistoryGroup[];
312
- user_status?: 'ACTIVE' | 'TRANSFERRED' | null;
313
- nominated_purposes?: NominatedPurposesGroup[];
314
- nominators?: NominatorInfo[];
315
- status_summary?: ConsentHistoryStatusSummary | null;
360
+ direct: ConsentGroup[];
361
+ direct_pagination: PaginationMeta;
362
+ nominated: ConsentGroup[];
363
+ nominated_pagination: PaginationMeta;
364
+ user_status: 'ACTIVE' | 'TRANSFERRED' | null;
365
+ nominators: NominatorInfo[];
366
+ status_summary: ConsentHistoryStatusSummary;
367
+ };
368
+ type GroupPurposesOut = {
369
+ purposes: PurposeItem[];
370
+ pagination: PaginationMeta;
316
371
  };
317
372
  type UserConsentResponse = {
318
373
  code: number;
@@ -322,6 +377,7 @@ type UserConsentResponse = {
322
377
  declare enum ConsentStatusEnum {
323
378
  ACTIVE = "ACTIVE",
324
379
  WITHDRAWN = "WITHDRAW",
380
+ REVOKED = "REVOKED",
325
381
  EXPIRED = "EXPIRED",
326
382
  DECLINED = "DECLINED"
327
383
  }
@@ -440,8 +496,61 @@ type UploadDocumentResponse = {
440
496
  allow_ai_processing: boolean;
441
497
  metadata: Record<string, string> | null;
442
498
  };
499
+ type NotificationType = 'guardian_verification_request' | 'consent_expiry_warning' | 'new_consent_notice' | 'consent_withdrawal_confirmation' | 'data_request_status_update' | 'case_message' | 'grievance_status_update' | 'consent_regrant_prompt';
500
+ type NotificationCategory = 'consent' | 'request' | 'system';
501
+ type NotificationCTA = {
502
+ label: string;
503
+ style: 'primary' | 'secondary' | 'danger';
504
+ action_type: 'link' | 'acknowledge';
505
+ url?: string;
506
+ };
507
+ type Notification = {
508
+ uuid: string;
509
+ notification_type: NotificationType;
510
+ category: NotificationCategory;
511
+ title: string;
512
+ description: string;
513
+ is_read: boolean;
514
+ is_acknowledged: boolean;
515
+ source_type: string;
516
+ source_uuid: string | null;
517
+ request_type: string;
518
+ request_type_display?: string | null;
519
+ status_label: string;
520
+ status_label_display?: string | null;
521
+ ctas: NotificationCTA[];
522
+ created_at: string;
523
+ };
524
+ type NotificationSummary = {
525
+ total: number;
526
+ unread: number;
527
+ action_needed: number;
528
+ acknowledged: number;
529
+ };
530
+ type NotificationListResponse = {
531
+ data: Notification[];
532
+ total: number;
533
+ skip: number;
534
+ limit: number;
535
+ summary: NotificationSummary | null;
536
+ };
537
+ type UnreadCountResponse = {
538
+ count: number;
539
+ };
540
+ type NotificationActionResponse = {
541
+ message: string;
542
+ };
543
+ type NotificationQueryParams = {
544
+ category?: NotificationCategory;
545
+ notification_type?: NotificationType;
546
+ is_read?: boolean;
547
+ skip?: number;
548
+ limit?: number;
549
+ include_summary?: boolean;
550
+ language?: string;
551
+ };
443
552
 
444
- type InternalPage = 'consent-manager' | 'form' | 'activity' | 'case-details';
553
+ type InternalPage = 'consent-manager' | 'form' | 'activity' | 'case-details' | 'notifications';
445
554
  interface NavigationContextType {
446
555
  currentPage: InternalPage;
447
556
  navigateTo: (page: InternalPage) => void;
@@ -485,6 +594,8 @@ declare function PrivacyCenterActivityPage(): react_jsx_runtime.JSX.Element;
485
594
 
486
595
  declare const PrivacyCenterCaseDetailsPage: () => react_jsx_runtime.JSX.Element | null;
487
596
 
597
+ declare const NotificationsPage: () => react_jsx_runtime.JSX.Element;
598
+
488
599
  type AuthContextValue = Readonly<{
489
600
  accessToken: string;
490
601
  refreshToken: string;
@@ -609,7 +720,35 @@ declare const fetchProducts: (organizationId: string, workspaceId: string, skip?
609
720
  name: string;
610
721
  description?: string;
611
722
  }> | null>;
612
- declare const fetchUserConsents: (organizationId: string, workspaceId: string, contact: string, offset?: number, limit?: number, search?: string, status?: string, product_uuid?: string, authContext?: AuthContext, consentClient?: BaseUrlContextValue["consentClient"], language?: string) => Promise<UserConsentDetail | null>;
723
+ type FetchUserConsentsParams = {
724
+ organizationId: string;
725
+ workspaceId: string;
726
+ offset?: number;
727
+ limit?: number;
728
+ nominatedOffset?: number;
729
+ nominatedLimit?: number;
730
+ search?: string;
731
+ status?: string;
732
+ product_uuid?: string;
733
+ language?: string;
734
+ authContext?: AuthContext;
735
+ consentClient?: BaseUrlContextValue['consentClient'];
736
+ };
737
+ declare const fetchUserConsents: (params: FetchUserConsentsParams) => Promise<UserConsentDetail | null>;
738
+ type FetchGroupPurposesParams = {
739
+ organizationId: string;
740
+ workspaceId: string;
741
+ productUuid: string;
742
+ offset?: number;
743
+ limit?: number;
744
+ status?: string;
745
+ search?: string;
746
+ language?: string;
747
+ nominatorUuid?: string;
748
+ authContext?: AuthContext;
749
+ consentClient?: BaseUrlContextValue['consentClient'];
750
+ };
751
+ declare const fetchGroupPurposes: (params: FetchGroupPurposesParams) => Promise<GroupPurposesOut | null>;
613
752
  declare const manageConsent: ({ organizationId, workspaceId, purposeId, contact, action, authContext, consentClient, nominatorContact, dataElementUuids, }: {
614
753
  organizationId: string;
615
754
  workspaceId: string;
@@ -646,4 +785,4 @@ declare const useAuth: () => AuthContextValue;
646
785
  */
647
786
  declare const injectPCStyles: () => void;
648
787
 
649
- export { type Activity, type ActivityBadgeStatus$1 as ActivityBadgeStatus, type ActivityDetail, type ActivityResponse, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, type CaseHistoryDetail, type CaseHistoryResponse, type CaseRequest, type ConsentAction, type ConsentDataElement, type ConsentHistoryStatusSummary, ConsentStatusEnum, type CreateCaseResponse, type DataElement, type FetchOrgParams, type FormData, type FormDataResponse, type GrievanceOptions, type GrievanceTypeElement, GrievanceTypeEnum, type GrievanceValue, type InternalPage, type ManageConsentParams, type ManageConsentResponse, NavigationProvider, type NominatedPurposesGroup, type NominationData, type NominatorInfo, type OrganizationDetail, type OrganizationResponse, type OtpResponse, type OtpVerificationResponse, type Pagination, PrivacyCenterActivityPage, PrivacyCenterCaseDetailsPage, PrivacyCenterConsentManagerPage, PrivacyCenterFormPage, PrivacyCenterHomePage, PrivacyCenterLayout, type ProductConsentHistoryGroup, type Purpose, type RawPurposeWrapper, RedactoPrivacyCenter, RequestTypeEnum, type TokenExchangeResponse, type UpdateCorrectionDataItem, type UpdatePurpose, type UpdateRequestDetails, type UserConsent, type UserConsentDetail, type UserConsentResponse, type UserDataRequest, type Workspace, checkAndRefreshAuth, compareEmails, createCaseRequest, createConsentClient, createOtpServer as createOtp, decodeJwtToken, ensureValidToken, exchangeTokenServer as exchangeToken, fetchActivities, fetchCaseHistory, fetchProducts, fetchUserConsents, formatActivityType, getActivityTypeStatus, getCookieValue, getFormData, getInitialState, injectPCStyles, isJwtExpired, isUserAuthenticated, manageConsent, setRefreshTokenCookie, signOutPrivacyCenter, useAuth, useBaseUrl, useCaseHistory, useInternalNavigation, verifyOtpServer as verifyOtp };
788
+ export { type Activity, type ActivityBadgeStatus$1 as ActivityBadgeStatus, type ActivityDetail, type ActivityResponse, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, type CaseHistoryDetail, type CaseHistoryResponse, type CaseRequest, type ConsentAction, type ConsentDataElement, type ConsentGroup, type ConsentHistoryStatusSummary, type ConsentModalRecord, ConsentStatusEnum, type CreateCaseResponse, type DataElement, type DisplayPurposeRow, type FetchOrgParams, type FormData, type FormDataResponse, type GrievanceOptions, type GrievanceTypeElement, GrievanceTypeEnum, type GrievanceValue, type GroupPurposesOut, type InternalPage, type ManageConsentParams, type ManageConsentResponse, NavigationProvider, type NominationData, type NominatorInfo, NotificationsPage, type OrganizationDetail, type OrganizationResponse, type OtpResponse, type OtpVerificationResponse, type Pagination, type PaginationMeta, PrivacyCenterActivityPage, PrivacyCenterCaseDetailsPage, PrivacyCenterConsentManagerPage, PrivacyCenterFormPage, PrivacyCenterHomePage, PrivacyCenterLayout, type Purpose, type PurposeItem, type RawPurposeWrapper, RedactoPrivacyCenter, RequestTypeEnum, type TokenExchangeResponse, type UpdateCorrectionDataItem, type UpdatePurpose, type UpdateRequestDetails, type UserConsentDetail, type UserConsentResponse, type UserDataRequest, type Workspace, checkAndRefreshAuth, compareEmails, createCaseRequest, createConsentClient, createOtpServer as createOtp, decodeJwtToken, ensureValidToken, exchangeTokenServer as exchangeToken, fetchActivities, fetchCaseHistory, fetchGroupPurposes, fetchProducts, fetchUserConsents, formatActivityType, getActivityTypeStatus, getCookieValue, getFormData, getInitialState, injectPCStyles, isJwtExpired, isUserAuthenticated, manageConsent, setRefreshTokenCookie, signOutPrivacyCenter, useAuth, useBaseUrl, useCaseHistory, useInternalNavigation, verifyOtpServer as verifyOtp };