@waniwani/sdk 0.17.0 → 0.17.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.
@@ -435,6 +435,21 @@ interface ScopedWaniWaniClient {
435
435
  * `sessionId` later). `undefined` when the host provided no session id.
436
436
  */
437
437
  readonly sessionId?: string;
438
+ /**
439
+ * The anonymous visitor id, resolved from the request meta. Present on the
440
+ * web chat surface (a persisted per-device id threaded through as
441
+ * `waniwani/visitorId`); `undefined` on hosts that do not supply one, such
442
+ * as Claude. Ingest accepts it as an identity in its own right, so use it
443
+ * to correlate events before a session or user id exists.
444
+ */
445
+ readonly visitorId?: string;
446
+ /**
447
+ * The external user id, resolved from the request meta (e.g. `openai/userId`
448
+ * for ChatGPT's anonymous users, or a host-provided `externalUserId`). Read
449
+ * it alongside `sessionId`/`visitorId` — whichever the current host provides.
450
+ * `undefined` when the host supplied no user id.
451
+ */
452
+ readonly externalUserId?: string;
438
453
  /**
439
454
  * Track an event — request meta is automatically merged. Also exposes the
440
455
  * revenue helpers flat (`track.priceShown()`, `track.converted()`, …), which