@series-inc/rundot-game-sdk 5.14.0 → 5.14.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/dist/{AdsApi-BZetyYnp.d.ts → AdsApi-De-UK8MW.d.ts} +19 -0
- package/dist/{chunk-EWOHKS4T.js → chunk-LSKD3VSU.js} +18 -12
- package/dist/chunk-LSKD3VSU.js.map +1 -0
- package/dist/{chunk-52HUWDEZ.js → chunk-XVUFECZG.js} +34 -10
- package/dist/chunk-XVUFECZG.js.map +1 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +2 -2
- package/dist/rundot-game-api/index.d.ts +2 -2
- package/dist/rundot-game-api/index.js +2 -2
- package/dist/sandbox/index.js +1 -1
- package/dist/vite/index.js +2 -10
- package/dist/vite/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-52HUWDEZ.js.map +0 -1
- package/dist/chunk-EWOHKS4T.js.map +0 -1
|
@@ -63,6 +63,24 @@ declare class RpcClient {
|
|
|
63
63
|
onNotification<TPayload>(id: string, callback: (payload: TPayload) => void): Subscription;
|
|
64
64
|
callT<TArgs, TResult>(method: string, args?: TArgs, timeout?: number): Promise<TResult>;
|
|
65
65
|
call<TResponse>(method: string, args?: unknown, timeout?: number): Promise<TResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* Send a fire-and-forget RPC request.
|
|
68
|
+
*
|
|
69
|
+
* Unlike `call()`, `notify()`:
|
|
70
|
+
* - does NOT register a pending call,
|
|
71
|
+
* - does NOT arm a timeout,
|
|
72
|
+
* - does NOT await or surface the host's response.
|
|
73
|
+
*
|
|
74
|
+
* Use this for telemetry / cleanup RPCs where the caller does not care about
|
|
75
|
+
* the result and does not want spurious timeout errors when the iframe is
|
|
76
|
+
* throttled (e.g. backgrounded tab) or the host's response is otherwise
|
|
77
|
+
* late. Host-side errors are NOT surfaced to the caller.
|
|
78
|
+
*
|
|
79
|
+
* The wire format is identical to `call()` (an `rpc-request` with a
|
|
80
|
+
* generated id), so any late response from the host is harmlessly dropped
|
|
81
|
+
* by `handleRpcResponse` — there is no entry in `pendingCalls` to match.
|
|
82
|
+
*/
|
|
83
|
+
notify(method: string, args?: unknown): void;
|
|
66
84
|
private hasPendingCall;
|
|
67
85
|
private safeStringifyArgs;
|
|
68
86
|
private addPendingCall;
|
|
@@ -2671,6 +2689,7 @@ interface ShowRewardedAdOptions {
|
|
|
2671
2689
|
interface AdsApi {
|
|
2672
2690
|
isRewardedAdReadyAsync(): Promise<boolean>;
|
|
2673
2691
|
showRewardedAdAsync(options?: ShowRewardedAdOptions): Promise<boolean>;
|
|
2692
|
+
isInterstitialAdReadyAsync(): Promise<boolean>;
|
|
2674
2693
|
showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
|
|
2675
2694
|
}
|
|
2676
2695
|
|
|
@@ -4,7 +4,9 @@ import { createMockDelay, MOCK_DELAYS, isWebPlatform } from './chunk-3GKY3LY5.js
|
|
|
4
4
|
var RundotGameMessageId = /* @__PURE__ */ ((RundotGameMessageId2) => {
|
|
5
5
|
RundotGameMessageId2["H5_RESPONSE"] = "H5_RESPONSE";
|
|
6
6
|
RundotGameMessageId2["IS_REWARDED_AD_READY"] = "H5_IS_REWARDED_AD_READY";
|
|
7
|
+
RundotGameMessageId2["IS_INTERSTITIAL_AD_READY"] = "H5_IS_INTERSTITIAL_AD_READY";
|
|
7
8
|
RundotGameMessageId2["SHOW_REWARDED_AD"] = "H5_SHOW_REWARDED_AD";
|
|
9
|
+
RundotGameMessageId2["SHOW_INTERSTITIAL_AD"] = "H5_SHOW_INTERSTITIAL_AD";
|
|
8
10
|
RundotGameMessageId2["LOG_ANALYTICS_EVENT"] = "H5_LOG_ANALYTICS_EVENT";
|
|
9
11
|
RundotGameMessageId2["TRACK_FUNNEL_STEP"] = "H5_TRACK_FUNNEL_STEP";
|
|
10
12
|
RundotGameMessageId2["HEARTBEAT"] = "H5_HEARTBEAT";
|
|
@@ -72,7 +74,6 @@ var RundotGameMessageId = /* @__PURE__ */ ((RundotGameMessageId2) => {
|
|
|
72
74
|
RundotGameMessageId2["DEBUG"] = "H5_DEBUG";
|
|
73
75
|
RundotGameMessageId2["H5_IAP_GET_WALLET"] = "H5_IAP_GET_WALLET";
|
|
74
76
|
RundotGameMessageId2["H5_IAP_SPEND_CURRENCY"] = "H5_IAP_SPEND_CURRENCY";
|
|
75
|
-
RundotGameMessageId2["SHOW_INTERSTITIAL_AD"] = "H5_SHOW_INTERSTITIAL_AD";
|
|
76
77
|
RundotGameMessageId2["H5_IAP_GET_SUBSCRIPTIONS"] = "H5_IAP_GET_SUBSCRIPTIONS";
|
|
77
78
|
RundotGameMessageId2["H5_IAP_PURCHASE_SUBSCRIPTION"] = "H5_IAP_PURCHASE_SUBSCRIPTION";
|
|
78
79
|
RundotGameMessageId2["H5_IAP_GET_PLAYER_SUBSCRIPTION_INFO"] = "H5_IAP_GET_PLAYER_SUBSCRIPTION_INFO";
|
|
@@ -210,6 +211,12 @@ var RpcAdsApi = class {
|
|
|
210
211
|
);
|
|
211
212
|
return response.shown;
|
|
212
213
|
}
|
|
214
|
+
async isInterstitialAdReadyAsync() {
|
|
215
|
+
const response = await this.rpcClient.call(
|
|
216
|
+
"H5_IS_INTERSTITIAL_AD_READY" /* IS_INTERSTITIAL_AD_READY */
|
|
217
|
+
);
|
|
218
|
+
return response.ready;
|
|
219
|
+
}
|
|
213
220
|
async isRewardedAdReadyAsync() {
|
|
214
221
|
const response = await this.rpcClient.call(
|
|
215
222
|
"H5_IS_REWARDED_AD_READY" /* IS_REWARDED_AD_READY */
|
|
@@ -244,6 +251,11 @@ var MockAdsApi = class {
|
|
|
244
251
|
await createMockDelay(MOCK_DELAYS.short);
|
|
245
252
|
return true;
|
|
246
253
|
}
|
|
254
|
+
async isInterstitialAdReadyAsync() {
|
|
255
|
+
mockLog(TAG, "isInterstitialAdReadyAsync \u2192 true");
|
|
256
|
+
await createMockDelay(MOCK_DELAYS.short);
|
|
257
|
+
return true;
|
|
258
|
+
}
|
|
247
259
|
async showRewardedAdAsync(options) {
|
|
248
260
|
mockLog(TAG, "showRewardedAdAsync");
|
|
249
261
|
await this.mockOverlay.showAdOverlay(options);
|
|
@@ -282,21 +294,17 @@ var RpcAnalyticsApi = class {
|
|
|
282
294
|
this.rpcClient = rpcClient;
|
|
283
295
|
}
|
|
284
296
|
async recordCustomEvent(eventName, payload) {
|
|
285
|
-
this.rpcClient.
|
|
297
|
+
this.rpcClient.notify("H5_LOG_ANALYTICS_EVENT" /* LOG_ANALYTICS_EVENT */, {
|
|
286
298
|
eventName,
|
|
287
299
|
params: payload
|
|
288
|
-
}).catch((err) => {
|
|
289
|
-
console.warn(`[Run.game SDK] [RpcAnalyticsApi] recordCustomEvent failed (non-fatal):`, err);
|
|
290
300
|
});
|
|
291
301
|
}
|
|
292
302
|
async trackFunnelStep(stepNumber, stepName, funnelName, funnelOrder) {
|
|
293
|
-
this.rpcClient.
|
|
303
|
+
this.rpcClient.notify("H5_TRACK_FUNNEL_STEP" /* TRACK_FUNNEL_STEP */, {
|
|
294
304
|
stepNumber,
|
|
295
305
|
stepName,
|
|
296
306
|
funnelName,
|
|
297
307
|
funnelOrder
|
|
298
|
-
}).catch((err) => {
|
|
299
|
-
console.warn(`[Run.game SDK] [RpcAnalyticsApi] trackFunnelStep failed (non-fatal):`, err);
|
|
300
308
|
});
|
|
301
309
|
}
|
|
302
310
|
};
|
|
@@ -2554,10 +2562,8 @@ var RpcRoomsApi = class {
|
|
|
2554
2562
|
}
|
|
2555
2563
|
const hasAnySubscriptions = (this.subscriptions.data[roomId]?.length ?? 0) > 0 || (this.subscriptions.messages[roomId]?.length ?? 0) > 0 || (this.subscriptions.gameEvents[roomId]?.length ?? 0) > 0;
|
|
2556
2564
|
if (!hasAnySubscriptions) {
|
|
2557
|
-
this.rpcClient.
|
|
2565
|
+
this.rpcClient.notify("H5_ROOM_UNSUBSCRIBE" /* H5_ROOM_UNSUBSCRIBE */, {
|
|
2558
2566
|
roomId
|
|
2559
|
-
}).catch((error) => {
|
|
2560
|
-
console.error("[RUN.game SDK] Failed to clean up room subscription:", error);
|
|
2561
2567
|
});
|
|
2562
2568
|
}
|
|
2563
2569
|
};
|
|
@@ -5631,5 +5637,5 @@ var MockMultiplayerApi = class {
|
|
|
5631
5637
|
};
|
|
5632
5638
|
|
|
5633
5639
|
export { AccessDeniedError, BaseCdnApi, DEFAULT_SHARED_LIB_CDN_BASE, EMBEDDED_LIBRARIES, EMBEDDED_LIBRARY_BY_KEY, FILE_EXTENSION_PATTERN, HapticFeedbackStyle, HostCdnApi, HostDeviceApi, HostEnvironmentApi, HostProfileApi, HostSystemApi, HostTimeApi, MIN_CDN_PATH_SEGMENTS, MODULE_TO_LIBRARY_SPECIFIERS, MockAccessGateApi, MockAdminImageGenApi, MockAdminUgcApi, MockAdsApi, MockAnalyticsApi, MockAvatarApi, MockCdnApi, MockDebug, MockDeviceApi, MockEntitlementApi, MockEnvironmentApi, MockFeaturesApi, MockHapticsApi, MockIapApi, MockLifecycleApi, MockLoggingApi, MockMultiplayerApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockPreloaderApi, MockProfileApi, MockSharedAssetsApi, MockShopApi, MockStorageApi, MockSystemApi, MockTimeApi, MockVideoApi, ROOM_GAME_PHASES, RpcAccessGateApi, RpcAdsApi, RpcAnalyticsApi, RpcAvatarApi, RpcEntitlementApi, RpcFeaturesApi, RpcHapticsApi, RpcIapApi, RpcInboundStorageApi, RpcLifecycleApi, RpcLoggingApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, RpcPreloaderApi, RpcRoomsApi, RpcSharedAssetsApi, RpcShopApi, RpcStorageApi, RpcVideoApi, RundotGameMessageId, RundotGameRoom, SandboxAppApi, SandboxProfileApi, WsMultiplayerApi, applyAccessGates, base64ToArrayBuffer, base64ToUtf8, buildFunctionsBaseUrl, createAccessGatedApi, createMockStorageApi, exchangeForCustomToken, generateId, getCloudRunUrl, getFirebaseClient, getLibraryDefinition, getSandboxConfig, hasHostedUrlStructure, initializeAccessGate, initializeAds, initializeAnalytics, initializeAvatar3d, initializeCdn, initializeEntitlements, initializeFeaturesApi, initializeHaptics, initializeIap, initializeLifecycleApi, initializeLocalNotifications, initializeLoggingApi, initializePopups, initializePreloader, initializeProfile, initializeRoomsApi, initializeShop, initializeStackNavigation, initializeStorage, initializeSystem, initializeTime, initializeVideo, isPacificDaylightTime, isSandboxEnabled, mockLog, observeFirestoreCollection, observeFirestoreDocument, parseCdnPathSegments, resolveCollectionItemPrice, setStoredAppRole, setupRoomNotifications, signInWithGoogle };
|
|
5634
|
-
//# sourceMappingURL=chunk-
|
|
5635
|
-
//# sourceMappingURL=chunk-
|
|
5640
|
+
//# sourceMappingURL=chunk-LSKD3VSU.js.map
|
|
5641
|
+
//# sourceMappingURL=chunk-LSKD3VSU.js.map
|