@invonetwork/web-sdk 3.30.4 → 3.31.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 +11 -0
- package/README.md +12 -7
- package/dist/{chunk-MTOYPY5P.js → chunk-5T75PCZN.js} +3 -3
- package/dist/chunk-CI7PHE6L.js +6 -0
- package/dist/{chunk-7AJJ2JVB.js → chunk-LMN2V4YT.js} +28 -7
- package/dist/{chunk-ULX3HXTO.js → chunk-UW66W2N6.js} +14 -5
- package/dist/game-server.cjs +37 -7
- package/dist/game-server.d.cts +4 -4
- package/dist/game-server.d.ts +4 -4
- package/dist/game-server.js +5 -5
- package/dist/game.cjs +27 -6
- package/dist/game.d.cts +3 -3
- package/dist/game.d.ts +3 -3
- package/dist/game.js +3 -3
- package/dist/{hosted-approval-DfVC4oDL.d.cts → hosted-approval-BBQHClAP.d.cts} +1 -1
- package/dist/{hosted-approval-Ca8vyGry.d.ts → hosted-approval-Dp-BigX9.d.ts} +1 -1
- package/dist/index.cjs +26 -5
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/{server-8WZat6Q5.d.ts → server-CaALJEML.d.ts} +13 -3
- package/dist/{server-GdJ1Jf05.d.cts → server-D9bKfiY6.d.cts} +13 -3
- package/dist/server.cjs +37 -7
- package/dist/server.d.cts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js +3 -3
- package/dist/{types-CVRok5ZV.d.cts → types-CBanzneD.d.cts} +31 -1
- package/dist/{types-CVRok5ZV.d.ts → types-CBanzneD.d.ts} +31 -1
- package/dist/{version-CCHWiwqw.d.cts → version-B4Eincjj.d.cts} +1 -1
- package/dist/{version-CCHWiwqw.d.ts → version-B4Eincjj.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-MKFXIYMC.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.31.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Types the backend fields that shipped 2026-10-20. All additive; nothing renamed or removed.
|
|
8
|
+
|
|
9
|
+
- `platformCommerce.getStatus()` and every `getPurchaseHistory()` entry: `invoFeeUsd` (everything INVO kept on the sale) and `partnerShareUsd` (what you earned), USD decimal strings. `null` until the sale settles or when the split cannot be read; absent from an INVO release that does not send them. A later refund or lost dispute does not change them.
|
|
10
|
+
- `purchase.disputed` (coin purchase, on close): `spent_coins_charged_usd`. On a lost dispute INVO takes back the coins the player still holds and charges you for coins already spent, at the price paid per coin before tax; `"0.00"` when nothing was charged.
|
|
11
|
+
- Errors: `err.isRateLimited` (true on any 429; every rate-limit refusal now carries `error_code` `RATE_LIMITED`, `retry_after` and a `Retry-After` header). `err.retryAfter` falls back to the `Retry-After` header when the body has no `retry_after`; the raw header is on `err.retryAfterHeader`. `errorFromResponse` takes an optional fourth argument for it.
|
|
12
|
+
- README: dispute holds on both tiers (the disputed amount is held from your earnings while a dispute you are responsible for is open), the spent-coin charge on a lost coin purchase dispute, and the payout minimum is now $10 (scheduled and on demand; it was $100).
|
|
13
|
+
|
|
3
14
|
## 3.30.4
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
First-party TypeScript SDK for integrating **INVO** into partner **web** platforms (storefronts, web games, dashboards). It wraps INVO's web money flows behind a typed, versioned API — the web analog of the Unity/Unreal plugins.
|
|
4
4
|
|
|
5
|
-
> **Status:** `v3.
|
|
5
|
+
> **Status:** `v3.31.0`, stable, published on npm. The backend it wraps is **live** on sandbox + production. The API is covered by a [stability commitment](#stability): no breaking changes without a major bump. Recent highlights: **3.31.0** adds `invoFeeUsd` / `partnerShareUsd` on `platformCommerce.getStatus()` and `getPurchaseHistory()`, `spent_coins_charged_usd` on the coin `purchase.disputed` close (coins already spent are charged to you on a lost dispute), `err.isRateLimited` (every rate-limit 429 now carries `RATE_LIMITED`) and a `Retry-After` header fallback for `err.retryAfter`, and documents dispute holds on both tiers and the $10 payout minimum; **3.23.0** types two optional fields on the `purchase.disputed` close: `dispute_fee_usd` and `dispute_fee_charged_to_partner` (from November 8, 2026 the card dispute fee on Open-tier card sales is passed through to you at cost); **3.22.0** follows INVO's 2026-10 pricing: the Open card fee is **3.5% + $0.30** (was 4.5%), Merchant of Record stays **5.5% + $0.50**; the **chargeback guarantee** is a Merchant of Record term (Open-tier card payments made before November 8, 2026 keep it); payouts to your bank carry a **1% fee, capped at $500 per payout**. New reads: `getPlayerActivity()` / `iteratePlayerActivity()` (one merged list of a player's purchases, sends and transfers) and `platformCommerce.getPurchaseHistory()` / `iteratePurchaseHistory()`; `expiryReason` on `getTransferStatus()` / `getSendStatus()`; typed `transfer.*` and `payout.status_changed` webhook fields; new additive `err.publicCode` (the neutral twin of a code), set to `"BELOW_CARD_MINIMUM"` on the local card-floor refusal, whose `err.code` is unchanged (see [Tiers](#tiers) for the pricing); and the **[player-confirmed phone change](#player-confirmed-phone-change)**: `requestPhoneChange()` / `getPhoneChange()` on the server, `listPhoneChangeApprovals()` / `approvePhoneChange()` on the player's enrolled device, the typed `player.phone_changed` webhook, `err.changeRequestEndpoint` and new phone change error helpers; **3.18.0** follows INVO's 2026-09 card pricing: on card purchases **you pay INVO's card fee** (**4.5% + $0.30** on Open, **5.5% + $0.50** on Merchant of Record, plus **1.5%** on a card issued outside the US) and the player pays the listed price and gets the listed coins; fraud screening and a **chargeback guarantee** are included; minimum card purchase **$2.99** from 2026-10-27. New `partnerFeeUsd`, `internationalCardFeeUsd`, `minPurchaseWarning`, `feeTakenFrom: "partner"`, `err.minUsd` / `err.enforcedFrom` on `err.isBelowCardMinimum`, `minPurchaseWarning` on `createCheckout()`, `country` / `subdivision` on `purchaseCurrency()` with `err.isTaxPlaceUnavailable`, `cardFeeChargedToPartnerUsd` / `partnerDebitedUsd` on Platform Commerce card refunds, and the `partner_fee_usd` / `international_card_fee_usd` / `guarantee_covered` / `card_fee_charged_to_partner_usd` / `partner_debited_usd` webhook fields, all additive; an unacknowledged $10.00 coin purchase now credits 100.00 coins, not 93.70 (see **[Tiers](#tiers)**); **3.17.0** types the Steam fields on `purchase.refunded` / `purchase.disputed` (`rail`, `steam_transid`, nullable card-only ids): Steam chargebacks now arrive as `purchase.disputed`; **3.16.0** adds `warnings` on `createCheckout()` (item metadata on a coin session), `err.isDuplicateClientRequestId`, `err.isTrialAmountBelowFeeFloor` and `err.isIdentityCheckUnavailable`; **3.14.0** adds `credited` / `reasonCode` on `confirmPayment()` and `steamFinalizePurchase()`, Merchant of Record receipt fields, Platform Commerce card refunds in parts, and updates the **[tiers](#tiers)**: subscription card rates and chargeback handling by tier (the rates are superseded by 3.18.0), and Merchant of Record is applied for from the console; **3.13.0** documents the two **[tiers](#tiers)** (Open by default, Merchant of Record by application), adds **[INVO's card fee on coin purchases](#invos-card-fee-quote-show-acknowledge)** (rates superseded by 3.18.0): `quoteCurrencyPurchase()`, `acknowledgedTotalUsd` on `purchaseCurrency()`, the new `processingFeeUsd` / `feeTakenFrom` / `coinsCredited` / `chargeTotalUsd` fields and `err.isAmountBelowFee` / `err.isQuoteStale`, states the coin refund rule (only unspent coins), and adds **[paid trials](#paid-trials)** on card subscriptions (`trialAmountUsd`, the disclosed trial consent fields, `is_trial` / `expire_cause` on the events, `err.isPaymentMethodRequired` and the `isTrialAmount*` helpers); **3.12.0** removes the SDK's own card maximum (INVO's is a runtime setting, $100,000.00 by default); **3.11.0** adds the **[purchase status read](#did-the-purchase-go-through-the-status-read)**, where `invo.checkout.getPurchaseStatus()` / `waitForPurchase()` (and the standalone `CheckoutClient`) answer what happened to a hosted-checkout purchase in six words, four of them terminal, so a buyer is never shown a page that closes on nothing; stopping is decided by INVO's `terminal` and never re-derived from `status`, `nothingWasCharged()` says when a **Try again** is safe, `createCheckout()` now also returns `sessionToken`, and the subscription fee is corrected (it is its own rate; item purchases stay at 10/90; see [Tiers](#tiers) for the current rate); **3.10.0** documents **card-only subscriptions** (the card pays the full price every period, the coin wallet never pays; `walletOnly` deprecated; new `failure_code` `wallet_negative`; a renewal's `purchase.completed` is not a purchase) and the **[subscription refund limits](#refunds)**: `subscriptions.refund` can now return a 202 `pending_approval` refund request (`isRefundPendingApproval`), with `warnings`, the processor fee you bear, `subscriptionCanceled` (a full refund cancels), new classifiers (`isRefundsNotEnabled`, `isRefundWindowClosed`, `isRefundRequestPending`, `isRefundRequestRejected`, `isConcurrentRequest`, `isRefundMismatch`) and typed `subscription.refund_requested` / `refund_approved` / `refund_rejected` events, all additive; **3.9.0** adds the **[INVO-hosted card page for subscriptions](#cards-for-subscriptions)**, `invo.cards.createSetupSession`: mint a 10-minute link server-side, send the member to it, read the card back from `cards.list`, with no browser code and no card processor named anywhere (`beginSetup`/`confirmSetup` remain as the processor-bound alternative), plus the `isPlayerNotFound`, `isInvalidPlayerEmail` and `isInvalidInput` classifiers and a fix that makes `includePlayer` reads actually surface `playerEmail`/`playerName`; **3.8.0** adds **[Subscriptions](#subscriptions-recurring-billing)** as a first-class server surface on both rails: `invo.subscriptions.create/get/listForPlayer/cancel/changeAmount/setPaymentMethod/refund/steamInit/steamFinalize`, the off-session card capture (`invo.cards.beginSetup/confirmSetup/list`), the sandbox clock tools (`invo.sandbox.subscriptions.*`, which post to `/subscriptions/<id>/...` **relative to the sandbox base, not under `/api`**, with the new `sandboxClockKey`), typed `data` for all seven `subscription.*` webhook events, and eleven new error classifiers; **3.7.0** makes the **device approval grant a first-class SDK surface**: `beginDeviceApproval`, `pollDeviceApproval`, `confirmDeviceEnrollment` and, the step that actually moves the money, **`approveWithDeviceCode`** (plus the optional `completeDeviceApproval` loop); a grant that is polled to `approved` and left there settles **nothing**, which is the failure this release exists to make impossible, and `TRANSACTION_NOT_PENDING` now comes back as a typed `status: "not_pending"` result with `alreadySettled` rather than a thrown error you would have to string-match; **3.4.0** documents that a Steam title now bills through **its own Steam application**: the studio registers their appid + publisher Web API key and keeps a payment method on file, because Valve pays the studio and INVO settles afterwards (new `isSteamNotConfigured`, `isPartnerBillingNotSetUp`, `isPartnerSettlementUnavailable`, `isSteamAppChanged` error helpers); **3.2.3** corrects the base path and auth header in the Steam snippets (`/api/currency-purchases`, `X-Game-Secret-Key`); 3.2.2 published both wrong, and copying them returned a 404; **3.2.x** documents **Steam currency purchases on a pack model**: INVO owns the catalogue, you pass a `pack_id` and never a price, and the currency inside a pack varies by country because Steam prices are VAT-inclusive; **3.1.0** makes the authentication guidance explicit: **[passkeys are the gold standard](#passkeys-are-the-gold-standard-dont-build-on-sms)** and the SMS-PIN completion (`verifySmsTransfer`/`verifySmsSend`) is **deprecated and being phased out** (documentation only: no behavior change, no runtime warnings); **3.0.0** moves the Platform Commerce card leg to **INVO's hosted checkout**: the server `purchase()` now returns a `checkoutUrl` and the browser just sends the buyer there (redirect or `mountCheckout` iframe); the 2.5.x card-element surface (`confirmCardPayment`/`mountCardPayment`, `billingAddress`, `commercePublishableKey`) is **removed**; see the [CHANGELOG](CHANGELOG.md) migration note; **2.5.0** added **Platform Commerce** (ecommerce): a platform tenant selling items funded by balance **or** card, with `invo.platformCommerce.purchase/getStatus/refund` (server) and the `platform_commerce.*` webhooks; **2.4.0** adds Steam transfer-policy handling (`isSteamValueNonTransferable`/`isNonSteamValueIntoSteamBlocked` + `DestinationGame.acceptsSteamOriginValue`); **2.3.0** surfaces the claim-time phone-share `409` on `confirmReceipt*`/`claim*` (+ `err.phoneShareLast4`). Full history in the [CHANGELOG](CHANGELOG.md).
|
|
6
6
|
> Canonical partner reference: **https://docs.invo.network/docs/currency-purchase** and **https://docs.invo.network/docs/game-developer-integration**.
|
|
7
7
|
|
|
8
8
|
## What it does
|
|
@@ -494,15 +494,17 @@ Every INVO developer account is on one of two tiers. The SDK calls are the same
|
|
|
494
494
|
| Item purchases (coins spent on an item) | 5% (you keep 95%) | 5% (you keep 95%) |
|
|
495
495
|
| Platform Commerce balance purchases | 3.5% | 3.5% |
|
|
496
496
|
| Sends and transfers between players | 10% of the amount: 3.5% to the sending title, 3.5% to the receiving title, 3% to INVO | same |
|
|
497
|
-
| Payouts to your bank | scheduled payouts (the 1st and 16th of each month, UTC, $
|
|
497
|
+
| Payouts to your bank | scheduled payouts (the 1st and 16th of each month, UTC, $10 minimum) are free; on demand, 1% per payout, capped at $500, $10 minimum | same |
|
|
498
498
|
|
|
499
499
|
The card terms above (card fee, international fee, minimum and chargeback guarantee) apply to card purchases only; purchases through a third-party storefront or payment rail are unaffected and keep their current terms. On both tiers every card charge runs on INVO's card rail and INVO pays you out, as today. The card fee is charged to you, never to the buyer: the buyer pays the listed price (plus tax on Merchant of Record) and receives the listed coins or item. It nets against your earnings at purchase time and is not returned on a refund. The 1.5% on a card issued outside the United States applies on both tiers to every card charge and is reported as `international_card_fee_usd` (on a Platform Commerce sale it is already included in `fee_breakdown.platform_fee`); it replaces the earlier pass-through of international and currency conversion costs on subscriptions. Worked example, a $100.00 card sale: the buyer pays $100.00 (plus tax on Merchant of Record) and your fee is $3.65 on Open or $5.15 on Merchant of Record; on a card issued outside the US, $5.15 or $6.65. On a $10.00 sale: $0.50 or $0.65. The Open card fee was 4.5% + $0.30 until 2026-10-09 and 3.5% + $0.30 until 2026-10-15; Merchant of Record was 5.5% + $0.50 until 2026-10-15. On Merchant of Record, if your chargeback rate for the previous calendar month (disputes opened, excluding inquiries, divided by card charges completed, in UTC months) was above 0.75%, the dispute fee on subscription charges disputed this month for a reason the chargeback guarantee does not cover is charged to you as on Open, and INVO reviews your approval. Merchant of Record is applied for per developer account, not per game, from the Selling & Tax page in your INVO console, and INVO reviews each application. Full details: https://docs.invo.network/docs/tiers/
|
|
500
500
|
|
|
501
501
|
**Chargeback guarantee by tier.** The guarantee (INVO absorbs a lost fraud chargeback on a card sale) is a Merchant of Record term. On Open, card payments made before November 8, 2026 keep it; for card payments from that date, a lost fraud chargeback is your responsibility and is passed through at cost, like any other lost chargeback. Fraud screening stays included on every card payment on both tiers. On a lost dispute, `guarantee_covered` on `purchase.disputed` says which case applies. When a card dispute closes, `purchase.disputed` also carries `dispute_fee_usd` (the dispute fee charged to you for that dispute, `"0.00"` when INVO bears it) and `dispute_fee_charged_to_partner`. A lost dispute is `purchase.disputed` with `dispute_status: "lost"`; there is no separate lost-dispute event.
|
|
502
502
|
|
|
503
|
+
**Held while a dispute is open, both tiers (since 2026-10-20).** While a dispute you are responsible for is open, the disputed amount is held from your earnings so it cannot be paid out: your share of a Platform Commerce card sale or subscription charge, or on a coin purchase the price paid before tax, less anything already refunded and never more than the disputed amount. Your withdrawable balance already excludes it (`dispute_holds_usd` and `disputes_on_hold` on `GET /api/withdrawals/available-balance`, outside this SDK). A won dispute releases the hold; a lost one is booked once. **On a lost coin purchase dispute**, INVO takes back the coins the player still holds (never below zero) and charges you for coins the player had already spent, at the price paid per coin before tax: `spent_coins_charged_usd` on the closing `purchase.disputed` (`"0.00"` when nothing was charged). Nothing is charged when the chargeback guarantee covers the dispute.
|
|
504
|
+
|
|
503
505
|
**Sends and transfers.** The fee is 10% of the amount moved, a network standard that is the same for every title: 3.5% to the sending title, 3.5% to the receiving title and 3% to INVO. Moving 100.00: the fee is 10.00 (3.50 to the sending title, 3.50 to the receiving title, 3.00 to INVO) and the recipient gets 90.00. A move inside one title earns that title both shares, 7.00, and INVO 3.00. Reconcile from the webhook figures rather than recomputing.
|
|
504
506
|
|
|
505
|
-
**Payouts.** INVO pays you, the partner, and you pay your own players from your own funds; INVO does not pay players. Payouts INVO makes on its schedule (the 1st and 16th of each month, UTC, $
|
|
507
|
+
**Payouts.** INVO pays you, the partner, and you pay your own players from your own funds; INVO does not pay players. Payouts INVO makes on its schedule (the 1st and 16th of each month, UTC, $10 minimum) are free. A payout of your balance to your bank that you request on demand (developer withdrawals and partner payouts) carries a payout fee of 1% of the amount, capped at $500 per payout, with a $10 minimum (the minimum was $100 until 2026-10-20); negotiated rates may apply. Creator payouts keep the payout fee. The fee is deducted from the payout: `payout.status_changed` carries `offboarding_fee_pct`, `offboarding_fee_usd`, `offboarding_fee_cap_usd` and `net_payout_usd` (what reaches your bank). Negotiated or custom rates for any fee here are available on request.
|
|
506
508
|
|
|
507
509
|
**What the tier changes in what the SDK returns** (all additive):
|
|
508
510
|
|
|
@@ -989,6 +991,8 @@ const handle = invo.platformCommerce.mountCheckout("#checkout", checkoutUrl, {
|
|
|
989
991
|
```ts
|
|
990
992
|
const s = await server.platformCommerce.getStatus(r.orderId);
|
|
991
993
|
// s.status: "completed" (balance immediately; card after the webhook) | "pending_payment" | "refunded"
|
|
994
|
+
// Once settled: s.invoFeeUsd (everything INVO kept on the sale) and s.partnerShareUsd (what you
|
|
995
|
+
// earned), USD strings; null until the sale settles. getPurchaseHistory() entries carry the same.
|
|
992
996
|
|
|
993
997
|
const ref = await server.platformCommerce.refund({ orderId: r.orderId, reason: "customer request" });
|
|
994
998
|
// or refund({ clientRequestId }). Pass EXACTLY ONE id.
|
|
@@ -2545,7 +2549,7 @@ the client uses `getMyRewards()` with the player token instead.
|
|
|
2545
2549
|
| `getPlayerRewards` | 400 | `INVALID_PLAYER_EMAIL` | `err.isInvalidPlayerEmail` |
|
|
2546
2550
|
| `getPlayerRewards` | 401 | `INVALID_GAME_SECRET` (missing or wrong key, or a per-channel key: this read takes the server secret only) | |
|
|
2547
2551
|
| `getPlayerRewards` | 404 | `PLAYER_NOT_FOUND` (no player with this email in this game) | `err.isPlayerNotFound` |
|
|
2548
|
-
| any | 429 | (
|
|
2552
|
+
| any | 429 | `RATE_LIMITED` on every rate-limit refusal (some endpoints send their own throttle body) | `err.isRateLimited` (true on any 429); wait `err.retryAfter` seconds and retry (reads are retried automatically first) |
|
|
2549
2553
|
| `redeemReward` | 409 | `already_redeemed` | `err.isRewardAlreadyRedeemed` |
|
|
2550
2554
|
| `redeemReward` | 404 | `vault_entry_not_found` | `err.isRewardNotFound` |
|
|
2551
2555
|
| `redeemReward` | 410 | `vault_entry_expired` | `err.isRewardExpired` |
|
|
@@ -2709,7 +2713,7 @@ export const POST = createWebhookHandler({
|
|
|
2709
2713
|
|---|---|---|
|
|
2710
2714
|
| `purchase.completed` | every currency-purchase rail, **and every paid card subscription renewal** | grant currency (payload: `transaction_id, order_id, player_email, identity_id, usd_amount, currency_amount, currency_name, new_balance, rail`, `metadata`). `metadata` echoes what you passed to `createCheckout`/`purchaseCurrency` (all rails); `order_id` is also on every webhook as a secondary reconciliation key (`getOrderDetails`). Card purchases also carry `partner_fee_usd` and `international_card_fee_usd`, the card fees charged to you (the player paid the listed price). **Skip it when `metadata.source` is `"subscription_renewal"`**: those coins are spent by the renewal itself; grant on `subscription.renewed`. |
|
|
2711
2715
|
| `purchase.failed` | `platform` rail only | handle failures |
|
|
2712
|
-
| `purchase.disputed` | `platform` rail, and `steam` chargebacks | handle disputes. A lost chargeback takes back up to the purchase's coins from the available balance, never below zero. On a lost Platform Commerce card sale or subscription charge dispute (`order_type`), `guarantee_covered: true` means INVO's chargeback guarantee covers it (a fraud chargeback): your share is not reversed or held and no dispute fee is passed to you. Otherwise a lost dispute costs you what a refund would: your share is reversed and INVO's card fee stays charged to you, on a Platform Commerce sale and on every subscription charge (`card_fee_charged_to_partner_usd`, and `partner_debited_usd` = share reversed plus that fee, since 2026-09-28). A subscription dispute also carries `processing_fee_usd`, which reads `"0.00"`. Coin purchase disputes carry none of these keys: a lost one takes back the player
|
|
2716
|
+
| `purchase.disputed` | `platform` rail, and `steam` chargebacks | handle disputes. A lost chargeback takes back up to the purchase's coins from the available balance, never below zero. On a lost Platform Commerce card sale or subscription charge dispute (`order_type`), `guarantee_covered: true` means INVO's chargeback guarantee covers it (a fraud chargeback): your share is not reversed or held and no dispute fee is passed to you. Otherwise a lost dispute costs you what a refund would: your share is reversed and INVO's card fee stays charged to you, on a Platform Commerce sale and on every subscription charge (`card_fee_charged_to_partner_usd`, and `partner_debited_usd` = share reversed plus that fee, since 2026-09-28). A subscription dispute also carries `processing_fee_usd`, which reads `"0.00"`. Coin purchase disputes carry none of these keys: a lost one takes back the coins the player still holds and, since 2026-10-20, charges you for coins already spent at the price paid (`spent_coins_charged_usd` on the close, `"0.00"` when none). A Steam chargeback carries the same keys as a lost card dispute with `payment_intent_id`, `charge_id` and `dispute_id` `null`, plus `rail: "steam"` and `steam_transid`. A card dispute close also carries `dispute_fee_usd` (string decimal, `"0.00"` when INVO bears the fee, `null` when undecided) and `dispute_fee_charged_to_partner` (boolean or `null`); from November 8, 2026 the dispute fee on an Open-tier card sale is passed through to you at cost. **If you revoke on `purchase.refunded`, handle this too:** a Steam chargeback no longer arrives as `purchase.refunded` |
|
|
2713
2717
|
| `purchase.refunded` | `game` / `steam` rails | handle refunds. Only coins the player still has from that purchase are taken back, never below zero. A Steam partial refund carries `fully_refunded: false` |
|
|
2714
2718
|
| `item.purchased` | every item purchase | **grant the in-game item** (payload includes `transaction_id, order_id, player_email, identity_id, item_id, item_name, item_quantity, unit_price, total_price, currency_name, new_balance, fee_breakdown`) |
|
|
2715
2719
|
| `platform_commerce.purchased` | every Platform Commerce purchase (balance immediately; **card after payment settles**) | **fulfill the ecommerce order** — never on the browser confirm (payload: `transaction_id, order_id, funding_source, player_email, identity_id, item_id, item_name, item_quantity, total_price`; + `unit_price, currency_name, new_balance` on balance; `total_price_usd` on card; `fee_breakdown`) |
|
|
@@ -2813,7 +2817,8 @@ Helpers:
|
|
|
2813
2817
|
| `.isAlreadyRefunded` | Platform Commerce refund of an already-refunded order (409) — treat as already done |
|
|
2814
2818
|
| `.isQuoteStale` + `.expectedTotalUsd` | `purchaseCurrency` with an `acknowledgedTotalUsd` below the total INVO would charge now (409); nothing charged: quote again. A higher total is accepted and the true total charged |
|
|
2815
2819
|
| `.isAmountBelowFee` | deprecated: `AMOUNT_BELOW_FEE` is no longer returned (the partner pays the card fee) |
|
|
2816
|
-
| `.retryAfter` | seconds to back off on a 429 throttle |
|
|
2820
|
+
| `.retryAfter` | seconds to back off on a 429 throttle: the body's `retry_after`, else the `Retry-After` header |
|
|
2821
|
+
| `.isRateLimited` | a 429: `.code` `RATE_LIMITED` on every rate-limit refusal since 2026-10-20 (a few endpoints send their own throttle code); wait `.retryAfter` seconds and send the same request again |
|
|
2817
2822
|
| `.isEnrollmentAuthorizationRequired` | first-enrollment needs the OTP grant → `enrollmentBegin`/`enrollmentVerify` |
|
|
2818
2823
|
| `.isEnrollmentProofRequired` | another method exists → prove it via `linkDevice` |
|
|
2819
2824
|
| `.isPhoneShareApprovalRequired` | phone needs owner approval — at register/mint **or** at claim/`confirmReceipt*` (contested receiver phone) → show `.message` (+ `.phoneShareLast4`), retry the same call after approval |
|
|
@@ -2867,7 +2872,7 @@ try {
|
|
|
2867
2872
|
| `iteratePlayerActivity({ playerEmail, types?, pageSize? })` | async iterator over every `PlayerActivityEntry`, following `nextCursor` |
|
|
2868
2873
|
| `getItemOrderDetails({ orderId? \| transactionId? \| clientRequestId? })` | `{ order, financialSummary, statusTimeline, raw }` |
|
|
2869
2874
|
| `platformCommerce.purchase(input)` | `{ status, fundingSource, orderId?, transactionId?, newBalance?, financialBreakdown?, sessionId?, checkoutUrl?, expiresAt?, amountUsd?, idempotentReplay?, raw }` — **ecommerce** (platform tenant); `balance` settles now, `card` returns a hosted-checkout `checkoutUrl` |
|
|
2870
|
-
| `platformCommerce.getStatus(orderId)` | `{ orderId, status, gameCurrencyAmount?, usdAmount?, paymentMethod?, createdAt?, receiptNumber?, receiptUrl?, raw }` |
|
|
2875
|
+
| `platformCommerce.getStatus(orderId)` | `{ orderId, status, gameCurrencyAmount?, usdAmount?, paymentMethod?, createdAt?, receiptNumber?, receiptUrl?, invoFeeUsd?, partnerShareUsd?, raw }` |
|
|
2871
2876
|
| `platformCommerce.getPurchaseHistory({ playerEmail, limit?, cursor? })` | `{ playerEmail, gameId, purchases, limit, hasMore, nextCursor, raw }`; each purchase is what `getStatus` returns, newest first |
|
|
2872
2877
|
| `platformCommerce.iteratePurchaseHistory({ playerEmail, pageSize? })` | async iterator over every purchase, following `nextCursor` |
|
|
2873
2878
|
| `platformCommerce.refund({ orderId? \| clientRequestId?, reason?, refundRemaining?, confirmAdditionalRefund? })` | `{ status, orderId?, fundingSource?, refundedAmount?, amountUnit?, feeRetained?, partialRefund?, adopted?, refundedTotalUsd?, chargeTotalUsd?, remainingUsd?, cardFeeChargedToPartnerUsd?, partnerDebitedUsd?, raw }`; pass **exactly one** id; INVO keeps its fee (on the card leg it stays charged to you: `cardFeeChargedToPartnerUsd`, `partnerDebitedUsd`); `partialRefund`, `refundedTotalUsd`, `chargeTotalUsd`, `remainingUsd` only on a card sale refunded in parts; `adopted` whenever the call recorded an existing refund (a full one included) |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InvoError, assertSecureBaseUrl, Http, toPurchaseStatusResult, toPhoneChangeApprovalsResult, phoneChangeSignalMessage, toApprovePhoneChangeResult, toDestinationsResult, toLoyaltyCardsResult, toLoyaltyVaultResult, toRedeemRewardResult, toRewardsPageLink, buildGameEventBody, toReportGameEventResult } from './chunk-
|
|
1
|
+
import { InvoError, assertSecureBaseUrl, Http, toPurchaseStatusResult, toPhoneChangeApprovalsResult, phoneChangeSignalMessage, toApprovePhoneChangeResult, toDestinationsResult, toLoyaltyCardsResult, toLoyaltyVaultResult, toRedeemRewardResult, toRewardsPageLink, buildGameEventBody, toReportGameEventResult } from './chunk-LMN2V4YT.js';
|
|
2
2
|
|
|
3
3
|
// src/shared/webauthn.ts
|
|
4
4
|
function malformedOptions(field) {
|
|
@@ -1586,5 +1586,5 @@ var InvoClient = class {
|
|
|
1586
1586
|
};
|
|
1587
1587
|
|
|
1588
1588
|
export { CheckoutClient, InvoClient, PlatformCommerceClient };
|
|
1589
|
-
//# sourceMappingURL=chunk-
|
|
1590
|
-
//# sourceMappingURL=chunk-
|
|
1589
|
+
//# sourceMappingURL=chunk-5T75PCZN.js.map
|
|
1590
|
+
//# sourceMappingURL=chunk-5T75PCZN.js.map
|
|
@@ -11,6 +11,7 @@ var InvoError = class _InvoError extends Error {
|
|
|
11
11
|
this.status = args.status;
|
|
12
12
|
this.body = args.body ?? null;
|
|
13
13
|
this.requestId = args.requestId;
|
|
14
|
+
this.retryAfterHeader = args.retryAfterHeader;
|
|
14
15
|
Object.setPrototypeOf(this, _InvoError.prototype);
|
|
15
16
|
}
|
|
16
17
|
/** True if this is the "recipient isn't passkey-enrolled, fall back to claim code" signal. */
|
|
@@ -1098,11 +1099,27 @@ var InvoError = class _InvoError extends Error {
|
|
|
1098
1099
|
get isRewardExpired() {
|
|
1099
1100
|
return this.code === "vault_entry_expired";
|
|
1100
1101
|
}
|
|
1101
|
-
/**
|
|
1102
|
+
/**
|
|
1103
|
+
* Seconds to wait before retrying, when the backend throttled the call: the body's
|
|
1104
|
+
* `retry_after`, else the `Retry-After` header (seconds). Every INVO rate-limit 429 carries
|
|
1105
|
+
* both (since 2026-10-20). `undefined` when neither is a usable number of seconds.
|
|
1106
|
+
*/
|
|
1102
1107
|
get retryAfter() {
|
|
1103
1108
|
const v = this.bodyObject()["retry_after"];
|
|
1104
1109
|
const n = typeof v === "string" ? v.trim() === "" ? NaN : Number(v) : v;
|
|
1105
|
-
|
|
1110
|
+
if (typeof n === "number" && Number.isFinite(n) && n >= 0) return n;
|
|
1111
|
+
const h = this.retryAfterHeader?.trim();
|
|
1112
|
+
if (h && /^\d+(\.\d+)?$/.test(h)) return Number(h);
|
|
1113
|
+
return void 0;
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* True when INVO refused the call for going over a rate limit (additive, 3.31.0): `error_code`
|
|
1117
|
+
* `"RATE_LIMITED"` (every rate-limit 429 carries it since 2026-10-20), or any other 429 (an
|
|
1118
|
+
* older release, or an endpoint with its own throttle body). Wait {@link retryAfter} seconds
|
|
1119
|
+
* and send the same request again. Branch on this, not on the message.
|
|
1120
|
+
*/
|
|
1121
|
+
get isRateLimited() {
|
|
1122
|
+
return this.code === "RATE_LIMITED" || this.code === "rate_limited" || this.status === 429;
|
|
1106
1123
|
}
|
|
1107
1124
|
/** `body` as a plain object, or `{}` if it's a string/number/null (non-JSON responses).
|
|
1108
1125
|
* The `in` operator throws on primitives, so callers must go through this. */
|
|
@@ -1110,7 +1127,7 @@ var InvoError = class _InvoError extends Error {
|
|
|
1110
1127
|
return this.body && typeof this.body === "object" ? this.body : {};
|
|
1111
1128
|
}
|
|
1112
1129
|
};
|
|
1113
|
-
function errorFromResponse(status, body, requestId) {
|
|
1130
|
+
function errorFromResponse(status, body, requestId, retryAfterHeader) {
|
|
1114
1131
|
let message = `INVO request failed (HTTP ${status})`;
|
|
1115
1132
|
let code;
|
|
1116
1133
|
let rawCode;
|
|
@@ -1132,7 +1149,7 @@ function errorFromResponse(status, body, requestId) {
|
|
|
1132
1149
|
} else if (typeof body === "string" && body.trim()) {
|
|
1133
1150
|
message = body;
|
|
1134
1151
|
}
|
|
1135
|
-
return new InvoError({ message, code, rawCode, publicCode, status, body, requestId });
|
|
1152
|
+
return new InvoError({ message, code, rawCode, publicCode, status, body, requestId, retryAfterHeader });
|
|
1136
1153
|
}
|
|
1137
1154
|
|
|
1138
1155
|
// src/shared/http.ts
|
|
@@ -1266,7 +1283,7 @@ var _Http = class _Http {
|
|
|
1266
1283
|
requestId
|
|
1267
1284
|
});
|
|
1268
1285
|
if (!res.ok) {
|
|
1269
|
-
const err = errorFromResponse(res.status, parsed, requestId);
|
|
1286
|
+
const err = errorFromResponse(res.status, parsed, requestId, pickRetryAfterHeader(res.headers));
|
|
1270
1287
|
let wait;
|
|
1271
1288
|
if (idempotent && attempt < this.maxRetries && _Http.RETRIABLE_STATUS.has(res.status)) {
|
|
1272
1289
|
if (res.status === 429) {
|
|
@@ -1324,6 +1341,10 @@ function pickRequestId(headers) {
|
|
|
1324
1341
|
if (!headers || typeof headers.get !== "function") return void 0;
|
|
1325
1342
|
return headers.get("x-invo-request-id") ?? headers.get("x-request-id") ?? void 0;
|
|
1326
1343
|
}
|
|
1344
|
+
function pickRetryAfterHeader(headers) {
|
|
1345
|
+
if (!headers || typeof headers.get !== "function") return void 0;
|
|
1346
|
+
return headers.get("retry-after") ?? void 0;
|
|
1347
|
+
}
|
|
1327
1348
|
function retryAfterMs(parsed, headers) {
|
|
1328
1349
|
if (parsed && typeof parsed === "object") {
|
|
1329
1350
|
const v = parsed["retry_after"];
|
|
@@ -1713,5 +1734,5 @@ function toApprovePhoneChangeResult(raw, changeRequestId) {
|
|
|
1713
1734
|
}
|
|
1714
1735
|
|
|
1715
1736
|
export { Http, InvoError, assertSecureBaseUrl, buildGameEventBody, creditFields, isPurchaseCredited, isPurchaseExpired, isPurchaseRefunded, isPurchaseRefused, newEventId, nothingWasCharged, phoneChangeSignalMessage, receiptFields, toApprovePhoneChangeResult, toDestinationsResult, toLoyaltyCardsResult, toLoyaltyVaultResult, toPhoneChangeApprovalsResult, toPhoneChangeRequest, toPurchaseStatusResult, toRedeemRewardResult, toReportGameEventResult, toRequestPhoneChangeResult, toRewardsPageLink };
|
|
1716
|
-
//# sourceMappingURL=chunk-
|
|
1717
|
-
//# sourceMappingURL=chunk-
|
|
1737
|
+
//# sourceMappingURL=chunk-LMN2V4YT.js.map
|
|
1738
|
+
//# sourceMappingURL=chunk-LMN2V4YT.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SDK_VERSION } from './chunk-
|
|
2
|
-
import { InvoError, assertSecureBaseUrl, Http, toRequestPhoneChangeResult, toPhoneChangeRequest, toPurchaseStatusResult, receiptFields, creditFields, toLoyaltyCardsResult, buildGameEventBody, toReportGameEventResult, toDestinationsResult } from './chunk-
|
|
1
|
+
import { SDK_VERSION } from './chunk-CI7PHE6L.js';
|
|
2
|
+
import { InvoError, assertSecureBaseUrl, Http, toRequestPhoneChangeResult, toPhoneChangeRequest, toPurchaseStatusResult, receiptFields, creditFields, toLoyaltyCardsResult, buildGameEventBody, toReportGameEventResult, toDestinationsResult } from './chunk-LMN2V4YT.js';
|
|
3
3
|
import { createHmac, timingSafeEqual } from 'crypto';
|
|
4
4
|
|
|
5
5
|
// src/payouts.ts
|
|
@@ -701,9 +701,17 @@ function toPlatformOrderStatus(raw, fallbackOrderId) {
|
|
|
701
701
|
paymentMethod: raw["payment_method"],
|
|
702
702
|
createdAt: raw["created_at"],
|
|
703
703
|
...receiptFields(raw),
|
|
704
|
+
...feeSplitFields(raw),
|
|
704
705
|
raw
|
|
705
706
|
};
|
|
706
707
|
}
|
|
708
|
+
function feeSplitFields(raw) {
|
|
709
|
+
const out = {};
|
|
710
|
+
const pick = (v) => v === null ? null : typeof v === "string" ? v : typeof v === "number" && Number.isFinite(v) ? v.toFixed(2) : null;
|
|
711
|
+
if ("invo_fee_usd" in raw) out.invoFeeUsd = pick(raw["invo_fee_usd"]);
|
|
712
|
+
if ("partner_share_usd" in raw) out.partnerShareUsd = pick(raw["partner_share_usd"]);
|
|
713
|
+
return out;
|
|
714
|
+
}
|
|
707
715
|
function nextCursorOf(raw) {
|
|
708
716
|
const c = raw["next_cursor"];
|
|
709
717
|
return typeof c === "string" && c ? c : null;
|
|
@@ -1023,7 +1031,8 @@ var PlatformCommerceServer = class {
|
|
|
1023
1031
|
};
|
|
1024
1032
|
}
|
|
1025
1033
|
/** Poll an order's status: `completed` (balance immediately; card after the webhook),
|
|
1026
|
-
* `pending_payment` (card awaiting confirmation), or `refunded`.
|
|
1034
|
+
* `pending_payment` (card awaiting confirmation), or `refunded`. Once the sale has settled,
|
|
1035
|
+
* `invoFeeUsd` / `partnerShareUsd` say what INVO kept and what you earned (additive). */
|
|
1027
1036
|
async getStatus(orderId, opts) {
|
|
1028
1037
|
if (orderId == null || String(orderId).trim() === "") {
|
|
1029
1038
|
throw invalidInput2("orderId", orderId, "is required");
|
|
@@ -3793,5 +3802,5 @@ var InvoServer = class {
|
|
|
3793
3802
|
};
|
|
3794
3803
|
|
|
3795
3804
|
export { CardsServer, DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, PRODUCTION_BASE_URL, PayoutsServer, PlatformCommerceServer, SANDBOX_BASE_URL, SandboxServer, SandboxSubscriptionsServer, SubscriptionsServer, baseUrlForKey, createWebhookHandler, isDemoKey, isRefundPendingApproval, resolveEnvironment, verifyInvoSignature, verifyWebhook, verifyWebhookAsync };
|
|
3796
|
-
//# sourceMappingURL=chunk-
|
|
3797
|
-
//# sourceMappingURL=chunk-
|
|
3805
|
+
//# sourceMappingURL=chunk-UW66W2N6.js.map
|
|
3806
|
+
//# sourceMappingURL=chunk-UW66W2N6.js.map
|
package/dist/game-server.cjs
CHANGED
|
@@ -107,6 +107,7 @@ var InvoError = class _InvoError extends Error {
|
|
|
107
107
|
this.status = args.status;
|
|
108
108
|
this.body = args.body ?? null;
|
|
109
109
|
this.requestId = args.requestId;
|
|
110
|
+
this.retryAfterHeader = args.retryAfterHeader;
|
|
110
111
|
Object.setPrototypeOf(this, _InvoError.prototype);
|
|
111
112
|
}
|
|
112
113
|
/** True if this is the "recipient isn't passkey-enrolled, fall back to claim code" signal. */
|
|
@@ -1194,11 +1195,27 @@ var InvoError = class _InvoError extends Error {
|
|
|
1194
1195
|
get isRewardExpired() {
|
|
1195
1196
|
return this.code === "vault_entry_expired";
|
|
1196
1197
|
}
|
|
1197
|
-
/**
|
|
1198
|
+
/**
|
|
1199
|
+
* Seconds to wait before retrying, when the backend throttled the call: the body's
|
|
1200
|
+
* `retry_after`, else the `Retry-After` header (seconds). Every INVO rate-limit 429 carries
|
|
1201
|
+
* both (since 2026-10-20). `undefined` when neither is a usable number of seconds.
|
|
1202
|
+
*/
|
|
1198
1203
|
get retryAfter() {
|
|
1199
1204
|
const v = this.bodyObject()["retry_after"];
|
|
1200
1205
|
const n = typeof v === "string" ? v.trim() === "" ? NaN : Number(v) : v;
|
|
1201
|
-
|
|
1206
|
+
if (typeof n === "number" && Number.isFinite(n) && n >= 0) return n;
|
|
1207
|
+
const h = this.retryAfterHeader?.trim();
|
|
1208
|
+
if (h && /^\d+(\.\d+)?$/.test(h)) return Number(h);
|
|
1209
|
+
return void 0;
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* True when INVO refused the call for going over a rate limit (additive, 3.31.0): `error_code`
|
|
1213
|
+
* `"RATE_LIMITED"` (every rate-limit 429 carries it since 2026-10-20), or any other 429 (an
|
|
1214
|
+
* older release, or an endpoint with its own throttle body). Wait {@link retryAfter} seconds
|
|
1215
|
+
* and send the same request again. Branch on this, not on the message.
|
|
1216
|
+
*/
|
|
1217
|
+
get isRateLimited() {
|
|
1218
|
+
return this.code === "RATE_LIMITED" || this.code === "rate_limited" || this.status === 429;
|
|
1202
1219
|
}
|
|
1203
1220
|
/** `body` as a plain object, or `{}` if it's a string/number/null (non-JSON responses).
|
|
1204
1221
|
* The `in` operator throws on primitives, so callers must go through this. */
|
|
@@ -1206,7 +1223,7 @@ var InvoError = class _InvoError extends Error {
|
|
|
1206
1223
|
return this.body && typeof this.body === "object" ? this.body : {};
|
|
1207
1224
|
}
|
|
1208
1225
|
};
|
|
1209
|
-
function errorFromResponse(status, body, requestId) {
|
|
1226
|
+
function errorFromResponse(status, body, requestId, retryAfterHeader) {
|
|
1210
1227
|
let message = `INVO request failed (HTTP ${status})`;
|
|
1211
1228
|
let code;
|
|
1212
1229
|
let rawCode;
|
|
@@ -1228,7 +1245,7 @@ function errorFromResponse(status, body, requestId) {
|
|
|
1228
1245
|
} else if (typeof body === "string" && body.trim()) {
|
|
1229
1246
|
message = body;
|
|
1230
1247
|
}
|
|
1231
|
-
return new InvoError({ message, code, rawCode, publicCode, status, body, requestId });
|
|
1248
|
+
return new InvoError({ message, code, rawCode, publicCode, status, body, requestId, retryAfterHeader });
|
|
1232
1249
|
}
|
|
1233
1250
|
|
|
1234
1251
|
// src/shared/http.ts
|
|
@@ -1362,7 +1379,7 @@ var _Http = class _Http {
|
|
|
1362
1379
|
requestId
|
|
1363
1380
|
});
|
|
1364
1381
|
if (!res.ok) {
|
|
1365
|
-
const err = errorFromResponse(res.status, parsed, requestId);
|
|
1382
|
+
const err = errorFromResponse(res.status, parsed, requestId, pickRetryAfterHeader(res.headers));
|
|
1366
1383
|
let wait;
|
|
1367
1384
|
if (idempotent && attempt < this.maxRetries && _Http.RETRIABLE_STATUS.has(res.status)) {
|
|
1368
1385
|
if (res.status === 429) {
|
|
@@ -1420,6 +1437,10 @@ function pickRequestId(headers) {
|
|
|
1420
1437
|
if (!headers || typeof headers.get !== "function") return void 0;
|
|
1421
1438
|
return headers.get("x-invo-request-id") ?? headers.get("x-request-id") ?? void 0;
|
|
1422
1439
|
}
|
|
1440
|
+
function pickRetryAfterHeader(headers) {
|
|
1441
|
+
if (!headers || typeof headers.get !== "function") return void 0;
|
|
1442
|
+
return headers.get("retry-after") ?? void 0;
|
|
1443
|
+
}
|
|
1423
1444
|
function retryAfterMs(parsed, headers) {
|
|
1424
1445
|
if (parsed && typeof parsed === "object") {
|
|
1425
1446
|
const v = parsed["retry_after"];
|
|
@@ -1711,7 +1732,7 @@ function toPhoneChangeRequest(raw) {
|
|
|
1711
1732
|
}
|
|
1712
1733
|
|
|
1713
1734
|
// src/version.ts
|
|
1714
|
-
var SDK_VERSION = "3.
|
|
1735
|
+
var SDK_VERSION = "3.31.0";
|
|
1715
1736
|
|
|
1716
1737
|
// src/payouts.ts
|
|
1717
1738
|
var AMOUNT = /^\d+(\.\d{1,2})?$/;
|
|
@@ -2265,9 +2286,17 @@ function toPlatformOrderStatus(raw, fallbackOrderId) {
|
|
|
2265
2286
|
paymentMethod: raw["payment_method"],
|
|
2266
2287
|
createdAt: raw["created_at"],
|
|
2267
2288
|
...receiptFields(raw),
|
|
2289
|
+
...feeSplitFields(raw),
|
|
2268
2290
|
raw
|
|
2269
2291
|
};
|
|
2270
2292
|
}
|
|
2293
|
+
function feeSplitFields(raw) {
|
|
2294
|
+
const out = {};
|
|
2295
|
+
const pick = (v) => v === null ? null : typeof v === "string" ? v : typeof v === "number" && Number.isFinite(v) ? v.toFixed(2) : null;
|
|
2296
|
+
if ("invo_fee_usd" in raw) out.invoFeeUsd = pick(raw["invo_fee_usd"]);
|
|
2297
|
+
if ("partner_share_usd" in raw) out.partnerShareUsd = pick(raw["partner_share_usd"]);
|
|
2298
|
+
return out;
|
|
2299
|
+
}
|
|
2271
2300
|
function nextCursorOf(raw) {
|
|
2272
2301
|
const c = raw["next_cursor"];
|
|
2273
2302
|
return typeof c === "string" && c ? c : null;
|
|
@@ -2587,7 +2616,8 @@ var PlatformCommerceServer = class {
|
|
|
2587
2616
|
};
|
|
2588
2617
|
}
|
|
2589
2618
|
/** Poll an order's status: `completed` (balance immediately; card after the webhook),
|
|
2590
|
-
* `pending_payment` (card awaiting confirmation), or `refunded`.
|
|
2619
|
+
* `pending_payment` (card awaiting confirmation), or `refunded`. Once the sale has settled,
|
|
2620
|
+
* `invoFeeUsd` / `partnerShareUsd` say what INVO kept and what you earned (additive). */
|
|
2591
2621
|
async getStatus(orderId, opts) {
|
|
2592
2622
|
if (orderId == null || String(orderId).trim() === "") {
|
|
2593
2623
|
throw invalidInput2("orderId", orderId, "is required");
|
package/dist/game-server.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { I as InvoServer, a as InvoEnvironment } from './server-
|
|
2
|
-
export { D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, P as PRODUCTION_BASE_URL, S as SANDBOX_BASE_URL, b as baseUrlForKey, i as isDemoKey, r as resolveEnvironment, v as verifyInvoSignature } from './server-
|
|
1
|
+
import { I as InvoServer, a as InvoEnvironment } from './server-D9bKfiY6.cjs';
|
|
2
|
+
export { D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, P as PRODUCTION_BASE_URL, S as SANDBOX_BASE_URL, b as baseUrlForKey, i as isDemoKey, r as resolveEnvironment, v as verifyInvoSignature } from './server-D9bKfiY6.cjs';
|
|
3
3
|
import { G as GameCurrencyKind, a as GamePurchaseStatus, b as GameEconomyConfig } from './types-jUxfYjiD.cjs';
|
|
4
4
|
export { c as GameCatalog, d as GameCatalogItem, e as GameCheckout, f as GameCurrencyBalance, g as GameErrorBody, h as GameItemPurchase, i as GamePlayer, j as GamePremiumPack, k as GamePurchase, l as GameSession, m as GameTransferInput, n as GameTransferKind, o as GameTransferStart, p as GameTransferStatus, q as GameWallet } from './types-jUxfYjiD.cjs';
|
|
5
|
-
export { I as InvoError } from './types-
|
|
6
|
-
export { S as SDK_VERSION } from './version-
|
|
5
|
+
export { I as InvoError } from './types-CBanzneD.cjs';
|
|
6
|
+
export { S as SDK_VERSION } from './version-B4Eincjj.cjs';
|
|
7
7
|
import './loyalty-events-CmDw2ZoR.cjs';
|
|
8
8
|
|
|
9
9
|
interface StoredPlayer {
|
package/dist/game-server.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { I as InvoServer, a as InvoEnvironment } from './server-
|
|
2
|
-
export { D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, P as PRODUCTION_BASE_URL, S as SANDBOX_BASE_URL, b as baseUrlForKey, i as isDemoKey, r as resolveEnvironment, v as verifyInvoSignature } from './server-
|
|
1
|
+
import { I as InvoServer, a as InvoEnvironment } from './server-CaALJEML.js';
|
|
2
|
+
export { D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, P as PRODUCTION_BASE_URL, S as SANDBOX_BASE_URL, b as baseUrlForKey, i as isDemoKey, r as resolveEnvironment, v as verifyInvoSignature } from './server-CaALJEML.js';
|
|
3
3
|
import { G as GameCurrencyKind, a as GamePurchaseStatus, b as GameEconomyConfig } from './types-jUxfYjiD.js';
|
|
4
4
|
export { c as GameCatalog, d as GameCatalogItem, e as GameCheckout, f as GameCurrencyBalance, g as GameErrorBody, h as GameItemPurchase, i as GamePlayer, j as GamePremiumPack, k as GamePurchase, l as GameSession, m as GameTransferInput, n as GameTransferKind, o as GameTransferStart, p as GameTransferStatus, q as GameWallet } from './types-jUxfYjiD.js';
|
|
5
|
-
export { I as InvoError } from './types-
|
|
6
|
-
export { S as SDK_VERSION } from './version-
|
|
5
|
+
export { I as InvoError } from './types-CBanzneD.js';
|
|
6
|
+
export { S as SDK_VERSION } from './version-B4Eincjj.js';
|
|
7
7
|
import './loyalty-events-CmDw2ZoR.js';
|
|
8
8
|
|
|
9
9
|
interface StoredPlayer {
|
package/dist/game-server.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isDemoKey, SANDBOX_BASE_URL, PRODUCTION_BASE_URL, InvoServer, resolveEnvironment, verifyWebhook } from './chunk-
|
|
2
|
-
export { DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, PRODUCTION_BASE_URL, SANDBOX_BASE_URL, baseUrlForKey, isDemoKey, resolveEnvironment, verifyInvoSignature } from './chunk-
|
|
3
|
-
export { SDK_VERSION } from './chunk-
|
|
4
|
-
import { InvoError } from './chunk-
|
|
5
|
-
export { InvoError } from './chunk-
|
|
1
|
+
import { isDemoKey, SANDBOX_BASE_URL, PRODUCTION_BASE_URL, InvoServer, resolveEnvironment, verifyWebhook } from './chunk-UW66W2N6.js';
|
|
2
|
+
export { DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, PRODUCTION_BASE_URL, SANDBOX_BASE_URL, baseUrlForKey, isDemoKey, resolveEnvironment, verifyInvoSignature } from './chunk-UW66W2N6.js';
|
|
3
|
+
export { SDK_VERSION } from './chunk-CI7PHE6L.js';
|
|
4
|
+
import { InvoError } from './chunk-LMN2V4YT.js';
|
|
5
|
+
export { InvoError } from './chunk-LMN2V4YT.js';
|
|
6
6
|
import { createHash, randomBytes } from 'crypto';
|
|
7
7
|
import { promises, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
8
8
|
import * as path from 'path';
|
package/dist/game.cjs
CHANGED
|
@@ -13,6 +13,7 @@ var InvoError = class _InvoError extends Error {
|
|
|
13
13
|
this.status = args.status;
|
|
14
14
|
this.body = args.body ?? null;
|
|
15
15
|
this.requestId = args.requestId;
|
|
16
|
+
this.retryAfterHeader = args.retryAfterHeader;
|
|
16
17
|
Object.setPrototypeOf(this, _InvoError.prototype);
|
|
17
18
|
}
|
|
18
19
|
/** True if this is the "recipient isn't passkey-enrolled, fall back to claim code" signal. */
|
|
@@ -1100,11 +1101,27 @@ var InvoError = class _InvoError extends Error {
|
|
|
1100
1101
|
get isRewardExpired() {
|
|
1101
1102
|
return this.code === "vault_entry_expired";
|
|
1102
1103
|
}
|
|
1103
|
-
/**
|
|
1104
|
+
/**
|
|
1105
|
+
* Seconds to wait before retrying, when the backend throttled the call: the body's
|
|
1106
|
+
* `retry_after`, else the `Retry-After` header (seconds). Every INVO rate-limit 429 carries
|
|
1107
|
+
* both (since 2026-10-20). `undefined` when neither is a usable number of seconds.
|
|
1108
|
+
*/
|
|
1104
1109
|
get retryAfter() {
|
|
1105
1110
|
const v = this.bodyObject()["retry_after"];
|
|
1106
1111
|
const n = typeof v === "string" ? v.trim() === "" ? NaN : Number(v) : v;
|
|
1107
|
-
|
|
1112
|
+
if (typeof n === "number" && Number.isFinite(n) && n >= 0) return n;
|
|
1113
|
+
const h = this.retryAfterHeader?.trim();
|
|
1114
|
+
if (h && /^\d+(\.\d+)?$/.test(h)) return Number(h);
|
|
1115
|
+
return void 0;
|
|
1116
|
+
}
|
|
1117
|
+
/**
|
|
1118
|
+
* True when INVO refused the call for going over a rate limit (additive, 3.31.0): `error_code`
|
|
1119
|
+
* `"RATE_LIMITED"` (every rate-limit 429 carries it since 2026-10-20), or any other 429 (an
|
|
1120
|
+
* older release, or an endpoint with its own throttle body). Wait {@link retryAfter} seconds
|
|
1121
|
+
* and send the same request again. Branch on this, not on the message.
|
|
1122
|
+
*/
|
|
1123
|
+
get isRateLimited() {
|
|
1124
|
+
return this.code === "RATE_LIMITED" || this.code === "rate_limited" || this.status === 429;
|
|
1108
1125
|
}
|
|
1109
1126
|
/** `body` as a plain object, or `{}` if it's a string/number/null (non-JSON responses).
|
|
1110
1127
|
* The `in` operator throws on primitives, so callers must go through this. */
|
|
@@ -1112,7 +1129,7 @@ var InvoError = class _InvoError extends Error {
|
|
|
1112
1129
|
return this.body && typeof this.body === "object" ? this.body : {};
|
|
1113
1130
|
}
|
|
1114
1131
|
};
|
|
1115
|
-
function errorFromResponse(status, body, requestId) {
|
|
1132
|
+
function errorFromResponse(status, body, requestId, retryAfterHeader) {
|
|
1116
1133
|
let message = `INVO request failed (HTTP ${status})`;
|
|
1117
1134
|
let code;
|
|
1118
1135
|
let rawCode;
|
|
@@ -1134,7 +1151,7 @@ function errorFromResponse(status, body, requestId) {
|
|
|
1134
1151
|
} else if (typeof body === "string" && body.trim()) {
|
|
1135
1152
|
message = body;
|
|
1136
1153
|
}
|
|
1137
|
-
return new InvoError({ message, code, rawCode, publicCode, status, body, requestId });
|
|
1154
|
+
return new InvoError({ message, code, rawCode, publicCode, status, body, requestId, retryAfterHeader });
|
|
1138
1155
|
}
|
|
1139
1156
|
|
|
1140
1157
|
// src/shared/loyalty-events.ts
|
|
@@ -1333,7 +1350,7 @@ var _Http = class _Http {
|
|
|
1333
1350
|
requestId
|
|
1334
1351
|
});
|
|
1335
1352
|
if (!res.ok) {
|
|
1336
|
-
const err = errorFromResponse(res.status, parsed, requestId);
|
|
1353
|
+
const err = errorFromResponse(res.status, parsed, requestId, pickRetryAfterHeader(res.headers));
|
|
1337
1354
|
let wait;
|
|
1338
1355
|
if (idempotent && attempt < this.maxRetries && _Http.RETRIABLE_STATUS.has(res.status)) {
|
|
1339
1356
|
if (res.status === 429) {
|
|
@@ -1391,6 +1408,10 @@ function pickRequestId(headers) {
|
|
|
1391
1408
|
if (!headers || typeof headers.get !== "function") return void 0;
|
|
1392
1409
|
return headers.get("x-invo-request-id") ?? headers.get("x-request-id") ?? void 0;
|
|
1393
1410
|
}
|
|
1411
|
+
function pickRetryAfterHeader(headers) {
|
|
1412
|
+
if (!headers || typeof headers.get !== "function") return void 0;
|
|
1413
|
+
return headers.get("retry-after") ?? void 0;
|
|
1414
|
+
}
|
|
1394
1415
|
function retryAfterMs(parsed, headers) {
|
|
1395
1416
|
if (parsed && typeof parsed === "object") {
|
|
1396
1417
|
const v = parsed["retry_after"];
|
|
@@ -4833,7 +4854,7 @@ function mountInvoUI(container, economy, options = {}) {
|
|
|
4833
4854
|
}
|
|
4834
4855
|
|
|
4835
4856
|
// src/version.ts
|
|
4836
|
-
var SDK_VERSION = "3.
|
|
4857
|
+
var SDK_VERSION = "3.31.0";
|
|
4837
4858
|
|
|
4838
4859
|
exports.InvoGameEconomy = InvoGameEconomy;
|
|
4839
4860
|
exports.InvoGameError = InvoGameError;
|
package/dist/game.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as GamePlayer, q as GameWallet, c as GameCatalog, k as GamePurchase, h as GameItemPurchase, n as GameTransferKind, d as GameCatalogItem, f as GameCurrencyBalance, p as GameTransferStatus, m as GameTransferInput, o as GameTransferStart } from './types-jUxfYjiD.cjs';
|
|
2
2
|
export { e as GameCheckout, G as GameCurrencyKind, b as GameEconomyConfig, g as GameErrorBody, j as GamePremiumPack, a as GamePurchaseStatus, l as GameSession } from './types-jUxfYjiD.cjs';
|
|
3
|
-
import { A as ApproveHostedResult } from './hosted-approval-
|
|
4
|
-
import { D as DestinationGame, P as PendingCollectItem } from './types-
|
|
5
|
-
export { S as SDK_VERSION } from './version-
|
|
3
|
+
import { A as ApproveHostedResult } from './hosted-approval-BBQHClAP.cjs';
|
|
4
|
+
import { D as DestinationGame, P as PendingCollectItem } from './types-CBanzneD.cjs';
|
|
5
|
+
export { S as SDK_VERSION } from './version-B4Eincjj.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* INVO game economy client (3.27.0), the browser half. It talks ONLY to your game server
|
package/dist/game.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as GamePlayer, q as GameWallet, c as GameCatalog, k as GamePurchase, h as GameItemPurchase, n as GameTransferKind, d as GameCatalogItem, f as GameCurrencyBalance, p as GameTransferStatus, m as GameTransferInput, o as GameTransferStart } from './types-jUxfYjiD.js';
|
|
2
2
|
export { e as GameCheckout, G as GameCurrencyKind, b as GameEconomyConfig, g as GameErrorBody, j as GamePremiumPack, a as GamePurchaseStatus, l as GameSession } from './types-jUxfYjiD.js';
|
|
3
|
-
import { A as ApproveHostedResult } from './hosted-approval-
|
|
4
|
-
import { D as DestinationGame, P as PendingCollectItem } from './types-
|
|
5
|
-
export { S as SDK_VERSION } from './version-
|
|
3
|
+
import { A as ApproveHostedResult } from './hosted-approval-Dp-BigX9.js';
|
|
4
|
+
import { D as DestinationGame, P as PendingCollectItem } from './types-CBanzneD.js';
|
|
5
|
+
export { S as SDK_VERSION } from './version-B4Eincjj.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* INVO game economy client (3.27.0), the browser half. It talks ONLY to your game server
|
package/dist/game.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InvoClient } from './chunk-
|
|
2
|
-
export { SDK_VERSION } from './chunk-
|
|
3
|
-
import { newEventId } from './chunk-
|
|
1
|
+
import { InvoClient } from './chunk-5T75PCZN.js';
|
|
2
|
+
export { SDK_VERSION } from './chunk-CI7PHE6L.js';
|
|
3
|
+
import { newEventId } from './chunk-LMN2V4YT.js';
|
|
4
4
|
|
|
5
5
|
// src/game/client.ts
|
|
6
6
|
var InvoGameError = class extends Error {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApproveResult, j as ConfirmReceiptResult } from './types-
|
|
1
|
+
import { A as ApproveResult, j as ConfirmReceiptResult } from './types-CBanzneD.cjs';
|
|
2
2
|
|
|
3
3
|
/** The four device-approval flows (`begin.flow`). */
|
|
4
4
|
type HostedFlow = "transfer" | "send" | "send_receipt" | "transfer_receipt";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApproveResult, j as ConfirmReceiptResult } from './types-
|
|
1
|
+
import { A as ApproveResult, j as ConfirmReceiptResult } from './types-CBanzneD.js';
|
|
2
2
|
|
|
3
3
|
/** The four device-approval flows (`begin.flow`). */
|
|
4
4
|
type HostedFlow = "transfer" | "send" | "send_receipt" | "transfer_receipt";
|
package/dist/index.cjs
CHANGED
|
@@ -13,6 +13,7 @@ var InvoError = class _InvoError extends Error {
|
|
|
13
13
|
this.status = args.status;
|
|
14
14
|
this.body = args.body ?? null;
|
|
15
15
|
this.requestId = args.requestId;
|
|
16
|
+
this.retryAfterHeader = args.retryAfterHeader;
|
|
16
17
|
Object.setPrototypeOf(this, _InvoError.prototype);
|
|
17
18
|
}
|
|
18
19
|
/** True if this is the "recipient isn't passkey-enrolled, fall back to claim code" signal. */
|
|
@@ -1100,11 +1101,27 @@ var InvoError = class _InvoError extends Error {
|
|
|
1100
1101
|
get isRewardExpired() {
|
|
1101
1102
|
return this.code === "vault_entry_expired";
|
|
1102
1103
|
}
|
|
1103
|
-
/**
|
|
1104
|
+
/**
|
|
1105
|
+
* Seconds to wait before retrying, when the backend throttled the call: the body's
|
|
1106
|
+
* `retry_after`, else the `Retry-After` header (seconds). Every INVO rate-limit 429 carries
|
|
1107
|
+
* both (since 2026-10-20). `undefined` when neither is a usable number of seconds.
|
|
1108
|
+
*/
|
|
1104
1109
|
get retryAfter() {
|
|
1105
1110
|
const v = this.bodyObject()["retry_after"];
|
|
1106
1111
|
const n = typeof v === "string" ? v.trim() === "" ? NaN : Number(v) : v;
|
|
1107
|
-
|
|
1112
|
+
if (typeof n === "number" && Number.isFinite(n) && n >= 0) return n;
|
|
1113
|
+
const h = this.retryAfterHeader?.trim();
|
|
1114
|
+
if (h && /^\d+(\.\d+)?$/.test(h)) return Number(h);
|
|
1115
|
+
return void 0;
|
|
1116
|
+
}
|
|
1117
|
+
/**
|
|
1118
|
+
* True when INVO refused the call for going over a rate limit (additive, 3.31.0): `error_code`
|
|
1119
|
+
* `"RATE_LIMITED"` (every rate-limit 429 carries it since 2026-10-20), or any other 429 (an
|
|
1120
|
+
* older release, or an endpoint with its own throttle body). Wait {@link retryAfter} seconds
|
|
1121
|
+
* and send the same request again. Branch on this, not on the message.
|
|
1122
|
+
*/
|
|
1123
|
+
get isRateLimited() {
|
|
1124
|
+
return this.code === "RATE_LIMITED" || this.code === "rate_limited" || this.status === 429;
|
|
1108
1125
|
}
|
|
1109
1126
|
/** `body` as a plain object, or `{}` if it's a string/number/null (non-JSON responses).
|
|
1110
1127
|
* The `in` operator throws on primitives, so callers must go through this. */
|
|
@@ -1112,7 +1129,7 @@ var InvoError = class _InvoError extends Error {
|
|
|
1112
1129
|
return this.body && typeof this.body === "object" ? this.body : {};
|
|
1113
1130
|
}
|
|
1114
1131
|
};
|
|
1115
|
-
function errorFromResponse(status, body, requestId) {
|
|
1132
|
+
function errorFromResponse(status, body, requestId, retryAfterHeader) {
|
|
1116
1133
|
let message = `INVO request failed (HTTP ${status})`;
|
|
1117
1134
|
let code;
|
|
1118
1135
|
let rawCode;
|
|
@@ -1134,7 +1151,7 @@ function errorFromResponse(status, body, requestId) {
|
|
|
1134
1151
|
} else if (typeof body === "string" && body.trim()) {
|
|
1135
1152
|
message = body;
|
|
1136
1153
|
}
|
|
1137
|
-
return new InvoError({ message, code, rawCode, publicCode, status, body, requestId });
|
|
1154
|
+
return new InvoError({ message, code, rawCode, publicCode, status, body, requestId, retryAfterHeader });
|
|
1138
1155
|
}
|
|
1139
1156
|
|
|
1140
1157
|
// src/shared/http.ts
|
|
@@ -1268,7 +1285,7 @@ var _Http = class _Http {
|
|
|
1268
1285
|
requestId
|
|
1269
1286
|
});
|
|
1270
1287
|
if (!res.ok) {
|
|
1271
|
-
const err = errorFromResponse(res.status, parsed, requestId);
|
|
1288
|
+
const err = errorFromResponse(res.status, parsed, requestId, pickRetryAfterHeader(res.headers));
|
|
1272
1289
|
let wait;
|
|
1273
1290
|
if (idempotent && attempt < this.maxRetries && _Http.RETRIABLE_STATUS.has(res.status)) {
|
|
1274
1291
|
if (res.status === 429) {
|
|
@@ -1326,6 +1343,10 @@ function pickRequestId(headers) {
|
|
|
1326
1343
|
if (!headers || typeof headers.get !== "function") return void 0;
|
|
1327
1344
|
return headers.get("x-invo-request-id") ?? headers.get("x-request-id") ?? void 0;
|
|
1328
1345
|
}
|
|
1346
|
+
function pickRetryAfterHeader(headers) {
|
|
1347
|
+
if (!headers || typeof headers.get !== "function") return void 0;
|
|
1348
|
+
return headers.get("retry-after") ?? void 0;
|
|
1349
|
+
}
|
|
1329
1350
|
function retryAfterMs(parsed, headers) {
|
|
1330
1351
|
if (parsed && typeof parsed === "object") {
|
|
1331
1352
|
const v = parsed["retry_after"];
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as PurchaseStatusResult, b as PurchaseCredited, c as PurchaseExpired, d as PurchaseRefunded, e as PurchaseRefused, C as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, A as ApproveResult, j as ConfirmReceiptResult, k as PhoneChangeApprovalsResult, l as ApprovePhoneChangeInput, m as ApprovePhoneChangeResult, L as LinkDeviceResult, n as PendingCollectResult, o as DestinationsQuery, p as DestinationsResult, B as BalanceResult, q as LoyaltyCardsResult, r as LoyaltyVaultResult, R as RedeemRewardResult, s as RewardsPageLink, E as EnrollmentBeginResult, t as EnrollmentVerifyResult, u as RecoveryBeginResult, v as RecoveryCompleteResult } from './types-
|
|
2
|
-
export { w as BalanceRow, x as CheckoutPurchaseStatus, y as ClaimDelivery, D as DestinationGame, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, U as LoyaltyVaultEntry, P as PendingCollectItem, V as PhoneChangeApproval, X as PhoneChangeDeviceSignal, Y as PurchaseRefusalReason, Z as Rail, _ as VerificationMethod } from './types-
|
|
3
|
-
import { a as ApproveHostedOptions, A as ApproveHostedResult } from './hosted-approval-
|
|
4
|
-
export { E as EnrollmentDecision, b as EnrollmentRespond, H as HostedApprovalStatus, c as HostedEnrollment, d as HostedEnrollmentInput, e as HostedFlow } from './hosted-approval-
|
|
1
|
+
import { a as PurchaseStatusResult, b as PurchaseCredited, c as PurchaseExpired, d as PurchaseRefunded, e as PurchaseRefused, C as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, A as ApproveResult, j as ConfirmReceiptResult, k as PhoneChangeApprovalsResult, l as ApprovePhoneChangeInput, m as ApprovePhoneChangeResult, L as LinkDeviceResult, n as PendingCollectResult, o as DestinationsQuery, p as DestinationsResult, B as BalanceResult, q as LoyaltyCardsResult, r as LoyaltyVaultResult, R as RedeemRewardResult, s as RewardsPageLink, E as EnrollmentBeginResult, t as EnrollmentVerifyResult, u as RecoveryBeginResult, v as RecoveryCompleteResult } from './types-CBanzneD.cjs';
|
|
2
|
+
export { w as BalanceRow, x as CheckoutPurchaseStatus, y as ClaimDelivery, D as DestinationGame, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, U as LoyaltyVaultEntry, P as PendingCollectItem, V as PhoneChangeApproval, X as PhoneChangeDeviceSignal, Y as PurchaseRefusalReason, Z as Rail, _ as VerificationMethod } from './types-CBanzneD.cjs';
|
|
3
|
+
import { a as ApproveHostedOptions, A as ApproveHostedResult } from './hosted-approval-BBQHClAP.cjs';
|
|
4
|
+
export { E as EnrollmentDecision, b as EnrollmentRespond, H as HostedApprovalStatus, c as HostedEnrollment, d as HostedEnrollmentInput, e as HostedFlow } from './hosted-approval-BBQHClAP.cjs';
|
|
5
5
|
import { R as ReportGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.cjs';
|
|
6
6
|
export { G as GameEventType } from './loyalty-events-CmDw2ZoR.cjs';
|
|
7
7
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as PurchaseStatusResult, b as PurchaseCredited, c as PurchaseExpired, d as PurchaseRefunded, e as PurchaseRefused, C as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, A as ApproveResult, j as ConfirmReceiptResult, k as PhoneChangeApprovalsResult, l as ApprovePhoneChangeInput, m as ApprovePhoneChangeResult, L as LinkDeviceResult, n as PendingCollectResult, o as DestinationsQuery, p as DestinationsResult, B as BalanceResult, q as LoyaltyCardsResult, r as LoyaltyVaultResult, R as RedeemRewardResult, s as RewardsPageLink, E as EnrollmentBeginResult, t as EnrollmentVerifyResult, u as RecoveryBeginResult, v as RecoveryCompleteResult } from './types-
|
|
2
|
-
export { w as BalanceRow, x as CheckoutPurchaseStatus, y as ClaimDelivery, D as DestinationGame, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, U as LoyaltyVaultEntry, P as PendingCollectItem, V as PhoneChangeApproval, X as PhoneChangeDeviceSignal, Y as PurchaseRefusalReason, Z as Rail, _ as VerificationMethod } from './types-
|
|
3
|
-
import { a as ApproveHostedOptions, A as ApproveHostedResult } from './hosted-approval-
|
|
4
|
-
export { E as EnrollmentDecision, b as EnrollmentRespond, H as HostedApprovalStatus, c as HostedEnrollment, d as HostedEnrollmentInput, e as HostedFlow } from './hosted-approval-
|
|
1
|
+
import { a as PurchaseStatusResult, b as PurchaseCredited, c as PurchaseExpired, d as PurchaseRefunded, e as PurchaseRefused, C as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, A as ApproveResult, j as ConfirmReceiptResult, k as PhoneChangeApprovalsResult, l as ApprovePhoneChangeInput, m as ApprovePhoneChangeResult, L as LinkDeviceResult, n as PendingCollectResult, o as DestinationsQuery, p as DestinationsResult, B as BalanceResult, q as LoyaltyCardsResult, r as LoyaltyVaultResult, R as RedeemRewardResult, s as RewardsPageLink, E as EnrollmentBeginResult, t as EnrollmentVerifyResult, u as RecoveryBeginResult, v as RecoveryCompleteResult } from './types-CBanzneD.js';
|
|
2
|
+
export { w as BalanceRow, x as CheckoutPurchaseStatus, y as ClaimDelivery, D as DestinationGame, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, U as LoyaltyVaultEntry, P as PendingCollectItem, V as PhoneChangeApproval, X as PhoneChangeDeviceSignal, Y as PurchaseRefusalReason, Z as Rail, _ as VerificationMethod } from './types-CBanzneD.js';
|
|
3
|
+
import { a as ApproveHostedOptions, A as ApproveHostedResult } from './hosted-approval-Dp-BigX9.js';
|
|
4
|
+
export { E as EnrollmentDecision, b as EnrollmentRespond, H as HostedApprovalStatus, c as HostedEnrollment, d as HostedEnrollmentInput, e as HostedFlow } from './hosted-approval-Dp-BigX9.js';
|
|
5
5
|
import { R as ReportGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.js';
|
|
6
6
|
export { G as GameEventType } from './loyalty-events-CmDw2ZoR.js';
|
|
7
7
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CheckoutClient, InvoClient, PlatformCommerceClient } from './chunk-
|
|
2
|
-
export { InvoError, isPurchaseCredited, isPurchaseExpired, isPurchaseRefunded, isPurchaseRefused, nothingWasCharged, phoneChangeSignalMessage } from './chunk-
|
|
1
|
+
export { CheckoutClient, InvoClient, PlatformCommerceClient } from './chunk-5T75PCZN.js';
|
|
2
|
+
export { InvoError, isPurchaseCredited, isPurchaseExpired, isPurchaseRefunded, isPurchaseRefused, nothingWasCharged, phoneChangeSignalMessage } from './chunk-LMN2V4YT.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as InvoError, H as Http, $ as AuthHeader, g as CallOptions, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a5 as PlatformRefundInput, a6 as PlatformRefundResult, a7 as CreateSubscriptionInput, a8 as SubscriptionResult, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, ab as ListSubscriptionsOptions, ac as SubscriptionListResult, ad as CancelSubscriptionOptions, ae as CancelResult, af as ChangeAmountResult, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, ai as RefundSubscriptionInput, aj as RefundResult, ak as SteamSubscriptionInitInput, al as SteamInitResult, am as SteamFinalizeSubscriptionResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, ap as CardSetupInput, aq as CardSetupResult, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, at as PlayerCardsResult, au as SandboxClockResult, av as SandboxFailureOutcome, aw as SandboxForceFailureOptions, ax as SandboxForceAuthChallengeOptions, ay as ServerConfig, az as MintPlayerTokenInput, aA as PlayerToken, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, aH as PhoneChangeRequest, aI as InitiateSendInput, aJ as InitiateResult, aK as InitiateTransferInput, aL as CreateCheckoutInput, aM as CreateCheckoutResult, a as PurchaseStatusResult, aN as PurchaseInput, aO as PurchaseResult, aP as CurrencyPurchaseQuoteInput, aQ as CurrencyPurchaseQuote, aR as ConfirmPaymentResult, aS as OrderDetailsResult, aT as SteamPacksQuery, aU as SteamPacksResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, aZ as PurchaseItemInput, a_ as PurchaseItemResult, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, b4 as PlayerActivityEntry, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, q as LoyaltyCardsResult, b7 as InboundPendingQuery, b8 as InboundPendingResult, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bb as SmsVerifyResult, bc as ClaimTransferInput, bd as ClaimResult, be as ClaimCurrencyInput, bf as TransactionStatusResult, bg as GuardianApprovalStatusResult, bh as ServerDestinationsQuery, p as DestinationsResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bm as PhoneShareStatusResult, bn as BeginDeviceApprovalInput, bo as DeviceApprovalGrant, bp as PollDeviceApprovalInput, bq as DeviceApprovalPollResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, bt as ApproveWithDeviceCodeInput, bu as DeviceApprovalSettleResult, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult } from './types-
|
|
1
|
+
import { I as InvoError, H as Http, $ as AuthHeader, g as CallOptions, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a5 as PlatformRefundInput, a6 as PlatformRefundResult, a7 as CreateSubscriptionInput, a8 as SubscriptionResult, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, ab as ListSubscriptionsOptions, ac as SubscriptionListResult, ad as CancelSubscriptionOptions, ae as CancelResult, af as ChangeAmountResult, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, ai as RefundSubscriptionInput, aj as RefundResult, ak as SteamSubscriptionInitInput, al as SteamInitResult, am as SteamFinalizeSubscriptionResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, ap as CardSetupInput, aq as CardSetupResult, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, at as PlayerCardsResult, au as SandboxClockResult, av as SandboxFailureOutcome, aw as SandboxForceFailureOptions, ax as SandboxForceAuthChallengeOptions, ay as ServerConfig, az as MintPlayerTokenInput, aA as PlayerToken, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, aH as PhoneChangeRequest, aI as InitiateSendInput, aJ as InitiateResult, aK as InitiateTransferInput, aL as CreateCheckoutInput, aM as CreateCheckoutResult, a as PurchaseStatusResult, aN as PurchaseInput, aO as PurchaseResult, aP as CurrencyPurchaseQuoteInput, aQ as CurrencyPurchaseQuote, aR as ConfirmPaymentResult, aS as OrderDetailsResult, aT as SteamPacksQuery, aU as SteamPacksResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, aZ as PurchaseItemInput, a_ as PurchaseItemResult, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, b4 as PlayerActivityEntry, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, q as LoyaltyCardsResult, b7 as InboundPendingQuery, b8 as InboundPendingResult, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bb as SmsVerifyResult, bc as ClaimTransferInput, bd as ClaimResult, be as ClaimCurrencyInput, bf as TransactionStatusResult, bg as GuardianApprovalStatusResult, bh as ServerDestinationsQuery, p as DestinationsResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bm as PhoneShareStatusResult, bn as BeginDeviceApprovalInput, bo as DeviceApprovalGrant, bp as PollDeviceApprovalInput, bq as DeviceApprovalPollResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, bt as ApproveWithDeviceCodeInput, bu as DeviceApprovalSettleResult, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult } from './types-CBanzneD.js';
|
|
2
2
|
import { b as ReportServerGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.js';
|
|
3
|
-
import './version-
|
|
3
|
+
import './version-B4Eincjj.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Pick the INVO environment from the game secret alone (3.28.0).
|
|
@@ -177,6 +177,15 @@ interface PurchaseEventData {
|
|
|
177
177
|
* `dispute_fee_usd` is absent.
|
|
178
178
|
*/
|
|
179
179
|
dispute_fee_charged_to_partner?: boolean | null;
|
|
180
|
+
/**
|
|
181
|
+
* Additive (2026-10-20), on a coin purchase.disputed sent when the dispute closes: the value
|
|
182
|
+
* of coins the player had already spent, charged to you at the price the player paid per coin
|
|
183
|
+
* (before tax), USD decimal string. On a lost dispute INVO takes back the coins the player still
|
|
184
|
+
* holds and charges this for the rest; `"0.00"` when nothing was charged (a won dispute, no
|
|
185
|
+
* coins spent, or the chargeback guarantee covered it). Absent on opened events, older events
|
|
186
|
+
* and non-coin disputes; do not read absence as zero.
|
|
187
|
+
*/
|
|
188
|
+
spent_coins_charged_usd?: string;
|
|
180
189
|
/** On a lost subscription purchase.disputed: the subscription and period it concerns. */
|
|
181
190
|
subscription_id?: string | null;
|
|
182
191
|
period_seq?: number | null;
|
|
@@ -1199,7 +1208,8 @@ declare class PlatformCommerceServer {
|
|
|
1199
1208
|
*/
|
|
1200
1209
|
purchase(input: PlatformPurchaseInput, opts?: CallOptions): Promise<PlatformPurchaseResult>;
|
|
1201
1210
|
/** Poll an order's status: `completed` (balance immediately; card after the webhook),
|
|
1202
|
-
* `pending_payment` (card awaiting confirmation), or `refunded`.
|
|
1211
|
+
* `pending_payment` (card awaiting confirmation), or `refunded`. Once the sale has settled,
|
|
1212
|
+
* `invoFeeUsd` / `partnerShareUsd` say what INVO kept and what you earned (additive). */
|
|
1203
1213
|
getStatus(orderId: string | number, opts?: CallOptions): Promise<PlatformOrderStatusResult>;
|
|
1204
1214
|
/**
|
|
1205
1215
|
* One player's Platform Commerce purchases in your app, newest first, one page at a time
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as InvoError, H as Http, $ as AuthHeader, g as CallOptions, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a5 as PlatformRefundInput, a6 as PlatformRefundResult, a7 as CreateSubscriptionInput, a8 as SubscriptionResult, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, ab as ListSubscriptionsOptions, ac as SubscriptionListResult, ad as CancelSubscriptionOptions, ae as CancelResult, af as ChangeAmountResult, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, ai as RefundSubscriptionInput, aj as RefundResult, ak as SteamSubscriptionInitInput, al as SteamInitResult, am as SteamFinalizeSubscriptionResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, ap as CardSetupInput, aq as CardSetupResult, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, at as PlayerCardsResult, au as SandboxClockResult, av as SandboxFailureOutcome, aw as SandboxForceFailureOptions, ax as SandboxForceAuthChallengeOptions, ay as ServerConfig, az as MintPlayerTokenInput, aA as PlayerToken, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, aH as PhoneChangeRequest, aI as InitiateSendInput, aJ as InitiateResult, aK as InitiateTransferInput, aL as CreateCheckoutInput, aM as CreateCheckoutResult, a as PurchaseStatusResult, aN as PurchaseInput, aO as PurchaseResult, aP as CurrencyPurchaseQuoteInput, aQ as CurrencyPurchaseQuote, aR as ConfirmPaymentResult, aS as OrderDetailsResult, aT as SteamPacksQuery, aU as SteamPacksResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, aZ as PurchaseItemInput, a_ as PurchaseItemResult, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, b4 as PlayerActivityEntry, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, q as LoyaltyCardsResult, b7 as InboundPendingQuery, b8 as InboundPendingResult, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bb as SmsVerifyResult, bc as ClaimTransferInput, bd as ClaimResult, be as ClaimCurrencyInput, bf as TransactionStatusResult, bg as GuardianApprovalStatusResult, bh as ServerDestinationsQuery, p as DestinationsResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bm as PhoneShareStatusResult, bn as BeginDeviceApprovalInput, bo as DeviceApprovalGrant, bp as PollDeviceApprovalInput, bq as DeviceApprovalPollResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, bt as ApproveWithDeviceCodeInput, bu as DeviceApprovalSettleResult, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult } from './types-
|
|
1
|
+
import { I as InvoError, H as Http, $ as AuthHeader, g as CallOptions, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a5 as PlatformRefundInput, a6 as PlatformRefundResult, a7 as CreateSubscriptionInput, a8 as SubscriptionResult, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, ab as ListSubscriptionsOptions, ac as SubscriptionListResult, ad as CancelSubscriptionOptions, ae as CancelResult, af as ChangeAmountResult, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, ai as RefundSubscriptionInput, aj as RefundResult, ak as SteamSubscriptionInitInput, al as SteamInitResult, am as SteamFinalizeSubscriptionResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, ap as CardSetupInput, aq as CardSetupResult, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, at as PlayerCardsResult, au as SandboxClockResult, av as SandboxFailureOutcome, aw as SandboxForceFailureOptions, ax as SandboxForceAuthChallengeOptions, ay as ServerConfig, az as MintPlayerTokenInput, aA as PlayerToken, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, aH as PhoneChangeRequest, aI as InitiateSendInput, aJ as InitiateResult, aK as InitiateTransferInput, aL as CreateCheckoutInput, aM as CreateCheckoutResult, a as PurchaseStatusResult, aN as PurchaseInput, aO as PurchaseResult, aP as CurrencyPurchaseQuoteInput, aQ as CurrencyPurchaseQuote, aR as ConfirmPaymentResult, aS as OrderDetailsResult, aT as SteamPacksQuery, aU as SteamPacksResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, aZ as PurchaseItemInput, a_ as PurchaseItemResult, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, b4 as PlayerActivityEntry, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, q as LoyaltyCardsResult, b7 as InboundPendingQuery, b8 as InboundPendingResult, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bb as SmsVerifyResult, bc as ClaimTransferInput, bd as ClaimResult, be as ClaimCurrencyInput, bf as TransactionStatusResult, bg as GuardianApprovalStatusResult, bh as ServerDestinationsQuery, p as DestinationsResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bm as PhoneShareStatusResult, bn as BeginDeviceApprovalInput, bo as DeviceApprovalGrant, bp as PollDeviceApprovalInput, bq as DeviceApprovalPollResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, bt as ApproveWithDeviceCodeInput, bu as DeviceApprovalSettleResult, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult } from './types-CBanzneD.cjs';
|
|
2
2
|
import { b as ReportServerGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.cjs';
|
|
3
|
-
import './version-
|
|
3
|
+
import './version-B4Eincjj.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Pick the INVO environment from the game secret alone (3.28.0).
|
|
@@ -177,6 +177,15 @@ interface PurchaseEventData {
|
|
|
177
177
|
* `dispute_fee_usd` is absent.
|
|
178
178
|
*/
|
|
179
179
|
dispute_fee_charged_to_partner?: boolean | null;
|
|
180
|
+
/**
|
|
181
|
+
* Additive (2026-10-20), on a coin purchase.disputed sent when the dispute closes: the value
|
|
182
|
+
* of coins the player had already spent, charged to you at the price the player paid per coin
|
|
183
|
+
* (before tax), USD decimal string. On a lost dispute INVO takes back the coins the player still
|
|
184
|
+
* holds and charges this for the rest; `"0.00"` when nothing was charged (a won dispute, no
|
|
185
|
+
* coins spent, or the chargeback guarantee covered it). Absent on opened events, older events
|
|
186
|
+
* and non-coin disputes; do not read absence as zero.
|
|
187
|
+
*/
|
|
188
|
+
spent_coins_charged_usd?: string;
|
|
180
189
|
/** On a lost subscription purchase.disputed: the subscription and period it concerns. */
|
|
181
190
|
subscription_id?: string | null;
|
|
182
191
|
period_seq?: number | null;
|
|
@@ -1199,7 +1208,8 @@ declare class PlatformCommerceServer {
|
|
|
1199
1208
|
*/
|
|
1200
1209
|
purchase(input: PlatformPurchaseInput, opts?: CallOptions): Promise<PlatformPurchaseResult>;
|
|
1201
1210
|
/** Poll an order's status: `completed` (balance immediately; card after the webhook),
|
|
1202
|
-
* `pending_payment` (card awaiting confirmation), or `refunded`.
|
|
1211
|
+
* `pending_payment` (card awaiting confirmation), or `refunded`. Once the sale has settled,
|
|
1212
|
+
* `invoFeeUsd` / `partnerShareUsd` say what INVO kept and what you earned (additive). */
|
|
1203
1213
|
getStatus(orderId: string | number, opts?: CallOptions): Promise<PlatformOrderStatusResult>;
|
|
1204
1214
|
/**
|
|
1205
1215
|
* One player's Platform Commerce purchases in your app, newest first, one page at a time
|
package/dist/server.cjs
CHANGED
|
@@ -15,6 +15,7 @@ var InvoError = class _InvoError extends Error {
|
|
|
15
15
|
this.status = args.status;
|
|
16
16
|
this.body = args.body ?? null;
|
|
17
17
|
this.requestId = args.requestId;
|
|
18
|
+
this.retryAfterHeader = args.retryAfterHeader;
|
|
18
19
|
Object.setPrototypeOf(this, _InvoError.prototype);
|
|
19
20
|
}
|
|
20
21
|
/** True if this is the "recipient isn't passkey-enrolled, fall back to claim code" signal. */
|
|
@@ -1102,11 +1103,27 @@ var InvoError = class _InvoError extends Error {
|
|
|
1102
1103
|
get isRewardExpired() {
|
|
1103
1104
|
return this.code === "vault_entry_expired";
|
|
1104
1105
|
}
|
|
1105
|
-
/**
|
|
1106
|
+
/**
|
|
1107
|
+
* Seconds to wait before retrying, when the backend throttled the call: the body's
|
|
1108
|
+
* `retry_after`, else the `Retry-After` header (seconds). Every INVO rate-limit 429 carries
|
|
1109
|
+
* both (since 2026-10-20). `undefined` when neither is a usable number of seconds.
|
|
1110
|
+
*/
|
|
1106
1111
|
get retryAfter() {
|
|
1107
1112
|
const v = this.bodyObject()["retry_after"];
|
|
1108
1113
|
const n = typeof v === "string" ? v.trim() === "" ? NaN : Number(v) : v;
|
|
1109
|
-
|
|
1114
|
+
if (typeof n === "number" && Number.isFinite(n) && n >= 0) return n;
|
|
1115
|
+
const h = this.retryAfterHeader?.trim();
|
|
1116
|
+
if (h && /^\d+(\.\d+)?$/.test(h)) return Number(h);
|
|
1117
|
+
return void 0;
|
|
1118
|
+
}
|
|
1119
|
+
/**
|
|
1120
|
+
* True when INVO refused the call for going over a rate limit (additive, 3.31.0): `error_code`
|
|
1121
|
+
* `"RATE_LIMITED"` (every rate-limit 429 carries it since 2026-10-20), or any other 429 (an
|
|
1122
|
+
* older release, or an endpoint with its own throttle body). Wait {@link retryAfter} seconds
|
|
1123
|
+
* and send the same request again. Branch on this, not on the message.
|
|
1124
|
+
*/
|
|
1125
|
+
get isRateLimited() {
|
|
1126
|
+
return this.code === "RATE_LIMITED" || this.code === "rate_limited" || this.status === 429;
|
|
1110
1127
|
}
|
|
1111
1128
|
/** `body` as a plain object, or `{}` if it's a string/number/null (non-JSON responses).
|
|
1112
1129
|
* The `in` operator throws on primitives, so callers must go through this. */
|
|
@@ -1114,7 +1131,7 @@ var InvoError = class _InvoError extends Error {
|
|
|
1114
1131
|
return this.body && typeof this.body === "object" ? this.body : {};
|
|
1115
1132
|
}
|
|
1116
1133
|
};
|
|
1117
|
-
function errorFromResponse(status, body, requestId) {
|
|
1134
|
+
function errorFromResponse(status, body, requestId, retryAfterHeader) {
|
|
1118
1135
|
let message = `INVO request failed (HTTP ${status})`;
|
|
1119
1136
|
let code;
|
|
1120
1137
|
let rawCode;
|
|
@@ -1136,7 +1153,7 @@ function errorFromResponse(status, body, requestId) {
|
|
|
1136
1153
|
} else if (typeof body === "string" && body.trim()) {
|
|
1137
1154
|
message = body;
|
|
1138
1155
|
}
|
|
1139
|
-
return new InvoError({ message, code, rawCode, publicCode, status, body, requestId });
|
|
1156
|
+
return new InvoError({ message, code, rawCode, publicCode, status, body, requestId, retryAfterHeader });
|
|
1140
1157
|
}
|
|
1141
1158
|
|
|
1142
1159
|
// src/shared/http.ts
|
|
@@ -1270,7 +1287,7 @@ var _Http = class _Http {
|
|
|
1270
1287
|
requestId
|
|
1271
1288
|
});
|
|
1272
1289
|
if (!res.ok) {
|
|
1273
|
-
const err = errorFromResponse(res.status, parsed, requestId);
|
|
1290
|
+
const err = errorFromResponse(res.status, parsed, requestId, pickRetryAfterHeader(res.headers));
|
|
1274
1291
|
let wait;
|
|
1275
1292
|
if (idempotent && attempt < this.maxRetries && _Http.RETRIABLE_STATUS.has(res.status)) {
|
|
1276
1293
|
if (res.status === 429) {
|
|
@@ -1328,6 +1345,10 @@ function pickRequestId(headers) {
|
|
|
1328
1345
|
if (!headers || typeof headers.get !== "function") return void 0;
|
|
1329
1346
|
return headers.get("x-invo-request-id") ?? headers.get("x-request-id") ?? void 0;
|
|
1330
1347
|
}
|
|
1348
|
+
function pickRetryAfterHeader(headers) {
|
|
1349
|
+
if (!headers || typeof headers.get !== "function") return void 0;
|
|
1350
|
+
return headers.get("retry-after") ?? void 0;
|
|
1351
|
+
}
|
|
1331
1352
|
function retryAfterMs(parsed, headers) {
|
|
1332
1353
|
if (parsed && typeof parsed === "object") {
|
|
1333
1354
|
const v = parsed["retry_after"];
|
|
@@ -1619,7 +1640,7 @@ function toPhoneChangeRequest(raw) {
|
|
|
1619
1640
|
}
|
|
1620
1641
|
|
|
1621
1642
|
// src/version.ts
|
|
1622
|
-
var SDK_VERSION = "3.
|
|
1643
|
+
var SDK_VERSION = "3.31.0";
|
|
1623
1644
|
|
|
1624
1645
|
// src/payouts.ts
|
|
1625
1646
|
var AMOUNT = /^\d+(\.\d{1,2})?$/;
|
|
@@ -2317,9 +2338,17 @@ function toPlatformOrderStatus(raw, fallbackOrderId) {
|
|
|
2317
2338
|
paymentMethod: raw["payment_method"],
|
|
2318
2339
|
createdAt: raw["created_at"],
|
|
2319
2340
|
...receiptFields(raw),
|
|
2341
|
+
...feeSplitFields(raw),
|
|
2320
2342
|
raw
|
|
2321
2343
|
};
|
|
2322
2344
|
}
|
|
2345
|
+
function feeSplitFields(raw) {
|
|
2346
|
+
const out = {};
|
|
2347
|
+
const pick = (v) => v === null ? null : typeof v === "string" ? v : typeof v === "number" && Number.isFinite(v) ? v.toFixed(2) : null;
|
|
2348
|
+
if ("invo_fee_usd" in raw) out.invoFeeUsd = pick(raw["invo_fee_usd"]);
|
|
2349
|
+
if ("partner_share_usd" in raw) out.partnerShareUsd = pick(raw["partner_share_usd"]);
|
|
2350
|
+
return out;
|
|
2351
|
+
}
|
|
2323
2352
|
function nextCursorOf(raw) {
|
|
2324
2353
|
const c = raw["next_cursor"];
|
|
2325
2354
|
return typeof c === "string" && c ? c : null;
|
|
@@ -2639,7 +2668,8 @@ var PlatformCommerceServer = class {
|
|
|
2639
2668
|
};
|
|
2640
2669
|
}
|
|
2641
2670
|
/** Poll an order's status: `completed` (balance immediately; card after the webhook),
|
|
2642
|
-
* `pending_payment` (card awaiting confirmation), or `refunded`.
|
|
2671
|
+
* `pending_payment` (card awaiting confirmation), or `refunded`. Once the sale has settled,
|
|
2672
|
+
* `invoFeeUsd` / `partnerShareUsd` say what INVO kept and what you earned (additive). */
|
|
2643
2673
|
async getStatus(orderId, opts) {
|
|
2644
2674
|
if (orderId == null || String(orderId).trim() === "") {
|
|
2645
2675
|
throw invalidInput2("orderId", orderId, "is required");
|
package/dist/server.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { bt as ApproveWithDeviceCodeInput, bn as BeginDeviceApprovalInput, g as CallOptions, ae as CancelResult, ad as CancelSubscriptionOptions, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, ap as CardSetupInput, aq as CardSetupResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, bx as CardSetupStatus, af as ChangeAmountResult, by as CheckoutWarning, be as ClaimCurrencyInput, y as ClaimDelivery, bd as ClaimResult, bc as ClaimTransferInput, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, aR as ConfirmPaymentResult, aL as CreateCheckoutInput, aM as CreateCheckoutResult, a7 as CreateSubscriptionInput, bz as CurrencyBalance, aQ as CurrencyPurchaseQuote, bA as CurrencyPurchaseQuoteBreakdown, aP as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bB as DeviceApprovalChannel, bC as DeviceApprovalEnrollment, bD as DeviceApprovalFlow, bo as DeviceApprovalGrant, bq as DeviceApprovalPollResult, bE as DeviceApprovalPollStatus, bu as DeviceApprovalSettleResult, bF as DeviceEnrollmentDecision, bG as DeviceEnrollmentRespond, bH as ExpiryReason, bI as FeeTakenFrom, bJ as FirstCharge, bK as FirstChargeStatus, bL as FundingSource, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, bg as GuardianApprovalStatusResult, bM as InboundPendingItem, b7 as InboundPendingQuery, b8 as InboundPendingResult, aJ as InitiateResult, aI as InitiateSendInput, aK as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bN as LinkedIdentityEmail, ab as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bO as MinPurchaseWarning, az as MintPlayerTokenInput, aS as OrderDetailsResult, bP as PhoneChangeConfirmation, aH as PhoneChangeRequest, bQ as PhoneChangeRequestStatus, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bm as PhoneShareStatusResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, bR as PlatformPurchaseStatus, a5 as PlatformRefundInput, a6 as PlatformRefundResult, b4 as PlayerActivityEntry, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, bS as PlayerActivityType, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, at as PlayerCardsResult, aA as PlayerToken, bp as PollDeviceApprovalInput, aN as PurchaseInput, aZ as PurchaseItemInput, a_ as PurchaseItemResult, aO as PurchaseResult, Z as Rail, bT as RefundInitiation, bU as RefundPendingApproval, bV as RefundProcessingFeeBasis, bW as RefundReceipt, aj as RefundResult, bX as RefundRevenueShareAttribution, ai as RefundSubscriptionInput, bY as RefundWarning, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, au as SandboxClockResult, bZ as SandboxClockState, av as SandboxFailureOutcome, ax as SandboxForceAuthChallengeOptions, aw as SandboxForceFailureOptions, b_ as SavedCard, ay as ServerConfig, bh as ServerDestinationsQuery, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, bb as SmsVerifyResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, am as SteamFinalizeSubscriptionResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, al as SteamInitResult, b$ as SteamPack, aT as SteamPacksQuery, aU as SteamPacksResult, ak as SteamSubscriptionInitInput, c0 as SteamUserSession, c1 as Subscription, c2 as SubscriptionBaseInput, c3 as SubscriptionConsent, c4 as SubscriptionConsentInput, c5 as SubscriptionFundingRail, c6 as SubscriptionInterval, ac as SubscriptionListResult, a8 as SubscriptionResult, c7 as SubscriptionRevenueShare, c8 as SubscriptionRevenueShareInput, c9 as SubscriptionStatus, bf as TransactionStatusResult, ca as UnacknowledgedPurchaseOutcome, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, _ as VerificationMethod, cb as isRefundPendingApproval } from './types-
|
|
1
|
+
export { bt as ApproveWithDeviceCodeInput, bn as BeginDeviceApprovalInput, g as CallOptions, ae as CancelResult, ad as CancelSubscriptionOptions, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, ap as CardSetupInput, aq as CardSetupResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, bx as CardSetupStatus, af as ChangeAmountResult, by as CheckoutWarning, be as ClaimCurrencyInput, y as ClaimDelivery, bd as ClaimResult, bc as ClaimTransferInput, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, aR as ConfirmPaymentResult, aL as CreateCheckoutInput, aM as CreateCheckoutResult, a7 as CreateSubscriptionInput, bz as CurrencyBalance, aQ as CurrencyPurchaseQuote, bA as CurrencyPurchaseQuoteBreakdown, aP as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bB as DeviceApprovalChannel, bC as DeviceApprovalEnrollment, bD as DeviceApprovalFlow, bo as DeviceApprovalGrant, bq as DeviceApprovalPollResult, bE as DeviceApprovalPollStatus, bu as DeviceApprovalSettleResult, bF as DeviceEnrollmentDecision, bG as DeviceEnrollmentRespond, bH as ExpiryReason, bI as FeeTakenFrom, bJ as FirstCharge, bK as FirstChargeStatus, bL as FundingSource, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, bg as GuardianApprovalStatusResult, bM as InboundPendingItem, b7 as InboundPendingQuery, b8 as InboundPendingResult, aJ as InitiateResult, aI as InitiateSendInput, aK as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bN as LinkedIdentityEmail, ab as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bO as MinPurchaseWarning, az as MintPlayerTokenInput, aS as OrderDetailsResult, bP as PhoneChangeConfirmation, aH as PhoneChangeRequest, bQ as PhoneChangeRequestStatus, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bm as PhoneShareStatusResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, bR as PlatformPurchaseStatus, a5 as PlatformRefundInput, a6 as PlatformRefundResult, b4 as PlayerActivityEntry, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, bS as PlayerActivityType, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, at as PlayerCardsResult, aA as PlayerToken, bp as PollDeviceApprovalInput, aN as PurchaseInput, aZ as PurchaseItemInput, a_ as PurchaseItemResult, aO as PurchaseResult, Z as Rail, bT as RefundInitiation, bU as RefundPendingApproval, bV as RefundProcessingFeeBasis, bW as RefundReceipt, aj as RefundResult, bX as RefundRevenueShareAttribution, ai as RefundSubscriptionInput, bY as RefundWarning, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, au as SandboxClockResult, bZ as SandboxClockState, av as SandboxFailureOutcome, ax as SandboxForceAuthChallengeOptions, aw as SandboxForceFailureOptions, b_ as SavedCard, ay as ServerConfig, bh as ServerDestinationsQuery, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, bb as SmsVerifyResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, am as SteamFinalizeSubscriptionResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, al as SteamInitResult, b$ as SteamPack, aT as SteamPacksQuery, aU as SteamPacksResult, ak as SteamSubscriptionInitInput, c0 as SteamUserSession, c1 as Subscription, c2 as SubscriptionBaseInput, c3 as SubscriptionConsent, c4 as SubscriptionConsentInput, c5 as SubscriptionFundingRail, c6 as SubscriptionInterval, ac as SubscriptionListResult, a8 as SubscriptionResult, c7 as SubscriptionRevenueShare, c8 as SubscriptionRevenueShareInput, c9 as SubscriptionStatus, bf as TransactionStatusResult, ca as UnacknowledgedPurchaseOutcome, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, _ as VerificationMethod, cb as isRefundPendingApproval } from './types-CBanzneD.cjs';
|
|
2
2
|
export { G as GameEventType, R as ReportGameEventInput, a as ReportGameEventResult, b as ReportServerGameEventInput } from './loyalty-events-CmDw2ZoR.cjs';
|
|
3
|
-
export { C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, c as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, d as InvoWebhookEvent, e as ItemPurchasedData, L as ListPayeesQuery, f as ListPayeesResult, g as ListPayoutsQuery, h as ListPayoutsResult, P as PRODUCTION_BASE_URL, j as PayableBlocker, k as Payee, l as PayeeInvite, m as PayeeStatus, n as PayeeStatusChangedData, o as Payout, p as PayoutStatus, q as PayoutStatusChangedData, s as PayoutsServer, t as PlatformCommercePurchasedData, u as PlatformCommerceRefundedData, w as PlatformCommerceServer, x as PlayerPhoneChangedData, y as PurchaseCompletedData, z as PurchaseEventData, R as RegisterPayeeInput, A as RegisterPayeeResult, B as RequestPayoutInput, F as RequestPayoutResult, G as ReturnReasonCode, S as SANDBOX_BASE_URL, H as SandboxServer, J as SandboxSubscriptionsServer, K as SubscriptionAuthenticationRequiredData, M as SubscriptionCanceledData, N as SubscriptionEventCommon, O as SubscriptionExpiredData, Q as SubscriptionPastDueData, T as SubscriptionPaymentFailedData, U as SubscriptionRefundApprovedData, V as SubscriptionRefundDetail, W as SubscriptionRefundRejectedData, X as SubscriptionRefundRequestData, Y as SubscriptionRefundedData, Z as SubscriptionRenewalFunding, _ as SubscriptionRenewalSplit, $ as SubscriptionRenewedData, a0 as SubscriptionRevenueShareAttribution, a1 as SubscriptionTrialEventFields, a2 as SubscriptionsServer, a3 as TransferEventData, a4 as VerifyWebhookOptions, a5 as WebhookHandlerOptions, b as baseUrlForKey, a6 as createWebhookHandler, i as isDemoKey, r as resolveEnvironment, a7 as verifyWebhook, a8 as verifyWebhookAsync } from './server-
|
|
4
|
-
export { S as SDK_VERSION } from './version-
|
|
3
|
+
export { C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, c as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, d as InvoWebhookEvent, e as ItemPurchasedData, L as ListPayeesQuery, f as ListPayeesResult, g as ListPayoutsQuery, h as ListPayoutsResult, P as PRODUCTION_BASE_URL, j as PayableBlocker, k as Payee, l as PayeeInvite, m as PayeeStatus, n as PayeeStatusChangedData, o as Payout, p as PayoutStatus, q as PayoutStatusChangedData, s as PayoutsServer, t as PlatformCommercePurchasedData, u as PlatformCommerceRefundedData, w as PlatformCommerceServer, x as PlayerPhoneChangedData, y as PurchaseCompletedData, z as PurchaseEventData, R as RegisterPayeeInput, A as RegisterPayeeResult, B as RequestPayoutInput, F as RequestPayoutResult, G as ReturnReasonCode, S as SANDBOX_BASE_URL, H as SandboxServer, J as SandboxSubscriptionsServer, K as SubscriptionAuthenticationRequiredData, M as SubscriptionCanceledData, N as SubscriptionEventCommon, O as SubscriptionExpiredData, Q as SubscriptionPastDueData, T as SubscriptionPaymentFailedData, U as SubscriptionRefundApprovedData, V as SubscriptionRefundDetail, W as SubscriptionRefundRejectedData, X as SubscriptionRefundRequestData, Y as SubscriptionRefundedData, Z as SubscriptionRenewalFunding, _ as SubscriptionRenewalSplit, $ as SubscriptionRenewedData, a0 as SubscriptionRevenueShareAttribution, a1 as SubscriptionTrialEventFields, a2 as SubscriptionsServer, a3 as TransferEventData, a4 as VerifyWebhookOptions, a5 as WebhookHandlerOptions, b as baseUrlForKey, a6 as createWebhookHandler, i as isDemoKey, r as resolveEnvironment, a7 as verifyWebhook, a8 as verifyWebhookAsync } from './server-D9bKfiY6.cjs';
|
|
4
|
+
export { S as SDK_VERSION } from './version-B4Eincjj.cjs';
|
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { bt as ApproveWithDeviceCodeInput, bn as BeginDeviceApprovalInput, g as CallOptions, ae as CancelResult, ad as CancelSubscriptionOptions, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, ap as CardSetupInput, aq as CardSetupResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, bx as CardSetupStatus, af as ChangeAmountResult, by as CheckoutWarning, be as ClaimCurrencyInput, y as ClaimDelivery, bd as ClaimResult, bc as ClaimTransferInput, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, aR as ConfirmPaymentResult, aL as CreateCheckoutInput, aM as CreateCheckoutResult, a7 as CreateSubscriptionInput, bz as CurrencyBalance, aQ as CurrencyPurchaseQuote, bA as CurrencyPurchaseQuoteBreakdown, aP as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bB as DeviceApprovalChannel, bC as DeviceApprovalEnrollment, bD as DeviceApprovalFlow, bo as DeviceApprovalGrant, bq as DeviceApprovalPollResult, bE as DeviceApprovalPollStatus, bu as DeviceApprovalSettleResult, bF as DeviceEnrollmentDecision, bG as DeviceEnrollmentRespond, bH as ExpiryReason, bI as FeeTakenFrom, bJ as FirstCharge, bK as FirstChargeStatus, bL as FundingSource, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, bg as GuardianApprovalStatusResult, bM as InboundPendingItem, b7 as InboundPendingQuery, b8 as InboundPendingResult, aJ as InitiateResult, aI as InitiateSendInput, aK as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bN as LinkedIdentityEmail, ab as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bO as MinPurchaseWarning, az as MintPlayerTokenInput, aS as OrderDetailsResult, bP as PhoneChangeConfirmation, aH as PhoneChangeRequest, bQ as PhoneChangeRequestStatus, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bm as PhoneShareStatusResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, bR as PlatformPurchaseStatus, a5 as PlatformRefundInput, a6 as PlatformRefundResult, b4 as PlayerActivityEntry, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, bS as PlayerActivityType, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, at as PlayerCardsResult, aA as PlayerToken, bp as PollDeviceApprovalInput, aN as PurchaseInput, aZ as PurchaseItemInput, a_ as PurchaseItemResult, aO as PurchaseResult, Z as Rail, bT as RefundInitiation, bU as RefundPendingApproval, bV as RefundProcessingFeeBasis, bW as RefundReceipt, aj as RefundResult, bX as RefundRevenueShareAttribution, ai as RefundSubscriptionInput, bY as RefundWarning, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, au as SandboxClockResult, bZ as SandboxClockState, av as SandboxFailureOutcome, ax as SandboxForceAuthChallengeOptions, aw as SandboxForceFailureOptions, b_ as SavedCard, ay as ServerConfig, bh as ServerDestinationsQuery, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, bb as SmsVerifyResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, am as SteamFinalizeSubscriptionResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, al as SteamInitResult, b$ as SteamPack, aT as SteamPacksQuery, aU as SteamPacksResult, ak as SteamSubscriptionInitInput, c0 as SteamUserSession, c1 as Subscription, c2 as SubscriptionBaseInput, c3 as SubscriptionConsent, c4 as SubscriptionConsentInput, c5 as SubscriptionFundingRail, c6 as SubscriptionInterval, ac as SubscriptionListResult, a8 as SubscriptionResult, c7 as SubscriptionRevenueShare, c8 as SubscriptionRevenueShareInput, c9 as SubscriptionStatus, bf as TransactionStatusResult, ca as UnacknowledgedPurchaseOutcome, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, _ as VerificationMethod, cb as isRefundPendingApproval } from './types-
|
|
1
|
+
export { bt as ApproveWithDeviceCodeInput, bn as BeginDeviceApprovalInput, g as CallOptions, ae as CancelResult, ad as CancelSubscriptionOptions, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, ap as CardSetupInput, aq as CardSetupResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, bx as CardSetupStatus, af as ChangeAmountResult, by as CheckoutWarning, be as ClaimCurrencyInput, y as ClaimDelivery, bd as ClaimResult, bc as ClaimTransferInput, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, aR as ConfirmPaymentResult, aL as CreateCheckoutInput, aM as CreateCheckoutResult, a7 as CreateSubscriptionInput, bz as CurrencyBalance, aQ as CurrencyPurchaseQuote, bA as CurrencyPurchaseQuoteBreakdown, aP as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bB as DeviceApprovalChannel, bC as DeviceApprovalEnrollment, bD as DeviceApprovalFlow, bo as DeviceApprovalGrant, bq as DeviceApprovalPollResult, bE as DeviceApprovalPollStatus, bu as DeviceApprovalSettleResult, bF as DeviceEnrollmentDecision, bG as DeviceEnrollmentRespond, bH as ExpiryReason, bI as FeeTakenFrom, bJ as FirstCharge, bK as FirstChargeStatus, bL as FundingSource, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, bg as GuardianApprovalStatusResult, bM as InboundPendingItem, b7 as InboundPendingQuery, b8 as InboundPendingResult, aJ as InitiateResult, aI as InitiateSendInput, aK as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bN as LinkedIdentityEmail, ab as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bO as MinPurchaseWarning, az as MintPlayerTokenInput, aS as OrderDetailsResult, bP as PhoneChangeConfirmation, aH as PhoneChangeRequest, bQ as PhoneChangeRequestStatus, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bm as PhoneShareStatusResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, bR as PlatformPurchaseStatus, a5 as PlatformRefundInput, a6 as PlatformRefundResult, b4 as PlayerActivityEntry, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, bS as PlayerActivityType, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, at as PlayerCardsResult, aA as PlayerToken, bp as PollDeviceApprovalInput, aN as PurchaseInput, aZ as PurchaseItemInput, a_ as PurchaseItemResult, aO as PurchaseResult, Z as Rail, bT as RefundInitiation, bU as RefundPendingApproval, bV as RefundProcessingFeeBasis, bW as RefundReceipt, aj as RefundResult, bX as RefundRevenueShareAttribution, ai as RefundSubscriptionInput, bY as RefundWarning, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, au as SandboxClockResult, bZ as SandboxClockState, av as SandboxFailureOutcome, ax as SandboxForceAuthChallengeOptions, aw as SandboxForceFailureOptions, b_ as SavedCard, ay as ServerConfig, bh as ServerDestinationsQuery, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, bb as SmsVerifyResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, am as SteamFinalizeSubscriptionResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, al as SteamInitResult, b$ as SteamPack, aT as SteamPacksQuery, aU as SteamPacksResult, ak as SteamSubscriptionInitInput, c0 as SteamUserSession, c1 as Subscription, c2 as SubscriptionBaseInput, c3 as SubscriptionConsent, c4 as SubscriptionConsentInput, c5 as SubscriptionFundingRail, c6 as SubscriptionInterval, ac as SubscriptionListResult, a8 as SubscriptionResult, c7 as SubscriptionRevenueShare, c8 as SubscriptionRevenueShareInput, c9 as SubscriptionStatus, bf as TransactionStatusResult, ca as UnacknowledgedPurchaseOutcome, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, _ as VerificationMethod, cb as isRefundPendingApproval } from './types-CBanzneD.js';
|
|
2
2
|
export { G as GameEventType, R as ReportGameEventInput, a as ReportGameEventResult, b as ReportServerGameEventInput } from './loyalty-events-CmDw2ZoR.js';
|
|
3
|
-
export { C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, c as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, d as InvoWebhookEvent, e as ItemPurchasedData, L as ListPayeesQuery, f as ListPayeesResult, g as ListPayoutsQuery, h as ListPayoutsResult, P as PRODUCTION_BASE_URL, j as PayableBlocker, k as Payee, l as PayeeInvite, m as PayeeStatus, n as PayeeStatusChangedData, o as Payout, p as PayoutStatus, q as PayoutStatusChangedData, s as PayoutsServer, t as PlatformCommercePurchasedData, u as PlatformCommerceRefundedData, w as PlatformCommerceServer, x as PlayerPhoneChangedData, y as PurchaseCompletedData, z as PurchaseEventData, R as RegisterPayeeInput, A as RegisterPayeeResult, B as RequestPayoutInput, F as RequestPayoutResult, G as ReturnReasonCode, S as SANDBOX_BASE_URL, H as SandboxServer, J as SandboxSubscriptionsServer, K as SubscriptionAuthenticationRequiredData, M as SubscriptionCanceledData, N as SubscriptionEventCommon, O as SubscriptionExpiredData, Q as SubscriptionPastDueData, T as SubscriptionPaymentFailedData, U as SubscriptionRefundApprovedData, V as SubscriptionRefundDetail, W as SubscriptionRefundRejectedData, X as SubscriptionRefundRequestData, Y as SubscriptionRefundedData, Z as SubscriptionRenewalFunding, _ as SubscriptionRenewalSplit, $ as SubscriptionRenewedData, a0 as SubscriptionRevenueShareAttribution, a1 as SubscriptionTrialEventFields, a2 as SubscriptionsServer, a3 as TransferEventData, a4 as VerifyWebhookOptions, a5 as WebhookHandlerOptions, b as baseUrlForKey, a6 as createWebhookHandler, i as isDemoKey, r as resolveEnvironment, a7 as verifyWebhook, a8 as verifyWebhookAsync } from './server-
|
|
4
|
-
export { S as SDK_VERSION } from './version-
|
|
3
|
+
export { C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, c as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, d as InvoWebhookEvent, e as ItemPurchasedData, L as ListPayeesQuery, f as ListPayeesResult, g as ListPayoutsQuery, h as ListPayoutsResult, P as PRODUCTION_BASE_URL, j as PayableBlocker, k as Payee, l as PayeeInvite, m as PayeeStatus, n as PayeeStatusChangedData, o as Payout, p as PayoutStatus, q as PayoutStatusChangedData, s as PayoutsServer, t as PlatformCommercePurchasedData, u as PlatformCommerceRefundedData, w as PlatformCommerceServer, x as PlayerPhoneChangedData, y as PurchaseCompletedData, z as PurchaseEventData, R as RegisterPayeeInput, A as RegisterPayeeResult, B as RequestPayoutInput, F as RequestPayoutResult, G as ReturnReasonCode, S as SANDBOX_BASE_URL, H as SandboxServer, J as SandboxSubscriptionsServer, K as SubscriptionAuthenticationRequiredData, M as SubscriptionCanceledData, N as SubscriptionEventCommon, O as SubscriptionExpiredData, Q as SubscriptionPastDueData, T as SubscriptionPaymentFailedData, U as SubscriptionRefundApprovedData, V as SubscriptionRefundDetail, W as SubscriptionRefundRejectedData, X as SubscriptionRefundRequestData, Y as SubscriptionRefundedData, Z as SubscriptionRenewalFunding, _ as SubscriptionRenewalSplit, $ as SubscriptionRenewedData, a0 as SubscriptionRevenueShareAttribution, a1 as SubscriptionTrialEventFields, a2 as SubscriptionsServer, a3 as TransferEventData, a4 as VerifyWebhookOptions, a5 as WebhookHandlerOptions, b as baseUrlForKey, a6 as createWebhookHandler, i as isDemoKey, r as resolveEnvironment, a7 as verifyWebhook, a8 as verifyWebhookAsync } from './server-CaALJEML.js';
|
|
4
|
+
export { S as SDK_VERSION } from './version-B4Eincjj.js';
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { CardsServer, DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, PRODUCTION_BASE_URL, PayoutsServer, PlatformCommerceServer, SANDBOX_BASE_URL, SandboxServer, SandboxSubscriptionsServer, SubscriptionsServer, baseUrlForKey, createWebhookHandler, isDemoKey, isRefundPendingApproval, resolveEnvironment, verifyWebhook, verifyWebhookAsync } from './chunk-
|
|
2
|
-
export { SDK_VERSION } from './chunk-
|
|
3
|
-
export { InvoError } from './chunk-
|
|
1
|
+
export { CardsServer, DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, PRODUCTION_BASE_URL, PayoutsServer, PlatformCommerceServer, SANDBOX_BASE_URL, SandboxServer, SandboxSubscriptionsServer, SubscriptionsServer, baseUrlForKey, createWebhookHandler, isDemoKey, isRefundPendingApproval, resolveEnvironment, verifyWebhook, verifyWebhookAsync } from './chunk-UW66W2N6.js';
|
|
2
|
+
export { SDK_VERSION } from './chunk-CI7PHE6L.js';
|
|
3
|
+
export { InvoError } from './chunk-LMN2V4YT.js';
|
|
4
4
|
//# sourceMappingURL=server.js.map
|
|
5
5
|
//# sourceMappingURL=server.js.map
|
|
@@ -31,6 +31,11 @@ declare class InvoError extends Error {
|
|
|
31
31
|
readonly body: unknown;
|
|
32
32
|
/** Backend request id (from the response headers), when present — quote it in support tickets. */
|
|
33
33
|
readonly requestId: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The response's `Retry-After` header, as sent (additive, 3.31.0). Read {@link retryAfter}
|
|
36
|
+
* rather than this: it prefers the body's `retry_after` and falls back to this header.
|
|
37
|
+
*/
|
|
38
|
+
readonly retryAfterHeader: string | undefined;
|
|
34
39
|
constructor(args: {
|
|
35
40
|
message: string;
|
|
36
41
|
code?: string;
|
|
@@ -39,6 +44,7 @@ declare class InvoError extends Error {
|
|
|
39
44
|
status: number;
|
|
40
45
|
body?: unknown;
|
|
41
46
|
requestId?: string;
|
|
47
|
+
retryAfterHeader?: string;
|
|
42
48
|
});
|
|
43
49
|
/** True if this is the "recipient isn't passkey-enrolled, fall back to claim code" signal. */
|
|
44
50
|
get isReceiverNotEnrolled(): boolean;
|
|
@@ -822,8 +828,19 @@ declare class InvoError extends Error {
|
|
|
822
828
|
get isRewardUnavailable(): boolean;
|
|
823
829
|
/** True when the reward expired before it was redeemed (`vault_entry_expired`, 410). */
|
|
824
830
|
get isRewardExpired(): boolean;
|
|
825
|
-
/**
|
|
831
|
+
/**
|
|
832
|
+
* Seconds to wait before retrying, when the backend throttled the call: the body's
|
|
833
|
+
* `retry_after`, else the `Retry-After` header (seconds). Every INVO rate-limit 429 carries
|
|
834
|
+
* both (since 2026-10-20). `undefined` when neither is a usable number of seconds.
|
|
835
|
+
*/
|
|
826
836
|
get retryAfter(): number | undefined;
|
|
837
|
+
/**
|
|
838
|
+
* True when INVO refused the call for going over a rate limit (additive, 3.31.0): `error_code`
|
|
839
|
+
* `"RATE_LIMITED"` (every rate-limit 429 carries it since 2026-10-20), or any other 429 (an
|
|
840
|
+
* older release, or an endpoint with its own throttle body). Wait {@link retryAfter} seconds
|
|
841
|
+
* and send the same request again. Branch on this, not on the message.
|
|
842
|
+
*/
|
|
843
|
+
get isRateLimited(): boolean;
|
|
827
844
|
/** `body` as a plain object, or `{}` if it's a string/number/null (non-JSON responses).
|
|
828
845
|
* The `in` operator throws on primitives, so callers must go through this. */
|
|
829
846
|
private bodyObject;
|
|
@@ -1911,6 +1928,19 @@ interface PlatformOrderStatusResult {
|
|
|
1911
1928
|
* `receiptNumber` is.
|
|
1912
1929
|
*/
|
|
1913
1930
|
receiptUrl?: string;
|
|
1931
|
+
/**
|
|
1932
|
+
* Additive (2026-10-20): everything INVO kept on this sale, in USD, as a decimal string such
|
|
1933
|
+
* as `"0.50"`: the price less tax less {@link partnerShareUsd} (the card fee, and the
|
|
1934
|
+
* international card fee where it applies, on a card sale; the platform fee on a balance sale).
|
|
1935
|
+
* `null` until the sale has settled, or when the split cannot be read; `undefined` from an
|
|
1936
|
+
* INVO release that does not send it. A later refund or lost dispute does not change it.
|
|
1937
|
+
*/
|
|
1938
|
+
invoFeeUsd?: string | null;
|
|
1939
|
+
/**
|
|
1940
|
+
* Additive (2026-10-20): what you earned on this sale, in USD, as a decimal string. `null` and
|
|
1941
|
+
* `undefined` on the same terms as {@link invoFeeUsd}.
|
|
1942
|
+
*/
|
|
1943
|
+
partnerShareUsd?: string | null;
|
|
1914
1944
|
raw: Record<string, unknown>;
|
|
1915
1945
|
}
|
|
1916
1946
|
/** Input to `platformCommerce.getPurchaseHistory`. */
|
|
@@ -31,6 +31,11 @@ declare class InvoError extends Error {
|
|
|
31
31
|
readonly body: unknown;
|
|
32
32
|
/** Backend request id (from the response headers), when present — quote it in support tickets. */
|
|
33
33
|
readonly requestId: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The response's `Retry-After` header, as sent (additive, 3.31.0). Read {@link retryAfter}
|
|
36
|
+
* rather than this: it prefers the body's `retry_after` and falls back to this header.
|
|
37
|
+
*/
|
|
38
|
+
readonly retryAfterHeader: string | undefined;
|
|
34
39
|
constructor(args: {
|
|
35
40
|
message: string;
|
|
36
41
|
code?: string;
|
|
@@ -39,6 +44,7 @@ declare class InvoError extends Error {
|
|
|
39
44
|
status: number;
|
|
40
45
|
body?: unknown;
|
|
41
46
|
requestId?: string;
|
|
47
|
+
retryAfterHeader?: string;
|
|
42
48
|
});
|
|
43
49
|
/** True if this is the "recipient isn't passkey-enrolled, fall back to claim code" signal. */
|
|
44
50
|
get isReceiverNotEnrolled(): boolean;
|
|
@@ -822,8 +828,19 @@ declare class InvoError extends Error {
|
|
|
822
828
|
get isRewardUnavailable(): boolean;
|
|
823
829
|
/** True when the reward expired before it was redeemed (`vault_entry_expired`, 410). */
|
|
824
830
|
get isRewardExpired(): boolean;
|
|
825
|
-
/**
|
|
831
|
+
/**
|
|
832
|
+
* Seconds to wait before retrying, when the backend throttled the call: the body's
|
|
833
|
+
* `retry_after`, else the `Retry-After` header (seconds). Every INVO rate-limit 429 carries
|
|
834
|
+
* both (since 2026-10-20). `undefined` when neither is a usable number of seconds.
|
|
835
|
+
*/
|
|
826
836
|
get retryAfter(): number | undefined;
|
|
837
|
+
/**
|
|
838
|
+
* True when INVO refused the call for going over a rate limit (additive, 3.31.0): `error_code`
|
|
839
|
+
* `"RATE_LIMITED"` (every rate-limit 429 carries it since 2026-10-20), or any other 429 (an
|
|
840
|
+
* older release, or an endpoint with its own throttle body). Wait {@link retryAfter} seconds
|
|
841
|
+
* and send the same request again. Branch on this, not on the message.
|
|
842
|
+
*/
|
|
843
|
+
get isRateLimited(): boolean;
|
|
827
844
|
/** `body` as a plain object, or `{}` if it's a string/number/null (non-JSON responses).
|
|
828
845
|
* The `in` operator throws on primitives, so callers must go through this. */
|
|
829
846
|
private bodyObject;
|
|
@@ -1911,6 +1928,19 @@ interface PlatformOrderStatusResult {
|
|
|
1911
1928
|
* `receiptNumber` is.
|
|
1912
1929
|
*/
|
|
1913
1930
|
receiptUrl?: string;
|
|
1931
|
+
/**
|
|
1932
|
+
* Additive (2026-10-20): everything INVO kept on this sale, in USD, as a decimal string such
|
|
1933
|
+
* as `"0.50"`: the price less tax less {@link partnerShareUsd} (the card fee, and the
|
|
1934
|
+
* international card fee where it applies, on a card sale; the platform fee on a balance sale).
|
|
1935
|
+
* `null` until the sale has settled, or when the split cannot be read; `undefined` from an
|
|
1936
|
+
* INVO release that does not send it. A later refund or lost dispute does not change it.
|
|
1937
|
+
*/
|
|
1938
|
+
invoFeeUsd?: string | null;
|
|
1939
|
+
/**
|
|
1940
|
+
* Additive (2026-10-20): what you earned on this sale, in USD, as a decimal string. `null` and
|
|
1941
|
+
* `undefined` on the same terms as {@link invoFeeUsd}.
|
|
1942
|
+
*/
|
|
1943
|
+
partnerShareUsd?: string | null;
|
|
1914
1944
|
raw: Record<string, unknown>;
|
|
1915
1945
|
}
|
|
1916
1946
|
/** Input to `platformCommerce.getPurchaseHistory`. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@invonetwork/web-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.31.0",
|
|
4
4
|
"description": "INVO Web SDK — currency purchase, passkey (WebAuthn) verification, loyalty, and a drop-in game economy layer (wallet, shop, hosted checkout) for partner web platforms and browser games.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"private": false,
|