@invonetwork/web-sdk 3.33.0 → 3.34.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 +1506 -1490
- package/README.md +3006 -2990
- package/dist/{chunk-HQLPT2DY.js → chunk-3BR7URPM.js} +14 -3
- package/dist/chunk-6763YM7P.js +6 -0
- package/dist/{chunk-DHVHKFQH.js → chunk-MJXQ3Q7C.js} +153 -74
- package/dist/{chunk-MJAJXYFX.js → chunk-PEYWNML4.js} +3 -3
- package/dist/game-server.cjs +105 -6
- package/dist/game-server.d.cts +12 -8
- package/dist/game-server.d.ts +12 -8
- package/dist/game-server.js +11 -7
- package/dist/game.cjs +14 -3
- package/dist/game.d.cts +3 -3
- package/dist/game.d.ts +3 -3
- package/dist/game.js +4 -4
- package/dist/{hosted-approval-CYqqberu.d.cts → hosted-approval-B6yY7ExK.d.cts} +1 -1
- package/dist/{hosted-approval-CL3DfrGS.d.ts → hosted-approval-CZ5EYFlM.d.ts} +1 -1
- package/dist/index.cjs +12 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/{server-5_g5C-no.d.cts → server-A1s7zqzG.d.cts} +40 -7
- package/dist/{server-Dhao5prR.d.ts → server-JARGQrat.d.ts} +40 -7
- package/dist/server.cjs +154 -71
- package/dist/server.d.cts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js +3 -3
- package/dist/{types-DUfQR48n.d.ts → types-B4J9Ifd2.d.cts} +18 -4
- package/dist/{types-DUfQR48n.d.cts → types-B4J9Ifd2.d.ts} +18 -4
- package/dist/{version-DKfrEYU1.d.cts → version-DB2wgiPY.d.cts} +1 -1
- package/dist/{version-DKfrEYU1.d.ts → version-DB2wgiPY.d.ts} +1 -1
- package/package.json +91 -91
- package/dist/chunk-VWUFSA6U.js +0 -6
package/dist/server.cjs
CHANGED
|
@@ -349,6 +349,17 @@ var InvoError = class _InvoError extends Error {
|
|
|
349
349
|
get isPaymentsPaused() {
|
|
350
350
|
return this.code === "PAYMENTS_PAUSED";
|
|
351
351
|
}
|
|
352
|
+
/** The key belongs to the other INVO environment (`KEY_FOR_OTHER_ENVIRONMENT`, 401;
|
|
353
|
+
* additive, 3.34.0): a test key (`ivsdk_test_`) sent to production, or a live key
|
|
354
|
+
* (`ivsdk_live_`) sent to the sandbox. Never retried. Use the key for the environment
|
|
355
|
+
* you are calling, or point the SDK at the environment the key is for. The code is
|
|
356
|
+
* matched on any code field (`code`, `rawCode`, `publicCode`, or the body's
|
|
357
|
+
* `error_code` / `code`), since the 401 may carry a different `code`. */
|
|
358
|
+
get isKeyForOtherEnvironment() {
|
|
359
|
+
const C = "KEY_FOR_OTHER_ENVIRONMENT";
|
|
360
|
+
const b = this.bodyObject();
|
|
361
|
+
return this.code === C || this.rawCode === C || this.publicCode === C || b["error_code"] === C || b["code"] === C;
|
|
362
|
+
}
|
|
352
363
|
/** A buyer-approved balance purchase cannot start (`BALANCE_UNAVAILABLE`, 400; 3.33.0):
|
|
353
364
|
* the buyer is unknown here or their balance is short. One answer on purpose; the
|
|
354
365
|
* balance is never disclosed. Offer another way to pay. */
|
|
@@ -834,7 +845,7 @@ var InvoError = class _InvoError extends Error {
|
|
|
834
845
|
/**
|
|
835
846
|
* True when a sandbox clock call was refused for a missing, wrong or never-issued
|
|
836
847
|
* `X-Sandbox-Clock-Key` (`SANDBOX_CLOCK_UNAUTHORIZED`, 401). Reveal or rotate the key on
|
|
837
|
-
* the game's Game Settings page in the
|
|
848
|
+
* the game's Game Settings page in the INVO console in test mode (console.invo.network/test).
|
|
838
849
|
*/
|
|
839
850
|
get isSandboxClockUnauthorized() {
|
|
840
851
|
return this.code === "SANDBOX_CLOCK_UNAUTHORIZED";
|
|
@@ -1669,7 +1680,7 @@ function toPhoneChangeRequest(raw) {
|
|
|
1669
1680
|
}
|
|
1670
1681
|
|
|
1671
1682
|
// src/version.ts
|
|
1672
|
-
var SDK_VERSION = "3.
|
|
1683
|
+
var SDK_VERSION = "3.34.1";
|
|
1673
1684
|
|
|
1674
1685
|
// src/payouts.ts
|
|
1675
1686
|
var AMOUNT = /^\d+(\.\d{1,2})?$/;
|
|
@@ -1863,6 +1874,140 @@ var PayoutsServer = class {
|
|
|
1863
1874
|
}
|
|
1864
1875
|
};
|
|
1865
1876
|
|
|
1877
|
+
// src/environment.ts
|
|
1878
|
+
var PRODUCTION_BASE_URL = "https://invo.network";
|
|
1879
|
+
var SANDBOX_BASE_URL = "https://sandbox.invo.network/sandbox";
|
|
1880
|
+
var DEMO_KEY_PREFIX = "ivsdk_demo_";
|
|
1881
|
+
var TEST_KEY_PREFIX = "ivsdk_test_";
|
|
1882
|
+
var LIVE_KEY_PREFIX = "ivsdk_live_";
|
|
1883
|
+
var KEY_ENVIRONMENT_PATH = "/api/sdk/key-environment";
|
|
1884
|
+
function environmentFromKeyPrefix(gameSecret) {
|
|
1885
|
+
if (typeof gameSecret !== "string") return null;
|
|
1886
|
+
if (gameSecret.startsWith(LIVE_KEY_PREFIX)) return "production";
|
|
1887
|
+
if (gameSecret.startsWith(TEST_KEY_PREFIX) || gameSecret.startsWith(DEMO_KEY_PREFIX)) return "sandbox";
|
|
1888
|
+
return null;
|
|
1889
|
+
}
|
|
1890
|
+
function environmentForBaseUrl(baseUrl) {
|
|
1891
|
+
if (typeof baseUrl !== "string" || !baseUrl.trim()) return null;
|
|
1892
|
+
let url;
|
|
1893
|
+
try {
|
|
1894
|
+
url = new URL(baseUrl.trim());
|
|
1895
|
+
} catch {
|
|
1896
|
+
return null;
|
|
1897
|
+
}
|
|
1898
|
+
const host = url.hostname.toLowerCase().replace(/\.$/, "");
|
|
1899
|
+
if (host === "sandbox.invo.network") return "sandbox";
|
|
1900
|
+
if (host === "invo.network" || host === "www.invo.network") {
|
|
1901
|
+
const first = url.pathname.split("/").filter(Boolean)[0]?.toLowerCase();
|
|
1902
|
+
return first === "sandbox" ? "sandbox" : "production";
|
|
1903
|
+
}
|
|
1904
|
+
return null;
|
|
1905
|
+
}
|
|
1906
|
+
var KeyEnvironmentMismatchError = class extends Error {
|
|
1907
|
+
constructor(message, keyEnvironment, configuredEnvironment) {
|
|
1908
|
+
super(message);
|
|
1909
|
+
this.name = "KeyEnvironmentMismatchError";
|
|
1910
|
+
this.keyEnvironment = keyEnvironment;
|
|
1911
|
+
this.configuredEnvironment = configuredEnvironment;
|
|
1912
|
+
}
|
|
1913
|
+
};
|
|
1914
|
+
function strictKeyEnvironment(gameSecret) {
|
|
1915
|
+
if (typeof gameSecret !== "string") return null;
|
|
1916
|
+
if (gameSecret.startsWith(LIVE_KEY_PREFIX)) return "production";
|
|
1917
|
+
if (gameSecret.startsWith(TEST_KEY_PREFIX)) return "sandbox";
|
|
1918
|
+
return null;
|
|
1919
|
+
}
|
|
1920
|
+
function describeKey(env) {
|
|
1921
|
+
return env === "production" ? `a live key (${LIVE_KEY_PREFIX})` : `a test key (${TEST_KEY_PREFIX})`;
|
|
1922
|
+
}
|
|
1923
|
+
function fixFor(keyEnv) {
|
|
1924
|
+
return keyEnv === "production" ? `Use ${PRODUCTION_BASE_URL}, or a test key.` : `Use ${SANDBOX_BASE_URL}, or a live key.`;
|
|
1925
|
+
}
|
|
1926
|
+
function displayUrl(baseUrl) {
|
|
1927
|
+
try {
|
|
1928
|
+
const u = new URL(baseUrl.trim());
|
|
1929
|
+
return `${u.protocol}//${u.host}${u.pathname}`.replace(/\/+$/, "");
|
|
1930
|
+
} catch {
|
|
1931
|
+
return "(the configured URL)";
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
function assertKeyMatchesBaseUrl(gameSecret, baseUrl, setting = "baseUrl") {
|
|
1935
|
+
const keyEnv = strictKeyEnvironment(gameSecret);
|
|
1936
|
+
if (!keyEnv) return;
|
|
1937
|
+
const urlEnv = environmentForBaseUrl(baseUrl);
|
|
1938
|
+
if (!urlEnv || urlEnv === keyEnv) return;
|
|
1939
|
+
const where = urlEnv === "production" ? "production" : "the sandbox";
|
|
1940
|
+
const shown = displayUrl(String(baseUrl));
|
|
1941
|
+
throw new KeyEnvironmentMismatchError(
|
|
1942
|
+
`This is ${describeKey(keyEnv)} but ${setting} points at ${where} ${shown}. ${fixFor(keyEnv)}`,
|
|
1943
|
+
keyEnv,
|
|
1944
|
+
urlEnv
|
|
1945
|
+
);
|
|
1946
|
+
}
|
|
1947
|
+
var EnvironmentUnknownError = class extends Error {
|
|
1948
|
+
constructor(message) {
|
|
1949
|
+
super(message);
|
|
1950
|
+
this.name = "EnvironmentUnknownError";
|
|
1951
|
+
}
|
|
1952
|
+
};
|
|
1953
|
+
function isDemoKey(gameSecret) {
|
|
1954
|
+
return typeof gameSecret === "string" && gameSecret.startsWith(DEMO_KEY_PREFIX);
|
|
1955
|
+
}
|
|
1956
|
+
var cache = /* @__PURE__ */ new Map();
|
|
1957
|
+
async function ask(baseUrl, gameSecret, fetchImpl) {
|
|
1958
|
+
let res;
|
|
1959
|
+
try {
|
|
1960
|
+
res = await fetchImpl(baseUrl + KEY_ENVIRONMENT_PATH, {
|
|
1961
|
+
method: "GET",
|
|
1962
|
+
headers: { "X-Game-Secret-Key": gameSecret, Accept: "application/json" },
|
|
1963
|
+
redirect: "error"
|
|
1964
|
+
});
|
|
1965
|
+
} catch {
|
|
1966
|
+
throw new EnvironmentUnknownError("Could not reach INVO to check the key.");
|
|
1967
|
+
}
|
|
1968
|
+
if (res.status === 401 || res.status === 403 || res.status === 404) return null;
|
|
1969
|
+
if (!res.ok) throw new EnvironmentUnknownError(`INVO answered ${res.status} while checking the key.`);
|
|
1970
|
+
const body = await res.json().catch(() => ({}));
|
|
1971
|
+
return body.environment === "production" || body.environment === "sandbox" ? body.environment : null;
|
|
1972
|
+
}
|
|
1973
|
+
function resolveEnvironment(gameSecret, opts = {}) {
|
|
1974
|
+
if (!gameSecret) return Promise.reject(new Error("A game secret is required."));
|
|
1975
|
+
const byPrefix = environmentFromKeyPrefix(gameSecret);
|
|
1976
|
+
if (byPrefix) return Promise.resolve(byPrefix);
|
|
1977
|
+
const hit = cache.get(gameSecret);
|
|
1978
|
+
if (hit) return hit;
|
|
1979
|
+
const fetchImpl = opts.fetch ?? ((input, init) => fetch(input, init));
|
|
1980
|
+
const p = (async () => {
|
|
1981
|
+
let prodError = null;
|
|
1982
|
+
let env = null;
|
|
1983
|
+
try {
|
|
1984
|
+
env = await ask(PRODUCTION_BASE_URL, gameSecret, fetchImpl);
|
|
1985
|
+
} catch (err) {
|
|
1986
|
+
prodError = err;
|
|
1987
|
+
}
|
|
1988
|
+
if (!env) {
|
|
1989
|
+
try {
|
|
1990
|
+
env = await ask(SANDBOX_BASE_URL, gameSecret, fetchImpl);
|
|
1991
|
+
} catch (err) {
|
|
1992
|
+
throw prodError ?? err;
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
if (!env && prodError) throw prodError;
|
|
1996
|
+
if (!env) {
|
|
1997
|
+
throw new EnvironmentUnknownError(
|
|
1998
|
+
"Neither INVO production nor the INVO sandbox recognises this key. Check INVO_GAME_SECRET in your secrets."
|
|
1999
|
+
);
|
|
2000
|
+
}
|
|
2001
|
+
return env;
|
|
2002
|
+
})();
|
|
2003
|
+
cache.set(gameSecret, p);
|
|
2004
|
+
p.catch(() => cache.delete(gameSecret));
|
|
2005
|
+
return p;
|
|
2006
|
+
}
|
|
2007
|
+
async function baseUrlForKey(gameSecret, opts = {}) {
|
|
2008
|
+
return await resolveEnvironment(gameSecret, opts) === "production" ? PRODUCTION_BASE_URL : SANDBOX_BASE_URL;
|
|
2009
|
+
}
|
|
2010
|
+
|
|
1866
2011
|
// src/shared/types.ts
|
|
1867
2012
|
function isRefundPendingApproval(r) {
|
|
1868
2013
|
return r.status === "pending_approval";
|
|
@@ -2031,74 +2176,6 @@ async function hmacHexSubtle(secret, message) {
|
|
|
2031
2176
|
return hex;
|
|
2032
2177
|
}
|
|
2033
2178
|
|
|
2034
|
-
// src/environment.ts
|
|
2035
|
-
var PRODUCTION_BASE_URL = "https://invo.network";
|
|
2036
|
-
var SANDBOX_BASE_URL = "https://sandbox.invo.network/sandbox";
|
|
2037
|
-
var DEMO_KEY_PREFIX = "ivsdk_demo_";
|
|
2038
|
-
var KEY_ENVIRONMENT_PATH = "/api/sdk/key-environment";
|
|
2039
|
-
var EnvironmentUnknownError = class extends Error {
|
|
2040
|
-
constructor(message) {
|
|
2041
|
-
super(message);
|
|
2042
|
-
this.name = "EnvironmentUnknownError";
|
|
2043
|
-
}
|
|
2044
|
-
};
|
|
2045
|
-
function isDemoKey(gameSecret) {
|
|
2046
|
-
return typeof gameSecret === "string" && gameSecret.startsWith(DEMO_KEY_PREFIX);
|
|
2047
|
-
}
|
|
2048
|
-
var cache = /* @__PURE__ */ new Map();
|
|
2049
|
-
async function ask(baseUrl, gameSecret, fetchImpl) {
|
|
2050
|
-
let res;
|
|
2051
|
-
try {
|
|
2052
|
-
res = await fetchImpl(baseUrl + KEY_ENVIRONMENT_PATH, {
|
|
2053
|
-
method: "GET",
|
|
2054
|
-
headers: { "X-Game-Secret-Key": gameSecret, Accept: "application/json" },
|
|
2055
|
-
redirect: "error"
|
|
2056
|
-
});
|
|
2057
|
-
} catch {
|
|
2058
|
-
throw new EnvironmentUnknownError("Could not reach INVO to check the key.");
|
|
2059
|
-
}
|
|
2060
|
-
if (res.status === 401 || res.status === 403 || res.status === 404) return null;
|
|
2061
|
-
if (!res.ok) throw new EnvironmentUnknownError(`INVO answered ${res.status} while checking the key.`);
|
|
2062
|
-
const body = await res.json().catch(() => ({}));
|
|
2063
|
-
return body.environment === "production" || body.environment === "sandbox" ? body.environment : null;
|
|
2064
|
-
}
|
|
2065
|
-
function resolveEnvironment(gameSecret, opts = {}) {
|
|
2066
|
-
if (!gameSecret) return Promise.reject(new Error("A game secret is required."));
|
|
2067
|
-
if (isDemoKey(gameSecret)) return Promise.resolve("sandbox");
|
|
2068
|
-
const hit = cache.get(gameSecret);
|
|
2069
|
-
if (hit) return hit;
|
|
2070
|
-
const fetchImpl = opts.fetch ?? ((input, init) => fetch(input, init));
|
|
2071
|
-
const p = (async () => {
|
|
2072
|
-
let prodError = null;
|
|
2073
|
-
let env = null;
|
|
2074
|
-
try {
|
|
2075
|
-
env = await ask(PRODUCTION_BASE_URL, gameSecret, fetchImpl);
|
|
2076
|
-
} catch (err) {
|
|
2077
|
-
prodError = err;
|
|
2078
|
-
}
|
|
2079
|
-
if (!env) {
|
|
2080
|
-
try {
|
|
2081
|
-
env = await ask(SANDBOX_BASE_URL, gameSecret, fetchImpl);
|
|
2082
|
-
} catch (err) {
|
|
2083
|
-
throw prodError ?? err;
|
|
2084
|
-
}
|
|
2085
|
-
}
|
|
2086
|
-
if (!env && prodError) throw prodError;
|
|
2087
|
-
if (!env) {
|
|
2088
|
-
throw new EnvironmentUnknownError(
|
|
2089
|
-
"Neither INVO production nor the INVO sandbox recognises this key. Check INVO_GAME_SECRET in your secrets."
|
|
2090
|
-
);
|
|
2091
|
-
}
|
|
2092
|
-
return env;
|
|
2093
|
-
})();
|
|
2094
|
-
cache.set(gameSecret, p);
|
|
2095
|
-
p.catch(() => cache.delete(gameSecret));
|
|
2096
|
-
return p;
|
|
2097
|
-
}
|
|
2098
|
-
async function baseUrlForKey(gameSecret, opts = {}) {
|
|
2099
|
-
return await resolveEnvironment(gameSecret, opts) === "production" ? PRODUCTION_BASE_URL : SANDBOX_BASE_URL;
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
2179
|
// src/server.ts
|
|
2103
2180
|
var DEFAULT_UA = `invonetwork-web-sdk/${SDK_VERSION} (+https://invo.network)`;
|
|
2104
2181
|
var MAX_USD_AMOUNT = 999999.99;
|
|
@@ -3878,7 +3955,7 @@ var SandboxSubscriptionsServer = class {
|
|
|
3878
3955
|
throw invalidInput2(
|
|
3879
3956
|
"sandboxClockKey",
|
|
3880
3957
|
this.clockKey,
|
|
3881
|
-
'is required for invo.sandbox.subscriptions
|
|
3958
|
+
'is required for invo.sandbox.subscriptions.*: pass it to new InvoServer({ sandboxClockKey }) from the INVO console in test mode, console.invo.network/test (Game Settings, "Sandbox clock key")'
|
|
3882
3959
|
);
|
|
3883
3960
|
}
|
|
3884
3961
|
const raw = await this.http.post(
|
|
@@ -3975,6 +4052,7 @@ var InvoServer = class {
|
|
|
3975
4052
|
if (!config.gameSecret) throw new Error("InvoServer requires a `gameSecret`.");
|
|
3976
4053
|
if (!config.baseUrl) throw new Error("InvoServer requires a `baseUrl`.");
|
|
3977
4054
|
assertSecureBaseUrl(config.baseUrl);
|
|
4055
|
+
assertKeyMatchesBaseUrl(config.gameSecret.trim(), config.baseUrl);
|
|
3978
4056
|
this.http = new Http({
|
|
3979
4057
|
baseUrl: config.baseUrl,
|
|
3980
4058
|
timeoutMs: config.timeoutMs,
|
|
@@ -5525,6 +5603,8 @@ exports.DEMO_KEY_PREFIX = DEMO_KEY_PREFIX;
|
|
|
5525
5603
|
exports.EnvironmentUnknownError = EnvironmentUnknownError;
|
|
5526
5604
|
exports.InvoError = InvoError;
|
|
5527
5605
|
exports.InvoServer = InvoServer;
|
|
5606
|
+
exports.KeyEnvironmentMismatchError = KeyEnvironmentMismatchError;
|
|
5607
|
+
exports.LIVE_KEY_PREFIX = LIVE_KEY_PREFIX;
|
|
5528
5608
|
exports.PRODUCTION_BASE_URL = PRODUCTION_BASE_URL;
|
|
5529
5609
|
exports.PayoutsServer = PayoutsServer;
|
|
5530
5610
|
exports.PlatformCommerceServer = PlatformCommerceServer;
|
|
@@ -5533,8 +5613,11 @@ exports.SDK_VERSION = SDK_VERSION;
|
|
|
5533
5613
|
exports.SandboxServer = SandboxServer;
|
|
5534
5614
|
exports.SandboxSubscriptionsServer = SandboxSubscriptionsServer;
|
|
5535
5615
|
exports.SubscriptionsServer = SubscriptionsServer;
|
|
5616
|
+
exports.TEST_KEY_PREFIX = TEST_KEY_PREFIX;
|
|
5536
5617
|
exports.baseUrlForKey = baseUrlForKey;
|
|
5537
5618
|
exports.createWebhookHandler = createWebhookHandler;
|
|
5619
|
+
exports.environmentForBaseUrl = environmentForBaseUrl;
|
|
5620
|
+
exports.environmentFromKeyPrefix = environmentFromKeyPrefix;
|
|
5538
5621
|
exports.isDemoKey = isDemoKey;
|
|
5539
5622
|
exports.isRefundPendingApproval = isRefundPendingApproval;
|
|
5540
5623
|
exports.resolveEnvironment = resolveEnvironment;
|
package/dist/server.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { bu as ApproveWithDeviceCodeInput, bo as BeginDeviceApprovalInput, g as CallOptions, af as CancelResult, ae as CancelSubscriptionOptions, as as CardSetupConfirmInput, at as CardSetupConfirmResult, aq as CardSetupInput, ar as CardSetupResult, ao as CardSetupSessionInput, ap as CardSetupSessionResult, by as CardSetupStatus, ag as ChangeAmountResult, bz as CheckoutWarning, bf as ClaimCurrencyInput, y as ClaimDelivery, be as ClaimResult, bd as ClaimTransferInput, bw as CompleteDeviceApprovalInput, bx as CompleteDeviceApprovalResult, bs as ConfirmDeviceEnrollmentInput, bt as ConfirmDeviceEnrollmentResult, aS as ConfirmPaymentResult, aM as CreateCheckoutInput, aN as CreateCheckoutResult, a8 as CreateSubscriptionInput, bA as CurrencyBalance, aR as CurrencyPurchaseQuote, bB as CurrencyPurchaseQuoteBreakdown, aQ as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bC as DeviceApprovalChannel, bD as DeviceApprovalEnrollment, bE as DeviceApprovalFlow, bp as DeviceApprovalGrant, br as DeviceApprovalPollResult, bF as DeviceApprovalPollStatus, bv as DeviceApprovalSettleResult, bG as DeviceEnrollmentDecision, bH as DeviceEnrollmentRespond, bI as ExpiryReason, bJ as FeeTakenFrom, bK as FirstCharge, bL as FirstChargeStatus, bM as FundingSource, aa as GetSubscriptionOptions, ab as GetSubscriptionResult, bh as GuardianApprovalStatusResult, bN as InboundPendingItem, b8 as InboundPendingQuery, b9 as InboundPendingResult, aK as InitiateResult, aJ as InitiateSendInput, aL as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, b0 as ItemHistoryQuery, b1 as ItemHistoryResult, b2 as ItemOrderQuery, ba as LinkedIdentitiesQuery, bb as LinkedIdentitiesResult, bO as LinkedIdentityEmail, ac as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bP as MinPurchaseWarning, aA as MintPlayerTokenInput, aT as OrderDetailsResult, bQ as PhoneChangeConfirmation, aI as PhoneChangeRequest, bR as PhoneChangeRequestStatus, bl as PhoneShareApproveInput, bm as PhoneShareApproveResult, bj as PhoneShareContact, bk as PhoneShareInitiateResult, bn as PhoneShareStatusResult, a2 as PlatformApprovalResult, a3 as PlatformOrderStatusResult, a4 as PlatformPurchaseHistoryQuery, a5 as PlatformPurchaseHistoryResult, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, bS as PlatformPurchaseStatus, a6 as PlatformRefundInput, a7 as PlatformRefundResult, b5 as PlayerActivityEntry, b3 as PlayerActivityQuery, b4 as PlayerActivityResult, bT as PlayerActivityType, b6 as PlayerBalanceQuery, b7 as PlayerBalanceResult, au as PlayerCardsResult, aB as PlayerToken, bq as PollDeviceApprovalInput, aO as PurchaseInput, a_ as PurchaseItemInput, a$ as PurchaseItemResult, aP as PurchaseResult, Z as Rail, bU as RefundInitiation, bV as RefundPendingApproval, bW as RefundProcessingFeeBasis, bX as RefundReceipt, ak as RefundResult, bY as RefundRevenueShareAttribution, aj as RefundSubscriptionInput, bZ as RefundWarning, aC as RegisterPlayerInput, aD as RegisterPlayerResult, aG as RequestPhoneChangeInput, aH as RequestPhoneChangeResult, av as SandboxClockResult, b_ as SandboxClockState, aw as SandboxFailureOutcome, ay as SandboxForceAuthChallengeOptions, ax as SandboxForceFailureOptions, b$ as SavedCard, az as ServerConfig, bi as ServerDestinationsQuery, ah as SetPaymentMethodInput, ai as SetPaymentMethodResult, bc as SmsVerifyResult, aY as SteamFinalizeInput, aZ as SteamFinalizeResult, an as SteamFinalizeSubscriptionResult, aW as SteamInitPurchaseInput, aX as SteamInitPurchaseResult, am as SteamInitResult, c0 as SteamPack, aU as SteamPacksQuery, aV as SteamPacksResult, al as SteamSubscriptionInitInput, c1 as SteamUserSession, c2 as Subscription, c3 as SubscriptionBaseInput, c4 as SubscriptionConsent, c5 as SubscriptionConsentInput, c6 as SubscriptionFundingRail, c7 as SubscriptionInterval, ad as SubscriptionListResult, a9 as SubscriptionResult, c8 as SubscriptionRevenueShare, c9 as SubscriptionRevenueShareInput, ca as SubscriptionStatus, bg as TransactionStatusResult, cb as UnacknowledgedPurchaseOutcome, aE as UpdatePlayerPhoneInput, aF as UpdatePlayerPhoneResult, _ as VerificationMethod, cc as isRefundPendingApproval } from './types-
|
|
1
|
+
export { bu as ApproveWithDeviceCodeInput, bo as BeginDeviceApprovalInput, g as CallOptions, af as CancelResult, ae as CancelSubscriptionOptions, as as CardSetupConfirmInput, at as CardSetupConfirmResult, aq as CardSetupInput, ar as CardSetupResult, ao as CardSetupSessionInput, ap as CardSetupSessionResult, by as CardSetupStatus, ag as ChangeAmountResult, bz as CheckoutWarning, bf as ClaimCurrencyInput, y as ClaimDelivery, be as ClaimResult, bd as ClaimTransferInput, bw as CompleteDeviceApprovalInput, bx as CompleteDeviceApprovalResult, bs as ConfirmDeviceEnrollmentInput, bt as ConfirmDeviceEnrollmentResult, aS as ConfirmPaymentResult, aM as CreateCheckoutInput, aN as CreateCheckoutResult, a8 as CreateSubscriptionInput, bA as CurrencyBalance, aR as CurrencyPurchaseQuote, bB as CurrencyPurchaseQuoteBreakdown, aQ as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bC as DeviceApprovalChannel, bD as DeviceApprovalEnrollment, bE as DeviceApprovalFlow, bp as DeviceApprovalGrant, br as DeviceApprovalPollResult, bF as DeviceApprovalPollStatus, bv as DeviceApprovalSettleResult, bG as DeviceEnrollmentDecision, bH as DeviceEnrollmentRespond, bI as ExpiryReason, bJ as FeeTakenFrom, bK as FirstCharge, bL as FirstChargeStatus, bM as FundingSource, aa as GetSubscriptionOptions, ab as GetSubscriptionResult, bh as GuardianApprovalStatusResult, bN as InboundPendingItem, b8 as InboundPendingQuery, b9 as InboundPendingResult, aK as InitiateResult, aJ as InitiateSendInput, aL as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, b0 as ItemHistoryQuery, b1 as ItemHistoryResult, b2 as ItemOrderQuery, ba as LinkedIdentitiesQuery, bb as LinkedIdentitiesResult, bO as LinkedIdentityEmail, ac as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bP as MinPurchaseWarning, aA as MintPlayerTokenInput, aT as OrderDetailsResult, bQ as PhoneChangeConfirmation, aI as PhoneChangeRequest, bR as PhoneChangeRequestStatus, bl as PhoneShareApproveInput, bm as PhoneShareApproveResult, bj as PhoneShareContact, bk as PhoneShareInitiateResult, bn as PhoneShareStatusResult, a2 as PlatformApprovalResult, a3 as PlatformOrderStatusResult, a4 as PlatformPurchaseHistoryQuery, a5 as PlatformPurchaseHistoryResult, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, bS as PlatformPurchaseStatus, a6 as PlatformRefundInput, a7 as PlatformRefundResult, b5 as PlayerActivityEntry, b3 as PlayerActivityQuery, b4 as PlayerActivityResult, bT as PlayerActivityType, b6 as PlayerBalanceQuery, b7 as PlayerBalanceResult, au as PlayerCardsResult, aB as PlayerToken, bq as PollDeviceApprovalInput, aO as PurchaseInput, a_ as PurchaseItemInput, a$ as PurchaseItemResult, aP as PurchaseResult, Z as Rail, bU as RefundInitiation, bV as RefundPendingApproval, bW as RefundProcessingFeeBasis, bX as RefundReceipt, ak as RefundResult, bY as RefundRevenueShareAttribution, aj as RefundSubscriptionInput, bZ as RefundWarning, aC as RegisterPlayerInput, aD as RegisterPlayerResult, aG as RequestPhoneChangeInput, aH as RequestPhoneChangeResult, av as SandboxClockResult, b_ as SandboxClockState, aw as SandboxFailureOutcome, ay as SandboxForceAuthChallengeOptions, ax as SandboxForceFailureOptions, b$ as SavedCard, az as ServerConfig, bi as ServerDestinationsQuery, ah as SetPaymentMethodInput, ai as SetPaymentMethodResult, bc as SmsVerifyResult, aY as SteamFinalizeInput, aZ as SteamFinalizeResult, an as SteamFinalizeSubscriptionResult, aW as SteamInitPurchaseInput, aX as SteamInitPurchaseResult, am as SteamInitResult, c0 as SteamPack, aU as SteamPacksQuery, aV as SteamPacksResult, al as SteamSubscriptionInitInput, c1 as SteamUserSession, c2 as Subscription, c3 as SubscriptionBaseInput, c4 as SubscriptionConsent, c5 as SubscriptionConsentInput, c6 as SubscriptionFundingRail, c7 as SubscriptionInterval, ad as SubscriptionListResult, a9 as SubscriptionResult, c8 as SubscriptionRevenueShare, c9 as SubscriptionRevenueShareInput, ca as SubscriptionStatus, bg as TransactionStatusResult, cb as UnacknowledgedPurchaseOutcome, aE as UpdatePlayerPhoneInput, aF as UpdatePlayerPhoneResult, _ as VerificationMethod, cc as isRefundPendingApproval } from './types-B4J9Ifd2.cjs';
|
|
2
2
|
export { G as GameEventType, R as ReportGameEventInput, a as ReportGameEventResult, b as ReportServerGameEventInput } from './loyalty-events-CmDw2ZoR.cjs';
|
|
3
|
-
export { C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError,
|
|
4
|
-
export { S as SDK_VERSION } from './version-
|
|
3
|
+
export { C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, d as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, f as InvoWebhookEvent, g as ItemPurchasedData, K as KeyEnvironmentMismatchError, L as LIVE_KEY_PREFIX, h as ListPayeesQuery, j as ListPayeesResult, k as ListPayoutsQuery, l as ListPayoutsResult, P as PRODUCTION_BASE_URL, m as PayableBlocker, n as Payee, o as PayeeInvite, p as PayeeStatus, q as PayeeStatusChangedData, s as Payout, t as PayoutStatus, u as PayoutStatusChangedData, w as PayoutsServer, x as PlatformCommercePurchasedData, y as PlatformCommerceRefundedData, z as PlatformCommerceServer, A as PlayerPhoneChangedData, B as PurchaseCompletedData, F as PurchaseEventData, R as RegisterPayeeInput, G as RegisterPayeeResult, H as RequestPayoutInput, J as RequestPayoutResult, M as ReturnReasonCode, S as SANDBOX_BASE_URL, N as SandboxServer, O as SandboxSubscriptionsServer, Q as SubscriptionAuthenticationRequiredData, U as SubscriptionCanceledData, V as SubscriptionEventCommon, W as SubscriptionExpiredData, X as SubscriptionPastDueData, Y as SubscriptionPaymentFailedData, Z as SubscriptionRefundApprovedData, _ as SubscriptionRefundDetail, $ as SubscriptionRefundRejectedData, a0 as SubscriptionRefundRequestData, a1 as SubscriptionRefundedData, a2 as SubscriptionRenewalFunding, a3 as SubscriptionRenewalSplit, a4 as SubscriptionRenewedData, a5 as SubscriptionRevenueShareAttribution, a6 as SubscriptionTrialEventFields, a7 as SubscriptionsServer, T as TEST_KEY_PREFIX, a8 as TransferEventData, a9 as VerifyWebhookOptions, aa as WebhookHandlerOptions, b as baseUrlForKey, ab as createWebhookHandler, e as environmentForBaseUrl, c as environmentFromKeyPrefix, i as isDemoKey, r as resolveEnvironment, ac as verifyWebhook, ad as verifyWebhookAsync } from './server-A1s7zqzG.cjs';
|
|
4
|
+
export { S as SDK_VERSION } from './version-DB2wgiPY.cjs';
|
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { bu as ApproveWithDeviceCodeInput, bo as BeginDeviceApprovalInput, g as CallOptions, af as CancelResult, ae as CancelSubscriptionOptions, as as CardSetupConfirmInput, at as CardSetupConfirmResult, aq as CardSetupInput, ar as CardSetupResult, ao as CardSetupSessionInput, ap as CardSetupSessionResult, by as CardSetupStatus, ag as ChangeAmountResult, bz as CheckoutWarning, bf as ClaimCurrencyInput, y as ClaimDelivery, be as ClaimResult, bd as ClaimTransferInput, bw as CompleteDeviceApprovalInput, bx as CompleteDeviceApprovalResult, bs as ConfirmDeviceEnrollmentInput, bt as ConfirmDeviceEnrollmentResult, aS as ConfirmPaymentResult, aM as CreateCheckoutInput, aN as CreateCheckoutResult, a8 as CreateSubscriptionInput, bA as CurrencyBalance, aR as CurrencyPurchaseQuote, bB as CurrencyPurchaseQuoteBreakdown, aQ as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bC as DeviceApprovalChannel, bD as DeviceApprovalEnrollment, bE as DeviceApprovalFlow, bp as DeviceApprovalGrant, br as DeviceApprovalPollResult, bF as DeviceApprovalPollStatus, bv as DeviceApprovalSettleResult, bG as DeviceEnrollmentDecision, bH as DeviceEnrollmentRespond, bI as ExpiryReason, bJ as FeeTakenFrom, bK as FirstCharge, bL as FirstChargeStatus, bM as FundingSource, aa as GetSubscriptionOptions, ab as GetSubscriptionResult, bh as GuardianApprovalStatusResult, bN as InboundPendingItem, b8 as InboundPendingQuery, b9 as InboundPendingResult, aK as InitiateResult, aJ as InitiateSendInput, aL as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, b0 as ItemHistoryQuery, b1 as ItemHistoryResult, b2 as ItemOrderQuery, ba as LinkedIdentitiesQuery, bb as LinkedIdentitiesResult, bO as LinkedIdentityEmail, ac as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bP as MinPurchaseWarning, aA as MintPlayerTokenInput, aT as OrderDetailsResult, bQ as PhoneChangeConfirmation, aI as PhoneChangeRequest, bR as PhoneChangeRequestStatus, bl as PhoneShareApproveInput, bm as PhoneShareApproveResult, bj as PhoneShareContact, bk as PhoneShareInitiateResult, bn as PhoneShareStatusResult, a2 as PlatformApprovalResult, a3 as PlatformOrderStatusResult, a4 as PlatformPurchaseHistoryQuery, a5 as PlatformPurchaseHistoryResult, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, bS as PlatformPurchaseStatus, a6 as PlatformRefundInput, a7 as PlatformRefundResult, b5 as PlayerActivityEntry, b3 as PlayerActivityQuery, b4 as PlayerActivityResult, bT as PlayerActivityType, b6 as PlayerBalanceQuery, b7 as PlayerBalanceResult, au as PlayerCardsResult, aB as PlayerToken, bq as PollDeviceApprovalInput, aO as PurchaseInput, a_ as PurchaseItemInput, a$ as PurchaseItemResult, aP as PurchaseResult, Z as Rail, bU as RefundInitiation, bV as RefundPendingApproval, bW as RefundProcessingFeeBasis, bX as RefundReceipt, ak as RefundResult, bY as RefundRevenueShareAttribution, aj as RefundSubscriptionInput, bZ as RefundWarning, aC as RegisterPlayerInput, aD as RegisterPlayerResult, aG as RequestPhoneChangeInput, aH as RequestPhoneChangeResult, av as SandboxClockResult, b_ as SandboxClockState, aw as SandboxFailureOutcome, ay as SandboxForceAuthChallengeOptions, ax as SandboxForceFailureOptions, b$ as SavedCard, az as ServerConfig, bi as ServerDestinationsQuery, ah as SetPaymentMethodInput, ai as SetPaymentMethodResult, bc as SmsVerifyResult, aY as SteamFinalizeInput, aZ as SteamFinalizeResult, an as SteamFinalizeSubscriptionResult, aW as SteamInitPurchaseInput, aX as SteamInitPurchaseResult, am as SteamInitResult, c0 as SteamPack, aU as SteamPacksQuery, aV as SteamPacksResult, al as SteamSubscriptionInitInput, c1 as SteamUserSession, c2 as Subscription, c3 as SubscriptionBaseInput, c4 as SubscriptionConsent, c5 as SubscriptionConsentInput, c6 as SubscriptionFundingRail, c7 as SubscriptionInterval, ad as SubscriptionListResult, a9 as SubscriptionResult, c8 as SubscriptionRevenueShare, c9 as SubscriptionRevenueShareInput, ca as SubscriptionStatus, bg as TransactionStatusResult, cb as UnacknowledgedPurchaseOutcome, aE as UpdatePlayerPhoneInput, aF as UpdatePlayerPhoneResult, _ as VerificationMethod, cc as isRefundPendingApproval } from './types-
|
|
1
|
+
export { bu as ApproveWithDeviceCodeInput, bo as BeginDeviceApprovalInput, g as CallOptions, af as CancelResult, ae as CancelSubscriptionOptions, as as CardSetupConfirmInput, at as CardSetupConfirmResult, aq as CardSetupInput, ar as CardSetupResult, ao as CardSetupSessionInput, ap as CardSetupSessionResult, by as CardSetupStatus, ag as ChangeAmountResult, bz as CheckoutWarning, bf as ClaimCurrencyInput, y as ClaimDelivery, be as ClaimResult, bd as ClaimTransferInput, bw as CompleteDeviceApprovalInput, bx as CompleteDeviceApprovalResult, bs as ConfirmDeviceEnrollmentInput, bt as ConfirmDeviceEnrollmentResult, aS as ConfirmPaymentResult, aM as CreateCheckoutInput, aN as CreateCheckoutResult, a8 as CreateSubscriptionInput, bA as CurrencyBalance, aR as CurrencyPurchaseQuote, bB as CurrencyPurchaseQuoteBreakdown, aQ as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bC as DeviceApprovalChannel, bD as DeviceApprovalEnrollment, bE as DeviceApprovalFlow, bp as DeviceApprovalGrant, br as DeviceApprovalPollResult, bF as DeviceApprovalPollStatus, bv as DeviceApprovalSettleResult, bG as DeviceEnrollmentDecision, bH as DeviceEnrollmentRespond, bI as ExpiryReason, bJ as FeeTakenFrom, bK as FirstCharge, bL as FirstChargeStatus, bM as FundingSource, aa as GetSubscriptionOptions, ab as GetSubscriptionResult, bh as GuardianApprovalStatusResult, bN as InboundPendingItem, b8 as InboundPendingQuery, b9 as InboundPendingResult, aK as InitiateResult, aJ as InitiateSendInput, aL as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, b0 as ItemHistoryQuery, b1 as ItemHistoryResult, b2 as ItemOrderQuery, ba as LinkedIdentitiesQuery, bb as LinkedIdentitiesResult, bO as LinkedIdentityEmail, ac as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bP as MinPurchaseWarning, aA as MintPlayerTokenInput, aT as OrderDetailsResult, bQ as PhoneChangeConfirmation, aI as PhoneChangeRequest, bR as PhoneChangeRequestStatus, bl as PhoneShareApproveInput, bm as PhoneShareApproveResult, bj as PhoneShareContact, bk as PhoneShareInitiateResult, bn as PhoneShareStatusResult, a2 as PlatformApprovalResult, a3 as PlatformOrderStatusResult, a4 as PlatformPurchaseHistoryQuery, a5 as PlatformPurchaseHistoryResult, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, bS as PlatformPurchaseStatus, a6 as PlatformRefundInput, a7 as PlatformRefundResult, b5 as PlayerActivityEntry, b3 as PlayerActivityQuery, b4 as PlayerActivityResult, bT as PlayerActivityType, b6 as PlayerBalanceQuery, b7 as PlayerBalanceResult, au as PlayerCardsResult, aB as PlayerToken, bq as PollDeviceApprovalInput, aO as PurchaseInput, a_ as PurchaseItemInput, a$ as PurchaseItemResult, aP as PurchaseResult, Z as Rail, bU as RefundInitiation, bV as RefundPendingApproval, bW as RefundProcessingFeeBasis, bX as RefundReceipt, ak as RefundResult, bY as RefundRevenueShareAttribution, aj as RefundSubscriptionInput, bZ as RefundWarning, aC as RegisterPlayerInput, aD as RegisterPlayerResult, aG as RequestPhoneChangeInput, aH as RequestPhoneChangeResult, av as SandboxClockResult, b_ as SandboxClockState, aw as SandboxFailureOutcome, ay as SandboxForceAuthChallengeOptions, ax as SandboxForceFailureOptions, b$ as SavedCard, az as ServerConfig, bi as ServerDestinationsQuery, ah as SetPaymentMethodInput, ai as SetPaymentMethodResult, bc as SmsVerifyResult, aY as SteamFinalizeInput, aZ as SteamFinalizeResult, an as SteamFinalizeSubscriptionResult, aW as SteamInitPurchaseInput, aX as SteamInitPurchaseResult, am as SteamInitResult, c0 as SteamPack, aU as SteamPacksQuery, aV as SteamPacksResult, al as SteamSubscriptionInitInput, c1 as SteamUserSession, c2 as Subscription, c3 as SubscriptionBaseInput, c4 as SubscriptionConsent, c5 as SubscriptionConsentInput, c6 as SubscriptionFundingRail, c7 as SubscriptionInterval, ad as SubscriptionListResult, a9 as SubscriptionResult, c8 as SubscriptionRevenueShare, c9 as SubscriptionRevenueShareInput, ca as SubscriptionStatus, bg as TransactionStatusResult, cb as UnacknowledgedPurchaseOutcome, aE as UpdatePlayerPhoneInput, aF as UpdatePlayerPhoneResult, _ as VerificationMethod, cc as isRefundPendingApproval } from './types-B4J9Ifd2.js';
|
|
2
2
|
export { G as GameEventType, R as ReportGameEventInput, a as ReportGameEventResult, b as ReportServerGameEventInput } from './loyalty-events-CmDw2ZoR.js';
|
|
3
|
-
export { C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError,
|
|
4
|
-
export { S as SDK_VERSION } from './version-
|
|
3
|
+
export { C as CardsServer, D as DEMO_KEY_PREFIX, E as EnvironmentUnknownError, d as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, f as InvoWebhookEvent, g as ItemPurchasedData, K as KeyEnvironmentMismatchError, L as LIVE_KEY_PREFIX, h as ListPayeesQuery, j as ListPayeesResult, k as ListPayoutsQuery, l as ListPayoutsResult, P as PRODUCTION_BASE_URL, m as PayableBlocker, n as Payee, o as PayeeInvite, p as PayeeStatus, q as PayeeStatusChangedData, s as Payout, t as PayoutStatus, u as PayoutStatusChangedData, w as PayoutsServer, x as PlatformCommercePurchasedData, y as PlatformCommerceRefundedData, z as PlatformCommerceServer, A as PlayerPhoneChangedData, B as PurchaseCompletedData, F as PurchaseEventData, R as RegisterPayeeInput, G as RegisterPayeeResult, H as RequestPayoutInput, J as RequestPayoutResult, M as ReturnReasonCode, S as SANDBOX_BASE_URL, N as SandboxServer, O as SandboxSubscriptionsServer, Q as SubscriptionAuthenticationRequiredData, U as SubscriptionCanceledData, V as SubscriptionEventCommon, W as SubscriptionExpiredData, X as SubscriptionPastDueData, Y as SubscriptionPaymentFailedData, Z as SubscriptionRefundApprovedData, _ as SubscriptionRefundDetail, $ as SubscriptionRefundRejectedData, a0 as SubscriptionRefundRequestData, a1 as SubscriptionRefundedData, a2 as SubscriptionRenewalFunding, a3 as SubscriptionRenewalSplit, a4 as SubscriptionRenewedData, a5 as SubscriptionRevenueShareAttribution, a6 as SubscriptionTrialEventFields, a7 as SubscriptionsServer, T as TEST_KEY_PREFIX, a8 as TransferEventData, a9 as VerifyWebhookOptions, aa as WebhookHandlerOptions, b as baseUrlForKey, ab as createWebhookHandler, e as environmentForBaseUrl, c as environmentFromKeyPrefix, i as isDemoKey, r as resolveEnvironment, ac as verifyWebhook, ad as verifyWebhookAsync } from './server-JARGQrat.js';
|
|
4
|
+
export { S as SDK_VERSION } from './version-DB2wgiPY.js';
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { CardsServer, DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, PRODUCTION_BASE_URL, PayoutsServer, PlatformCommerceServer, SANDBOX_BASE_URL, SandboxServer, SandboxSubscriptionsServer, SubscriptionsServer, baseUrlForKey, createWebhookHandler, isDemoKey, isRefundPendingApproval, resolveEnvironment, verifyWebhook, verifyWebhookAsync } from './chunk-
|
|
2
|
-
export { SDK_VERSION } from './chunk-
|
|
3
|
-
export { InvoError } from './chunk-
|
|
1
|
+
export { CardsServer, DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, KeyEnvironmentMismatchError, LIVE_KEY_PREFIX, PRODUCTION_BASE_URL, PayoutsServer, PlatformCommerceServer, SANDBOX_BASE_URL, SandboxServer, SandboxSubscriptionsServer, SubscriptionsServer, TEST_KEY_PREFIX, baseUrlForKey, createWebhookHandler, environmentForBaseUrl, environmentFromKeyPrefix, isDemoKey, isRefundPendingApproval, resolveEnvironment, verifyWebhook, verifyWebhookAsync } from './chunk-MJXQ3Q7C.js';
|
|
2
|
+
export { SDK_VERSION } from './chunk-6763YM7P.js';
|
|
3
|
+
export { InvoError } from './chunk-3BR7URPM.js';
|
|
4
4
|
//# sourceMappingURL=server.js.map
|
|
5
5
|
//# sourceMappingURL=server.js.map
|
|
@@ -297,6 +297,13 @@ declare class InvoError extends Error {
|
|
|
297
297
|
* Not retryable until INVO resumes payments; show a neutral "purchases are
|
|
298
298
|
* unavailable right now" message. */
|
|
299
299
|
get isPaymentsPaused(): boolean;
|
|
300
|
+
/** The key belongs to the other INVO environment (`KEY_FOR_OTHER_ENVIRONMENT`, 401;
|
|
301
|
+
* additive, 3.34.0): a test key (`ivsdk_test_`) sent to production, or a live key
|
|
302
|
+
* (`ivsdk_live_`) sent to the sandbox. Never retried. Use the key for the environment
|
|
303
|
+
* you are calling, or point the SDK at the environment the key is for. The code is
|
|
304
|
+
* matched on any code field (`code`, `rawCode`, `publicCode`, or the body's
|
|
305
|
+
* `error_code` / `code`), since the 401 may carry a different `code`. */
|
|
306
|
+
get isKeyForOtherEnvironment(): boolean;
|
|
300
307
|
/** A buyer-approved balance purchase cannot start (`BALANCE_UNAVAILABLE`, 400; 3.33.0):
|
|
301
308
|
* the buyer is unknown here or their balance is short. One answer on purpose; the
|
|
302
309
|
* balance is never disclosed. Offer another way to pay. */
|
|
@@ -639,7 +646,7 @@ declare class InvoError extends Error {
|
|
|
639
646
|
/**
|
|
640
647
|
* True when a sandbox clock call was refused for a missing, wrong or never-issued
|
|
641
648
|
* `X-Sandbox-Clock-Key` (`SANDBOX_CLOCK_UNAUTHORIZED`, 401). Reveal or rotate the key on
|
|
642
|
-
* the game's Game Settings page in the
|
|
649
|
+
* the game's Game Settings page in the INVO console in test mode (console.invo.network/test).
|
|
643
650
|
*/
|
|
644
651
|
get isSandboxClockUnauthorized(): boolean;
|
|
645
652
|
/**
|
|
@@ -985,11 +992,18 @@ interface InvoConfig {
|
|
|
985
992
|
hooks?: InvoHooks;
|
|
986
993
|
}
|
|
987
994
|
interface ServerConfig extends InvoConfig {
|
|
988
|
-
/**
|
|
995
|
+
/**
|
|
996
|
+
* The game secret. Server-side ONLY: never ship this to a browser.
|
|
997
|
+
*
|
|
998
|
+
* Keys made from 3.34.0 on name their environment: `ivsdk_live_...` is production and
|
|
999
|
+
* `ivsdk_test_...` is the sandbox. Pairing one with a `baseUrl` on the other INVO host
|
|
1000
|
+
* throws `KeyEnvironmentMismatchError` here, before any request. A `baseUrl` that is not
|
|
1001
|
+
* an INVO host (your own proxy) is not checked, nor is an older unprefixed `ivsdk_...` key.
|
|
1002
|
+
*/
|
|
989
1003
|
gameSecret: string;
|
|
990
1004
|
/**
|
|
991
|
-
* The per-game **sandbox clock key** (`ivclk_...`) from the
|
|
992
|
-
* Settings → "Sandbox clock key"). Sent as `X-Sandbox-Clock-Key` by
|
|
1005
|
+
* The per-game **sandbox clock key** (`ivclk_...`) from the INVO console in test mode (console.invo.network/test)
|
|
1006
|
+
* (Game Settings → "Sandbox clock key"). Sent as `X-Sandbox-Clock-Key` by
|
|
993
1007
|
* `invo.sandbox.subscriptions.*` only. Optional; those methods throw `INVALID_INPUT`
|
|
994
1008
|
* before the network when it is missing. Has no effect outside sandbox. Server-side
|
|
995
1009
|
* only — keep it out of game clients and source control.
|
|
@@ -297,6 +297,13 @@ declare class InvoError extends Error {
|
|
|
297
297
|
* Not retryable until INVO resumes payments; show a neutral "purchases are
|
|
298
298
|
* unavailable right now" message. */
|
|
299
299
|
get isPaymentsPaused(): boolean;
|
|
300
|
+
/** The key belongs to the other INVO environment (`KEY_FOR_OTHER_ENVIRONMENT`, 401;
|
|
301
|
+
* additive, 3.34.0): a test key (`ivsdk_test_`) sent to production, or a live key
|
|
302
|
+
* (`ivsdk_live_`) sent to the sandbox. Never retried. Use the key for the environment
|
|
303
|
+
* you are calling, or point the SDK at the environment the key is for. The code is
|
|
304
|
+
* matched on any code field (`code`, `rawCode`, `publicCode`, or the body's
|
|
305
|
+
* `error_code` / `code`), since the 401 may carry a different `code`. */
|
|
306
|
+
get isKeyForOtherEnvironment(): boolean;
|
|
300
307
|
/** A buyer-approved balance purchase cannot start (`BALANCE_UNAVAILABLE`, 400; 3.33.0):
|
|
301
308
|
* the buyer is unknown here or their balance is short. One answer on purpose; the
|
|
302
309
|
* balance is never disclosed. Offer another way to pay. */
|
|
@@ -639,7 +646,7 @@ declare class InvoError extends Error {
|
|
|
639
646
|
/**
|
|
640
647
|
* True when a sandbox clock call was refused for a missing, wrong or never-issued
|
|
641
648
|
* `X-Sandbox-Clock-Key` (`SANDBOX_CLOCK_UNAUTHORIZED`, 401). Reveal or rotate the key on
|
|
642
|
-
* the game's Game Settings page in the
|
|
649
|
+
* the game's Game Settings page in the INVO console in test mode (console.invo.network/test).
|
|
643
650
|
*/
|
|
644
651
|
get isSandboxClockUnauthorized(): boolean;
|
|
645
652
|
/**
|
|
@@ -985,11 +992,18 @@ interface InvoConfig {
|
|
|
985
992
|
hooks?: InvoHooks;
|
|
986
993
|
}
|
|
987
994
|
interface ServerConfig extends InvoConfig {
|
|
988
|
-
/**
|
|
995
|
+
/**
|
|
996
|
+
* The game secret. Server-side ONLY: never ship this to a browser.
|
|
997
|
+
*
|
|
998
|
+
* Keys made from 3.34.0 on name their environment: `ivsdk_live_...` is production and
|
|
999
|
+
* `ivsdk_test_...` is the sandbox. Pairing one with a `baseUrl` on the other INVO host
|
|
1000
|
+
* throws `KeyEnvironmentMismatchError` here, before any request. A `baseUrl` that is not
|
|
1001
|
+
* an INVO host (your own proxy) is not checked, nor is an older unprefixed `ivsdk_...` key.
|
|
1002
|
+
*/
|
|
989
1003
|
gameSecret: string;
|
|
990
1004
|
/**
|
|
991
|
-
* The per-game **sandbox clock key** (`ivclk_...`) from the
|
|
992
|
-
* Settings → "Sandbox clock key"). Sent as `X-Sandbox-Clock-Key` by
|
|
1005
|
+
* The per-game **sandbox clock key** (`ivclk_...`) from the INVO console in test mode (console.invo.network/test)
|
|
1006
|
+
* (Game Settings → "Sandbox clock key"). Sent as `X-Sandbox-Clock-Key` by
|
|
993
1007
|
* `invo.sandbox.subscriptions.*` only. Optional; those methods throw `INVALID_INPUT`
|
|
994
1008
|
* before the network when it is missing. Has no effect outside sandbox. Server-side
|
|
995
1009
|
* only — keep it out of game clients and source control.
|