@sparkvault/sdk-js 15.13.0 → 15.14.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/README.md CHANGED
@@ -317,7 +317,7 @@ conversion. A first subscription can return a `checkout_url` for hosted payment.
317
317
 
318
318
  ## Help Desk
319
319
 
320
- Create one KB-first support widget after the page body is ready:
320
+ Create one shared KB-first support journey after the page body is ready:
321
321
 
322
322
  ```typescript
323
323
  const support = sv.products.helpDesk.createSupport({
@@ -347,7 +347,36 @@ host navigation stays under the website's control.
347
347
  An explicit close can leave an inactive same-URL history entry. The SDK reuses
348
348
  it when possible and never calls browser Back to remove it or risk a host route.
349
349
 
350
- The widget searches the same published index as the desk's knowledge base,
350
+ The hosted help desk mounts this same controller, view and ticket form in a
351
+ page. To use that presentation yourself, set `target` and open the handle:
352
+
353
+ ```typescript
354
+ const support = sv.products.helpDesk.createSupport({
355
+ host: 'support.example.com',
356
+ target: '#support',
357
+ persist: true // Optional same-tab recovery; false by default.
358
+ });
359
+ void support.open();
360
+ ```
361
+
362
+ `target` changes layout only: the page has no floating overlay, widget close
363
+ controls or widget-owned phone history. Both presentations use
364
+ `/v1/hd/desks/{desk_id}/kb/widget/*`, then the same draft and ticket endpoints.
365
+ The hosted `/login` is for request history/company sign-in links, not a parallel
366
+ creation wizard. Existing customer/company sessions are honored; anonymous
367
+ contact uses the same native Identity verification in both layouts.
368
+ `onSession` observes a proved or cleared session so the enclosing page can
369
+ follow it.
370
+
371
+ With `persist: true`, recoverable issue text, anonymous subject/message edits
372
+ and verified requester drafts stay in this browser tab for 30 minutes. The
373
+ shared form reads existing portal drafts and preserves exact uncertain
374
+ submissions. No credentials or file bytes enter
375
+ storage, and nothing is transferred through URL parameters. Files outside an
376
+ uncertain submission must be selected again after reload. If storage is
377
+ unavailable, the live wizard continues in memory.
378
+
379
+ The wizard searches the same published index as the desk's knowledge base,
351
380
  locally; the visitor's question is not uploaded for search. Articles open inside
352
381
  the widget, with a link to the canonical page. Explicit helpful feedback or
353
382
  contact intent records content-free assistance analytics; closing records no
@@ -368,8 +397,9 @@ host's actual customer changes.
368
397
 
369
398
  Knowledge-base access and ticket-portal access remain independent. Passwords,
370
399
  approved networks and employee membership are enforced by the API, including
371
- when both are protected. KB/ticket access grants stay in memory. Register the
372
- exact embedding origin in the desk's website settings before installation;
400
+ when both are protected. KB/ticket access grants stay in memory; the shared
401
+ reader does not borrow a static help-center cookie. Register the exact embedding
402
+ origin in the desk's website settings before installation;
373
403
  never put signing keys, operator tokens or raw identity assertions in markup.
374
404
  For a site with CSP, allow the API in `connect-src` and `blob:` in `img-src`
375
405
  for authorized in-widget images, alongside the SDK's normal style policy.