@swirepay-developer/sparo-embed-sdk 1.0.4 → 1.0.7
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 +28 -1
- package/GATEWAY-REACT-GUIDE.md +443 -237
- package/README.md +29 -13
- package/SPARO-EMBEDDING.md +58 -29
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -0
- package/dist/sparo-embed-sdk.global.js +1 -1
- package/package.json +4 -182
- package/types/index.d.ts +16 -0
- package/dist/index.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.7
|
|
4
|
+
|
|
5
|
+
- `createGuestTokenFetcher` calls gateway Java API `GET /v1/sparo/guest-token` with `Authorization: Bearer <gateway-jwt>`.
|
|
6
|
+
- Supports wrapped responses `{ data: { token, expiresIn, account } }`.
|
|
7
|
+
- `getAuthorization` callback for dynamic Bearer token on each refresh.
|
|
8
|
+
- URLs are **host-configured** (staging vs prod) — not hardcoded in SDK.
|
|
9
|
+
|
|
10
|
+
## 1.0.6
|
|
11
|
+
|
|
12
|
+
- Add `createGuestTokenFetcher('/sparo/token')` helper for Java/gateway session cookie flow (Superset-style).
|
|
13
|
+
- Preserve `err.code` from BFF (`merchant_not_enabled`, `invalid_token`, etc.) in `onError`.
|
|
14
|
+
- Auto-refresh on iframe `expired_token` postMessage.
|
|
15
|
+
- `iframe_load_failed` on iframe element error.
|
|
16
|
+
- Example: `examples/embed-vanilla.html`.
|
|
17
|
+
|
|
18
|
+
## 1.0.5
|
|
19
|
+
|
|
20
|
+
- Fix DevOps publish: rename `eslint.config.js` → `eslint.config.mjs` and `vitest.config.js` → `vitest.config.mjs` (ESM configs without `"type": "module"` on package).
|
|
21
|
+
- Add `scripts/check-publish-manifest.mjs` and `scripts/ensure-dev-deps.mjs` (clear error if `npm ci` was skipped).
|
|
22
|
+
- Lint uses explicit `node_modules/eslint` path so publish fails with a clear message when devDeps are missing.
|
|
23
|
+
- `check-publish-manifest.mjs` blocks publish if `npm init` added bogus `dependencies` (restore with `git checkout -- package.json`).
|
|
24
|
+
- Added `scripts/devops-publish.sh` for one-command DevOps publish.
|
|
25
|
+
- `publishConfig.access` set to **`public`** (fixes npm `402 Payment Required` for private packages).
|
|
26
|
+
- Gateway should use `@swirepay-developer/sparo-embed-sdk@^1.0.5` after publish.
|
|
27
|
+
|
|
3
28
|
## 1.0.4
|
|
4
29
|
|
|
5
|
-
-
|
|
30
|
+
- Published on npm as **`@swirepay-developer/sparo-embed-sdk`** (org scope `swirepay-developer`).
|
|
31
|
+
- Gateway must import `@swirepay-developer/sparo-embed-sdk` — **not** `@swirepay/sparo-embed-sdk`.
|
|
32
|
+
- Target release for gateway npm install (`@swirepay-developer/sparo-embed-sdk@^1.0.4`).
|
|
6
33
|
- Includes publish pipeline fixes and correct `dist/index.js` / `dist/index.mjs` entry points.
|
|
7
34
|
|
|
8
35
|
## 1.0.1
|