@redacto.io/consent-sdk-react 10.0.0-beta.11 → 10.0.0-beta.12

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