@invonetwork/web-sdk 3.29.1 → 3.30.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 +1432 -1397
- package/README.md +2954 -2923
- package/dist/{chunk-YONO4JE5.js → chunk-664RAO2T.js} +25 -5
- package/dist/chunk-BIK6UXY7.js +6 -0
- package/dist/chunk-QDHOPJFL.js +1634 -0
- package/dist/{chunk-VP3OK4J4.js → chunk-TSTP2CWA.js} +471 -3
- package/dist/game-server.cjs +269 -2
- package/dist/game-server.d.cts +40 -6
- package/dist/game-server.d.ts +40 -6
- package/dist/game-server.js +252 -7
- package/dist/game.cjs +2677 -9
- package/dist/game.d.cts +78 -4
- package/dist/game.d.ts +78 -4
- package/dist/game.js +558 -3
- package/dist/hosted-approval-DcY4U2RN.d.cts +96 -0
- package/dist/hosted-approval-DiKmtjEh.d.ts +96 -0
- package/dist/index.d.cts +7 -96
- package/dist/index.d.ts +7 -96
- package/dist/index.js +2 -1635
- package/dist/loyalty-events-CmDw2ZoR.d.cts +40 -0
- package/dist/loyalty-events-CmDw2ZoR.d.ts +40 -0
- package/dist/{server-BYY6tM6X.d.ts → server-B0mvlGFY.d.ts} +17 -2
- package/dist/{server-Bxo_wgHx.d.cts → server-DEh9wjF2.d.cts} +17 -2
- package/dist/server.cjs +22 -1
- package/dist/server.d.cts +4 -3
- package/dist/server.d.ts +4 -3
- package/dist/server.js +3 -4
- package/dist/{types-_lIm74kd.d.cts → types-BTbZicgj.d.cts} +1 -40
- package/dist/{types-_lIm74kd.d.ts → types-BTbZicgj.d.ts} +1 -40
- package/dist/{types-CLyJDuXd.d.cts → types-jUxfYjiD.d.cts} +64 -1
- package/dist/{types-CLyJDuXd.d.ts → types-jUxfYjiD.d.ts} +64 -1
- package/dist/{version-DOaYbHu7.d.cts → version-DfVkILOj.d.cts} +1 -1
- package/dist/{version-DOaYbHu7.d.ts → version-DfVkILOj.d.ts} +1 -1
- package/package.json +91 -91
- package/dist/chunk-6CN236QH.js +0 -473
- package/dist/chunk-VOGZZ6QS.js +0 -6
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { InvoError, buildGameEventBody, toReportGameEventResult } from './chunk-VP3OK4J4.js';
|
|
1
|
+
import { SDK_VERSION } from './chunk-BIK6UXY7.js';
|
|
2
|
+
import { InvoError, assertSecureBaseUrl, Http, toRequestPhoneChangeResult, toPhoneChangeRequest, receiptFields, creditFields, toLoyaltyCardsResult, buildGameEventBody, toReportGameEventResult, toDestinationsResult } from './chunk-TSTP2CWA.js';
|
|
4
3
|
import { createHmac, timingSafeEqual } from 'crypto';
|
|
5
4
|
|
|
6
5
|
// src/payouts.ts
|
|
@@ -2216,6 +2215,27 @@ var SandboxSubscriptionsServer = class {
|
|
|
2216
2215
|
var SandboxServer = class {
|
|
2217
2216
|
constructor(http, auth, clockKey) {
|
|
2218
2217
|
this.subscriptions = new SandboxSubscriptionsServer(http, auth, clockKey);
|
|
2218
|
+
this.http = http;
|
|
2219
|
+
this.auth = auth;
|
|
2220
|
+
}
|
|
2221
|
+
/**
|
|
2222
|
+
* Public demo key only (3.30.0): approve a send or transfer the demo player started, without
|
|
2223
|
+
* a passkey. INVO's demo sandbox answers with the claim code, which the recipient's game
|
|
2224
|
+
* server then uses with `claimCurrency` (a send) or `claimTransfer` (a transfer). Refused on
|
|
2225
|
+
* every other key and in production.
|
|
2226
|
+
*/
|
|
2227
|
+
async approveDemoMove(transactionId, kind, opts) {
|
|
2228
|
+
if (typeof transactionId !== "string" || !transactionId.trim()) {
|
|
2229
|
+
throw invalidInput2("transactionId", transactionId, "is required");
|
|
2230
|
+
}
|
|
2231
|
+
const path = `/test-auth/${kind === "send" ? "sends" : "transfers"}/${encodeURIComponent(transactionId)}/approve`;
|
|
2232
|
+
const raw = await this.http.post(path, {}, this.auth, { signal: opts?.signal });
|
|
2233
|
+
return {
|
|
2234
|
+
status: String(raw["status"] ?? ""),
|
|
2235
|
+
claimCode: typeof raw["claim_code"] === "string" ? raw["claim_code"] : null,
|
|
2236
|
+
claimCodeExpiresAt: typeof raw["claim_code_expires_at"] === "string" ? raw["claim_code_expires_at"] : null,
|
|
2237
|
+
raw
|
|
2238
|
+
};
|
|
2219
2239
|
}
|
|
2220
2240
|
};
|
|
2221
2241
|
var InvoServer = class {
|
|
@@ -3748,5 +3768,5 @@ var InvoServer = class {
|
|
|
3748
3768
|
};
|
|
3749
3769
|
|
|
3750
3770
|
export { CardsServer, DEMO_KEY_PREFIX, EnvironmentUnknownError, InvoServer, PRODUCTION_BASE_URL, PayoutsServer, PlatformCommerceServer, SANDBOX_BASE_URL, SandboxServer, SandboxSubscriptionsServer, SubscriptionsServer, baseUrlForKey, createWebhookHandler, isDemoKey, isRefundPendingApproval, resolveEnvironment, verifyInvoSignature, verifyWebhook, verifyWebhookAsync };
|
|
3751
|
-
//# sourceMappingURL=chunk-
|
|
3752
|
-
//# sourceMappingURL=chunk-
|
|
3771
|
+
//# sourceMappingURL=chunk-664RAO2T.js.map
|
|
3772
|
+
//# sourceMappingURL=chunk-664RAO2T.js.map
|