@series-inc/venus-sdk 3.4.2-beta.0 → 3.4.2-beta.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-C3vW2N-i.d.ts → AdsApi-CgpJ_4bF.d.ts} +55 -8
- package/dist/{chunk-34XHWHTI.js → chunk-OV5YVXVG.js} +7 -3
- package/dist/chunk-OV5YVXVG.js.map +1 -0
- package/dist/index.d.ts +6 -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-34XHWHTI.js.map +0 -1
|
@@ -562,6 +562,24 @@ interface SimulationApi {
|
|
|
562
562
|
subscribeAsync(options: SimulationSubscribeOptions): Promise<() => void>;
|
|
563
563
|
}
|
|
564
564
|
|
|
565
|
+
interface VenusRoomRulesGameState extends Record<string, unknown> {
|
|
566
|
+
phase?: string;
|
|
567
|
+
currentPlayer?: string | null;
|
|
568
|
+
turnOrder?: string[];
|
|
569
|
+
turnCount?: number;
|
|
570
|
+
turnBased?: boolean;
|
|
571
|
+
playerStates?: Record<string, unknown>;
|
|
572
|
+
}
|
|
573
|
+
interface VenusRoomRules extends Record<string, unknown> {
|
|
574
|
+
hostProfileId?: string;
|
|
575
|
+
minPlayers?: number;
|
|
576
|
+
maxPlayers?: number;
|
|
577
|
+
turnBased?: boolean;
|
|
578
|
+
gameState?: VenusRoomRulesGameState;
|
|
579
|
+
}
|
|
580
|
+
interface VenusRoomCustomMetadata extends Record<string, unknown> {
|
|
581
|
+
rules?: VenusRoomRules;
|
|
582
|
+
}
|
|
565
583
|
interface VenusRoomPayload extends Record<string, unknown> {
|
|
566
584
|
id: string;
|
|
567
585
|
name?: string;
|
|
@@ -575,12 +593,12 @@ interface VenusRoomPayload extends Record<string, unknown> {
|
|
|
575
593
|
updatedAt?: number;
|
|
576
594
|
isPrivate?: boolean;
|
|
577
595
|
status?: string;
|
|
578
|
-
customMetadata?:
|
|
596
|
+
customMetadata?: VenusRoomCustomMetadata;
|
|
579
597
|
admins?: string[];
|
|
580
598
|
roomCode?: string;
|
|
581
599
|
description?: string;
|
|
582
600
|
data?: Record<string, unknown>;
|
|
583
|
-
version?:
|
|
601
|
+
version?: number;
|
|
584
602
|
}
|
|
585
603
|
declare class VenusRoom {
|
|
586
604
|
readonly id: string;
|
|
@@ -595,12 +613,12 @@ declare class VenusRoom {
|
|
|
595
613
|
updatedAt?: number;
|
|
596
614
|
isPrivate?: boolean;
|
|
597
615
|
status?: string;
|
|
598
|
-
customMetadata:
|
|
616
|
+
customMetadata: VenusRoomCustomMetadata;
|
|
599
617
|
admins: string[];
|
|
600
618
|
roomCode?: string;
|
|
601
619
|
description?: string;
|
|
602
620
|
data: Record<string, unknown>;
|
|
603
|
-
version?:
|
|
621
|
+
version?: number;
|
|
604
622
|
constructor(roomData: VenusRoomPayload);
|
|
605
623
|
}
|
|
606
624
|
|
|
@@ -635,20 +653,45 @@ interface ListRoomsOptions {
|
|
|
635
653
|
interface RoomDataUpdate {
|
|
636
654
|
type: 'H5_ROOM_DATA_UPDATED';
|
|
637
655
|
roomId: string;
|
|
638
|
-
roomData:
|
|
656
|
+
roomData: VenusRoomPayload;
|
|
639
657
|
timestamp?: number;
|
|
640
658
|
}
|
|
641
659
|
type RoomMessageEventType = 'H5_ROOM_MESSAGE_RECEIVED' | 'H5_ROOM_MESSAGE_UPDATED' | 'H5_ROOM_MESSAGE_DELETED';
|
|
660
|
+
interface RoomMessagePayload extends Record<string, unknown> {
|
|
661
|
+
id?: string;
|
|
662
|
+
roomId?: string;
|
|
663
|
+
senderId?: string;
|
|
664
|
+
type?: string;
|
|
665
|
+
content?: unknown;
|
|
666
|
+
metadata?: Record<string, unknown>;
|
|
667
|
+
timestamp?: unknown;
|
|
668
|
+
}
|
|
642
669
|
interface RoomMessageEvent {
|
|
643
670
|
type: RoomMessageEventType;
|
|
644
671
|
roomId: string;
|
|
645
|
-
message:
|
|
672
|
+
message: RoomMessagePayload;
|
|
646
673
|
timestamp?: number;
|
|
647
674
|
}
|
|
675
|
+
interface ProposedMovePayload extends Record<string, unknown> {
|
|
676
|
+
id?: string;
|
|
677
|
+
proposerProfileId?: string;
|
|
678
|
+
timestamp?: unknown;
|
|
679
|
+
gameSpecificState?: Record<string, unknown>;
|
|
680
|
+
clientContext?: Record<string, unknown>;
|
|
681
|
+
moveType?: string;
|
|
682
|
+
clientProposalId?: string;
|
|
683
|
+
serverGenericValidationStatus?: string;
|
|
684
|
+
serverGenericValidationReason?: string;
|
|
685
|
+
serverCustomValidationStatus?: string;
|
|
686
|
+
serverCustomValidationReason?: string;
|
|
687
|
+
clientConsensusStatus?: string;
|
|
688
|
+
clientConsensusDetails?: unknown;
|
|
689
|
+
updatedAt?: unknown;
|
|
690
|
+
}
|
|
648
691
|
interface ProposedMoveEvent {
|
|
649
692
|
type: 'app:h5:proposedMoveValidationUpdated';
|
|
650
693
|
roomId: string;
|
|
651
|
-
proposedMoveData:
|
|
694
|
+
proposedMoveData: ProposedMovePayload;
|
|
652
695
|
proposedMoveId?: string;
|
|
653
696
|
changeType?: string;
|
|
654
697
|
timestamp?: number;
|
|
@@ -695,6 +738,10 @@ interface RoomsApi {
|
|
|
695
738
|
joinRoomByCodeAsync(roomCode: string): Promise<VenusRoom>;
|
|
696
739
|
getUserRoomsAsync(options?: ListRoomsOptions): Promise<VenusRoom[]>;
|
|
697
740
|
subscribeAsync(room: VenusRoom, options?: RoomSubscriptionOptions): Promise<() => void>;
|
|
741
|
+
/**
|
|
742
|
+
* @deprecated Prefer server-authoritative flows (e.g. `proposeMoveAsync` / `startRoomGameAsync`)
|
|
743
|
+
* and treat `customMetadata.rules.gameState` as the canonical room lifecycle state.
|
|
744
|
+
*/
|
|
698
745
|
updateRoomDataAsync(room: VenusRoom, updates: Record<string, unknown>, options?: UpdateRoomDataOptions): Promise<void>;
|
|
699
746
|
getRoomDataAsync(room: VenusRoom): Promise<Record<string, unknown>>;
|
|
700
747
|
sendRoomMessageAsync(room: VenusRoom, message: RoomMessageRequest): Promise<string>;
|
|
@@ -1552,4 +1599,4 @@ interface AdsApi {
|
|
|
1552
1599
|
showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
|
|
1553
1600
|
}
|
|
1554
1601
|
|
|
1555
|
-
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,
|
|
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 SimulationRoomActiveRecipe as bA, type SimulationRoomState as bB, type SimulationBatchOperationAssign as bC, type SimulationBatchOperationRemove as bD, type SimulationBatchOperationResult as bE, RpcSharedAssetsApi as bF, type LoadEmbeddedAssetsRequest as bG, type LeaderboardModeConfig as bH, type LeaderboardPeriodType as bI, type LeaderboardPeriodConfig as bJ, type LeaderboardAntiCheatConfig as bK, type LeaderboardDisplaySettings as bL, type LeaderboardConfig as bM, type LeaderboardEntry as bN, type PodiumScoresContext as bO, type HudInsets as bP, createHost as bQ, 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, type VenusRoomRulesGameState as bu, type VenusRoomRules as bv, type VenusRoomCustomMetadata as bw, type VenusRoomPayload as bx, type RecipeInfo as by, type SimulationPersonalState 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 };
|
|
@@ -2308,6 +2308,10 @@ var RpcRoomsApi = class {
|
|
|
2308
2308
|
}
|
|
2309
2309
|
return venusRooms;
|
|
2310
2310
|
}
|
|
2311
|
+
/**
|
|
2312
|
+
* @deprecated Prefer server-authoritative flows (e.g. `proposeMoveAsync` / `startRoomGameAsync`)
|
|
2313
|
+
* and treat `customMetadata.rules.gameState` as the canonical room lifecycle state.
|
|
2314
|
+
*/
|
|
2311
2315
|
async updateRoomDataAsync(room, updates, options = {}) {
|
|
2312
2316
|
await this.rpcClient.call(
|
|
2313
2317
|
"H5_ROOM_UPDATE_DATA" /* H5_ROOM_UPDATE_DATA */,
|
|
@@ -3419,7 +3423,7 @@ function initializeTime(venusApi, host) {
|
|
|
3419
3423
|
}
|
|
3420
3424
|
|
|
3421
3425
|
// src/version.ts
|
|
3422
|
-
var SDK_VERSION = "3.4.2-beta.
|
|
3426
|
+
var SDK_VERSION = "3.4.2-beta.1";
|
|
3423
3427
|
|
|
3424
3428
|
// src/shared-assets/base64Utils.ts
|
|
3425
3429
|
function base64ToArrayBuffer(base64) {
|
|
@@ -5114,5 +5118,5 @@ function initializeSocial(venusApi, host) {
|
|
|
5114
5118
|
}
|
|
5115
5119
|
|
|
5116
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 };
|
|
5117
|
-
//# sourceMappingURL=chunk-
|
|
5118
|
-
//# sourceMappingURL=chunk-
|
|
5121
|
+
//# sourceMappingURL=chunk-OV5YVXVG.js.map
|
|
5122
|
+
//# sourceMappingURL=chunk-OV5YVXVG.js.map
|