@redacto.io/consent-sdk-react 10.2.2-beta.2 → 10.3.0-beta.4

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.
@@ -1,5 +1,6 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
+ import { P as PrivacyCenterTheme } from './types-Bwtzvz4W.mjs';
3
4
  import * as _tanstack_react_query from '@tanstack/react-query';
4
5
 
5
6
  /**
@@ -217,6 +218,20 @@ declare function createConsentClient(baseUrl: string, ledgerBaseUrl?: string): {
217
218
  acknowledgeNotification(baseRequest: BaseRequest, notificationUuid: string, authToken?: string): Promise<NotificationActionResponse>;
218
219
  };
219
220
 
221
+ type InternalPage = 'consent-manager' | 'form' | 'activity' | 'case-details' | 'notifications' | 'receipts';
222
+ interface NavigationContextType {
223
+ currentPage: InternalPage;
224
+ navigateTo: (page: InternalPage) => void;
225
+ selectedCase: CaseRequest | null;
226
+ setSelectedCase: (c: CaseRequest | null) => void;
227
+ pendingCaseUuid: string | null;
228
+ }
229
+ declare const NavigationProvider: ({ children, initialPage }: {
230
+ children: ReactNode;
231
+ initialPage?: InternalPage;
232
+ }) => React.JSX.Element;
233
+ declare const useInternalNavigation: () => NavigationContextType;
234
+
220
235
  type Workspace = {
221
236
  uuid: string;
222
237
  suid: string;
@@ -660,22 +675,16 @@ type SelectPrincipalResponse = Readonly<{
660
675
  refresh_token: string;
661
676
  expires_at?: string;
662
677
  }>;
663
-
664
- type InternalPage = 'consent-manager' | 'form' | 'activity' | 'case-details' | 'notifications' | 'receipts';
665
- interface NavigationContextType {
666
- currentPage: InternalPage;
667
- navigateTo: (page: InternalPage) => void;
668
- selectedCase: CaseRequest | null;
669
- setSelectedCase: (c: CaseRequest | null) => void;
670
- pendingCaseUuid: string | null;
671
- }
672
- declare const NavigationProvider: ({ children, initialPage }: {
673
- children: ReactNode;
674
- initialPage?: InternalPage;
675
- }) => react.JSX.Element;
676
- declare const useInternalNavigation: () => NavigationContextType;
677
-
678
- interface RedactoPrivacyCenterProps {
678
+ /** Presentation options for the Privacy Center, mirroring the notice's `settings`. */
679
+ type PrivacyCenterSettings = Readonly<{
680
+ /**
681
+ * Visual style. `"classic"` (the default) is the standard look; `"glass"` is
682
+ * a frosted, sheet-based style. Both take their colours from workspace
683
+ * branding. An unrecognised value falls back to classic.
684
+ */
685
+ theme?: PrivacyCenterTheme;
686
+ }>;
687
+ type RedactoPrivacyCenterProps = Readonly<{
679
688
  baseUrl: string;
680
689
  ledgerBaseUrl?: string;
681
690
  slug: string;
@@ -707,27 +716,35 @@ interface RedactoPrivacyCenterProps {
707
716
  onError: (error: Error) => boolean;
708
717
  initialPage?: InternalPage;
709
718
  onBack?: 'back' | 'signout';
710
- }
711
- declare function RedactoPrivacyCenter({ baseUrl, ledgerBaseUrl, slug, accessToken, refreshToken, token, email, mobile, ucic, organisationUuid, workspaceUuid, onError, initialPage, onBack, }: RedactoPrivacyCenterProps): react.JSX.Element;
712
-
713
- interface PrivacyCenterLayoutProps {
719
+ /** Presentation options; see `PrivacyCenterSettings`. */
720
+ settings?: PrivacyCenterSettings;
721
+ }>;
722
+ type PrivacyCenterLayoutProps = Readonly<{
714
723
  children: ReactNode;
715
724
  slug: string;
716
725
  onBack?: 'back' | 'signout';
717
- }
718
- declare function PrivacyCenterLayout({ children, slug, onBack }: PrivacyCenterLayoutProps): react.JSX.Element;
726
+ /**
727
+ * For custom compositions that render this layout directly. Omit it to
728
+ * inherit the theme from `RedactoPrivacyCenter`.
729
+ */
730
+ settings?: PrivacyCenterSettings;
731
+ }>;
732
+
733
+ declare function RedactoPrivacyCenter({ baseUrl, ledgerBaseUrl, slug, accessToken, refreshToken, token, email, mobile, ucic, organisationUuid, workspaceUuid, onError, initialPage, onBack, settings, }: RedactoPrivacyCenterProps): React.JSX.Element;
734
+
735
+ declare function PrivacyCenterLayout({ settings, ...props }: PrivacyCenterLayoutProps): React.JSX.Element;
719
736
 
720
- declare function PrivacyCenterHomePage(): react.JSX.Element;
737
+ declare function PrivacyCenterHomePage(): React.JSX.Element;
721
738
 
722
- declare function PrivacyCenterConsentManagerPage(): react.JSX.Element;
739
+ declare function PrivacyCenterConsentManagerPage(): React.JSX.Element;
723
740
 
724
- declare function PrivacyCenterFormPage(): react.JSX.Element;
741
+ declare function PrivacyCenterFormPage(): React.JSX.Element;
725
742
 
726
- declare function PrivacyCenterActivityPage(): react.JSX.Element;
743
+ declare function PrivacyCenterActivityPage(): React.JSX.Element;
727
744
 
728
- declare const PrivacyCenterCaseDetailsPage: () => react.JSX.Element | null;
745
+ declare const PrivacyCenterCaseDetailsPage: () => React.JSX.Element | null;
729
746
 
730
- declare const NotificationsPage: () => react.JSX.Element;
747
+ declare const NotificationsPage: () => React.JSX.Element;
731
748
 
732
749
  type AuthProviderProps = Readonly<{
733
750
  children: ReactNode;
@@ -771,7 +788,7 @@ declare const BaseUrlProvider: ({ children, baseUrl, ledgerBaseUrl, }: {
771
788
  children: ReactNode;
772
789
  baseUrl: string;
773
790
  ledgerBaseUrl?: string;
774
- }) => react.JSX.Element;
791
+ }) => React.JSX.Element;
775
792
  declare const useBaseUrl: () => Readonly<{
776
793
  baseUrl: string;
777
794
  ledgerBaseUrl?: string;
@@ -945,7 +962,7 @@ declare const fetchCaseHistory: (organizationId: string, workspaceId: string, co
945
962
 
946
963
  declare const useCaseHistory: (organizationId: string | undefined, workspaceId: string | undefined, contact: string | undefined, authContext?: AuthContext) => _tanstack_react_query.UseQueryResult<NoInfer<CaseRequest[]>, Error>;
947
964
 
948
- declare const AuthProvider: (props: AuthProviderProps) => react.JSX.Element;
965
+ declare const AuthProvider: (props: AuthProviderProps) => React.JSX.Element;
949
966
  declare const useAuth: () => AuthContextValue;
950
967
 
951
968
  /**
@@ -959,4 +976,4 @@ declare const useAuth: () => AuthContextValue;
959
976
  */
960
977
  declare const injectPCStyles: () => void;
961
978
 
962
- 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 };
979
+ 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 PrivacyCenterSettings, PrivacyCenterTheme, 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 };
@@ -1,5 +1,6 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
+ import { P as PrivacyCenterTheme } from './types-Bwtzvz4W.js';
3
4
  import * as _tanstack_react_query from '@tanstack/react-query';
4
5
 
5
6
  /**
@@ -217,6 +218,20 @@ declare function createConsentClient(baseUrl: string, ledgerBaseUrl?: string): {
217
218
  acknowledgeNotification(baseRequest: BaseRequest, notificationUuid: string, authToken?: string): Promise<NotificationActionResponse>;
218
219
  };
219
220
 
221
+ type InternalPage = 'consent-manager' | 'form' | 'activity' | 'case-details' | 'notifications' | 'receipts';
222
+ interface NavigationContextType {
223
+ currentPage: InternalPage;
224
+ navigateTo: (page: InternalPage) => void;
225
+ selectedCase: CaseRequest | null;
226
+ setSelectedCase: (c: CaseRequest | null) => void;
227
+ pendingCaseUuid: string | null;
228
+ }
229
+ declare const NavigationProvider: ({ children, initialPage }: {
230
+ children: ReactNode;
231
+ initialPage?: InternalPage;
232
+ }) => React.JSX.Element;
233
+ declare const useInternalNavigation: () => NavigationContextType;
234
+
220
235
  type Workspace = {
221
236
  uuid: string;
222
237
  suid: string;
@@ -660,22 +675,16 @@ type SelectPrincipalResponse = Readonly<{
660
675
  refresh_token: string;
661
676
  expires_at?: string;
662
677
  }>;
663
-
664
- type InternalPage = 'consent-manager' | 'form' | 'activity' | 'case-details' | 'notifications' | 'receipts';
665
- interface NavigationContextType {
666
- currentPage: InternalPage;
667
- navigateTo: (page: InternalPage) => void;
668
- selectedCase: CaseRequest | null;
669
- setSelectedCase: (c: CaseRequest | null) => void;
670
- pendingCaseUuid: string | null;
671
- }
672
- declare const NavigationProvider: ({ children, initialPage }: {
673
- children: ReactNode;
674
- initialPage?: InternalPage;
675
- }) => react.JSX.Element;
676
- declare const useInternalNavigation: () => NavigationContextType;
677
-
678
- interface RedactoPrivacyCenterProps {
678
+ /** Presentation options for the Privacy Center, mirroring the notice's `settings`. */
679
+ type PrivacyCenterSettings = Readonly<{
680
+ /**
681
+ * Visual style. `"classic"` (the default) is the standard look; `"glass"` is
682
+ * a frosted, sheet-based style. Both take their colours from workspace
683
+ * branding. An unrecognised value falls back to classic.
684
+ */
685
+ theme?: PrivacyCenterTheme;
686
+ }>;
687
+ type RedactoPrivacyCenterProps = Readonly<{
679
688
  baseUrl: string;
680
689
  ledgerBaseUrl?: string;
681
690
  slug: string;
@@ -707,27 +716,35 @@ interface RedactoPrivacyCenterProps {
707
716
  onError: (error: Error) => boolean;
708
717
  initialPage?: InternalPage;
709
718
  onBack?: 'back' | 'signout';
710
- }
711
- declare function RedactoPrivacyCenter({ baseUrl, ledgerBaseUrl, slug, accessToken, refreshToken, token, email, mobile, ucic, organisationUuid, workspaceUuid, onError, initialPage, onBack, }: RedactoPrivacyCenterProps): react.JSX.Element;
712
-
713
- interface PrivacyCenterLayoutProps {
719
+ /** Presentation options; see `PrivacyCenterSettings`. */
720
+ settings?: PrivacyCenterSettings;
721
+ }>;
722
+ type PrivacyCenterLayoutProps = Readonly<{
714
723
  children: ReactNode;
715
724
  slug: string;
716
725
  onBack?: 'back' | 'signout';
717
- }
718
- declare function PrivacyCenterLayout({ children, slug, onBack }: PrivacyCenterLayoutProps): react.JSX.Element;
726
+ /**
727
+ * For custom compositions that render this layout directly. Omit it to
728
+ * inherit the theme from `RedactoPrivacyCenter`.
729
+ */
730
+ settings?: PrivacyCenterSettings;
731
+ }>;
732
+
733
+ declare function RedactoPrivacyCenter({ baseUrl, ledgerBaseUrl, slug, accessToken, refreshToken, token, email, mobile, ucic, organisationUuid, workspaceUuid, onError, initialPage, onBack, settings, }: RedactoPrivacyCenterProps): React.JSX.Element;
734
+
735
+ declare function PrivacyCenterLayout({ settings, ...props }: PrivacyCenterLayoutProps): React.JSX.Element;
719
736
 
720
- declare function PrivacyCenterHomePage(): react.JSX.Element;
737
+ declare function PrivacyCenterHomePage(): React.JSX.Element;
721
738
 
722
- declare function PrivacyCenterConsentManagerPage(): react.JSX.Element;
739
+ declare function PrivacyCenterConsentManagerPage(): React.JSX.Element;
723
740
 
724
- declare function PrivacyCenterFormPage(): react.JSX.Element;
741
+ declare function PrivacyCenterFormPage(): React.JSX.Element;
725
742
 
726
- declare function PrivacyCenterActivityPage(): react.JSX.Element;
743
+ declare function PrivacyCenterActivityPage(): React.JSX.Element;
727
744
 
728
- declare const PrivacyCenterCaseDetailsPage: () => react.JSX.Element | null;
745
+ declare const PrivacyCenterCaseDetailsPage: () => React.JSX.Element | null;
729
746
 
730
- declare const NotificationsPage: () => react.JSX.Element;
747
+ declare const NotificationsPage: () => React.JSX.Element;
731
748
 
732
749
  type AuthProviderProps = Readonly<{
733
750
  children: ReactNode;
@@ -771,7 +788,7 @@ declare const BaseUrlProvider: ({ children, baseUrl, ledgerBaseUrl, }: {
771
788
  children: ReactNode;
772
789
  baseUrl: string;
773
790
  ledgerBaseUrl?: string;
774
- }) => react.JSX.Element;
791
+ }) => React.JSX.Element;
775
792
  declare const useBaseUrl: () => Readonly<{
776
793
  baseUrl: string;
777
794
  ledgerBaseUrl?: string;
@@ -945,7 +962,7 @@ declare const fetchCaseHistory: (organizationId: string, workspaceId: string, co
945
962
 
946
963
  declare const useCaseHistory: (organizationId: string | undefined, workspaceId: string | undefined, contact: string | undefined, authContext?: AuthContext) => _tanstack_react_query.UseQueryResult<NoInfer<CaseRequest[]>, Error>;
947
964
 
948
- declare const AuthProvider: (props: AuthProviderProps) => react.JSX.Element;
965
+ declare const AuthProvider: (props: AuthProviderProps) => React.JSX.Element;
949
966
  declare const useAuth: () => AuthContextValue;
950
967
 
951
968
  /**
@@ -959,4 +976,4 @@ declare const useAuth: () => AuthContextValue;
959
976
  */
960
977
  declare const injectPCStyles: () => void;
961
978
 
962
- 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 };
979
+ 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 PrivacyCenterSettings, PrivacyCenterTheme, 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 };