@redacto.io/consent-sdk-js 1.0.0 → 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.
@@ -1,24 +1,39 @@
1
1
  /**
2
2
  * Optional sandbox options shared by the SDK's public option shapes and the
3
3
  * internal API params. When `token` is set the call sends the single
4
- * `X-Consent-Token` header instead of `Authorization: Bearer`, injects the
5
- * subject into each request's own payload, and takes org/workspace from these
6
- * fields instead of decoding the JWT.
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
7
  */
8
8
  type SandboxOptions = {
9
9
  token?: string;
10
- /** UCIC — the client's own user id (`org_user_id`); takes precedence over the subject. */
10
+ /** UCIC — the client's own user id (`org_user_id`); takes precedence for the principal. */
11
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
+ */
12
21
  sandboxSubject?: string;
13
22
  organisationUuid?: string;
14
23
  workspaceUuid?: string;
15
24
  };
16
25
  type Settings = {
17
26
  button: {
27
+ /** Styles the "accept selected" button. */
18
28
  accept: {
19
29
  backgroundColor: string;
20
30
  textColor: string;
21
31
  };
32
+ /** Optional: the accept-all shortcut falls back to `accept` when unset. */
33
+ acceptAll?: {
34
+ backgroundColor: string;
35
+ textColor: string;
36
+ };
22
37
  decline: {
23
38
  backgroundColor: string;
24
39
  textColor: string;
package/dist/redacto.d.ts CHANGED
@@ -1,24 +1,39 @@
1
1
  /**
2
2
  * Optional sandbox options shared by the SDK's public option shapes and the
3
3
  * internal API params. When `token` is set the call sends the single
4
- * `X-Consent-Token` header instead of `Authorization: Bearer`, injects the
5
- * subject into each request's own payload, and takes org/workspace from these
6
- * fields instead of decoding the JWT.
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
7
  */
8
8
  type SandboxOptions = {
9
9
  token?: string;
10
- /** UCIC — the client's own user id (`org_user_id`); takes precedence over the subject. */
10
+ /** UCIC — the client's own user id (`org_user_id`); takes precedence for the principal. */
11
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
+ */
12
21
  sandboxSubject?: string;
13
22
  organisationUuid?: string;
14
23
  workspaceUuid?: string;
15
24
  };
16
25
  type Settings = {
17
26
  button: {
27
+ /** Styles the "accept selected" button. */
18
28
  accept: {
19
29
  backgroundColor: string;
20
30
  textColor: string;
21
31
  };
32
+ /** Optional: the accept-all shortcut falls back to `accept` when unset. */
33
+ acceptAll?: {
34
+ backgroundColor: string;
35
+ textColor: string;
36
+ };
22
37
  decline: {
23
38
  backgroundColor: string;
24
39
  textColor: string;