@invonetwork/web-sdk 0.2.1 → 0.3.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/CHANGELOG.md +27 -0
- package/LICENSE +18 -17
- package/README.md +464 -393
- package/dist/chunk-DV3WZGMH.js +231 -0
- package/dist/index.cjs +121 -34
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -3
- package/dist/server.cjs +288 -44
- package/dist/server.d.cts +112 -7
- package/dist/server.d.ts +112 -7
- package/dist/server.js +173 -14
- package/dist/{errors-DV5QsftP.d.cts → types-CBkoUymV.d.cts} +121 -42
- package/dist/{errors-DV5QsftP.d.ts → types-CBkoUymV.d.ts} +121 -42
- package/package.json +2 -2
- package/dist/chunk-A44O4KC3.js +0 -147
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to `@invonetwork/web-sdk` are documented here. This project follows
|
|
4
4
|
[Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## [0.3.0] — 2026-06-30
|
|
7
|
+
|
|
8
|
+
Additive release — new server capabilities plus transport resilience/observability.
|
|
9
|
+
|
|
10
|
+
- **Webhook verification** (`/server`): `verifyWebhook(rawBody, signatureHeader, secret | secrets, opts?)`
|
|
11
|
+
— constant-time HMAC-SHA256 over `${t}.${rawBody}`, 5-minute replay window,
|
|
12
|
+
multi-secret rotation; returns a typed `InvoWebhookEvent` discriminated union
|
|
13
|
+
(`purchase.*`, `item.purchased`, `transfer.*`, `payout.status_changed`, `webhook.test`).
|
|
14
|
+
Throws `InvoError` (`WEBHOOK_SIGNATURE_INVALID` / `WEBHOOK_TIMESTAMP_EXPIRED` /
|
|
15
|
+
`WEBHOOK_MALFORMED` / `WEBHOOK_SECRET_MISSING`). Server-only; the browser bundle
|
|
16
|
+
stays crypto-free. Independently security-audited.
|
|
17
|
+
- **`getPlayerBalance({ playerEmail | playerId })`** (`/server`): typed `player` / `balances` / `summary`.
|
|
18
|
+
- **Automatic retries**: network errors/timeouts, `429` (honoring `retry_after`), and
|
|
19
|
+
`5xx` are retried with exponential backoff + jitter. New config `maxRetries`
|
|
20
|
+
(default 2, `0` disables) and `retryBaseDelayMs` (default 250).
|
|
21
|
+
- **Observability hooks**: optional `onRequest` / `onResponse` / `onError` on both
|
|
22
|
+
entries (best-effort/non-throwing); `InvoError.requestId` carries the backend
|
|
23
|
+
request id for support/tracing.
|
|
24
|
+
- **Typed reads**: `confirmPayment` → `ConfirmPaymentResult`; `getOrderDetails` /
|
|
25
|
+
`getItemOrderDetails` → `OrderDetailsResult`; `getItemPurchaseHistory` →
|
|
26
|
+
`ItemHistoryResult` (previously untyped `Record`). All keep `raw`.
|
|
27
|
+
- **Light validation**: `mintPlayerToken` and `createCheckout` require a non-blank
|
|
28
|
+
`playerEmail` (throws `INVALID_INPUT` before the network call).
|
|
29
|
+
- **License**: `package.json` `license` is now `SEE LICENSE IN LICENSE` (was
|
|
30
|
+
`UNLICENSED`); `LICENSE` rewritten as an explicit install-and-use grant for
|
|
31
|
+
building INVO integrations.
|
|
32
|
+
|
|
6
33
|
## [0.2.1] — 2026-06-30
|
|
7
34
|
|
|
8
35
|
Docs only — no code change (republished so the npm page README is current).
|
package/LICENSE
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
Copyright (c) 2026 Invo Tech Inc. All rights reserved.
|
|
2
|
-
|
|
3
|
-
This software and associated documentation files (the "Software") are the
|
|
4
|
-
proprietary
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
Copyright (c) 2026 Invo Tech Inc. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This software and associated documentation files (the "Software") are the
|
|
4
|
+
proprietary property of Invo Tech Inc. ("INVO"). The Software is licensed, not
|
|
5
|
+
sold.
|
|
6
|
+
|
|
7
|
+
GRANT. INVO grants you a non-exclusive, non-transferable, royalty-free license to
|
|
8
|
+
install and use the Software, in unmodified form, solely to build and operate
|
|
9
|
+
integrations with the INVO platform, subject to INVO's developer terms at
|
|
10
|
+
https://invo.network.
|
|
11
|
+
|
|
12
|
+
RESTRICTIONS. Except as expressly permitted above, you may not copy, modify,
|
|
13
|
+
distribute, sublicense, sell, or create derivative works of the Software, or
|
|
14
|
+
remove any proprietary notices, without INVO's prior written consent.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED. IN NO EVENT SHALL INVO BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
|
|
18
|
+
LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE.
|