@returningai/widget-sdk 1.4.3 → 1.5.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.
- package/CHANGELOG.md +36 -0
- package/README.md +476 -123
- package/dist/rai-widget.iife.js +1 -1
- package/dist/rai-widget.js +123 -6
- package/dist/types/BaseWidget.d.ts +9 -1
- package/dist/types/core/callback-registry.d.ts +15 -0
- package/dist/types/core/postmessage.d.ts +2 -2
- package/dist/types/index.d.ts +11 -7
- package/dist/types/jsx.d.ts +67 -0
- package/dist/types/types.d.ts +56 -0
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Type declarations for JSX custom elements no longer require React type
|
|
15
|
+
helpers, preventing `TS2694` errors in consumers that type-check
|
|
16
|
+
dependencies without `@types/react`.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## [1.5.0] — 2026-06-03
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Store and custom-store widgets can now register a host callback named
|
|
25
|
+
`callbackFieldOptions` to populate callback-backed purchase fields from the
|
|
26
|
+
customer's backend.
|
|
27
|
+
- Added per-widget callback registration APIs:
|
|
28
|
+
`widget.registerCallback(callbackName, callback)` and
|
|
29
|
+
`widget.lockCallbacks()`. Register callbacks on the specific widget element
|
|
30
|
+
so pages with multiple widgets can route each widget to its own handler.
|
|
31
|
+
- Added TypeScript exports for the store callback payload and result types,
|
|
32
|
+
including `StoreCallbackFieldOptionsPayload`,
|
|
33
|
+
`StoreCallbackFieldOptionsResult`, and
|
|
34
|
+
`ReturningAIStoreCallbackFieldOptionsCallback`.
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- Store callback examples now call the customer's backend from the browser
|
|
39
|
+
callback and expect the backend to return `{ fieldOptions, signature }`.
|
|
40
|
+
Keep SDK access credentials on the backend; do not call ReturningAI's
|
|
41
|
+
callback-signature endpoint from browser code.
|
|
42
|
+
- Callback registration now supports both iframe mode and bundle mode.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
10
46
|
## [Security Notice — 2026-05-11] Refresh-token TTL change for Access Key Embed
|
|
11
47
|
|
|
12
48
|
**This is a server-side change. No SDK code update is required. Customers do
|