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