@hachther/akilio-widget 1.0.0 → 1.1.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 +50 -0
- package/dist/akilio-widget.min.js +35 -34
- package/dist/components/Composer.d.ts +1 -0
- package/dist/components/Icons.d.ts +2 -0
- package/dist/components/IdentityVerification.d.ts +14 -0
- package/dist/components/MessageBubble.d.ts +1 -0
- package/dist/components/MessageList.d.ts +1 -1
- package/dist/components/ProductVariantSelector.d.ts +9 -0
- package/dist/components/VoiceRecorder.d.ts +11 -0
- package/dist/hooks/current-cart.d.ts +14 -0
- package/dist/index.min.js +6657 -5627
- package/dist/index.umd.min.cjs +28 -27
- package/dist/lib/cart-capabilities.d.ts +4 -0
- package/dist/lib/client.d.ts +14 -1
- package/dist/lib/storefront-cart.d.ts +5 -0
- package/dist/loader.js +4 -4
- package/dist/locales/en.d.ts +34 -0
- package/dist/locales/fr.d.ts +34 -0
- package/dist/releases/1.1.0/akilio-widget.min.js +46 -0
- package/dist/style.css +110 -5
- package/dist/types.d.ts +122 -6
- package/dist/widget-manifest.json +4 -4
- package/package.json +1 -1
- package/dist/releases/1.0.0/akilio-widget.min.js +0 -45
package/README.md
CHANGED
|
@@ -774,3 +774,53 @@ Use `data-starter-prompts='[]'` to hide prompts. Dedicated logo/name attributes
|
|
|
774
774
|
override corresponding values in `data-theme`. Malformed prompt JSON falls back
|
|
775
775
|
to configuration defaults. Custom React launchers and external HTML buttons using
|
|
776
776
|
`launcher: 'hidden'` with `open()`, `close()`, or `toggle()` remain supported.
|
|
777
|
+
### Direct product-card cart actions
|
|
778
|
+
|
|
779
|
+
Product cards and product details expose Add to cart automatically when backend
|
|
780
|
+
capability discovery includes executable `commerce.add_to_cart`. Available
|
|
781
|
+
variants receive direct actions independent of the LLM response. Clicking the
|
|
782
|
+
button supplies consent; backend capability confirmation is still executed.
|
|
783
|
+
Shopify products on their own storefront use the Shopify adapter. The selected variant is added through
|
|
784
|
+
the Shopify Ajax Cart API, sharing the website's browser cart, without a chat or
|
|
785
|
+
LLM round trip. Cards retain their variant selector, display update feedback,
|
|
786
|
+
and link to the storefront cart after success. Themes can listen for the
|
|
787
|
+
`akilio:cart-updated` window event to refresh their cart counter or drawer.
|
|
788
|
+
|
|
789
|
+
The backend product payload supplies `cart_provider: "shopify"` to select the
|
|
790
|
+
native adapter when applicable. Other products execute the advertised backend
|
|
791
|
+
cart capability. Actions are hidden for unavailable products and blocked
|
|
792
|
+
business-rule decisions. A backend-managed cart does not necessarily share the
|
|
793
|
+
website browser cart; direct website-cart adapters beyond Shopify are not implemented.
|
|
794
|
+
|
|
795
|
+
### Voice messages
|
|
796
|
+
|
|
797
|
+
The composer now supports recording, playback preview, send, and cancel on browsers
|
|
798
|
+
with MediaRecorder and microphone permission. HTTPS (or supported localhost access)
|
|
799
|
+
is required. Recording is capped at five minutes and 10 MiB. EN/FR copy can be
|
|
800
|
+
overridden through the existing translation/copy configuration.
|
|
801
|
+
|
|
802
|
+
Sending uploads to the authenticated public chat voice endpoint, polls private
|
|
803
|
+
transcription status, then submits the transcript through normal chat. The backend
|
|
804
|
+
must include the shared voice migrations and a transcription worker (or the existing
|
|
805
|
+
explicit development synchronous-processing mode). Voice input produces text replies;
|
|
806
|
+
this does not enable synthesized voice responses.
|
|
807
|
+
|
|
808
|
+
Voice uploads and polling use the existing widget bearer-token/origin mechanism.
|
|
809
|
+
Microphone capture stops when the panel closes or consent becomes unavailable.
|
|
810
|
+
Update your distributed bundle to make these controls available in deployed widgets.
|
|
811
|
+
|
|
812
|
+
### Email verification
|
|
813
|
+
|
|
814
|
+
Once a conversation exists, the widget offers **Verify your email** above the composer. The inline form requests an email code, displays the server's masked email, confirms the code, and restores the verified badge from the conversation's server session. It supports resend cooldowns, expiry, cancellation, retry limits, unavailable providers, and English/French copy overrides (`identity*` keys).
|
|
815
|
+
|
|
816
|
+
Verification uses the dedicated `/customer-identity/verifications/`, `/{id}/confirm/`, `/{id}/resend/`, and `/customer-identity/session/` routes under `apiBaseUrl`, with the existing widget authentication. Codes are submitted directly as strings and cleared from the input; they are never chat messages or widget analytics events. Challenge IDs and pending questions are held only in memory. The server determines verification and authorization.
|
|
817
|
+
|
|
818
|
+
A chat response (including a streaming final response) may include `identity_verification_required: { methods: ['email'], purpose: 'identity' }` (`step_up` is also supported). This opens the form. On successful confirmation and an authoritative session lookup, the widget submits the paused question once in the same conversation without duplicating the user's chat bubble. Cancel or a new question discards that continuation. This is a new optional response contract; the backend must emit it when protected actions require verification. It does not itself enforce access to protected actions.
|
|
819
|
+
|
|
820
|
+
The actual verification provider remains a backend integration. Until that provider is configured, delivery returns an unavailable message. No eSauti calls or credentials are implemented in the widget.
|
|
821
|
+
|
|
822
|
+
### Multiple widget installations
|
|
823
|
+
|
|
824
|
+
Create installations in Portal → Widget. Each has its own public key, assigned Agent, appearance and allowed domains. Use `widgetKey` with the React component or `data-widget-key` on the script tag. The existing `projectKey` / `data-project-key` spelling remains supported. Keys identify installations; the workspace remains the tenant boundary. New conversations use the assigned Agent, while existing conversations retain their original Agent.
|
|
825
|
+
|
|
826
|
+
Managed installations: omit host text/theme and presentation props to follow published Agent text and widget appearance. Public configuration supplies layout, launcher, tour, sound and contextual-prompt options; explicit host props still take precedence. Existing embeds with inline overrides must remove those overrides or replace their snippet once to follow portal publications.
|