@redacto.io/consent-sdk-react 5.3.0 → 7.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/.turbo/turbo-build.log +24 -0
- package/CHANGELOG.md +23 -0
- package/dist/privacy-center.d.mts +100 -42
- package/dist/privacy-center.d.ts +100 -42
- package/dist/privacy-center.js +4232 -2247
- package/dist/privacy-center.mjs +4266 -2284
- package/package.json +1 -1
- package/src/RedactoPrivacyCenter/PrivacyCenterLayout.tsx +6 -10
- package/src/RedactoPrivacyCenter/RedactoPrivacyCenter.tsx +18 -17
- package/src/RedactoPrivacyCenter/api/actions.ts +52 -8
- package/src/RedactoPrivacyCenter/api/client.ts +58 -15
- package/src/RedactoPrivacyCenter/api/orgBranding.ts +9 -0
- package/src/RedactoPrivacyCenter/components/ConsentManager.tsx +729 -278
- package/src/RedactoPrivacyCenter/components/ConsentManagerCells.tsx +187 -0
- package/src/RedactoPrivacyCenter/components/ConsentManagerColumns.tsx +65 -165
- package/src/RedactoPrivacyCenter/components/ConsentManagerExpandedRow.tsx +179 -0
- package/src/RedactoPrivacyCenter/components/ConsentManagerGroupedColumns.tsx +318 -0
- package/src/RedactoPrivacyCenter/components/ConsentManagerProductCards.tsx +333 -0
- package/src/RedactoPrivacyCenter/components/ConsentManagerPurposeCards.tsx +102 -0
- package/src/RedactoPrivacyCenter/components/ConsentManagerTableSkeleton.tsx +6 -2
- package/src/RedactoPrivacyCenter/components/Form.tsx +3 -3
- package/src/RedactoPrivacyCenter/components/ModifyConsentModal.tsx +9 -6
- package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationBell.tsx +1 -1
- package/src/RedactoPrivacyCenter/components/PrivacyCenterLayout.tsx +101 -56
- package/src/RedactoPrivacyCenter/components/SideMenuBarPC/SideBarPC.tsx +16 -2
- package/src/RedactoPrivacyCenter/components/types.ts +2 -5
- package/src/RedactoPrivacyCenter/context/BrandingContext.tsx +44 -0
- package/src/RedactoPrivacyCenter/context/PageChromeContext.tsx +21 -1
- package/src/RedactoPrivacyCenter/lib/api.ts +70 -28
- package/src/RedactoPrivacyCenter/lib/consent-manager/utils.tsx +4 -2
- package/src/RedactoPrivacyCenter/lib/types.ts +79 -36
- package/src/RedactoPrivacyCenter/locales/as/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/bho/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/bn/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/brx/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/doi/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/en/translation.json +16 -1
- package/src/RedactoPrivacyCenter/locales/gom/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/gu/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/hi/translation.json +15 -1
- package/src/RedactoPrivacyCenter/locales/kn/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/ks/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/mai/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/ml/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/mr/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/ne/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/or/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/pa/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/sa/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/sat/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/sd/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/ta/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/te/translation.json +12 -1
- package/src/RedactoPrivacyCenter/locales/ur/translation.json +12 -1
- package/src/RedactoPrivacyCenter/styles/applyBrandingTheme.ts +66 -0
- package/src/RedactoPrivacyCenter/styles/injectStyles.ts +528 -114
- package/src/RedactoPrivacyCenter/styles/pcStyles.ts +3 -2
- package/src/RedactoPrivacyCenter/styles/variables.css +5 -42
- package/src/RedactoPrivacyCenter/table/AdvancedTable.tsx +36 -16
- package/src/RedactoPrivacyCenter/table/AdvancedTablePagination.tsx +4 -12
- package/src/RedactoPrivacyCenter/ui/Footer.tsx +4 -10
- package/src/RedactoPrivacyCenter/ui/PCInput.tsx +1 -1
- package/src/RedactoPrivacyCenter/ui/PCSelect.tsx +51 -5
- package/src/privacy-center.ts +7 -3
- package/src/RedactoPrivacyCenter/components/ThemeTransitionOverlay.tsx +0 -85
- package/src/RedactoPrivacyCenter/context/theme.tsx +0 -127
- package/src/RedactoPrivacyCenter/ui/ThemeToggle.tsx +0 -72
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
> @redacto.io/consent-sdk-react@5.3.0 build /Users/sadanmianredacto/Developer/redacto/consent-sdk/packages/consent-sdk-react
|
|
3
|
+
> tsup
|
|
4
|
+
|
|
5
|
+
CLI Building entry: {"index":"src/index.ts","privacy-center":"src/privacy-center.ts"}
|
|
6
|
+
CLI Using tsconfig: tsconfig.json
|
|
7
|
+
CLI tsup v8.5.1
|
|
8
|
+
CLI Using tsup config: /Users/sadanmianredacto/Developer/redacto/consent-sdk/packages/consent-sdk-react/tsup.config.ts
|
|
9
|
+
CLI Target: es2019
|
|
10
|
+
CLI Cleaning output folder
|
|
11
|
+
ESM Build start
|
|
12
|
+
CJS Build start
|
|
13
|
+
ESM dist/index.mjs 225.25 KB
|
|
14
|
+
ESM dist/privacy-center.mjs 1.98 MB
|
|
15
|
+
ESM ⚡️ Build success in 67ms
|
|
16
|
+
CJS dist/index.js 234.39 KB
|
|
17
|
+
CJS dist/privacy-center.js 2.02 MB
|
|
18
|
+
CJS ⚡️ Build success in 66ms
|
|
19
|
+
DTS Build start
|
|
20
|
+
DTS ⚡️ Build success in 2662ms
|
|
21
|
+
DTS dist/index.d.mts 6.12 KB
|
|
22
|
+
DTS dist/privacy-center.d.mts 27.06 KB
|
|
23
|
+
DTS dist/index.d.ts 6.12 KB
|
|
24
|
+
DTS dist/privacy-center.d.ts 27.06 KB
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @redacto.io/consent-sdk-react
|
|
2
2
|
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- configurable privacy center SDK
|
|
8
|
+
- 331cbad: Apply org-level branding in `RedactoPrivacyCenter`. The privacy center now fetches `/user/api/0/public/org-branding/by-slug/{slug}` on mount and uses the response to:
|
|
9
|
+
- Swap the sidebar header avatar for the org's `icon_url` (collapsed) or wide `logo_url` (expanded).
|
|
10
|
+
- Show `brand_name` as the sidebar title.
|
|
11
|
+
- Hide the "Powered by Redacto" footer when `hide_platform_branding` is `true`.
|
|
12
|
+
- Apply the org's `theme` colors at runtime as `--pc-*` CSS custom-property overrides on `document.documentElement`. Primary/secondary hover and active variants are auto-derived. Cleared on unmount so the host page reverts to defaults.
|
|
13
|
+
|
|
14
|
+
**Breaking changes:**
|
|
15
|
+
- Removed dark mode from the privacy center. `ThemeProvider`, `useTheme`, `ThemeToggle`, and `ThemeTransitionOverlay` are deleted, the `[data-theme="dark"]` CSS block is gone, and the moon/sun toggle no longer appears in the navbar.
|
|
16
|
+
- Removed the `theme` prop from `RedactoPrivacyCenter`. The privacy center is now light-only; org-branding theme colors are applied on top.
|
|
17
|
+
|
|
18
|
+
Falls back to the previous initials avatar, slug-derived name, and SDK default colors when the branding response is unavailable.
|
|
19
|
+
|
|
20
|
+
## 6.0.0
|
|
21
|
+
|
|
22
|
+
### Major Changes
|
|
23
|
+
|
|
24
|
+
- update Manage Consent
|
|
25
|
+
|
|
3
26
|
## 5.3.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -69,7 +69,28 @@ declare function createConsentClient(baseUrl: string): {
|
|
|
69
69
|
/**
|
|
70
70
|
* Get user consents (privacy center)
|
|
71
71
|
*/
|
|
72
|
-
getUserConsents(baseRequest: BaseRequest,
|
|
72
|
+
getUserConsents(baseRequest: BaseRequest, params: {
|
|
73
|
+
offset?: number;
|
|
74
|
+
limit?: number;
|
|
75
|
+
nominated_offset?: number;
|
|
76
|
+
nominated_limit?: number;
|
|
77
|
+
status?: string;
|
|
78
|
+
product_uuid?: string;
|
|
79
|
+
search?: string;
|
|
80
|
+
language?: string;
|
|
81
|
+
}, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
|
|
82
|
+
/**
|
|
83
|
+
* Get purposes for a single product card (privacy center) — sister endpoint
|
|
84
|
+
* for lazy-loading purposes when a card returns has_more_purposes: true.
|
|
85
|
+
*/
|
|
86
|
+
getGroupPurposes(baseRequest: BaseRequest, productUuid: string, params: {
|
|
87
|
+
offset?: number;
|
|
88
|
+
limit?: number;
|
|
89
|
+
status?: string;
|
|
90
|
+
search?: string;
|
|
91
|
+
language?: string;
|
|
92
|
+
nominator_uuid?: string;
|
|
93
|
+
}, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
|
|
73
94
|
/**
|
|
74
95
|
* Manage consent (privacy center) - revoke, regrant, or renew
|
|
75
96
|
*/
|
|
@@ -283,60 +304,70 @@ type ConsentDataElement = {
|
|
|
283
304
|
required: boolean;
|
|
284
305
|
selected: boolean;
|
|
285
306
|
};
|
|
286
|
-
type UserConsent = {
|
|
287
|
-
purpose_uuid?: string;
|
|
288
|
-
purpose: string;
|
|
289
|
-
purpose_description: string;
|
|
290
|
-
status: ConsentStatusEnum;
|
|
291
|
-
given_date: string;
|
|
292
|
-
valid_till: string;
|
|
293
|
-
method: string;
|
|
294
|
-
data_elements: ConsentDataElement[];
|
|
295
|
-
product_uuid?: string;
|
|
296
|
-
product_name?: string;
|
|
297
|
-
product_description?: string | null;
|
|
298
|
-
nominator_info?: NominatorInfo;
|
|
299
|
-
};
|
|
300
307
|
type NominatorInfo = {
|
|
301
308
|
org_user_id: string;
|
|
302
309
|
name: string | null;
|
|
303
310
|
uuid: string;
|
|
304
311
|
email: string | null;
|
|
305
312
|
};
|
|
313
|
+
type PurposeItem = {
|
|
314
|
+
purpose_uuid: string;
|
|
315
|
+
name: string;
|
|
316
|
+
description: string | null;
|
|
317
|
+
status: ConsentStatusEnum | string;
|
|
318
|
+
given_date: string | null;
|
|
319
|
+
valid_till: string | null;
|
|
320
|
+
method: string;
|
|
321
|
+
data_elements: ConsentDataElement[];
|
|
322
|
+
link_reason: string | null;
|
|
323
|
+
};
|
|
324
|
+
type ConsentGroup = {
|
|
325
|
+
product_uuid: string;
|
|
326
|
+
product_name: string;
|
|
327
|
+
product_description: string | null;
|
|
328
|
+
nominator: NominatorInfo | null;
|
|
329
|
+
total_purposes: number;
|
|
330
|
+
active_purposes: number;
|
|
331
|
+
purposes: PurposeItem[];
|
|
332
|
+
has_more_purposes: boolean;
|
|
333
|
+
};
|
|
334
|
+
type PaginationMeta = {
|
|
335
|
+
total_count: number;
|
|
336
|
+
offset: number;
|
|
337
|
+
limit: number;
|
|
338
|
+
};
|
|
339
|
+
type Pagination = PaginationMeta;
|
|
306
340
|
type ConsentHistoryStatusSummary = {
|
|
307
341
|
total_purposes: number;
|
|
308
342
|
direct_purposes: number;
|
|
309
343
|
nominated_purposes: number;
|
|
310
|
-
nominee_purposes?: number;
|
|
311
344
|
active_purposes: number;
|
|
312
345
|
inactive_purposes: number;
|
|
313
346
|
};
|
|
314
|
-
type
|
|
347
|
+
type DisplayPurposeRow = PurposeItem & {
|
|
315
348
|
product_uuid: string;
|
|
316
349
|
product_name: string;
|
|
317
350
|
product_description: string | null;
|
|
318
|
-
|
|
319
|
-
total_purposes: number;
|
|
320
|
-
active_purposes: number;
|
|
351
|
+
nominator: NominatorInfo | null;
|
|
321
352
|
};
|
|
322
|
-
type
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
total_count: number;
|
|
328
|
-
offset: number;
|
|
329
|
-
limit: number;
|
|
353
|
+
type ConsentModalRecord = PurposeItem & {
|
|
354
|
+
product_uuid: string;
|
|
355
|
+
product_name: string;
|
|
356
|
+
product_description: string | null;
|
|
357
|
+
nominator: NominatorInfo | null;
|
|
330
358
|
};
|
|
331
359
|
type UserConsentDetail = {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
user_status
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
360
|
+
direct: ConsentGroup[];
|
|
361
|
+
direct_pagination: PaginationMeta;
|
|
362
|
+
nominated: ConsentGroup[];
|
|
363
|
+
nominated_pagination: PaginationMeta;
|
|
364
|
+
user_status: 'ACTIVE' | 'TRANSFERRED' | null;
|
|
365
|
+
nominators: NominatorInfo[];
|
|
366
|
+
status_summary: ConsentHistoryStatusSummary;
|
|
367
|
+
};
|
|
368
|
+
type GroupPurposesOut = {
|
|
369
|
+
purposes: PurposeItem[];
|
|
370
|
+
pagination: PaginationMeta;
|
|
340
371
|
};
|
|
341
372
|
type UserConsentResponse = {
|
|
342
373
|
code: number;
|
|
@@ -346,6 +377,7 @@ type UserConsentResponse = {
|
|
|
346
377
|
declare enum ConsentStatusEnum {
|
|
347
378
|
ACTIVE = "ACTIVE",
|
|
348
379
|
WITHDRAWN = "WITHDRAW",
|
|
380
|
+
REVOKED = "REVOKED",
|
|
349
381
|
EXPIRED = "EXPIRED",
|
|
350
382
|
DECLINED = "DECLINED"
|
|
351
383
|
}
|
|
@@ -535,22 +567,20 @@ declare const useInternalNavigation: () => NavigationContextType;
|
|
|
535
567
|
interface RedactoPrivacyCenterProps {
|
|
536
568
|
baseUrl: string;
|
|
537
569
|
slug: string;
|
|
538
|
-
theme?: 'light' | 'dark';
|
|
539
570
|
accessToken: string;
|
|
540
571
|
refreshToken: string;
|
|
541
572
|
onError: (error: Error) => boolean;
|
|
542
573
|
initialPage?: InternalPage;
|
|
543
574
|
onBack?: 'back' | 'signout';
|
|
544
575
|
}
|
|
545
|
-
declare function RedactoPrivacyCenter({ baseUrl, slug,
|
|
576
|
+
declare function RedactoPrivacyCenter({ baseUrl, slug, accessToken, refreshToken, onError, initialPage, onBack, }: RedactoPrivacyCenterProps): react_jsx_runtime.JSX.Element;
|
|
546
577
|
|
|
547
578
|
interface PrivacyCenterLayoutProps {
|
|
548
579
|
children: ReactNode;
|
|
549
|
-
defaultTheme?: 'light' | 'dark';
|
|
550
580
|
slug: string;
|
|
551
581
|
onBack?: 'back' | 'signout';
|
|
552
582
|
}
|
|
553
|
-
declare function PrivacyCenterLayout({ children,
|
|
583
|
+
declare function PrivacyCenterLayout({ children, slug, onBack }: PrivacyCenterLayoutProps): react_jsx_runtime.JSX.Element;
|
|
554
584
|
|
|
555
585
|
declare function PrivacyCenterHomePage(): react_jsx_runtime.JSX.Element;
|
|
556
586
|
|
|
@@ -688,7 +718,35 @@ declare const fetchProducts: (organizationId: string, workspaceId: string, skip?
|
|
|
688
718
|
name: string;
|
|
689
719
|
description?: string;
|
|
690
720
|
}> | null>;
|
|
691
|
-
|
|
721
|
+
type FetchUserConsentsParams = {
|
|
722
|
+
organizationId: string;
|
|
723
|
+
workspaceId: string;
|
|
724
|
+
offset?: number;
|
|
725
|
+
limit?: number;
|
|
726
|
+
nominatedOffset?: number;
|
|
727
|
+
nominatedLimit?: number;
|
|
728
|
+
search?: string;
|
|
729
|
+
status?: string;
|
|
730
|
+
product_uuid?: string;
|
|
731
|
+
language?: string;
|
|
732
|
+
authContext?: AuthContext;
|
|
733
|
+
consentClient?: BaseUrlContextValue['consentClient'];
|
|
734
|
+
};
|
|
735
|
+
declare const fetchUserConsents: (params: FetchUserConsentsParams) => Promise<UserConsentDetail | null>;
|
|
736
|
+
type FetchGroupPurposesParams = {
|
|
737
|
+
organizationId: string;
|
|
738
|
+
workspaceId: string;
|
|
739
|
+
productUuid: string;
|
|
740
|
+
offset?: number;
|
|
741
|
+
limit?: number;
|
|
742
|
+
status?: string;
|
|
743
|
+
search?: string;
|
|
744
|
+
language?: string;
|
|
745
|
+
nominatorUuid?: string;
|
|
746
|
+
authContext?: AuthContext;
|
|
747
|
+
consentClient?: BaseUrlContextValue['consentClient'];
|
|
748
|
+
};
|
|
749
|
+
declare const fetchGroupPurposes: (params: FetchGroupPurposesParams) => Promise<GroupPurposesOut | null>;
|
|
692
750
|
declare const manageConsent: ({ organizationId, workspaceId, purposeId, contact, action, authContext, consentClient, nominatorContact, dataElementUuids, }: {
|
|
693
751
|
organizationId: string;
|
|
694
752
|
workspaceId: string;
|
|
@@ -725,4 +783,4 @@ declare const useAuth: () => AuthContextValue;
|
|
|
725
783
|
*/
|
|
726
784
|
declare const injectPCStyles: () => void;
|
|
727
785
|
|
|
728
|
-
export { type Activity, type ActivityBadgeStatus$1 as ActivityBadgeStatus, type ActivityDetail, type ActivityResponse, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, type CaseHistoryDetail, type CaseHistoryResponse, type CaseRequest, type ConsentAction, type ConsentDataElement, type ConsentHistoryStatusSummary, ConsentStatusEnum, type CreateCaseResponse, type DataElement, type FetchOrgParams, type FormData, type FormDataResponse, type GrievanceOptions, type GrievanceTypeElement, GrievanceTypeEnum, type GrievanceValue, type InternalPage, type ManageConsentParams, type ManageConsentResponse, NavigationProvider, type
|
|
786
|
+
export { type Activity, type ActivityBadgeStatus$1 as ActivityBadgeStatus, type ActivityDetail, type ActivityResponse, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, type CaseHistoryDetail, type CaseHistoryResponse, type CaseRequest, type ConsentAction, type ConsentDataElement, type ConsentGroup, type ConsentHistoryStatusSummary, type ConsentModalRecord, ConsentStatusEnum, type CreateCaseResponse, type DataElement, type DisplayPurposeRow, type FetchOrgParams, type FormData, type FormDataResponse, type GrievanceOptions, type GrievanceTypeElement, GrievanceTypeEnum, type GrievanceValue, type GroupPurposesOut, type InternalPage, type ManageConsentParams, type ManageConsentResponse, NavigationProvider, type NominationData, type NominatorInfo, NotificationsPage, type OrganizationDetail, type OrganizationResponse, type OtpResponse, type OtpVerificationResponse, type Pagination, type PaginationMeta, PrivacyCenterActivityPage, PrivacyCenterCaseDetailsPage, PrivacyCenterConsentManagerPage, PrivacyCenterFormPage, PrivacyCenterHomePage, PrivacyCenterLayout, type Purpose, type PurposeItem, type RawPurposeWrapper, RedactoPrivacyCenter, RequestTypeEnum, type TokenExchangeResponse, type UpdateCorrectionDataItem, type UpdatePurpose, type UpdateRequestDetails, type UserConsentDetail, type UserConsentResponse, type UserDataRequest, type Workspace, checkAndRefreshAuth, compareEmails, createCaseRequest, createConsentClient, createOtpServer as createOtp, decodeJwtToken, ensureValidToken, exchangeTokenServer as exchangeToken, fetchActivities, fetchCaseHistory, fetchGroupPurposes, fetchProducts, fetchUserConsents, formatActivityType, getActivityTypeStatus, getCookieValue, getFormData, getInitialState, injectPCStyles, isJwtExpired, isUserAuthenticated, manageConsent, setRefreshTokenCookie, signOutPrivacyCenter, useAuth, useBaseUrl, useCaseHistory, useInternalNavigation, verifyOtpServer as verifyOtp };
|
package/dist/privacy-center.d.ts
CHANGED
|
@@ -69,7 +69,28 @@ declare function createConsentClient(baseUrl: string): {
|
|
|
69
69
|
/**
|
|
70
70
|
* Get user consents (privacy center)
|
|
71
71
|
*/
|
|
72
|
-
getUserConsents(baseRequest: BaseRequest,
|
|
72
|
+
getUserConsents(baseRequest: BaseRequest, params: {
|
|
73
|
+
offset?: number;
|
|
74
|
+
limit?: number;
|
|
75
|
+
nominated_offset?: number;
|
|
76
|
+
nominated_limit?: number;
|
|
77
|
+
status?: string;
|
|
78
|
+
product_uuid?: string;
|
|
79
|
+
search?: string;
|
|
80
|
+
language?: string;
|
|
81
|
+
}, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
|
|
82
|
+
/**
|
|
83
|
+
* Get purposes for a single product card (privacy center) — sister endpoint
|
|
84
|
+
* for lazy-loading purposes when a card returns has_more_purposes: true.
|
|
85
|
+
*/
|
|
86
|
+
getGroupPurposes(baseRequest: BaseRequest, productUuid: string, params: {
|
|
87
|
+
offset?: number;
|
|
88
|
+
limit?: number;
|
|
89
|
+
status?: string;
|
|
90
|
+
search?: string;
|
|
91
|
+
language?: string;
|
|
92
|
+
nominator_uuid?: string;
|
|
93
|
+
}, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
|
|
73
94
|
/**
|
|
74
95
|
* Manage consent (privacy center) - revoke, regrant, or renew
|
|
75
96
|
*/
|
|
@@ -283,60 +304,70 @@ type ConsentDataElement = {
|
|
|
283
304
|
required: boolean;
|
|
284
305
|
selected: boolean;
|
|
285
306
|
};
|
|
286
|
-
type UserConsent = {
|
|
287
|
-
purpose_uuid?: string;
|
|
288
|
-
purpose: string;
|
|
289
|
-
purpose_description: string;
|
|
290
|
-
status: ConsentStatusEnum;
|
|
291
|
-
given_date: string;
|
|
292
|
-
valid_till: string;
|
|
293
|
-
method: string;
|
|
294
|
-
data_elements: ConsentDataElement[];
|
|
295
|
-
product_uuid?: string;
|
|
296
|
-
product_name?: string;
|
|
297
|
-
product_description?: string | null;
|
|
298
|
-
nominator_info?: NominatorInfo;
|
|
299
|
-
};
|
|
300
307
|
type NominatorInfo = {
|
|
301
308
|
org_user_id: string;
|
|
302
309
|
name: string | null;
|
|
303
310
|
uuid: string;
|
|
304
311
|
email: string | null;
|
|
305
312
|
};
|
|
313
|
+
type PurposeItem = {
|
|
314
|
+
purpose_uuid: string;
|
|
315
|
+
name: string;
|
|
316
|
+
description: string | null;
|
|
317
|
+
status: ConsentStatusEnum | string;
|
|
318
|
+
given_date: string | null;
|
|
319
|
+
valid_till: string | null;
|
|
320
|
+
method: string;
|
|
321
|
+
data_elements: ConsentDataElement[];
|
|
322
|
+
link_reason: string | null;
|
|
323
|
+
};
|
|
324
|
+
type ConsentGroup = {
|
|
325
|
+
product_uuid: string;
|
|
326
|
+
product_name: string;
|
|
327
|
+
product_description: string | null;
|
|
328
|
+
nominator: NominatorInfo | null;
|
|
329
|
+
total_purposes: number;
|
|
330
|
+
active_purposes: number;
|
|
331
|
+
purposes: PurposeItem[];
|
|
332
|
+
has_more_purposes: boolean;
|
|
333
|
+
};
|
|
334
|
+
type PaginationMeta = {
|
|
335
|
+
total_count: number;
|
|
336
|
+
offset: number;
|
|
337
|
+
limit: number;
|
|
338
|
+
};
|
|
339
|
+
type Pagination = PaginationMeta;
|
|
306
340
|
type ConsentHistoryStatusSummary = {
|
|
307
341
|
total_purposes: number;
|
|
308
342
|
direct_purposes: number;
|
|
309
343
|
nominated_purposes: number;
|
|
310
|
-
nominee_purposes?: number;
|
|
311
344
|
active_purposes: number;
|
|
312
345
|
inactive_purposes: number;
|
|
313
346
|
};
|
|
314
|
-
type
|
|
347
|
+
type DisplayPurposeRow = PurposeItem & {
|
|
315
348
|
product_uuid: string;
|
|
316
349
|
product_name: string;
|
|
317
350
|
product_description: string | null;
|
|
318
|
-
|
|
319
|
-
total_purposes: number;
|
|
320
|
-
active_purposes: number;
|
|
351
|
+
nominator: NominatorInfo | null;
|
|
321
352
|
};
|
|
322
|
-
type
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
total_count: number;
|
|
328
|
-
offset: number;
|
|
329
|
-
limit: number;
|
|
353
|
+
type ConsentModalRecord = PurposeItem & {
|
|
354
|
+
product_uuid: string;
|
|
355
|
+
product_name: string;
|
|
356
|
+
product_description: string | null;
|
|
357
|
+
nominator: NominatorInfo | null;
|
|
330
358
|
};
|
|
331
359
|
type UserConsentDetail = {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
user_status
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
360
|
+
direct: ConsentGroup[];
|
|
361
|
+
direct_pagination: PaginationMeta;
|
|
362
|
+
nominated: ConsentGroup[];
|
|
363
|
+
nominated_pagination: PaginationMeta;
|
|
364
|
+
user_status: 'ACTIVE' | 'TRANSFERRED' | null;
|
|
365
|
+
nominators: NominatorInfo[];
|
|
366
|
+
status_summary: ConsentHistoryStatusSummary;
|
|
367
|
+
};
|
|
368
|
+
type GroupPurposesOut = {
|
|
369
|
+
purposes: PurposeItem[];
|
|
370
|
+
pagination: PaginationMeta;
|
|
340
371
|
};
|
|
341
372
|
type UserConsentResponse = {
|
|
342
373
|
code: number;
|
|
@@ -346,6 +377,7 @@ type UserConsentResponse = {
|
|
|
346
377
|
declare enum ConsentStatusEnum {
|
|
347
378
|
ACTIVE = "ACTIVE",
|
|
348
379
|
WITHDRAWN = "WITHDRAW",
|
|
380
|
+
REVOKED = "REVOKED",
|
|
349
381
|
EXPIRED = "EXPIRED",
|
|
350
382
|
DECLINED = "DECLINED"
|
|
351
383
|
}
|
|
@@ -535,22 +567,20 @@ declare const useInternalNavigation: () => NavigationContextType;
|
|
|
535
567
|
interface RedactoPrivacyCenterProps {
|
|
536
568
|
baseUrl: string;
|
|
537
569
|
slug: string;
|
|
538
|
-
theme?: 'light' | 'dark';
|
|
539
570
|
accessToken: string;
|
|
540
571
|
refreshToken: string;
|
|
541
572
|
onError: (error: Error) => boolean;
|
|
542
573
|
initialPage?: InternalPage;
|
|
543
574
|
onBack?: 'back' | 'signout';
|
|
544
575
|
}
|
|
545
|
-
declare function RedactoPrivacyCenter({ baseUrl, slug,
|
|
576
|
+
declare function RedactoPrivacyCenter({ baseUrl, slug, accessToken, refreshToken, onError, initialPage, onBack, }: RedactoPrivacyCenterProps): react_jsx_runtime.JSX.Element;
|
|
546
577
|
|
|
547
578
|
interface PrivacyCenterLayoutProps {
|
|
548
579
|
children: ReactNode;
|
|
549
|
-
defaultTheme?: 'light' | 'dark';
|
|
550
580
|
slug: string;
|
|
551
581
|
onBack?: 'back' | 'signout';
|
|
552
582
|
}
|
|
553
|
-
declare function PrivacyCenterLayout({ children,
|
|
583
|
+
declare function PrivacyCenterLayout({ children, slug, onBack }: PrivacyCenterLayoutProps): react_jsx_runtime.JSX.Element;
|
|
554
584
|
|
|
555
585
|
declare function PrivacyCenterHomePage(): react_jsx_runtime.JSX.Element;
|
|
556
586
|
|
|
@@ -688,7 +718,35 @@ declare const fetchProducts: (organizationId: string, workspaceId: string, skip?
|
|
|
688
718
|
name: string;
|
|
689
719
|
description?: string;
|
|
690
720
|
}> | null>;
|
|
691
|
-
|
|
721
|
+
type FetchUserConsentsParams = {
|
|
722
|
+
organizationId: string;
|
|
723
|
+
workspaceId: string;
|
|
724
|
+
offset?: number;
|
|
725
|
+
limit?: number;
|
|
726
|
+
nominatedOffset?: number;
|
|
727
|
+
nominatedLimit?: number;
|
|
728
|
+
search?: string;
|
|
729
|
+
status?: string;
|
|
730
|
+
product_uuid?: string;
|
|
731
|
+
language?: string;
|
|
732
|
+
authContext?: AuthContext;
|
|
733
|
+
consentClient?: BaseUrlContextValue['consentClient'];
|
|
734
|
+
};
|
|
735
|
+
declare const fetchUserConsents: (params: FetchUserConsentsParams) => Promise<UserConsentDetail | null>;
|
|
736
|
+
type FetchGroupPurposesParams = {
|
|
737
|
+
organizationId: string;
|
|
738
|
+
workspaceId: string;
|
|
739
|
+
productUuid: string;
|
|
740
|
+
offset?: number;
|
|
741
|
+
limit?: number;
|
|
742
|
+
status?: string;
|
|
743
|
+
search?: string;
|
|
744
|
+
language?: string;
|
|
745
|
+
nominatorUuid?: string;
|
|
746
|
+
authContext?: AuthContext;
|
|
747
|
+
consentClient?: BaseUrlContextValue['consentClient'];
|
|
748
|
+
};
|
|
749
|
+
declare const fetchGroupPurposes: (params: FetchGroupPurposesParams) => Promise<GroupPurposesOut | null>;
|
|
692
750
|
declare const manageConsent: ({ organizationId, workspaceId, purposeId, contact, action, authContext, consentClient, nominatorContact, dataElementUuids, }: {
|
|
693
751
|
organizationId: string;
|
|
694
752
|
workspaceId: string;
|
|
@@ -725,4 +783,4 @@ declare const useAuth: () => AuthContextValue;
|
|
|
725
783
|
*/
|
|
726
784
|
declare const injectPCStyles: () => void;
|
|
727
785
|
|
|
728
|
-
export { type Activity, type ActivityBadgeStatus$1 as ActivityBadgeStatus, type ActivityDetail, type ActivityResponse, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, type CaseHistoryDetail, type CaseHistoryResponse, type CaseRequest, type ConsentAction, type ConsentDataElement, type ConsentHistoryStatusSummary, ConsentStatusEnum, type CreateCaseResponse, type DataElement, type FetchOrgParams, type FormData, type FormDataResponse, type GrievanceOptions, type GrievanceTypeElement, GrievanceTypeEnum, type GrievanceValue, type InternalPage, type ManageConsentParams, type ManageConsentResponse, NavigationProvider, type
|
|
786
|
+
export { type Activity, type ActivityBadgeStatus$1 as ActivityBadgeStatus, type ActivityDetail, type ActivityResponse, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, type CaseHistoryDetail, type CaseHistoryResponse, type CaseRequest, type ConsentAction, type ConsentDataElement, type ConsentGroup, type ConsentHistoryStatusSummary, type ConsentModalRecord, ConsentStatusEnum, type CreateCaseResponse, type DataElement, type DisplayPurposeRow, type FetchOrgParams, type FormData, type FormDataResponse, type GrievanceOptions, type GrievanceTypeElement, GrievanceTypeEnum, type GrievanceValue, type GroupPurposesOut, type InternalPage, type ManageConsentParams, type ManageConsentResponse, NavigationProvider, type NominationData, type NominatorInfo, NotificationsPage, type OrganizationDetail, type OrganizationResponse, type OtpResponse, type OtpVerificationResponse, type Pagination, type PaginationMeta, PrivacyCenterActivityPage, PrivacyCenterCaseDetailsPage, PrivacyCenterConsentManagerPage, PrivacyCenterFormPage, PrivacyCenterHomePage, PrivacyCenterLayout, type Purpose, type PurposeItem, type RawPurposeWrapper, RedactoPrivacyCenter, RequestTypeEnum, type TokenExchangeResponse, type UpdateCorrectionDataItem, type UpdatePurpose, type UpdateRequestDetails, type UserConsentDetail, type UserConsentResponse, type UserDataRequest, type Workspace, checkAndRefreshAuth, compareEmails, createCaseRequest, createConsentClient, createOtpServer as createOtp, decodeJwtToken, ensureValidToken, exchangeTokenServer as exchangeToken, fetchActivities, fetchCaseHistory, fetchGroupPurposes, fetchProducts, fetchUserConsents, formatActivityType, getActivityTypeStatus, getCookieValue, getFormData, getInitialState, injectPCStyles, isJwtExpired, isUserAuthenticated, manageConsent, setRefreshTokenCookie, signOutPrivacyCenter, useAuth, useBaseUrl, useCaseHistory, useInternalNavigation, verifyOtpServer as verifyOtp };
|