@getuserfeedback/protocol 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/README.md +48 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # `@getuserfeedback/protocol`
2
+
3
+ Public contract surface for host integrations that load and control the getuserfeedback widget.
4
+
5
+ ## Lifecycle contract
6
+
7
+ This package defines the public shapes for:
8
+
9
+ - init-time widget configuration
10
+ - post-load widget commands
11
+ - host SDK types and settlement helpers
12
+
13
+ ## What hosts can do after init
14
+
15
+ After the widget has been initialized, a public host integration may:
16
+
17
+ - identify the current user with `identify`
18
+ - update consent with `configure({ consent })`
19
+ - update theme with `configure({ colorScheme })`
20
+ - update auth with `configure({ auth })`
21
+ - open, prefetch, prerender, close, or reset flows
22
+
23
+ ## Identification
24
+
25
+ Public identification is already supported.
26
+
27
+ Use one of these public command shapes:
28
+
29
+ - `{ kind: "identify", userId, traits? }`
30
+ - `{ kind: "identify", traits }`
31
+
32
+ `identify` is a post-init lifecycle operation. The public root contract does not currently accept identity inside `init` or `configure`.
33
+
34
+ ## Navigation updates
35
+
36
+ Explicit public navigation update commands are not part of the current public contract.
37
+
38
+ There is no public `navigate`, `updatePage`, or `hostContextUpdated` command in `@getuserfeedback/protocol`. Hosts should not invent private navigation bridges on top of internal loader or core commands.
39
+
40
+ Loader-driven integrations may still observe browser URL changes internally for targeting and telemetry, but that behavior is internal runtime behavior, not a stable public contract yet.
41
+
42
+ ## GTM and other adapters
43
+
44
+ Adapters built on top of this package should only bridge capabilities that exist in this public contract.
45
+
46
+ - Use `identify` only because it is public and supported.
47
+ - Keep consent and theme updates mapped to `configure`.
48
+ - Do not expose custom navigation-update fields until this package defines a public navigation contract.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getuserfeedback/protocol",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "getuserfeedback widget protocol — host surface and (later) wire protocol",
5
5
  "keywords": [
6
6
  "getuserfeedback",