@redacto.io/consent-sdk-react 10.3.1 → 11.0.0-beta.2

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/dist/index.d.mts CHANGED
@@ -341,6 +341,11 @@ type ConsentFlowState = "age-check" | "guardian-details" | "digilocker-pending"
341
341
  */
342
342
  type DigiLockerCallbackProps = {
343
343
  accessToken: string;
344
+ /**
345
+ * API host, e.g. https://api.redacto.io (recommended). The consent server
346
+ * URL (…/consent) still works but is deprecated. Defaults to the URL the
347
+ * notice stored before redirecting.
348
+ */
344
349
  baseUrl?: string;
345
350
  onSuccess?: (verificationReference: string) => void;
346
351
  onError?: (error: Error, errorCode?: GuardianVerificationErrorCode) => void;
@@ -376,7 +381,17 @@ type Props$1 = Readonly<{
376
381
  organisationUuid?: string;
377
382
  /** Sandbox workspace UUID (replaces the JWT-decoded workspace in sandbox mode). */
378
383
  workspaceUuid?: string;
384
+ /**
385
+ * API host, e.g. https://api.redacto.io (recommended). The consent server
386
+ * URL (…/consent) still works but is deprecated.
387
+ * When omitted, the SDK's built-in production default is used.
388
+ */
379
389
  baseUrl?: string;
390
+ /**
391
+ * @deprecated Read only when `baseUrl` is the consent server URL
392
+ * (`…/consent`) or omitted, as in earlier releases. Ignored when `baseUrl`
393
+ * is the API host.
394
+ */
380
395
  ledgerBaseUrl?: string;
381
396
  /**
382
397
  * Optional code-side styling. The notice's look is set in the Redacto
@@ -452,7 +467,17 @@ type Props = Readonly<{
452
467
  notice_uuid: string;
453
468
  accessToken?: string;
454
469
  refreshToken?: string;
470
+ /**
471
+ * API host, e.g. https://api.redacto.io (recommended). The consent server
472
+ * URL (…/consent) still works but is deprecated.
473
+ * When omitted, the SDK's built-in production default is used.
474
+ */
455
475
  baseUrl?: string;
476
+ /**
477
+ * @deprecated Read only when `baseUrl` is the consent server URL
478
+ * (`…/consent`) or omitted, as in earlier releases. Ignored when `baseUrl`
479
+ * is the API host.
480
+ */
456
481
  ledgerBaseUrl?: string;
457
482
  /**
458
483
  * Optional code-side styling; overrides the appearance set in the Redacto
@@ -468,7 +493,7 @@ type Props = Readonly<{
468
493
  }>;
469
494
 
470
495
  declare const RedactoConsentInline: React.MemoExoticComponent<{
471
- ({ org_uuid, workspace_uuid, notice_uuid, accessToken, baseUrl, ledgerBaseUrl, language, onAccept, onError, onValidationChange, settings, applicationId, }: Props): React.JSX.Element | null;
496
+ ({ org_uuid, workspace_uuid, notice_uuid, accessToken, baseUrl: baseUrlProp, ledgerBaseUrl: ledgerBaseUrlProp, language, onAccept, onError, onValidationChange, settings, applicationId, }: Props): React.JSX.Element | null;
472
497
  displayName: string;
473
498
  }>;
474
499
 
@@ -484,9 +509,18 @@ type RedactoNoticeAssistedProps = {
484
509
  workspaceUuid: string;
485
510
  /** Notice UUID to fetch and render. */
486
511
  noticeUuid: string;
487
- /** API base URL (defaults to the production consent API). */
512
+ /**
513
+ * API host, e.g. https://api.redacto.io (recommended). The consent server
514
+ * URL (…/consent) still works but is deprecated.
515
+ * When omitted, the SDK's built-in production default is used.
516
+ */
488
517
  baseUrl?: string;
489
- /** Go ledger base URL — routes the consent write to the ledger; omit to use the legacy consent server. */
518
+ /**
519
+ * @deprecated Read only when `baseUrl` is the consent server URL
520
+ * (`…/consent`) or omitted, as in earlier releases. Ignored when `baseUrl`
521
+ * is the API host. With the consent server URL, it routes the consent write to
522
+ * the ledger; omit it there to use the legacy consent server.
523
+ */
490
524
  ledgerBaseUrl?: string;
491
525
  /** Called when the agent/customer declines (host should unmount the modal). */
492
526
  onDecline?: () => void;
@@ -514,7 +548,7 @@ type RedactoNoticeAssistedProps = {
514
548
  * submit, `onComplete` fires immediately with no confirmation screen (mirroring
515
549
  * RedactoNoticeConsent's `onAccept`). Steps: `notice` → `verify` (with `otpSent`).
516
550
  */
517
- declare const RedactoNoticeAssisted: ({ organisationUuid, workspaceUuid, noticeUuid, baseUrl, ledgerBaseUrl, onDecline, onComplete, settings, }: RedactoNoticeAssistedProps) => React.JSX.Element;
551
+ declare const RedactoNoticeAssisted: ({ organisationUuid, workspaceUuid, noticeUuid, baseUrl: baseUrlProp, ledgerBaseUrl: ledgerBaseUrlProp, onDecline, onComplete, settings, }: RedactoNoticeAssistedProps) => React.JSX.Element;
518
552
 
519
553
  /**
520
554
  * The notice exactly as the SDK draws it, from content the Redacto console
package/dist/index.d.ts CHANGED
@@ -341,6 +341,11 @@ type ConsentFlowState = "age-check" | "guardian-details" | "digilocker-pending"
341
341
  */
342
342
  type DigiLockerCallbackProps = {
343
343
  accessToken: string;
344
+ /**
345
+ * API host, e.g. https://api.redacto.io (recommended). The consent server
346
+ * URL (…/consent) still works but is deprecated. Defaults to the URL the
347
+ * notice stored before redirecting.
348
+ */
344
349
  baseUrl?: string;
345
350
  onSuccess?: (verificationReference: string) => void;
346
351
  onError?: (error: Error, errorCode?: GuardianVerificationErrorCode) => void;
@@ -376,7 +381,17 @@ type Props$1 = Readonly<{
376
381
  organisationUuid?: string;
377
382
  /** Sandbox workspace UUID (replaces the JWT-decoded workspace in sandbox mode). */
378
383
  workspaceUuid?: string;
384
+ /**
385
+ * API host, e.g. https://api.redacto.io (recommended). The consent server
386
+ * URL (…/consent) still works but is deprecated.
387
+ * When omitted, the SDK's built-in production default is used.
388
+ */
379
389
  baseUrl?: string;
390
+ /**
391
+ * @deprecated Read only when `baseUrl` is the consent server URL
392
+ * (`…/consent`) or omitted, as in earlier releases. Ignored when `baseUrl`
393
+ * is the API host.
394
+ */
380
395
  ledgerBaseUrl?: string;
381
396
  /**
382
397
  * Optional code-side styling. The notice's look is set in the Redacto
@@ -452,7 +467,17 @@ type Props = Readonly<{
452
467
  notice_uuid: string;
453
468
  accessToken?: string;
454
469
  refreshToken?: string;
470
+ /**
471
+ * API host, e.g. https://api.redacto.io (recommended). The consent server
472
+ * URL (…/consent) still works but is deprecated.
473
+ * When omitted, the SDK's built-in production default is used.
474
+ */
455
475
  baseUrl?: string;
476
+ /**
477
+ * @deprecated Read only when `baseUrl` is the consent server URL
478
+ * (`…/consent`) or omitted, as in earlier releases. Ignored when `baseUrl`
479
+ * is the API host.
480
+ */
456
481
  ledgerBaseUrl?: string;
457
482
  /**
458
483
  * Optional code-side styling; overrides the appearance set in the Redacto
@@ -468,7 +493,7 @@ type Props = Readonly<{
468
493
  }>;
469
494
 
470
495
  declare const RedactoConsentInline: React.MemoExoticComponent<{
471
- ({ org_uuid, workspace_uuid, notice_uuid, accessToken, baseUrl, ledgerBaseUrl, language, onAccept, onError, onValidationChange, settings, applicationId, }: Props): React.JSX.Element | null;
496
+ ({ org_uuid, workspace_uuid, notice_uuid, accessToken, baseUrl: baseUrlProp, ledgerBaseUrl: ledgerBaseUrlProp, language, onAccept, onError, onValidationChange, settings, applicationId, }: Props): React.JSX.Element | null;
472
497
  displayName: string;
473
498
  }>;
474
499
 
@@ -484,9 +509,18 @@ type RedactoNoticeAssistedProps = {
484
509
  workspaceUuid: string;
485
510
  /** Notice UUID to fetch and render. */
486
511
  noticeUuid: string;
487
- /** API base URL (defaults to the production consent API). */
512
+ /**
513
+ * API host, e.g. https://api.redacto.io (recommended). The consent server
514
+ * URL (…/consent) still works but is deprecated.
515
+ * When omitted, the SDK's built-in production default is used.
516
+ */
488
517
  baseUrl?: string;
489
- /** Go ledger base URL — routes the consent write to the ledger; omit to use the legacy consent server. */
518
+ /**
519
+ * @deprecated Read only when `baseUrl` is the consent server URL
520
+ * (`…/consent`) or omitted, as in earlier releases. Ignored when `baseUrl`
521
+ * is the API host. With the consent server URL, it routes the consent write to
522
+ * the ledger; omit it there to use the legacy consent server.
523
+ */
490
524
  ledgerBaseUrl?: string;
491
525
  /** Called when the agent/customer declines (host should unmount the modal). */
492
526
  onDecline?: () => void;
@@ -514,7 +548,7 @@ type RedactoNoticeAssistedProps = {
514
548
  * submit, `onComplete` fires immediately with no confirmation screen (mirroring
515
549
  * RedactoNoticeConsent's `onAccept`). Steps: `notice` → `verify` (with `otpSent`).
516
550
  */
517
- declare const RedactoNoticeAssisted: ({ organisationUuid, workspaceUuid, noticeUuid, baseUrl, ledgerBaseUrl, onDecline, onComplete, settings, }: RedactoNoticeAssistedProps) => React.JSX.Element;
551
+ declare const RedactoNoticeAssisted: ({ organisationUuid, workspaceUuid, noticeUuid, baseUrl: baseUrlProp, ledgerBaseUrl: ledgerBaseUrlProp, onDecline, onComplete, settings, }: RedactoNoticeAssistedProps) => React.JSX.Element;
518
552
 
519
553
  /**
520
554
  * The notice exactly as the SDK draws it, from content the Redacto console