@invonetwork/web-sdk 3.21.0 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/README.md +218 -27
- package/dist/{chunk-7L4O5Q7K.js → chunk-BOD4WOWO.js} +220 -7
- package/dist/index.cjs +299 -4
- package/dist/index.d.cts +48 -3
- package/dist/index.d.ts +48 -3
- package/dist/index.js +108 -2
- package/dist/server.cjs +449 -33
- package/dist/server.d.cts +209 -16
- package/dist/server.d.ts +209 -16
- package/dist/server.js +266 -17
- package/dist/{types-BXcPz6Xw.d.cts → types-C7vpPqsF.d.cts} +314 -7
- package/dist/{types-BXcPz6Xw.d.ts → types-C7vpPqsF.d.ts} +314 -7
- package/package.json +1 -1
package/dist/server.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { I as InvoError, H as Http,
|
|
2
|
-
export {
|
|
1
|
+
import { I as InvoError, H as Http, $ as AuthHeader, a0 as CardSetupSessionInput, g as CallOptions, a1 as CardSetupSessionResult, a2 as CardSetupInput, a3 as CardSetupResult, a4 as CardSetupConfirmInput, a5 as CardSetupConfirmResult, a6 as PlayerCardsResult, a7 as PlatformPurchaseInput, a8 as PlatformPurchaseResult, a9 as PlatformOrderStatusResult, aa as PlatformPurchaseHistoryQuery, ab as PlatformPurchaseHistoryResult, ac as PlatformRefundInput, ad as PlatformRefundResult, ae as CreateSubscriptionInput, af as SubscriptionResult, ag as GetSubscriptionOptions, ah as GetSubscriptionResult, ai as ListSubscriptionsOptions, aj as SubscriptionListResult, ak as CancelSubscriptionOptions, al as CancelResult, am as ChangeAmountResult, an as SetPaymentMethodInput, ao as SetPaymentMethodResult, ap as RefundSubscriptionInput, aq as RefundResult, ar as SteamSubscriptionInitInput, as as SteamInitResult, at as SteamFinalizeSubscriptionResult, au as SandboxClockResult, av as SandboxFailureOutcome, aw as SandboxForceFailureOptions, ax as SandboxForceAuthChallengeOptions, ay as ServerConfig, az as MintPlayerTokenInput, aA as PlayerToken, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, aH as PhoneChangeRequest, aI as InitiateSendInput, aJ as InitiateResult, aK as InitiateTransferInput, aL as CreateCheckoutInput, aM as CreateCheckoutResult, aN as PurchaseInput, aO as PurchaseResult, aP as CurrencyPurchaseQuoteInput, aQ as CurrencyPurchaseQuote, aR as ConfirmPaymentResult, aS as OrderDetailsResult, aT as SteamPacksQuery, aU as SteamPacksResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, aZ as PurchaseItemInput, a_ as PurchaseItemResult, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, b4 as PlayerActivityEntry, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, o as LoyaltyCardsResult, b7 as InboundPendingQuery, b8 as InboundPendingResult, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bb as SmsVerifyResult, bc as ClaimTransferInput, bd as ClaimResult, be as ClaimCurrencyInput, bf as TransactionStatusResult, bg as GuardianApprovalStatusResult, bh as ServerDestinationsQuery, n as DestinationsResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bm as PhoneShareStatusResult, bn as BeginDeviceApprovalInput, bo as DeviceApprovalGrant, bp as PollDeviceApprovalInput, bq as DeviceApprovalPollResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, bt as ApproveWithDeviceCodeInput, bu as DeviceApprovalSettleResult, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult } from './types-C7vpPqsF.cjs';
|
|
2
|
+
export { bx as CardSetupStatus, by as CheckoutWarning, w as ClaimDelivery, bz as CurrencyBalance, bA as CurrencyPurchaseQuoteBreakdown, x as DestinationGame, bB as DeviceApprovalChannel, bC as DeviceApprovalEnrollment, bD as DeviceApprovalFlow, bE as DeviceApprovalPollStatus, bF as DeviceEnrollmentDecision, bG as DeviceEnrollmentRespond, bH as ExpiryReason, bI as FeeTakenFrom, bJ as FirstCharge, bK as FirstChargeStatus, bL as FundingSource, bM as InboundPendingItem, y as InvoErrorInfo, z as InvoHooks, F as InvoRequestInfo, G as InvoResponseInfo, bN as LinkedIdentityEmail, J as LoyaltyCard, K as LoyaltyCardReward, N as LoyaltyCardStep, O as LoyaltyRewardState, Q as LoyaltyStepProgress, S as LoyaltyStepState, bO as MinPurchaseWarning, bP as PhoneChangeConfirmation, bQ as PhoneChangeRequestStatus, bR as PlatformPurchaseStatus, bS as PlayerActivityType, Z as Rail, bT as RefundInitiation, bU as RefundPendingApproval, bV as RefundProcessingFeeBasis, bW as RefundReceipt, bX as RefundRevenueShareAttribution, bY as RefundWarning, bZ as SandboxClockState, b_ as SavedCard, b$ as SteamPack, c0 as SteamUserSession, c1 as Subscription, c2 as SubscriptionBaseInput, c3 as SubscriptionConsent, c4 as SubscriptionConsentInput, c5 as SubscriptionFundingRail, c6 as SubscriptionInterval, c7 as SubscriptionRevenueShare, c8 as SubscriptionRevenueShareInput, c9 as SubscriptionStatus, ca as UnacknowledgedPurchaseOutcome, _ as VerificationMethod, cb as isRefundPendingApproval } from './types-C7vpPqsF.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The package version, as sent in the server User-Agent. A test pins this to
|
|
6
6
|
* `package.json` so it cannot drift silently (it did: the UA read 3.0.0 through 3.7.0).
|
|
7
7
|
* Bump it with the changeset flow.
|
|
8
8
|
*/
|
|
9
|
-
declare const SDK_VERSION = "3.
|
|
9
|
+
declare const SDK_VERSION = "3.23.0";
|
|
10
10
|
|
|
11
11
|
interface VerifyWebhookOptions {
|
|
12
12
|
/** Max age of the signed timestamp, in seconds. Default 300 (5 min). */
|
|
@@ -67,7 +67,7 @@ interface PurchaseCompletedData {
|
|
|
67
67
|
receipt_url?: string;
|
|
68
68
|
/**
|
|
69
69
|
* Additive (2026-09 pricing). INVO's card fee charged to you for this purchase, USD decimal
|
|
70
|
-
* string:
|
|
70
|
+
* string: 3.5% + $0.30 on Open, 5.5% + $0.50 on Merchant of Record. The buyer paid the listed
|
|
71
71
|
* price (plus any tax) and received the listed coins; the fee nets against your earnings.
|
|
72
72
|
* Card purchases only; absent on purchases through a third-party storefront or payment rail,
|
|
73
73
|
* on an order charged before the 2026-09 pricing, and from backends that do not send it.
|
|
@@ -96,7 +96,9 @@ interface PurchaseEventData {
|
|
|
96
96
|
* or a subscription charge (`order_type` `"platform_commerce"` or `"subscription_renewal"`).
|
|
97
97
|
* `true` when INVO's chargeback guarantee covers this dispute: a fraud chargeback on a card
|
|
98
98
|
* sale, which INVO absorbs, so your share is not reversed or held and no dispute fee is passed
|
|
99
|
-
* to you.
|
|
99
|
+
* to you. The guarantee is a Merchant of Record term; Open-tier card payments made before
|
|
100
|
+
* November 8, 2026 keep it, later ones do not (`false`, passed through at cost). `false`
|
|
101
|
+
* for any other dispute, handled as before. Never sent on a coin purchase
|
|
100
102
|
* dispute (a lost coin chargeback takes back the player's coins, not your share, so there is
|
|
101
103
|
* nothing to cover), nor on an opened or won event. Do not read absence as either value.
|
|
102
104
|
*/
|
|
@@ -132,6 +134,23 @@ interface PurchaseEventData {
|
|
|
132
134
|
* guarantee covered it; `null` where it does not apply.
|
|
133
135
|
*/
|
|
134
136
|
partner_debited_usd?: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* Additive (2026-10-09), on a card purchase.disputed sent when the dispute closes (won or
|
|
139
|
+
* lost): the card network's dispute fee charged to you for this dispute, USD decimal string
|
|
140
|
+
* such as `"15.00"`. `"0.00"` when INVO bears it or it was returned to INVO. From November 8,
|
|
141
|
+
* 2026, on Open-tier card sales (coin purchases, Platform Commerce card sales and subscription
|
|
142
|
+
* charges), the dispute fee is passed through to you at cost. `null` when it cannot be decided.
|
|
143
|
+
* A lost dispute is purchase.disputed with `dispute_status` `"lost"`; there is no separate
|
|
144
|
+
* lost-dispute event. Absent on older events and storefront chargebacks; do not read absence
|
|
145
|
+
* as zero.
|
|
146
|
+
*/
|
|
147
|
+
dispute_fee_usd?: string | null;
|
|
148
|
+
/**
|
|
149
|
+
* Additive (2026-10-09), same events: `true` when `dispute_fee_usd` is above zero (the fee is
|
|
150
|
+
* charged to you), `false` when it is not, `null` when it cannot be decided. Absent where
|
|
151
|
+
* `dispute_fee_usd` is absent.
|
|
152
|
+
*/
|
|
153
|
+
dispute_fee_charged_to_partner?: boolean | null;
|
|
135
154
|
/** On a lost subscription purchase.disputed: the subscription and period it concerns. */
|
|
136
155
|
subscription_id?: string | null;
|
|
137
156
|
period_seq?: number | null;
|
|
@@ -266,12 +285,85 @@ interface TransferEventData {
|
|
|
266
285
|
flow?: string;
|
|
267
286
|
amount?: string;
|
|
268
287
|
net_amount?: string;
|
|
269
|
-
/**
|
|
270
|
-
|
|
288
|
+
/**
|
|
289
|
+
* On `transfer.claim_pending` / `transfer.claim_expired`: `"outbound"` on the copy sent to
|
|
290
|
+
* the sending title (drives the sender's UI), `"inbound"` on the copy sent to the
|
|
291
|
+
* destination title (drives the receiving player's UI). A move inside one title sends that
|
|
292
|
+
* title BOTH copies, each with its own `event_id`: dedupe on `event_id`, not
|
|
293
|
+
* `transaction_id`, and act on `direction`.
|
|
294
|
+
*/
|
|
295
|
+
direction?: "inbound" | "outbound" | (string & {});
|
|
271
296
|
/** On inbound claim_pending: the recipient's phone (match to your player). */
|
|
272
297
|
to_phone?: string;
|
|
273
298
|
/** Recipient's opaque identity, present only when the phone maps to a single player. */
|
|
274
299
|
to_identity_id?: string | null;
|
|
300
|
+
/** On `transfer.claim_pending`: the order id of the send or transfer. */
|
|
301
|
+
order_id?: string | null;
|
|
302
|
+
/** On `transfer.claim_pending`: what the recipient receives after fees. */
|
|
303
|
+
net_transfer_amount?: string;
|
|
304
|
+
/** On `transfer.claim_pending`: when the recipient's chance to collect lapses (ISO 8601). */
|
|
305
|
+
claim_code_expires_at?: string | null;
|
|
306
|
+
from_game_id?: string | number;
|
|
307
|
+
to_game_id?: string | number;
|
|
308
|
+
from_player_id?: string | number;
|
|
309
|
+
/** On `transfer.claim_expired` and an expiry `transfer.refunded`: when it expired (ISO 8601). */
|
|
310
|
+
expired_at?: string;
|
|
311
|
+
/**
|
|
312
|
+
* On `transfer.refunded` after an expiry: `"claim_expired"` or `"pin_expired"` (the latter
|
|
313
|
+
* also covers a lapsed in-app approval). Read `expiry_reason` for the precise cause.
|
|
314
|
+
*/
|
|
315
|
+
reason?: string;
|
|
316
|
+
/**
|
|
317
|
+
* Additive. On `transfer.claim_expired` and an expiry `transfer.refunded`: why it lapsed,
|
|
318
|
+
* `"approval_expired"`, `"pin_expired"` or `"claim_expired"`. Absent on older deliveries.
|
|
319
|
+
*/
|
|
320
|
+
expiry_reason?: "approval_expired" | "pin_expired" | "claim_expired" | (string & {});
|
|
321
|
+
/** On `transfer.refunded`: the amount returned to the sender. */
|
|
322
|
+
refunded_amount?: string;
|
|
323
|
+
[key: string]: unknown;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* `payout.status_changed`: a payout of your balance to your bank moved to a new status. The
|
|
327
|
+
* money fields are decimal strings (USD) or `null`. The payout fee fields are `null` on a
|
|
328
|
+
* payout recorded before the fee existed.
|
|
329
|
+
*/
|
|
330
|
+
interface PayoutStatusChangedData {
|
|
331
|
+
payout_id: string | number;
|
|
332
|
+
status: string;
|
|
333
|
+
previous_status: string | null;
|
|
334
|
+
requested_amount_usd: string | null;
|
|
335
|
+
/** The payout fee rate applied, percent (for example `"1"`). */
|
|
336
|
+
offboarding_fee_pct?: string | null;
|
|
337
|
+
/** The payout fee deducted from this payout. */
|
|
338
|
+
offboarding_fee_usd?: string | null;
|
|
339
|
+
/** What reaches your bank: the requested amount less the payout fee. */
|
|
340
|
+
net_payout_usd?: string | null;
|
|
341
|
+
/** The cap on the payout fee per payout (for example `"500.00"`); `null` means no cap. */
|
|
342
|
+
offboarding_fee_cap_usd?: string | null;
|
|
343
|
+
[key: string]: unknown;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* `player.phone_changed`: a player's phone changed (confirmed by the player, or changed by
|
|
347
|
+
* INVO support). Sent to every game the player is in. `new_phone` is present only for the
|
|
348
|
+
* game that requested the change (`new_phone_included: true`); every other game, and every
|
|
349
|
+
* game on a support change, gets `new_phone_masked` only. Store the new `identity_id` and
|
|
350
|
+
* re-mint the player's token. Never push the number you have stored back to INVO; if you
|
|
351
|
+
* need the full new number and did not receive it, ask the player.
|
|
352
|
+
*/
|
|
353
|
+
interface PlayerPhoneChangedData {
|
|
354
|
+
player_email: string;
|
|
355
|
+
previous_phone_masked: string | null;
|
|
356
|
+
new_phone_masked: string | null;
|
|
357
|
+
/** `true` only for the game that requested the change; then `new_phone` is present. */
|
|
358
|
+
new_phone_included: boolean;
|
|
359
|
+
/** The full new number, E.164. Present only when `new_phone_included` is `true`. */
|
|
360
|
+
new_phone?: string;
|
|
361
|
+
changed_at: string;
|
|
362
|
+
/** `"player"` (confirmed by the player) or `"support"` (changed by INVO support). */
|
|
363
|
+
source: "player" | "support" | (string & {});
|
|
364
|
+
/** The player's new identity id. */
|
|
365
|
+
identity_id: string;
|
|
366
|
+
previous_identity_id: string;
|
|
275
367
|
[key: string]: unknown;
|
|
276
368
|
}
|
|
277
369
|
/**
|
|
@@ -334,7 +426,7 @@ interface SubscriptionRenewalFunding {
|
|
|
334
426
|
[key: string]: unknown;
|
|
335
427
|
}
|
|
336
428
|
/**
|
|
337
|
-
* The fee split for one renewal. On the card rail INVO's fee (`invo_fee_usd`) is
|
|
429
|
+
* The fee split for one renewal. On the card rail INVO's fee (`invo_fee_usd`) is 3.5% + $0.30
|
|
338
430
|
* on Open (5.5% + $0.50 on Merchant of Record) of the listed price (before tax). The 1.5%
|
|
339
431
|
* international card fee on a card issued outside the US is NOT inside `invo_fee_usd`: it is
|
|
340
432
|
* reported separately as `international_card_fee_usd` (also `pass_through_fees_usd`) and charged
|
|
@@ -712,7 +804,10 @@ type InvoWebhookEvent = (WebhookBase & {
|
|
|
712
804
|
data: SubscriptionRefundRejectedData;
|
|
713
805
|
}) | (WebhookBase & {
|
|
714
806
|
event_type: "payout.status_changed";
|
|
715
|
-
data:
|
|
807
|
+
data: PayoutStatusChangedData;
|
|
808
|
+
}) | (WebhookBase & {
|
|
809
|
+
event_type: "player.phone_changed";
|
|
810
|
+
data: PlayerPhoneChangedData;
|
|
716
811
|
}) | (WebhookBase & {
|
|
717
812
|
event_type: "webhook.test";
|
|
718
813
|
data: Record<string, unknown>;
|
|
@@ -821,6 +916,33 @@ declare class PlatformCommerceServer {
|
|
|
821
916
|
/** Poll an order's status: `completed` (balance immediately; card after the webhook),
|
|
822
917
|
* `pending_payment` (card awaiting confirmation), or `refunded`. */
|
|
823
918
|
getStatus(orderId: string | number, opts?: CallOptions): Promise<PlatformOrderStatusResult>;
|
|
919
|
+
/**
|
|
920
|
+
* One player's Platform Commerce purchases in your app, newest first, one page at a time
|
|
921
|
+
* (`GET /api/platform-commerce/purchase-history`). Each entry carries exactly the fields
|
|
922
|
+
* `getStatus` returns for that order (including `receiptNumber` / `receiptUrl` on a
|
|
923
|
+
* Merchant of Record card sale once issued). Pass `nextCursor` back as `cursor` for the
|
|
924
|
+
* next page; it is `null` on the last one. `iteratePurchaseHistory` walks every page.
|
|
925
|
+
*
|
|
926
|
+
* Refusals (`InvoError`; this route reports its code in `error_code`, surfaced as
|
|
927
|
+
* `err.code`): a blank `playerEmail` or a bad `limit` / `cursor` throws `INVALID_INPUT`
|
|
928
|
+
* before the network; `400 INVALID_INPUT`, `400 INVALID_CURSOR` (a cursor from another
|
|
929
|
+
* player), `404 PLAYER_NOT_FOUND` (`err.isPlayerNotFound`), `403` for a non-platform
|
|
930
|
+
* tenant (`err.isNotPlatformTenant`), `429` (back off; `err.retryAfter`). A GET, so
|
|
931
|
+
* transient failures are retried automatically.
|
|
932
|
+
*/
|
|
933
|
+
getPurchaseHistory(query: PlatformPurchaseHistoryQuery, opts?: CallOptions): Promise<PlatformPurchaseHistoryResult>;
|
|
934
|
+
/**
|
|
935
|
+
* Async iterator over ALL of a player's Platform Commerce purchases, newest first: pages
|
|
936
|
+
* through `getPurchaseHistory` by `nextCursor`, yielding one order at a time.
|
|
937
|
+
*
|
|
938
|
+
* ```ts
|
|
939
|
+
* for await (const order of invo.platformCommerce.iteratePurchaseHistory({ playerEmail })) { … }
|
|
940
|
+
* ```
|
|
941
|
+
*/
|
|
942
|
+
iteratePurchaseHistory(query: {
|
|
943
|
+
playerEmail: string;
|
|
944
|
+
pageSize?: number;
|
|
945
|
+
}, opts?: CallOptions): AsyncGenerator<PlatformOrderStatusResult, void, unknown>;
|
|
824
946
|
/**
|
|
825
947
|
* Refund a completed purchase. Provide EXACTLY ONE of `orderId` or `clientRequestId`.
|
|
826
948
|
* INVO retains its fee — the customer is made whole (balance re-credit or card refund)
|
|
@@ -1249,15 +1371,50 @@ declare class InvoServer {
|
|
|
1249
1371
|
* of date).
|
|
1250
1372
|
*
|
|
1251
1373
|
* Refusals: 409 `err.isPhoneChangeRequiresVerification` (the player has secured this
|
|
1252
|
-
* account, so the change needs the player's own confirmation
|
|
1253
|
-
*
|
|
1254
|
-
*
|
|
1374
|
+
* account, so the change needs the player's own confirmation: call `requestPhoneChange`;
|
|
1375
|
+
* `err.changeRequestEndpoint` names the route), 409 `err.isPhoneShareRefused` (the
|
|
1376
|
+
* number belongs to another email), 409 `err.isPendingTransfersToOldPhone` /
|
|
1377
|
+
* `err.isPendingTransfersToNewPhone` (transfers to the current or the new number are still
|
|
1378
|
+
* waiting to be collected), 404 `err.isPlayerNotFound`, 400 `INVALID_INPUT` / `INVALID_PHONE`, 429
|
|
1255
1379
|
* (`err.retryAfter`), 503 (could not be checked right now; try again shortly).
|
|
1256
1380
|
*
|
|
1257
1381
|
* Never auto-retried: a retry after a change that landed would answer `"unchanged"` and
|
|
1258
1382
|
* hide `identityRekeyed`.
|
|
1259
1383
|
*/
|
|
1260
1384
|
updatePlayerPhone(input: UpdatePlayerPhoneInput, opts?: CallOptions): Promise<UpdatePlayerPhoneResult>;
|
|
1385
|
+
/**
|
|
1386
|
+
* Ask the player to confirm a new phone number
|
|
1387
|
+
* (`POST /api/sdk/players/phone/change-requests`, HTTP 202). Use it when `updatePlayerPhone`
|
|
1388
|
+
* answers 409 `err.isPhoneChangeRequiresVerification`.
|
|
1389
|
+
*
|
|
1390
|
+
* Nothing about the player changes here. INVO emails the player a code and a link to a
|
|
1391
|
+
* page on INVO's site, and the player confirms there (plus their passkey on that page, or
|
|
1392
|
+
* an approval on their enrolled device, when they have one: see `confirmation`). Your game
|
|
1393
|
+
* never collects the code and never receives the link: do not ask the player for it.
|
|
1394
|
+
* Follow up with `getPhoneChange`, or wait for the `player.phone_changed` webhook.
|
|
1395
|
+
*
|
|
1396
|
+
* Refusals carry `err.code`, for example 409 `PHONE_SAME`, `PHONE_IN_USE_BY_ANOTHER_PLAYER`,
|
|
1397
|
+
* `PENDING_TRANSFERS_TO_NEW_PHONE` (`err.isPendingTransfersToNewPhone`),
|
|
1398
|
+
* `PENDING_TRANSFERS_TO_OLD_PHONE` (`err.isPendingTransfersToOldPhone`),
|
|
1399
|
+
* `CHANGE_REQUEST_IN_PROGRESS` (`err.isChangeRequestInProgress`), `PHONE_CHANGE_LOCKED`
|
|
1400
|
+
* (`err.isPhoneChangeLocked`), `PHONE_CHANGE_RECOVERY_COOLDOWN`
|
|
1401
|
+
* (`err.isPhoneChangeRecoveryCooldown`), `STEP_UP_UNAVAILABLE`, `WALLET_SECURED`,
|
|
1402
|
+
* `PHONE_NOT_SET`;
|
|
1403
|
+
* 429 `err.isTooManyChangeRequests`; 404 `err.isPlayerNotFound`; 503
|
|
1404
|
+
* `err.isPhoneChangeUnavailable`.
|
|
1405
|
+
*
|
|
1406
|
+
* Never auto-retried: a new request replaces your earlier pending one and sends the player
|
|
1407
|
+
* another email.
|
|
1408
|
+
*/
|
|
1409
|
+
requestPhoneChange(input: RequestPhoneChangeInput, opts?: CallOptions): Promise<RequestPhoneChangeResult>;
|
|
1410
|
+
/**
|
|
1411
|
+
* Read a change request your game created
|
|
1412
|
+
* (`GET /api/sdk/players/phone/change-requests/{changeRequestId}`). `status` is `pending`,
|
|
1413
|
+
* `confirmed`, `expired`, `cancelled`, `refused` or `denied`. A request another game
|
|
1414
|
+
* created, or an unknown id, is 404 `err.isChangeRequestNotFound`. Poll sparingly, or wait
|
|
1415
|
+
* for the `player.phone_changed` webhook.
|
|
1416
|
+
*/
|
|
1417
|
+
getPhoneChange(changeRequestId: string, opts?: CallOptions): Promise<PhoneChangeRequest>;
|
|
1261
1418
|
/**
|
|
1262
1419
|
* Initiate a cross-game currency SEND. Inspect result.verificationMethod.
|
|
1263
1420
|
*
|
|
@@ -1283,7 +1440,7 @@ declare class InvoServer {
|
|
|
1283
1440
|
* - rail "game": returns status "pending_payment" + paymentUrl (redirect the browser).
|
|
1284
1441
|
* - rail "steam": NOT a browser flow — the backend returns WRONG_RAIL_ENDPOINT.
|
|
1285
1442
|
*
|
|
1286
|
-
* INVO's card fee (
|
|
1443
|
+
* INVO's card fee (3.5% + $0.30 on Open, 5.5% + $0.50 on Merchant of Record, plus 1.5% of
|
|
1287
1444
|
* the listed price (before tax) on a card issued outside the US) is charged to you, the partner. The player
|
|
1288
1445
|
* pays the listed price (plus any tax) and receives the listed coins. Card purchases only;
|
|
1289
1446
|
* purchases through a third-party storefront or payment rail are unaffected. Two shapes,
|
|
@@ -1313,9 +1470,9 @@ declare class InvoServer {
|
|
|
1313
1470
|
*
|
|
1314
1471
|
* The player pays the listed price plus any tax (when you pass `country`) and receives the
|
|
1315
1472
|
* listed coins: `totalUsd` carries no card fee, and `processingFeeUsd` is `"0.00"`. INVO's
|
|
1316
|
-
* card fee (
|
|
1473
|
+
* card fee (3.5% + $0.30 on Open, 5.5% + $0.50 on Merchant of Record) is charged to you;
|
|
1317
1474
|
* `partnerFeeUsd` carries it when INVO sends it. $10.00 quotes a $10.00 total, 100.00 coins
|
|
1318
|
-
* at the default 10 per USD, and a $0.
|
|
1475
|
+
* at the default 10 per USD, and a $0.65 partner fee on Open. Show the player `totalUsd`,
|
|
1319
1476
|
* then send the same figure back as `acknowledgedTotalUsd` on {@link purchaseCurrency}; the
|
|
1320
1477
|
* card is never charged more than that. `ifUnacknowledged` shows the purchase without the
|
|
1321
1478
|
* acknowledgement (the card charged exactly `usdAmount`), or `null` when INVO sends none.
|
|
@@ -1426,6 +1583,42 @@ declare class InvoServer {
|
|
|
1426
1583
|
playerEmail: string;
|
|
1427
1584
|
pageSize?: number;
|
|
1428
1585
|
}, opts?: CallOptions): AsyncGenerator<Record<string, unknown>, void, unknown>;
|
|
1586
|
+
/**
|
|
1587
|
+
* One merged, newest-first list of a player's money activity in your game, one page at a
|
|
1588
|
+
* time (`GET /api/sdk/players/activity`): currency purchases, item purchases, Platform
|
|
1589
|
+
* Commerce purchases, sends and transfers, in both directions. Only rows where your game
|
|
1590
|
+
* is a party through this player are listed; the other side of a cross-game send or
|
|
1591
|
+
* transfer is named by game only (`counterpartyGame`).
|
|
1592
|
+
*
|
|
1593
|
+
* An inbound (`direction: "in"`) send or transfer is listed as soon as it names this
|
|
1594
|
+
* player, in ANY status (awaiting collection, completed, expired, refunded): read `status`
|
|
1595
|
+
* and `statusDetail` before treating it as credited. `direction` is `"in"` / `"out"` /
|
|
1596
|
+
* `"self"`, not the `"incoming"` / `"outgoing"` of the per-type history reads.
|
|
1597
|
+
*
|
|
1598
|
+
* Pass `nextCursor` back as `cursor` (with the same `types`) for the next page; it is
|
|
1599
|
+
* `null` on the last one. `iteratePlayerActivity` walks every page.
|
|
1600
|
+
*
|
|
1601
|
+
* Refusals (`InvoError`): a blank `playerEmail` or a bad `limit` / `cursor` / `types`
|
|
1602
|
+
* throws `INVALID_INPUT` before the network; `400 INVALID_INPUT` (for example an unknown
|
|
1603
|
+
* kind in `types`), `400 INVALID_CURSOR` (a cursor from another player or other `types`),
|
|
1604
|
+
* `401 INVALID_GAME_SECRET`, `404 PLAYER_NOT_FOUND` (`err.isPlayerNotFound`),
|
|
1605
|
+
* `500 PLAYER_ACTIVITY_FAILED` (retry later), `429` (back off; `err.retryAfter`). A GET, so
|
|
1606
|
+
* transient failures are retried automatically.
|
|
1607
|
+
*/
|
|
1608
|
+
getPlayerActivity(query: PlayerActivityQuery, opts?: CallOptions): Promise<PlayerActivityResult>;
|
|
1609
|
+
/**
|
|
1610
|
+
* Async iterator over a player's ENTIRE activity, newest first: pages through
|
|
1611
|
+
* `getPlayerActivity` by `nextCursor`, yielding one row at a time.
|
|
1612
|
+
*
|
|
1613
|
+
* ```ts
|
|
1614
|
+
* for await (const row of invo.iteratePlayerActivity({ playerEmail, types: ["send", "transfer"] })) { … }
|
|
1615
|
+
* ```
|
|
1616
|
+
*/
|
|
1617
|
+
iteratePlayerActivity(query: {
|
|
1618
|
+
playerEmail: string;
|
|
1619
|
+
types?: PlayerActivityQuery["types"];
|
|
1620
|
+
pageSize?: number;
|
|
1621
|
+
}, opts?: CallOptions): AsyncGenerator<PlayerActivityEntry, void, unknown>;
|
|
1429
1622
|
/**
|
|
1430
1623
|
* Read a player's currency balances by email (server-side, game-secret).
|
|
1431
1624
|
*
|
|
@@ -1664,4 +1857,4 @@ declare class InvoServer {
|
|
|
1664
1857
|
private toInitiateResult;
|
|
1665
1858
|
}
|
|
1666
1859
|
|
|
1667
|
-
export { ApproveWithDeviceCodeInput, BeginDeviceApprovalInput, CallOptions, CancelResult, CancelSubscriptionOptions, CardSetupConfirmInput, CardSetupConfirmResult, CardSetupInput, CardSetupResult, CardSetupSessionInput, CardSetupSessionResult, CardsServer, ChangeAmountResult, ClaimCurrencyInput, ClaimResult, ClaimTransferInput, CompleteDeviceApprovalInput, CompleteDeviceApprovalResult, ConfirmDeviceEnrollmentInput, ConfirmDeviceEnrollmentResult, ConfirmPaymentResult, CreateCheckoutInput, CreateCheckoutResult, CreateSubscriptionInput, CurrencyPurchaseQuote, CurrencyPurchaseQuoteInput, DestinationsResult, DeviceApprovalGrant, DeviceApprovalPollResult, DeviceApprovalSettleResult, GetSubscriptionOptions, GetSubscriptionResult, GuardianApprovalStatusResult, InboundPendingQuery, InboundPendingResult, InitiateResult, InitiateSendInput, InitiateTransferInput, InvoError, InvoServer, type InvoWebhookEvent, ItemHistoryQuery, ItemHistoryResult, ItemOrderQuery, type ItemPurchasedData, LinkedIdentitiesQuery, LinkedIdentitiesResult, ListSubscriptionsOptions, LoyaltyCardsResult, MintPlayerTokenInput, OrderDetailsResult, PhoneShareApproveInput, PhoneShareApproveResult, PhoneShareContact, PhoneShareInitiateResult, PhoneShareStatusResult, type PlatformCommercePurchasedData, type PlatformCommerceRefundedData, PlatformCommerceServer, PlatformOrderStatusResult, PlatformPurchaseInput, PlatformPurchaseResult, PlatformRefundInput, PlatformRefundResult, PlayerBalanceQuery, PlayerBalanceResult, PlayerCardsResult, PlayerToken, PollDeviceApprovalInput, type PurchaseCompletedData, type PurchaseEventData, PurchaseInput, PurchaseItemInput, PurchaseItemResult, PurchaseResult, RefundResult, RefundSubscriptionInput, RegisterPlayerInput, RegisterPlayerResult, SDK_VERSION, SandboxClockResult, SandboxFailureOutcome, SandboxForceAuthChallengeOptions, SandboxForceFailureOptions, SandboxServer, SandboxSubscriptionsServer, ServerConfig, ServerDestinationsQuery, SetPaymentMethodInput, SetPaymentMethodResult, SmsVerifyResult, SteamFinalizeInput, SteamFinalizeResult, SteamFinalizeSubscriptionResult, SteamInitPurchaseInput, SteamInitPurchaseResult, SteamInitResult, SteamPacksQuery, SteamPacksResult, SteamSubscriptionInitInput, type SubscriptionAuthenticationRequiredData, type SubscriptionCanceledData, type SubscriptionEventCommon, type SubscriptionExpiredData, SubscriptionListResult, type SubscriptionPastDueData, type SubscriptionPaymentFailedData, type SubscriptionRefundApprovedData, type SubscriptionRefundDetail, type SubscriptionRefundRejectedData, type SubscriptionRefundRequestData, type SubscriptionRefundedData, type SubscriptionRenewalFunding, type SubscriptionRenewalSplit, type SubscriptionRenewedData, SubscriptionResult, type SubscriptionRevenueShareAttribution, type SubscriptionTrialEventFields, SubscriptionsServer, TransactionStatusResult, type TransferEventData, UpdatePlayerPhoneInput, UpdatePlayerPhoneResult, type VerifyWebhookOptions, type WebhookHandlerOptions, createWebhookHandler, verifyWebhook, verifyWebhookAsync };
|
|
1860
|
+
export { ApproveWithDeviceCodeInput, BeginDeviceApprovalInput, CallOptions, CancelResult, CancelSubscriptionOptions, CardSetupConfirmInput, CardSetupConfirmResult, CardSetupInput, CardSetupResult, CardSetupSessionInput, CardSetupSessionResult, CardsServer, ChangeAmountResult, ClaimCurrencyInput, ClaimResult, ClaimTransferInput, CompleteDeviceApprovalInput, CompleteDeviceApprovalResult, ConfirmDeviceEnrollmentInput, ConfirmDeviceEnrollmentResult, ConfirmPaymentResult, CreateCheckoutInput, CreateCheckoutResult, CreateSubscriptionInput, CurrencyPurchaseQuote, CurrencyPurchaseQuoteInput, DestinationsResult, DeviceApprovalGrant, DeviceApprovalPollResult, DeviceApprovalSettleResult, GetSubscriptionOptions, GetSubscriptionResult, GuardianApprovalStatusResult, InboundPendingQuery, InboundPendingResult, InitiateResult, InitiateSendInput, InitiateTransferInput, InvoError, InvoServer, type InvoWebhookEvent, ItemHistoryQuery, ItemHistoryResult, ItemOrderQuery, type ItemPurchasedData, LinkedIdentitiesQuery, LinkedIdentitiesResult, ListSubscriptionsOptions, LoyaltyCardsResult, MintPlayerTokenInput, OrderDetailsResult, type PayoutStatusChangedData, PhoneChangeRequest, PhoneShareApproveInput, PhoneShareApproveResult, PhoneShareContact, PhoneShareInitiateResult, PhoneShareStatusResult, type PlatformCommercePurchasedData, type PlatformCommerceRefundedData, PlatformCommerceServer, PlatformOrderStatusResult, PlatformPurchaseHistoryQuery, PlatformPurchaseHistoryResult, PlatformPurchaseInput, PlatformPurchaseResult, PlatformRefundInput, PlatformRefundResult, PlayerActivityEntry, PlayerActivityQuery, PlayerActivityResult, PlayerBalanceQuery, PlayerBalanceResult, PlayerCardsResult, type PlayerPhoneChangedData, PlayerToken, PollDeviceApprovalInput, type PurchaseCompletedData, type PurchaseEventData, PurchaseInput, PurchaseItemInput, PurchaseItemResult, PurchaseResult, RefundResult, RefundSubscriptionInput, RegisterPlayerInput, RegisterPlayerResult, RequestPhoneChangeInput, RequestPhoneChangeResult, SDK_VERSION, SandboxClockResult, SandboxFailureOutcome, SandboxForceAuthChallengeOptions, SandboxForceFailureOptions, SandboxServer, SandboxSubscriptionsServer, ServerConfig, ServerDestinationsQuery, SetPaymentMethodInput, SetPaymentMethodResult, SmsVerifyResult, SteamFinalizeInput, SteamFinalizeResult, SteamFinalizeSubscriptionResult, SteamInitPurchaseInput, SteamInitPurchaseResult, SteamInitResult, SteamPacksQuery, SteamPacksResult, SteamSubscriptionInitInput, type SubscriptionAuthenticationRequiredData, type SubscriptionCanceledData, type SubscriptionEventCommon, type SubscriptionExpiredData, SubscriptionListResult, type SubscriptionPastDueData, type SubscriptionPaymentFailedData, type SubscriptionRefundApprovedData, type SubscriptionRefundDetail, type SubscriptionRefundRejectedData, type SubscriptionRefundRequestData, type SubscriptionRefundedData, type SubscriptionRenewalFunding, type SubscriptionRenewalSplit, type SubscriptionRenewedData, SubscriptionResult, type SubscriptionRevenueShareAttribution, type SubscriptionTrialEventFields, SubscriptionsServer, TransactionStatusResult, type TransferEventData, UpdatePlayerPhoneInput, UpdatePlayerPhoneResult, type VerifyWebhookOptions, type WebhookHandlerOptions, createWebhookHandler, verifyWebhook, verifyWebhookAsync };
|