@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 +34 -4
- package/dist/index.cjs +350 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +20 -2
- package/dist/index.mjs +350 -35
- package/dist/index.mjs.map +1 -1
- package/dist/products/help-desk/client.d.ts +4 -1
- package/dist/products/help-desk/form-draft.d.ts +27 -0
- package/dist/products/help-desk/form-types.d.ts +4 -0
- package/dist/products/help-desk/support-types.d.ts +13 -2
- package/dist/products/help-desk/support-view.d.ts +2 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
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
|
|
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
|
|
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
|
|
372
|
-
|
|
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.
|