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