@ai4b-team/fsaos-gateway-sdk 3.19.0 → 3.20.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 +21 -0
- package/dist/iife/gateway.js +6 -4
- package/dist/iife/gateway.js.map +4 -4
- package/dist/iife/ui.js +1 -1
- package/dist/index.cjs +81 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -45
- package/dist/index.d.ts +63 -45
- package/dist/index.js +81 -50
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,6 +40,7 @@ Rule of thumb: if the answer should differ depending on *who is asking* or *whic
|
|
|
40
40
|
|
|
41
41
|
### Session Management
|
|
42
42
|
- `initSession()` — Initialize domain-scoped session via `GET /d/{hostname}/init`
|
|
43
|
+
- `initializeFsaos()` — Canonical one-call domain session + tracking bootstrap
|
|
43
44
|
- `clearSession()` — Clear cached session
|
|
44
45
|
- `getSessionEntry()` — Get current session entry (or null)
|
|
45
46
|
- `getAccessToken()` — Get current auth token (waits for first auth event)
|
|
@@ -200,6 +201,26 @@ src/
|
|
|
200
201
|
index.ts — Barrel export
|
|
201
202
|
```
|
|
202
203
|
|
|
204
|
+
## Application bootstrap
|
|
205
|
+
|
|
206
|
+
Set the registered application configuration before importing the SDK, then
|
|
207
|
+
initialize it once. Tracking starts by default; custom business events remain
|
|
208
|
+
explicit.
|
|
209
|
+
|
|
210
|
+
```ts
|
|
211
|
+
window.__FSAOS_CONFIG__ = {
|
|
212
|
+
hostname: 'app.example.com',
|
|
213
|
+
gatewayUrl: 'https://fsaos-mcp-gw-rust.fly.dev',
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
const { initializeFsaos } = await import('@ai4b-team/fsaos-gateway-sdk');
|
|
217
|
+
const fsaos = await initializeFsaos();
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Use `initializeFsaos({ tracking: false })` when consent or product policy
|
|
221
|
+
requires tracking to remain disabled. Published FSAOS IIFE pages call the same
|
|
222
|
+
bootstrap automatically.
|
|
223
|
+
|
|
203
224
|
## Build
|
|
204
225
|
|
|
205
226
|
```bash
|