@invonetwork/web-sdk 3.20.0 → 3.22.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 +63 -0
- package/README.md +289 -34
- package/dist/{chunk-6IY4473A.js → chunk-BOD4WOWO.js} +257 -7
- package/dist/index.cjs +347 -6
- package/dist/index.d.cts +58 -5
- package/dist/index.d.ts +58 -5
- package/dist/index.js +119 -4
- package/dist/server.cjs +598 -41
- package/dist/server.d.cts +233 -28
- package/dist/server.d.ts +233 -28
- package/dist/server.js +380 -27
- package/dist/{types-BwgkJoM6.d.cts → types-C7vpPqsF.d.cts} +425 -6
- package/dist/{types-BwgkJoM6.d.ts → types-C7vpPqsF.d.ts} +425 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.22.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e3895ab: 2026-10 pricing and new reads. Server: `getPlayerActivity({ playerEmail, limit?, cursor?, types? })`
|
|
8
|
+
(`GET /api/sdk/players/activity`), one merged, newest-first page of a player's currency purchases,
|
|
9
|
+
item purchases, Platform Commerce purchases, sends and transfers, and `iteratePlayerActivity`, which
|
|
10
|
+
follows `nextCursor`. `platformCommerce.getPurchaseHistory({ playerEmail, limit?, cursor? })`
|
|
11
|
+
(`GET /api/platform-commerce/purchase-history`, entries shaped like `getStatus`) and
|
|
12
|
+
`platformCommerce.iteratePurchaseHistory`. `getTransferStatus` / `getSendStatus` results carry
|
|
13
|
+
`expiryReason` once expired. Webhook types: `TransferEventData` gains `order_id`,
|
|
14
|
+
`net_transfer_amount`, `claim_code_expires_at`, `from_game_id`, `to_game_id`, `from_player_id`,
|
|
15
|
+
`expired_at`, `reason`, `expiry_reason` and `refunded_amount`; `payout.status_changed` is typed as
|
|
16
|
+
`PayoutStatusChangedData`, with the payout fee fields `offboarding_fee_pct`, `offboarding_fee_usd`,
|
|
17
|
+
`offboarding_fee_cap_usd` and `net_payout_usd`. New additive `err.publicCode`: the
|
|
18
|
+
provider-neutral twin of a code (INVO's `error_code_public` on errors from the API). The SDK's own
|
|
19
|
+
pre-network refusal of a Platform Commerce card total under $0.50 keeps `err.code` exactly as
|
|
20
|
+
before and now also carries `err.publicCode === "BELOW_CARD_MINIMUM"` and `err.minUsd === "0.50"`;
|
|
21
|
+
`err.isBelowCardMinimum` is true as before and accepts both spellings. Nothing removed or renamed. README: the
|
|
22
|
+
Open card fee is 3.5% + $0.30 (was 4.5%); the chargeback guarantee is a Merchant of Record term
|
|
23
|
+
(Open-tier card payments made before November 8, 2026 keep it); transfers are 10% (3.5% / 3.5% /
|
|
24
|
+
3%); payouts carry a 1% fee capped at $500 per payout; the hosted checkout reports a finished
|
|
25
|
+
purchase as status `"completed"`; on `phoneMismatch`, call `updatePlayerPhone`. Additive only.
|
|
26
|
+
- Player-confirmed phone change. Server: `requestPhoneChange({ playerEmail, newPhone })`
|
|
27
|
+
(`POST /api/sdk/players/phone/change-requests`, 202, never auto-retried) returns
|
|
28
|
+
`changeRequestId`, `status`, `expiresAt`, `delivery`, `confirmation` and `message`; INVO emails
|
|
29
|
+
the player, who confirms on INVO's page (plus their passkey or enrolled device when they have
|
|
30
|
+
one). `getPhoneChange(changeRequestId)` reads the request. Browser, with the player token, on
|
|
31
|
+
the player's enrolled device: `listPhoneChangeApprovals()` and
|
|
32
|
+
`approvePhoneChange(changeRequestId, { deviceFingerprint, decision?, sign | deviceSignal })`,
|
|
33
|
+
which sends a `device_signal` over `phone-change|<id>|<nonce>|<timestamp>` (or
|
|
34
|
+
`phone-change-deny|...`); new `phoneChangeSignalMessage()` builds that message. No method sends
|
|
35
|
+
a confirmation code: games never collect it. `err.changeRequestEndpoint` on
|
|
36
|
+
`PHONE_CHANGE_REQUIRES_VERIFICATION`; new error predicates `isConfirmOnInvoPage`,
|
|
37
|
+
`isChangeRequestNotFound`, `isChangeRequestNotReady`, `isChangeRequestNotPending` (with
|
|
38
|
+
`changeRequestStatus`), `isChangeRequestInProgress`, `isPhoneChangeLocked`,
|
|
39
|
+
`isTooManyChangeRequests`, `isPhoneChangeUnavailable`, `isDeviceSignalRejected`,
|
|
40
|
+
`isPhoneChangeRecoveryCooldown` (`PHONE_CHANGE_RECOVERY_COOLDOWN`, 409 on create and approve:
|
|
41
|
+
a recent sign-in recovery; retry later, declining still works) and
|
|
42
|
+
`isDeviceEnrolledAfterRequest` (`DEVICE_ENROLLED_AFTER_REQUEST`, 409 on approve). New
|
|
43
|
+
`isPendingTransfersToOldPhone` / `isPendingTransfersToNewPhone`, which `updatePlayerPhone`
|
|
44
|
+
now also answers (409, no counts) as well as the change request routes. Webhook
|
|
45
|
+
type: `player.phone_changed` as `PlayerPhoneChangedData` (`new_phone` only for the requesting
|
|
46
|
+
game). README section "Player-confirmed phone change": on `phoneMismatch` or
|
|
47
|
+
`player.phone_changed`, never push a stored number back; ask the player. Additive only.
|
|
48
|
+
|
|
49
|
+
## 3.21.0
|
|
50
|
+
|
|
51
|
+
### Minor Changes
|
|
52
|
+
|
|
53
|
+
- 0238b53: Player registration, phone changes and identity re-key. Server: `mintPlayerToken` takes optional
|
|
54
|
+
`playerPhone` and `playerName`; with a phone, a player new to your title is created, and the
|
|
55
|
+
result now carries `created` and `phoneMismatch` (previously dropped). New
|
|
56
|
+
`registerPlayer({ playerEmail, playerPhone, playerName? })` (`POST /api/sdk/players`) and
|
|
57
|
+
`updatePlayerPhone({ playerEmail, newPhone })` (`POST /api/sdk/players/phone`, never
|
|
58
|
+
auto-retried). `initiateSend` / `initiateTransfer` results expose `identityRekeyed`,
|
|
59
|
+
`playerToken`, `playerTokenExpiresAt`, `identityId` and `claimDeliveryPlanned`; approve results
|
|
60
|
+
expose `claimDelivery`. New error predicates `isPlayerTokenStale`,
|
|
61
|
+
`isPhoneChangeRequiresVerification`, `isPhoneMismatch`, `isPhoneShareRefused`;
|
|
62
|
+
`isPlayerNotFound` also recognises the codeless `player_not_found` 404. A 403
|
|
63
|
+
`PLAYER_TOKEN_STALE` on approve is surfaced, never auto-retried: re-mint and retry once.
|
|
64
|
+
Additive only. README section "Registering players and changing their phone".
|
|
65
|
+
|
|
3
66
|
## 3.20.0
|
|
4
67
|
|
|
5
68
|
### Minor Changes
|