@invonetwork/web-sdk 3.29.0 → 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 -1389
- package/README.md +2954 -2923
- package/dist/{chunk-FJR44FKW.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 +295 -15
- package/dist/game-server.d.cts +49 -9
- package/dist/game-server.d.ts +49 -9
- package/dist/game-server.js +278 -20
- package/dist/game.cjs +2680 -9
- package/dist/game.d.cts +78 -4
- package/dist/game.d.ts +78 -4
- package/dist/game.js +561 -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-Dnx5jxS4.d.ts → server-B0mvlGFY.d.ts} +17 -2
- package/dist/{server-UZ38eD2p.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.ts → types-BTbZicgj.d.cts} +1 -40
- package/dist/{types-_lIm74kd.d.cts → types-BTbZicgj.d.ts} +1 -40
- package/dist/{types-CoW9LopI.d.cts → types-jUxfYjiD.d.cts} +76 -1
- package/dist/{types-CoW9LopI.d.ts → types-jUxfYjiD.d.ts} +76 -1
- package/dist/{version-xyYQO5hp.d.cts → version-DfVkILOj.d.cts} +1 -1
- package/dist/{version-xyYQO5hp.d.ts → version-DfVkILOj.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-6CN236QH.js +0 -473
- package/dist/chunk-KZJABBVT.js +0 -6
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gameplay event types your game reports to INVO's loyalty engine (3.27.0). Currency steps
|
|
3
|
+
* (purchases, transfers, sends, item spending, subscriptions) are seen by INVO directly and
|
|
4
|
+
* are never reported; reporting one is refused with `RESERVED_EVENT_TYPE`.
|
|
5
|
+
*
|
|
6
|
+
* - `game.session.started` / `game.session.heartbeat`: payload `{ session_ref }`
|
|
7
|
+
* - `game.session.ended`: payload `{ session_ref, duration_seconds }`
|
|
8
|
+
* - `game.milestone.reached`: payload `{ milestone_key, value?, session_ref? }` (e.g. `level_10`)
|
|
9
|
+
* - `game.custom.recorded`: payload `{ event_name, value? }`; the name must be registered in
|
|
10
|
+
* the console first, else `422 validation_failed`
|
|
11
|
+
*/
|
|
12
|
+
type GameEventType = "game.session.started" | "game.session.heartbeat" | "game.session.ended" | "game.milestone.reached" | "game.custom.recorded" | (string & {});
|
|
13
|
+
/** One gameplay event, reported by the player's browser (`InvoClient.reportGameEvent`). */
|
|
14
|
+
interface ReportGameEventInput {
|
|
15
|
+
/** A `game.*` type; see {@link GameEventType}. */
|
|
16
|
+
eventType: GameEventType;
|
|
17
|
+
/**
|
|
18
|
+
* Idempotency key (a UUID). Resend the SAME id when you retry, so INVO counts the event
|
|
19
|
+
* once. The SDK generates one when you leave it out, and returns it.
|
|
20
|
+
*/
|
|
21
|
+
eventId?: string;
|
|
22
|
+
/** When it happened: ISO 8601 with a timezone, or a Date. Defaults to INVO's receive time. */
|
|
23
|
+
occurredAt?: string | Date;
|
|
24
|
+
/** The event's fields (see {@link GameEventType}). */
|
|
25
|
+
payload?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
/** One gameplay event reported by your SERVER (`InvoServer.reportGameEvent`), trusted for rewards. */
|
|
28
|
+
interface ReportServerGameEventInput extends ReportGameEventInput {
|
|
29
|
+
/** The player in your game, by email. */
|
|
30
|
+
playerEmail: string;
|
|
31
|
+
}
|
|
32
|
+
interface ReportGameEventResult {
|
|
33
|
+
/** True when INVO recorded the event (202). */
|
|
34
|
+
accepted: boolean;
|
|
35
|
+
/** The event id INVO received: yours, or the one the SDK generated. Reuse it on a retry. */
|
|
36
|
+
eventId: string;
|
|
37
|
+
raw: Record<string, unknown>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type { GameEventType as G, ReportGameEventInput as R, ReportGameEventResult as a, ReportServerGameEventInput as b };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gameplay event types your game reports to INVO's loyalty engine (3.27.0). Currency steps
|
|
3
|
+
* (purchases, transfers, sends, item spending, subscriptions) are seen by INVO directly and
|
|
4
|
+
* are never reported; reporting one is refused with `RESERVED_EVENT_TYPE`.
|
|
5
|
+
*
|
|
6
|
+
* - `game.session.started` / `game.session.heartbeat`: payload `{ session_ref }`
|
|
7
|
+
* - `game.session.ended`: payload `{ session_ref, duration_seconds }`
|
|
8
|
+
* - `game.milestone.reached`: payload `{ milestone_key, value?, session_ref? }` (e.g. `level_10`)
|
|
9
|
+
* - `game.custom.recorded`: payload `{ event_name, value? }`; the name must be registered in
|
|
10
|
+
* the console first, else `422 validation_failed`
|
|
11
|
+
*/
|
|
12
|
+
type GameEventType = "game.session.started" | "game.session.heartbeat" | "game.session.ended" | "game.milestone.reached" | "game.custom.recorded" | (string & {});
|
|
13
|
+
/** One gameplay event, reported by the player's browser (`InvoClient.reportGameEvent`). */
|
|
14
|
+
interface ReportGameEventInput {
|
|
15
|
+
/** A `game.*` type; see {@link GameEventType}. */
|
|
16
|
+
eventType: GameEventType;
|
|
17
|
+
/**
|
|
18
|
+
* Idempotency key (a UUID). Resend the SAME id when you retry, so INVO counts the event
|
|
19
|
+
* once. The SDK generates one when you leave it out, and returns it.
|
|
20
|
+
*/
|
|
21
|
+
eventId?: string;
|
|
22
|
+
/** When it happened: ISO 8601 with a timezone, or a Date. Defaults to INVO's receive time. */
|
|
23
|
+
occurredAt?: string | Date;
|
|
24
|
+
/** The event's fields (see {@link GameEventType}). */
|
|
25
|
+
payload?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
/** One gameplay event reported by your SERVER (`InvoServer.reportGameEvent`), trusted for rewards. */
|
|
28
|
+
interface ReportServerGameEventInput extends ReportGameEventInput {
|
|
29
|
+
/** The player in your game, by email. */
|
|
30
|
+
playerEmail: string;
|
|
31
|
+
}
|
|
32
|
+
interface ReportGameEventResult {
|
|
33
|
+
/** True when INVO recorded the event (202). */
|
|
34
|
+
accepted: boolean;
|
|
35
|
+
/** The event id INVO received: yours, or the one the SDK generated. Reuse it on a retry. */
|
|
36
|
+
eventId: string;
|
|
37
|
+
raw: Record<string, unknown>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type { GameEventType as G, ReportGameEventInput as R, ReportGameEventResult as a, ReportServerGameEventInput as b };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { I as InvoError, H as Http,
|
|
2
|
-
import './
|
|
1
|
+
import { I as InvoError, H as Http, $ as AuthHeader, g as CallOptions, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a5 as PlatformRefundInput, a6 as PlatformRefundResult, a7 as CreateSubscriptionInput, a8 as SubscriptionResult, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, ab as ListSubscriptionsOptions, ac as SubscriptionListResult, ad as CancelSubscriptionOptions, ae as CancelResult, af as ChangeAmountResult, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, ai as RefundSubscriptionInput, aj as RefundResult, ak as SteamSubscriptionInitInput, al as SteamInitResult, am as SteamFinalizeSubscriptionResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, ap as CardSetupInput, aq as CardSetupResult, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, at as PlayerCardsResult, au as SandboxClockResult, av as SandboxFailureOutcome, aw as SandboxForceFailureOptions, ax as SandboxForceAuthChallengeOptions, ay as ServerConfig, az as MintPlayerTokenInput, aA as PlayerToken, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, aH as PhoneChangeRequest, aI as InitiateSendInput, aJ as InitiateResult, aK as InitiateTransferInput, aL as CreateCheckoutInput, aM as CreateCheckoutResult, aN as PurchaseInput, aO as PurchaseResult, aP as CurrencyPurchaseQuoteInput, aQ as CurrencyPurchaseQuote, aR as ConfirmPaymentResult, aS as OrderDetailsResult, aT as SteamPacksQuery, aU as SteamPacksResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, aZ as PurchaseItemInput, a_ as PurchaseItemResult, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, b4 as PlayerActivityEntry, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, q as LoyaltyCardsResult, b7 as InboundPendingQuery, b8 as InboundPendingResult, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bb as SmsVerifyResult, bc as ClaimTransferInput, bd as ClaimResult, be as ClaimCurrencyInput, bf as TransactionStatusResult, bg as GuardianApprovalStatusResult, bh as ServerDestinationsQuery, p as DestinationsResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bm as PhoneShareStatusResult, bn as BeginDeviceApprovalInput, bo as DeviceApprovalGrant, bp as PollDeviceApprovalInput, bq as DeviceApprovalPollResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, bt as ApproveWithDeviceCodeInput, bu as DeviceApprovalSettleResult, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult } from './types-BTbZicgj.js';
|
|
2
|
+
import { b as ReportServerGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.js';
|
|
3
|
+
import './version-DfVkILOj.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Pick the INVO environment from the game secret alone (3.28.0).
|
|
@@ -1566,7 +1567,21 @@ declare class SandboxSubscriptionsServer {
|
|
|
1566
1567
|
declare class SandboxServer {
|
|
1567
1568
|
/** The four subscription clock tools. See {@link SandboxSubscriptionsServer}. */
|
|
1568
1569
|
readonly subscriptions: SandboxSubscriptionsServer;
|
|
1570
|
+
private readonly http;
|
|
1571
|
+
private readonly auth;
|
|
1569
1572
|
constructor(http: Http, auth: AuthHeader, clockKey: string | undefined);
|
|
1573
|
+
/**
|
|
1574
|
+
* Public demo key only (3.30.0): approve a send or transfer the demo player started, without
|
|
1575
|
+
* a passkey. INVO's demo sandbox answers with the claim code, which the recipient's game
|
|
1576
|
+
* server then uses with `claimCurrency` (a send) or `claimTransfer` (a transfer). Refused on
|
|
1577
|
+
* every other key and in production.
|
|
1578
|
+
*/
|
|
1579
|
+
approveDemoMove(transactionId: string, kind: "send" | "transfer", opts?: CallOptions): Promise<{
|
|
1580
|
+
status: string;
|
|
1581
|
+
claimCode: string | null;
|
|
1582
|
+
claimCodeExpiresAt: string | null;
|
|
1583
|
+
raw: Record<string, unknown>;
|
|
1584
|
+
}>;
|
|
1570
1585
|
}
|
|
1571
1586
|
/**
|
|
1572
1587
|
* ## Storefront keys — one client per storefront
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { I as InvoError, H as Http,
|
|
2
|
-
import './
|
|
1
|
+
import { I as InvoError, H as Http, $ as AuthHeader, g as CallOptions, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a5 as PlatformRefundInput, a6 as PlatformRefundResult, a7 as CreateSubscriptionInput, a8 as SubscriptionResult, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, ab as ListSubscriptionsOptions, ac as SubscriptionListResult, ad as CancelSubscriptionOptions, ae as CancelResult, af as ChangeAmountResult, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, ai as RefundSubscriptionInput, aj as RefundResult, ak as SteamSubscriptionInitInput, al as SteamInitResult, am as SteamFinalizeSubscriptionResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, ap as CardSetupInput, aq as CardSetupResult, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, at as PlayerCardsResult, au as SandboxClockResult, av as SandboxFailureOutcome, aw as SandboxForceFailureOptions, ax as SandboxForceAuthChallengeOptions, ay as ServerConfig, az as MintPlayerTokenInput, aA as PlayerToken, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, aH as PhoneChangeRequest, aI as InitiateSendInput, aJ as InitiateResult, aK as InitiateTransferInput, aL as CreateCheckoutInput, aM as CreateCheckoutResult, aN as PurchaseInput, aO as PurchaseResult, aP as CurrencyPurchaseQuoteInput, aQ as CurrencyPurchaseQuote, aR as ConfirmPaymentResult, aS as OrderDetailsResult, aT as SteamPacksQuery, aU as SteamPacksResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, aZ as PurchaseItemInput, a_ as PurchaseItemResult, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, b4 as PlayerActivityEntry, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, q as LoyaltyCardsResult, b7 as InboundPendingQuery, b8 as InboundPendingResult, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bb as SmsVerifyResult, bc as ClaimTransferInput, bd as ClaimResult, be as ClaimCurrencyInput, bf as TransactionStatusResult, bg as GuardianApprovalStatusResult, bh as ServerDestinationsQuery, p as DestinationsResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bm as PhoneShareStatusResult, bn as BeginDeviceApprovalInput, bo as DeviceApprovalGrant, bp as PollDeviceApprovalInput, bq as DeviceApprovalPollResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, bt as ApproveWithDeviceCodeInput, bu as DeviceApprovalSettleResult, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult } from './types-BTbZicgj.cjs';
|
|
2
|
+
import { b as ReportServerGameEventInput, a as ReportGameEventResult } from './loyalty-events-CmDw2ZoR.cjs';
|
|
3
|
+
import './version-DfVkILOj.cjs';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Pick the INVO environment from the game secret alone (3.28.0).
|
|
@@ -1566,7 +1567,21 @@ declare class SandboxSubscriptionsServer {
|
|
|
1566
1567
|
declare class SandboxServer {
|
|
1567
1568
|
/** The four subscription clock tools. See {@link SandboxSubscriptionsServer}. */
|
|
1568
1569
|
readonly subscriptions: SandboxSubscriptionsServer;
|
|
1570
|
+
private readonly http;
|
|
1571
|
+
private readonly auth;
|
|
1569
1572
|
constructor(http: Http, auth: AuthHeader, clockKey: string | undefined);
|
|
1573
|
+
/**
|
|
1574
|
+
* Public demo key only (3.30.0): approve a send or transfer the demo player started, without
|
|
1575
|
+
* a passkey. INVO's demo sandbox answers with the claim code, which the recipient's game
|
|
1576
|
+
* server then uses with `claimCurrency` (a send) or `claimTransfer` (a transfer). Refused on
|
|
1577
|
+
* every other key and in production.
|
|
1578
|
+
*/
|
|
1579
|
+
approveDemoMove(transactionId: string, kind: "send" | "transfer", opts?: CallOptions): Promise<{
|
|
1580
|
+
status: string;
|
|
1581
|
+
claimCode: string | null;
|
|
1582
|
+
claimCodeExpiresAt: string | null;
|
|
1583
|
+
raw: Record<string, unknown>;
|
|
1584
|
+
}>;
|
|
1570
1585
|
}
|
|
1571
1586
|
/**
|
|
1572
1587
|
* ## Storefront keys — one client per storefront
|
package/dist/server.cjs
CHANGED
|
@@ -1593,7 +1593,7 @@ function toPhoneChangeRequest(raw) {
|
|
|
1593
1593
|
}
|
|
1594
1594
|
|
|
1595
1595
|
// src/version.ts
|
|
1596
|
-
var SDK_VERSION = "3.
|
|
1596
|
+
var SDK_VERSION = "3.30.0";
|
|
1597
1597
|
|
|
1598
1598
|
// src/payouts.ts
|
|
1599
1599
|
var AMOUNT = /^\d+(\.\d{1,2})?$/;
|
|
@@ -3805,6 +3805,27 @@ var SandboxSubscriptionsServer = class {
|
|
|
3805
3805
|
var SandboxServer = class {
|
|
3806
3806
|
constructor(http, auth, clockKey) {
|
|
3807
3807
|
this.subscriptions = new SandboxSubscriptionsServer(http, auth, clockKey);
|
|
3808
|
+
this.http = http;
|
|
3809
|
+
this.auth = auth;
|
|
3810
|
+
}
|
|
3811
|
+
/**
|
|
3812
|
+
* Public demo key only (3.30.0): approve a send or transfer the demo player started, without
|
|
3813
|
+
* a passkey. INVO's demo sandbox answers with the claim code, which the recipient's game
|
|
3814
|
+
* server then uses with `claimCurrency` (a send) or `claimTransfer` (a transfer). Refused on
|
|
3815
|
+
* every other key and in production.
|
|
3816
|
+
*/
|
|
3817
|
+
async approveDemoMove(transactionId, kind, opts) {
|
|
3818
|
+
if (typeof transactionId !== "string" || !transactionId.trim()) {
|
|
3819
|
+
throw invalidInput2("transactionId", transactionId, "is required");
|
|
3820
|
+
}
|
|
3821
|
+
const path = `/test-auth/${kind === "send" ? "sends" : "transfers"}/${encodeURIComponent(transactionId)}/approve`;
|
|
3822
|
+
const raw = await this.http.post(path, {}, this.auth, { signal: opts?.signal });
|
|
3823
|
+
return {
|
|
3824
|
+
status: String(raw["status"] ?? ""),
|
|
3825
|
+
claimCode: typeof raw["claim_code"] === "string" ? raw["claim_code"] : null,
|
|
3826
|
+
claimCodeExpiresAt: typeof raw["claim_code_expires_at"] === "string" ? raw["claim_code_expires_at"] : null,
|
|
3827
|
+
raw
|
|
3828
|
+
};
|
|
3808
3829
|
}
|
|
3809
3830
|
};
|
|
3810
3831
|
var InvoServer = class {
|
package/dist/server.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { S as
|
|
1
|
+
export { bt as ApproveWithDeviceCodeInput, bn as BeginDeviceApprovalInput, g as CallOptions, ae as CancelResult, ad as CancelSubscriptionOptions, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, ap as CardSetupInput, aq as CardSetupResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, bx as CardSetupStatus, af as ChangeAmountResult, by as CheckoutWarning, be as ClaimCurrencyInput, y as ClaimDelivery, bd as ClaimResult, bc as ClaimTransferInput, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, aR as ConfirmPaymentResult, aL as CreateCheckoutInput, aM as CreateCheckoutResult, a7 as CreateSubscriptionInput, bz as CurrencyBalance, aQ as CurrencyPurchaseQuote, bA as CurrencyPurchaseQuoteBreakdown, aP as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bB as DeviceApprovalChannel, bC as DeviceApprovalEnrollment, bD as DeviceApprovalFlow, bo as DeviceApprovalGrant, bq as DeviceApprovalPollResult, bE as DeviceApprovalPollStatus, bu as DeviceApprovalSettleResult, bF as DeviceEnrollmentDecision, bG as DeviceEnrollmentRespond, bH as ExpiryReason, bI as FeeTakenFrom, bJ as FirstCharge, bK as FirstChargeStatus, bL as FundingSource, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, bg as GuardianApprovalStatusResult, bM as InboundPendingItem, b7 as InboundPendingQuery, b8 as InboundPendingResult, aJ as InitiateResult, aI as InitiateSendInput, aK as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bN as LinkedIdentityEmail, ab as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bO as MinPurchaseWarning, az as MintPlayerTokenInput, aS as OrderDetailsResult, bP as PhoneChangeConfirmation, aH as PhoneChangeRequest, bQ as PhoneChangeRequestStatus, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bm as PhoneShareStatusResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, bR as PlatformPurchaseStatus, a5 as PlatformRefundInput, a6 as PlatformRefundResult, b4 as PlayerActivityEntry, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, bS as PlayerActivityType, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, at as PlayerCardsResult, aA as PlayerToken, bp as PollDeviceApprovalInput, aN as PurchaseInput, aZ as PurchaseItemInput, a_ as PurchaseItemResult, aO as PurchaseResult, Z as Rail, bT as RefundInitiation, bU as RefundPendingApproval, bV as RefundProcessingFeeBasis, bW as RefundReceipt, aj as RefundResult, bX as RefundRevenueShareAttribution, ai as RefundSubscriptionInput, bY as RefundWarning, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, au as SandboxClockResult, bZ as SandboxClockState, av as SandboxFailureOutcome, ax as SandboxForceAuthChallengeOptions, aw as SandboxForceFailureOptions, b_ as SavedCard, ay as ServerConfig, bh as ServerDestinationsQuery, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, bb as SmsVerifyResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, am as SteamFinalizeSubscriptionResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, al as SteamInitResult, b$ as SteamPack, aT as SteamPacksQuery, aU as SteamPacksResult, ak as SteamSubscriptionInitInput, c0 as SteamUserSession, c1 as Subscription, c2 as SubscriptionBaseInput, c3 as SubscriptionConsent, c4 as SubscriptionConsentInput, c5 as SubscriptionFundingRail, c6 as SubscriptionInterval, ac as SubscriptionListResult, a8 as SubscriptionResult, c7 as SubscriptionRevenueShare, c8 as SubscriptionRevenueShareInput, c9 as SubscriptionStatus, bf as TransactionStatusResult, ca as UnacknowledgedPurchaseOutcome, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, _ as VerificationMethod, cb as isRefundPendingApproval } from './types-BTbZicgj.cjs';
|
|
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, c as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, d as InvoWebhookEvent, e as ItemPurchasedData, L as ListPayeesQuery, f as ListPayeesResult, g as ListPayoutsQuery, h as ListPayoutsResult, P as PRODUCTION_BASE_URL, j as PayableBlocker, k as Payee, l as PayeeInvite, m as PayeeStatus, n as PayeeStatusChangedData, o as Payout, p as PayoutStatus, q as PayoutStatusChangedData, s as PayoutsServer, t as PlatformCommercePurchasedData, u as PlatformCommerceRefundedData, w as PlatformCommerceServer, x as PlayerPhoneChangedData, y as PurchaseCompletedData, z as PurchaseEventData, R as RegisterPayeeInput, A as RegisterPayeeResult, B as RequestPayoutInput, F as RequestPayoutResult, G as ReturnReasonCode, S as SANDBOX_BASE_URL, H as SandboxServer, J as SandboxSubscriptionsServer, K as SubscriptionAuthenticationRequiredData, M as SubscriptionCanceledData, N as SubscriptionEventCommon, O as SubscriptionExpiredData, Q as SubscriptionPastDueData, T as SubscriptionPaymentFailedData, U as SubscriptionRefundApprovedData, V as SubscriptionRefundDetail, W as SubscriptionRefundRejectedData, X as SubscriptionRefundRequestData, Y as SubscriptionRefundedData, Z as SubscriptionRenewalFunding, _ as SubscriptionRenewalSplit, $ as SubscriptionRenewedData, a0 as SubscriptionRevenueShareAttribution, a1 as SubscriptionTrialEventFields, a2 as SubscriptionsServer, a3 as TransferEventData, a4 as VerifyWebhookOptions, a5 as WebhookHandlerOptions, b as baseUrlForKey, a6 as createWebhookHandler, i as isDemoKey, r as resolveEnvironment, a7 as verifyWebhook, a8 as verifyWebhookAsync } from './server-DEh9wjF2.cjs';
|
|
4
|
+
export { S as SDK_VERSION } from './version-DfVkILOj.cjs';
|
package/dist/server.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { S as
|
|
1
|
+
export { bt as ApproveWithDeviceCodeInput, bn as BeginDeviceApprovalInput, g as CallOptions, ae as CancelResult, ad as CancelSubscriptionOptions, ar as CardSetupConfirmInput, as as CardSetupConfirmResult, ap as CardSetupInput, aq as CardSetupResult, an as CardSetupSessionInput, ao as CardSetupSessionResult, bx as CardSetupStatus, af as ChangeAmountResult, by as CheckoutWarning, be as ClaimCurrencyInput, y as ClaimDelivery, bd as ClaimResult, bc as ClaimTransferInput, bv as CompleteDeviceApprovalInput, bw as CompleteDeviceApprovalResult, br as ConfirmDeviceEnrollmentInput, bs as ConfirmDeviceEnrollmentResult, aR as ConfirmPaymentResult, aL as CreateCheckoutInput, aM as CreateCheckoutResult, a7 as CreateSubscriptionInput, bz as CurrencyBalance, aQ as CurrencyPurchaseQuote, bA as CurrencyPurchaseQuoteBreakdown, aP as CurrencyPurchaseQuoteInput, D as DestinationGame, p as DestinationsResult, bB as DeviceApprovalChannel, bC as DeviceApprovalEnrollment, bD as DeviceApprovalFlow, bo as DeviceApprovalGrant, bq as DeviceApprovalPollResult, bE as DeviceApprovalPollStatus, bu as DeviceApprovalSettleResult, bF as DeviceEnrollmentDecision, bG as DeviceEnrollmentRespond, bH as ExpiryReason, bI as FeeTakenFrom, bJ as FirstCharge, bK as FirstChargeStatus, bL as FundingSource, a9 as GetSubscriptionOptions, aa as GetSubscriptionResult, bg as GuardianApprovalStatusResult, bM as InboundPendingItem, b7 as InboundPendingQuery, b8 as InboundPendingResult, aJ as InitiateResult, aI as InitiateSendInput, aK as InitiateTransferInput, I as InvoError, z as InvoErrorInfo, F as InvoHooks, G as InvoRequestInfo, J as InvoResponseInfo, a$ as ItemHistoryQuery, b0 as ItemHistoryResult, b1 as ItemOrderQuery, b9 as LinkedIdentitiesQuery, ba as LinkedIdentitiesResult, bN as LinkedIdentityEmail, ab as ListSubscriptionsOptions, K as LoyaltyCard, N as LoyaltyCardReward, O as LoyaltyCardStep, q as LoyaltyCardsResult, Q as LoyaltyRewardState, S as LoyaltyStepProgress, T as LoyaltyStepState, bO as MinPurchaseWarning, az as MintPlayerTokenInput, aS as OrderDetailsResult, bP as PhoneChangeConfirmation, aH as PhoneChangeRequest, bQ as PhoneChangeRequestStatus, bk as PhoneShareApproveInput, bl as PhoneShareApproveResult, bi as PhoneShareContact, bj as PhoneShareInitiateResult, bm as PhoneShareStatusResult, a2 as PlatformOrderStatusResult, a3 as PlatformPurchaseHistoryQuery, a4 as PlatformPurchaseHistoryResult, a0 as PlatformPurchaseInput, a1 as PlatformPurchaseResult, bR as PlatformPurchaseStatus, a5 as PlatformRefundInput, a6 as PlatformRefundResult, b4 as PlayerActivityEntry, b2 as PlayerActivityQuery, b3 as PlayerActivityResult, bS as PlayerActivityType, b5 as PlayerBalanceQuery, b6 as PlayerBalanceResult, at as PlayerCardsResult, aA as PlayerToken, bp as PollDeviceApprovalInput, aN as PurchaseInput, aZ as PurchaseItemInput, a_ as PurchaseItemResult, aO as PurchaseResult, Z as Rail, bT as RefundInitiation, bU as RefundPendingApproval, bV as RefundProcessingFeeBasis, bW as RefundReceipt, aj as RefundResult, bX as RefundRevenueShareAttribution, ai as RefundSubscriptionInput, bY as RefundWarning, aB as RegisterPlayerInput, aC as RegisterPlayerResult, aF as RequestPhoneChangeInput, aG as RequestPhoneChangeResult, au as SandboxClockResult, bZ as SandboxClockState, av as SandboxFailureOutcome, ax as SandboxForceAuthChallengeOptions, aw as SandboxForceFailureOptions, b_ as SavedCard, ay as ServerConfig, bh as ServerDestinationsQuery, ag as SetPaymentMethodInput, ah as SetPaymentMethodResult, bb as SmsVerifyResult, aX as SteamFinalizeInput, aY as SteamFinalizeResult, am as SteamFinalizeSubscriptionResult, aV as SteamInitPurchaseInput, aW as SteamInitPurchaseResult, al as SteamInitResult, b$ as SteamPack, aT as SteamPacksQuery, aU as SteamPacksResult, ak as SteamSubscriptionInitInput, c0 as SteamUserSession, c1 as Subscription, c2 as SubscriptionBaseInput, c3 as SubscriptionConsent, c4 as SubscriptionConsentInput, c5 as SubscriptionFundingRail, c6 as SubscriptionInterval, ac as SubscriptionListResult, a8 as SubscriptionResult, c7 as SubscriptionRevenueShare, c8 as SubscriptionRevenueShareInput, c9 as SubscriptionStatus, bf as TransactionStatusResult, ca as UnacknowledgedPurchaseOutcome, aD as UpdatePlayerPhoneInput, aE as UpdatePlayerPhoneResult, _ as VerificationMethod, cb as isRefundPendingApproval } from './types-BTbZicgj.js';
|
|
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, c as IdentityPasskeyResetData, a as InvoEnvironment, I as InvoServer, d as InvoWebhookEvent, e as ItemPurchasedData, L as ListPayeesQuery, f as ListPayeesResult, g as ListPayoutsQuery, h as ListPayoutsResult, P as PRODUCTION_BASE_URL, j as PayableBlocker, k as Payee, l as PayeeInvite, m as PayeeStatus, n as PayeeStatusChangedData, o as Payout, p as PayoutStatus, q as PayoutStatusChangedData, s as PayoutsServer, t as PlatformCommercePurchasedData, u as PlatformCommerceRefundedData, w as PlatformCommerceServer, x as PlayerPhoneChangedData, y as PurchaseCompletedData, z as PurchaseEventData, R as RegisterPayeeInput, A as RegisterPayeeResult, B as RequestPayoutInput, F as RequestPayoutResult, G as ReturnReasonCode, S as SANDBOX_BASE_URL, H as SandboxServer, J as SandboxSubscriptionsServer, K as SubscriptionAuthenticationRequiredData, M as SubscriptionCanceledData, N as SubscriptionEventCommon, O as SubscriptionExpiredData, Q as SubscriptionPastDueData, T as SubscriptionPaymentFailedData, U as SubscriptionRefundApprovedData, V as SubscriptionRefundDetail, W as SubscriptionRefundRejectedData, X as SubscriptionRefundRequestData, Y as SubscriptionRefundedData, Z as SubscriptionRenewalFunding, _ as SubscriptionRenewalSplit, $ as SubscriptionRenewedData, a0 as SubscriptionRevenueShareAttribution, a1 as SubscriptionTrialEventFields, a2 as SubscriptionsServer, a3 as TransferEventData, a4 as VerifyWebhookOptions, a5 as WebhookHandlerOptions, b as baseUrlForKey, a6 as createWebhookHandler, i as isDemoKey, r as resolveEnvironment, a7 as verifyWebhook, a8 as verifyWebhookAsync } from './server-B0mvlGFY.js';
|
|
4
|
+
export { S as SDK_VERSION } from './version-DfVkILOj.js';
|
package/dist/server.js
CHANGED
|
@@ -1,6 +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
|
-
|
|
3
|
-
export {
|
|
4
|
-
export { InvoError } from './chunk-VP3OK4J4.js';
|
|
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-664RAO2T.js';
|
|
2
|
+
export { SDK_VERSION } from './chunk-BIK6UXY7.js';
|
|
3
|
+
export { InvoError } from './chunk-TSTP2CWA.js';
|
|
5
4
|
//# sourceMappingURL=server.js.map
|
|
6
5
|
//# sourceMappingURL=server.js.map
|
|
@@ -913,45 +913,6 @@ declare class Http {
|
|
|
913
913
|
private backoff;
|
|
914
914
|
}
|
|
915
915
|
|
|
916
|
-
/**
|
|
917
|
-
* Gameplay event types your game reports to INVO's loyalty engine (3.27.0). Currency steps
|
|
918
|
-
* (purchases, transfers, sends, item spending, subscriptions) are seen by INVO directly and
|
|
919
|
-
* are never reported; reporting one is refused with `RESERVED_EVENT_TYPE`.
|
|
920
|
-
*
|
|
921
|
-
* - `game.session.started` / `game.session.heartbeat`: payload `{ session_ref }`
|
|
922
|
-
* - `game.session.ended`: payload `{ session_ref, duration_seconds }`
|
|
923
|
-
* - `game.milestone.reached`: payload `{ milestone_key, value?, session_ref? }` (e.g. `level_10`)
|
|
924
|
-
* - `game.custom.recorded`: payload `{ event_name, value? }`; the name must be registered in
|
|
925
|
-
* the console first, else `422 validation_failed`
|
|
926
|
-
*/
|
|
927
|
-
type GameEventType = "game.session.started" | "game.session.heartbeat" | "game.session.ended" | "game.milestone.reached" | "game.custom.recorded" | (string & {});
|
|
928
|
-
/** One gameplay event, reported by the player's browser (`InvoClient.reportGameEvent`). */
|
|
929
|
-
interface ReportGameEventInput {
|
|
930
|
-
/** A `game.*` type; see {@link GameEventType}. */
|
|
931
|
-
eventType: GameEventType;
|
|
932
|
-
/**
|
|
933
|
-
* Idempotency key (a UUID). Resend the SAME id when you retry, so INVO counts the event
|
|
934
|
-
* once. The SDK generates one when you leave it out, and returns it.
|
|
935
|
-
*/
|
|
936
|
-
eventId?: string;
|
|
937
|
-
/** When it happened: ISO 8601 with a timezone, or a Date. Defaults to INVO's receive time. */
|
|
938
|
-
occurredAt?: string | Date;
|
|
939
|
-
/** The event's fields (see {@link GameEventType}). */
|
|
940
|
-
payload?: Record<string, unknown>;
|
|
941
|
-
}
|
|
942
|
-
/** One gameplay event reported by your SERVER (`InvoServer.reportGameEvent`), trusted for rewards. */
|
|
943
|
-
interface ReportServerGameEventInput extends ReportGameEventInput {
|
|
944
|
-
/** The player in your game, by email. */
|
|
945
|
-
playerEmail: string;
|
|
946
|
-
}
|
|
947
|
-
interface ReportGameEventResult {
|
|
948
|
-
/** True when INVO recorded the event (202). */
|
|
949
|
-
accepted: boolean;
|
|
950
|
-
/** The event id INVO received: yours, or the one the SDK generated. Reuse it on a retry. */
|
|
951
|
-
eventId: string;
|
|
952
|
-
raw: Record<string, unknown>;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
916
|
/** Per-call options (e.g. cancellation). Accepted as an optional last arg on SDK methods. */
|
|
956
917
|
interface CallOptions {
|
|
957
918
|
/** Cancel this call. Aborting throws an InvoError (code "ABORTED"); aborted calls are never retried. */
|
|
@@ -3740,4 +3701,4 @@ interface RewardsPageLink {
|
|
|
3740
3701
|
raw: Record<string, unknown>;
|
|
3741
3702
|
}
|
|
3742
3703
|
|
|
3743
|
-
export { type
|
|
3704
|
+
export { type AuthHeader as $, type ApproveResult as A, type BalanceResult as B, type CheckoutClientConfig as C, type DestinationGame as D, type EnrollmentBeginResult as E, type InvoHooks as F, type InvoRequestInfo as G, Http as H, InvoError as I, type InvoResponseInfo as J, type LoyaltyCard as K, type LinkDeviceResult as L, type MountCheckoutOptions as M, type LoyaltyCardReward as N, type LoyaltyCardStep as O, type PendingCollectItem as P, type LoyaltyRewardState as Q, type RedeemRewardResult as R, type LoyaltyStepProgress as S, type LoyaltyStepState as T, type LoyaltyVaultEntry as U, type PhoneChangeApproval as V, type WaitForPurchaseInput as W, type PhoneChangeDeviceSignal as X, type PurchaseRefusalReason as Y, type Rail as Z, type VerificationMethod as _, type PurchaseStatusResult as a, type ItemHistoryQuery as a$, type PlatformPurchaseInput as a0, type PlatformPurchaseResult as a1, type PlatformOrderStatusResult as a2, type PlatformPurchaseHistoryQuery as a3, type PlatformPurchaseHistoryResult as a4, type PlatformRefundInput as a5, type PlatformRefundResult as a6, type CreateSubscriptionInput as a7, type SubscriptionResult as a8, type GetSubscriptionOptions as a9, type PlayerToken as aA, type RegisterPlayerInput as aB, type RegisterPlayerResult as aC, type UpdatePlayerPhoneInput as aD, type UpdatePlayerPhoneResult as aE, type RequestPhoneChangeInput as aF, type RequestPhoneChangeResult as aG, type PhoneChangeRequest as aH, type InitiateSendInput as aI, type InitiateResult as aJ, type InitiateTransferInput as aK, type CreateCheckoutInput as aL, type CreateCheckoutResult as aM, type PurchaseInput as aN, type PurchaseResult as aO, type CurrencyPurchaseQuoteInput as aP, type CurrencyPurchaseQuote as aQ, type ConfirmPaymentResult as aR, type OrderDetailsResult as aS, type SteamPacksQuery as aT, type SteamPacksResult as aU, type SteamInitPurchaseInput as aV, type SteamInitPurchaseResult as aW, type SteamFinalizeInput as aX, type SteamFinalizeResult as aY, type PurchaseItemInput as aZ, type PurchaseItemResult as a_, type GetSubscriptionResult as aa, type ListSubscriptionsOptions as ab, type SubscriptionListResult as ac, type CancelSubscriptionOptions as ad, type CancelResult as ae, type ChangeAmountResult as af, type SetPaymentMethodInput as ag, type SetPaymentMethodResult as ah, type RefundSubscriptionInput as ai, type RefundResult as aj, type SteamSubscriptionInitInput as ak, type SteamInitResult as al, type SteamFinalizeSubscriptionResult as am, type CardSetupSessionInput as an, type CardSetupSessionResult as ao, type CardSetupInput as ap, type CardSetupResult as aq, type CardSetupConfirmInput as ar, type CardSetupConfirmResult as as, type PlayerCardsResult as at, type SandboxClockResult as au, type SandboxFailureOutcome as av, type SandboxForceFailureOptions as aw, type SandboxForceAuthChallengeOptions as ax, type ServerConfig as ay, type MintPlayerTokenInput as az, type PurchaseCredited as b, type SteamPack as b$, type ItemHistoryResult as b0, type ItemOrderQuery as b1, type PlayerActivityQuery as b2, type PlayerActivityResult as b3, type PlayerActivityEntry as b4, type PlayerBalanceQuery as b5, type PlayerBalanceResult as b6, type InboundPendingQuery as b7, type InboundPendingResult as b8, type LinkedIdentitiesQuery as b9, type CurrencyPurchaseQuoteBreakdown as bA, type DeviceApprovalChannel as bB, type DeviceApprovalEnrollment as bC, type DeviceApprovalFlow as bD, type DeviceApprovalPollStatus as bE, type DeviceEnrollmentDecision as bF, type DeviceEnrollmentRespond as bG, type ExpiryReason as bH, type FeeTakenFrom as bI, type FirstCharge as bJ, type FirstChargeStatus as bK, type FundingSource as bL, type InboundPendingItem as bM, type LinkedIdentityEmail as bN, type MinPurchaseWarning as bO, type PhoneChangeConfirmation as bP, type PhoneChangeRequestStatus as bQ, type PlatformPurchaseStatus as bR, type PlayerActivityType as bS, type RefundInitiation as bT, type RefundPendingApproval as bU, type RefundProcessingFeeBasis as bV, type RefundReceipt as bW, type RefundRevenueShareAttribution as bX, type RefundWarning as bY, type SandboxClockState as bZ, type SavedCard as b_, type LinkedIdentitiesResult as ba, type SmsVerifyResult as bb, type ClaimTransferInput as bc, type ClaimResult as bd, type ClaimCurrencyInput as be, type TransactionStatusResult as bf, type GuardianApprovalStatusResult as bg, type ServerDestinationsQuery as bh, type PhoneShareContact as bi, type PhoneShareInitiateResult as bj, type PhoneShareApproveInput as bk, type PhoneShareApproveResult as bl, type PhoneShareStatusResult as bm, type BeginDeviceApprovalInput as bn, type DeviceApprovalGrant as bo, type PollDeviceApprovalInput as bp, type DeviceApprovalPollResult as bq, type ConfirmDeviceEnrollmentInput as br, type ConfirmDeviceEnrollmentResult as bs, type ApproveWithDeviceCodeInput as bt, type DeviceApprovalSettleResult as bu, type CompleteDeviceApprovalInput as bv, type CompleteDeviceApprovalResult as bw, type CardSetupStatus as bx, type CheckoutWarning as by, type CurrencyBalance as bz, type PurchaseExpired as c, type SteamUserSession as c0, type Subscription as c1, type SubscriptionBaseInput as c2, type SubscriptionConsent as c3, type SubscriptionConsentInput as c4, type SubscriptionFundingRail as c5, type SubscriptionInterval as c6, type SubscriptionRevenueShare as c7, type SubscriptionRevenueShareInput as c8, type SubscriptionStatus as c9, type UnacknowledgedPurchaseOutcome as ca, isRefundPendingApproval as cb, type PurchaseRefunded as d, type PurchaseRefused as e, type PurchaseStatusInput as f, type CallOptions as g, type CheckoutMountHandle as h, type ClientConfig as i, type ConfirmReceiptResult as j, type PhoneChangeApprovalsResult as k, type ApprovePhoneChangeInput as l, type ApprovePhoneChangeResult as m, type PendingCollectResult as n, type DestinationsQuery as o, type DestinationsResult as p, type LoyaltyCardsResult as q, type LoyaltyVaultResult as r, type RewardsPageLink as s, type EnrollmentVerifyResult as t, type RecoveryBeginResult as u, type RecoveryCompleteResult as v, type BalanceRow as w, type CheckoutPurchaseStatus as x, type ClaimDelivery as y, type InvoErrorInfo as z };
|
|
@@ -913,45 +913,6 @@ declare class Http {
|
|
|
913
913
|
private backoff;
|
|
914
914
|
}
|
|
915
915
|
|
|
916
|
-
/**
|
|
917
|
-
* Gameplay event types your game reports to INVO's loyalty engine (3.27.0). Currency steps
|
|
918
|
-
* (purchases, transfers, sends, item spending, subscriptions) are seen by INVO directly and
|
|
919
|
-
* are never reported; reporting one is refused with `RESERVED_EVENT_TYPE`.
|
|
920
|
-
*
|
|
921
|
-
* - `game.session.started` / `game.session.heartbeat`: payload `{ session_ref }`
|
|
922
|
-
* - `game.session.ended`: payload `{ session_ref, duration_seconds }`
|
|
923
|
-
* - `game.milestone.reached`: payload `{ milestone_key, value?, session_ref? }` (e.g. `level_10`)
|
|
924
|
-
* - `game.custom.recorded`: payload `{ event_name, value? }`; the name must be registered in
|
|
925
|
-
* the console first, else `422 validation_failed`
|
|
926
|
-
*/
|
|
927
|
-
type GameEventType = "game.session.started" | "game.session.heartbeat" | "game.session.ended" | "game.milestone.reached" | "game.custom.recorded" | (string & {});
|
|
928
|
-
/** One gameplay event, reported by the player's browser (`InvoClient.reportGameEvent`). */
|
|
929
|
-
interface ReportGameEventInput {
|
|
930
|
-
/** A `game.*` type; see {@link GameEventType}. */
|
|
931
|
-
eventType: GameEventType;
|
|
932
|
-
/**
|
|
933
|
-
* Idempotency key (a UUID). Resend the SAME id when you retry, so INVO counts the event
|
|
934
|
-
* once. The SDK generates one when you leave it out, and returns it.
|
|
935
|
-
*/
|
|
936
|
-
eventId?: string;
|
|
937
|
-
/** When it happened: ISO 8601 with a timezone, or a Date. Defaults to INVO's receive time. */
|
|
938
|
-
occurredAt?: string | Date;
|
|
939
|
-
/** The event's fields (see {@link GameEventType}). */
|
|
940
|
-
payload?: Record<string, unknown>;
|
|
941
|
-
}
|
|
942
|
-
/** One gameplay event reported by your SERVER (`InvoServer.reportGameEvent`), trusted for rewards. */
|
|
943
|
-
interface ReportServerGameEventInput extends ReportGameEventInput {
|
|
944
|
-
/** The player in your game, by email. */
|
|
945
|
-
playerEmail: string;
|
|
946
|
-
}
|
|
947
|
-
interface ReportGameEventResult {
|
|
948
|
-
/** True when INVO recorded the event (202). */
|
|
949
|
-
accepted: boolean;
|
|
950
|
-
/** The event id INVO received: yours, or the one the SDK generated. Reuse it on a retry. */
|
|
951
|
-
eventId: string;
|
|
952
|
-
raw: Record<string, unknown>;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
916
|
/** Per-call options (e.g. cancellation). Accepted as an optional last arg on SDK methods. */
|
|
956
917
|
interface CallOptions {
|
|
957
918
|
/** Cancel this call. Aborting throws an InvoError (code "ABORTED"); aborted calls are never retried. */
|
|
@@ -3740,4 +3701,4 @@ interface RewardsPageLink {
|
|
|
3740
3701
|
raw: Record<string, unknown>;
|
|
3741
3702
|
}
|
|
3742
3703
|
|
|
3743
|
-
export { type
|
|
3704
|
+
export { type AuthHeader as $, type ApproveResult as A, type BalanceResult as B, type CheckoutClientConfig as C, type DestinationGame as D, type EnrollmentBeginResult as E, type InvoHooks as F, type InvoRequestInfo as G, Http as H, InvoError as I, type InvoResponseInfo as J, type LoyaltyCard as K, type LinkDeviceResult as L, type MountCheckoutOptions as M, type LoyaltyCardReward as N, type LoyaltyCardStep as O, type PendingCollectItem as P, type LoyaltyRewardState as Q, type RedeemRewardResult as R, type LoyaltyStepProgress as S, type LoyaltyStepState as T, type LoyaltyVaultEntry as U, type PhoneChangeApproval as V, type WaitForPurchaseInput as W, type PhoneChangeDeviceSignal as X, type PurchaseRefusalReason as Y, type Rail as Z, type VerificationMethod as _, type PurchaseStatusResult as a, type ItemHistoryQuery as a$, type PlatformPurchaseInput as a0, type PlatformPurchaseResult as a1, type PlatformOrderStatusResult as a2, type PlatformPurchaseHistoryQuery as a3, type PlatformPurchaseHistoryResult as a4, type PlatformRefundInput as a5, type PlatformRefundResult as a6, type CreateSubscriptionInput as a7, type SubscriptionResult as a8, type GetSubscriptionOptions as a9, type PlayerToken as aA, type RegisterPlayerInput as aB, type RegisterPlayerResult as aC, type UpdatePlayerPhoneInput as aD, type UpdatePlayerPhoneResult as aE, type RequestPhoneChangeInput as aF, type RequestPhoneChangeResult as aG, type PhoneChangeRequest as aH, type InitiateSendInput as aI, type InitiateResult as aJ, type InitiateTransferInput as aK, type CreateCheckoutInput as aL, type CreateCheckoutResult as aM, type PurchaseInput as aN, type PurchaseResult as aO, type CurrencyPurchaseQuoteInput as aP, type CurrencyPurchaseQuote as aQ, type ConfirmPaymentResult as aR, type OrderDetailsResult as aS, type SteamPacksQuery as aT, type SteamPacksResult as aU, type SteamInitPurchaseInput as aV, type SteamInitPurchaseResult as aW, type SteamFinalizeInput as aX, type SteamFinalizeResult as aY, type PurchaseItemInput as aZ, type PurchaseItemResult as a_, type GetSubscriptionResult as aa, type ListSubscriptionsOptions as ab, type SubscriptionListResult as ac, type CancelSubscriptionOptions as ad, type CancelResult as ae, type ChangeAmountResult as af, type SetPaymentMethodInput as ag, type SetPaymentMethodResult as ah, type RefundSubscriptionInput as ai, type RefundResult as aj, type SteamSubscriptionInitInput as ak, type SteamInitResult as al, type SteamFinalizeSubscriptionResult as am, type CardSetupSessionInput as an, type CardSetupSessionResult as ao, type CardSetupInput as ap, type CardSetupResult as aq, type CardSetupConfirmInput as ar, type CardSetupConfirmResult as as, type PlayerCardsResult as at, type SandboxClockResult as au, type SandboxFailureOutcome as av, type SandboxForceFailureOptions as aw, type SandboxForceAuthChallengeOptions as ax, type ServerConfig as ay, type MintPlayerTokenInput as az, type PurchaseCredited as b, type SteamPack as b$, type ItemHistoryResult as b0, type ItemOrderQuery as b1, type PlayerActivityQuery as b2, type PlayerActivityResult as b3, type PlayerActivityEntry as b4, type PlayerBalanceQuery as b5, type PlayerBalanceResult as b6, type InboundPendingQuery as b7, type InboundPendingResult as b8, type LinkedIdentitiesQuery as b9, type CurrencyPurchaseQuoteBreakdown as bA, type DeviceApprovalChannel as bB, type DeviceApprovalEnrollment as bC, type DeviceApprovalFlow as bD, type DeviceApprovalPollStatus as bE, type DeviceEnrollmentDecision as bF, type DeviceEnrollmentRespond as bG, type ExpiryReason as bH, type FeeTakenFrom as bI, type FirstCharge as bJ, type FirstChargeStatus as bK, type FundingSource as bL, type InboundPendingItem as bM, type LinkedIdentityEmail as bN, type MinPurchaseWarning as bO, type PhoneChangeConfirmation as bP, type PhoneChangeRequestStatus as bQ, type PlatformPurchaseStatus as bR, type PlayerActivityType as bS, type RefundInitiation as bT, type RefundPendingApproval as bU, type RefundProcessingFeeBasis as bV, type RefundReceipt as bW, type RefundRevenueShareAttribution as bX, type RefundWarning as bY, type SandboxClockState as bZ, type SavedCard as b_, type LinkedIdentitiesResult as ba, type SmsVerifyResult as bb, type ClaimTransferInput as bc, type ClaimResult as bd, type ClaimCurrencyInput as be, type TransactionStatusResult as bf, type GuardianApprovalStatusResult as bg, type ServerDestinationsQuery as bh, type PhoneShareContact as bi, type PhoneShareInitiateResult as bj, type PhoneShareApproveInput as bk, type PhoneShareApproveResult as bl, type PhoneShareStatusResult as bm, type BeginDeviceApprovalInput as bn, type DeviceApprovalGrant as bo, type PollDeviceApprovalInput as bp, type DeviceApprovalPollResult as bq, type ConfirmDeviceEnrollmentInput as br, type ConfirmDeviceEnrollmentResult as bs, type ApproveWithDeviceCodeInput as bt, type DeviceApprovalSettleResult as bu, type CompleteDeviceApprovalInput as bv, type CompleteDeviceApprovalResult as bw, type CardSetupStatus as bx, type CheckoutWarning as by, type CurrencyBalance as bz, type PurchaseExpired as c, type SteamUserSession as c0, type Subscription as c1, type SubscriptionBaseInput as c2, type SubscriptionConsent as c3, type SubscriptionConsentInput as c4, type SubscriptionFundingRail as c5, type SubscriptionInterval as c6, type SubscriptionRevenueShare as c7, type SubscriptionRevenueShareInput as c8, type SubscriptionStatus as c9, type UnacknowledgedPurchaseOutcome as ca, isRefundPendingApproval as cb, type PurchaseRefunded as d, type PurchaseRefused as e, type PurchaseStatusInput as f, type CallOptions as g, type CheckoutMountHandle as h, type ClientConfig as i, type ConfirmReceiptResult as j, type PhoneChangeApprovalsResult as k, type ApprovePhoneChangeInput as l, type ApprovePhoneChangeResult as m, type PendingCollectResult as n, type DestinationsQuery as o, type DestinationsResult as p, type LoyaltyCardsResult as q, type LoyaltyVaultResult as r, type RewardsPageLink as s, type EnrollmentVerifyResult as t, type RecoveryBeginResult as u, type RecoveryCompleteResult as v, type BalanceRow as w, type CheckoutPurchaseStatus as x, type ClaimDelivery as y, type InvoErrorInfo as z };
|
|
@@ -102,6 +102,18 @@ interface GameCatalog {
|
|
|
102
102
|
items: GameCatalogItem[];
|
|
103
103
|
/** True when the server talks to INVO's sandbox (no real money moves). */
|
|
104
104
|
sandbox: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* True when the server uses INVO's public demo key (3.29.1). Sign-ins are mapped to demo
|
|
107
|
+
* players, so there is no real account and no phone to collect.
|
|
108
|
+
*/
|
|
109
|
+
demo?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* What the sign-in form should ask for (3.29.1). `phone`: `"hidden"` on the demo key (the
|
|
112
|
+
* server never uses it), `"first_sign_in"` otherwise (INVO needs it once to create the player).
|
|
113
|
+
*/
|
|
114
|
+
playerFields?: {
|
|
115
|
+
phone: "hidden" | "first_sign_in";
|
|
116
|
+
};
|
|
105
117
|
}
|
|
106
118
|
/** Status of a premium-currency purchase, as the game server knows it. */
|
|
107
119
|
type GamePurchaseStatus = "pending" | "credited" | "failed" | "refunded";
|
|
@@ -139,5 +151,68 @@ interface GameErrorBody {
|
|
|
139
151
|
requestId?: string;
|
|
140
152
|
};
|
|
141
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* How currency moves to another player. Both are approved with the sender's passkey on INVO's
|
|
156
|
+
* hosted page. A **transfer** can also give the sender a claim code to pass on; a **send** can
|
|
157
|
+
* be collected from a link INVO texts to a phone-only recipient.
|
|
158
|
+
*/
|
|
159
|
+
type GameTransferKind = "transfer" | "send";
|
|
160
|
+
/** `GET /transfers/status` answer: whether players can move currency here, and how. */
|
|
161
|
+
interface GameTransferStatus {
|
|
162
|
+
enabled: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Why transfers are off: `"sandbox"` (your own sandbox key: set `INVO_TRANSFERS=on` to try
|
|
165
|
+
* them), `"off"` (switched off for this game), `"checking"` (the key's environment is still
|
|
166
|
+
* being looked up). `null` when enabled.
|
|
167
|
+
*/
|
|
168
|
+
reason: "sandbox" | "off" | "checking" | null;
|
|
169
|
+
/** True on the public demo key. */
|
|
170
|
+
demo: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Who can receive: `"project"` on the demo key (players of this copy only), `"network"`
|
|
173
|
+
* otherwise (any player of any INVO game the destination list offers).
|
|
174
|
+
*/
|
|
175
|
+
scope: "project" | "network";
|
|
176
|
+
/** Which recipient details to ask for. On the demo key only an email; otherwise a phone. */
|
|
177
|
+
recipientFields: {
|
|
178
|
+
email: "required" | "optional";
|
|
179
|
+
phone: "required" | "hidden";
|
|
180
|
+
};
|
|
181
|
+
/** INVO's API base for the player-token calls (destinations, approval, collecting). */
|
|
182
|
+
apiBaseUrl: string | null;
|
|
183
|
+
/**
|
|
184
|
+
* How the sender approves: `"passkey"` on INVO's hosted page, or `"sandbox"` on the public
|
|
185
|
+
* demo key, where the game server approves in INVO's demo sandbox without a passkey and the
|
|
186
|
+
* recipient collects through the game server.
|
|
187
|
+
*/
|
|
188
|
+
approval: "passkey" | "sandbox";
|
|
189
|
+
}
|
|
190
|
+
/** `POST /transfers` body. */
|
|
191
|
+
interface GameTransferInput {
|
|
192
|
+
kind?: GameTransferKind;
|
|
193
|
+
/** A destination's `gameId` from `getDestinations`. */
|
|
194
|
+
targetGameId: string | number;
|
|
195
|
+
/** A positive decimal string or number. */
|
|
196
|
+
amount: string | number;
|
|
197
|
+
/** Required on the demo key (the server maps it to the demo player); optional otherwise. */
|
|
198
|
+
recipientEmail?: string;
|
|
199
|
+
/** Required on a real key (E.164); not used on the demo key. */
|
|
200
|
+
recipientPhone?: string;
|
|
201
|
+
/** The sender's phone, when the game never stored one (real keys only). */
|
|
202
|
+
senderPhone?: string;
|
|
203
|
+
/** Idempotency key (8 to 64 of `A-Z a-z 0-9 _ -`). Default: a fresh UUID. */
|
|
204
|
+
clientRequestId?: string;
|
|
205
|
+
}
|
|
206
|
+
/** `POST /transfers` answer: approve it next, from a click, on INVO's hosted page. */
|
|
207
|
+
interface GameTransferStart {
|
|
208
|
+
transactionId: string;
|
|
209
|
+
kind: GameTransferKind;
|
|
210
|
+
/** A minor's transfer waits for a guardian (emailed) instead of the passkey page. */
|
|
211
|
+
guardianPending: boolean;
|
|
212
|
+
/** A fresh player token when the sender's INVO identity changed; the client swaps it in. */
|
|
213
|
+
playerToken: string | null;
|
|
214
|
+
/** How to approve it: see {@link GameTransferStatus.approval}. */
|
|
215
|
+
approval: "passkey" | "sandbox";
|
|
216
|
+
}
|
|
142
217
|
|
|
143
|
-
export type { GameCurrencyKind as G, GamePurchaseStatus as a, GameEconomyConfig as b, GameCatalog as c, GameCatalogItem as d, GameCheckout as e, GameCurrencyBalance as f, GameErrorBody as g, GameItemPurchase as h, GamePlayer as i, GamePremiumPack as j, GamePurchase as k, GameSession as l,
|
|
218
|
+
export type { GameCurrencyKind as G, GamePurchaseStatus as a, GameEconomyConfig as b, GameCatalog as c, GameCatalogItem as d, GameCheckout as e, GameCurrencyBalance as f, GameErrorBody as g, GameItemPurchase as h, GamePlayer as i, GamePremiumPack as j, GamePurchase as k, GameSession as l, GameTransferInput as m, GameTransferKind as n, GameTransferStart as o, GameTransferStatus as p, GameWallet as q };
|