@series-inc/venus-sdk 3.4.1 → 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-CEBNBYQX.js → chunk-OV5YVXVG.js} +23 -59
- 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-CEBNBYQX.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 };
|
|
@@ -2248,17 +2248,13 @@ var RpcRoomsApi = class {
|
|
|
2248
2248
|
setupRoomNotifications(transport, () => this.getSubscriptions());
|
|
2249
2249
|
}
|
|
2250
2250
|
async createRoomAsync(options) {
|
|
2251
|
-
const
|
|
2251
|
+
const roomData = await this.rpcClient.call(
|
|
2252
2252
|
"H5_ROOM_CREATE" /* H5_ROOM_CREATE */,
|
|
2253
2253
|
{
|
|
2254
2254
|
options
|
|
2255
2255
|
}
|
|
2256
2256
|
);
|
|
2257
|
-
|
|
2258
|
-
const errorMessage = typeof response.error === "string" ? response.error : "Failed to create room";
|
|
2259
|
-
throw new Error(errorMessage);
|
|
2260
|
-
}
|
|
2261
|
-
const room = new VenusRoom(response.roomData);
|
|
2257
|
+
const room = new VenusRoom(roomData);
|
|
2262
2258
|
return room;
|
|
2263
2259
|
}
|
|
2264
2260
|
async joinOrCreateRoomAsync(options) {
|
|
@@ -2268,29 +2264,21 @@ var RpcRoomsApi = class {
|
|
|
2268
2264
|
options
|
|
2269
2265
|
}
|
|
2270
2266
|
);
|
|
2271
|
-
|
|
2272
|
-
const errorMessage = typeof response.error === "string" ? response.error : "Failed to join or create room";
|
|
2273
|
-
throw new Error(errorMessage);
|
|
2274
|
-
}
|
|
2275
|
-
const room = new VenusRoom(response.value.roomData);
|
|
2267
|
+
const room = new VenusRoom(response.roomData);
|
|
2276
2268
|
return {
|
|
2277
|
-
action: response.
|
|
2269
|
+
action: response.action,
|
|
2278
2270
|
room,
|
|
2279
|
-
playersJoined: response.
|
|
2271
|
+
playersJoined: response.playersJoined
|
|
2280
2272
|
};
|
|
2281
2273
|
}
|
|
2282
2274
|
async joinRoomByCodeAsync(roomCode) {
|
|
2283
|
-
const
|
|
2275
|
+
const roomData = await this.rpcClient.call(
|
|
2284
2276
|
"H5_ROOM_JOIN_BY_CODE" /* H5_ROOM_JOIN_BY_CODE */,
|
|
2285
2277
|
{
|
|
2286
2278
|
roomCode
|
|
2287
2279
|
}
|
|
2288
2280
|
);
|
|
2289
|
-
|
|
2290
|
-
const errorMessage = typeof response.error === "string" ? response.error : "Failed to join room by code";
|
|
2291
|
-
throw new Error(errorMessage);
|
|
2292
|
-
}
|
|
2293
|
-
const room = new VenusRoom(response.roomData);
|
|
2281
|
+
const room = new VenusRoom(roomData);
|
|
2294
2282
|
return room;
|
|
2295
2283
|
}
|
|
2296
2284
|
// Get user's rooms with optional filtering
|
|
@@ -2301,10 +2289,6 @@ var RpcRoomsApi = class {
|
|
|
2301
2289
|
includeArchived: options.includeArchived ?? false
|
|
2302
2290
|
}
|
|
2303
2291
|
);
|
|
2304
|
-
if (response?.success === false) {
|
|
2305
|
-
const errorMessage = typeof response.error === "string" ? response.error : "Failed to get user rooms";
|
|
2306
|
-
throw new Error(errorMessage);
|
|
2307
|
-
}
|
|
2308
2292
|
const venusRooms = [];
|
|
2309
2293
|
for (const roomData of response.rooms) {
|
|
2310
2294
|
if (!roomData.id) {
|
|
@@ -2324,8 +2308,12 @@ var RpcRoomsApi = class {
|
|
|
2324
2308
|
}
|
|
2325
2309
|
return venusRooms;
|
|
2326
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
|
+
*/
|
|
2327
2315
|
async updateRoomDataAsync(room, updates, options = {}) {
|
|
2328
|
-
|
|
2316
|
+
await this.rpcClient.call(
|
|
2329
2317
|
"H5_ROOM_UPDATE_DATA" /* H5_ROOM_UPDATE_DATA */,
|
|
2330
2318
|
{
|
|
2331
2319
|
roomId: room.id,
|
|
@@ -2333,26 +2321,18 @@ var RpcRoomsApi = class {
|
|
|
2333
2321
|
merge: options.merge ?? true
|
|
2334
2322
|
}
|
|
2335
2323
|
);
|
|
2336
|
-
if (response?.success === false) {
|
|
2337
|
-
const errorMessage = typeof response.error === "string" ? response.error : "Failed to update room data";
|
|
2338
|
-
throw new Error(errorMessage);
|
|
2339
|
-
}
|
|
2340
2324
|
}
|
|
2341
2325
|
async getRoomDataAsync(room) {
|
|
2342
|
-
const
|
|
2326
|
+
const data = await this.rpcClient.call(
|
|
2343
2327
|
"H5_ROOM_GET_DATA" /* H5_ROOM_GET_DATA */,
|
|
2344
2328
|
{
|
|
2345
2329
|
roomId: room.id
|
|
2346
2330
|
}
|
|
2347
2331
|
);
|
|
2348
|
-
|
|
2349
|
-
const errorMessage = typeof response.error === "string" ? response.error : "Failed to get room data";
|
|
2350
|
-
throw new Error(errorMessage);
|
|
2351
|
-
}
|
|
2352
|
-
return response.data;
|
|
2332
|
+
return data;
|
|
2353
2333
|
}
|
|
2354
2334
|
async sendRoomMessageAsync(venusRoom, request) {
|
|
2355
|
-
const
|
|
2335
|
+
const messageId = await this.rpcClient.call(
|
|
2356
2336
|
"H5_ROOM_SEND_MESSAGE" /* H5_ROOM_SEND_MESSAGE */,
|
|
2357
2337
|
{
|
|
2358
2338
|
roomId: venusRoom.id,
|
|
@@ -2360,26 +2340,18 @@ var RpcRoomsApi = class {
|
|
|
2360
2340
|
metadata: request.metadata
|
|
2361
2341
|
}
|
|
2362
2342
|
);
|
|
2363
|
-
|
|
2364
|
-
const errorMessage = typeof response.error === "string" ? response.error : "Failed to send message";
|
|
2365
|
-
throw new Error(errorMessage);
|
|
2366
|
-
}
|
|
2367
|
-
return response.messageId;
|
|
2343
|
+
return messageId;
|
|
2368
2344
|
}
|
|
2369
2345
|
async leaveRoomAsync(room) {
|
|
2370
|
-
|
|
2346
|
+
await this.rpcClient.call(
|
|
2371
2347
|
"H5_ROOM_LEAVE" /* H5_ROOM_LEAVE */,
|
|
2372
2348
|
{
|
|
2373
2349
|
roomId: room.id
|
|
2374
2350
|
}
|
|
2375
2351
|
);
|
|
2376
|
-
if (response?.success === false) {
|
|
2377
|
-
const errorMessage = typeof response.error === "string" ? response.error : "Failed to leave room";
|
|
2378
|
-
throw new Error(errorMessage);
|
|
2379
|
-
}
|
|
2380
2352
|
}
|
|
2381
2353
|
async startRoomGameAsync(room, options = {}) {
|
|
2382
|
-
|
|
2354
|
+
await this.rpcClient.call(
|
|
2383
2355
|
"H5_ROOM_START_GAME" /* H5_ROOM_START_GAME */,
|
|
2384
2356
|
{
|
|
2385
2357
|
roomId: room.id,
|
|
@@ -2387,13 +2359,9 @@ var RpcRoomsApi = class {
|
|
|
2387
2359
|
turnOrder: options.turnOrder ?? null
|
|
2388
2360
|
}
|
|
2389
2361
|
);
|
|
2390
|
-
if (response?.success === false) {
|
|
2391
|
-
const errorMessage = typeof response.error === "string" ? response.error : "Failed to start game";
|
|
2392
|
-
throw new Error(errorMessage);
|
|
2393
|
-
}
|
|
2394
2362
|
}
|
|
2395
2363
|
async proposeMoveAsync(room, proposalPayload) {
|
|
2396
|
-
const
|
|
2364
|
+
const data = await this.rpcClient.call(
|
|
2397
2365
|
"h5:room:proposeMove" /* H5_ROOM_PROPOSE_MOVE */,
|
|
2398
2366
|
{
|
|
2399
2367
|
roomId: room.id,
|
|
@@ -2403,11 +2371,7 @@ var RpcRoomsApi = class {
|
|
|
2403
2371
|
clientProposalId: proposalPayload.clientProposalId
|
|
2404
2372
|
}
|
|
2405
2373
|
);
|
|
2406
|
-
|
|
2407
|
-
const errorMessage = typeof response.error === "string" ? response.error : "Failed to propose move";
|
|
2408
|
-
throw new Error(errorMessage);
|
|
2409
|
-
}
|
|
2410
|
-
return response.data;
|
|
2374
|
+
return data;
|
|
2411
2375
|
}
|
|
2412
2376
|
async validateMoveAsync(_room, moveId, verdict) {
|
|
2413
2377
|
return {
|
|
@@ -3459,7 +3423,7 @@ function initializeTime(venusApi, host) {
|
|
|
3459
3423
|
}
|
|
3460
3424
|
|
|
3461
3425
|
// src/version.ts
|
|
3462
|
-
var SDK_VERSION = "3.4.1";
|
|
3426
|
+
var SDK_VERSION = "3.4.2-beta.1";
|
|
3463
3427
|
|
|
3464
3428
|
// src/shared-assets/base64Utils.ts
|
|
3465
3429
|
function base64ToArrayBuffer(base64) {
|
|
@@ -5154,5 +5118,5 @@ function initializeSocial(venusApi, host) {
|
|
|
5154
5118
|
}
|
|
5155
5119
|
|
|
5156
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 };
|
|
5157
|
-
//# sourceMappingURL=chunk-
|
|
5158
|
-
//# sourceMappingURL=chunk-
|
|
5121
|
+
//# sourceMappingURL=chunk-OV5YVXVG.js.map
|
|
5122
|
+
//# sourceMappingURL=chunk-OV5YVXVG.js.map
|