@revturbine/sdk 0.2.24 → 0.2.27
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/headless.js +64 -64
- package/dist/headless.js.map +1 -1
- package/dist/index.js +64 -64
- package/dist/index.js.map +1 -1
- package/dist/types/server-node/local-server.d.ts +4 -2
- package/dist/types/server-node/local-server.d.ts.map +1 -1
- package/dist/types/web-sdk/adapters/api.d.ts +1 -1
- package/dist/types/web-sdk/analytics.d.ts +2 -2
- package/dist/types/web-sdk/analytics.d.ts.map +1 -1
- package/dist/types/web-sdk/branding.d.ts +84 -0
- package/dist/types/web-sdk/branding.d.ts.map +1 -0
- package/dist/types/web-sdk/browser-runtime.d.ts +6 -1
- package/dist/types/web-sdk/browser-runtime.d.ts.map +1 -1
- package/dist/types/web-sdk/config-artifact.d.ts +25 -0
- package/dist/types/web-sdk/config-artifact.d.ts.map +1 -0
- package/dist/types/web-sdk/customer-side.d.ts +84 -18
- package/dist/types/web-sdk/customer-side.d.ts.map +1 -1
- package/dist/types/web-sdk/generated.d.ts +1 -1
- package/dist/types/web-sdk/headless.d.ts +6 -2
- package/dist/types/web-sdk/headless.d.ts.map +1 -1
- package/dist/types/web-sdk/index.d.ts +11 -2
- package/dist/types/web-sdk/index.d.ts.map +1 -1
- package/dist/types/web-sdk/pii-redact.d.ts +36 -0
- package/dist/types/web-sdk/pii-redact.d.ts.map +1 -1
- package/dist/types/web-sdk/react/PlacementDecisionInspector.d.ts.map +1 -1
- package/package.json +13 -9
|
@@ -60,4 +60,40 @@ export declare function redactIdentityField(value: string): {
|
|
|
60
60
|
value: string;
|
|
61
61
|
redacted: boolean;
|
|
62
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* Redact a whole event envelope — the property bag, the identity traits, and
|
|
65
|
+
* the email-shaped `user_id` — returning a sanitized copy plus the redaction
|
|
66
|
+
* count.
|
|
67
|
+
*
|
|
68
|
+
* This exists so redaction can run **once, before fan-out**, rather than only
|
|
69
|
+
* on the `/api/track` path. Registered {@link RevTurbineEventConsumer} adapters
|
|
70
|
+
* (a PostHog mirror, a Segment bridge) receive the envelope too, so redacting
|
|
71
|
+
* only on the ingest path let raw values reach a third party that RevTurbine's
|
|
72
|
+
* own pipeline would never have stored.
|
|
73
|
+
*
|
|
74
|
+
* Envelope fields the SDK itself generates — `type`, `level`, `message`,
|
|
75
|
+
* `event_time`, `session_id`, `anonymous_id`, `tenant_id` — are not walked:
|
|
76
|
+
* they never carry customer-supplied values. `url`, `path`, and `page_title`
|
|
77
|
+
* are walked because a host app can put anything in a URL or document title.
|
|
78
|
+
*
|
|
79
|
+
* @param event - The event envelope to sanitize. Not mutated.
|
|
80
|
+
* @returns The sanitized copy plus a count of redacted values.
|
|
81
|
+
*/
|
|
82
|
+
export declare function redactEnvelope<T extends RedactableEnvelope>(event: T): RedactionResult<T>;
|
|
83
|
+
/**
|
|
84
|
+
* The envelope surface {@link redactEnvelope} touches. Structural rather than a
|
|
85
|
+
* concrete import so the redactor stays dependency-free and independently
|
|
86
|
+
* testable; `RevTurbineEventEnvelope` satisfies it.
|
|
87
|
+
*/
|
|
88
|
+
export interface RedactableEnvelope {
|
|
89
|
+
url?: string;
|
|
90
|
+
path?: string;
|
|
91
|
+
page_title?: string;
|
|
92
|
+
tags?: unknown;
|
|
93
|
+
user_id?: string | null;
|
|
94
|
+
identity?: {
|
|
95
|
+
traits?: unknown;
|
|
96
|
+
} & Record<string, unknown>;
|
|
97
|
+
properties?: unknown;
|
|
98
|
+
}
|
|
63
99
|
//# sourceMappingURL=pii-redact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pii-redact.d.ts","sourceRoot":"","sources":["../../../pii-redact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,QAAQ,eAAe,CAAC;AAkDrC,kCAAkC;AAClC,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,oEAAo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;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,kBAAkB,EAAE,KAAK,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CA4BzF;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1D,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlacementDecisionInspector.d.ts","sourceRoot":"","sources":["../../../../react/PlacementDecisionInspector.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EAEzB,oCAAoC,EACpC,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"PlacementDecisionInspector.d.ts","sourceRoot":"","sources":["../../../../react/PlacementDecisionInspector.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EAEzB,oCAAoC,EACpC,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAsB1B;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,SAAS,CAAC,EAAE,yBAAyB,CAAC;IACtC,sFAAsF;IACtF,WAAW,CAAC,EAAE,IAAI,CAAC,2BAA2B,EAAE,IAAI,GAAG,MAAM,GAAG,oBAAoB,CAAC,CAAC;IACtF,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,2DAA2D;IAC3D,SAAS,CAAC,EAAE,oCAAoC,CAAC;IACjD,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IACnD,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,iFAAiF;IACjF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,SAAS,EACT,WAAW,EACX,MAAM,EACN,WAAoB,EACpB,SAAS,EACT,MAAM,EACN,KAAK,EACL,QAAe,EACf,SAAS,EACT,KAAK,EACL,WAAmB,GACpB,EAAE,+BAA+B,qBAgbjC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revturbine/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.27",
|
|
4
4
|
"description": "RevTurbine customer-facing SDK — placement decisioning, entitlement checks, and usage tracking.",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"packageManager": "pnpm@11.12.0",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22.13"
|
|
9
|
+
},
|
|
6
10
|
"exports": {
|
|
7
11
|
".": {
|
|
8
12
|
"import": "./dist/index.js",
|
|
@@ -31,15 +35,15 @@
|
|
|
31
35
|
}
|
|
32
36
|
},
|
|
33
37
|
"devDependencies": {
|
|
34
|
-
"@revt-eng/core": "0.1.
|
|
35
|
-
"@revt-eng/schema": "0.1.
|
|
36
|
-
"@revt-eng/schema-external": "0.1.
|
|
37
|
-
"@types/react": "^19.
|
|
38
|
-
"@types/react-dom": "^19.
|
|
38
|
+
"@revt-eng/core": "0.1.131",
|
|
39
|
+
"@revt-eng/schema": "0.1.131",
|
|
40
|
+
"@revt-eng/schema-external": "0.1.131",
|
|
41
|
+
"@types/react": "^19.2.17",
|
|
42
|
+
"@types/react-dom": "^19.2.3",
|
|
39
43
|
"openapi-fetch": "^0.17.0",
|
|
40
|
-
"playwright": "^1.
|
|
41
|
-
"tsup": "^8.5.
|
|
42
|
-
"typescript": "^6.0.
|
|
44
|
+
"playwright": "^1.61.1",
|
|
45
|
+
"tsup": "^8.5.1",
|
|
46
|
+
"typescript": "^6.0.3"
|
|
43
47
|
},
|
|
44
48
|
"publishConfig": {
|
|
45
49
|
"registry": "https://registry.npmjs.org",
|