@series-inc/venus-sdk 3.4.2-beta.1 → 3.4.2
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-CgpJ_4bF.d.ts → AdsApi-ihIIoDSK.d.ts} +10 -2
- package/dist/{chunk-OV5YVXVG.js → chunk-W74ZI2H3.js} +27 -13
- package/dist/chunk-W74ZI2H3.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/venus-api/index.d.ts +2 -2
- package/dist/venus-api/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-OV5YVXVG.js.map +0 -1
|
@@ -562,13 +562,21 @@ interface SimulationApi {
|
|
|
562
562
|
subscribeAsync(options: SimulationSubscribeOptions): Promise<() => void>;
|
|
563
563
|
}
|
|
564
564
|
|
|
565
|
+
declare const ROOM_GAME_PHASES: readonly ["waiting", "playing", "ended"];
|
|
566
|
+
type RoomGamePhase = (typeof ROOM_GAME_PHASES)[number];
|
|
565
567
|
interface VenusRoomRulesGameState extends Record<string, unknown> {
|
|
566
|
-
phase?:
|
|
568
|
+
phase?: RoomGamePhase;
|
|
567
569
|
currentPlayer?: string | null;
|
|
568
570
|
turnOrder?: string[];
|
|
569
571
|
turnCount?: number;
|
|
570
572
|
turnBased?: boolean;
|
|
571
573
|
playerStates?: Record<string, unknown>;
|
|
574
|
+
startParams?: {
|
|
575
|
+
gameConfig: Record<string, unknown>;
|
|
576
|
+
turnOrder?: string[] | null;
|
|
577
|
+
startedBy: string;
|
|
578
|
+
startedAt: unknown;
|
|
579
|
+
};
|
|
572
580
|
}
|
|
573
581
|
interface VenusRoomRules extends Record<string, unknown> {
|
|
574
582
|
hostProfileId?: string;
|
|
@@ -1599,4 +1607,4 @@ interface AdsApi {
|
|
|
1599
1607
|
showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
|
|
1600
1608
|
}
|
|
1601
1609
|
|
|
1602
|
-
export { type AiApi as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type ScheduleNotificationOptions as C, type PopupsApi as D, type ShowToastOptions as E, type ShowInterstitialAdOptions as F, type ShowRewardedAdOptions as G, type Host as H, type ProfileApi as I, type DeviceApi as J, type DeviceInfo as K, type EnvironmentApi as L, type EnvironmentInfo as M, type NavigationApi as N, type SystemApi as O, type Profile as P, type QuitOptions as Q, type RecipeRequirementResult as R, type SimulationRunSummary as S, type SafeArea as T, type CdnApi as U, type VenusAPI as V, type SubPath as W, type FetchBlobOptions as X, type TimeApi as Y, type ServerTimeData as Z, type GetFutureTimeOptions as _, type VenusSimulationStateResponse as a, type PlayerRankResult as a$, type AiChatCompletionRequest as a0, type AiChatCompletionData as a1, type HapticsApi as a2, HapticFeedbackStyle as a3, type FeaturesApi as a4, type Experiment as a5, type LifecycleApi as a6, type SleepCallback as a7, type Subscription as a8, type AwakeCallback as a9, type ProposedMoveEvent as aA, VenusTransport as aB, type RoomsApi as aC, type CreateRoomOptions as aD, type JoinOrCreateRoomOptions as aE, type JoinOrCreateResult as aF, type ListRoomsOptions as aG, type UpdateRoomDataOptions as aH, type RoomMessageRequest as aI, type StartRoomGameOptions as aJ, type ProposeMoveRequest as aK, type ProposeMoveResult as aL, type ValidateMoveVerdict as aM, type ValidateMoveResult as aN, type RoomSubscriptionOptions as aO, type LoggingApi as aP, type IapApi as aQ, type SpendCurrencyOptions as aR, type LoadEmbeddedAssetsResponse as aS, type SharedAssetsApi as aT, type LeaderboardApi as aU, type ScoreToken as aV, type SubmitScoreParams as aW, type SubmitScoreResult as aX, type GetPagedScoresOptions as aY, type PagedScoresResponse as aZ, type PlayerRankOptions as a_, type PauseCallback as aa, type ResumeCallback as ab, type QuitCallback as ac, type SimulationApi as ad, type SimulationSlotValidationResult as ae, type SimulationBatchOperation as af, type SimulationBatchOperationsResult as ag, type SimulationAvailableItem as ah, type SimulationPowerPreview as ai, type SimulationSlotMutationResult as aj, type SimulationSlotContainer as ak, type SimulationAssignment as al, type SimulationState as am, type ExecuteRecipeOptions as an, type ExecuteRecipeResponse as ao, type CollectRecipeResult as ap, type GetActiveRunsOptions as aq, type ExecuteScopedRecipeOptions as ar, type ExecuteScopedRecipeResult as as, type GetAvailableRecipesOptions as at, type GetAvailableRecipesResult as au, type Recipe as av, type GetBatchRecipeRequirements as aw, type TriggerRecipeChainOptions as ax, type RoomDataUpdate as ay, type RoomMessageEvent as az, type SimulationUpdateType as b, type GetPodiumScoresOptions as b0, type PodiumScoresResponse as b1, type PreloaderApi as b2, type SocialApi as b3, type ShareMetadata as b4, type ShareLinkResult as b5, type SocialQRCodeOptions as b6, type QRCodeResult as b7, type Avatar3dApi as b8, type AssetManifest as b9, type
|
|
1610
|
+
export { type AiApi as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type ScheduleNotificationOptions as C, type PopupsApi as D, type ShowToastOptions as E, type ShowInterstitialAdOptions as F, type ShowRewardedAdOptions as G, type Host as H, type ProfileApi as I, type DeviceApi as J, type DeviceInfo as K, type EnvironmentApi as L, type EnvironmentInfo as M, type NavigationApi as N, type SystemApi as O, type Profile as P, type QuitOptions as Q, type RecipeRequirementResult as R, type SimulationRunSummary as S, type SafeArea as T, type CdnApi as U, type VenusAPI as V, type SubPath as W, type FetchBlobOptions as X, type TimeApi as Y, type ServerTimeData as Z, type GetFutureTimeOptions as _, type VenusSimulationStateResponse as a, type PlayerRankResult as a$, type AiChatCompletionRequest as a0, type AiChatCompletionData as a1, type HapticsApi as a2, HapticFeedbackStyle as a3, type FeaturesApi as a4, type Experiment as a5, type LifecycleApi as a6, type SleepCallback as a7, type Subscription as a8, type AwakeCallback as a9, type ProposedMoveEvent as aA, VenusTransport as aB, type RoomsApi as aC, type CreateRoomOptions as aD, type JoinOrCreateRoomOptions as aE, type JoinOrCreateResult as aF, type ListRoomsOptions as aG, type UpdateRoomDataOptions as aH, type RoomMessageRequest as aI, type StartRoomGameOptions as aJ, type ProposeMoveRequest as aK, type ProposeMoveResult as aL, type ValidateMoveVerdict as aM, type ValidateMoveResult as aN, type RoomSubscriptionOptions as aO, type LoggingApi as aP, type IapApi as aQ, type SpendCurrencyOptions as aR, type LoadEmbeddedAssetsResponse as aS, type SharedAssetsApi as aT, type LeaderboardApi as aU, type ScoreToken as aV, type SubmitScoreParams as aW, type SubmitScoreResult as aX, type GetPagedScoresOptions as aY, type PagedScoresResponse as aZ, type PlayerRankOptions as a_, type PauseCallback as aa, type ResumeCallback as ab, type QuitCallback as ac, type SimulationApi as ad, type SimulationSlotValidationResult as ae, type SimulationBatchOperation as af, type SimulationBatchOperationsResult as ag, type SimulationAvailableItem as ah, type SimulationPowerPreview as ai, type SimulationSlotMutationResult as aj, type SimulationSlotContainer as ak, type SimulationAssignment as al, type SimulationState as am, type ExecuteRecipeOptions as an, type ExecuteRecipeResponse as ao, type CollectRecipeResult as ap, type GetActiveRunsOptions as aq, type ExecuteScopedRecipeOptions as ar, type ExecuteScopedRecipeResult as as, type GetAvailableRecipesOptions as at, type GetAvailableRecipesResult as au, type Recipe as av, type GetBatchRecipeRequirements as aw, type TriggerRecipeChainOptions as ax, type RoomDataUpdate as ay, type RoomMessageEvent as az, type SimulationUpdateType as b, type GetPodiumScoresOptions as b0, type PodiumScoresResponse as b1, type PreloaderApi as b2, type SocialApi as b3, type ShareMetadata as b4, type ShareLinkResult as b5, type SocialQRCodeOptions as b6, type QRCodeResult as b7, type Avatar3dApi as b8, type AssetManifest as b9, type RecipeInfo as bA, type SimulationPersonalState as bB, type SimulationRoomActiveRecipe as bC, type SimulationRoomState as bD, type SimulationBatchOperationAssign as bE, type SimulationBatchOperationRemove as bF, type SimulationBatchOperationResult as bG, RpcSharedAssetsApi as bH, type LoadEmbeddedAssetsRequest as bI, type LeaderboardModeConfig as bJ, type LeaderboardPeriodType as bK, type LeaderboardPeriodConfig as bL, type LeaderboardAntiCheatConfig as bM, type LeaderboardDisplaySettings as bN, type LeaderboardConfig as bO, type LeaderboardEntry as bP, type PodiumScoresContext as bQ, type HudInsets as bR, createHost as bS, type Avatar3dConfig as ba, type ShowEditorOptions as bb, type Avatar3dEdits as bc, type AdsApi as bd, type InitializationContext as be, type InitializationOptions as bf, type AiMessage as bg, type Asset as bh, type Category as bi, MockAvatarApi as bj, type TimeIntervalTriggerInput as bk, type NotificationTriggerInput as bl, type OnRequestCallback as bm, type OnResponseCallback as bn, type OnNotificationCallback as bo, type RpcTransport as bp, type JoinRoomMatchCriteria as bq, type RoomMessageEventType as br, type RoomMessagePayload as bs, type ProposedMovePayload as bt, ROOM_GAME_PHASES as bu, type RoomGamePhase as bv, type VenusRoomRulesGameState as bw, type VenusRoomRules as bx, type VenusRoomCustomMetadata as by, type VenusRoomPayload as bz, type SimulationEntityUpdate as c, type SimulationActiveRunsUpdate as d, type SimulationSnapshotUpdate as e, type SimulationUpdateData as f, type SimulationSubscribeOptions as g, type VenusSimulationEffect as h, type VenusSimulationRecipe as i, type VenusSimulationConfig as j, type RecipeRequirementQuery as k, type VenusExecuteRecipeOptions as l, type VenusExecuteScopedRecipeOptions as m, type VenusAvailableRecipe as n, type VenusCollectRecipeResult as o, type VenusExecuteRecipeResult as p, VenusRoom as q, type RpcRequest as r, type RpcResponse as s, type RpcNotification as t, RpcClient as u, type StorageApi as v, type NavigationStackInfo as w, type PushAppOptions as x, type NotificationsApi as y, type ScheduleLocalNotification as z };
|
|
@@ -1599,6 +1599,9 @@ var RpcLoggingApi = class {
|
|
|
1599
1599
|
return message;
|
|
1600
1600
|
}
|
|
1601
1601
|
toStringArg(arg) {
|
|
1602
|
+
if (arg instanceof Error) {
|
|
1603
|
+
return `${arg.name}: ${arg.message}`;
|
|
1604
|
+
}
|
|
1602
1605
|
if (arg) {
|
|
1603
1606
|
if (typeof arg === "object") {
|
|
1604
1607
|
try {
|
|
@@ -2121,6 +2124,7 @@ var RpcClient = class {
|
|
|
2121
2124
|
};
|
|
2122
2125
|
|
|
2123
2126
|
// src/rooms/VenusRoom.ts
|
|
2127
|
+
var ROOM_GAME_PHASES = ["waiting", "playing", "ended"];
|
|
2124
2128
|
var VenusRoom = class {
|
|
2125
2129
|
id;
|
|
2126
2130
|
name;
|
|
@@ -2355,21 +2359,28 @@ var RpcRoomsApi = class {
|
|
|
2355
2359
|
"H5_ROOM_START_GAME" /* H5_ROOM_START_GAME */,
|
|
2356
2360
|
{
|
|
2357
2361
|
roomId: room.id,
|
|
2358
|
-
|
|
2359
|
-
|
|
2362
|
+
options: {
|
|
2363
|
+
gameConfig: options.gameConfig ?? {},
|
|
2364
|
+
turnOrder: options.turnOrder ?? null
|
|
2365
|
+
}
|
|
2360
2366
|
}
|
|
2361
2367
|
);
|
|
2362
2368
|
}
|
|
2363
2369
|
async proposeMoveAsync(room, proposalPayload) {
|
|
2370
|
+
const args = {
|
|
2371
|
+
roomId: room.id,
|
|
2372
|
+
gameSpecificState: proposalPayload.gameSpecificState,
|
|
2373
|
+
moveType: proposalPayload.moveType
|
|
2374
|
+
};
|
|
2375
|
+
if (proposalPayload.clientContext !== void 0) {
|
|
2376
|
+
args.clientContext = proposalPayload.clientContext;
|
|
2377
|
+
}
|
|
2378
|
+
if (proposalPayload.clientProposalId !== void 0) {
|
|
2379
|
+
args.clientProposalId = proposalPayload.clientProposalId;
|
|
2380
|
+
}
|
|
2364
2381
|
const data = await this.rpcClient.call(
|
|
2365
2382
|
"h5:room:proposeMove" /* H5_ROOM_PROPOSE_MOVE */,
|
|
2366
|
-
|
|
2367
|
-
roomId: room.id,
|
|
2368
|
-
gameSpecificState: proposalPayload.gameSpecificState,
|
|
2369
|
-
moveType: proposalPayload.moveType,
|
|
2370
|
-
clientContext: proposalPayload.clientContext,
|
|
2371
|
-
clientProposalId: proposalPayload.clientProposalId
|
|
2372
|
-
}
|
|
2383
|
+
args
|
|
2373
2384
|
);
|
|
2374
2385
|
return data;
|
|
2375
2386
|
}
|
|
@@ -3217,6 +3228,9 @@ function initializeSimulation(venusApi, host) {
|
|
|
3217
3228
|
itemId
|
|
3218
3229
|
);
|
|
3219
3230
|
};
|
|
3231
|
+
venusApi.simulation.subscribeAsync = (options) => {
|
|
3232
|
+
return host.simulation.subscribeAsync(options);
|
|
3233
|
+
};
|
|
3220
3234
|
}
|
|
3221
3235
|
|
|
3222
3236
|
// src/time/utils.ts
|
|
@@ -3423,7 +3437,7 @@ function initializeTime(venusApi, host) {
|
|
|
3423
3437
|
}
|
|
3424
3438
|
|
|
3425
3439
|
// src/version.ts
|
|
3426
|
-
var SDK_VERSION = "3.4.2
|
|
3440
|
+
var SDK_VERSION = "3.4.2";
|
|
3427
3441
|
|
|
3428
3442
|
// src/shared-assets/base64Utils.ts
|
|
3429
3443
|
function base64ToArrayBuffer(base64) {
|
|
@@ -5117,6 +5131,6 @@ function initializeSocial(venusApi, host) {
|
|
|
5117
5131
|
};
|
|
5118
5132
|
}
|
|
5119
5133
|
|
|
5120
|
-
export { DEFAULT_SHARED_LIB_CDN_BASE, EMBEDDED_LIBRARIES, EMBEDDED_LIBRARY_BY_KEY, HASH_ALGORITHM_NODE, HASH_ALGORITHM_WEB_CRYPTO, HapticFeedbackStyle, HostCdnApi, HostDeviceApi, HostEnvironmentApi, HostProfileApi, HostSystemApi, HostTimeApi, MODULE_TO_LIBRARY_SPECIFIERS, MockAdsApi, MockAiApi, MockAnalyticsApi, MockAvatarApi, MockCdnApi, MockDeviceApi, MockEnvironmentApi, MockFeaturesApi, MockHapticsApi, MockIapApi, MockLeaderboardApi, MockLifecycleApi, MockLoggingApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockPreloaderApi, MockProfileApi, MockSharedAssetsApi, MockSocialApi, MockStorageApi, MockSystemApi, MockTimeApi, RemoteHost, RpcAdsApi, RpcAiApi, RpcAnalyticsApi, RpcAvatarApi, RpcClient, RpcFeaturesApi, RpcHapticsApi, RpcIapApi, RpcLeaderboardApi, RpcLifecycleApi, RpcLoggingApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, RpcPreloaderApi, RpcRoomsApi, RpcSharedAssetsApi, RpcSimulationApi, RpcSocialApi, RpcStorageApi, SDK_VERSION, VenusMessageId, VenusRoom, base64ToArrayBuffer, base64ToUtf8, computeScoreHash, createHost, createMockStorageApi, getLibraryDefinition, initializeAds, initializeAi, initializeAnalytics, initializeAvatar3d, initializeCdn, initializeFeaturesApi, initializeHaptics, initializeIap, initializeLeaderboard, initializeLifecycleApi, initializeLocalNotifications, initializeLoggingApi, initializePopups, initializePreloader, initializeProfile, initializeRoomsApi, initializeSimulation, initializeSocial, initializeStackNavigation, initializeStorage, initializeSystem, initializeTime, isPacificDaylightTime, setupRoomNotifications };
|
|
5121
|
-
//# sourceMappingURL=chunk-
|
|
5122
|
-
//# sourceMappingURL=chunk-
|
|
5134
|
+
export { DEFAULT_SHARED_LIB_CDN_BASE, EMBEDDED_LIBRARIES, EMBEDDED_LIBRARY_BY_KEY, HASH_ALGORITHM_NODE, HASH_ALGORITHM_WEB_CRYPTO, HapticFeedbackStyle, HostCdnApi, HostDeviceApi, HostEnvironmentApi, HostProfileApi, HostSystemApi, HostTimeApi, MODULE_TO_LIBRARY_SPECIFIERS, MockAdsApi, MockAiApi, MockAnalyticsApi, MockAvatarApi, MockCdnApi, MockDeviceApi, MockEnvironmentApi, MockFeaturesApi, MockHapticsApi, MockIapApi, MockLeaderboardApi, MockLifecycleApi, MockLoggingApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockPreloaderApi, MockProfileApi, MockSharedAssetsApi, MockSocialApi, MockStorageApi, MockSystemApi, MockTimeApi, ROOM_GAME_PHASES, RemoteHost, RpcAdsApi, RpcAiApi, RpcAnalyticsApi, RpcAvatarApi, RpcClient, RpcFeaturesApi, RpcHapticsApi, RpcIapApi, RpcLeaderboardApi, RpcLifecycleApi, RpcLoggingApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, RpcPreloaderApi, RpcRoomsApi, RpcSharedAssetsApi, RpcSimulationApi, RpcSocialApi, RpcStorageApi, SDK_VERSION, VenusMessageId, VenusRoom, base64ToArrayBuffer, base64ToUtf8, computeScoreHash, createHost, createMockStorageApi, getLibraryDefinition, initializeAds, initializeAi, initializeAnalytics, initializeAvatar3d, initializeCdn, initializeFeaturesApi, initializeHaptics, initializeIap, initializeLeaderboard, initializeLifecycleApi, initializeLocalNotifications, initializeLoggingApi, initializePopups, initializePreloader, initializeProfile, initializeRoomsApi, initializeSimulation, initializeSocial, initializeStackNavigation, initializeStorage, initializeSystem, initializeTime, isPacificDaylightTime, setupRoomNotifications };
|
|
5135
|
+
//# sourceMappingURL=chunk-W74ZI2H3.js.map
|
|
5136
|
+
//# sourceMappingURL=chunk-W74ZI2H3.js.map
|