@redacto.io/consent-sdk-react 10.0.0-beta.9 → 10.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 (264) hide show
  1. package/NOTICE.md +17 -0
  2. package/README.md +141 -3
  3. package/dist/chunk-FEGTW73Q.mjs +182 -0
  4. package/dist/fonts.d.mts +35 -0
  5. package/dist/fonts.d.ts +35 -0
  6. package/dist/fonts.js +183 -0
  7. package/dist/fonts.mjs +10 -0
  8. package/dist/index.d.mts +12 -1
  9. package/dist/index.d.ts +12 -1
  10. package/dist/index.js +724 -365
  11. package/dist/index.mjs +346 -201
  12. package/dist/montserrat.generated-NBTECYRW.mjs +22 -0
  13. package/dist/privacy-center.d.mts +0 -1
  14. package/dist/privacy-center.d.ts +0 -1
  15. package/dist/privacy-center.js +2 -66
  16. package/dist/privacy-center.mjs +2 -66
  17. package/dist/types-6Aj7faxL.d.mts +57 -0
  18. package/dist/types-6Aj7faxL.d.ts +57 -0
  19. package/package.json +10 -1
  20. package/.turbo/turbo-build.log +0 -22
  21. package/.turbo/turbo-test.log +0 -203
  22. package/.turbo/turbo-verify-pack.log +0 -6
  23. package/CHANGELOG.md +0 -353
  24. package/src/RedactoNoticeAssisted/RedactoNoticeAssisted.test.tsx +0 -934
  25. package/src/RedactoNoticeAssisted/RedactoNoticeAssisted.tsx +0 -2160
  26. package/src/RedactoNoticeAssisted/api/index.ts +0 -275
  27. package/src/RedactoNoticeAssisted/api/types.ts +0 -182
  28. package/src/RedactoNoticeAssisted/assets/redacto-logo.png +0 -0
  29. package/src/RedactoNoticeAssisted/constants.ts +0 -51
  30. package/src/RedactoNoticeAssisted/i18n.ts +0 -1408
  31. package/src/RedactoNoticeAssisted/index.ts +0 -1
  32. package/src/RedactoNoticeAssisted/injectStyles.ts +0 -251
  33. package/src/RedactoNoticeAssisted/styles.ts +0 -730
  34. package/src/RedactoNoticeAssisted/types.ts +0 -26
  35. package/src/RedactoNoticeAssisted/useMediaQuery.ts +0 -36
  36. package/src/RedactoNoticeConsent/RedactoNoticeConsent.test.tsx +0 -1152
  37. package/src/RedactoNoticeConsent/RedactoNoticeConsent.tsx +0 -4308
  38. package/src/RedactoNoticeConsent/api/index.ts +0 -542
  39. package/src/RedactoNoticeConsent/api/sandbox.ts +0 -150
  40. package/src/RedactoNoticeConsent/api/types.ts +0 -515
  41. package/src/RedactoNoticeConsent/assets/redacto-logo.png +0 -0
  42. package/src/RedactoNoticeConsent/components/DigiLockerCallback.tsx +0 -602
  43. package/src/RedactoNoticeConsent/components/index.ts +0 -7
  44. package/src/RedactoNoticeConsent/constants.ts +0 -20
  45. package/src/RedactoNoticeConsent/index.ts +0 -1
  46. package/src/RedactoNoticeConsent/injectStyles.ts +0 -151
  47. package/src/RedactoNoticeConsent/language-codes.ts +0 -95
  48. package/src/RedactoNoticeConsent/services/storage.ts +0 -122
  49. package/src/RedactoNoticeConsent/styles.ts +0 -409
  50. package/src/RedactoNoticeConsent/types.ts +0 -80
  51. package/src/RedactoNoticeConsent/useMediaQuery.ts +0 -36
  52. package/src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.test.tsx +0 -369
  53. package/src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx +0 -687
  54. package/src/RedactoNoticeConsentInline/api/index.ts +0 -106
  55. package/src/RedactoNoticeConsentInline/api/types.ts +0 -183
  56. package/src/RedactoNoticeConsentInline/assets/redacto-logo.png +0 -0
  57. package/src/RedactoNoticeConsentInline/index.ts +0 -1
  58. package/src/RedactoNoticeConsentInline/injectStyles.ts +0 -40
  59. package/src/RedactoNoticeConsentInline/styles.ts +0 -397
  60. package/src/RedactoNoticeConsentInline/types.ts +0 -51
  61. package/src/RedactoNoticeConsentInline/useMediaQuery.ts +0 -36
  62. package/src/RedactoPrivacyCenter/NotificationsPage.tsx +0 -182
  63. package/src/RedactoPrivacyCenter/PrivacyCenterActivityPage.tsx +0 -19
  64. package/src/RedactoPrivacyCenter/PrivacyCenterCaseDetailsPage.tsx +0 -156
  65. package/src/RedactoPrivacyCenter/PrivacyCenterConsentManagerPage.tsx +0 -17
  66. package/src/RedactoPrivacyCenter/PrivacyCenterFormPage.tsx +0 -79
  67. package/src/RedactoPrivacyCenter/PrivacyCenterHomePage.tsx +0 -36
  68. package/src/RedactoPrivacyCenter/PrivacyCenterLayout.tsx +0 -177
  69. package/src/RedactoPrivacyCenter/PrivacyCenterMyReceiptPage.tsx +0 -26
  70. package/src/RedactoPrivacyCenter/RedactoPrivacyCenter.tsx +0 -93
  71. package/src/RedactoPrivacyCenter/api/actions.ts +0 -695
  72. package/src/RedactoPrivacyCenter/api/client.ts +0 -1003
  73. package/src/RedactoPrivacyCenter/api/config.ts +0 -33
  74. package/src/RedactoPrivacyCenter/api/fetcher.ts +0 -275
  75. package/src/RedactoPrivacyCenter/api/orgBranding.ts +0 -16
  76. package/src/RedactoPrivacyCenter/api/upload.ts +0 -93
  77. package/src/RedactoPrivacyCenter/assets/character.svg +0 -31
  78. package/src/RedactoPrivacyCenter/assets/fileAttach.svg +0 -9
  79. package/src/RedactoPrivacyCenter/assets/greenTick.svg +0 -4
  80. package/src/RedactoPrivacyCenter/assets/mail.svg +0 -3
  81. package/src/RedactoPrivacyCenter/assets/poweredByRedacto.svg +0 -9
  82. package/src/RedactoPrivacyCenter/assets/sentImg.svg +0 -9
  83. package/src/RedactoPrivacyCenter/assets/uploadFileIcon.svg +0 -9
  84. package/src/RedactoPrivacyCenter/components/ActivitiesList.tsx +0 -252
  85. package/src/RedactoPrivacyCenter/components/ActivityTimeline.tsx +0 -239
  86. package/src/RedactoPrivacyCenter/components/AppShell/AppShell.tsx +0 -268
  87. package/src/RedactoPrivacyCenter/components/AppShell/MobileNavDrawer.tsx +0 -218
  88. package/src/RedactoPrivacyCenter/components/AppShell/NavItem.tsx +0 -205
  89. package/src/RedactoPrivacyCenter/components/AppShell/PageHeader.tsx +0 -107
  90. package/src/RedactoPrivacyCenter/components/AppShell/SidebarNav.tsx +0 -100
  91. package/src/RedactoPrivacyCenter/components/AppShell/TopAppBar.tsx +0 -339
  92. package/src/RedactoPrivacyCenter/components/AppShell/UserMenu.tsx +0 -245
  93. package/src/RedactoPrivacyCenter/components/AppShell/hooks/useIsTruncated.ts +0 -28
  94. package/src/RedactoPrivacyCenter/components/AppShell/hooks/useKeyboardShortcut.ts +0 -40
  95. package/src/RedactoPrivacyCenter/components/AppShell/hooks/useSidebarState.ts +0 -62
  96. package/src/RedactoPrivacyCenter/components/AppShell/usePrivacyCenterExitAction.ts +0 -36
  97. package/src/RedactoPrivacyCenter/components/CaseDetails/AttachmentCard.tsx +0 -38
  98. package/src/RedactoPrivacyCenter/components/CaseDetails/ChatBubble.tsx +0 -31
  99. package/src/RedactoPrivacyCenter/components/CaseDetails/DocumentRequestCard.tsx +0 -79
  100. package/src/RedactoPrivacyCenter/components/CaseDetails/FinalizedTooltipWrapper.tsx +0 -25
  101. package/src/RedactoPrivacyCenter/components/CaseDetails/MessageComposer.tsx +0 -96
  102. package/src/RedactoPrivacyCenter/components/CaseDetails/MessageItem.tsx +0 -97
  103. package/src/RedactoPrivacyCenter/components/CaseDetails/MessagesTab.tsx +0 -156
  104. package/src/RedactoPrivacyCenter/components/CaseDetails/RequestDetailsTab.tsx +0 -171
  105. package/src/RedactoPrivacyCenter/components/CaseDetails/StatusEvent.tsx +0 -23
  106. package/src/RedactoPrivacyCenter/components/CaseDetails/useFileUpload.ts +0 -116
  107. package/src/RedactoPrivacyCenter/components/CaseDetails/useMessagePolling.ts +0 -43
  108. package/src/RedactoPrivacyCenter/components/CaseDetails/utils.ts +0 -71
  109. package/src/RedactoPrivacyCenter/components/CaseDetailsModal.tsx +0 -469
  110. package/src/RedactoPrivacyCenter/components/CaseHistory.tsx +0 -426
  111. package/src/RedactoPrivacyCenter/components/ConsentManager.tsx +0 -1206
  112. package/src/RedactoPrivacyCenter/components/ConsentManagerCells.tsx +0 -218
  113. package/src/RedactoPrivacyCenter/components/ConsentManagerColumns.tsx +0 -138
  114. package/src/RedactoPrivacyCenter/components/ConsentManagerConstants.ts +0 -7
  115. package/src/RedactoPrivacyCenter/components/ConsentManagerExpandedRow.tsx +0 -179
  116. package/src/RedactoPrivacyCenter/components/ConsentManagerGroupedColumns.tsx +0 -318
  117. package/src/RedactoPrivacyCenter/components/ConsentManagerProductCards.tsx +0 -333
  118. package/src/RedactoPrivacyCenter/components/ConsentManagerPurposeCards.tsx +0 -102
  119. package/src/RedactoPrivacyCenter/components/ConsentManagerTableSkeleton.tsx +0 -159
  120. package/src/RedactoPrivacyCenter/components/DataRequest/CorrectionDataSection.tsx +0 -189
  121. package/src/RedactoPrivacyCenter/components/DataRequest/GrievanceDataSection.tsx +0 -118
  122. package/src/RedactoPrivacyCenter/components/DataRequest/NominationDataSection.tsx +0 -66
  123. package/src/RedactoPrivacyCenter/components/DataRequest/ProductSelectionSection.tsx +0 -222
  124. package/src/RedactoPrivacyCenter/components/DataRequest/PurposeSelectionSection.tsx +0 -331
  125. package/src/RedactoPrivacyCenter/components/Form.tsx +0 -1821
  126. package/src/RedactoPrivacyCenter/components/GrievanceTable.tsx +0 -174
  127. package/src/RedactoPrivacyCenter/components/GrievanceTablePagination.tsx +0 -337
  128. package/src/RedactoPrivacyCenter/components/ModifyConsentModal.tsx +0 -334
  129. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationBell.tsx +0 -173
  130. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationCTAButton.tsx +0 -18
  131. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationDropdown.tsx +0 -54
  132. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationDropdownItem.tsx +0 -57
  133. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationIcon.tsx +0 -19
  134. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationListPanel.tsx +0 -92
  135. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationRefreshButton.tsx +0 -20
  136. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationRow.tsx +0 -58
  137. package/src/RedactoPrivacyCenter/components/NotificationHub/StatCard.tsx +0 -10
  138. package/src/RedactoPrivacyCenter/components/NotificationHub/useNotificationActions.ts +0 -112
  139. package/src/RedactoPrivacyCenter/components/NotificationHub/utils.ts +0 -27
  140. package/src/RedactoPrivacyCenter/components/Pagination.tsx +0 -140
  141. package/src/RedactoPrivacyCenter/components/PrivacyCenterEmptyState.tsx +0 -76
  142. package/src/RedactoPrivacyCenter/components/PrivacyCenterSessionExpired.tsx +0 -97
  143. package/src/RedactoPrivacyCenter/components/ReceiptsList.tsx +0 -454
  144. package/src/RedactoPrivacyCenter/components/RequestSubmit.tsx +0 -270
  145. package/src/RedactoPrivacyCenter/components/SelectUser.tsx +0 -95
  146. package/src/RedactoPrivacyCenter/components/SelectUserGate.tsx +0 -195
  147. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/constants.tsx +0 -25
  148. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/types.ts +0 -21
  149. package/src/RedactoPrivacyCenter/components/caseHistoryColumns.tsx +0 -159
  150. package/src/RedactoPrivacyCenter/components/constant.ts +0 -52
  151. package/src/RedactoPrivacyCenter/components/groupHelpers.ts +0 -155
  152. package/src/RedactoPrivacyCenter/components/receiptColumns.tsx +0 -203
  153. package/src/RedactoPrivacyCenter/components/types.ts +0 -123
  154. package/src/RedactoPrivacyCenter/components/utils.tsx +0 -10
  155. package/src/RedactoPrivacyCenter/config/routes.ts +0 -9
  156. package/src/RedactoPrivacyCenter/config/table.ts +0 -25
  157. package/src/RedactoPrivacyCenter/context/AuthContext.tsx +0 -252
  158. package/src/RedactoPrivacyCenter/context/BaseUrlContext.tsx +0 -47
  159. package/src/RedactoPrivacyCenter/context/BrandingContext.tsx +0 -52
  160. package/src/RedactoPrivacyCenter/context/DataAvailabilityContext.session-expired.test.tsx +0 -92
  161. package/src/RedactoPrivacyCenter/context/DataAvailabilityContext.tsx +0 -181
  162. package/src/RedactoPrivacyCenter/context/LocaleContext.tsx +0 -11
  163. package/src/RedactoPrivacyCenter/context/NavigationContext.tsx +0 -96
  164. package/src/RedactoPrivacyCenter/context/OrganizationContext.tsx +0 -30
  165. package/src/RedactoPrivacyCenter/context/PageChromeContext.tsx +0 -80
  166. package/src/RedactoPrivacyCenter/context/ProfileSwitchContext.tsx +0 -15
  167. package/src/RedactoPrivacyCenter/context/types.ts +0 -57
  168. package/src/RedactoPrivacyCenter/lib/api.ts +0 -759
  169. package/src/RedactoPrivacyCenter/lib/consent-manager/utils.tsx +0 -67
  170. package/src/RedactoPrivacyCenter/lib/constants.ts +0 -283
  171. package/src/RedactoPrivacyCenter/lib/i18n.ts +0 -81
  172. package/src/RedactoPrivacyCenter/lib/locales.ts +0 -102
  173. package/src/RedactoPrivacyCenter/lib/queries.ts +0 -141
  174. package/src/RedactoPrivacyCenter/lib/sandbox.ts +0 -104
  175. package/src/RedactoPrivacyCenter/lib/types.ts +0 -896
  176. package/src/RedactoPrivacyCenter/lib/useCurrentLanguage.ts +0 -37
  177. package/src/RedactoPrivacyCenter/lib/utils.refresh-circuit.test.ts +0 -127
  178. package/src/RedactoPrivacyCenter/lib/utils.refresh-storage.test.ts +0 -85
  179. package/src/RedactoPrivacyCenter/lib/utils.session-expired.test.ts +0 -109
  180. package/src/RedactoPrivacyCenter/lib/utils.ts +0 -798
  181. package/src/RedactoPrivacyCenter/locales/as/translation.json +0 -342
  182. package/src/RedactoPrivacyCenter/locales/bn/translation.json +0 -342
  183. package/src/RedactoPrivacyCenter/locales/brx/translation.json +0 -342
  184. package/src/RedactoPrivacyCenter/locales/doi/translation.json +0 -342
  185. package/src/RedactoPrivacyCenter/locales/en/translation.json +0 -357
  186. package/src/RedactoPrivacyCenter/locales/gom/translation.json +0 -342
  187. package/src/RedactoPrivacyCenter/locales/gu/translation.json +0 -342
  188. package/src/RedactoPrivacyCenter/locales/hi/translation.json +0 -345
  189. package/src/RedactoPrivacyCenter/locales/kn/translation.json +0 -342
  190. package/src/RedactoPrivacyCenter/locales/ks/translation.json +0 -342
  191. package/src/RedactoPrivacyCenter/locales/mai/translation.json +0 -342
  192. package/src/RedactoPrivacyCenter/locales/ml/translation.json +0 -342
  193. package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +0 -342
  194. package/src/RedactoPrivacyCenter/locales/mr/translation.json +0 -342
  195. package/src/RedactoPrivacyCenter/locales/ne/translation.json +0 -342
  196. package/src/RedactoPrivacyCenter/locales/or/translation.json +0 -342
  197. package/src/RedactoPrivacyCenter/locales/pa/translation.json +0 -342
  198. package/src/RedactoPrivacyCenter/locales/sa/translation.json +0 -342
  199. package/src/RedactoPrivacyCenter/locales/sat/translation.json +0 -342
  200. package/src/RedactoPrivacyCenter/locales/sd/translation.json +0 -342
  201. package/src/RedactoPrivacyCenter/locales/ta/translation.json +0 -342
  202. package/src/RedactoPrivacyCenter/locales/te/translation.json +0 -342
  203. package/src/RedactoPrivacyCenter/locales/ur/translation.json +0 -342
  204. package/src/RedactoPrivacyCenter/styles/applyBrandingTheme.ts +0 -66
  205. package/src/RedactoPrivacyCenter/styles/base.css +0 -117
  206. package/src/RedactoPrivacyCenter/styles/injectStyles.ts +0 -3108
  207. package/src/RedactoPrivacyCenter/styles/pcStyles.ts +0 -831
  208. package/src/RedactoPrivacyCenter/styles/responsive.ts +0 -138
  209. package/src/RedactoPrivacyCenter/styles/variables.css +0 -96
  210. package/src/RedactoPrivacyCenter/table/AdvancedTable.tsx +0 -387
  211. package/src/RedactoPrivacyCenter/table/AdvancedTablePagination.tsx +0 -468
  212. package/src/RedactoPrivacyCenter/table/index.ts +0 -2
  213. package/src/RedactoPrivacyCenter/types/images.d.ts +0 -29
  214. package/src/RedactoPrivacyCenter/ui/Footer.tsx +0 -69
  215. package/src/RedactoPrivacyCenter/ui/FormBlockWrapper.tsx +0 -54
  216. package/src/RedactoPrivacyCenter/ui/PCAccordion.tsx +0 -93
  217. package/src/RedactoPrivacyCenter/ui/PCActionIcon.tsx +0 -47
  218. package/src/RedactoPrivacyCenter/ui/PCAvatar.test.tsx +0 -83
  219. package/src/RedactoPrivacyCenter/ui/PCAvatar.tsx +0 -93
  220. package/src/RedactoPrivacyCenter/ui/PCBadge.tsx +0 -48
  221. package/src/RedactoPrivacyCenter/ui/PCButton.tsx +0 -77
  222. package/src/RedactoPrivacyCenter/ui/PCCheckbox.tsx +0 -55
  223. package/src/RedactoPrivacyCenter/ui/PCCollapse.tsx +0 -107
  224. package/src/RedactoPrivacyCenter/ui/PCEmpty.tsx +0 -35
  225. package/src/RedactoPrivacyCenter/ui/PCInput.tsx +0 -132
  226. package/src/RedactoPrivacyCenter/ui/PCLoader.tsx +0 -31
  227. package/src/RedactoPrivacyCenter/ui/PCModal.tsx +0 -106
  228. package/src/RedactoPrivacyCenter/ui/PCPopover.tsx +0 -206
  229. package/src/RedactoPrivacyCenter/ui/PCSelect.tsx +0 -433
  230. package/src/RedactoPrivacyCenter/ui/PCTable.tsx +0 -149
  231. package/src/RedactoPrivacyCenter/ui/PCText.tsx +0 -41
  232. package/src/RedactoPrivacyCenter/ui/PCTextarea.tsx +0 -43
  233. package/src/RedactoPrivacyCenter/ui/PCTitle.tsx +0 -37
  234. package/src/RedactoPrivacyCenter/ui/PCTooltip.tsx +0 -121
  235. package/src/RedactoPrivacyCenter/ui/SimpleBar.tsx +0 -25
  236. package/src/RedactoPrivacyCenter/ui/StatusBadge.tsx +0 -53
  237. package/src/RedactoPrivacyCenter/ui/index.ts +0 -18
  238. package/src/RedactoPrivacyCenter/utils/cn.ts +0 -28
  239. package/src/RedactoPrivacyCenter/utils/date.ts +0 -48
  240. package/src/RedactoPrivacyCenter/utils/status.ts +0 -111
  241. package/src/RedactoPrivacyCenter/utils/toast.ts +0 -130
  242. package/src/index.ts +0 -19
  243. package/src/privacy-center.ts +0 -113
  244. package/src/shared/api-errors.ts +0 -180
  245. package/src/shared/notice-consent-status.ts +0 -190
  246. package/src/shared/sandbox.ts +0 -6
  247. package/src/types/css.d.ts +0 -4
  248. package/src/types/images.d.ts +0 -19
  249. package/src/types/react-jsx.d.ts +0 -26
  250. package/tests/DataAvailabilityContext.test.tsx +0 -123
  251. package/tests/Form.test.tsx +0 -1424
  252. package/tests/ManageConsentErrorMapping.test.tsx +0 -85
  253. package/tests/ProductSelectionSection.test.tsx +0 -328
  254. package/tests/RequestSubmit.test.tsx +0 -135
  255. package/tests/RevocablePurpose.test.tsx +0 -146
  256. package/tests/RevokeWarningMessage.test.tsx +0 -151
  257. package/tests/consentClient.test.ts +0 -217
  258. package/tests/manageConsentServer.test.ts +0 -38
  259. package/tests/mocks.ts +0 -257
  260. package/tests/resolveContactFromJwt.test.ts +0 -44
  261. package/tests/setup.ts +0 -16
  262. package/tsconfig.json +0 -16
  263. package/tsup.config.ts +0 -31
  264. package/vitest.config.ts +0 -16
@@ -1,896 +0,0 @@
1
- export type SandboxConfig = Readonly<{
2
- token: string;
3
- /** UCIC — the client's own user id (`org_user_id`). Takes precedence over `subject`. */
4
- ucic?: string;
5
- subject: string;
6
- organisationUuid: string;
7
- workspaceUuid: string;
8
- slug: string;
9
- }>;
10
-
11
- /** The identity payload fragment for the sandbox acting principal. */
12
- export type SandboxIdentityPayload =
13
- | { org_user_id: string }
14
- | { primary_email: string }
15
- | { primary_mobile: string };
16
-
17
- export type Workspace = {
18
- uuid: string;
19
- suid: string;
20
- name: string;
21
- description: string;
22
- workspace_type: string;
23
- status: string;
24
- };
25
-
26
- export type OrganizationDetail = {
27
- uuid: string;
28
- suid: string;
29
- name: string;
30
- slug: string;
31
- description: string;
32
- domain: string;
33
- workspaces: Workspace[];
34
- ai_summary: Record<string, unknown>;
35
- icon_url: string | null;
36
- activated: boolean;
37
- allowed_domains: string[];
38
- };
39
-
40
- export type OrganizationResponse = {
41
- code: number;
42
- status: string;
43
- detail: OrganizationDetail;
44
- };
45
-
46
- export type OrgBrandingTheme = {
47
- primary: string;
48
- secondary: string;
49
- primary_contrast: string;
50
- link: string;
51
- surface: string;
52
- text: string;
53
- text_muted: string;
54
- border: string;
55
- success: string;
56
- warning: string;
57
- danger: string;
58
- };
59
-
60
- export type OrgBrandingDetail = {
61
- logo_url: string | null;
62
- icon_url: string | null;
63
- brand_name: string;
64
- theme: OrgBrandingTheme;
65
- hide_platform_branding: boolean;
66
- };
67
-
68
- export type DataElement = {
69
- uuid: string;
70
- name: string;
71
- description: string;
72
- enabled: boolean;
73
- required: boolean;
74
- given_consent: boolean;
75
- selected: boolean;
76
- };
77
-
78
- export type Purpose = {
79
- uuid: string;
80
- name: string;
81
- description: string;
82
- industries: string;
83
- selected: boolean;
84
- given_consent: boolean;
85
- data_elements: DataElement[];
86
- status?: string;
87
- validity?: number | null;
88
- purpose_uuid?: string;
89
- enabled?: boolean;
90
- };
91
-
92
- export type RawPurposeWrapper = {
93
- purpose: Purpose;
94
- };
95
-
96
- export type GrievanceValue =
97
- | 'consent_violation'
98
- | 'unlawful_processing'
99
- | 'data_breach';
100
-
101
- export type GrievanceOptions = {
102
- value: GrievanceValue;
103
- label: string;
104
- };
105
-
106
- /**
107
- * Product-scoped form-data group.
108
- *
109
- * Phase 2 of TECH-3712. Mirrors the backend `FormProductGroupOut`. Used to
110
- * render per-product sections inside the privacy-center form. `nominator`
111
- * is populated on nominated groups and `null` on direct (own-data) groups.
112
- */
113
- export type FormProductGroup = {
114
- product_uuid: string;
115
- product_name: string;
116
- product_description: string | null;
117
- nominator: NominatorInfo | null;
118
- // Bare `Purpose[]` — matches the backend `FormProductGroupOut.purposes`
119
- // contract (`List[PurposeConsentFormOut]`). The legacy `FormData.purposes`
120
- // field below remains wrapped (`RawPurposeWrapper[]`) for back-compat.
121
- purposes: Purpose[];
122
- };
123
-
124
- export type FormData = {
125
- uuid: string;
126
- name: string;
127
- contact: string;
128
- grievance_options: GrievanceOptions[];
129
- // Legacy flat list, retained for backwards compatibility with older SDK
130
- // consumers. The backend continues to populate this alongside the grouped
131
- // fields below.
132
- purposes: RawPurposeWrapper[];
133
- // Phase 2 of TECH-3712. Product-grouped purposes for the data principal's
134
- // own consents. Empty array when the backend has no direct groups to emit.
135
- // Optional so legacy backends (pre-Phase 1) typecheck — the runtime
136
- // grouped-render guard already handles the absent case.
137
- direct_groups?: FormProductGroup[];
138
- // Phase 2 of TECH-3712. Product-grouped purposes the data principal can
139
- // act on as a nominee. Empty array when there are no nominator grants.
140
- // Optional for the same backwards-compatibility reason as `direct_groups`.
141
- nominated_groups?: FormProductGroup[];
142
- };
143
-
144
- export type FormDataResponse = {
145
- code: number;
146
- detail: FormData;
147
- };
148
-
149
- export enum RequestTypeEnum {
150
- ACCESS = 'ACCESS',
151
- CORRECTION = 'CORRECTION',
152
- ERASURE = 'erasure',
153
- GRIEVANCE = 'grievance',
154
- NOMINATION = 'nomination',
155
- }
156
-
157
- export type NominationData = {
158
- nominee_email: string;
159
- nominee_mobile?: string;
160
- };
161
-
162
- export type UpdatePurpose = {
163
- purpose_uuid: string;
164
- data_element_uuids: string[];
165
- };
166
-
167
- export type UpdateCorrectionDataItem = {
168
- name: string;
169
- curr_value: string;
170
- new_value: string;
171
- };
172
-
173
- export enum GrievanceTypeEnum {
174
- CONSENT_VIOLATION = 'consent_violation',
175
- UNLAWFUL_PROCESSING = 'unlawful_processing',
176
- DATA_BREACH = 'data_breach',
177
- }
178
-
179
- export type GrievanceTypeElement = {
180
- grievance: GrievanceValue;
181
- };
182
-
183
- export type UpdateRequestDetails = {
184
- purposes: UpdatePurpose[];
185
- correction_data: UpdateCorrectionDataItem[];
186
- grievance_types?: GrievanceTypeElement[];
187
- nomination_data?: NominationData;
188
- };
189
-
190
- export type UserDataRequest = {
191
- uuid: string;
192
- name: string;
193
- contact: string;
194
- request_type: RequestTypeEnum;
195
- supporting_docs_uuids: string[];
196
- request_details: {
197
- purposes: UpdatePurpose[];
198
- correction_data: UpdateCorrectionDataItem[];
199
- grievance_types: GrievanceTypeElement[];
200
- nomination_data?: NominationData;
201
- };
202
- time_period: number | null;
203
- requestor_note: string;
204
- revoke_consent_on_fulfilment?: boolean;
205
- // Phase 2 of TECH-3712. Optional product anchor for the case. When set,
206
- // the case is created against the (product, optional nominator) consent
207
- // group; when omitted, the case is created as a legacy org-level case.
208
- product_uuid?: string;
209
- // Phase 2 of TECH-3712. Optional data-principal anchor used when the
210
- // requestor is acting on behalf of a nominator. Omit for direct cases.
211
- data_principal_uuid?: string;
212
- };
213
-
214
- export type CreateCaseResponse = {
215
- code: number;
216
- status: string;
217
- detail: {
218
- uuid: string;
219
- case_id: string;
220
- };
221
- };
222
-
223
- export type OtpResponse = {
224
- uuid: string;
225
- to: string;
226
- channel: string;
227
- expire_at: string;
228
- success: boolean;
229
- message: string;
230
- };
231
-
232
- export type OtpVerificationResponse = {
233
- token: string;
234
- success: boolean;
235
- message: string;
236
- };
237
-
238
- export type TokenExchangeResponse = {
239
- token: string;
240
- refresh_token: string;
241
- expires_at: string;
242
- notice_uuid: string;
243
- };
244
-
245
- export type FetchOrgParams = {
246
- slug?: string;
247
- name?: string;
248
- };
249
-
250
- export type ConsentDataElement = {
251
- uuid: string;
252
- name: string;
253
- enabled: boolean;
254
- required: boolean;
255
- selected: boolean;
256
- };
257
-
258
- export type NominatorInfo = {
259
- org_user_id: string;
260
- name: string | null;
261
- uuid: string;
262
- email: string | null;
263
- };
264
-
265
- export type PurposeItem = {
266
- purpose_uuid: string;
267
- // Alias emitted by the legacy Python user-consents payload, which keys some
268
- // purposes as `uuid` instead of `purpose_uuid`. Optional: the Go ledger
269
- // always sends `purpose_uuid`.
270
- uuid?: string;
271
- name: string;
272
- description: string | null;
273
- status: ConsentStatusEnum | string;
274
- given_date: string | null;
275
- valid_till: string | null;
276
- method: string;
277
- data_elements: ConsentDataElement[];
278
- link_reason: string | null;
279
- // When explicitly false, the purpose cannot be self-service withdrawn/revoked
280
- // in the Privacy Center — the user must raise a data-subject request instead.
281
- // Optional for backwards-compat: older backends omit it (treated as revocable).
282
- revocable?: boolean;
283
- // Per-purpose override for the revoke-confirmation warning message. When set,
284
- // the revoke modal shows this text instead of the localized default; when
285
- // null/empty/absent, the default `revokeConsentWarning` copy is used.
286
- // Optional for backwards-compat: older backends omit it.
287
- revoke_warning_message?: string | null;
288
- // UUID of the notice version this purpose was consented under. Served by the
289
- // Go ledger's user-consents response; required to revoke/regrant via the
290
- // ledger's submit-consent endpoint (which has no manage-consent route).
291
- notice_uuid: string | null;
292
- };
293
-
294
- export type ConsentGroup = {
295
- product_uuid: string;
296
- product_name: string;
297
- product_description: string | null;
298
- nominator: NominatorInfo | null;
299
- total_purposes: number;
300
- active_purposes: number;
301
- purposes: PurposeItem[];
302
- has_more_purposes: boolean;
303
- };
304
-
305
- export type PaginationMeta = {
306
- total_count: number;
307
- offset: number;
308
- limit: number;
309
- };
310
-
311
- export type Pagination = PaginationMeta;
312
-
313
- export type ConsentHistoryStatusSummary = {
314
- total_purposes: number;
315
- direct_purposes: number;
316
- nominated_purposes: number;
317
- active_purposes: number;
318
- inactive_purposes: number;
319
- };
320
-
321
- export type DisplayProductGroup = ConsentGroup & {
322
- withdrawn_purposes: number;
323
- expired_purposes: number;
324
- declined_purposes: number;
325
- latest_given_date: string | null;
326
- };
327
-
328
- export type DisplayPurposeRow = PurposeItem & {
329
- product_uuid: string;
330
- product_name: string;
331
- product_description: string | null;
332
- nominator: NominatorInfo | null;
333
- };
334
-
335
- export type ConsentModalRecord = PurposeItem & {
336
- product_uuid: string;
337
- product_name: string;
338
- product_description: string | null;
339
- nominator: NominatorInfo | null;
340
- };
341
-
342
- export type UserConsentDetail = {
343
- direct: ConsentGroup[];
344
- direct_pagination: PaginationMeta;
345
- nominated: ConsentGroup[];
346
- nominated_pagination: PaginationMeta;
347
- user_status: 'ACTIVE' | 'TRANSFERRED' | null;
348
- nominators: NominatorInfo[];
349
- status_summary: ConsentHistoryStatusSummary;
350
- };
351
-
352
- export type GroupPurposesOut = {
353
- purposes: PurposeItem[];
354
- pagination: PaginationMeta;
355
- };
356
-
357
- export type UserConsentResponse = {
358
- code: number;
359
- status: string;
360
- detail: UserConsentDetail;
361
- };
362
-
363
- export enum ConsentStatusEnum {
364
- ACTIVE = 'ACTIVE',
365
- WITHDRAWN = 'WITHDRAW',
366
- REVOKED = 'REVOKED',
367
- EXPIRED = 'EXPIRED',
368
- DECLINED = 'DECLINED',
369
- }
370
-
371
- export type ConsentAction = 'revoke' | 'regrant' | 'renew';
372
-
373
- export type ManageConsentResponse = {
374
- code: number;
375
- status: string;
376
- detail: {
377
- success: boolean;
378
- };
379
- };
380
-
381
- // Unwrapped `detail` of the legacy Python manage-consent response; the Go
382
- // ledger returns a ConsentEventResponse with no `success` flag instead.
383
- export type LegacyManageConsentResponse = {
384
- success: boolean;
385
- };
386
-
387
- export type ManageConsentParams = {
388
- organizationId: string;
389
- workspaceId: string;
390
- purposeId: string;
391
- contact: string;
392
- action: ConsentAction;
393
- nominatorContact?: string;
394
- dataElementUuids?: string[];
395
- };
396
-
397
- export type GrievanceDataSectionProps = {
398
- grievanceOptions: GrievanceOptions[];
399
- selectedGrievances: Record<string, boolean>;
400
- setSelectedGrievances: React.Dispatch<
401
- React.SetStateAction<Record<string, boolean>>
402
- >;
403
- };
404
-
405
- export type NominationDataSectionProps = {
406
- nominationData: NominationData;
407
- setNominationData: React.Dispatch<React.SetStateAction<NominationData>>;
408
- isTranslating?: boolean;
409
- };
410
-
411
- export type Activity = {
412
- activity_type: string;
413
- activity_type_display?: string;
414
- timestamp: string;
415
- title: string;
416
- title_display?: string;
417
- description: string;
418
- description_display?: string;
419
- case_id?: string;
420
- status?: 'Processing' | 'Completed' | 'Rejected';
421
- status_display?: string;
422
- };
423
-
424
- export type ActivityDetail = {
425
- data: Activity[];
426
- pagination: Pagination;
427
- };
428
-
429
- // ─── Receipts ────────────────────────────────────────────────────────────────
430
-
431
- export type ReceiptEventType = 'GRANTED' | 'WITHDRAWN' | 'DECLINED' | 'EXPIRED';
432
- export type ReceiptPurposeStatus = 'CONSENTED' | 'DECLINED' | 'WITHDRAWN';
433
-
434
- /**
435
- * A single consent receipt row. The backend returns localized `*_display`
436
- * fields alongside the raw enum/value — render the `*_display`, branch on the raw.
437
- */
438
- export type Receipt = {
439
- uuid: string;
440
- event_type: ReceiptEventType | string;
441
- event_type_display?: string | null;
442
- product_name?: string | null;
443
- product_name_display?: string | null;
444
- created_at: string;
445
- };
446
-
447
- // Mirrors the Go ledger's `ConsentReceiptListResponse` (offset-paginated page
448
- // of the principal's receipts): flat `total`/`skip`/`limit`, not a nested
449
- // `pagination` object. Without a configured ledgerBaseUrl the legacy Python
450
- // list is called instead, which returns a `{ data, pagination }` envelope —
451
- // `normalizeReceipts` in ReceiptsList tolerates either shape; this type
452
- // documents the ledger contract.
453
- export type ReceiptListResponse = {
454
- data: Receipt[];
455
- total: number;
456
- skip: number;
457
- limit: number;
458
- };
459
-
460
- export type ActivityResponse = {
461
- code: number;
462
- status: string;
463
- detail: ActivityDetail;
464
- };
465
-
466
- export type ActivityBadgeStatus =
467
- | 'success'
468
- | 'warning'
469
- | 'error'
470
- | 'info'
471
- | 'pending';
472
-
473
- export type CaseRequestDetails = {
474
- purposes: RawPurposeWrapper[];
475
- correction_data: UpdateCorrectionDataItem[];
476
- grievance_types?: GrievanceTypeElement[];
477
- nomination_data?: NominationData;
478
- };
479
-
480
- export type CaseRequest = {
481
- uuid: string;
482
- case_id: string;
483
- status: string;
484
- status_display?: string;
485
- request_type: string;
486
- request_type_display?: string;
487
- description: string;
488
- description_display?: string;
489
- created_at: string;
490
- completed_at?: string;
491
- due_date?: string;
492
- request_details?: CaseRequestDetails;
493
- // Phase 2 of TECH-3712. Product anchor (when the case was created against
494
- // a product consent group). Undefined for legacy org-level cases.
495
- product_uuid?: string;
496
- // Phase 2 of TECH-3712. Product display name hydrated by the console list
497
- // endpoint. Undefined on legacy cases or when the product is not joinable.
498
- product_name?: string;
499
- // Phase 2 of TECH-3712. Data-principal anchor for nominee-driven cases.
500
- data_principal_uuid?: string;
501
- // Phase 2 of TECH-3712. UUID of the user who initiated the case (may be
502
- // the data principal themselves or a nominee acting on their behalf).
503
- requestor_uuid?: string;
504
- // Phase 2 of TECH-3712. UUID of the nominator whose grant authorised the
505
- // nominee to file this case. Undefined for direct cases.
506
- nominator_uuid?: string;
507
- };
508
-
509
- export type RequestDetailsTabProps = {
510
- selectedCase: CaseRequest;
511
- request_details: CaseRequestDetails | undefined;
512
- requestTypeLabel: string;
513
- };
514
-
515
- export type CaseHistoryDetail = {
516
- data: CaseRequest[];
517
- pagination: Pagination;
518
- };
519
-
520
- export type CaseHistoryResponse = {
521
- code: number;
522
- status: string;
523
- detail: CaseRequest[];
524
- };
525
-
526
- // ─── Case Communication ──────────────────────────────────────────────────────
527
-
528
- export type MessageType =
529
- | 'message_sent'
530
- | 'document_requested'
531
- | 'document_submitted'
532
- | 'document_replaced'
533
- | 'document_replacement_requested'
534
- | 'document_approved'
535
- | 'document_rejected';
536
-
537
- export type DocumentRequestStatus =
538
- | 'pending'
539
- | 'under_review'
540
- | 'approved'
541
- | 'rejected'
542
- | 'replacement_requested';
543
-
544
- export type FileUrlMap = {
545
- url?: string;
546
- download_url?: string;
547
- };
548
-
549
- export type MessageDocument = {
550
- uuid: string;
551
- file_name: string | null;
552
- content_type: string | null;
553
- file_size: number | null;
554
- file_url: FileUrlMap | null;
555
- };
556
-
557
- export type DocumentRequestMetadata = {
558
- title: string;
559
- accepted_document: string;
560
- document_request_status: DocumentRequestStatus;
561
- document_request_uuid: string | null;
562
- rejection_reason: string;
563
- };
564
-
565
- export type CaseMessage = {
566
- uuid: string;
567
- case_uuid: string;
568
- sender_role: 'data_fiduciary' | 'data_principal';
569
- triggered_by_email: string;
570
- created_at: string;
571
- body: string;
572
- document_uuids: string[];
573
- documents: MessageDocument[];
574
- message_type: MessageType;
575
- document_request_metadata: DocumentRequestMetadata | null;
576
- };
577
-
578
- export type TabId = 'messages' | 'request-details';
579
-
580
- export type PendingUpload = { uuid: string; file_name: string; file_size: number };
581
-
582
- // ─── Case Communication server action params ────────────────────────────────
583
-
584
- export type CaseActionBaseParams = {
585
- organizationId: string;
586
- workspaceId: string;
587
- caseUuid: string;
588
- authToken?: string;
589
- consentClient?: ReturnType<typeof import('../api/client').createConsentClient>;
590
- };
591
-
592
- export type GetCaseMessagesParams = CaseActionBaseParams;
593
-
594
- export type SendCaseMessageParams = CaseActionBaseParams & {
595
- body: string;
596
- documentUuids: string[];
597
- };
598
-
599
- export type UploadCaseDocumentParams = CaseActionBaseParams & {
600
- file: File;
601
- };
602
-
603
- export type SubmitDocumentForRequestParams = CaseActionBaseParams & {
604
- requestEventUuid: string;
605
- documentUuid: string;
606
- body: string;
607
- };
608
-
609
- export type GetCaseDocumentParams = CaseActionBaseParams & {
610
- documentUuid: string;
611
- };
612
-
613
- export type UploadDocumentResponse = {
614
- uuid: string;
615
- suid: string;
616
- file_name: string;
617
- file_type: string;
618
- content_type: string;
619
- file_size: number;
620
- created_at: string;
621
- is_public: boolean;
622
- file: string;
623
- file_hash: string | null;
624
- status: string;
625
- allow_ai_processing: boolean;
626
- metadata: Record<string, string> | null;
627
- };
628
-
629
- export type MessageItemProps = Readonly<{
630
- message: CaseMessage;
631
- onUploadForRequest: (requestEventUuid: string) => void;
632
- isSubmittingForRequest: boolean;
633
- isCaseFinalized: boolean;
634
- }>;
635
-
636
- export type ChatBubbleProps = Readonly<{
637
- message: CaseMessage;
638
- isPrincipal: boolean;
639
- senderLabel: string;
640
- timestamp: string;
641
- }>;
642
-
643
- export type AttachmentCardProps = Readonly<{
644
- doc: MessageDocument;
645
- }>
646
-
647
- export type DocumentRequestCardProps = Readonly<{
648
- message: CaseMessage;
649
- onUpload: (requestEventUuid: string) => void;
650
- isSubmitting: boolean;
651
- isCaseFinalized: boolean;
652
- }>
653
-
654
- export type StatusEventProps = Readonly<{
655
- icon: React.ReactNode;
656
- color: string;
657
- bgColor: string;
658
- borderColor: string;
659
- text: string;
660
- subText?: string;
661
- timestamp: string;
662
- }>;
663
-
664
- export type MessagesTabProps = Readonly<{
665
- caseUuid: string;
666
- caseStatus: string;
667
- }>;
668
-
669
- export type MessageComposerProps = Readonly<{
670
- messageText: string;
671
- onMessageTextChange: (text: string) => void;
672
- pendingUpload: PendingUpload | null;
673
- onRemovePendingUpload: () => void;
674
- onAttachClick: () => void;
675
- onSend: () => void;
676
- isSending: boolean;
677
- isUploading: boolean;
678
- isCaseFinalized: boolean;
679
- }>;
680
-
681
- export type FinalizedTooltipWrapperProps = Readonly<{
682
- enabled: boolean;
683
- autoWidth?: boolean;
684
- children: React.ReactElement;
685
- }>;
686
-
687
- export type CaseStatusVariant =
688
- | 'success'
689
- | 'error'
690
- | 'warning'
691
- | 'info'
692
- | 'secondary';
693
-
694
-
695
- export type SendCaseMessageInput = Readonly<{
696
- body: string; documentUuids: string[]
697
- }>;
698
-
699
- export type SubmitDocumentForRequestInput = Readonly<{
700
- requestEventUuid: string; documentUuid: string; body: string
701
- }>;
702
-
703
- export type DocumentRequestStatusInfo = Readonly<{ labelKey: string; color: string }>;
704
-
705
- export type CaseDetailsTab = Readonly<{ id: TabId; label: string }>;
706
-
707
- // ─── Notification Hub ──────────────────────────────────────────────────────
708
-
709
- export type NotificationType =
710
- | 'guardian_verification_request'
711
- | 'consent_expiry_warning'
712
- | 'new_consent_notice'
713
- | 'consent_withdrawal_confirmation'
714
- | 'data_request_status_update'
715
- | 'case_message'
716
- | 'grievance_status_update'
717
- | 'consent_regrant_prompt';
718
-
719
- export type NotificationCategory = 'consent' | 'request' | 'system';
720
-
721
- export type NotificationCTA = {
722
- label: string;
723
- style: 'primary' | 'secondary' | 'danger';
724
- action_type: 'link' | 'acknowledge';
725
- url?: string;
726
- };
727
-
728
- export type Notification = {
729
- uuid: string;
730
- notification_type: NotificationType;
731
- category: NotificationCategory;
732
- title: string;
733
- description: string;
734
- is_read: boolean;
735
- is_acknowledged: boolean;
736
- source_type: string;
737
- source_uuid: string | null;
738
- request_type: string;
739
- request_type_display?: string | null;
740
- status_label: string;
741
- status_label_display?: string | null;
742
- ctas: NotificationCTA[];
743
- created_at: string;
744
- };
745
-
746
- export type NotificationSummary = {
747
- total: number;
748
- unread: number;
749
- action_needed: number;
750
- acknowledged: number;
751
- };
752
-
753
- export type NotificationListResponse = {
754
- data: Notification[];
755
- total: number;
756
- skip: number;
757
- limit: number;
758
- summary: NotificationSummary | null;
759
- };
760
-
761
- export type UnreadCountResponse = {
762
- count: number;
763
- };
764
-
765
- export type NotificationActionResponse = {
766
- message: string;
767
- };
768
-
769
- export type NotificationActionBaseParams = {
770
- organizationId: string;
771
- workspaceId: string;
772
- authToken?: string;
773
- consentClient?: ReturnType<typeof import('../api/client').createConsentClient>;
774
- };
775
-
776
- export type StatCardProps = Readonly<{
777
- value: number; label: string;
778
- }>
779
-
780
- export type NotificationDropdownProps = Readonly<{
781
- notifications: Notification[];
782
- onMarkAllRead: () => void;
783
- onRefresh: () => void;
784
- isRefreshing: boolean;
785
- onViewAll: () => void;
786
- onNotificationClick: (notification: Notification) => void;
787
- onCTAClick: (notification: Notification, cta: NotificationCTA) => void;
788
- }>;
789
-
790
- export type NotificationListPanelProps = Readonly<{
791
- notifications: Notification[];
792
- totalCount: number;
793
- activeTab: FilterTab;
794
- onTabChange: (tab: FilterTab) => void;
795
- skip: number;
796
- onSkipChange: (skip: number) => void;
797
- isLoading: boolean;
798
- isRefreshing: boolean;
799
- onRefresh: () => void;
800
- onMarkAllRead: () => void;
801
- onNotificationClick: (notification: Notification) => void;
802
- onCTAClick: (notification: Notification, cta: NotificationCTA) => void;
803
- }>;
804
-
805
-
806
- export type NotificationRowProps = Readonly<{
807
- notification: Notification;
808
- onClick: () => void;
809
- onCTAClick: (cta: NotificationCTA) => void;
810
- }>;
811
-
812
- export type NotificationIconProps = Readonly<{
813
- notificationType: NotificationType;
814
- size?: 'sm' | 'lg';
815
- }>;
816
-
817
- export type NotificationCTAButtonProps = Readonly<{
818
- cta: NotificationCTA;
819
- onClick: (e: React.MouseEvent) => void;
820
- size?: 'sm' | 'lg';
821
- }>;
822
-
823
- export type FilterTab = 'all' | 'consent' | 'request' | 'system';
824
-
825
- export type IconCategory = 'guardian' | 'consent' | 'access' | 'withdrawal' | 'grievance' | 'system';
826
-
827
- export type NotificationDropdownItemProps = Readonly<{
828
- notification: Notification;
829
- onNotificationClick: (notification: Notification) => void;
830
- onCTAClick: (notification: Notification, cta: NotificationCTA) => void;
831
- }>
832
-
833
- export type NotificationQueryParams = {
834
- category?: NotificationCategory;
835
- notification_type?: NotificationType;
836
- is_read?: boolean;
837
- skip?: number;
838
- limit?: number;
839
- include_summary?: boolean;
840
- language?: string;
841
- };
842
-
843
- export type NotificationClient = NonNullable<NotificationActionBaseParams['consentClient']>;
844
-
845
- export type GetNotificationsServerParams = NotificationActionBaseParams & NotificationQueryParams;
846
-
847
- export type NotificationByUuidServerParams = NotificationActionBaseParams & { notificationUuid: string };
848
-
849
- export type NotificationRefreshButtonProps = Readonly<{
850
- isRefreshing: boolean;
851
- onRefresh: () => void;
852
- iconSize?: number;
853
- }>;
854
-
855
- export type IdentityCandidate = Readonly<{
856
- uuid: string;
857
- org_user_id?: string | null;
858
- primary_email?: string | null;
859
- primary_mobile?: string | null;
860
- created_at?: string | null;
861
- }>;
862
-
863
- export type IdentityListResponse = Readonly<{
864
- identities: IdentityCandidate[];
865
- }>;
866
-
867
- export type SelectPrincipalResponse = Readonly<{
868
- token: string;
869
- refresh_token: string;
870
- expires_at?: string;
871
- }>;
872
-
873
- // Discrete phases of the shared-contact profile gate: `checking` probes the
874
- // backend for sibling principals, `picking` shows the profile picker, and
875
- // `resolved` passes through to children.
876
- export type GatePhase = 'checking' | 'picking' | 'resolved';
877
-
878
- export type SelectUserProps = Readonly<{
879
- candidates: IdentityCandidate[];
880
- onSelect: (orgUserId: string) => void;
881
- busyOrgUserId: string | null;
882
- error?: string | null;
883
- }>;
884
-
885
- export type SelectUserGateProps = Readonly<{
886
- children: React.ReactNode;
887
- }>;
888
-
889
- // Exposed by SelectUserGate so a signed-in session can re-open the profile
890
- // picker (shared contact). `canSwitch` is true only when the contact maps to
891
- // more than one principal; `switchProfile` drops the pinned choice and shows
892
- // the picker again.
893
- export type ProfileSwitchValue = Readonly<{
894
- canSwitch: boolean;
895
- switchProfile: () => void;
896
- }>;