@invonetwork/web-sdk 3.37.0 → 3.37.1

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.37.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Documentation only; no code or behavior change. Phone-share, player registration and guardian approval now match the server:
8
+
9
+ - `registerPlayer`: `"created"` means new to your title and can mean joining the person's existing INVO wallet (same email and phone), so `identityId` is the same one other games see; the token fields are omitted when INVO cannot issue a token; `503 sdk_verification_disabled` is listed.
10
+ - `err.isPhoneShareRefused` / `err.isPhoneShareApprovalRequired`: the refusal is not a dead end. INVO creates an approval request and asks the phone's existing owner (by email when INVO has verified their address, otherwise by a text code); retry the same call once they approve. An INVO wallet created in the INVO app counts as an owner of its phone. `err.phoneShareLast4` is the last 4 digits as a string, absent on older servers.
11
+ - `PhoneShareApproveResult`: describes what the approve endpoint returns (`status`, `approved`, `approval_id`, `phone`, `approved_email`, `approved_at`); `alreadyApproved` and `expiresAt` are not sent by it. Approval is permanent; there is no revoke.
12
+ - README: who is a minor (INVO sets no minimum age; INVO support marks a wallet as a minor on request; `isMinor` reads it), what the guardian gates (cross-game transfers, sends, wallet-app moves; not coin or item purchases, not receiving) and the 15-minute window.
13
+
3
14
  ## 3.37.0
4
15
 
5
16
  ### Minor Changes
package/README.md CHANGED
@@ -211,7 +211,9 @@ An existing player's phone is **never changed** by this call. When it differs fr
211
211
  `phoneMismatch: true`. When the new phone is genuine, call
212
212
  `updatePlayerPhone({ playerEmail, newPhone })` to change it (see
213
213
  [Registering players and changing their phone](#registering-players-and-changing-their-phone)).
214
- A phone that already belongs to another email is a `409` (`err.isPhoneShareRefused`).
214
+ A phone that already belongs to another email is a `409` (`err.isPhoneShareRefused`): INVO asks the
215
+ phone's owner to approve, and the same call succeeds once they have (see
216
+ [Registering players and changing their phone](#registering-players-and-changing-their-phone)).
215
217
 
216
218
  If the player changed their number with INVO (a `player.phone_changed` webhook, or a
217
219
  `phoneMismatch` you did not cause), INVO's number is the current one: **never push the number
@@ -230,12 +232,29 @@ money routing keys off it:
230
232
  ### Registering players and changing their phone
231
233
 
232
234
  Two server calls, both authenticated with your game secret, neither moves money nor sends the
233
- player a message.
235
+ player a message. The one exception is a phone-share refusal (below): it contacts the phone's
236
+ **existing owner**, never the player you are registering.
234
237
 
235
238
  **`registerPlayer({ playerEmail, playerPhone, playerName? })`** creates the player in your
236
239
  title. It returns `status: "created"` (new) or `status: "exists"` (already in your title with
237
240
  that phone), the `identityId`, and a `playerToken` / `playerTokenExpiresAt` when INVO can issue
238
- one for your title, so you can hand the browser a token straight away.
241
+ one for your title, so you can hand the browser a token straight away. Both token fields are
242
+ omitted when INVO cannot issue a token, so check for them.
243
+
244
+ `"created"` means new to **your** title, not new to INVO. When the email and phone match an
245
+ existing INVO wallet (the person already uses INVO in another game, or in the INVO app), the
246
+ player joins that wallet: the `identityId` is derived from the email and phone, so it is the
247
+ same `identityId` other games see for that person. `registerPlayer` answers `503` with
248
+ `error: "sdk_verification_disabled"` while the SDK player routes are switched off.
249
+
250
+ **When the phone is held under a different email** (by a player in any game, or by an INVO
251
+ wallet, including one created in the INVO app that has no player in any game), the call is
252
+ refused with `409` `err.isPhoneShareRefused`. The refusal is not a dead end: INVO creates an
253
+ approval request and asks the phone's owner to approve (by email when INVO has verified their
254
+ address, otherwise by a text code; in the INVO app too when app notifications are on). Show
255
+ `err.message` (`err.phoneShareLast4` is the last 4 digits of the phone, when the server sends
256
+ it), then retry the same call once the owner approves: it succeeds. `phoneShareStatus` tells
257
+ you when. The approval is permanent and applies across the network.
239
258
 
240
259
  ```ts
241
260
  const reg = await invo.registerPlayer({
@@ -260,7 +279,7 @@ if (upd.identityRekeyed && upd.playerToken) handTokenToBrowser(upd.playerToken);
260
279
  | Refusal | HTTP | Means | Do |
261
280
  |---|---|---|---|
262
281
  | `err.isPhoneMismatch` (`PHONE_MISMATCH`) | 409 | `registerPlayer`: the player is already in your title with a **different** phone. Nothing changed. | Call `updatePlayerPhone` if the change is genuine. |
263
- | `err.isPhoneShareRefused` (`PHONE_SHARE_APPROVAL_REQUIRED`) | 409 | The phone belongs to another email. Nothing was created or changed. Same code as `err.isPhoneShareApprovalRequired`. | Show `err.message`; ask the player to check the number. |
282
+ | `err.isPhoneShareRefused` (`PHONE_SHARE_APPROVAL_REQUIRED`) | 409 | The phone is held under another email (a player or an INVO wallet). No player was created or changed, but INVO created an approval request and asked the phone's owner to approve. Same code as `err.isPhoneShareApprovalRequired`. | Show `err.message` (`err.phoneShareLast4` names the number); retry the same call once the owner approves (poll `phoneShareStatus`). |
264
283
  | `err.isPhoneChangeRequiresVerification` (`PHONE_CHANGE_REQUIRES_VERIFICATION`) | 409 | `updatePlayerPhone`: the player has secured this account, so the change needs the player's own confirmation. Nothing changed. `err.changeRequestEndpoint` names the route to use instead. | Call `requestPhoneChange` (see [Player-confirmed phone change](#player-confirmed-phone-change)). |
265
284
  | `err.isPlayerNotFound` | 404 | `updatePlayerPhone` (or `mintPlayerToken` without `playerPhone`): no player with that email in your title. | Create the player first (`registerPlayer`). |
266
285
  | `INVALID_INPUT` / `INVALID_PHONE` | 400 | A missing email or phone, or a phone INVO does not accept. | Fix the input. The SDK also refuses a non-E.164 phone before the network (`status === 0`). |
@@ -268,6 +287,7 @@ if (upd.identityRekeyed && upd.playerToken) handTokenToBrowser(upd.playerToken);
268
287
  | `err.isPendingTransfersToOldPhone` (`PENDING_TRANSFERS_TO_OLD_PHONE`) | 409 | `updatePlayerPhone`: sends or transfers to the player's current number are still waiting to be collected; changing the number now would strand them. Nothing changed. | Ask the player to collect them first (or wait until they expire), then retry. |
269
288
  | `err.isPendingTransfersToNewPhone` (`PENDING_TRANSFERS_TO_NEW_PHONE`) | 409 | `updatePlayerPhone`: sends or transfers to the new number are still waiting to be collected. Nothing changed. | Retry after they are collected or expire. |
270
289
  | `PHONE_UPDATE_UNAVAILABLE` | 503 | `updatePlayerPhone` could not be checked right now. Nothing changed. | Try again shortly. |
290
+ | `sdk_verification_disabled` (in `error`) | 503 | The SDK player routes are switched off in this environment. Nothing changed. | Retry later. |
271
291
 
272
292
  ### Player-confirmed phone change
273
293
 
@@ -1868,12 +1888,19 @@ try {
1868
1888
  sender is as before; what's new is that the sender gets an email and the recipient a single
1869
1889
  text saying the currency was returned, instead of silence. `transfer.claim_expired` +
1870
1890
  `transfer.refunded` remain the source of truth — reconcile off those, not the messages.
1871
- - **`err.isPhoneShareApprovalRequired` on `confirmReceipt*` / `claimTransfer` / `claimCurrency`** (409): the receiver phone is contested, so INVO **holds the money** and texts the phone owner to approve. Not a failure — show `err.message` verbatim (`err.phoneShareLast4` names the phone), then **retry the same call** once approved (it succeeds idempotently); on denial/expiry the sender is refunded. Same handling as the initiate-time phone-share 409.
1891
+ - **`err.isPhoneShareApprovalRequired` on `confirmReceipt*` / `claimTransfer` / `claimCurrency`** (409): the receiver phone is contested, so INVO **holds the money** and asks the phone owner to approve (by email when INVO has verified their address, otherwise by text). Not a failure — show `err.message` verbatim (`err.phoneShareLast4` names the phone), then **retry the same call** once approved (it succeeds idempotently); on denial/expiry the sender is refunded. Same handling as the initiate-time phone-share 409.
1872
1892
  - **`err.isIdentityCheckUnavailable` on `confirmReceipt*` / `claimTransfer` / `claimCurrency`** (503, retryable): INVO could not check the claim just now. Nothing was moved; retry the same call after a few seconds.
1873
1893
  - **Both games must be Live.** `initiateSend`/`initiateTransfer` throw `403` if either side is still in testing, and the two cases are **deliberately separate** because the fix differs: `err.isSourceGameNotLive` is **your** game (self-serve — switch it to Live in the console under Game Settings → Status), `err.isTargetGameNotLive` is the **destination** game, usually owned by another developer, so you can't flip it — show `err.message` and steer the player elsewhere via `getDestinations`. `err.gameStatus` carries the current state. Don't merge these into one "not live" branch; it produces a "go fix it" button that leads nowhere half the time.
1874
1894
  - **Steam titles** (dark until a title is Steam-distributed): `initiateSend`/`initiateTransfer` can throw `err.isSteamValueNonTransferable` (moving more than the non-Steam balance to a non-Steam destination — show `err.message`, cap the amount at `err.steamTransferableMax`; `err.steamOriginAmount` is the Steam-locked portion) or `err.isNonSteamValueIntoSteamBlocked` (non-Steam value into a Steam title). Prevent both up front: `getDestinations` rows carry **`acceptsSteamOriginValue`** — disable non-Steam destinations for a player holding Steam-purchased currency. **This is a rule about currency moving between titles, not about spending.** A player can spend any balance on items in any title, Steam-distributed or not, including currency bought through Steam, so an item purchase never fails on origin and there is nothing to branch on there.
1875
1895
  - Transfer self-claim may be disabled for your tenant; if it is, surface the claim-code path instead.
1876
1896
  - **Holds:** an approve/claim can return an HTTP 202 hold instead of success — inspect `result.holdReason` (`"RISK_HOLD"`, `"GUARDIAN_APPROVAL_PENDING"`, and on confirm-receipt `"RECIPIENT_IDENTITY_PENDING"`); success has no `holdReason` (and `next: "pending_claim"`). Terminal guardian outcomes throw (`GUARDIAN_APPROVAL_REJECTED`/`_EXPIRED`).
1897
+ - **Who is a minor.** INVO sets no minimum age for a wallet; your game's own age policy applies. A wallet
1898
+ is marked as a minor, and linked to a guardian's wallet, only by INVO support on request; it is not
1899
+ inferred from other signals. `getLinkedIdentities().isMinor` reads the flag (server-only), but it can
1900
+ change at any time, so handle the 202 everywhere. A minor's cross-game transfers, sends and INVO
1901
+ wallet-app moves need the guardian; buying coins, buying items and receiving money do not. The
1902
+ guardian has 15 minutes: with no answer the request expires and the money does not move. A minor with
1903
+ no usable guardian is refused with `403` `GUARDIAN_REQUIRED`.
1877
1904
  - **Guardian approval goes by email first.** When a minor's initiate returns the 202, the guardian gets a
1878
1905
  signed, single-use link to a hosted INVO page with Approve / Decline — not a text. A reply-YES text goes
1879
1906
  out only when the guardian has no verified email or the email could not be delivered. The raw 202
@@ -1890,7 +1917,9 @@ try {
1890
1917
  - **Phone-share and recipient-identity consents use the same hosted page.** On `err.isPhoneShareApprovalRequired`
1891
1918
  the phone's existing owner gets an emailed link (Allow / Decline) when INVO has itself proven an address for
1892
1919
  them — at most three holders, one email per request — and the 409 body carries `consent_channel: "email"`;
1893
- the OTP text goes out instead only when no proven holder exists (`consent_channel: "sms"`). The
1920
+ the OTP text goes out instead only when no proven holder exists (`consent_channel: "sms"`). An INVO wallet
1921
+ created in the INVO app counts as a holder of its phone, so registering a different email with that phone
1922
+ needs the wallet owner's approval. The
1894
1923
  `RECIPIENT_IDENTITY_PENDING` hold emails the phone owner's oldest verified address the same way. **Nothing
1895
1924
  changes for you:** same 409 / 202 codes, same poll-and-retry, and the typed-code and in-app approves still work.
1896
1925
 
@@ -82,7 +82,11 @@ var InvoError = class _InvoError extends Error {
82
82
  * - registration/token-mint (phone already on another INVO account), and
83
83
  * - **claim + confirm-receipt** (`claimTransfer`/`claimCurrency`,
84
84
  * `confirmReceiptSend`/`confirmReceiptTransfer`) — the receiver phone is contested,
85
- * so INVO holds the money and texts the phone owner to approve.
85
+ * so INVO holds the money and asks the phone owner to approve.
86
+ *
87
+ * Either way the 409 has already created an approval request and contacted the phone's
88
+ * existing owner: by email when INVO has verified their address, otherwise by a text code
89
+ * (the body's `consent_channel` says which).
86
90
  *
87
91
  * NOT a failure. Show `err.message` verbatim (the backend supplies the user-facing text;
88
92
  * `phoneShareLast4` tells the UI which phone), keep the funds pending, and **retry the same
@@ -99,7 +103,8 @@ var InvoError = class _InvoError extends Error {
99
103
  const v = this.bodyObject()["approval_id"];
100
104
  return typeof v === "string" && v ? v : void 0;
101
105
  }
102
- /** Last 4 digits of the phone that must approve (`phone_last4`), for the UI message. */
106
+ /** Last 4 digits of the phone that must approve (`phone_last4`, a string such as `"4567"`),
107
+ * for the UI message. `undefined` when the body has none (an older server). */
103
108
  get phoneShareLast4() {
104
109
  const v = this.bodyObject()["phone_last4"];
105
110
  return typeof v === "string" && v ? v : void 0;
@@ -1072,7 +1077,10 @@ var InvoError = class _InvoError extends Error {
1072
1077
  /**
1073
1078
  * True when the phone you supplied belongs to another email
1074
1079
  * (`PHONE_SHARE_APPROVAL_REQUIRED`, 409) on `mintPlayerToken`, `registerPlayer` or
1075
- * `updatePlayerPhone`. Nothing was created or changed. The same condition as
1080
+ * `updatePlayerPhone`. The phone may be held by a player in any game or by an INVO wallet
1081
+ * (including one created in the INVO app). No player was created or changed, but INVO has
1082
+ * created an approval request and asked the phone's owner to approve; retry the same call
1083
+ * once they have and it succeeds. The same condition as
1076
1084
  * {@link isPhoneShareApprovalRequired}, named for these registration calls.
1077
1085
  */
1078
1086
  get isPhoneShareRefused() {
@@ -1897,5 +1905,5 @@ function toApprovePhoneChangeResult(raw, changeRequestId) {
1897
1905
  }
1898
1906
 
1899
1907
  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 };
1900
- //# sourceMappingURL=chunk-KWAUFFDY.js.map
1901
- //# sourceMappingURL=chunk-KWAUFFDY.js.map
1908
+ //# sourceMappingURL=chunk-I4GDKZFL.js.map
1909
+ //# sourceMappingURL=chunk-I4GDKZFL.js.map
@@ -0,0 +1,6 @@
1
+ // src/version.ts
2
+ var SDK_VERSION = "3.37.1";
3
+
4
+ export { SDK_VERSION };
5
+ //# sourceMappingURL=chunk-OYJUX2TH.js.map
6
+ //# sourceMappingURL=chunk-OYJUX2TH.js.map
@@ -1,4 +1,4 @@
1
- import { InvoError, assertSecureBaseUrl, Http, toPurchaseStatusResult, toPhoneChangeApprovalsResult, phoneChangeSignalMessage, toApprovePhoneChangeResult, toDestinationsResult, toLoyaltyCardsResult, toLoyaltyVaultResult, toRedeemRewardResult, toRewardsPageLink, buildGameEventBody, toReportGameEventResult } from './chunk-KWAUFFDY.js';
1
+ import { InvoError, assertSecureBaseUrl, Http, toPurchaseStatusResult, toPhoneChangeApprovalsResult, phoneChangeSignalMessage, toApprovePhoneChangeResult, toDestinationsResult, toLoyaltyCardsResult, toLoyaltyVaultResult, toRedeemRewardResult, toRewardsPageLink, buildGameEventBody, toReportGameEventResult } from './chunk-I4GDKZFL.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-AUHRMREF.js.map
1590
- //# sourceMappingURL=chunk-AUHRMREF.js.map
1589
+ //# sourceMappingURL=chunk-QD5G355J.js.map
1590
+ //# sourceMappingURL=chunk-QD5G355J.js.map
@@ -1,5 +1,5 @@
1
- import { SDK_VERSION } from './chunk-MENRG67H.js';
2
- import { InvoError, assertSecureBaseUrl, Http, toRequestPhoneChangeResult, toPhoneChangeRequest, toPurchaseStatusResult, receiptFields, creditFields, toLoyaltyCardsResult, buildGameEventBody, toReportGameEventResult, toDestinationsResult } from './chunk-KWAUFFDY.js';
1
+ import { SDK_VERSION } from './chunk-OYJUX2TH.js';
2
+ import { InvoError, assertSecureBaseUrl, Http, toRequestPhoneChangeResult, toPhoneChangeRequest, toPurchaseStatusResult, receiptFields, creditFields, toLoyaltyCardsResult, buildGameEventBody, toReportGameEventResult, toDestinationsResult } from './chunk-I4GDKZFL.js';
3
3
  import { createHmac, timingSafeEqual } from 'crypto';
4
4
 
5
5
  // src/shared/apple.ts
@@ -2558,11 +2558,16 @@ var InvoServer = class {
2558
2558
  * Create a player in your game without moving money (`POST /api/sdk/players`), so a
2559
2559
  * first-time receiver can collect in-game. Sends no message to the player.
2560
2560
  *
2561
- * Returns `status: "created"` (new) or `"exists"` (already in your game with that
2562
- * phone), with a player token when INVO can issue one. Refusals: 409
2563
- * `err.isPhoneMismatch` (already in your game with a different phone; use
2564
- * `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the phone belongs to another
2565
- * email), 400 `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`).
2561
+ * Returns `status: "created"` (201, new to your game) or `"exists"` (200, already in
2562
+ * your game with that phone), with a player token when INVO can issue one (the token
2563
+ * fields are omitted otherwise). "created" can mean joining an existing INVO wallet:
2564
+ * the same email and phone as a wallet the person already has, so `identityId` is the
2565
+ * same one other games see. Refusals: 409 `err.isPhoneMismatch` (already in your game
2566
+ * with a different phone; use `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the
2567
+ * phone is held under another email, by a player or an INVO wallet: INVO asks the
2568
+ * phone's owner to approve, and the same call succeeds once they have), 400
2569
+ * `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`), 503
2570
+ * `sdk_verification_disabled` (the SDK player routes are switched off).
2566
2571
  */
2567
2572
  async registerPlayer(input, opts) {
2568
2573
  if (typeof input.playerEmail !== "string" || !input.playerEmail.trim()) {
@@ -3738,7 +3743,9 @@ var InvoServer = class {
3738
3743
  *
3739
3744
  * These three endpoints are UNAUTHENTICATED (phone-owner-driven: no game secret,
3740
3745
  * no player token) — a partner backend relays the handshake. The triggering 409
3741
- * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`.
3746
+ * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`,
3747
+ * `phone_last4` and `consent_channel` (`"email"` when the owner was emailed a link,
3748
+ * so there is no code to collect; `"sms"` when a text code went out).
3742
3749
  *
3743
3750
  * `phoneShareInitiate` is the fallback OTP send (use when the 409 didn't already
3744
3751
  * dispatch a code). NOT idempotent — never auto-retried. OTP TTL ~10 min.
@@ -3761,10 +3768,11 @@ var InvoServer = class {
3761
3768
  return toPhoneShareInitiateResult(raw);
3762
3769
  }
3763
3770
  /**
3764
- * Approve a phone-share with the OTP the phone owner received. On success the grant
3765
- * is stored server-side, keyed by (phone, requesting_email) and auto-consumed — the
3766
- * caller simply RE-ISSUES the identical original request. UNAUTHENTICATED. NOT
3767
- * idempotent (attempts are counted) — never auto-retried.
3771
+ * Approve a phone-share with the OTP the phone owner received. On success the approval
3772
+ * is stored server-side, keyed by (phone, requesting_email), permanently and
3773
+ * network-wide (there is no revoke) — the caller simply RE-ISSUES the identical
3774
+ * original request. UNAUTHENTICATED. NOT idempotent (attempts are counted) — never
3775
+ * auto-retried.
3768
3776
  */
3769
3777
  async phoneShareApprove(input, opts) {
3770
3778
  if (typeof input.approvalId !== "string" || !input.approvalId.trim()) {
@@ -4118,5 +4126,5 @@ var InvoServer = class {
4118
4126
  };
4119
4127
 
4120
4128
  export { APPLE_FINISH_ERROR_CODES, CardsServer, DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, KeyEnvironmentMismatchError, LIVE_KEY_PREFIX, PRODUCTION_BASE_URL, PayoutsServer, PlatformCommerceServer, SANDBOX_BASE_URL, SandboxServer, SandboxSubscriptionsServer, SubscriptionsServer, TEST_KEY_PREFIX, assertKeyMatchesBaseUrl, assertKeyMatchesEnvironment, baseUrlForKey, createWebhookHandler, environmentForBaseUrl, environmentFromKeyPrefix, isAppleCreditPending, isDemoKey, isRefundPendingApproval, resolveEnvironment, shouldFinishAppleTransaction, verifyInvoSignature, verifyWebhook, verifyWebhookAsync };
4121
- //# sourceMappingURL=chunk-ZHEQAZLW.js.map
4122
- //# sourceMappingURL=chunk-ZHEQAZLW.js.map
4129
+ //# sourceMappingURL=chunk-YFNQKYUI.js.map
4130
+ //# sourceMappingURL=chunk-YFNQKYUI.js.map
@@ -256,7 +256,11 @@ var InvoError = class _InvoError extends Error {
256
256
  * - registration/token-mint (phone already on another INVO account), and
257
257
  * - **claim + confirm-receipt** (`claimTransfer`/`claimCurrency`,
258
258
  * `confirmReceiptSend`/`confirmReceiptTransfer`) — the receiver phone is contested,
259
- * so INVO holds the money and texts the phone owner to approve.
259
+ * so INVO holds the money and asks the phone owner to approve.
260
+ *
261
+ * Either way the 409 has already created an approval request and contacted the phone's
262
+ * existing owner: by email when INVO has verified their address, otherwise by a text code
263
+ * (the body's `consent_channel` says which).
260
264
  *
261
265
  * NOT a failure. Show `err.message` verbatim (the backend supplies the user-facing text;
262
266
  * `phoneShareLast4` tells the UI which phone), keep the funds pending, and **retry the same
@@ -273,7 +277,8 @@ var InvoError = class _InvoError extends Error {
273
277
  const v = this.bodyObject()["approval_id"];
274
278
  return typeof v === "string" && v ? v : void 0;
275
279
  }
276
- /** Last 4 digits of the phone that must approve (`phone_last4`), for the UI message. */
280
+ /** Last 4 digits of the phone that must approve (`phone_last4`, a string such as `"4567"`),
281
+ * for the UI message. `undefined` when the body has none (an older server). */
277
282
  get phoneShareLast4() {
278
283
  const v = this.bodyObject()["phone_last4"];
279
284
  return typeof v === "string" && v ? v : void 0;
@@ -1246,7 +1251,10 @@ var InvoError = class _InvoError extends Error {
1246
1251
  /**
1247
1252
  * True when the phone you supplied belongs to another email
1248
1253
  * (`PHONE_SHARE_APPROVAL_REQUIRED`, 409) on `mintPlayerToken`, `registerPlayer` or
1249
- * `updatePlayerPhone`. Nothing was created or changed. The same condition as
1254
+ * `updatePlayerPhone`. The phone may be held by a player in any game or by an INVO wallet
1255
+ * (including one created in the INVO app). No player was created or changed, but INVO has
1256
+ * created an approval request and asked the phone's owner to approve; retry the same call
1257
+ * once they have and it succeeds. The same condition as
1250
1258
  * {@link isPhoneShareApprovalRequired}, named for these registration calls.
1251
1259
  */
1252
1260
  get isPhoneShareRefused() {
@@ -2016,7 +2024,7 @@ function toPhoneChangeRequest(raw) {
2016
2024
  }
2017
2025
 
2018
2026
  // src/version.ts
2019
- var SDK_VERSION = "3.37.0";
2027
+ var SDK_VERSION = "3.37.1";
2020
2028
 
2021
2029
  // src/payouts.ts
2022
2030
  var AMOUNT = /^\d+(\.\d{1,2})?$/;
@@ -4263,11 +4271,16 @@ var InvoServer = class {
4263
4271
  * Create a player in your game without moving money (`POST /api/sdk/players`), so a
4264
4272
  * first-time receiver can collect in-game. Sends no message to the player.
4265
4273
  *
4266
- * Returns `status: "created"` (new) or `"exists"` (already in your game with that
4267
- * phone), with a player token when INVO can issue one. Refusals: 409
4268
- * `err.isPhoneMismatch` (already in your game with a different phone; use
4269
- * `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the phone belongs to another
4270
- * email), 400 `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`).
4274
+ * Returns `status: "created"` (201, new to your game) or `"exists"` (200, already in
4275
+ * your game with that phone), with a player token when INVO can issue one (the token
4276
+ * fields are omitted otherwise). "created" can mean joining an existing INVO wallet:
4277
+ * the same email and phone as a wallet the person already has, so `identityId` is the
4278
+ * same one other games see. Refusals: 409 `err.isPhoneMismatch` (already in your game
4279
+ * with a different phone; use `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the
4280
+ * phone is held under another email, by a player or an INVO wallet: INVO asks the
4281
+ * phone's owner to approve, and the same call succeeds once they have), 400
4282
+ * `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`), 503
4283
+ * `sdk_verification_disabled` (the SDK player routes are switched off).
4271
4284
  */
4272
4285
  async registerPlayer(input, opts) {
4273
4286
  if (typeof input.playerEmail !== "string" || !input.playerEmail.trim()) {
@@ -5443,7 +5456,9 @@ var InvoServer = class {
5443
5456
  *
5444
5457
  * These three endpoints are UNAUTHENTICATED (phone-owner-driven: no game secret,
5445
5458
  * no player token) — a partner backend relays the handshake. The triggering 409
5446
- * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`.
5459
+ * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`,
5460
+ * `phone_last4` and `consent_channel` (`"email"` when the owner was emailed a link,
5461
+ * so there is no code to collect; `"sms"` when a text code went out).
5447
5462
  *
5448
5463
  * `phoneShareInitiate` is the fallback OTP send (use when the 409 didn't already
5449
5464
  * dispatch a code). NOT idempotent — never auto-retried. OTP TTL ~10 min.
@@ -5466,10 +5481,11 @@ var InvoServer = class {
5466
5481
  return toPhoneShareInitiateResult(raw);
5467
5482
  }
5468
5483
  /**
5469
- * Approve a phone-share with the OTP the phone owner received. On success the grant
5470
- * is stored server-side, keyed by (phone, requesting_email) and auto-consumed — the
5471
- * caller simply RE-ISSUES the identical original request. UNAUTHENTICATED. NOT
5472
- * idempotent (attempts are counted) — never auto-retried.
5484
+ * Approve a phone-share with the OTP the phone owner received. On success the approval
5485
+ * is stored server-side, keyed by (phone, requesting_email), permanently and
5486
+ * network-wide (there is no revoke) — the caller simply RE-ISSUES the identical
5487
+ * original request. UNAUTHENTICATED. NOT idempotent (attempts are counted) — never
5488
+ * auto-retried.
5473
5489
  */
5474
5490
  async phoneShareApprove(input, opts) {
5475
5491
  if (typeof input.approvalId !== "string" || !input.approvalId.trim()) {
@@ -1,9 +1,9 @@
1
- import { I as InvoServer, a as InvoEnvironment } from './server-B9PtYZaM.cjs';
2
- export { D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, K as KeyEnvironmentMismatchError, L as LIVE_KEY_PREFIX, P as PRODUCTION_BASE_URL, S as SANDBOX_BASE_URL, T as TEST_KEY_PREFIX, b as baseUrlForKey, e as environmentForBaseUrl, c as environmentFromKeyPrefix, i as isDemoKey, r as resolveEnvironment, v as verifyInvoSignature } from './server-B9PtYZaM.cjs';
1
+ import { I as InvoServer, a as InvoEnvironment } from './server-BuByP1JU.cjs';
2
+ export { D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, K as KeyEnvironmentMismatchError, L as LIVE_KEY_PREFIX, P as PRODUCTION_BASE_URL, S as SANDBOX_BASE_URL, T as TEST_KEY_PREFIX, b as baseUrlForKey, e as environmentForBaseUrl, c as environmentFromKeyPrefix, i as isDemoKey, r as resolveEnvironment, v as verifyInvoSignature } from './server-BuByP1JU.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-BdKpJX93.cjs';
6
- export { S as SDK_VERSION } from './version-CuhMO-6s.cjs';
5
+ export { I as InvoError } from './types-IRNjMV47.cjs';
6
+ export { S as SDK_VERSION } from './version-BIHJFKuj.cjs';
7
7
  import './loyalty-events-CmDw2ZoR.cjs';
8
8
 
9
9
  interface StoredPlayer {
@@ -1,9 +1,9 @@
1
- import { I as InvoServer, a as InvoEnvironment } from './server-B7Pw1HMp.js';
2
- export { D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, K as KeyEnvironmentMismatchError, L as LIVE_KEY_PREFIX, P as PRODUCTION_BASE_URL, S as SANDBOX_BASE_URL, T as TEST_KEY_PREFIX, b as baseUrlForKey, e as environmentForBaseUrl, c as environmentFromKeyPrefix, i as isDemoKey, r as resolveEnvironment, v as verifyInvoSignature } from './server-B7Pw1HMp.js';
1
+ import { I as InvoServer, a as InvoEnvironment } from './server-DzczMA-z.js';
2
+ export { D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, K as KeyEnvironmentMismatchError, L as LIVE_KEY_PREFIX, P as PRODUCTION_BASE_URL, S as SANDBOX_BASE_URL, T as TEST_KEY_PREFIX, b as baseUrlForKey, e as environmentForBaseUrl, c as environmentFromKeyPrefix, i as isDemoKey, r as resolveEnvironment, v as verifyInvoSignature } from './server-DzczMA-z.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-BdKpJX93.js';
6
- export { S as SDK_VERSION } from './version-CuhMO-6s.js';
5
+ export { I as InvoError } from './types-IRNjMV47.js';
6
+ export { S as SDK_VERSION } from './version-BIHJFKuj.js';
7
7
  import './loyalty-events-CmDw2ZoR.js';
8
8
 
9
9
  interface StoredPlayer {
@@ -1,8 +1,8 @@
1
- import { isDemoKey, SANDBOX_BASE_URL, environmentFromKeyPrefix, assertKeyMatchesEnvironment, assertKeyMatchesBaseUrl, PRODUCTION_BASE_URL, InvoServer, resolveEnvironment, verifyWebhook } from './chunk-ZHEQAZLW.js';
2
- export { DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, KeyEnvironmentMismatchError, LIVE_KEY_PREFIX, PRODUCTION_BASE_URL, SANDBOX_BASE_URL, TEST_KEY_PREFIX, baseUrlForKey, environmentForBaseUrl, environmentFromKeyPrefix, isDemoKey, resolveEnvironment, verifyInvoSignature } from './chunk-ZHEQAZLW.js';
3
- export { SDK_VERSION } from './chunk-MENRG67H.js';
4
- import { InvoError } from './chunk-KWAUFFDY.js';
5
- export { InvoError } from './chunk-KWAUFFDY.js';
1
+ import { isDemoKey, SANDBOX_BASE_URL, environmentFromKeyPrefix, assertKeyMatchesEnvironment, assertKeyMatchesBaseUrl, PRODUCTION_BASE_URL, InvoServer, resolveEnvironment, verifyWebhook } from './chunk-YFNQKYUI.js';
2
+ export { DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, KeyEnvironmentMismatchError, LIVE_KEY_PREFIX, PRODUCTION_BASE_URL, SANDBOX_BASE_URL, TEST_KEY_PREFIX, baseUrlForKey, environmentForBaseUrl, environmentFromKeyPrefix, isDemoKey, resolveEnvironment, verifyInvoSignature } from './chunk-YFNQKYUI.js';
3
+ export { SDK_VERSION } from './chunk-OYJUX2TH.js';
4
+ import { InvoError } from './chunk-I4GDKZFL.js';
5
+ export { InvoError } from './chunk-I4GDKZFL.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
@@ -84,7 +84,11 @@ var InvoError = class _InvoError extends Error {
84
84
  * - registration/token-mint (phone already on another INVO account), and
85
85
  * - **claim + confirm-receipt** (`claimTransfer`/`claimCurrency`,
86
86
  * `confirmReceiptSend`/`confirmReceiptTransfer`) — the receiver phone is contested,
87
- * so INVO holds the money and texts the phone owner to approve.
87
+ * so INVO holds the money and asks the phone owner to approve.
88
+ *
89
+ * Either way the 409 has already created an approval request and contacted the phone's
90
+ * existing owner: by email when INVO has verified their address, otherwise by a text code
91
+ * (the body's `consent_channel` says which).
88
92
  *
89
93
  * NOT a failure. Show `err.message` verbatim (the backend supplies the user-facing text;
90
94
  * `phoneShareLast4` tells the UI which phone), keep the funds pending, and **retry the same
@@ -101,7 +105,8 @@ var InvoError = class _InvoError extends Error {
101
105
  const v = this.bodyObject()["approval_id"];
102
106
  return typeof v === "string" && v ? v : void 0;
103
107
  }
104
- /** Last 4 digits of the phone that must approve (`phone_last4`), for the UI message. */
108
+ /** Last 4 digits of the phone that must approve (`phone_last4`, a string such as `"4567"`),
109
+ * for the UI message. `undefined` when the body has none (an older server). */
105
110
  get phoneShareLast4() {
106
111
  const v = this.bodyObject()["phone_last4"];
107
112
  return typeof v === "string" && v ? v : void 0;
@@ -1074,7 +1079,10 @@ var InvoError = class _InvoError extends Error {
1074
1079
  /**
1075
1080
  * True when the phone you supplied belongs to another email
1076
1081
  * (`PHONE_SHARE_APPROVAL_REQUIRED`, 409) on `mintPlayerToken`, `registerPlayer` or
1077
- * `updatePlayerPhone`. Nothing was created or changed. The same condition as
1082
+ * `updatePlayerPhone`. The phone may be held by a player in any game or by an INVO wallet
1083
+ * (including one created in the INVO app). No player was created or changed, but INVO has
1084
+ * created an approval request and asked the phone's owner to approve; retry the same call
1085
+ * once they have and it succeeds. The same condition as
1078
1086
  * {@link isPhoneShareApprovalRequired}, named for these registration calls.
1079
1087
  */
1080
1088
  get isPhoneShareRefused() {
@@ -5017,7 +5025,7 @@ function mountInvoUI(container, economy, options = {}) {
5017
5025
  }
5018
5026
 
5019
5027
  // src/version.ts
5020
- var SDK_VERSION = "3.37.0";
5028
+ var SDK_VERSION = "3.37.1";
5021
5029
 
5022
5030
  exports.InvoGameEconomy = InvoGameEconomy;
5023
5031
  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-DS9gcCF5.cjs';
4
- import { D as DestinationGame, P as PendingCollectItem } from './types-BdKpJX93.cjs';
5
- export { S as SDK_VERSION } from './version-CuhMO-6s.cjs';
3
+ import { A as ApproveHostedResult } from './hosted-approval-CxWyQOfU.cjs';
4
+ import { D as DestinationGame, P as PendingCollectItem } from './types-IRNjMV47.cjs';
5
+ export { S as SDK_VERSION } from './version-BIHJFKuj.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-Dv462L4e.js';
4
- import { D as DestinationGame, P as PendingCollectItem } from './types-BdKpJX93.js';
5
- export { S as SDK_VERSION } from './version-CuhMO-6s.js';
3
+ import { A as ApproveHostedResult } from './hosted-approval-D-CGX-LO.js';
4
+ import { D as DestinationGame, P as PendingCollectItem } from './types-IRNjMV47.js';
5
+ export { S as SDK_VERSION } from './version-BIHJFKuj.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-AUHRMREF.js';
2
- export { SDK_VERSION } from './chunk-MENRG67H.js';
3
- import { newEventId } from './chunk-KWAUFFDY.js';
1
+ import { InvoClient } from './chunk-QD5G355J.js';
2
+ export { SDK_VERSION } from './chunk-OYJUX2TH.js';
3
+ import { newEventId } from './chunk-I4GDKZFL.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-BdKpJX93.cjs';
1
+ import { A as ApproveResult, j as ConfirmReceiptResult } from './types-IRNjMV47.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-BdKpJX93.js';
1
+ import { A as ApproveResult, j as ConfirmReceiptResult } from './types-IRNjMV47.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
@@ -84,7 +84,11 @@ var InvoError = class _InvoError extends Error {
84
84
  * - registration/token-mint (phone already on another INVO account), and
85
85
  * - **claim + confirm-receipt** (`claimTransfer`/`claimCurrency`,
86
86
  * `confirmReceiptSend`/`confirmReceiptTransfer`) — the receiver phone is contested,
87
- * so INVO holds the money and texts the phone owner to approve.
87
+ * so INVO holds the money and asks the phone owner to approve.
88
+ *
89
+ * Either way the 409 has already created an approval request and contacted the phone's
90
+ * existing owner: by email when INVO has verified their address, otherwise by a text code
91
+ * (the body's `consent_channel` says which).
88
92
  *
89
93
  * NOT a failure. Show `err.message` verbatim (the backend supplies the user-facing text;
90
94
  * `phoneShareLast4` tells the UI which phone), keep the funds pending, and **retry the same
@@ -101,7 +105,8 @@ var InvoError = class _InvoError extends Error {
101
105
  const v = this.bodyObject()["approval_id"];
102
106
  return typeof v === "string" && v ? v : void 0;
103
107
  }
104
- /** Last 4 digits of the phone that must approve (`phone_last4`), for the UI message. */
108
+ /** Last 4 digits of the phone that must approve (`phone_last4`, a string such as `"4567"`),
109
+ * for the UI message. `undefined` when the body has none (an older server). */
105
110
  get phoneShareLast4() {
106
111
  const v = this.bodyObject()["phone_last4"];
107
112
  return typeof v === "string" && v ? v : void 0;
@@ -1074,7 +1079,10 @@ var InvoError = class _InvoError extends Error {
1074
1079
  /**
1075
1080
  * True when the phone you supplied belongs to another email
1076
1081
  * (`PHONE_SHARE_APPROVAL_REQUIRED`, 409) on `mintPlayerToken`, `registerPlayer` or
1077
- * `updatePlayerPhone`. Nothing was created or changed. The same condition as
1082
+ * `updatePlayerPhone`. The phone may be held by a player in any game or by an INVO wallet
1083
+ * (including one created in the INVO app). No player was created or changed, but INVO has
1084
+ * created an approval request and asked the phone's owner to approve; retry the same call
1085
+ * once they have and it succeeds. The same condition as
1078
1086
  * {@link isPhoneShareApprovalRequired}, named for these registration calls.
1079
1087
  */
1080
1088
  get isPhoneShareRefused() {
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-BdKpJX93.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-BdKpJX93.cjs';
3
- import { a as ApproveHostedOptions, A as ApproveHostedResult } from './hosted-approval-DS9gcCF5.cjs';
4
- export { E as EnrollmentDecision, b as EnrollmentRespond, H as HostedApprovalStatus, c as HostedEnrollment, d as HostedEnrollmentInput, e as HostedFlow } from './hosted-approval-DS9gcCF5.cjs';
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-IRNjMV47.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-IRNjMV47.cjs';
3
+ import { a as ApproveHostedOptions, A as ApproveHostedResult } from './hosted-approval-CxWyQOfU.cjs';
4
+ export { E as EnrollmentDecision, b as EnrollmentRespond, H as HostedApprovalStatus, c as HostedEnrollment, d as HostedEnrollmentInput, e as HostedFlow } from './hosted-approval-CxWyQOfU.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-BdKpJX93.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-BdKpJX93.js';
3
- import { a as ApproveHostedOptions, A as ApproveHostedResult } from './hosted-approval-Dv462L4e.js';
4
- export { E as EnrollmentDecision, b as EnrollmentRespond, H as HostedApprovalStatus, c as HostedEnrollment, d as HostedEnrollmentInput, e as HostedFlow } from './hosted-approval-Dv462L4e.js';
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-IRNjMV47.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-IRNjMV47.js';
3
+ import { a as ApproveHostedOptions, A as ApproveHostedResult } from './hosted-approval-D-CGX-LO.js';
4
+ export { E as EnrollmentDecision, b as EnrollmentRespond, H as HostedApprovalStatus, c as HostedEnrollment, d as HostedEnrollmentInput, e as HostedFlow } from './hosted-approval-D-CGX-LO.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-AUHRMREF.js';
2
- export { InvoError, isPurchaseCredited, isPurchaseExpired, isPurchaseRefunded, isPurchaseRefused, nothingWasCharged, phoneChangeSignalMessage } from './chunk-KWAUFFDY.js';
1
+ export { CheckoutClient, InvoClient, PlatformCommerceClient } from './chunk-QD5G355J.js';
2
+ export { InvoError, isPurchaseCredited, isPurchaseExpired, isPurchaseRefunded, isPurchaseRefused, nothingWasCharged, phoneChangeSignalMessage } from './chunk-I4GDKZFL.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 ApplePurchaseResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, a3 as PlatformApprovalResult, a4 as PlatformOrderStatusResult, a5 as PlatformPurchaseHistoryQuery, a6 as PlatformPurchaseHistoryResult, a7 as PlatformRefundInput, a8 as PlatformRefundResult, a9 as CreateSubscriptionInput, aa as SubscriptionResult, ab as GetSubscriptionOptions, ac as GetSubscriptionResult, ad as ListSubscriptionsOptions, ae as SubscriptionListResult, af as CancelSubscriptionOptions, ag as CancelResult, ah as ChangeAmountResult, ai as SetPaymentMethodInput, aj as SetPaymentMethodResult, ak as RefundSubscriptionInput, al as RefundResult, am as SteamSubscriptionInitInput, an as SteamInitResult, ao as SteamFinalizeSubscriptionResult, ap as CardSetupSessionInput, aq as CardSetupSessionResult, ar as CardSetupInput, as as CardSetupResult, at as CardSetupConfirmInput, au as CardSetupConfirmResult, av as PlayerCardsResult, aw as SandboxClockResult, ax as SandboxFailureOutcome, ay as SandboxForceFailureOptions, az as SandboxForceAuthChallengeOptions, aA as ServerConfig, aB as MintPlayerTokenInput, aC as PlayerToken, aD as RegisterPlayerInput, aE as RegisterPlayerResult, aF as UpdatePlayerPhoneInput, aG as UpdatePlayerPhoneResult, aH as RequestPhoneChangeInput, aI as RequestPhoneChangeResult, aJ as PhoneChangeRequest, aK as InitiateSendInput, aL as InitiateResult, aM as InitiateTransferInput, aN as CreateCheckoutInput, aO as CreateCheckoutResult, a as PurchaseStatusResult, aP as PurchaseInput, aQ as PurchaseResult, aR as CurrencyPurchaseQuoteInput, aS as CurrencyPurchaseQuote, aT as ConfirmPaymentResult, aU as OrderDetailsResult, aV as SteamPacksQuery, aW as SteamPacksResult, aX as SteamInitPurchaseInput, aY as SteamInitPurchaseResult, aZ as SteamFinalizeInput, a_ as SteamFinalizeResult, a$ as AppleProductsResult, b0 as VerifyApplePurchaseInput, b1 as PurchaseItemInput, b2 as PurchaseItemResult, b3 as ItemHistoryQuery, b4 as ItemHistoryResult, b5 as ItemOrderQuery, b6 as PlayerActivityQuery, b7 as PlayerActivityResult, b8 as PlayerActivityEntry, b9 as PlayerBalanceQuery, ba as PlayerBalanceResult, q as LoyaltyCardsResult, bb as InboundPendingQuery, bc as InboundPendingResult, bd as LinkedIdentitiesQuery, be as LinkedIdentitiesResult, bf as SmsVerifyResult, bg as ClaimTransferInput, bh as ClaimResult, bi as ClaimCurrencyInput, bj as TransactionStatusResult, bk as GuardianApprovalStatusResult, bl as ServerDestinationsQuery, p as DestinationsResult, bm as PhoneShareContact, bn as PhoneShareInitiateResult, bo as PhoneShareApproveInput, bp as PhoneShareApproveResult, bq as PhoneShareStatusResult, br as BeginDeviceApprovalInput, bs as DeviceApprovalGrant, bt as PollDeviceApprovalInput, bu as DeviceApprovalPollResult, bv as ConfirmDeviceEnrollmentInput, bw as ConfirmDeviceEnrollmentResult, bx as ApproveWithDeviceCodeInput, by as DeviceApprovalSettleResult, bz as CompleteDeviceApprovalInput, bA as CompleteDeviceApprovalResult } from './types-BdKpJX93.cjs';
1
+ import { I as InvoError, H as Http, $ as AuthHeader, g as CallOptions, a0 as ApplePurchaseResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, a3 as PlatformApprovalResult, a4 as PlatformOrderStatusResult, a5 as PlatformPurchaseHistoryQuery, a6 as PlatformPurchaseHistoryResult, a7 as PlatformRefundInput, a8 as PlatformRefundResult, a9 as CreateSubscriptionInput, aa as SubscriptionResult, ab as GetSubscriptionOptions, ac as GetSubscriptionResult, ad as ListSubscriptionsOptions, ae as SubscriptionListResult, af as CancelSubscriptionOptions, ag as CancelResult, ah as ChangeAmountResult, ai as SetPaymentMethodInput, aj as SetPaymentMethodResult, ak as RefundSubscriptionInput, al as RefundResult, am as SteamSubscriptionInitInput, an as SteamInitResult, ao as SteamFinalizeSubscriptionResult, ap as CardSetupSessionInput, aq as CardSetupSessionResult, ar as CardSetupInput, as as CardSetupResult, at as CardSetupConfirmInput, au as CardSetupConfirmResult, av as PlayerCardsResult, aw as SandboxClockResult, ax as SandboxFailureOutcome, ay as SandboxForceFailureOptions, az as SandboxForceAuthChallengeOptions, aA as ServerConfig, aB as MintPlayerTokenInput, aC as PlayerToken, aD as RegisterPlayerInput, aE as RegisterPlayerResult, aF as UpdatePlayerPhoneInput, aG as UpdatePlayerPhoneResult, aH as RequestPhoneChangeInput, aI as RequestPhoneChangeResult, aJ as PhoneChangeRequest, aK as InitiateSendInput, aL as InitiateResult, aM as InitiateTransferInput, aN as CreateCheckoutInput, aO as CreateCheckoutResult, a as PurchaseStatusResult, aP as PurchaseInput, aQ as PurchaseResult, aR as CurrencyPurchaseQuoteInput, aS as CurrencyPurchaseQuote, aT as ConfirmPaymentResult, aU as OrderDetailsResult, aV as SteamPacksQuery, aW as SteamPacksResult, aX as SteamInitPurchaseInput, aY as SteamInitPurchaseResult, aZ as SteamFinalizeInput, a_ as SteamFinalizeResult, a$ as AppleProductsResult, b0 as VerifyApplePurchaseInput, b1 as PurchaseItemInput, b2 as PurchaseItemResult, b3 as ItemHistoryQuery, b4 as ItemHistoryResult, b5 as ItemOrderQuery, b6 as PlayerActivityQuery, b7 as PlayerActivityResult, b8 as PlayerActivityEntry, b9 as PlayerBalanceQuery, ba as PlayerBalanceResult, q as LoyaltyCardsResult, bb as InboundPendingQuery, bc as InboundPendingResult, bd as LinkedIdentitiesQuery, be as LinkedIdentitiesResult, bf as SmsVerifyResult, bg as ClaimTransferInput, bh as ClaimResult, bi as ClaimCurrencyInput, bj as TransactionStatusResult, bk as GuardianApprovalStatusResult, bl as ServerDestinationsQuery, p as DestinationsResult, bm as PhoneShareContact, bn as PhoneShareInitiateResult, bo as PhoneShareApproveInput, bp as PhoneShareApproveResult, bq as PhoneShareStatusResult, br as BeginDeviceApprovalInput, bs as DeviceApprovalGrant, bt as PollDeviceApprovalInput, bu as DeviceApprovalPollResult, bv as ConfirmDeviceEnrollmentInput, bw as ConfirmDeviceEnrollmentResult, bx as ApproveWithDeviceCodeInput, by as DeviceApprovalSettleResult, bz as CompleteDeviceApprovalInput, bA as CompleteDeviceApprovalResult } from './types-IRNjMV47.cjs';
2
2
  import { b as ReportServerGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.cjs';
3
- import './version-CuhMO-6s.cjs';
3
+ import './version-BIHJFKuj.cjs';
4
4
 
5
5
  /**
6
6
  * Pick the INVO environment from the game secret alone (3.28.0).
@@ -1811,11 +1811,16 @@ declare class InvoServer {
1811
1811
  * Create a player in your game without moving money (`POST /api/sdk/players`), so a
1812
1812
  * first-time receiver can collect in-game. Sends no message to the player.
1813
1813
  *
1814
- * Returns `status: "created"` (new) or `"exists"` (already in your game with that
1815
- * phone), with a player token when INVO can issue one. Refusals: 409
1816
- * `err.isPhoneMismatch` (already in your game with a different phone; use
1817
- * `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the phone belongs to another
1818
- * email), 400 `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`).
1814
+ * Returns `status: "created"` (201, new to your game) or `"exists"` (200, already in
1815
+ * your game with that phone), with a player token when INVO can issue one (the token
1816
+ * fields are omitted otherwise). "created" can mean joining an existing INVO wallet:
1817
+ * the same email and phone as a wallet the person already has, so `identityId` is the
1818
+ * same one other games see. Refusals: 409 `err.isPhoneMismatch` (already in your game
1819
+ * with a different phone; use `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the
1820
+ * phone is held under another email, by a player or an INVO wallet: INVO asks the
1821
+ * phone's owner to approve, and the same call succeeds once they have), 400
1822
+ * `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`), 503
1823
+ * `sdk_verification_disabled` (the SDK player routes are switched off).
1819
1824
  */
1820
1825
  registerPlayer(input: RegisterPlayerInput, opts?: CallOptions): Promise<RegisterPlayerResult>;
1821
1826
  /**
@@ -2254,17 +2259,20 @@ declare class InvoServer {
2254
2259
  *
2255
2260
  * These three endpoints are UNAUTHENTICATED (phone-owner-driven: no game secret,
2256
2261
  * no player token) — a partner backend relays the handshake. The triggering 409
2257
- * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`.
2262
+ * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`,
2263
+ * `phone_last4` and `consent_channel` (`"email"` when the owner was emailed a link,
2264
+ * so there is no code to collect; `"sms"` when a text code went out).
2258
2265
  *
2259
2266
  * `phoneShareInitiate` is the fallback OTP send (use when the 409 didn't already
2260
2267
  * dispatch a code). NOT idempotent — never auto-retried. OTP TTL ~10 min.
2261
2268
  */
2262
2269
  phoneShareInitiate(input: PhoneShareContact, opts?: CallOptions): Promise<PhoneShareInitiateResult>;
2263
2270
  /**
2264
- * Approve a phone-share with the OTP the phone owner received. On success the grant
2265
- * is stored server-side, keyed by (phone, requesting_email) and auto-consumed — the
2266
- * caller simply RE-ISSUES the identical original request. UNAUTHENTICATED. NOT
2267
- * idempotent (attempts are counted) — never auto-retried.
2271
+ * Approve a phone-share with the OTP the phone owner received. On success the approval
2272
+ * is stored server-side, keyed by (phone, requesting_email), permanently and
2273
+ * network-wide (there is no revoke) — the caller simply RE-ISSUES the identical
2274
+ * original request. UNAUTHENTICATED. NOT idempotent (attempts are counted) — never
2275
+ * auto-retried.
2268
2276
  */
2269
2277
  phoneShareApprove(input: PhoneShareApproveInput, opts?: CallOptions): Promise<PhoneShareApproveResult>;
2270
2278
  /**
@@ -1,6 +1,6 @@
1
- import { I as InvoError, H as Http, $ as AuthHeader, g as CallOptions, a0 as ApplePurchaseResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, a3 as PlatformApprovalResult, a4 as PlatformOrderStatusResult, a5 as PlatformPurchaseHistoryQuery, a6 as PlatformPurchaseHistoryResult, a7 as PlatformRefundInput, a8 as PlatformRefundResult, a9 as CreateSubscriptionInput, aa as SubscriptionResult, ab as GetSubscriptionOptions, ac as GetSubscriptionResult, ad as ListSubscriptionsOptions, ae as SubscriptionListResult, af as CancelSubscriptionOptions, ag as CancelResult, ah as ChangeAmountResult, ai as SetPaymentMethodInput, aj as SetPaymentMethodResult, ak as RefundSubscriptionInput, al as RefundResult, am as SteamSubscriptionInitInput, an as SteamInitResult, ao as SteamFinalizeSubscriptionResult, ap as CardSetupSessionInput, aq as CardSetupSessionResult, ar as CardSetupInput, as as CardSetupResult, at as CardSetupConfirmInput, au as CardSetupConfirmResult, av as PlayerCardsResult, aw as SandboxClockResult, ax as SandboxFailureOutcome, ay as SandboxForceFailureOptions, az as SandboxForceAuthChallengeOptions, aA as ServerConfig, aB as MintPlayerTokenInput, aC as PlayerToken, aD as RegisterPlayerInput, aE as RegisterPlayerResult, aF as UpdatePlayerPhoneInput, aG as UpdatePlayerPhoneResult, aH as RequestPhoneChangeInput, aI as RequestPhoneChangeResult, aJ as PhoneChangeRequest, aK as InitiateSendInput, aL as InitiateResult, aM as InitiateTransferInput, aN as CreateCheckoutInput, aO as CreateCheckoutResult, a as PurchaseStatusResult, aP as PurchaseInput, aQ as PurchaseResult, aR as CurrencyPurchaseQuoteInput, aS as CurrencyPurchaseQuote, aT as ConfirmPaymentResult, aU as OrderDetailsResult, aV as SteamPacksQuery, aW as SteamPacksResult, aX as SteamInitPurchaseInput, aY as SteamInitPurchaseResult, aZ as SteamFinalizeInput, a_ as SteamFinalizeResult, a$ as AppleProductsResult, b0 as VerifyApplePurchaseInput, b1 as PurchaseItemInput, b2 as PurchaseItemResult, b3 as ItemHistoryQuery, b4 as ItemHistoryResult, b5 as ItemOrderQuery, b6 as PlayerActivityQuery, b7 as PlayerActivityResult, b8 as PlayerActivityEntry, b9 as PlayerBalanceQuery, ba as PlayerBalanceResult, q as LoyaltyCardsResult, bb as InboundPendingQuery, bc as InboundPendingResult, bd as LinkedIdentitiesQuery, be as LinkedIdentitiesResult, bf as SmsVerifyResult, bg as ClaimTransferInput, bh as ClaimResult, bi as ClaimCurrencyInput, bj as TransactionStatusResult, bk as GuardianApprovalStatusResult, bl as ServerDestinationsQuery, p as DestinationsResult, bm as PhoneShareContact, bn as PhoneShareInitiateResult, bo as PhoneShareApproveInput, bp as PhoneShareApproveResult, bq as PhoneShareStatusResult, br as BeginDeviceApprovalInput, bs as DeviceApprovalGrant, bt as PollDeviceApprovalInput, bu as DeviceApprovalPollResult, bv as ConfirmDeviceEnrollmentInput, bw as ConfirmDeviceEnrollmentResult, bx as ApproveWithDeviceCodeInput, by as DeviceApprovalSettleResult, bz as CompleteDeviceApprovalInput, bA as CompleteDeviceApprovalResult } from './types-BdKpJX93.js';
1
+ import { I as InvoError, H as Http, $ as AuthHeader, g as CallOptions, a0 as ApplePurchaseResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, a3 as PlatformApprovalResult, a4 as PlatformOrderStatusResult, a5 as PlatformPurchaseHistoryQuery, a6 as PlatformPurchaseHistoryResult, a7 as PlatformRefundInput, a8 as PlatformRefundResult, a9 as CreateSubscriptionInput, aa as SubscriptionResult, ab as GetSubscriptionOptions, ac as GetSubscriptionResult, ad as ListSubscriptionsOptions, ae as SubscriptionListResult, af as CancelSubscriptionOptions, ag as CancelResult, ah as ChangeAmountResult, ai as SetPaymentMethodInput, aj as SetPaymentMethodResult, ak as RefundSubscriptionInput, al as RefundResult, am as SteamSubscriptionInitInput, an as SteamInitResult, ao as SteamFinalizeSubscriptionResult, ap as CardSetupSessionInput, aq as CardSetupSessionResult, ar as CardSetupInput, as as CardSetupResult, at as CardSetupConfirmInput, au as CardSetupConfirmResult, av as PlayerCardsResult, aw as SandboxClockResult, ax as SandboxFailureOutcome, ay as SandboxForceFailureOptions, az as SandboxForceAuthChallengeOptions, aA as ServerConfig, aB as MintPlayerTokenInput, aC as PlayerToken, aD as RegisterPlayerInput, aE as RegisterPlayerResult, aF as UpdatePlayerPhoneInput, aG as UpdatePlayerPhoneResult, aH as RequestPhoneChangeInput, aI as RequestPhoneChangeResult, aJ as PhoneChangeRequest, aK as InitiateSendInput, aL as InitiateResult, aM as InitiateTransferInput, aN as CreateCheckoutInput, aO as CreateCheckoutResult, a as PurchaseStatusResult, aP as PurchaseInput, aQ as PurchaseResult, aR as CurrencyPurchaseQuoteInput, aS as CurrencyPurchaseQuote, aT as ConfirmPaymentResult, aU as OrderDetailsResult, aV as SteamPacksQuery, aW as SteamPacksResult, aX as SteamInitPurchaseInput, aY as SteamInitPurchaseResult, aZ as SteamFinalizeInput, a_ as SteamFinalizeResult, a$ as AppleProductsResult, b0 as VerifyApplePurchaseInput, b1 as PurchaseItemInput, b2 as PurchaseItemResult, b3 as ItemHistoryQuery, b4 as ItemHistoryResult, b5 as ItemOrderQuery, b6 as PlayerActivityQuery, b7 as PlayerActivityResult, b8 as PlayerActivityEntry, b9 as PlayerBalanceQuery, ba as PlayerBalanceResult, q as LoyaltyCardsResult, bb as InboundPendingQuery, bc as InboundPendingResult, bd as LinkedIdentitiesQuery, be as LinkedIdentitiesResult, bf as SmsVerifyResult, bg as ClaimTransferInput, bh as ClaimResult, bi as ClaimCurrencyInput, bj as TransactionStatusResult, bk as GuardianApprovalStatusResult, bl as ServerDestinationsQuery, p as DestinationsResult, bm as PhoneShareContact, bn as PhoneShareInitiateResult, bo as PhoneShareApproveInput, bp as PhoneShareApproveResult, bq as PhoneShareStatusResult, br as BeginDeviceApprovalInput, bs as DeviceApprovalGrant, bt as PollDeviceApprovalInput, bu as DeviceApprovalPollResult, bv as ConfirmDeviceEnrollmentInput, bw as ConfirmDeviceEnrollmentResult, bx as ApproveWithDeviceCodeInput, by as DeviceApprovalSettleResult, bz as CompleteDeviceApprovalInput, bA as CompleteDeviceApprovalResult } from './types-IRNjMV47.js';
2
2
  import { b as ReportServerGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.js';
3
- import './version-CuhMO-6s.js';
3
+ import './version-BIHJFKuj.js';
4
4
 
5
5
  /**
6
6
  * Pick the INVO environment from the game secret alone (3.28.0).
@@ -1811,11 +1811,16 @@ declare class InvoServer {
1811
1811
  * Create a player in your game without moving money (`POST /api/sdk/players`), so a
1812
1812
  * first-time receiver can collect in-game. Sends no message to the player.
1813
1813
  *
1814
- * Returns `status: "created"` (new) or `"exists"` (already in your game with that
1815
- * phone), with a player token when INVO can issue one. Refusals: 409
1816
- * `err.isPhoneMismatch` (already in your game with a different phone; use
1817
- * `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the phone belongs to another
1818
- * email), 400 `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`).
1814
+ * Returns `status: "created"` (201, new to your game) or `"exists"` (200, already in
1815
+ * your game with that phone), with a player token when INVO can issue one (the token
1816
+ * fields are omitted otherwise). "created" can mean joining an existing INVO wallet:
1817
+ * the same email and phone as a wallet the person already has, so `identityId` is the
1818
+ * same one other games see. Refusals: 409 `err.isPhoneMismatch` (already in your game
1819
+ * with a different phone; use `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the
1820
+ * phone is held under another email, by a player or an INVO wallet: INVO asks the
1821
+ * phone's owner to approve, and the same call succeeds once they have), 400
1822
+ * `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`), 503
1823
+ * `sdk_verification_disabled` (the SDK player routes are switched off).
1819
1824
  */
1820
1825
  registerPlayer(input: RegisterPlayerInput, opts?: CallOptions): Promise<RegisterPlayerResult>;
1821
1826
  /**
@@ -2254,17 +2259,20 @@ declare class InvoServer {
2254
2259
  *
2255
2260
  * These three endpoints are UNAUTHENTICATED (phone-owner-driven: no game secret,
2256
2261
  * no player token) — a partner backend relays the handshake. The triggering 409
2257
- * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`.
2262
+ * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`,
2263
+ * `phone_last4` and `consent_channel` (`"email"` when the owner was emailed a link,
2264
+ * so there is no code to collect; `"sms"` when a text code went out).
2258
2265
  *
2259
2266
  * `phoneShareInitiate` is the fallback OTP send (use when the 409 didn't already
2260
2267
  * dispatch a code). NOT idempotent — never auto-retried. OTP TTL ~10 min.
2261
2268
  */
2262
2269
  phoneShareInitiate(input: PhoneShareContact, opts?: CallOptions): Promise<PhoneShareInitiateResult>;
2263
2270
  /**
2264
- * Approve a phone-share with the OTP the phone owner received. On success the grant
2265
- * is stored server-side, keyed by (phone, requesting_email) and auto-consumed — the
2266
- * caller simply RE-ISSUES the identical original request. UNAUTHENTICATED. NOT
2267
- * idempotent (attempts are counted) — never auto-retried.
2271
+ * Approve a phone-share with the OTP the phone owner received. On success the approval
2272
+ * is stored server-side, keyed by (phone, requesting_email), permanently and
2273
+ * network-wide (there is no revoke) — the caller simply RE-ISSUES the identical
2274
+ * original request. UNAUTHENTICATED. NOT idempotent (attempts are counted) — never
2275
+ * auto-retried.
2268
2276
  */
2269
2277
  phoneShareApprove(input: PhoneShareApproveInput, opts?: CallOptions): Promise<PhoneShareApproveResult>;
2270
2278
  /**
package/dist/server.cjs CHANGED
@@ -86,7 +86,11 @@ var InvoError = class _InvoError extends Error {
86
86
  * - registration/token-mint (phone already on another INVO account), and
87
87
  * - **claim + confirm-receipt** (`claimTransfer`/`claimCurrency`,
88
88
  * `confirmReceiptSend`/`confirmReceiptTransfer`) — the receiver phone is contested,
89
- * so INVO holds the money and texts the phone owner to approve.
89
+ * so INVO holds the money and asks the phone owner to approve.
90
+ *
91
+ * Either way the 409 has already created an approval request and contacted the phone's
92
+ * existing owner: by email when INVO has verified their address, otherwise by a text code
93
+ * (the body's `consent_channel` says which).
90
94
  *
91
95
  * NOT a failure. Show `err.message` verbatim (the backend supplies the user-facing text;
92
96
  * `phoneShareLast4` tells the UI which phone), keep the funds pending, and **retry the same
@@ -103,7 +107,8 @@ var InvoError = class _InvoError extends Error {
103
107
  const v = this.bodyObject()["approval_id"];
104
108
  return typeof v === "string" && v ? v : void 0;
105
109
  }
106
- /** Last 4 digits of the phone that must approve (`phone_last4`), for the UI message. */
110
+ /** Last 4 digits of the phone that must approve (`phone_last4`, a string such as `"4567"`),
111
+ * for the UI message. `undefined` when the body has none (an older server). */
107
112
  get phoneShareLast4() {
108
113
  const v = this.bodyObject()["phone_last4"];
109
114
  return typeof v === "string" && v ? v : void 0;
@@ -1076,7 +1081,10 @@ var InvoError = class _InvoError extends Error {
1076
1081
  /**
1077
1082
  * True when the phone you supplied belongs to another email
1078
1083
  * (`PHONE_SHARE_APPROVAL_REQUIRED`, 409) on `mintPlayerToken`, `registerPlayer` or
1079
- * `updatePlayerPhone`. Nothing was created or changed. The same condition as
1084
+ * `updatePlayerPhone`. The phone may be held by a player in any game or by an INVO wallet
1085
+ * (including one created in the INVO app). No player was created or changed, but INVO has
1086
+ * created an approval request and asked the phone's owner to approve; retry the same call
1087
+ * once they have and it succeeds. The same condition as
1080
1088
  * {@link isPhoneShareApprovalRequired}, named for these registration calls.
1081
1089
  */
1082
1090
  get isPhoneShareRefused() {
@@ -1889,7 +1897,7 @@ function toPhoneChangeRequest(raw) {
1889
1897
  }
1890
1898
 
1891
1899
  // src/version.ts
1892
- var SDK_VERSION = "3.37.0";
1900
+ var SDK_VERSION = "3.37.1";
1893
1901
 
1894
1902
  // src/payouts.ts
1895
1903
  var AMOUNT = /^\d+(\.\d{1,2})?$/;
@@ -4346,11 +4354,16 @@ var InvoServer = class {
4346
4354
  * Create a player in your game without moving money (`POST /api/sdk/players`), so a
4347
4355
  * first-time receiver can collect in-game. Sends no message to the player.
4348
4356
  *
4349
- * Returns `status: "created"` (new) or `"exists"` (already in your game with that
4350
- * phone), with a player token when INVO can issue one. Refusals: 409
4351
- * `err.isPhoneMismatch` (already in your game with a different phone; use
4352
- * `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the phone belongs to another
4353
- * email), 400 `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`).
4357
+ * Returns `status: "created"` (201, new to your game) or `"exists"` (200, already in
4358
+ * your game with that phone), with a player token when INVO can issue one (the token
4359
+ * fields are omitted otherwise). "created" can mean joining an existing INVO wallet:
4360
+ * the same email and phone as a wallet the person already has, so `identityId` is the
4361
+ * same one other games see. Refusals: 409 `err.isPhoneMismatch` (already in your game
4362
+ * with a different phone; use `updatePlayerPhone`), 409 `err.isPhoneShareRefused` (the
4363
+ * phone is held under another email, by a player or an INVO wallet: INVO asks the
4364
+ * phone's owner to approve, and the same call succeeds once they have), 400
4365
+ * `INVALID_INPUT` / `INVALID_PHONE`, 429 (`err.retryAfter`), 503
4366
+ * `sdk_verification_disabled` (the SDK player routes are switched off).
4354
4367
  */
4355
4368
  async registerPlayer(input, opts) {
4356
4369
  if (typeof input.playerEmail !== "string" || !input.playerEmail.trim()) {
@@ -5526,7 +5539,9 @@ var InvoServer = class {
5526
5539
  *
5527
5540
  * These three endpoints are UNAUTHENTICATED (phone-owner-driven: no game secret,
5528
5541
  * no player token) — a partner backend relays the handshake. The triggering 409
5529
- * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`.
5542
+ * carries `approval_id, expires_at, code_sent, existing_account_hints[], next_endpoint`,
5543
+ * `phone_last4` and `consent_channel` (`"email"` when the owner was emailed a link,
5544
+ * so there is no code to collect; `"sms"` when a text code went out).
5530
5545
  *
5531
5546
  * `phoneShareInitiate` is the fallback OTP send (use when the 409 didn't already
5532
5547
  * dispatch a code). NOT idempotent — never auto-retried. OTP TTL ~10 min.
@@ -5549,10 +5564,11 @@ var InvoServer = class {
5549
5564
  return toPhoneShareInitiateResult(raw);
5550
5565
  }
5551
5566
  /**
5552
- * Approve a phone-share with the OTP the phone owner received. On success the grant
5553
- * is stored server-side, keyed by (phone, requesting_email) and auto-consumed — the
5554
- * caller simply RE-ISSUES the identical original request. UNAUTHENTICATED. NOT
5555
- * idempotent (attempts are counted) — never auto-retried.
5567
+ * Approve a phone-share with the OTP the phone owner received. On success the approval
5568
+ * is stored server-side, keyed by (phone, requesting_email), permanently and
5569
+ * network-wide (there is no revoke) — the caller simply RE-ISSUES the identical
5570
+ * original request. UNAUTHENTICATED. NOT idempotent (attempts are counted) — never
5571
+ * auto-retried.
5556
5572
  */
5557
5573
  async phoneShareApprove(input, opts) {
5558
5574
  if (typeof input.approvalId !== "string" || !input.approvalId.trim()) {
package/dist/server.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { bB as AppleEnvironment, bC as AppleProduct, a$ as AppleProductsResult, a0 as ApplePurchaseResult, bD as ApplePurchaseStatus, bE as AppleUnavailableReason, bx as ApproveWithDeviceCodeInput, br as BeginDeviceApprovalInput, g as CallOptions, ag as CancelResult, af as CancelSubscriptionOptions, at as CardSetupConfirmInput, au as CardSetupConfirmResult, ar as CardSetupInput, as as CardSetupResult, ap as CardSetupSessionInput, aq as CardSetupSessionResult, bF as CardSetupStatus, ah as ChangeAmountResult, bG as CheckoutWarning, bi as ClaimCurrencyInput, y as ClaimDelivery, bh as ClaimResult, bg as ClaimTransferInput, bz as CompleteDeviceApprovalInput, bA as CompleteDeviceApprovalResult, bv as ConfirmDeviceEnrollmentInput, bw as ConfirmDeviceEnrollmentResult, aT as ConfirmPaymentResult, aN as CreateCheckoutInput, aO as CreateCheckoutResult, a9 as CreateSubscriptionInput, bH as CurrencyBalance, aS as CurrencyPurchaseQuote, bI as CurrencyPurchaseQuoteBreakdown, aR as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bJ as DeviceApprovalChannel, bK as DeviceApprovalEnrollment, bL as DeviceApprovalFlow, bs as DeviceApprovalGrant, bu as DeviceApprovalPollResult, bM as DeviceApprovalPollStatus, by as DeviceApprovalSettleResult, bN as DeviceEnrollmentDecision, bO as DeviceEnrollmentRespond, bP as ExpiryReason, bQ as FeeTakenFrom, bR as FirstCharge, bS as FirstChargeStatus, bT as FundingSource, ab as GetSubscriptionOptions, ac as GetSubscriptionResult, bk as GuardianApprovalStatusResult, bU as InboundPendingItem, bb as InboundPendingQuery, bc as InboundPendingResult, aL as InitiateResult, aK as InitiateSendInput, aM as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, b3 as ItemHistoryQuery, b4 as ItemHistoryResult, b5 as ItemOrderQuery, bd as LinkedIdentitiesQuery, be as LinkedIdentitiesResult, bV as LinkedIdentityEmail, ad as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bW as MinPurchaseWarning, aB as MintPlayerTokenInput, aU as OrderDetailsResult, bX as PhoneChangeConfirmation, aJ as PhoneChangeRequest, bY as PhoneChangeRequestStatus, bo as PhoneShareApproveInput, bp as PhoneShareApproveResult, bm as PhoneShareContact, bn as PhoneShareInitiateResult, bq as PhoneShareStatusResult, a3 as PlatformApprovalResult, a4 as PlatformOrderStatusResult, a5 as PlatformPurchaseHistoryQuery, a6 as PlatformPurchaseHistoryResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, bZ as PlatformPurchaseStatus, a7 as PlatformRefundInput, a8 as PlatformRefundResult, b8 as PlayerActivityEntry, b6 as PlayerActivityQuery, b7 as PlayerActivityResult, b_ as PlayerActivityType, b9 as PlayerBalanceQuery, ba as PlayerBalanceResult, av as PlayerCardsResult, aC as PlayerToken, bt as PollDeviceApprovalInput, aP as PurchaseInput, b1 as PurchaseItemInput, b2 as PurchaseItemResult, aQ as PurchaseResult, Z as Rail, b$ as RefundInitiation, c0 as RefundPendingApproval, c1 as RefundProcessingFeeBasis, c2 as RefundReceipt, al as RefundResult, c3 as RefundRevenueShareAttribution, ak as RefundSubscriptionInput, c4 as RefundWarning, aD as RegisterPlayerInput, aE as RegisterPlayerResult, aH as RequestPhoneChangeInput, aI as RequestPhoneChangeResult, aw as SandboxClockResult, c5 as SandboxClockState, ax as SandboxFailureOutcome, az as SandboxForceAuthChallengeOptions, ay as SandboxForceFailureOptions, c6 as SavedCard, aA as ServerConfig, bl as ServerDestinationsQuery, ai as SetPaymentMethodInput, aj as SetPaymentMethodResult, bf as SmsVerifyResult, aZ as SteamFinalizeInput, a_ as SteamFinalizeResult, ao as SteamFinalizeSubscriptionResult, aX as SteamInitPurchaseInput, aY as SteamInitPurchaseResult, an as SteamInitResult, c7 as SteamPack, aV as SteamPacksQuery, aW as SteamPacksResult, am as SteamSubscriptionInitInput, c8 as SteamUnavailableReason, c9 as SteamUserSession, ca as Subscription, cb as SubscriptionBaseInput, cc as SubscriptionConsent, cd as SubscriptionConsentInput, ce as SubscriptionFundingRail, cf as SubscriptionInterval, ae as SubscriptionListResult, aa as SubscriptionResult, cg as SubscriptionRevenueShare, ch as SubscriptionRevenueShareInput, ci as SubscriptionStatus, bj as TransactionStatusResult, cj as UnacknowledgedPurchaseOutcome, aF as UpdatePlayerPhoneInput, aG as UpdatePlayerPhoneResult, _ as VerificationMethod, b0 as VerifyApplePurchaseInput, ck as isRefundPendingApproval } from './types-BdKpJX93.cjs';
1
+ export { bB as AppleEnvironment, bC as AppleProduct, a$ as AppleProductsResult, a0 as ApplePurchaseResult, bD as ApplePurchaseStatus, bE as AppleUnavailableReason, bx as ApproveWithDeviceCodeInput, br as BeginDeviceApprovalInput, g as CallOptions, ag as CancelResult, af as CancelSubscriptionOptions, at as CardSetupConfirmInput, au as CardSetupConfirmResult, ar as CardSetupInput, as as CardSetupResult, ap as CardSetupSessionInput, aq as CardSetupSessionResult, bF as CardSetupStatus, ah as ChangeAmountResult, bG as CheckoutWarning, bi as ClaimCurrencyInput, y as ClaimDelivery, bh as ClaimResult, bg as ClaimTransferInput, bz as CompleteDeviceApprovalInput, bA as CompleteDeviceApprovalResult, bv as ConfirmDeviceEnrollmentInput, bw as ConfirmDeviceEnrollmentResult, aT as ConfirmPaymentResult, aN as CreateCheckoutInput, aO as CreateCheckoutResult, a9 as CreateSubscriptionInput, bH as CurrencyBalance, aS as CurrencyPurchaseQuote, bI as CurrencyPurchaseQuoteBreakdown, aR as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bJ as DeviceApprovalChannel, bK as DeviceApprovalEnrollment, bL as DeviceApprovalFlow, bs as DeviceApprovalGrant, bu as DeviceApprovalPollResult, bM as DeviceApprovalPollStatus, by as DeviceApprovalSettleResult, bN as DeviceEnrollmentDecision, bO as DeviceEnrollmentRespond, bP as ExpiryReason, bQ as FeeTakenFrom, bR as FirstCharge, bS as FirstChargeStatus, bT as FundingSource, ab as GetSubscriptionOptions, ac as GetSubscriptionResult, bk as GuardianApprovalStatusResult, bU as InboundPendingItem, bb as InboundPendingQuery, bc as InboundPendingResult, aL as InitiateResult, aK as InitiateSendInput, aM as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, b3 as ItemHistoryQuery, b4 as ItemHistoryResult, b5 as ItemOrderQuery, bd as LinkedIdentitiesQuery, be as LinkedIdentitiesResult, bV as LinkedIdentityEmail, ad as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bW as MinPurchaseWarning, aB as MintPlayerTokenInput, aU as OrderDetailsResult, bX as PhoneChangeConfirmation, aJ as PhoneChangeRequest, bY as PhoneChangeRequestStatus, bo as PhoneShareApproveInput, bp as PhoneShareApproveResult, bm as PhoneShareContact, bn as PhoneShareInitiateResult, bq as PhoneShareStatusResult, a3 as PlatformApprovalResult, a4 as PlatformOrderStatusResult, a5 as PlatformPurchaseHistoryQuery, a6 as PlatformPurchaseHistoryResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, bZ as PlatformPurchaseStatus, a7 as PlatformRefundInput, a8 as PlatformRefundResult, b8 as PlayerActivityEntry, b6 as PlayerActivityQuery, b7 as PlayerActivityResult, b_ as PlayerActivityType, b9 as PlayerBalanceQuery, ba as PlayerBalanceResult, av as PlayerCardsResult, aC as PlayerToken, bt as PollDeviceApprovalInput, aP as PurchaseInput, b1 as PurchaseItemInput, b2 as PurchaseItemResult, aQ as PurchaseResult, Z as Rail, b$ as RefundInitiation, c0 as RefundPendingApproval, c1 as RefundProcessingFeeBasis, c2 as RefundReceipt, al as RefundResult, c3 as RefundRevenueShareAttribution, ak as RefundSubscriptionInput, c4 as RefundWarning, aD as RegisterPlayerInput, aE as RegisterPlayerResult, aH as RequestPhoneChangeInput, aI as RequestPhoneChangeResult, aw as SandboxClockResult, c5 as SandboxClockState, ax as SandboxFailureOutcome, az as SandboxForceAuthChallengeOptions, ay as SandboxForceFailureOptions, c6 as SavedCard, aA as ServerConfig, bl as ServerDestinationsQuery, ai as SetPaymentMethodInput, aj as SetPaymentMethodResult, bf as SmsVerifyResult, aZ as SteamFinalizeInput, a_ as SteamFinalizeResult, ao as SteamFinalizeSubscriptionResult, aX as SteamInitPurchaseInput, aY as SteamInitPurchaseResult, an as SteamInitResult, c7 as SteamPack, aV as SteamPacksQuery, aW as SteamPacksResult, am as SteamSubscriptionInitInput, c8 as SteamUnavailableReason, c9 as SteamUserSession, ca as Subscription, cb as SubscriptionBaseInput, cc as SubscriptionConsent, cd as SubscriptionConsentInput, ce as SubscriptionFundingRail, cf as SubscriptionInterval, ae as SubscriptionListResult, aa as SubscriptionResult, cg as SubscriptionRevenueShare, ch as SubscriptionRevenueShareInput, ci as SubscriptionStatus, bj as TransactionStatusResult, cj as UnacknowledgedPurchaseOutcome, aF as UpdatePlayerPhoneInput, aG as UpdatePlayerPhoneResult, _ as VerificationMethod, b0 as VerifyApplePurchaseInput, ck as isRefundPendingApproval } from './types-IRNjMV47.cjs';
2
2
  export { G as GameEventType, R as ReportGameEventInput, a as ReportGameEventResult, b as ReportServerGameEventInput } from './loyalty-events-CmDw2ZoR.cjs';
3
- export { A as APPLE_FINISH_ERROR_CODES, d as AppleWebhookDetails, C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, f as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, g as InvoWebhookEvent, h as ItemPurchasedData, K as KeyEnvironmentMismatchError, L as LIVE_KEY_PREFIX, j as ListPayeesQuery, k as ListPayeesResult, l as ListPayoutsQuery, m as ListPayoutsResult, P as PRODUCTION_BASE_URL, n as PayableBlocker, o as Payee, p as PayeeInvite, q as PayeeStatus, s as PayeeStatusChangedData, t as Payout, u as PayoutStatus, w as PayoutStatusChangedData, x as PayoutsServer, y as PlatformCommercePurchasedData, z as PlatformCommerceRefundedData, B as PlatformCommerceServer, F as PlayerPhoneChangedData, G as PurchaseCompletedData, H as PurchaseEventData, R as RegisterPayeeInput, J as RegisterPayeeResult, M as RequestPayoutInput, N as RequestPayoutResult, O as ReturnReasonCode, S as SANDBOX_BASE_URL, Q as SandboxServer, U as SandboxSubscriptionsServer, V as SubscriptionAuthenticationRequiredData, W as SubscriptionCanceledData, X as SubscriptionEventCommon, Y as SubscriptionExpiredData, Z as SubscriptionPastDueData, _ as SubscriptionPaymentFailedData, $ as SubscriptionRefundApprovedData, a0 as SubscriptionRefundDetail, a1 as SubscriptionRefundRejectedData, a2 as SubscriptionRefundRequestData, a3 as SubscriptionRefundedData, a4 as SubscriptionRenewalFunding, a5 as SubscriptionRenewalSplit, a6 as SubscriptionRenewedData, a7 as SubscriptionRevenueShareAttribution, a8 as SubscriptionTrialEventFields, a9 as SubscriptionsServer, T as TEST_KEY_PREFIX, aa as TransferEventData, ab as VerifyWebhookOptions, ac as WebhookHandlerOptions, b as baseUrlForKey, ad as createWebhookHandler, e as environmentForBaseUrl, c as environmentFromKeyPrefix, ae as isAppleCreditPending, i as isDemoKey, r as resolveEnvironment, af as shouldFinishAppleTransaction, ag as verifyWebhook, ah as verifyWebhookAsync } from './server-B9PtYZaM.cjs';
4
- export { S as SDK_VERSION } from './version-CuhMO-6s.cjs';
3
+ export { A as APPLE_FINISH_ERROR_CODES, d as AppleWebhookDetails, C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, f as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, g as InvoWebhookEvent, h as ItemPurchasedData, K as KeyEnvironmentMismatchError, L as LIVE_KEY_PREFIX, j as ListPayeesQuery, k as ListPayeesResult, l as ListPayoutsQuery, m as ListPayoutsResult, P as PRODUCTION_BASE_URL, n as PayableBlocker, o as Payee, p as PayeeInvite, q as PayeeStatus, s as PayeeStatusChangedData, t as Payout, u as PayoutStatus, w as PayoutStatusChangedData, x as PayoutsServer, y as PlatformCommercePurchasedData, z as PlatformCommerceRefundedData, B as PlatformCommerceServer, F as PlayerPhoneChangedData, G as PurchaseCompletedData, H as PurchaseEventData, R as RegisterPayeeInput, J as RegisterPayeeResult, M as RequestPayoutInput, N as RequestPayoutResult, O as ReturnReasonCode, S as SANDBOX_BASE_URL, Q as SandboxServer, U as SandboxSubscriptionsServer, V as SubscriptionAuthenticationRequiredData, W as SubscriptionCanceledData, X as SubscriptionEventCommon, Y as SubscriptionExpiredData, Z as SubscriptionPastDueData, _ as SubscriptionPaymentFailedData, $ as SubscriptionRefundApprovedData, a0 as SubscriptionRefundDetail, a1 as SubscriptionRefundRejectedData, a2 as SubscriptionRefundRequestData, a3 as SubscriptionRefundedData, a4 as SubscriptionRenewalFunding, a5 as SubscriptionRenewalSplit, a6 as SubscriptionRenewedData, a7 as SubscriptionRevenueShareAttribution, a8 as SubscriptionTrialEventFields, a9 as SubscriptionsServer, T as TEST_KEY_PREFIX, aa as TransferEventData, ab as VerifyWebhookOptions, ac as WebhookHandlerOptions, b as baseUrlForKey, ad as createWebhookHandler, e as environmentForBaseUrl, c as environmentFromKeyPrefix, ae as isAppleCreditPending, i as isDemoKey, r as resolveEnvironment, af as shouldFinishAppleTransaction, ag as verifyWebhook, ah as verifyWebhookAsync } from './server-BuByP1JU.cjs';
4
+ export { S as SDK_VERSION } from './version-BIHJFKuj.cjs';
package/dist/server.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { bB as AppleEnvironment, bC as AppleProduct, a$ as AppleProductsResult, a0 as ApplePurchaseResult, bD as ApplePurchaseStatus, bE as AppleUnavailableReason, bx as ApproveWithDeviceCodeInput, br as BeginDeviceApprovalInput, g as CallOptions, ag as CancelResult, af as CancelSubscriptionOptions, at as CardSetupConfirmInput, au as CardSetupConfirmResult, ar as CardSetupInput, as as CardSetupResult, ap as CardSetupSessionInput, aq as CardSetupSessionResult, bF as CardSetupStatus, ah as ChangeAmountResult, bG as CheckoutWarning, bi as ClaimCurrencyInput, y as ClaimDelivery, bh as ClaimResult, bg as ClaimTransferInput, bz as CompleteDeviceApprovalInput, bA as CompleteDeviceApprovalResult, bv as ConfirmDeviceEnrollmentInput, bw as ConfirmDeviceEnrollmentResult, aT as ConfirmPaymentResult, aN as CreateCheckoutInput, aO as CreateCheckoutResult, a9 as CreateSubscriptionInput, bH as CurrencyBalance, aS as CurrencyPurchaseQuote, bI as CurrencyPurchaseQuoteBreakdown, aR as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bJ as DeviceApprovalChannel, bK as DeviceApprovalEnrollment, bL as DeviceApprovalFlow, bs as DeviceApprovalGrant, bu as DeviceApprovalPollResult, bM as DeviceApprovalPollStatus, by as DeviceApprovalSettleResult, bN as DeviceEnrollmentDecision, bO as DeviceEnrollmentRespond, bP as ExpiryReason, bQ as FeeTakenFrom, bR as FirstCharge, bS as FirstChargeStatus, bT as FundingSource, ab as GetSubscriptionOptions, ac as GetSubscriptionResult, bk as GuardianApprovalStatusResult, bU as InboundPendingItem, bb as InboundPendingQuery, bc as InboundPendingResult, aL as InitiateResult, aK as InitiateSendInput, aM as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, b3 as ItemHistoryQuery, b4 as ItemHistoryResult, b5 as ItemOrderQuery, bd as LinkedIdentitiesQuery, be as LinkedIdentitiesResult, bV as LinkedIdentityEmail, ad as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bW as MinPurchaseWarning, aB as MintPlayerTokenInput, aU as OrderDetailsResult, bX as PhoneChangeConfirmation, aJ as PhoneChangeRequest, bY as PhoneChangeRequestStatus, bo as PhoneShareApproveInput, bp as PhoneShareApproveResult, bm as PhoneShareContact, bn as PhoneShareInitiateResult, bq as PhoneShareStatusResult, a3 as PlatformApprovalResult, a4 as PlatformOrderStatusResult, a5 as PlatformPurchaseHistoryQuery, a6 as PlatformPurchaseHistoryResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, bZ as PlatformPurchaseStatus, a7 as PlatformRefundInput, a8 as PlatformRefundResult, b8 as PlayerActivityEntry, b6 as PlayerActivityQuery, b7 as PlayerActivityResult, b_ as PlayerActivityType, b9 as PlayerBalanceQuery, ba as PlayerBalanceResult, av as PlayerCardsResult, aC as PlayerToken, bt as PollDeviceApprovalInput, aP as PurchaseInput, b1 as PurchaseItemInput, b2 as PurchaseItemResult, aQ as PurchaseResult, Z as Rail, b$ as RefundInitiation, c0 as RefundPendingApproval, c1 as RefundProcessingFeeBasis, c2 as RefundReceipt, al as RefundResult, c3 as RefundRevenueShareAttribution, ak as RefundSubscriptionInput, c4 as RefundWarning, aD as RegisterPlayerInput, aE as RegisterPlayerResult, aH as RequestPhoneChangeInput, aI as RequestPhoneChangeResult, aw as SandboxClockResult, c5 as SandboxClockState, ax as SandboxFailureOutcome, az as SandboxForceAuthChallengeOptions, ay as SandboxForceFailureOptions, c6 as SavedCard, aA as ServerConfig, bl as ServerDestinationsQuery, ai as SetPaymentMethodInput, aj as SetPaymentMethodResult, bf as SmsVerifyResult, aZ as SteamFinalizeInput, a_ as SteamFinalizeResult, ao as SteamFinalizeSubscriptionResult, aX as SteamInitPurchaseInput, aY as SteamInitPurchaseResult, an as SteamInitResult, c7 as SteamPack, aV as SteamPacksQuery, aW as SteamPacksResult, am as SteamSubscriptionInitInput, c8 as SteamUnavailableReason, c9 as SteamUserSession, ca as Subscription, cb as SubscriptionBaseInput, cc as SubscriptionConsent, cd as SubscriptionConsentInput, ce as SubscriptionFundingRail, cf as SubscriptionInterval, ae as SubscriptionListResult, aa as SubscriptionResult, cg as SubscriptionRevenueShare, ch as SubscriptionRevenueShareInput, ci as SubscriptionStatus, bj as TransactionStatusResult, cj as UnacknowledgedPurchaseOutcome, aF as UpdatePlayerPhoneInput, aG as UpdatePlayerPhoneResult, _ as VerificationMethod, b0 as VerifyApplePurchaseInput, ck as isRefundPendingApproval } from './types-BdKpJX93.js';
1
+ export { bB as AppleEnvironment, bC as AppleProduct, a$ as AppleProductsResult, a0 as ApplePurchaseResult, bD as ApplePurchaseStatus, bE as AppleUnavailableReason, bx as ApproveWithDeviceCodeInput, br as BeginDeviceApprovalInput, g as CallOptions, ag as CancelResult, af as CancelSubscriptionOptions, at as CardSetupConfirmInput, au as CardSetupConfirmResult, ar as CardSetupInput, as as CardSetupResult, ap as CardSetupSessionInput, aq as CardSetupSessionResult, bF as CardSetupStatus, ah as ChangeAmountResult, bG as CheckoutWarning, bi as ClaimCurrencyInput, y as ClaimDelivery, bh as ClaimResult, bg as ClaimTransferInput, bz as CompleteDeviceApprovalInput, bA as CompleteDeviceApprovalResult, bv as ConfirmDeviceEnrollmentInput, bw as ConfirmDeviceEnrollmentResult, aT as ConfirmPaymentResult, aN as CreateCheckoutInput, aO as CreateCheckoutResult, a9 as CreateSubscriptionInput, bH as CurrencyBalance, aS as CurrencyPurchaseQuote, bI as CurrencyPurchaseQuoteBreakdown, aR as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bJ as DeviceApprovalChannel, bK as DeviceApprovalEnrollment, bL as DeviceApprovalFlow, bs as DeviceApprovalGrant, bu as DeviceApprovalPollResult, bM as DeviceApprovalPollStatus, by as DeviceApprovalSettleResult, bN as DeviceEnrollmentDecision, bO as DeviceEnrollmentRespond, bP as ExpiryReason, bQ as FeeTakenFrom, bR as FirstCharge, bS as FirstChargeStatus, bT as FundingSource, ab as GetSubscriptionOptions, ac as GetSubscriptionResult, bk as GuardianApprovalStatusResult, bU as InboundPendingItem, bb as InboundPendingQuery, bc as InboundPendingResult, aL as InitiateResult, aK as InitiateSendInput, aM as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, b3 as ItemHistoryQuery, b4 as ItemHistoryResult, b5 as ItemOrderQuery, bd as LinkedIdentitiesQuery, be as LinkedIdentitiesResult, bV as LinkedIdentityEmail, ad as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bW as MinPurchaseWarning, aB as MintPlayerTokenInput, aU as OrderDetailsResult, bX as PhoneChangeConfirmation, aJ as PhoneChangeRequest, bY as PhoneChangeRequestStatus, bo as PhoneShareApproveInput, bp as PhoneShareApproveResult, bm as PhoneShareContact, bn as PhoneShareInitiateResult, bq as PhoneShareStatusResult, a3 as PlatformApprovalResult, a4 as PlatformOrderStatusResult, a5 as PlatformPurchaseHistoryQuery, a6 as PlatformPurchaseHistoryResult, a1 as PlatformPurchaseInput, a2 as PlatformPurchaseResult, bZ as PlatformPurchaseStatus, a7 as PlatformRefundInput, a8 as PlatformRefundResult, b8 as PlayerActivityEntry, b6 as PlayerActivityQuery, b7 as PlayerActivityResult, b_ as PlayerActivityType, b9 as PlayerBalanceQuery, ba as PlayerBalanceResult, av as PlayerCardsResult, aC as PlayerToken, bt as PollDeviceApprovalInput, aP as PurchaseInput, b1 as PurchaseItemInput, b2 as PurchaseItemResult, aQ as PurchaseResult, Z as Rail, b$ as RefundInitiation, c0 as RefundPendingApproval, c1 as RefundProcessingFeeBasis, c2 as RefundReceipt, al as RefundResult, c3 as RefundRevenueShareAttribution, ak as RefundSubscriptionInput, c4 as RefundWarning, aD as RegisterPlayerInput, aE as RegisterPlayerResult, aH as RequestPhoneChangeInput, aI as RequestPhoneChangeResult, aw as SandboxClockResult, c5 as SandboxClockState, ax as SandboxFailureOutcome, az as SandboxForceAuthChallengeOptions, ay as SandboxForceFailureOptions, c6 as SavedCard, aA as ServerConfig, bl as ServerDestinationsQuery, ai as SetPaymentMethodInput, aj as SetPaymentMethodResult, bf as SmsVerifyResult, aZ as SteamFinalizeInput, a_ as SteamFinalizeResult, ao as SteamFinalizeSubscriptionResult, aX as SteamInitPurchaseInput, aY as SteamInitPurchaseResult, an as SteamInitResult, c7 as SteamPack, aV as SteamPacksQuery, aW as SteamPacksResult, am as SteamSubscriptionInitInput, c8 as SteamUnavailableReason, c9 as SteamUserSession, ca as Subscription, cb as SubscriptionBaseInput, cc as SubscriptionConsent, cd as SubscriptionConsentInput, ce as SubscriptionFundingRail, cf as SubscriptionInterval, ae as SubscriptionListResult, aa as SubscriptionResult, cg as SubscriptionRevenueShare, ch as SubscriptionRevenueShareInput, ci as SubscriptionStatus, bj as TransactionStatusResult, cj as UnacknowledgedPurchaseOutcome, aF as UpdatePlayerPhoneInput, aG as UpdatePlayerPhoneResult, _ as VerificationMethod, b0 as VerifyApplePurchaseInput, ck as isRefundPendingApproval } from './types-IRNjMV47.js';
2
2
  export { G as GameEventType, R as ReportGameEventInput, a as ReportGameEventResult, b as ReportServerGameEventInput } from './loyalty-events-CmDw2ZoR.js';
3
- export { A as APPLE_FINISH_ERROR_CODES, d as AppleWebhookDetails, C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, f as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, g as InvoWebhookEvent, h as ItemPurchasedData, K as KeyEnvironmentMismatchError, L as LIVE_KEY_PREFIX, j as ListPayeesQuery, k as ListPayeesResult, l as ListPayoutsQuery, m as ListPayoutsResult, P as PRODUCTION_BASE_URL, n as PayableBlocker, o as Payee, p as PayeeInvite, q as PayeeStatus, s as PayeeStatusChangedData, t as Payout, u as PayoutStatus, w as PayoutStatusChangedData, x as PayoutsServer, y as PlatformCommercePurchasedData, z as PlatformCommerceRefundedData, B as PlatformCommerceServer, F as PlayerPhoneChangedData, G as PurchaseCompletedData, H as PurchaseEventData, R as RegisterPayeeInput, J as RegisterPayeeResult, M as RequestPayoutInput, N as RequestPayoutResult, O as ReturnReasonCode, S as SANDBOX_BASE_URL, Q as SandboxServer, U as SandboxSubscriptionsServer, V as SubscriptionAuthenticationRequiredData, W as SubscriptionCanceledData, X as SubscriptionEventCommon, Y as SubscriptionExpiredData, Z as SubscriptionPastDueData, _ as SubscriptionPaymentFailedData, $ as SubscriptionRefundApprovedData, a0 as SubscriptionRefundDetail, a1 as SubscriptionRefundRejectedData, a2 as SubscriptionRefundRequestData, a3 as SubscriptionRefundedData, a4 as SubscriptionRenewalFunding, a5 as SubscriptionRenewalSplit, a6 as SubscriptionRenewedData, a7 as SubscriptionRevenueShareAttribution, a8 as SubscriptionTrialEventFields, a9 as SubscriptionsServer, T as TEST_KEY_PREFIX, aa as TransferEventData, ab as VerifyWebhookOptions, ac as WebhookHandlerOptions, b as baseUrlForKey, ad as createWebhookHandler, e as environmentForBaseUrl, c as environmentFromKeyPrefix, ae as isAppleCreditPending, i as isDemoKey, r as resolveEnvironment, af as shouldFinishAppleTransaction, ag as verifyWebhook, ah as verifyWebhookAsync } from './server-B7Pw1HMp.js';
4
- export { S as SDK_VERSION } from './version-CuhMO-6s.js';
3
+ export { A as APPLE_FINISH_ERROR_CODES, d as AppleWebhookDetails, C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, f as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, g as InvoWebhookEvent, h as ItemPurchasedData, K as KeyEnvironmentMismatchError, L as LIVE_KEY_PREFIX, j as ListPayeesQuery, k as ListPayeesResult, l as ListPayoutsQuery, m as ListPayoutsResult, P as PRODUCTION_BASE_URL, n as PayableBlocker, o as Payee, p as PayeeInvite, q as PayeeStatus, s as PayeeStatusChangedData, t as Payout, u as PayoutStatus, w as PayoutStatusChangedData, x as PayoutsServer, y as PlatformCommercePurchasedData, z as PlatformCommerceRefundedData, B as PlatformCommerceServer, F as PlayerPhoneChangedData, G as PurchaseCompletedData, H as PurchaseEventData, R as RegisterPayeeInput, J as RegisterPayeeResult, M as RequestPayoutInput, N as RequestPayoutResult, O as ReturnReasonCode, S as SANDBOX_BASE_URL, Q as SandboxServer, U as SandboxSubscriptionsServer, V as SubscriptionAuthenticationRequiredData, W as SubscriptionCanceledData, X as SubscriptionEventCommon, Y as SubscriptionExpiredData, Z as SubscriptionPastDueData, _ as SubscriptionPaymentFailedData, $ as SubscriptionRefundApprovedData, a0 as SubscriptionRefundDetail, a1 as SubscriptionRefundRejectedData, a2 as SubscriptionRefundRequestData, a3 as SubscriptionRefundedData, a4 as SubscriptionRenewalFunding, a5 as SubscriptionRenewalSplit, a6 as SubscriptionRenewedData, a7 as SubscriptionRevenueShareAttribution, a8 as SubscriptionTrialEventFields, a9 as SubscriptionsServer, T as TEST_KEY_PREFIX, aa as TransferEventData, ab as VerifyWebhookOptions, ac as WebhookHandlerOptions, b as baseUrlForKey, ad as createWebhookHandler, e as environmentForBaseUrl, c as environmentFromKeyPrefix, ae as isAppleCreditPending, i as isDemoKey, r as resolveEnvironment, af as shouldFinishAppleTransaction, ag as verifyWebhook, ah as verifyWebhookAsync } from './server-DzczMA-z.js';
4
+ export { S as SDK_VERSION } from './version-BIHJFKuj.js';
package/dist/server.js CHANGED
@@ -1,5 +1,5 @@
1
- export { APPLE_FINISH_ERROR_CODES, CardsServer, DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, KeyEnvironmentMismatchError, LIVE_KEY_PREFIX, PRODUCTION_BASE_URL, PayoutsServer, PlatformCommerceServer, SANDBOX_BASE_URL, SandboxServer, SandboxSubscriptionsServer, SubscriptionsServer, TEST_KEY_PREFIX, baseUrlForKey, createWebhookHandler, environmentForBaseUrl, environmentFromKeyPrefix, isAppleCreditPending, isDemoKey, isRefundPendingApproval, resolveEnvironment, shouldFinishAppleTransaction, verifyWebhook, verifyWebhookAsync } from './chunk-ZHEQAZLW.js';
2
- export { SDK_VERSION } from './chunk-MENRG67H.js';
3
- export { InvoError } from './chunk-KWAUFFDY.js';
1
+ export { APPLE_FINISH_ERROR_CODES, CardsServer, DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, KeyEnvironmentMismatchError, LIVE_KEY_PREFIX, PRODUCTION_BASE_URL, PayoutsServer, PlatformCommerceServer, SANDBOX_BASE_URL, SandboxServer, SandboxSubscriptionsServer, SubscriptionsServer, TEST_KEY_PREFIX, baseUrlForKey, createWebhookHandler, environmentForBaseUrl, environmentFromKeyPrefix, isAppleCreditPending, isDemoKey, isRefundPendingApproval, resolveEnvironment, shouldFinishAppleTransaction, verifyWebhook, verifyWebhookAsync } from './chunk-YFNQKYUI.js';
2
+ export { SDK_VERSION } from './chunk-OYJUX2TH.js';
3
+ export { InvoError } from './chunk-I4GDKZFL.js';
4
4
  //# sourceMappingURL=server.js.map
5
5
  //# sourceMappingURL=server.js.map
@@ -91,7 +91,11 @@ declare class InvoError extends Error {
91
91
  * - registration/token-mint (phone already on another INVO account), and
92
92
  * - **claim + confirm-receipt** (`claimTransfer`/`claimCurrency`,
93
93
  * `confirmReceiptSend`/`confirmReceiptTransfer`) — the receiver phone is contested,
94
- * so INVO holds the money and texts the phone owner to approve.
94
+ * so INVO holds the money and asks the phone owner to approve.
95
+ *
96
+ * Either way the 409 has already created an approval request and contacted the phone's
97
+ * existing owner: by email when INVO has verified their address, otherwise by a text code
98
+ * (the body's `consent_channel` says which).
95
99
  *
96
100
  * NOT a failure. Show `err.message` verbatim (the backend supplies the user-facing text;
97
101
  * `phoneShareLast4` tells the UI which phone), keep the funds pending, and **retry the same
@@ -103,7 +107,8 @@ declare class InvoError extends Error {
103
107
  get isPhoneShareApprovalRequired(): boolean;
104
108
  /** The `approval_id` from a phone-share 409 body, for `phoneShareApprove`. */
105
109
  get phoneShareApprovalId(): string | undefined;
106
- /** Last 4 digits of the phone that must approve (`phone_last4`), for the UI message. */
110
+ /** Last 4 digits of the phone that must approve (`phone_last4`, a string such as `"4567"`),
111
+ * for the UI message. `undefined` when the body has none (an older server). */
107
112
  get phoneShareLast4(): string | undefined;
108
113
  /**
109
114
  * True if a transfer/send initiate was blocked because it would move more than the player's
@@ -805,7 +810,10 @@ declare class InvoError extends Error {
805
810
  /**
806
811
  * True when the phone you supplied belongs to another email
807
812
  * (`PHONE_SHARE_APPROVAL_REQUIRED`, 409) on `mintPlayerToken`, `registerPlayer` or
808
- * `updatePlayerPhone`. Nothing was created or changed. The same condition as
813
+ * `updatePlayerPhone`. The phone may be held by a player in any game or by an INVO wallet
814
+ * (including one created in the INVO app). No player was created or changed, but INVO has
815
+ * created an approval request and asked the phone's owner to approve; retry the same call
816
+ * once they have and it succeeds. The same condition as
809
817
  * {@link isPhoneShareApprovalRequired}, named for these registration calls.
810
818
  */
811
819
  get isPhoneShareRefused(): boolean;
@@ -1131,8 +1139,10 @@ interface RegisterPlayerInput {
1131
1139
  }
1132
1140
  /** Result of `InvoServer.registerPlayer`. */
1133
1141
  interface RegisterPlayerResult {
1134
- /** `"created"` (HTTP 201) or `"exists"` (HTTP 200, already in your game with that phone). */
1142
+ /** `"created"` (HTTP 201, new to your game; it may have joined the person's existing INVO
1143
+ * wallet) or `"exists"` (HTTP 200, already in your game with that phone). */
1135
1144
  status: "created" | "exists";
1145
+ /** Derived from the email and phone, so the same `identity_id` other games see for them. */
1136
1146
  identityId: string;
1137
1147
  /** A player token for this player, when INVO can issue one for your game. */
1138
1148
  playerToken?: string;
@@ -2662,14 +2672,20 @@ interface PhoneShareApproveInput {
2662
2672
  otp: string;
2663
2673
  }
2664
2674
  /** Result of `phoneShareApprove`. Known fields are surfaced; the rest stays on `raw`.
2665
- * On success the grant is stored server-side, so the caller simply re-issues the
2666
- * identical original request (the grant is auto-consumed). */
2675
+ * On success the approval is stored server-side, permanently and network-wide (there is
2676
+ * no revoke), so the caller simply re-issues the identical original request.
2677
+ *
2678
+ * The server answers `{ status: "success", approved: true, approval_id, phone,
2679
+ * approved_email, approved_at, message }`; `phone`, `approved_email` and `approved_at`
2680
+ * are read from `raw`. Approving an already approved request returns the same body. */
2667
2681
  interface PhoneShareApproveResult {
2682
+ /** `approval_id`. */
2668
2683
  approvalId?: string;
2669
- /** true once the share is approved. */
2684
+ /** `approved`: `true` on success. `undefined` from an older server that did not send it. */
2670
2685
  approved?: boolean;
2671
- /** true when the pair was already approved before this call. */
2686
+ /** Not sent by the approve endpoint (always `undefined` there); kept for compatibility. */
2672
2687
  alreadyApproved?: boolean;
2688
+ /** Not sent by the approve endpoint (always `undefined` there); kept for compatibility. */
2673
2689
  expiresAt?: string;
2674
2690
  raw: Record<string, unknown>;
2675
2691
  }
@@ -91,7 +91,11 @@ declare class InvoError extends Error {
91
91
  * - registration/token-mint (phone already on another INVO account), and
92
92
  * - **claim + confirm-receipt** (`claimTransfer`/`claimCurrency`,
93
93
  * `confirmReceiptSend`/`confirmReceiptTransfer`) — the receiver phone is contested,
94
- * so INVO holds the money and texts the phone owner to approve.
94
+ * so INVO holds the money and asks the phone owner to approve.
95
+ *
96
+ * Either way the 409 has already created an approval request and contacted the phone's
97
+ * existing owner: by email when INVO has verified their address, otherwise by a text code
98
+ * (the body's `consent_channel` says which).
95
99
  *
96
100
  * NOT a failure. Show `err.message` verbatim (the backend supplies the user-facing text;
97
101
  * `phoneShareLast4` tells the UI which phone), keep the funds pending, and **retry the same
@@ -103,7 +107,8 @@ declare class InvoError extends Error {
103
107
  get isPhoneShareApprovalRequired(): boolean;
104
108
  /** The `approval_id` from a phone-share 409 body, for `phoneShareApprove`. */
105
109
  get phoneShareApprovalId(): string | undefined;
106
- /** Last 4 digits of the phone that must approve (`phone_last4`), for the UI message. */
110
+ /** Last 4 digits of the phone that must approve (`phone_last4`, a string such as `"4567"`),
111
+ * for the UI message. `undefined` when the body has none (an older server). */
107
112
  get phoneShareLast4(): string | undefined;
108
113
  /**
109
114
  * True if a transfer/send initiate was blocked because it would move more than the player's
@@ -805,7 +810,10 @@ declare class InvoError extends Error {
805
810
  /**
806
811
  * True when the phone you supplied belongs to another email
807
812
  * (`PHONE_SHARE_APPROVAL_REQUIRED`, 409) on `mintPlayerToken`, `registerPlayer` or
808
- * `updatePlayerPhone`. Nothing was created or changed. The same condition as
813
+ * `updatePlayerPhone`. The phone may be held by a player in any game or by an INVO wallet
814
+ * (including one created in the INVO app). No player was created or changed, but INVO has
815
+ * created an approval request and asked the phone's owner to approve; retry the same call
816
+ * once they have and it succeeds. The same condition as
809
817
  * {@link isPhoneShareApprovalRequired}, named for these registration calls.
810
818
  */
811
819
  get isPhoneShareRefused(): boolean;
@@ -1131,8 +1139,10 @@ interface RegisterPlayerInput {
1131
1139
  }
1132
1140
  /** Result of `InvoServer.registerPlayer`. */
1133
1141
  interface RegisterPlayerResult {
1134
- /** `"created"` (HTTP 201) or `"exists"` (HTTP 200, already in your game with that phone). */
1142
+ /** `"created"` (HTTP 201, new to your game; it may have joined the person's existing INVO
1143
+ * wallet) or `"exists"` (HTTP 200, already in your game with that phone). */
1135
1144
  status: "created" | "exists";
1145
+ /** Derived from the email and phone, so the same `identity_id` other games see for them. */
1136
1146
  identityId: string;
1137
1147
  /** A player token for this player, when INVO can issue one for your game. */
1138
1148
  playerToken?: string;
@@ -2662,14 +2672,20 @@ interface PhoneShareApproveInput {
2662
2672
  otp: string;
2663
2673
  }
2664
2674
  /** Result of `phoneShareApprove`. Known fields are surfaced; the rest stays on `raw`.
2665
- * On success the grant is stored server-side, so the caller simply re-issues the
2666
- * identical original request (the grant is auto-consumed). */
2675
+ * On success the approval is stored server-side, permanently and network-wide (there is
2676
+ * no revoke), so the caller simply re-issues the identical original request.
2677
+ *
2678
+ * The server answers `{ status: "success", approved: true, approval_id, phone,
2679
+ * approved_email, approved_at, message }`; `phone`, `approved_email` and `approved_at`
2680
+ * are read from `raw`. Approving an already approved request returns the same body. */
2667
2681
  interface PhoneShareApproveResult {
2682
+ /** `approval_id`. */
2668
2683
  approvalId?: string;
2669
- /** true once the share is approved. */
2684
+ /** `approved`: `true` on success. `undefined` from an older server that did not send it. */
2670
2685
  approved?: boolean;
2671
- /** true when the pair was already approved before this call. */
2686
+ /** Not sent by the approve endpoint (always `undefined` there); kept for compatibility. */
2672
2687
  alreadyApproved?: boolean;
2688
+ /** Not sent by the approve endpoint (always `undefined` there); kept for compatibility. */
2673
2689
  expiresAt?: string;
2674
2690
  raw: Record<string, unknown>;
2675
2691
  }
@@ -3,6 +3,6 @@
3
3
  * `package.json` so it cannot drift silently (it did: the UA read 3.0.0 through 3.7.0).
4
4
  * Bump it with the changeset flow.
5
5
  */
6
- declare const SDK_VERSION = "3.37.0";
6
+ declare const SDK_VERSION = "3.37.1";
7
7
 
8
8
  export { SDK_VERSION as S };
@@ -3,6 +3,6 @@
3
3
  * `package.json` so it cannot drift silently (it did: the UA read 3.0.0 through 3.7.0).
4
4
  * Bump it with the changeset flow.
5
5
  */
6
- declare const SDK_VERSION = "3.37.0";
6
+ declare const SDK_VERSION = "3.37.1";
7
7
 
8
8
  export { SDK_VERSION as S };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invonetwork/web-sdk",
3
- "version": "3.37.0",
3
+ "version": "3.37.1",
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,
@@ -1,6 +0,0 @@
1
- // src/version.ts
2
- var SDK_VERSION = "3.37.0";
3
-
4
- export { SDK_VERSION };
5
- //# sourceMappingURL=chunk-MENRG67H.js.map
6
- //# sourceMappingURL=chunk-MENRG67H.js.map