@invonetwork/web-sdk 3.35.0 → 3.37.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 +17 -0
- package/README.md +49 -2
- package/dist/{chunk-SCFK6IVH.js → chunk-AUHRMREF.js} +3 -3
- package/dist/{chunk-BGCSSWVL.js → chunk-KWAUFFDY.js} +23 -2
- package/dist/chunk-MENRG67H.js +6 -0
- package/dist/{chunk-XN6MCLQV.js → chunk-ZHEQAZLW.js} +32 -9
- package/dist/game-server.cjs +50 -6
- package/dist/game-server.d.cts +4 -4
- package/dist/game-server.d.ts +4 -4
- package/dist/game-server.js +5 -5
- package/dist/game.cjs +22 -1
- package/dist/game.d.cts +3 -3
- package/dist/game.d.ts +3 -3
- package/dist/game.js +3 -3
- package/dist/{hosted-approval-VQ3uyeDh.d.cts → hosted-approval-DS9gcCF5.d.cts} +1 -1
- package/dist/{hosted-approval-DIYUGgHi.d.ts → hosted-approval-Dv462L4e.d.ts} +1 -1
- package/dist/index.cjs +21 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/{server-CMJHOmYL.d.ts → server-B7Pw1HMp.d.ts} +27 -2
- package/dist/{server-DF-BZU0B.d.cts → server-B9PtYZaM.d.cts} +27 -2
- package/dist/server.cjs +50 -6
- package/dist/server.d.cts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js +3 -3
- package/dist/{types-Dv0UavA9.d.cts → types-BdKpJX93.d.cts} +42 -2
- package/dist/{types-Dv0UavA9.d.ts → types-BdKpJX93.d.ts} +42 -2
- package/dist/{version-DB2wgiPY.d.cts → version-CuhMO-6s.d.cts} +1 -1
- package/dist/{version-DB2wgiPY.d.ts → version-CuhMO-6s.d.ts} +1 -1
- package/docs/apple-in-app-purchases.md +53 -10
- package/package.json +1 -1
- package/dist/chunk-6763YM7P.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.37.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Payouts when your billing account owes INVO. On the Steam and Apple rails Steam or Apple pays you directly and INVO bills you for the coins through your billing account, charging the card on file first. If the billing account still owes INVO when a payout is created, INVO now settles that amount from the payout and pays you the rest. All additive.
|
|
8
|
+
|
|
9
|
+
- `Payout` gains `offset_float_usd` and `amount_before_offset_usd` (as the server sends them) and the mapped `offsetFloatUsd` and `amountBeforeOffsetUsd` on `requestPayout`, `getPayout`, `listPayouts` and `cancelPayout`. They are present only when something was settled; `requested_amount_usd` is then the cash part. A payout with nothing settled is returned exactly as before.
|
|
10
|
+
- `payout.status_changed` webhook data types the same two snake_case fields.
|
|
11
|
+
- `InvoError` predicates: `isFloatDebtOutstanding` (`FLOAT_DEBT_OUTSTANDING`, 409: the amount owed is more than the payout less the minimum; nothing was created) with `floatDebtUsd`, and `isFloatCheckUnavailable` (`FLOAT_CHECK_UNAVAILABLE`, 503, retryable).
|
|
12
|
+
- README: a new "Payouts when your billing account owes INVO" section.
|
|
13
|
+
|
|
14
|
+
## 3.36.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- `steamPacks()` now returns availability: `canSell` and `unavailableReason` for the title, and `available` / `unavailableReason` on each pack (new `SteamUnavailableReason` type: `PARTNER_BILLING_NOT_SET_UP`, `PARTNER_RAIL_SUSPENDED`, `PARTNER_CREDIT_UNAVAILABLE`). Call it before showing the store and hide packs with `available: false`. All fields are optional and absent on an older server, so existing code keeps working. Docs: the Apple guide adds the In-App Purchase API key prerequisite (a console action, nothing new in the SDK) and the self-serve verification it enables; the README's Steam section covers availability, `STEAM_APP_LOCKED` and the `STEAM_ORDERS_AFFECTED` revoke notice.
|
|
19
|
+
|
|
3
20
|
## 3.35.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -724,8 +724,11 @@ pass a `packId` back.
|
|
|
724
724
|
|
|
725
725
|
```ts
|
|
726
726
|
// 1. The catalogue, priced for THIS player. Always pass steamid.
|
|
727
|
-
const { packs, country, vatRatePct } = await server.steamPacks({ steamid: steamId });
|
|
728
|
-
// packs: [{ packId, label, priceUsd, currencyAmount }, ...]
|
|
727
|
+
const { packs, canSell, country, vatRatePct } = await server.steamPacks({ steamid: steamId });
|
|
728
|
+
// packs: [{ packId, label, priceUsd, currencyAmount, available, unavailableReason }, ...]
|
|
729
|
+
// Call it before showing the store. Hide the store when canSell is false, and
|
|
730
|
+
// show only packs with available !== false (3.36.0; absent on older servers).
|
|
731
|
+
const offer = canSell === false ? [] : packs.filter((p) => p.available !== false);
|
|
729
732
|
|
|
730
733
|
// 2. Start the purchase with the pack the player chose.
|
|
731
734
|
const init = await server.steamInitPurchase({
|
|
@@ -750,6 +753,21 @@ const done = await server.steamFinalizePurchase({ orderId: init.orderId });
|
|
|
750
753
|
// credited === true means the currency is in; see "credited: did the coins arrive?" above.
|
|
751
754
|
```
|
|
752
755
|
|
|
756
|
+
**Availability (3.36.0).** `steamPacks()` also says whether INVO will sell each pack
|
|
757
|
+
right now for your billing: `canSell` / `unavailableReason` for the title, and per pack
|
|
758
|
+
`available` / `unavailableReason`. The reason is `PARTNER_BILLING_NOT_SET_UP`,
|
|
759
|
+
`PARTNER_RAIL_SUSPENDED` or `PARTNER_CREDIT_UNAVAILABLE`, all fixed by the studio in the
|
|
760
|
+
INVO console, never by the player. A larger pack can be unavailable while smaller ones
|
|
761
|
+
still sell. It is advisory: `steamInitPurchase()` still decides, so keep handling the
|
|
762
|
+
refusals below.
|
|
763
|
+
|
|
764
|
+
**The Steam key is a console setting.** Rotating the publisher key for the same app is
|
|
765
|
+
always allowed. Once the title has sold through a Steam app id, that app id cannot
|
|
766
|
+
change (`409 STEAM_APP_LOCKED`). Revoking the key while purchases are in progress or
|
|
767
|
+
recent purchases are still refundable answers with `notice.code: "STEAM_ORDERS_AFFECTED"`:
|
|
768
|
+
INVO stops completing those purchases and detecting their refunds until a key for the
|
|
769
|
+
same app is added again.
|
|
770
|
+
|
|
753
771
|
**The price is identical everywhere; the currency inside is not.** Steam prices are
|
|
754
772
|
VAT-inclusive wherever VAT is collected, and the storefront's revenue share comes out
|
|
755
773
|
before currency is derived — so the same `$9.99` pack yields **69** units in the US
|
|
@@ -2797,6 +2815,35 @@ The first payout to a creator registered with the game key carries `owner_confir
|
|
|
2797
2815
|
|
|
2798
2816
|
Refusals carry `err.code`: `PAYEE_NOT_FOUND`, `PAYEE_NOT_VERIFIED` (not `verified` right now: check the status), `PAYEE_VERIFICATION_EXPIRED`, `PAYEE_BANK_NOT_VERIFIED`, `PAYEE_CLOSED`, `PAYEE_TERMS_NOT_ACCEPTED` (the creator hasn't accepted INVO's current Payee Terms yet), `PAYEE_NOT_PAYABLE` (the creator can't be paid right now; no action is needed from you or the creator; try again later), `INSUFFICIENT_OWED_BALANCE`, `IDEMPOTENCY_KEY_REUSED`, `PAYOUT_NOT_CANCELLABLE`. Registering: `PARTNER_REFERENCE_CONFLICT`, `COUNTRY_NOT_SUPPORTED`, `GAME_HAS_NO_OWNER`. Resending an invite: `INVITE_NOT_NEEDED`, `PAYEE_ERASED`, `INVITE_RATE_LIMITED` (wait `retry_after_seconds`). A completed payout the bank sends back reads `returned` with `return_reason_code` (always `"returned"` on a creator payout). `partner_message` is a note INVO wrote for you. Each creator carries `payable` and `payable_blockers` (`erased`, `closed`, `not_verified`, `verification_expired`, `terms_not_accepted`, `bank_not_verified`, `not_payable_now`): check `payable` before offering a payout. Removing a creator with a payout still being processed is refused with `PAYEE_HAS_PAYOUTS_IN_FLIGHT` (`payouts_in_flight_by_status` counts them; a `requested` one can be cancelled).
|
|
2799
2817
|
|
|
2818
|
+
### Payouts when your billing account owes INVO
|
|
2819
|
+
|
|
2820
|
+
On the Steam and Apple rails, Steam or Apple pays you directly and INVO bills you for the coins it issued through your billing account in the INVO console, charging the card on file first. If the billing account still owes INVO when a payout is created, INVO settles that amount from the payout and pays you the rest. Accounts that settle by invoice under an agreement are never netted. See [payouts when your account owes INVO](https://docs.invo.network/docs/partners#payouts-account-owes).
|
|
2821
|
+
|
|
2822
|
+
```ts
|
|
2823
|
+
try {
|
|
2824
|
+
const { payout } = await invo.payouts.requestPayout({
|
|
2825
|
+
amountUsd: "100.00",
|
|
2826
|
+
contactEmail: "ops@example.com",
|
|
2827
|
+
bankAccountId: 12,
|
|
2828
|
+
clientRequestId: crypto.randomUUID(),
|
|
2829
|
+
});
|
|
2830
|
+
if (payout.offsetFloatUsd) {
|
|
2831
|
+
// Billing account owed $40.00: payout.offsetFloatUsd "40.00",
|
|
2832
|
+
// payout.amountBeforeOffsetUsd "100.00", payout.requested_amount_usd "60.00" (the cash part).
|
|
2833
|
+
// The payout fee is on the cash part only.
|
|
2834
|
+
}
|
|
2835
|
+
} catch (err) {
|
|
2836
|
+
if (err instanceof InvoError && err.isFloatDebtOutstanding) {
|
|
2837
|
+
// 409: the amount owed (err.floatDebtUsd, e.g. "95.00") is more than this payout less the
|
|
2838
|
+
// $10 minimum. Nothing was created. Ask for more, or retry after the card is charged.
|
|
2839
|
+
} else if (err instanceof InvoError && err.isFloatCheckUnavailable) {
|
|
2840
|
+
// 503, retryable: nothing was changed. Retry with the same clientRequestId.
|
|
2841
|
+
} else throw err;
|
|
2842
|
+
}
|
|
2843
|
+
```
|
|
2844
|
+
|
|
2845
|
+
`offsetFloatUsd` and `amountBeforeOffsetUsd` (and the server's `offset_float_usd` / `amount_before_offset_usd`, also on `payout.status_changed`) are present only when something was settled: absent, never `"0.00"`, otherwise. What was settled stays settled if the payout is later rejected, fails or is returned; only the cash part is owed to you again. If a card charge fails, INVO also applies your earnings to the amount owed once an hour and emails the account owner each time.
|
|
2846
|
+
|
|
2800
2847
|
## Webhooks
|
|
2801
2848
|
|
|
2802
2849
|
The synchronous responses are for UX; **reconcile and grant value off webhooks.** They're HMAC-signed; **dedupe on the `X-Invo-Idempotency-Key` header** (stable across retries/replays — *not* `X-Invo-Event-Id`, which changes per delivery).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InvoError, assertSecureBaseUrl, Http, toPurchaseStatusResult, toPhoneChangeApprovalsResult, phoneChangeSignalMessage, toApprovePhoneChangeResult, toDestinationsResult, toLoyaltyCardsResult, toLoyaltyVaultResult, toRedeemRewardResult, toRewardsPageLink, buildGameEventBody, toReportGameEventResult } from './chunk-
|
|
1
|
+
import { InvoError, assertSecureBaseUrl, Http, toPurchaseStatusResult, toPhoneChangeApprovalsResult, phoneChangeSignalMessage, toApprovePhoneChangeResult, toDestinationsResult, toLoyaltyCardsResult, toLoyaltyVaultResult, toRedeemRewardResult, toRewardsPageLink, buildGameEventBody, toReportGameEventResult } from './chunk-KWAUFFDY.js';
|
|
2
2
|
|
|
3
3
|
// src/shared/webauthn.ts
|
|
4
4
|
function malformedOptions(field) {
|
|
@@ -1586,5 +1586,5 @@ var InvoClient = class {
|
|
|
1586
1586
|
};
|
|
1587
1587
|
|
|
1588
1588
|
export { CheckoutClient, InvoClient, PlatformCommerceClient };
|
|
1589
|
-
//# sourceMappingURL=chunk-
|
|
1590
|
-
//# sourceMappingURL=chunk-
|
|
1589
|
+
//# sourceMappingURL=chunk-AUHRMREF.js.map
|
|
1590
|
+
//# sourceMappingURL=chunk-AUHRMREF.js.map
|
|
@@ -335,6 +335,27 @@ var InvoError = class _InvoError extends Error {
|
|
|
335
335
|
get isPartnerRailSuspended() {
|
|
336
336
|
return this.code === "PARTNER_RAIL_SUSPENDED";
|
|
337
337
|
}
|
|
338
|
+
/** A payout or withdrawal was refused because the billing account owes INVO more for
|
|
339
|
+
* Steam or Apple coins than this payout can settle (`FLOAT_DEBT_OUTSTANDING`, 409;
|
|
340
|
+
* additive, 3.37.0). Nothing was created. {@link floatDebtUsd} is what is owed; the
|
|
341
|
+
* message is safe to show the account owner. Ask for a larger amount, or retry once the
|
|
342
|
+
* card on file has been charged. */
|
|
343
|
+
get isFloatDebtOutstanding() {
|
|
344
|
+
return this.code === "FLOAT_DEBT_OUTSTANDING";
|
|
345
|
+
}
|
|
346
|
+
/** On `FLOAT_DEBT_OUTSTANDING`: what the billing account owes (`float_debt_usd`), USD
|
|
347
|
+
* decimal string, for example `"95.00"`. `undefined` when the body does not carry it. */
|
|
348
|
+
get floatDebtUsd() {
|
|
349
|
+
const v = this.bodyObject()["float_debt_usd"];
|
|
350
|
+
if (typeof v === "number" && Number.isFinite(v)) return v.toFixed(2);
|
|
351
|
+
return typeof v === "string" && v ? v : void 0;
|
|
352
|
+
}
|
|
353
|
+
/** The billing account could not be checked, so the payout or withdrawal was not created
|
|
354
|
+
* (`FLOAT_CHECK_UNAVAILABLE`, 503, `retryable: true`; additive, 3.37.0). Nothing was
|
|
355
|
+
* changed. Retry with the same idempotency key. */
|
|
356
|
+
get isFloatCheckUnavailable() {
|
|
357
|
+
return this.code === "FLOAT_CHECK_UNAVAILABLE";
|
|
358
|
+
}
|
|
338
359
|
/** True when INVO has paused new payments on the developer account
|
|
339
360
|
* (`PAYMENTS_PAUSED`, 403; additive, 3.32.0). Every call that starts a payment returns it:
|
|
340
361
|
* coin purchase, checkout session, Platform Commerce card purchase, new
|
|
@@ -1876,5 +1897,5 @@ function toApprovePhoneChangeResult(raw, changeRequestId) {
|
|
|
1876
1897
|
}
|
|
1877
1898
|
|
|
1878
1899
|
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 };
|
|
1879
|
-
//# sourceMappingURL=chunk-
|
|
1880
|
-
//# sourceMappingURL=chunk-
|
|
1900
|
+
//# sourceMappingURL=chunk-KWAUFFDY.js.map
|
|
1901
|
+
//# sourceMappingURL=chunk-KWAUFFDY.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SDK_VERSION } from './chunk-
|
|
2
|
-
import { InvoError, assertSecureBaseUrl, Http, toRequestPhoneChangeResult, toPhoneChangeRequest, toPurchaseStatusResult, receiptFields, creditFields, toLoyaltyCardsResult, buildGameEventBody, toReportGameEventResult, toDestinationsResult } from './chunk-
|
|
1
|
+
import { SDK_VERSION } from './chunk-MENRG67H.js';
|
|
2
|
+
import { InvoError, assertSecureBaseUrl, Http, toRequestPhoneChangeResult, toPhoneChangeRequest, toPurchaseStatusResult, receiptFields, creditFields, toLoyaltyCardsResult, buildGameEventBody, toReportGameEventResult, toDestinationsResult } from './chunk-KWAUFFDY.js';
|
|
3
3
|
import { createHmac, timingSafeEqual } from 'crypto';
|
|
4
4
|
|
|
5
5
|
// src/shared/apple.ts
|
|
@@ -116,6 +116,20 @@ function query(params) {
|
|
|
116
116
|
}
|
|
117
117
|
return parts.length ? `?${parts.join("&")}` : "";
|
|
118
118
|
}
|
|
119
|
+
function moneyString(v) {
|
|
120
|
+
if (typeof v === "number" && Number.isFinite(v)) return v.toFixed(2);
|
|
121
|
+
return typeof v === "string" && v ? v : void 0;
|
|
122
|
+
}
|
|
123
|
+
function withOffsetFields(p) {
|
|
124
|
+
if (!p || typeof p !== "object") return p;
|
|
125
|
+
const offset = moneyString(p["offset_float_usd"]);
|
|
126
|
+
const before = moneyString(p["amount_before_offset_usd"]);
|
|
127
|
+
if (offset === void 0 && before === void 0) return p;
|
|
128
|
+
const out = { ...p };
|
|
129
|
+
if (offset !== void 0) out.offsetFloatUsd = offset;
|
|
130
|
+
if (before !== void 0) out.amountBeforeOffsetUsd = before;
|
|
131
|
+
return out;
|
|
132
|
+
}
|
|
119
133
|
function payeePath(payeeId) {
|
|
120
134
|
return `/api/partner-payees/${encodeURIComponent(requireText("payeeId", payeeId))}`;
|
|
121
135
|
}
|
|
@@ -241,7 +255,7 @@ var PayoutsServer = class {
|
|
|
241
255
|
signal: opts?.signal
|
|
242
256
|
});
|
|
243
257
|
return {
|
|
244
|
-
payout: raw["payout_request"],
|
|
258
|
+
payout: withOffsetFields(raw["payout_request"]),
|
|
245
259
|
duplicate: raw["duplicate"] === true,
|
|
246
260
|
raw
|
|
247
261
|
};
|
|
@@ -253,7 +267,7 @@ var PayoutsServer = class {
|
|
|
253
267
|
this.auth,
|
|
254
268
|
{ signal: opts?.signal }
|
|
255
269
|
);
|
|
256
|
-
return raw["payout_request"];
|
|
270
|
+
return withOffsetFields(raw["payout_request"]);
|
|
257
271
|
}
|
|
258
272
|
/** Your payouts (`GET /api/partner-payouts`), optionally one creator's (`payeeId`). */
|
|
259
273
|
async listPayouts(q = {}, opts) {
|
|
@@ -262,7 +276,7 @@ var PayoutsServer = class {
|
|
|
262
276
|
this.auth,
|
|
263
277
|
{ signal: opts?.signal }
|
|
264
278
|
);
|
|
265
|
-
return { total: Number(raw["total"] ?? 0), items: raw["items"] ?? [], raw };
|
|
279
|
+
return { total: Number(raw["total"] ?? 0), items: (raw["items"] ?? []).map((p) => withOffsetFields(p)), raw };
|
|
266
280
|
}
|
|
267
281
|
/**
|
|
268
282
|
* Cancel a creator payout that is still `requested`
|
|
@@ -276,7 +290,7 @@ var PayoutsServer = class {
|
|
|
276
290
|
this.auth,
|
|
277
291
|
{ signal: opts?.signal }
|
|
278
292
|
);
|
|
279
|
-
return raw["payout_request"] ?? raw["payout"];
|
|
293
|
+
return withOffsetFields(raw["payout_request"] ?? raw["payout"]);
|
|
280
294
|
}
|
|
281
295
|
};
|
|
282
296
|
|
|
@@ -2959,6 +2973,10 @@ var InvoServer = class {
|
|
|
2959
2973
|
* answer for all players. Without `steamid` the quote assumes no VAT — the
|
|
2960
2974
|
* most any pack yields; the purchase itself always re-derives.
|
|
2961
2975
|
*
|
|
2976
|
+
* Availability (3.36.0): `canSell` / `unavailableReason` for the title, and
|
|
2977
|
+
* per pack `available` / `unavailableReason`. Call this before showing the
|
|
2978
|
+
* store and hide packs with `available: false`; init still decides.
|
|
2979
|
+
*
|
|
2962
2980
|
* Refusals: `err.isSteamRailNotEntitled` (403). A missing Steam
|
|
2963
2981
|
* registration does NOT refuse here — packs deliberately answers with the
|
|
2964
2982
|
* no-VAT catalogue and lets the PURCHASE be what refuses; the only 503 is
|
|
@@ -2977,10 +2995,15 @@ var InvoServer = class {
|
|
|
2977
2995
|
packId: String(p["pack_id"] ?? ""),
|
|
2978
2996
|
label: String(p["label"] ?? ""),
|
|
2979
2997
|
priceUsd: String(p["price_usd"] ?? ""),
|
|
2980
|
-
currencyAmount: String(p["currency_amount"] ?? "")
|
|
2998
|
+
currencyAmount: String(p["currency_amount"] ?? ""),
|
|
2999
|
+
// Availability (3.36.0) is additive: set only when the server sent it.
|
|
3000
|
+
...typeof p["available"] === "boolean" ? { available: p["available"] } : {},
|
|
3001
|
+
..."unavailable_reason" in p ? { unavailableReason: p["unavailable_reason"] ?? null } : {}
|
|
2981
3002
|
})),
|
|
2982
3003
|
country: raw["country"] ?? null,
|
|
2983
3004
|
vatRatePct: String(raw["vat_rate_pct"] ?? "0"),
|
|
3005
|
+
...typeof raw["can_sell"] === "boolean" ? { canSell: raw["can_sell"] } : {},
|
|
3006
|
+
..."unavailable_reason" in raw ? { unavailableReason: raw["unavailable_reason"] ?? null } : {},
|
|
2984
3007
|
raw
|
|
2985
3008
|
};
|
|
2986
3009
|
}
|
|
@@ -4095,5 +4118,5 @@ var InvoServer = class {
|
|
|
4095
4118
|
};
|
|
4096
4119
|
|
|
4097
4120
|
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 };
|
|
4098
|
-
//# sourceMappingURL=chunk-
|
|
4099
|
-
//# sourceMappingURL=chunk-
|
|
4121
|
+
//# sourceMappingURL=chunk-ZHEQAZLW.js.map
|
|
4122
|
+
//# sourceMappingURL=chunk-ZHEQAZLW.js.map
|
package/dist/game-server.cjs
CHANGED
|
@@ -509,6 +509,27 @@ var InvoError = class _InvoError extends Error {
|
|
|
509
509
|
get isPartnerRailSuspended() {
|
|
510
510
|
return this.code === "PARTNER_RAIL_SUSPENDED";
|
|
511
511
|
}
|
|
512
|
+
/** A payout or withdrawal was refused because the billing account owes INVO more for
|
|
513
|
+
* Steam or Apple coins than this payout can settle (`FLOAT_DEBT_OUTSTANDING`, 409;
|
|
514
|
+
* additive, 3.37.0). Nothing was created. {@link floatDebtUsd} is what is owed; the
|
|
515
|
+
* message is safe to show the account owner. Ask for a larger amount, or retry once the
|
|
516
|
+
* card on file has been charged. */
|
|
517
|
+
get isFloatDebtOutstanding() {
|
|
518
|
+
return this.code === "FLOAT_DEBT_OUTSTANDING";
|
|
519
|
+
}
|
|
520
|
+
/** On `FLOAT_DEBT_OUTSTANDING`: what the billing account owes (`float_debt_usd`), USD
|
|
521
|
+
* decimal string, for example `"95.00"`. `undefined` when the body does not carry it. */
|
|
522
|
+
get floatDebtUsd() {
|
|
523
|
+
const v = this.bodyObject()["float_debt_usd"];
|
|
524
|
+
if (typeof v === "number" && Number.isFinite(v)) return v.toFixed(2);
|
|
525
|
+
return typeof v === "string" && v ? v : void 0;
|
|
526
|
+
}
|
|
527
|
+
/** The billing account could not be checked, so the payout or withdrawal was not created
|
|
528
|
+
* (`FLOAT_CHECK_UNAVAILABLE`, 503, `retryable: true`; additive, 3.37.0). Nothing was
|
|
529
|
+
* changed. Retry with the same idempotency key. */
|
|
530
|
+
get isFloatCheckUnavailable() {
|
|
531
|
+
return this.code === "FLOAT_CHECK_UNAVAILABLE";
|
|
532
|
+
}
|
|
512
533
|
/** True when INVO has paused new payments on the developer account
|
|
513
534
|
* (`PAYMENTS_PAUSED`, 403; additive, 3.32.0). Every call that starts a payment returns it:
|
|
514
535
|
* coin purchase, checkout session, Platform Commerce card purchase, new
|
|
@@ -1995,7 +2016,7 @@ function toPhoneChangeRequest(raw) {
|
|
|
1995
2016
|
}
|
|
1996
2017
|
|
|
1997
2018
|
// src/version.ts
|
|
1998
|
-
var SDK_VERSION = "3.
|
|
2019
|
+
var SDK_VERSION = "3.37.0";
|
|
1999
2020
|
|
|
2000
2021
|
// src/payouts.ts
|
|
2001
2022
|
var AMOUNT = /^\d+(\.\d{1,2})?$/;
|
|
@@ -2025,6 +2046,20 @@ function query(params) {
|
|
|
2025
2046
|
}
|
|
2026
2047
|
return parts.length ? `?${parts.join("&")}` : "";
|
|
2027
2048
|
}
|
|
2049
|
+
function moneyString(v) {
|
|
2050
|
+
if (typeof v === "number" && Number.isFinite(v)) return v.toFixed(2);
|
|
2051
|
+
return typeof v === "string" && v ? v : void 0;
|
|
2052
|
+
}
|
|
2053
|
+
function withOffsetFields(p) {
|
|
2054
|
+
if (!p || typeof p !== "object") return p;
|
|
2055
|
+
const offset = moneyString(p["offset_float_usd"]);
|
|
2056
|
+
const before = moneyString(p["amount_before_offset_usd"]);
|
|
2057
|
+
if (offset === void 0 && before === void 0) return p;
|
|
2058
|
+
const out = { ...p };
|
|
2059
|
+
if (offset !== void 0) out.offsetFloatUsd = offset;
|
|
2060
|
+
if (before !== void 0) out.amountBeforeOffsetUsd = before;
|
|
2061
|
+
return out;
|
|
2062
|
+
}
|
|
2028
2063
|
function payeePath(payeeId) {
|
|
2029
2064
|
return `/api/partner-payees/${encodeURIComponent(requireText("payeeId", payeeId))}`;
|
|
2030
2065
|
}
|
|
@@ -2150,7 +2185,7 @@ var PayoutsServer = class {
|
|
|
2150
2185
|
signal: opts?.signal
|
|
2151
2186
|
});
|
|
2152
2187
|
return {
|
|
2153
|
-
payout: raw["payout_request"],
|
|
2188
|
+
payout: withOffsetFields(raw["payout_request"]),
|
|
2154
2189
|
duplicate: raw["duplicate"] === true,
|
|
2155
2190
|
raw
|
|
2156
2191
|
};
|
|
@@ -2162,7 +2197,7 @@ var PayoutsServer = class {
|
|
|
2162
2197
|
this.auth,
|
|
2163
2198
|
{ signal: opts?.signal }
|
|
2164
2199
|
);
|
|
2165
|
-
return raw["payout_request"];
|
|
2200
|
+
return withOffsetFields(raw["payout_request"]);
|
|
2166
2201
|
}
|
|
2167
2202
|
/** Your payouts (`GET /api/partner-payouts`), optionally one creator's (`payeeId`). */
|
|
2168
2203
|
async listPayouts(q = {}, opts) {
|
|
@@ -2171,7 +2206,7 @@ var PayoutsServer = class {
|
|
|
2171
2206
|
this.auth,
|
|
2172
2207
|
{ signal: opts?.signal }
|
|
2173
2208
|
);
|
|
2174
|
-
return { total: Number(raw["total"] ?? 0), items: raw["items"] ?? [], raw };
|
|
2209
|
+
return { total: Number(raw["total"] ?? 0), items: (raw["items"] ?? []).map((p) => withOffsetFields(p)), raw };
|
|
2175
2210
|
}
|
|
2176
2211
|
/**
|
|
2177
2212
|
* Cancel a creator payout that is still `requested`
|
|
@@ -2185,7 +2220,7 @@ var PayoutsServer = class {
|
|
|
2185
2220
|
this.auth,
|
|
2186
2221
|
{ signal: opts?.signal }
|
|
2187
2222
|
);
|
|
2188
|
-
return raw["payout_request"] ?? raw["payout"];
|
|
2223
|
+
return withOffsetFields(raw["payout_request"] ?? raw["payout"]);
|
|
2189
2224
|
}
|
|
2190
2225
|
};
|
|
2191
2226
|
var DEFAULT_TOLERANCE_SEC = 300;
|
|
@@ -4643,6 +4678,10 @@ var InvoServer = class {
|
|
|
4643
4678
|
* answer for all players. Without `steamid` the quote assumes no VAT — the
|
|
4644
4679
|
* most any pack yields; the purchase itself always re-derives.
|
|
4645
4680
|
*
|
|
4681
|
+
* Availability (3.36.0): `canSell` / `unavailableReason` for the title, and
|
|
4682
|
+
* per pack `available` / `unavailableReason`. Call this before showing the
|
|
4683
|
+
* store and hide packs with `available: false`; init still decides.
|
|
4684
|
+
*
|
|
4646
4685
|
* Refusals: `err.isSteamRailNotEntitled` (403). A missing Steam
|
|
4647
4686
|
* registration does NOT refuse here — packs deliberately answers with the
|
|
4648
4687
|
* no-VAT catalogue and lets the PURCHASE be what refuses; the only 503 is
|
|
@@ -4661,10 +4700,15 @@ var InvoServer = class {
|
|
|
4661
4700
|
packId: String(p["pack_id"] ?? ""),
|
|
4662
4701
|
label: String(p["label"] ?? ""),
|
|
4663
4702
|
priceUsd: String(p["price_usd"] ?? ""),
|
|
4664
|
-
currencyAmount: String(p["currency_amount"] ?? "")
|
|
4703
|
+
currencyAmount: String(p["currency_amount"] ?? ""),
|
|
4704
|
+
// Availability (3.36.0) is additive: set only when the server sent it.
|
|
4705
|
+
...typeof p["available"] === "boolean" ? { available: p["available"] } : {},
|
|
4706
|
+
..."unavailable_reason" in p ? { unavailableReason: p["unavailable_reason"] ?? null } : {}
|
|
4665
4707
|
})),
|
|
4666
4708
|
country: raw["country"] ?? null,
|
|
4667
4709
|
vatRatePct: String(raw["vat_rate_pct"] ?? "0"),
|
|
4710
|
+
...typeof raw["can_sell"] === "boolean" ? { canSell: raw["can_sell"] } : {},
|
|
4711
|
+
..."unavailable_reason" in raw ? { unavailableReason: raw["unavailable_reason"] ?? null } : {},
|
|
4668
4712
|
raw
|
|
4669
4713
|
};
|
|
4670
4714
|
}
|
package/dist/game-server.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { I as InvoServer, a as InvoEnvironment } from './server-
|
|
2
|
-
export { D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, 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-
|
|
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';
|
|
3
3
|
import { G as GameCurrencyKind, a as GamePurchaseStatus, b as GameEconomyConfig } from './types-jUxfYjiD.cjs';
|
|
4
4
|
export { c as GameCatalog, d as GameCatalogItem, e as GameCheckout, f as GameCurrencyBalance, g as GameErrorBody, h as GameItemPurchase, i as GamePlayer, j as GamePremiumPack, k as GamePurchase, l as GameSession, m as GameTransferInput, n as GameTransferKind, o as GameTransferStart, p as GameTransferStatus, q as GameWallet } from './types-jUxfYjiD.cjs';
|
|
5
|
-
export { I as InvoError } from './types-
|
|
6
|
-
export { S as SDK_VERSION } from './version-
|
|
5
|
+
export { I as InvoError } from './types-BdKpJX93.cjs';
|
|
6
|
+
export { S as SDK_VERSION } from './version-CuhMO-6s.cjs';
|
|
7
7
|
import './loyalty-events-CmDw2ZoR.cjs';
|
|
8
8
|
|
|
9
9
|
interface StoredPlayer {
|
package/dist/game-server.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { I as InvoServer, a as InvoEnvironment } from './server-
|
|
2
|
-
export { D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, 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-
|
|
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';
|
|
3
3
|
import { G as GameCurrencyKind, a as GamePurchaseStatus, b as GameEconomyConfig } from './types-jUxfYjiD.js';
|
|
4
4
|
export { c as GameCatalog, d as GameCatalogItem, e as GameCheckout, f as GameCurrencyBalance, g as GameErrorBody, h as GameItemPurchase, i as GamePlayer, j as GamePremiumPack, k as GamePurchase, l as GameSession, m as GameTransferInput, n as GameTransferKind, o as GameTransferStart, p as GameTransferStatus, q as GameWallet } from './types-jUxfYjiD.js';
|
|
5
|
-
export { I as InvoError } from './types-
|
|
6
|
-
export { S as SDK_VERSION } from './version-
|
|
5
|
+
export { I as InvoError } from './types-BdKpJX93.js';
|
|
6
|
+
export { S as SDK_VERSION } from './version-CuhMO-6s.js';
|
|
7
7
|
import './loyalty-events-CmDw2ZoR.js';
|
|
8
8
|
|
|
9
9
|
interface StoredPlayer {
|
package/dist/game-server.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isDemoKey, SANDBOX_BASE_URL, environmentFromKeyPrefix, assertKeyMatchesEnvironment, assertKeyMatchesBaseUrl, PRODUCTION_BASE_URL, InvoServer, resolveEnvironment, verifyWebhook } from './chunk-
|
|
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-
|
|
3
|
-
export { SDK_VERSION } from './chunk-
|
|
4
|
-
import { InvoError } from './chunk-
|
|
5
|
-
export { InvoError } from './chunk-
|
|
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';
|
|
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
|
@@ -337,6 +337,27 @@ var InvoError = class _InvoError extends Error {
|
|
|
337
337
|
get isPartnerRailSuspended() {
|
|
338
338
|
return this.code === "PARTNER_RAIL_SUSPENDED";
|
|
339
339
|
}
|
|
340
|
+
/** A payout or withdrawal was refused because the billing account owes INVO more for
|
|
341
|
+
* Steam or Apple coins than this payout can settle (`FLOAT_DEBT_OUTSTANDING`, 409;
|
|
342
|
+
* additive, 3.37.0). Nothing was created. {@link floatDebtUsd} is what is owed; the
|
|
343
|
+
* message is safe to show the account owner. Ask for a larger amount, or retry once the
|
|
344
|
+
* card on file has been charged. */
|
|
345
|
+
get isFloatDebtOutstanding() {
|
|
346
|
+
return this.code === "FLOAT_DEBT_OUTSTANDING";
|
|
347
|
+
}
|
|
348
|
+
/** On `FLOAT_DEBT_OUTSTANDING`: what the billing account owes (`float_debt_usd`), USD
|
|
349
|
+
* decimal string, for example `"95.00"`. `undefined` when the body does not carry it. */
|
|
350
|
+
get floatDebtUsd() {
|
|
351
|
+
const v = this.bodyObject()["float_debt_usd"];
|
|
352
|
+
if (typeof v === "number" && Number.isFinite(v)) return v.toFixed(2);
|
|
353
|
+
return typeof v === "string" && v ? v : void 0;
|
|
354
|
+
}
|
|
355
|
+
/** The billing account could not be checked, so the payout or withdrawal was not created
|
|
356
|
+
* (`FLOAT_CHECK_UNAVAILABLE`, 503, `retryable: true`; additive, 3.37.0). Nothing was
|
|
357
|
+
* changed. Retry with the same idempotency key. */
|
|
358
|
+
get isFloatCheckUnavailable() {
|
|
359
|
+
return this.code === "FLOAT_CHECK_UNAVAILABLE";
|
|
360
|
+
}
|
|
340
361
|
/** True when INVO has paused new payments on the developer account
|
|
341
362
|
* (`PAYMENTS_PAUSED`, 403; additive, 3.32.0). Every call that starts a payment returns it:
|
|
342
363
|
* coin purchase, checkout session, Platform Commerce card purchase, new
|
|
@@ -4996,7 +5017,7 @@ function mountInvoUI(container, economy, options = {}) {
|
|
|
4996
5017
|
}
|
|
4997
5018
|
|
|
4998
5019
|
// src/version.ts
|
|
4999
|
-
var SDK_VERSION = "3.
|
|
5020
|
+
var SDK_VERSION = "3.37.0";
|
|
5000
5021
|
|
|
5001
5022
|
exports.InvoGameEconomy = InvoGameEconomy;
|
|
5002
5023
|
exports.InvoGameError = InvoGameError;
|
package/dist/game.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as GamePlayer, q as GameWallet, c as GameCatalog, k as GamePurchase, h as GameItemPurchase, n as GameTransferKind, d as GameCatalogItem, f as GameCurrencyBalance, p as GameTransferStatus, m as GameTransferInput, o as GameTransferStart } from './types-jUxfYjiD.cjs';
|
|
2
2
|
export { e as GameCheckout, G as GameCurrencyKind, b as GameEconomyConfig, g as GameErrorBody, j as GamePremiumPack, a as GamePurchaseStatus, l as GameSession } from './types-jUxfYjiD.cjs';
|
|
3
|
-
import { A as ApproveHostedResult } from './hosted-approval-
|
|
4
|
-
import { D as DestinationGame, P as PendingCollectItem } from './types-
|
|
5
|
-
export { S as SDK_VERSION } from './version-
|
|
3
|
+
import { A as ApproveHostedResult } from './hosted-approval-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';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* INVO game economy client (3.27.0), the browser half. It talks ONLY to your game server
|
package/dist/game.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as GamePlayer, q as GameWallet, c as GameCatalog, k as GamePurchase, h as GameItemPurchase, n as GameTransferKind, d as GameCatalogItem, f as GameCurrencyBalance, p as GameTransferStatus, m as GameTransferInput, o as GameTransferStart } from './types-jUxfYjiD.js';
|
|
2
2
|
export { e as GameCheckout, G as GameCurrencyKind, b as GameEconomyConfig, g as GameErrorBody, j as GamePremiumPack, a as GamePurchaseStatus, l as GameSession } from './types-jUxfYjiD.js';
|
|
3
|
-
import { A as ApproveHostedResult } from './hosted-approval-
|
|
4
|
-
import { D as DestinationGame, P as PendingCollectItem } from './types-
|
|
5
|
-
export { S as SDK_VERSION } from './version-
|
|
3
|
+
import { A as ApproveHostedResult } from './hosted-approval-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';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* INVO game economy client (3.27.0), the browser half. It talks ONLY to your game server
|
package/dist/game.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InvoClient } from './chunk-
|
|
2
|
-
export { SDK_VERSION } from './chunk-
|
|
3
|
-
import { newEventId } from './chunk-
|
|
1
|
+
import { InvoClient } from './chunk-AUHRMREF.js';
|
|
2
|
+
export { SDK_VERSION } from './chunk-MENRG67H.js';
|
|
3
|
+
import { newEventId } from './chunk-KWAUFFDY.js';
|
|
4
4
|
|
|
5
5
|
// src/game/client.ts
|
|
6
6
|
var InvoGameError = class extends Error {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApproveResult, j as ConfirmReceiptResult } from './types-
|
|
1
|
+
import { A as ApproveResult, j as ConfirmReceiptResult } from './types-BdKpJX93.cjs';
|
|
2
2
|
|
|
3
3
|
/** The four device-approval flows (`begin.flow`). */
|
|
4
4
|
type HostedFlow = "transfer" | "send" | "send_receipt" | "transfer_receipt";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApproveResult, j as ConfirmReceiptResult } from './types-
|
|
1
|
+
import { A as ApproveResult, j as ConfirmReceiptResult } from './types-BdKpJX93.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
|
@@ -337,6 +337,27 @@ var InvoError = class _InvoError extends Error {
|
|
|
337
337
|
get isPartnerRailSuspended() {
|
|
338
338
|
return this.code === "PARTNER_RAIL_SUSPENDED";
|
|
339
339
|
}
|
|
340
|
+
/** A payout or withdrawal was refused because the billing account owes INVO more for
|
|
341
|
+
* Steam or Apple coins than this payout can settle (`FLOAT_DEBT_OUTSTANDING`, 409;
|
|
342
|
+
* additive, 3.37.0). Nothing was created. {@link floatDebtUsd} is what is owed; the
|
|
343
|
+
* message is safe to show the account owner. Ask for a larger amount, or retry once the
|
|
344
|
+
* card on file has been charged. */
|
|
345
|
+
get isFloatDebtOutstanding() {
|
|
346
|
+
return this.code === "FLOAT_DEBT_OUTSTANDING";
|
|
347
|
+
}
|
|
348
|
+
/** On `FLOAT_DEBT_OUTSTANDING`: what the billing account owes (`float_debt_usd`), USD
|
|
349
|
+
* decimal string, for example `"95.00"`. `undefined` when the body does not carry it. */
|
|
350
|
+
get floatDebtUsd() {
|
|
351
|
+
const v = this.bodyObject()["float_debt_usd"];
|
|
352
|
+
if (typeof v === "number" && Number.isFinite(v)) return v.toFixed(2);
|
|
353
|
+
return typeof v === "string" && v ? v : void 0;
|
|
354
|
+
}
|
|
355
|
+
/** The billing account could not be checked, so the payout or withdrawal was not created
|
|
356
|
+
* (`FLOAT_CHECK_UNAVAILABLE`, 503, `retryable: true`; additive, 3.37.0). Nothing was
|
|
357
|
+
* changed. Retry with the same idempotency key. */
|
|
358
|
+
get isFloatCheckUnavailable() {
|
|
359
|
+
return this.code === "FLOAT_CHECK_UNAVAILABLE";
|
|
360
|
+
}
|
|
340
361
|
/** True when INVO has paused new payments on the developer account
|
|
341
362
|
* (`PAYMENTS_PAUSED`, 403; additive, 3.32.0). Every call that starts a payment returns it:
|
|
342
363
|
* coin purchase, checkout session, Platform Commerce card purchase, new
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as PurchaseStatusResult, b as PurchaseCredited, c as PurchaseExpired, d as PurchaseRefunded, e as PurchaseRefused, C as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, A as ApproveResult, j as ConfirmReceiptResult, k as PhoneChangeApprovalsResult, l as ApprovePhoneChangeInput, m as ApprovePhoneChangeResult, L as LinkDeviceResult, n as PendingCollectResult, o as DestinationsQuery, p as DestinationsResult, B as BalanceResult, q as LoyaltyCardsResult, r as LoyaltyVaultResult, R as RedeemRewardResult, s as RewardsPageLink, E as EnrollmentBeginResult, t as EnrollmentVerifyResult, u as RecoveryBeginResult, v as RecoveryCompleteResult } from './types-
|
|
2
|
-
export { w as BalanceRow, x as CheckoutPurchaseStatus, y as ClaimDelivery, D as DestinationGame, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, U as LoyaltyVaultEntry, P as PendingCollectItem, V as PhoneChangeApproval, X as PhoneChangeDeviceSignal, Y as PurchaseRefusalReason, Z as Rail, _ as VerificationMethod } from './types-
|
|
3
|
-
import { a as ApproveHostedOptions, A as ApproveHostedResult } from './hosted-approval-
|
|
4
|
-
export { E as EnrollmentDecision, b as EnrollmentRespond, H as HostedApprovalStatus, c as HostedEnrollment, d as HostedEnrollmentInput, e as HostedFlow } from './hosted-approval-
|
|
1
|
+
import { a as PurchaseStatusResult, b as PurchaseCredited, c as PurchaseExpired, d as PurchaseRefunded, e as PurchaseRefused, C as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, A as ApproveResult, j as ConfirmReceiptResult, k as PhoneChangeApprovalsResult, l as ApprovePhoneChangeInput, m as ApprovePhoneChangeResult, L as LinkDeviceResult, n as PendingCollectResult, o as DestinationsQuery, p as DestinationsResult, B as BalanceResult, q as LoyaltyCardsResult, r as LoyaltyVaultResult, R as RedeemRewardResult, s as RewardsPageLink, E as EnrollmentBeginResult, t as EnrollmentVerifyResult, u as RecoveryBeginResult, v as RecoveryCompleteResult } from './types-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';
|
|
5
5
|
import { R as ReportGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.cjs';
|
|
6
6
|
export { G as GameEventType } from './loyalty-events-CmDw2ZoR.cjs';
|
|
7
7
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as PurchaseStatusResult, b as PurchaseCredited, c as PurchaseExpired, d as PurchaseRefunded, e as PurchaseRefused, C as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, A as ApproveResult, j as ConfirmReceiptResult, k as PhoneChangeApprovalsResult, l as ApprovePhoneChangeInput, m as ApprovePhoneChangeResult, L as LinkDeviceResult, n as PendingCollectResult, o as DestinationsQuery, p as DestinationsResult, B as BalanceResult, q as LoyaltyCardsResult, r as LoyaltyVaultResult, R as RedeemRewardResult, s as RewardsPageLink, E as EnrollmentBeginResult, t as EnrollmentVerifyResult, u as RecoveryBeginResult, v as RecoveryCompleteResult } from './types-
|
|
2
|
-
export { w as BalanceRow, x as CheckoutPurchaseStatus, y as ClaimDelivery, D as DestinationGame, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, U as LoyaltyVaultEntry, P as PendingCollectItem, V as PhoneChangeApproval, X as PhoneChangeDeviceSignal, Y as PurchaseRefusalReason, Z as Rail, _ as VerificationMethod } from './types-
|
|
3
|
-
import { a as ApproveHostedOptions, A as ApproveHostedResult } from './hosted-approval-
|
|
4
|
-
export { E as EnrollmentDecision, b as EnrollmentRespond, H as HostedApprovalStatus, c as HostedEnrollment, d as HostedEnrollmentInput, e as HostedFlow } from './hosted-approval-
|
|
1
|
+
import { a as PurchaseStatusResult, b as PurchaseCredited, c as PurchaseExpired, d as PurchaseRefunded, e as PurchaseRefused, C as CheckoutClientConfig, H as Http, f as PurchaseStatusInput, g as CallOptions, W as WaitForPurchaseInput, M as MountCheckoutOptions, h as CheckoutMountHandle, i as ClientConfig, A as ApproveResult, j as ConfirmReceiptResult, k as PhoneChangeApprovalsResult, l as ApprovePhoneChangeInput, m as ApprovePhoneChangeResult, L as LinkDeviceResult, n as PendingCollectResult, o as DestinationsQuery, p as DestinationsResult, B as BalanceResult, q as LoyaltyCardsResult, r as LoyaltyVaultResult, R as RedeemRewardResult, s as RewardsPageLink, E as EnrollmentBeginResult, t as EnrollmentVerifyResult, u as RecoveryBeginResult, v as RecoveryCompleteResult } from './types-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';
|
|
5
5
|
import { R as ReportGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.js';
|
|
6
6
|
export { G as GameEventType } from './loyalty-events-CmDw2ZoR.js';
|
|
7
7
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CheckoutClient, InvoClient, PlatformCommerceClient } from './chunk-
|
|
2
|
-
export { InvoError, isPurchaseCredited, isPurchaseExpired, isPurchaseRefunded, isPurchaseRefused, nothingWasCharged, phoneChangeSignalMessage } from './chunk-
|
|
1
|
+
export { CheckoutClient, InvoClient, PlatformCommerceClient } from './chunk-AUHRMREF.js';
|
|
2
|
+
export { InvoError, isPurchaseCredited, isPurchaseExpired, isPurchaseRefunded, isPurchaseRefused, nothingWasCharged, phoneChangeSignalMessage } from './chunk-KWAUFFDY.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|