@redacto.io/consent-sdk-js 1.0.0-beta.1 → 1.1.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/dist/redacto.d.mts +48 -3
- package/dist/redacto.d.ts +48 -3
- package/dist/redacto.global.js +2 -2
- package/dist/redacto.global.js.map +1 -1
- package/dist/redacto.js +541 -152
- package/dist/redacto.mjs +541 -152
- package/package.json +1 -1
package/dist/redacto.d.mts
CHANGED
|
@@ -1,9 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional sandbox options shared by the SDK's public option shapes and the
|
|
3
|
+
* internal API params. When `token` is set the call sends the single
|
|
4
|
+
* `X-Consent-Token` header instead of `Authorization: Bearer`, carries every
|
|
5
|
+
* supplied identifier in each request's own payload, and takes org/workspace
|
|
6
|
+
* from these fields instead of decoding the JWT.
|
|
7
|
+
*/
|
|
8
|
+
type SandboxOptions = {
|
|
9
|
+
token?: string;
|
|
10
|
+
/** UCIC — the client's own user id (`org_user_id`); takes precedence for the principal. */
|
|
11
|
+
sandboxUcic?: string;
|
|
12
|
+
/** Email — carried on every request like a live JWT's `user_data.primary_email`. */
|
|
13
|
+
sandboxEmail?: string;
|
|
14
|
+
/** Mobile — carried on every request like a live JWT's `user_data.primary_mobile`. */
|
|
15
|
+
sandboxMobile?: string;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use `sandboxEmail` / `sandboxMobile` (and/or `email` / `mobile`)
|
|
18
|
+
* instead. Still accepted for backward compatibility: a value containing "@"
|
|
19
|
+
* is treated as the email, otherwise the mobile.
|
|
20
|
+
*/
|
|
21
|
+
sandboxSubject?: string;
|
|
22
|
+
organisationUuid?: string;
|
|
23
|
+
workspaceUuid?: string;
|
|
24
|
+
};
|
|
1
25
|
type Settings = {
|
|
2
26
|
button: {
|
|
27
|
+
/** Styles the "accept selected" button. */
|
|
3
28
|
accept: {
|
|
4
29
|
backgroundColor: string;
|
|
5
30
|
textColor: string;
|
|
6
31
|
};
|
|
32
|
+
/** Optional: the accept-all shortcut falls back to `accept` when unset. */
|
|
33
|
+
acceptAll?: {
|
|
34
|
+
backgroundColor: string;
|
|
35
|
+
textColor: string;
|
|
36
|
+
};
|
|
7
37
|
decline: {
|
|
8
38
|
backgroundColor: string;
|
|
9
39
|
textColor: string;
|
|
@@ -24,10 +54,25 @@ type Settings = {
|
|
|
24
54
|
font?: string;
|
|
25
55
|
};
|
|
26
56
|
|
|
27
|
-
type ModalOptions = {
|
|
57
|
+
type ModalOptions = SandboxOptions & {
|
|
28
58
|
noticeId: string;
|
|
29
|
-
|
|
30
|
-
|
|
59
|
+
/** JWT access token. Optional so sandbox mode (see `token`) can omit it. */
|
|
60
|
+
accessToken?: string;
|
|
61
|
+
/** JWT refresh token. Optional; accepted for source-compat, currently unused. */
|
|
62
|
+
refreshToken?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Sandbox test subject email. The static `token` carries no identity, so the
|
|
65
|
+
* acting principal is read from `email` (or `mobile`) -- both optional, supply
|
|
66
|
+
* whichever you have. Mirrors the React SDK props.
|
|
67
|
+
*/
|
|
68
|
+
email?: string;
|
|
69
|
+
/** Sandbox test subject mobile (used when `email` is absent). */
|
|
70
|
+
mobile?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Sandbox UCIC: the client's own user id / org_user_id, e.g. a UUID or
|
|
73
|
+
* customer code; optional third identifier alongside email/mobile.
|
|
74
|
+
*/
|
|
75
|
+
ucic?: string;
|
|
31
76
|
baseUrl?: string;
|
|
32
77
|
/** Go ledger base URL — serves check-consent and the consent write; omit to use the legacy consent server. */
|
|
33
78
|
ledgerBaseUrl?: string;
|
package/dist/redacto.d.ts
CHANGED
|
@@ -1,9 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional sandbox options shared by the SDK's public option shapes and the
|
|
3
|
+
* internal API params. When `token` is set the call sends the single
|
|
4
|
+
* `X-Consent-Token` header instead of `Authorization: Bearer`, carries every
|
|
5
|
+
* supplied identifier in each request's own payload, and takes org/workspace
|
|
6
|
+
* from these fields instead of decoding the JWT.
|
|
7
|
+
*/
|
|
8
|
+
type SandboxOptions = {
|
|
9
|
+
token?: string;
|
|
10
|
+
/** UCIC — the client's own user id (`org_user_id`); takes precedence for the principal. */
|
|
11
|
+
sandboxUcic?: string;
|
|
12
|
+
/** Email — carried on every request like a live JWT's `user_data.primary_email`. */
|
|
13
|
+
sandboxEmail?: string;
|
|
14
|
+
/** Mobile — carried on every request like a live JWT's `user_data.primary_mobile`. */
|
|
15
|
+
sandboxMobile?: string;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use `sandboxEmail` / `sandboxMobile` (and/or `email` / `mobile`)
|
|
18
|
+
* instead. Still accepted for backward compatibility: a value containing "@"
|
|
19
|
+
* is treated as the email, otherwise the mobile.
|
|
20
|
+
*/
|
|
21
|
+
sandboxSubject?: string;
|
|
22
|
+
organisationUuid?: string;
|
|
23
|
+
workspaceUuid?: string;
|
|
24
|
+
};
|
|
1
25
|
type Settings = {
|
|
2
26
|
button: {
|
|
27
|
+
/** Styles the "accept selected" button. */
|
|
3
28
|
accept: {
|
|
4
29
|
backgroundColor: string;
|
|
5
30
|
textColor: string;
|
|
6
31
|
};
|
|
32
|
+
/** Optional: the accept-all shortcut falls back to `accept` when unset. */
|
|
33
|
+
acceptAll?: {
|
|
34
|
+
backgroundColor: string;
|
|
35
|
+
textColor: string;
|
|
36
|
+
};
|
|
7
37
|
decline: {
|
|
8
38
|
backgroundColor: string;
|
|
9
39
|
textColor: string;
|
|
@@ -24,10 +54,25 @@ type Settings = {
|
|
|
24
54
|
font?: string;
|
|
25
55
|
};
|
|
26
56
|
|
|
27
|
-
type ModalOptions = {
|
|
57
|
+
type ModalOptions = SandboxOptions & {
|
|
28
58
|
noticeId: string;
|
|
29
|
-
|
|
30
|
-
|
|
59
|
+
/** JWT access token. Optional so sandbox mode (see `token`) can omit it. */
|
|
60
|
+
accessToken?: string;
|
|
61
|
+
/** JWT refresh token. Optional; accepted for source-compat, currently unused. */
|
|
62
|
+
refreshToken?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Sandbox test subject email. The static `token` carries no identity, so the
|
|
65
|
+
* acting principal is read from `email` (or `mobile`) -- both optional, supply
|
|
66
|
+
* whichever you have. Mirrors the React SDK props.
|
|
67
|
+
*/
|
|
68
|
+
email?: string;
|
|
69
|
+
/** Sandbox test subject mobile (used when `email` is absent). */
|
|
70
|
+
mobile?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Sandbox UCIC: the client's own user id / org_user_id, e.g. a UUID or
|
|
73
|
+
* customer code; optional third identifier alongside email/mobile.
|
|
74
|
+
*/
|
|
75
|
+
ucic?: string;
|
|
31
76
|
baseUrl?: string;
|
|
32
77
|
/** Go ledger base URL — serves check-consent and the consent write; omit to use the legacy consent server. */
|
|
33
78
|
ledgerBaseUrl?: string;
|