@series-inc/venus-sdk 3.1.2-beta.0 → 3.1.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-xw-M1AEl.d.mts → AdsApi-CNGRf6j0.d.mts} +293 -501
- package/dist/{AdsApi-xw-M1AEl.d.ts → AdsApi-CNGRf6j0.d.ts} +293 -501
- package/dist/{chunk-QQTWO5KS.mjs → chunk-PXWCNWJ6.mjs} +1525 -1380
- package/dist/chunk-PXWCNWJ6.mjs.map +1 -0
- package/dist/{chunk-QABXMFND.mjs → chunk-W7IPHM67.mjs} +26 -3
- package/dist/chunk-W7IPHM67.mjs.map +1 -0
- package/dist/core-R3FHW62G.mjs +3 -0
- package/dist/{core-62LWDHN7.mjs.map → core-R3FHW62G.mjs.map} +1 -1
- package/dist/index.cjs +1531 -1406
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +92 -280
- package/dist/index.d.ts +92 -280
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/dist/venus-api/index.cjs +2012 -1548
- package/dist/venus-api/index.cjs.map +1 -1
- package/dist/venus-api/index.d.mts +2 -2
- package/dist/venus-api/index.d.ts +2 -2
- package/dist/venus-api/index.mjs +391 -92
- package/dist/venus-api/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-NSSMTXJJ.mjs +0 -7
- package/dist/chunk-NSSMTXJJ.mjs.map +0 -1
- package/dist/chunk-QABXMFND.mjs.map +0 -1
- package/dist/chunk-QQTWO5KS.mjs.map +0 -1
- package/dist/chunk-UXY5CKKG.mjs +0 -12
- package/dist/chunk-UXY5CKKG.mjs.map +0 -1
- package/dist/core-62LWDHN7.mjs +0 -4
- package/dist/vite/index.cjs +0 -534
- package/dist/vite/index.cjs.map +0 -1
- package/dist/vite/index.mjs +0 -527
- package/dist/vite/index.mjs.map +0 -1
- package/dist/webview/index.cjs +0 -15
- package/dist/webview/index.cjs.map +0 -1
- package/dist/webview/index.d.mts +0 -15
- package/dist/webview/index.d.ts +0 -15
- package/dist/webview/index.mjs +0 -4
- package/dist/webview/index.mjs.map +0 -1
|
@@ -56,6 +56,7 @@ declare class RpcClient {
|
|
|
56
56
|
private addPendingCall;
|
|
57
57
|
private removePendingCall;
|
|
58
58
|
private getPendingCall;
|
|
59
|
+
private generateId;
|
|
59
60
|
private handleRpcResponse;
|
|
60
61
|
private handleRpcNotification;
|
|
61
62
|
}
|
|
@@ -161,80 +162,6 @@ interface ProfileApi {
|
|
|
161
162
|
getCurrentProfile(): Profile;
|
|
162
163
|
}
|
|
163
164
|
|
|
164
|
-
interface DeviceInfo {
|
|
165
|
-
readonly screenSize: {
|
|
166
|
-
readonly width: number;
|
|
167
|
-
readonly height: number;
|
|
168
|
-
};
|
|
169
|
-
readonly viewportSize: {
|
|
170
|
-
readonly width: number;
|
|
171
|
-
readonly height: number;
|
|
172
|
-
};
|
|
173
|
-
readonly orientation: string;
|
|
174
|
-
readonly pixelRatio: number;
|
|
175
|
-
readonly fontScale: number;
|
|
176
|
-
readonly deviceType: string;
|
|
177
|
-
readonly hapticsEnabled: boolean;
|
|
178
|
-
readonly haptics: {
|
|
179
|
-
readonly supported: boolean;
|
|
180
|
-
readonly enabled: boolean;
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
interface DeviceApi {
|
|
184
|
-
getDevice(): DeviceInfo;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
interface EnvironmentInfo {
|
|
188
|
-
readonly isDevelopment: boolean;
|
|
189
|
-
readonly platform: string;
|
|
190
|
-
readonly platformVersion: string;
|
|
191
|
-
readonly browserInfo?: {
|
|
192
|
-
readonly browser: string;
|
|
193
|
-
readonly userAgent: string;
|
|
194
|
-
readonly isMobile: boolean;
|
|
195
|
-
readonly isTablet: boolean;
|
|
196
|
-
readonly language: string;
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
interface EnvironmentApi {
|
|
200
|
-
getEnvironment(): EnvironmentInfo;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* System API provides access to device and environment information.
|
|
205
|
-
* This is a unified namespace for system-level configuration data.
|
|
206
|
-
*/
|
|
207
|
-
interface SystemApi {
|
|
208
|
-
/**
|
|
209
|
-
* Get device information (screen size, orientation, capabilities, etc.)
|
|
210
|
-
* @throws Error if called before VenusAPI.initializeAsync() completes
|
|
211
|
-
*/
|
|
212
|
-
getDevice(): DeviceInfo;
|
|
213
|
-
/**
|
|
214
|
-
* Get environment information (platform, browser, development mode, etc.)
|
|
215
|
-
* @throws Error if called before VenusAPI.initializeAsync() completes
|
|
216
|
-
*/
|
|
217
|
-
getEnvironment(): EnvironmentInfo;
|
|
218
|
-
/**
|
|
219
|
-
* Get safe area insets (padding to avoid device notches and host UI).
|
|
220
|
-
* This includes the toolbar/feedHeader height plus device safe areas.
|
|
221
|
-
* Safe area is static - it's set once during initialization and doesn't change.
|
|
222
|
-
* @returns SafeArea with top, right, bottom, left padding values in pixels
|
|
223
|
-
* @throws Error if called before VenusAPI.initializeAsync() completes
|
|
224
|
-
*/
|
|
225
|
-
getSafeArea(): SafeArea;
|
|
226
|
-
/**
|
|
227
|
-
* Check if running on mobile device
|
|
228
|
-
* @returns true if on mobile device (iOS, Android, or mobile browser)
|
|
229
|
-
*/
|
|
230
|
-
isMobile(): boolean;
|
|
231
|
-
/**
|
|
232
|
-
* Check if running on web platform
|
|
233
|
-
* @returns true if on web platform
|
|
234
|
-
*/
|
|
235
|
-
isWeb(): boolean;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
165
|
type SubPath = string;
|
|
239
166
|
interface FetchBlobOptions {
|
|
240
167
|
timeout?: number;
|
|
@@ -273,6 +200,32 @@ interface TimeApi {
|
|
|
273
200
|
getFutureTimeAsync(options?: GetFutureTimeOptions): Promise<number>;
|
|
274
201
|
}
|
|
275
202
|
|
|
203
|
+
interface PostInfo {
|
|
204
|
+
isLiked: boolean;
|
|
205
|
+
isFollowing: boolean;
|
|
206
|
+
likesCount: number;
|
|
207
|
+
commentsCount: number;
|
|
208
|
+
}
|
|
209
|
+
interface ToggleLikeResult {
|
|
210
|
+
isLiked: boolean;
|
|
211
|
+
likesCount: number;
|
|
212
|
+
action: 'liked' | 'unliked';
|
|
213
|
+
}
|
|
214
|
+
interface ToggleFollowResult {
|
|
215
|
+
isFollowing: boolean;
|
|
216
|
+
action: 'followed' | 'unfollowed';
|
|
217
|
+
}
|
|
218
|
+
interface OpenCommentsResult {
|
|
219
|
+
opened: boolean;
|
|
220
|
+
commentsCount: number;
|
|
221
|
+
}
|
|
222
|
+
interface PostApi {
|
|
223
|
+
getPostInfo(): Promise<PostInfo>;
|
|
224
|
+
toggleLikeAsync(): Promise<ToggleLikeResult>;
|
|
225
|
+
openCommentsAsync(): Promise<OpenCommentsResult>;
|
|
226
|
+
toggleFollowAsync(): Promise<ToggleFollowResult>;
|
|
227
|
+
}
|
|
228
|
+
|
|
276
229
|
interface AiMessage {
|
|
277
230
|
/**
|
|
278
231
|
* Depends on the model you are using. Most common is user, system, and assistant.
|
|
@@ -439,12 +392,12 @@ interface Recipe {
|
|
|
439
392
|
}
|
|
440
393
|
interface TriggerRecipeChainOptions {
|
|
441
394
|
roomId?: string;
|
|
442
|
-
context?:
|
|
395
|
+
context?: any;
|
|
443
396
|
}
|
|
444
397
|
interface CollectRecipeResult {
|
|
445
398
|
success: boolean;
|
|
446
399
|
runId: string;
|
|
447
|
-
rewards:
|
|
400
|
+
rewards: any;
|
|
448
401
|
message: string;
|
|
449
402
|
}
|
|
450
403
|
interface ExecuteScopedRecipeResult {
|
|
@@ -464,265 +417,28 @@ interface GetBatchRecipeRequirements {
|
|
|
464
417
|
success: boolean;
|
|
465
418
|
results: RecipeRequirementResult[];
|
|
466
419
|
}
|
|
467
|
-
interface SimulationPersonalState {
|
|
468
|
-
inventory: Record<string, number | string>;
|
|
469
|
-
activeRuns: SimulationRunSummary[];
|
|
470
|
-
disabledRecipes: string[];
|
|
471
|
-
}
|
|
472
|
-
interface SimulationRoomActiveRecipe {
|
|
473
|
-
recipeId: string;
|
|
474
|
-
scope: 'room' | 'actor';
|
|
475
|
-
startedAt: number;
|
|
476
|
-
expiresAt: number;
|
|
477
|
-
commitmentEndsAt?: number;
|
|
478
|
-
}
|
|
479
|
-
interface SimulationRoomState {
|
|
480
|
-
activeRecipes: Record<string, SimulationRoomActiveRecipe>;
|
|
481
|
-
sharedAssets: Record<string, number | string>;
|
|
482
|
-
actors: Array<Record<string, unknown>>;
|
|
483
|
-
activeRuns: SimulationRunSummary[];
|
|
484
|
-
}
|
|
485
|
-
type SimulationState = SimulationPersonalState | SimulationRoomState;
|
|
486
|
-
interface SimulationSlotContainer {
|
|
487
|
-
entityId: string;
|
|
488
|
-
slots: Record<string, unknown>;
|
|
489
|
-
isOwned: boolean;
|
|
490
|
-
powerCalculationRecipe?: string;
|
|
491
|
-
}
|
|
492
|
-
interface SimulationAvailableItem {
|
|
493
|
-
entityId: string;
|
|
494
|
-
quantity: number;
|
|
495
|
-
metadata: Record<string, unknown>;
|
|
496
|
-
tags: string[];
|
|
497
|
-
isCompatible: boolean;
|
|
498
|
-
}
|
|
499
|
-
interface SimulationSlotValidationResult {
|
|
500
|
-
valid: boolean;
|
|
501
|
-
error?: string;
|
|
502
|
-
}
|
|
503
|
-
interface SimulationAssignment {
|
|
504
|
-
id: string;
|
|
505
|
-
containerId: string;
|
|
506
|
-
slotId: string;
|
|
507
|
-
itemId: string | null;
|
|
508
|
-
profileId: string;
|
|
509
|
-
appId: string;
|
|
510
|
-
createdAt: number;
|
|
511
|
-
metadata?: Record<string, unknown>;
|
|
512
|
-
}
|
|
513
|
-
interface SimulationSlotMutationResult {
|
|
514
|
-
success: boolean;
|
|
515
|
-
error?: string;
|
|
516
|
-
association?: SimulationAssignment;
|
|
517
|
-
}
|
|
518
|
-
interface SimulationBatchOperationAssign {
|
|
519
|
-
type: 'assign';
|
|
520
|
-
containerId: string;
|
|
521
|
-
slotId: string;
|
|
522
|
-
itemId: string;
|
|
523
|
-
}
|
|
524
|
-
interface SimulationBatchOperationRemove {
|
|
525
|
-
type: 'remove';
|
|
526
|
-
containerId: string;
|
|
527
|
-
slotId: string;
|
|
528
|
-
itemId?: string;
|
|
529
|
-
}
|
|
530
|
-
type SimulationBatchOperation = SimulationBatchOperationAssign | SimulationBatchOperationRemove;
|
|
531
|
-
interface SimulationBatchOperationResult {
|
|
532
|
-
success: boolean;
|
|
533
|
-
error?: string;
|
|
534
|
-
association?: SimulationAssignment;
|
|
535
|
-
operation: SimulationBatchOperation;
|
|
536
|
-
}
|
|
537
|
-
interface SimulationBatchOperationsResult {
|
|
538
|
-
success: boolean;
|
|
539
|
-
results: SimulationBatchOperationResult[];
|
|
540
|
-
affectedContainers: string[];
|
|
541
|
-
}
|
|
542
|
-
interface SimulationPowerPreview {
|
|
543
|
-
currentPower: number;
|
|
544
|
-
previewPower: number;
|
|
545
|
-
powerDelta: number;
|
|
546
|
-
breakdown: Record<string, number>;
|
|
547
|
-
}
|
|
548
|
-
interface ExecuteRecipeResponse {
|
|
549
|
-
success: boolean;
|
|
550
|
-
status?: string;
|
|
551
|
-
runId?: string;
|
|
552
|
-
expiresAt?: string;
|
|
553
|
-
queuePosition?: number;
|
|
554
|
-
outputs?: Record<string, number | string>;
|
|
555
|
-
data?: Record<string, unknown>;
|
|
556
|
-
message?: string;
|
|
557
|
-
amountRequested?: number;
|
|
558
|
-
amountFulfilled?: number;
|
|
559
|
-
partialSuccess?: boolean;
|
|
560
|
-
}
|
|
561
420
|
interface SimulationApi {
|
|
562
|
-
|
|
563
|
-
getStateAsync(roomId?: string): Promise<SimulationState>;
|
|
421
|
+
getStateAsync(roomId?: string): Promise<any>;
|
|
564
422
|
getConfigAsync(roomId?: string): Promise<VenusSimulationConfig>;
|
|
565
|
-
executeRecipeAsync(recipeId: string, inputs?:
|
|
566
|
-
getActiveRunsAsync(options?: GetActiveRunsOptions): Promise<
|
|
423
|
+
executeRecipeAsync(recipeId: string, inputs?: any, options?: ExecuteRecipeOptions): Promise<any>;
|
|
424
|
+
getActiveRunsAsync(options?: GetActiveRunsOptions): Promise<any>;
|
|
567
425
|
collectRecipeAsync(runId: string): Promise<CollectRecipeResult>;
|
|
568
|
-
executeScopedRecipeAsync(recipeId: string, entity: string, inputs?:
|
|
569
|
-
triggerRecipeChainAsync(recipeId: string, options?: TriggerRecipeChainOptions): Promise<
|
|
426
|
+
executeScopedRecipeAsync(recipeId: string, entity: string, inputs?: any, options?: ExecuteScopedRecipeOptions | any): Promise<ExecuteScopedRecipeResult>;
|
|
427
|
+
triggerRecipeChainAsync(recipeId: string, options?: TriggerRecipeChainOptions): Promise<any>;
|
|
570
428
|
getAvailableRecipesAsync(options?: GetAvailableRecipesOptions): Promise<GetAvailableRecipesResult>;
|
|
571
429
|
getRecipeRequirementsAsync(recipe: Recipe): Promise<RecipeRequirementResult>;
|
|
572
430
|
getBatchRecipeRequirementsAsync(recipes: Recipe[]): Promise<GetBatchRecipeRequirements>;
|
|
573
|
-
resolveFieldValueAsync(entityId: string, fieldPath: string, entity?: string): Promise<
|
|
574
|
-
getEntityMetadataAsync(entityId: string): Promise<
|
|
575
|
-
getSlotContainersAsync(): Promise<
|
|
576
|
-
getSlotAssignmentsAsync(containerId: string): Promise<
|
|
577
|
-
assignItemToSlotAsync(containerId: string, slotId: string, itemId: string): Promise<
|
|
578
|
-
removeItemFromSlotAsync(containerId: string, slotId: string): Promise<
|
|
579
|
-
getAvailableItemsAsync(containerId: string, slotId: string): Promise<
|
|
580
|
-
calculatePowerPreviewAsync(containerId: string, slotId: string, candidateItemId: string): Promise<
|
|
581
|
-
validateSlotAssignmentAsync(containerId: string, slotId: string, itemId: string): Promise<
|
|
582
|
-
executeBatchOperationsAsync(operations: Array<
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
interface VenusRoomPayload extends Record<string, unknown> {
|
|
587
|
-
id: string;
|
|
588
|
-
name?: string;
|
|
589
|
-
currentPlayers?: string[];
|
|
590
|
-
maxPlayers?: number;
|
|
591
|
-
gameType?: string;
|
|
592
|
-
appId?: string;
|
|
593
|
-
type?: string;
|
|
594
|
-
createdBy?: string;
|
|
595
|
-
createdAt?: number;
|
|
596
|
-
updatedAt?: number;
|
|
597
|
-
isPrivate?: boolean;
|
|
598
|
-
status?: string;
|
|
599
|
-
customMetadata?: Record<string, unknown>;
|
|
600
|
-
admins?: string[];
|
|
601
|
-
roomCode?: string;
|
|
602
|
-
description?: string;
|
|
603
|
-
data?: Record<string, unknown>;
|
|
604
|
-
version?: string;
|
|
605
|
-
}
|
|
606
|
-
declare class VenusRoom {
|
|
607
|
-
readonly id: string;
|
|
608
|
-
name?: string;
|
|
609
|
-
players: string[];
|
|
610
|
-
maxPlayers?: number;
|
|
611
|
-
gameType?: string;
|
|
612
|
-
appId?: string;
|
|
613
|
-
type?: string;
|
|
614
|
-
createdBy?: string;
|
|
615
|
-
createdAt?: number;
|
|
616
|
-
updatedAt?: number;
|
|
617
|
-
isPrivate?: boolean;
|
|
618
|
-
status?: string;
|
|
619
|
-
customMetadata: Record<string, unknown>;
|
|
620
|
-
admins: string[];
|
|
621
|
-
roomCode?: string;
|
|
622
|
-
description?: string;
|
|
623
|
-
data: Record<string, unknown>;
|
|
624
|
-
version?: string;
|
|
625
|
-
constructor(roomData: VenusRoomPayload);
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
interface CreateRoomOptions {
|
|
629
|
-
maxPlayers?: number;
|
|
630
|
-
gameType?: string;
|
|
631
|
-
isPrivate?: boolean;
|
|
632
|
-
roomCode?: string;
|
|
633
|
-
name?: string;
|
|
634
|
-
description?: string;
|
|
635
|
-
customMetadata?: Record<string, unknown>;
|
|
636
|
-
data?: Record<string, unknown>;
|
|
637
|
-
}
|
|
638
|
-
interface JoinRoomMatchCriteria {
|
|
639
|
-
isPrivate?: boolean;
|
|
640
|
-
hasSpace?: boolean;
|
|
641
|
-
gameType?: string;
|
|
642
|
-
[key: string]: unknown;
|
|
643
|
-
}
|
|
644
|
-
interface JoinOrCreateRoomOptions {
|
|
645
|
-
matchCriteria?: JoinRoomMatchCriteria;
|
|
646
|
-
createOptions: CreateRoomOptions;
|
|
647
|
-
}
|
|
648
|
-
interface JoinOrCreateResult {
|
|
649
|
-
action: 'created' | 'joined';
|
|
650
|
-
room: VenusRoom;
|
|
651
|
-
playersJoined: number;
|
|
652
|
-
}
|
|
653
|
-
interface ListRoomsOptions {
|
|
654
|
-
includeArchived?: boolean;
|
|
655
|
-
}
|
|
656
|
-
interface RoomDataUpdate {
|
|
657
|
-
type: 'H5_ROOM_DATA_UPDATED';
|
|
658
|
-
roomId: string;
|
|
659
|
-
roomData: Record<string, unknown>;
|
|
660
|
-
timestamp?: number;
|
|
661
|
-
}
|
|
662
|
-
type RoomMessageEventType = 'H5_ROOM_MESSAGE_RECEIVED' | 'H5_ROOM_MESSAGE_UPDATED' | 'H5_ROOM_MESSAGE_DELETED';
|
|
663
|
-
interface RoomMessageEvent {
|
|
664
|
-
type: RoomMessageEventType;
|
|
665
|
-
roomId: string;
|
|
666
|
-
message: Record<string, unknown>;
|
|
667
|
-
timestamp?: number;
|
|
668
|
-
}
|
|
669
|
-
interface ProposedMoveEvent {
|
|
670
|
-
type: 'app:h5:proposedMoveValidationUpdated';
|
|
671
|
-
roomId: string;
|
|
672
|
-
proposedMoveData: Record<string, unknown>;
|
|
673
|
-
proposedMoveId?: string;
|
|
674
|
-
changeType?: string;
|
|
675
|
-
timestamp?: number;
|
|
676
|
-
}
|
|
677
|
-
interface RoomSubscriptionOptions {
|
|
678
|
-
onData?: (event: RoomDataUpdate) => void;
|
|
679
|
-
onMessages?: (event: RoomMessageEvent) => void;
|
|
680
|
-
onGameEvents?: (event: ProposedMoveEvent) => void;
|
|
681
|
-
}
|
|
682
|
-
interface ProposeMoveRequest {
|
|
683
|
-
gameSpecificState: Record<string, unknown>;
|
|
684
|
-
moveType: string;
|
|
685
|
-
clientContext?: Record<string, unknown>;
|
|
686
|
-
clientProposalId?: string;
|
|
687
|
-
}
|
|
688
|
-
interface ProposeMoveResult {
|
|
689
|
-
proposedMoveId: string;
|
|
690
|
-
}
|
|
691
|
-
interface ValidateMoveVerdict {
|
|
692
|
-
isValid: boolean;
|
|
693
|
-
reason?: string | null;
|
|
694
|
-
validatorId?: string | null;
|
|
695
|
-
}
|
|
696
|
-
interface ValidateMoveResult {
|
|
697
|
-
success: boolean;
|
|
698
|
-
moveId: string;
|
|
699
|
-
isValid: boolean;
|
|
700
|
-
reason?: string | null;
|
|
701
|
-
}
|
|
702
|
-
interface UpdateRoomDataOptions {
|
|
703
|
-
merge?: boolean;
|
|
704
|
-
}
|
|
705
|
-
interface RoomMessageRequest {
|
|
706
|
-
message: Record<string, unknown>;
|
|
707
|
-
metadata?: Record<string, unknown>;
|
|
708
|
-
}
|
|
709
|
-
interface StartRoomGameOptions {
|
|
710
|
-
gameConfig?: Record<string, unknown>;
|
|
711
|
-
turnOrder?: string[] | null;
|
|
712
|
-
}
|
|
713
|
-
interface RoomsApi {
|
|
714
|
-
createRoomAsync(options: CreateRoomOptions): Promise<VenusRoom>;
|
|
715
|
-
joinOrCreateRoomAsync(options: JoinOrCreateRoomOptions): Promise<JoinOrCreateResult>;
|
|
716
|
-
joinRoomByCodeAsync(roomCode: string): Promise<VenusRoom>;
|
|
717
|
-
getUserRoomsAsync(options?: ListRoomsOptions): Promise<VenusRoom[]>;
|
|
718
|
-
subscribeAsync(room: VenusRoom, options?: RoomSubscriptionOptions): Promise<() => void>;
|
|
719
|
-
updateRoomDataAsync(room: VenusRoom, updates: Record<string, unknown>, options?: UpdateRoomDataOptions): Promise<void>;
|
|
720
|
-
getRoomDataAsync(room: VenusRoom): Promise<Record<string, unknown>>;
|
|
721
|
-
sendRoomMessageAsync(room: VenusRoom, message: RoomMessageRequest): Promise<string>;
|
|
722
|
-
leaveRoomAsync(room: VenusRoom): Promise<void>;
|
|
723
|
-
startRoomGameAsync(room: VenusRoom, options?: StartRoomGameOptions): Promise<void>;
|
|
724
|
-
proposeMoveAsync(room: VenusRoom, request: ProposeMoveRequest): Promise<ProposeMoveResult>;
|
|
725
|
-
validateMoveAsync(room: VenusRoom, moveId: string, verdict: ValidateMoveVerdict): Promise<ValidateMoveResult>;
|
|
431
|
+
resolveFieldValueAsync(entityId: string, fieldPath: string, entity?: string): Promise<any>;
|
|
432
|
+
getEntityMetadataAsync(entityId: string): Promise<any>;
|
|
433
|
+
getSlotContainersAsync(): Promise<any>;
|
|
434
|
+
getSlotAssignmentsAsync(containerId: string): Promise<any>;
|
|
435
|
+
assignItemToSlotAsync(containerId: string, slotId: string, itemId: string): Promise<any>;
|
|
436
|
+
removeItemFromSlotAsync(containerId: string, slotId: string): Promise<any>;
|
|
437
|
+
getAvailableItemsAsync(containerId: string, slotId: string): Promise<Array<any>>;
|
|
438
|
+
calculatePowerPreviewAsync(containerId: string, slotId: string, candidateItemId: string): Promise<any>;
|
|
439
|
+
validateSlotAssignmentAsync(containerId: string, slotId: string, itemId: string): Promise<any>;
|
|
440
|
+
executeBatchOperationsAsync(operations: Array<any>, validateOnly?: boolean): Promise<any>;
|
|
441
|
+
sumContributions(contributions: Record<string, any>): Record<string, number>;
|
|
726
442
|
}
|
|
727
443
|
|
|
728
444
|
interface VenusMessage {
|
|
@@ -813,22 +529,99 @@ declare class VenusTransport implements RpcTransport {
|
|
|
813
529
|
private notifyVenusMessageReceived;
|
|
814
530
|
}
|
|
815
531
|
|
|
532
|
+
declare class VenusRoom {
|
|
533
|
+
readonly id: string;
|
|
534
|
+
name: string;
|
|
535
|
+
players: any[];
|
|
536
|
+
maxPlayers: number;
|
|
537
|
+
gameType: string;
|
|
538
|
+
appId: string;
|
|
539
|
+
type: any;
|
|
540
|
+
createdBy: string;
|
|
541
|
+
createdAt: number;
|
|
542
|
+
updatedAt: number;
|
|
543
|
+
isPrivate: boolean;
|
|
544
|
+
currentPlayers: string[];
|
|
545
|
+
status: any;
|
|
546
|
+
customMetadata: Record<string, any>;
|
|
547
|
+
admins: string[];
|
|
548
|
+
roomCode: string;
|
|
549
|
+
description: string;
|
|
550
|
+
data: Record<string, any>;
|
|
551
|
+
version: string;
|
|
552
|
+
private _subscriptions;
|
|
553
|
+
constructor(roomData: any);
|
|
554
|
+
private updateFromRoomData;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
interface CreateRoomOptions {
|
|
558
|
+
maxPlayers?: number;
|
|
559
|
+
gameType?: string;
|
|
560
|
+
isPrivate?: boolean;
|
|
561
|
+
roomCode?: string;
|
|
562
|
+
name?: string;
|
|
563
|
+
description?: string;
|
|
564
|
+
customMetadata?: Record<string, any>;
|
|
565
|
+
}
|
|
566
|
+
interface JoinOrCreateResult {
|
|
567
|
+
action: 'created' | 'joined';
|
|
568
|
+
room: VenusRoom;
|
|
569
|
+
playersJoined: number;
|
|
570
|
+
}
|
|
571
|
+
interface RoomSubscriptionOptions {
|
|
572
|
+
onData?: (roomData: any) => void;
|
|
573
|
+
onMessages?: (messagePayload: any) => void;
|
|
574
|
+
onMoves?: (movePayload: any) => void;
|
|
575
|
+
onGameEvents?: (eventPayload: any) => void;
|
|
576
|
+
}
|
|
577
|
+
interface ProposeMovePayload {
|
|
578
|
+
gameSpecificState: any;
|
|
579
|
+
moveType: string;
|
|
580
|
+
clientContext?: Record<string, any>;
|
|
581
|
+
clientProposalId?: string;
|
|
582
|
+
}
|
|
583
|
+
interface ProposeMoveResult {
|
|
584
|
+
proposedMoveId: string;
|
|
585
|
+
}
|
|
586
|
+
interface ValidateMoveResult {
|
|
587
|
+
success: boolean;
|
|
588
|
+
moveId: string;
|
|
589
|
+
isValid: boolean;
|
|
590
|
+
reason?: string | null;
|
|
591
|
+
}
|
|
592
|
+
interface RoomsApi {
|
|
593
|
+
createRoom(options: CreateRoomOptions): Promise<VenusRoom>;
|
|
594
|
+
joinOrCreateRoom(options: CreateRoomOptions): Promise<JoinOrCreateResult>;
|
|
595
|
+
joinRoomByCode?(roomCode: string): Promise<VenusRoom>;
|
|
596
|
+
getUserRooms?(includeArchived?: boolean): Promise<VenusRoom[]>;
|
|
597
|
+
subscribe?(room: VenusRoom, options: RoomSubscriptionOptions): (() => void) | {
|
|
598
|
+
unsubscribe(): void;
|
|
599
|
+
};
|
|
600
|
+
updateData?(room: VenusRoom, updates: Record<string, any>, merge?: boolean): Promise<any>;
|
|
601
|
+
getData?(room: VenusRoom): Promise<any>;
|
|
602
|
+
sendMessage?(room: VenusRoom, messageData: any): Promise<string>;
|
|
603
|
+
leave?(room: VenusRoom): Promise<any>;
|
|
604
|
+
startGame?(room: VenusRoom, gameConfig?: Record<string, any>, turnOrder?: string[] | null): Promise<any>;
|
|
605
|
+
proposeMove?(room: VenusRoom, proposalPayload: ProposeMovePayload): Promise<ProposeMoveResult>;
|
|
606
|
+
validateMove?(room: VenusRoom, moveId: string, isValid: boolean, reason?: string | null, validatorId?: string | null): Promise<ValidateMoveResult>;
|
|
607
|
+
}
|
|
608
|
+
|
|
816
609
|
interface LoggingApi {
|
|
817
610
|
logDebug(message: string, ...args: any[]): void;
|
|
818
611
|
logError(message: string, ...args: any[]): void;
|
|
819
612
|
}
|
|
820
613
|
|
|
821
614
|
interface SharedAssetsApi {
|
|
822
|
-
|
|
823
|
-
|
|
615
|
+
loadCharactersBundle(): Promise<ArrayBuffer>;
|
|
616
|
+
loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
|
|
824
617
|
}
|
|
825
618
|
|
|
826
619
|
declare class RpcSharedAssetsApi implements SharedAssetsApi {
|
|
827
620
|
private readonly venusApi;
|
|
828
621
|
private readonly rpcClient;
|
|
829
622
|
constructor(rpcClient: RpcClient, venusApi: VenusAPI);
|
|
830
|
-
|
|
831
|
-
|
|
623
|
+
loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
|
|
624
|
+
loadCharactersBundle(): Promise<ArrayBuffer>;
|
|
832
625
|
}
|
|
833
626
|
interface LoadEmbeddedAssetsRequest {
|
|
834
627
|
assetKey: string;
|
|
@@ -875,29 +668,25 @@ interface LeaderboardConfig {
|
|
|
875
668
|
maxDurationSec: number;
|
|
876
669
|
minScore: number;
|
|
877
670
|
maxScore: number;
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
scoreSealingSecret?: string;
|
|
671
|
+
requiresHash: boolean;
|
|
672
|
+
scoringFields: string[];
|
|
881
673
|
modes: Record<string, LeaderboardModeConfig>;
|
|
882
674
|
periods: Record<string, LeaderboardPeriodConfig>;
|
|
883
675
|
antiCheat: LeaderboardAntiCheatConfig;
|
|
884
676
|
displaySettings: LeaderboardDisplaySettings;
|
|
885
677
|
}
|
|
886
|
-
interface
|
|
887
|
-
|
|
678
|
+
interface StartRunResult {
|
|
679
|
+
sessionId: string;
|
|
888
680
|
startTime: number;
|
|
889
681
|
expiresAt: number;
|
|
890
|
-
|
|
891
|
-
sealingSecret?: string | null;
|
|
682
|
+
hashNonce?: string | null;
|
|
892
683
|
mode: string;
|
|
893
684
|
}
|
|
894
|
-
interface
|
|
895
|
-
token?: string;
|
|
896
|
-
score: number;
|
|
897
|
-
duration: number;
|
|
685
|
+
interface SubmitScoreOptions {
|
|
898
686
|
mode?: string;
|
|
899
687
|
telemetry?: Record<string, any>;
|
|
900
688
|
metadata?: Record<string, any>;
|
|
689
|
+
hash?: string;
|
|
901
690
|
}
|
|
902
691
|
interface SubmitScoreResult {
|
|
903
692
|
accepted: boolean;
|
|
@@ -905,7 +694,7 @@ interface SubmitScoreResult {
|
|
|
905
694
|
zScore?: number | null;
|
|
906
695
|
isAnomaly?: boolean;
|
|
907
696
|
}
|
|
908
|
-
interface
|
|
697
|
+
interface GetLeaderboardOptions {
|
|
909
698
|
mode?: string;
|
|
910
699
|
period?: string;
|
|
911
700
|
periodDate?: number | string;
|
|
@@ -921,9 +710,9 @@ interface LeaderboardEntry {
|
|
|
921
710
|
username: string;
|
|
922
711
|
avatarUrl: string | null;
|
|
923
712
|
score: number;
|
|
924
|
-
|
|
713
|
+
durationSec: number;
|
|
925
714
|
submittedAt: number;
|
|
926
|
-
|
|
715
|
+
sessionId?: string;
|
|
927
716
|
rank: number | null;
|
|
928
717
|
zScore?: number | null;
|
|
929
718
|
isAnomaly?: boolean;
|
|
@@ -933,7 +722,7 @@ interface LeaderboardEntry {
|
|
|
933
722
|
metadata?: Record<string, any> | null;
|
|
934
723
|
isSeed?: boolean;
|
|
935
724
|
}
|
|
936
|
-
interface
|
|
725
|
+
interface LeaderboardResponse {
|
|
937
726
|
variant: 'standard' | 'highlight';
|
|
938
727
|
entries: LeaderboardEntry[];
|
|
939
728
|
totalEntries: number;
|
|
@@ -941,12 +730,12 @@ interface PagedScoresResponse {
|
|
|
941
730
|
playerRank: number | null;
|
|
942
731
|
periodInstance: string;
|
|
943
732
|
}
|
|
944
|
-
interface
|
|
733
|
+
interface PlayerStatsOptions {
|
|
945
734
|
mode?: string;
|
|
946
735
|
period?: string;
|
|
947
736
|
periodDate?: number | string;
|
|
948
737
|
}
|
|
949
|
-
interface
|
|
738
|
+
interface PlayerStats {
|
|
950
739
|
rank: number | null;
|
|
951
740
|
score?: number;
|
|
952
741
|
totalPlayers: number;
|
|
@@ -954,7 +743,7 @@ interface PlayerRankResult {
|
|
|
954
743
|
trustScore: number;
|
|
955
744
|
periodInstance: string;
|
|
956
745
|
}
|
|
957
|
-
interface
|
|
746
|
+
interface LeaderboardHighlightContext {
|
|
958
747
|
topEntries: LeaderboardEntry[];
|
|
959
748
|
beforePlayer: LeaderboardEntry[];
|
|
960
749
|
playerEntry?: LeaderboardEntry | null;
|
|
@@ -964,18 +753,18 @@ interface PodiumScoresContext {
|
|
|
964
753
|
omittedBefore: number;
|
|
965
754
|
omittedAfter: number;
|
|
966
755
|
}
|
|
967
|
-
interface
|
|
756
|
+
interface LeaderboardHighlightResponse extends LeaderboardResponse {
|
|
968
757
|
variant: 'highlight';
|
|
969
|
-
context:
|
|
758
|
+
context: LeaderboardHighlightContext;
|
|
970
759
|
}
|
|
971
|
-
interface
|
|
760
|
+
interface LeaderboardHighlightOptions extends Omit<GetLeaderboardOptions, 'variant'> {
|
|
972
761
|
}
|
|
973
762
|
interface LeaderboardApi {
|
|
974
|
-
|
|
975
|
-
submitScore(
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
763
|
+
startRun(mode?: string): Promise<StartRunResult>;
|
|
764
|
+
submitScore(sessionId: string, score: number, durationSec: number, options?: SubmitScoreOptions): Promise<SubmitScoreResult>;
|
|
765
|
+
getLeaderboard(options?: GetLeaderboardOptions): Promise<LeaderboardResponse>;
|
|
766
|
+
getPlayerStats(options?: PlayerStatsOptions): Promise<PlayerStats>;
|
|
767
|
+
getLeaderboardHighlight(options?: LeaderboardHighlightOptions): Promise<LeaderboardHighlightResponse>;
|
|
979
768
|
}
|
|
980
769
|
|
|
981
770
|
interface PreloaderApi {
|
|
@@ -1029,7 +818,7 @@ interface SocialApi {
|
|
|
1029
818
|
* - iOS / Android: opens the native share sheet.
|
|
1030
819
|
* - Web: copies the generated URL to the clipboard (with fallback toast).
|
|
1031
820
|
*
|
|
1032
|
-
* @param options.launchParams Arbitrary launch parameters
|
|
821
|
+
* @param options.launchParams Arbitrary launch parameters (must include gameId).
|
|
1033
822
|
* @param options.metadata Optional OpenGraph metadata for rich previews.
|
|
1034
823
|
* @returns The generated share URL.
|
|
1035
824
|
*/
|
|
@@ -1042,7 +831,7 @@ interface SocialApi {
|
|
|
1042
831
|
*
|
|
1043
832
|
* Games can render or print the returned QR image or re-use the share URL.
|
|
1044
833
|
*
|
|
1045
|
-
* @param options.launchParams Arbitrary launch parameters
|
|
834
|
+
* @param options.launchParams Arbitrary launch parameters (must include gameId).
|
|
1046
835
|
* @param options.metadata Optional OpenGraph metadata for the share.
|
|
1047
836
|
* @param options.qrOptions Customisation for the generated QR code.
|
|
1048
837
|
* @returns The generated share URL and QR code (as a data URL).
|
|
@@ -1054,20 +843,12 @@ interface SocialApi {
|
|
|
1054
843
|
}): Promise<QRCodeResult>;
|
|
1055
844
|
}
|
|
1056
845
|
|
|
1057
|
-
|
|
1058
|
-
* Safe area insets representing padding needed to avoid device notches and host UI.
|
|
1059
|
-
* Includes toolbar/feedHeader height + device safe areas.
|
|
1060
|
-
*/
|
|
1061
|
-
interface SafeArea {
|
|
846
|
+
interface HudInsets {
|
|
1062
847
|
left: number;
|
|
1063
848
|
top: number;
|
|
1064
849
|
right: number;
|
|
1065
850
|
bottom: number;
|
|
1066
851
|
}
|
|
1067
|
-
/**
|
|
1068
|
-
* @deprecated Use SafeArea instead. Will be removed in v4.0.0
|
|
1069
|
-
*/
|
|
1070
|
-
type HudInsets = SafeArea;
|
|
1071
852
|
interface InitializationOptions {
|
|
1072
853
|
helpText?: string;
|
|
1073
854
|
hardDisableMock?: boolean;
|
|
@@ -1075,11 +856,7 @@ interface InitializationOptions {
|
|
|
1075
856
|
usePreloader?: boolean;
|
|
1076
857
|
}
|
|
1077
858
|
interface InitializationContext {
|
|
1078
|
-
|
|
1079
|
-
* Safe area insets from INIT_SDK response.
|
|
1080
|
-
* @deprecated Use VenusAPI.system.getSafeArea() instead. Will be removed in v4.0.0
|
|
1081
|
-
*/
|
|
1082
|
-
safeArea?: SafeArea;
|
|
859
|
+
hudInsets?: HudInsets;
|
|
1083
860
|
initializeAsleep: boolean;
|
|
1084
861
|
}
|
|
1085
862
|
interface Host {
|
|
@@ -1093,9 +870,9 @@ interface Host {
|
|
|
1093
870
|
readonly notifications: NotificationsApi;
|
|
1094
871
|
readonly popups: PopupsApi;
|
|
1095
872
|
readonly profile: ProfileApi;
|
|
1096
|
-
readonly system: SystemApi;
|
|
1097
873
|
readonly cdn: CdnApi;
|
|
1098
874
|
readonly time: TimeApi;
|
|
875
|
+
readonly post: PostApi;
|
|
1099
876
|
readonly ai: AiApi;
|
|
1100
877
|
readonly haptics: HapticsApi;
|
|
1101
878
|
readonly features: FeaturesApi;
|
|
@@ -1205,72 +982,23 @@ interface RecipeRequirementResult {
|
|
|
1205
982
|
recipeId: string;
|
|
1206
983
|
entity: string | null;
|
|
1207
984
|
amount?: number;
|
|
1208
|
-
inputs: Record<string,
|
|
985
|
+
inputs: Record<string, any>;
|
|
1209
986
|
canAfford: boolean;
|
|
1210
987
|
disabled: boolean;
|
|
1211
988
|
}
|
|
1212
|
-
interface
|
|
1213
|
-
|
|
1214
|
-
recipeId: string;
|
|
1215
|
-
status: string;
|
|
1216
|
-
startTime: number;
|
|
1217
|
-
expiresAt: number;
|
|
1218
|
-
entity?: string;
|
|
1219
|
-
inputs?: Record<string, number | string>;
|
|
1220
|
-
outputs?: Record<string, number | string>;
|
|
1221
|
-
commitmentEndsAt?: number;
|
|
1222
|
-
participantCount?: number;
|
|
1223
|
-
}
|
|
1224
|
-
type VenusSimulationStateResponse = SimulationPersonalState | SimulationRoomState;
|
|
1225
|
-
type SimulationUpdateType = 'entity' | 'activeRuns' | 'snapshot';
|
|
1226
|
-
interface SimulationUpdateBase {
|
|
1227
|
-
timestamp: number;
|
|
1228
|
-
reason?: 'recipe_completed' | 'auto_restart' | 'manual_update' | 'state_sync';
|
|
1229
|
-
}
|
|
1230
|
-
interface SimulationEntityUpdate extends SimulationUpdateBase {
|
|
1231
|
-
type: 'entity';
|
|
1232
|
-
entities: Array<{
|
|
1233
|
-
entityId: string;
|
|
1234
|
-
quantity: number | string;
|
|
1235
|
-
}>;
|
|
1236
|
-
}
|
|
1237
|
-
interface SimulationActiveRunsUpdate extends SimulationUpdateBase {
|
|
1238
|
-
type: 'activeRuns';
|
|
989
|
+
interface VenusSimulationState {
|
|
990
|
+
inventory: Record<string, number | string>;
|
|
1239
991
|
activeRuns: Array<{
|
|
1240
992
|
id: string;
|
|
1241
993
|
recipeId: string;
|
|
1242
994
|
status: string;
|
|
1243
995
|
startTime: number;
|
|
1244
996
|
expiresAt: number;
|
|
1245
|
-
entity?: string;
|
|
1246
997
|
inputs?: Record<string, number | string>;
|
|
1247
998
|
outputs?: Record<string, number | string>;
|
|
1248
|
-
}>;
|
|
1249
|
-
}
|
|
1250
|
-
interface SimulationSnapshotUpdate extends SimulationUpdateBase {
|
|
1251
|
-
type: 'snapshot';
|
|
1252
|
-
entities?: Array<{
|
|
1253
|
-
entityId: string;
|
|
1254
|
-
quantity: number | string;
|
|
1255
|
-
}>;
|
|
1256
|
-
activeRuns?: Array<{
|
|
1257
|
-
id: string;
|
|
1258
|
-
recipeId: string;
|
|
1259
|
-
status: string;
|
|
1260
|
-
startTime: number;
|
|
1261
|
-
expiresAt: number;
|
|
1262
999
|
entity?: string;
|
|
1263
|
-
inputs?: Record<string, number | string>;
|
|
1264
|
-
outputs?: Record<string, number | string>;
|
|
1265
1000
|
}>;
|
|
1266
|
-
|
|
1267
|
-
type SimulationUpdateData = SimulationEntityUpdate | SimulationActiveRunsUpdate | SimulationSnapshotUpdate;
|
|
1268
|
-
interface SimulationSubscribeOptions {
|
|
1269
|
-
entities?: string[];
|
|
1270
|
-
tags?: string[];
|
|
1271
|
-
activeRuns?: boolean;
|
|
1272
|
-
roomId?: string;
|
|
1273
|
-
onUpdate: (data: SimulationUpdateData) => void;
|
|
1001
|
+
disabledRecipes: string[];
|
|
1274
1002
|
}
|
|
1275
1003
|
interface VenusSimulationEffect {
|
|
1276
1004
|
type: string;
|
|
@@ -1324,40 +1052,93 @@ interface RecipeRequirementQuery {
|
|
|
1324
1052
|
interface BatchRecipeRequirementsResult {
|
|
1325
1053
|
success: boolean;
|
|
1326
1054
|
results: RecipeRequirementResult[];
|
|
1327
|
-
errors?: Array<
|
|
1328
|
-
}
|
|
1329
|
-
interface VenusExecuteRecipeOptions {
|
|
1330
|
-
roomId?: string;
|
|
1331
|
-
batchAmount?: number;
|
|
1332
|
-
allowPartialBatch?: boolean;
|
|
1333
|
-
entity?: string;
|
|
1334
|
-
}
|
|
1335
|
-
interface VenusExecuteScopedRecipeOptions {
|
|
1336
|
-
roomId?: string;
|
|
1337
|
-
}
|
|
1338
|
-
interface VenusAvailableRecipe {
|
|
1339
|
-
id: string;
|
|
1340
|
-
scope: string;
|
|
1341
|
-
clientViewable: boolean;
|
|
1055
|
+
errors?: Array<any>;
|
|
1342
1056
|
}
|
|
1343
|
-
interface
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1057
|
+
interface VenusSimulationAPI {
|
|
1058
|
+
isEnabled(): boolean;
|
|
1059
|
+
getStateAsync(options?: {
|
|
1060
|
+
roomId?: string;
|
|
1061
|
+
}): Promise<VenusSimulationState>;
|
|
1062
|
+
getConfigAsync(): Promise<VenusSimulationConfig>;
|
|
1063
|
+
executeRecipeAsync(recipeId: string, inputs?: Record<string, any>, options?: any): Promise<any>;
|
|
1064
|
+
executeScopedRecipeAsync(recipeId: string, entity: string, inputs?: Record<string, any>, roomId?: string, options?: any): Promise<any>;
|
|
1065
|
+
getActiveRunsAsync(): Promise<any[]>;
|
|
1066
|
+
collectRecipeAsync(runId: string): Promise<any>;
|
|
1067
|
+
triggerRecipeChainAsync(triggerRecipeId: string, context?: any, roomId?: string): Promise<any>;
|
|
1068
|
+
getRecipeRequirementsAsync(recipeId: string, entity?: string, amount?: number): Promise<RecipeRequirementResult>;
|
|
1069
|
+
getBatchRecipeRequirementsAsync(queries: RecipeRequirementQuery[]): Promise<BatchRecipeRequirementsResult>;
|
|
1070
|
+
getAvailableRecipesAsync(roomId?: string, includeActorRecipes?: boolean): Promise<Array<any>>;
|
|
1071
|
+
resolveFieldValueAsync(entityId: string, fieldPath: string, entity?: string): Promise<any>;
|
|
1072
|
+
getEntityMetadataAsync(entityId: string): Promise<any>;
|
|
1073
|
+
getSlotContainersAsync(): Promise<Array<any>>;
|
|
1074
|
+
getSlotAssignmentsAsync(containerId: string): Promise<Array<any>>;
|
|
1075
|
+
assignItemToSlotAsync(containerId: string, slotId: string, itemId: string): Promise<any>;
|
|
1076
|
+
removeItemFromSlotAsync(containerId: string, slotId: string): Promise<any>;
|
|
1077
|
+
getAvailableItemsAsync(containerId: string, slotId: string): Promise<Array<any>>;
|
|
1078
|
+
calculatePowerPreviewAsync(containerId: string, slotId: string, candidateItemId: string): Promise<any>;
|
|
1079
|
+
validateSlotAssignmentAsync(containerId: string, slotId: string, itemId: string): Promise<any>;
|
|
1080
|
+
executeBatchOperationsAsync(operations: Array<any>, validateOnly?: boolean): Promise<any>;
|
|
1081
|
+
sumContributions(contributions: Record<string, any>): Record<string, number>;
|
|
1082
|
+
}
|
|
1083
|
+
interface VenusConfig {
|
|
1084
|
+
user?: {
|
|
1085
|
+
id: string;
|
|
1086
|
+
username?: string;
|
|
1087
|
+
languageCode: string;
|
|
1088
|
+
locale: string;
|
|
1089
|
+
};
|
|
1090
|
+
profile?: {
|
|
1091
|
+
id: string;
|
|
1092
|
+
username: string;
|
|
1093
|
+
avatarUrl?: string;
|
|
1094
|
+
isAnonymous?: boolean;
|
|
1095
|
+
};
|
|
1096
|
+
device?: {
|
|
1097
|
+
screenSize: {
|
|
1098
|
+
width: number;
|
|
1099
|
+
height: number;
|
|
1100
|
+
};
|
|
1101
|
+
viewportSize: {
|
|
1102
|
+
width: number;
|
|
1103
|
+
height: number;
|
|
1104
|
+
};
|
|
1105
|
+
orientation: string;
|
|
1106
|
+
hapticsEnabled: boolean;
|
|
1107
|
+
};
|
|
1108
|
+
theme?: Record<string, any>;
|
|
1109
|
+
environment?: {
|
|
1110
|
+
isDevelopment: boolean;
|
|
1111
|
+
platform: string;
|
|
1112
|
+
platformVersion: string;
|
|
1113
|
+
browserInfo?: {
|
|
1114
|
+
browser: string;
|
|
1115
|
+
isMobile: boolean;
|
|
1116
|
+
};
|
|
1117
|
+
};
|
|
1118
|
+
ui: {
|
|
1119
|
+
safeArea: {
|
|
1120
|
+
top: number;
|
|
1121
|
+
left: number;
|
|
1122
|
+
right: number;
|
|
1123
|
+
bottom: number;
|
|
1124
|
+
};
|
|
1125
|
+
controls: Record<string, any>;
|
|
1126
|
+
};
|
|
1127
|
+
rooms?: VenusRoomsConfig;
|
|
1348
1128
|
}
|
|
1349
|
-
interface
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1129
|
+
interface VenusRoomsConfig {
|
|
1130
|
+
gameType?: string;
|
|
1131
|
+
rulesPreset?: string;
|
|
1132
|
+
matchmaking?: {
|
|
1133
|
+
defaultCriteria?: Record<string, any>;
|
|
1134
|
+
[key: string]: any;
|
|
1135
|
+
};
|
|
1136
|
+
createOptions?: Record<string, any>;
|
|
1137
|
+
privateMatchDefaults?: {
|
|
1138
|
+
createOptions?: Record<string, any>;
|
|
1139
|
+
allowCustomCode?: boolean;
|
|
1140
|
+
};
|
|
1141
|
+
[key: string]: any;
|
|
1361
1142
|
}
|
|
1362
1143
|
interface ActionSheetOption {
|
|
1363
1144
|
label: string;
|
|
@@ -1372,36 +1153,20 @@ interface Profile {
|
|
|
1372
1153
|
isAnonymous?: boolean;
|
|
1373
1154
|
}
|
|
1374
1155
|
interface VenusAPI {
|
|
1375
|
-
|
|
1376
|
-
* @deprecated All config properties have been removed. Use VenusAPI methods instead.
|
|
1377
|
-
* Will be removed in v4.0.0
|
|
1378
|
-
*/
|
|
1379
|
-
config: Record<string, never>;
|
|
1156
|
+
config: VenusConfig;
|
|
1380
1157
|
launchParams: Record<string, string>;
|
|
1381
|
-
_profileData?: Profile;
|
|
1382
|
-
_deviceData?: DeviceInfo;
|
|
1383
|
-
_environmentData?: EnvironmentInfo;
|
|
1384
|
-
_safeAreaData?: SafeArea;
|
|
1385
|
-
_localeData?: string;
|
|
1386
|
-
_languageCodeData?: string;
|
|
1387
1158
|
_mock: any;
|
|
1388
1159
|
_bootstrap: {
|
|
1389
1160
|
apiInjected: boolean;
|
|
1390
1161
|
venus: any;
|
|
1391
1162
|
};
|
|
1392
1163
|
initializeAsync(options?: InitializationOptions): Promise<InitializationContext>;
|
|
1393
|
-
simulation:
|
|
1164
|
+
simulation: VenusSimulationAPI;
|
|
1394
1165
|
leaderboard: LeaderboardApi;
|
|
1395
1166
|
log(message: string, ...args: any[]): void;
|
|
1396
1167
|
error(message: string, ...args: any[]): void;
|
|
1397
1168
|
isAvailable(): boolean;
|
|
1398
|
-
/**
|
|
1399
|
-
* @deprecated Use VenusAPI.system.isMobile() instead
|
|
1400
|
-
*/
|
|
1401
1169
|
isMobile(): boolean;
|
|
1402
|
-
/**
|
|
1403
|
-
* @deprecated Use VenusAPI.system.isWeb() instead
|
|
1404
|
-
*/
|
|
1405
1170
|
isWeb(): boolean;
|
|
1406
1171
|
isMock(): boolean;
|
|
1407
1172
|
/**
|
|
@@ -1421,15 +1186,8 @@ interface VenusAPI {
|
|
|
1421
1186
|
getFeatureGate(options: {
|
|
1422
1187
|
gateName: string;
|
|
1423
1188
|
}): Promise<any>;
|
|
1424
|
-
system: SystemApi;
|
|
1425
|
-
getProfile(): Profile;
|
|
1426
|
-
/**
|
|
1427
|
-
* @deprecated Use getProfile() instead
|
|
1428
|
-
*/
|
|
1429
1189
|
getCurrentProfile(): Profile;
|
|
1430
1190
|
getLaunchParams(): Record<string, string>;
|
|
1431
|
-
getLocale(): string;
|
|
1432
|
-
getLanguageCode(): string;
|
|
1433
1191
|
/**
|
|
1434
1192
|
* @deprecated Please use the popups API. (e.g, VenusAPI.popups)
|
|
1435
1193
|
*/
|
|
@@ -1500,6 +1258,11 @@ interface VenusAPI {
|
|
|
1500
1258
|
key(index: number): Promise<string | null>;
|
|
1501
1259
|
};
|
|
1502
1260
|
requestPopOrQuit(options?: QuitOptions): Promise<boolean>;
|
|
1261
|
+
getPostInteractionsAsync(): Promise<any>;
|
|
1262
|
+
getPostInteractions(): Promise<any>;
|
|
1263
|
+
toggleLikeAsync(): Promise<any>;
|
|
1264
|
+
toggleFollowAsync(): Promise<any>;
|
|
1265
|
+
openCommentsAsync(options?: any): Promise<void>;
|
|
1503
1266
|
/**
|
|
1504
1267
|
* @deprecated Please use the ads API. (e.g, VenusAPI.ads)
|
|
1505
1268
|
*/
|
|
@@ -1508,8 +1271,16 @@ interface VenusAPI {
|
|
|
1508
1271
|
* @deprecated Please use the ads API. (e.g, VenusAPI.ads)
|
|
1509
1272
|
*/
|
|
1510
1273
|
showRewardedAdAsync(): Promise<boolean>;
|
|
1511
|
-
requestTimeAsync(): Promise<
|
|
1512
|
-
|
|
1274
|
+
requestTimeAsync(): Promise<{
|
|
1275
|
+
serverTime: number;
|
|
1276
|
+
}>;
|
|
1277
|
+
getFutureTimeAsync(options: {
|
|
1278
|
+
days?: number;
|
|
1279
|
+
hours?: number;
|
|
1280
|
+
minutes?: number;
|
|
1281
|
+
timeOfDay?: any;
|
|
1282
|
+
timezone?: string;
|
|
1283
|
+
}): Promise<number>;
|
|
1513
1284
|
formatTime(timestamp: number, options?: any): string;
|
|
1514
1285
|
formatNumber(value: number, options?: any): string;
|
|
1515
1286
|
/**
|
|
@@ -1549,7 +1320,7 @@ interface VenusAPI {
|
|
|
1549
1320
|
isOptional?: boolean;
|
|
1550
1321
|
}>>;
|
|
1551
1322
|
cleanupAssets(): void;
|
|
1552
|
-
assetLoader
|
|
1323
|
+
assetLoader?: {
|
|
1553
1324
|
getCached(url: string): string | null;
|
|
1554
1325
|
};
|
|
1555
1326
|
showAvatar3dEditorAsync(options: {
|
|
@@ -1570,22 +1341,43 @@ interface VenusAPI {
|
|
|
1570
1341
|
isInStack: boolean;
|
|
1571
1342
|
stackPosition: number;
|
|
1572
1343
|
};
|
|
1573
|
-
rooms:
|
|
1344
|
+
rooms: {
|
|
1345
|
+
create(options: any): Promise<VenusRoom>;
|
|
1346
|
+
joinOrCreate(options: any): Promise<{
|
|
1347
|
+
action: 'created' | 'joined';
|
|
1348
|
+
room: VenusRoom;
|
|
1349
|
+
playersJoined: number;
|
|
1350
|
+
}>;
|
|
1351
|
+
joinByCode(roomCode: string): Promise<VenusRoom>;
|
|
1352
|
+
list(includeArchived?: boolean): Promise<VenusRoom[]>;
|
|
1353
|
+
subscribeToRoom(room: VenusRoom, options: {
|
|
1354
|
+
onData?: (event: any) => void;
|
|
1355
|
+
onMessages?: (event: any) => void;
|
|
1356
|
+
onMoves?: (event: any) => void;
|
|
1357
|
+
onGameEvents?: (event: any) => void;
|
|
1358
|
+
}): () => void;
|
|
1359
|
+
proposeMove(room: VenusRoom, proposalPayload: {
|
|
1360
|
+
gameSpecificState: any;
|
|
1361
|
+
moveType: string;
|
|
1362
|
+
clientContext?: Record<string, any>;
|
|
1363
|
+
clientProposalId?: string;
|
|
1364
|
+
}): Promise<{
|
|
1365
|
+
proposedMoveId: string;
|
|
1366
|
+
}>;
|
|
1367
|
+
validateMove(room: VenusRoom, moveId: string, isValid: boolean, reason?: string, validatorId?: string): Promise<any>;
|
|
1368
|
+
updateRoomData(room: VenusRoom, updates: any, merge?: boolean): Promise<any>;
|
|
1369
|
+
getRoomData(room: VenusRoom): Promise<any>;
|
|
1370
|
+
sendRoomMessage(room: VenusRoom, messageData: any): Promise<string>;
|
|
1371
|
+
startRoomGame(room: VenusRoom, gameConfig?: any, turnOrder?: any): Promise<any>;
|
|
1372
|
+
leaveRoom(room: VenusRoom): Promise<any>;
|
|
1373
|
+
};
|
|
1574
1374
|
notifyCleanupComplete(): void;
|
|
1575
1375
|
RoomEvents: {
|
|
1576
1376
|
OPTIMISTIC_GAME_STATE_UPDATED: string;
|
|
1577
1377
|
PROPOSED_MOVE_VALIDATION_UPDATED: string;
|
|
1578
1378
|
};
|
|
1579
|
-
numbers
|
|
1580
|
-
|
|
1581
|
-
normalize(value: string | number | any): any;
|
|
1582
|
-
format: {
|
|
1583
|
-
incremental(value: any): string;
|
|
1584
|
-
};
|
|
1585
|
-
calculateGeometricSeriesCost(baseCost: number | string, multiplier: number, currentQuantity: number, purchaseAmount: number): any;
|
|
1586
|
-
calculateMaxAffordableDecimal(availableCash: number | string, baseCost: number | string, multiplier: number, currentQuantity: number): number;
|
|
1587
|
-
formatDecimalCurrency(decimalValue: any): string;
|
|
1588
|
-
Decimal: any;
|
|
1379
|
+
numbers?: {
|
|
1380
|
+
normalize(value: string | number): string;
|
|
1589
1381
|
};
|
|
1590
1382
|
iap: IapApi;
|
|
1591
1383
|
cdn: CdnApi;
|
|
@@ -1614,4 +1406,4 @@ interface AdsApi {
|
|
|
1614
1406
|
showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
|
|
1615
1407
|
}
|
|
1616
1408
|
|
|
1617
|
-
export { type
|
|
1409
|
+
export { type Recipe as $, type AnalyticsApi as A, type Subscription as B, type CdnApi as C, type AwakeCallback as D, type Experiment as E, type FetchBlobOptions as F, type GetFutureTimeOptions as G, type Host as H, type PauseCallback as I, type ResumeCallback as J, type QuitCallback as K, type LifecycleApi as L, type SimulationApi as M, type NavigationApi as N, type VenusSimulationConfig as O, type PushAppOptions as P, type QuitOptions as Q, type RpcRequest as R, type StorageApi as S, type TimeApi as T, type ExecuteRecipeOptions as U, type VenusAPI as V, type CollectRecipeResult as W, type GetActiveRunsOptions as X, type ExecuteScopedRecipeResult as Y, type GetAvailableRecipesOptions as Z, type GetAvailableRecipesResult as _, type RpcResponse as a, type LeaderboardEntry as a$, type GetBatchRecipeRequirements as a0, type TriggerRecipeChainOptions as a1, type RecipeRequirementResult as a2, VenusTransport as a3, type LoggingApi as a4, type IapApi as a5, type SpendCurrencyOptions as a6, type LoadEmbeddedAssetsResponse as a7, type SharedAssetsApi as a8, type LeaderboardApi as a9, type AiMessage as aA, type Asset as aB, type Category as aC, MockAvatarApi as aD, type TimeIntervalTriggerInput as aE, type NotificationTriggerInput as aF, type OnRequestCallback as aG, type OnResponseCallback as aH, type OnNotificationCallback as aI, type RpcTransport as aJ, VenusRoom as aK, type CreateRoomOptions as aL, type JoinOrCreateResult as aM, type RoomSubscriptionOptions as aN, type ProposeMovePayload as aO, type ProposeMoveResult as aP, type ValidateMoveResult as aQ, type ExecuteScopedRecipeOptions as aR, type RecipeInfo as aS, RpcSharedAssetsApi as aT, type LoadEmbeddedAssetsRequest as aU, type LeaderboardModeConfig as aV, type LeaderboardPeriodType as aW, type LeaderboardPeriodConfig as aX, type LeaderboardAntiCheatConfig as aY, type LeaderboardDisplaySettings as aZ, type LeaderboardConfig as a_, type StartRunResult as aa, type SubmitScoreOptions as ab, type SubmitScoreResult as ac, type GetLeaderboardOptions as ad, type LeaderboardResponse as ae, type PlayerStatsOptions as af, type PlayerStats as ag, type LeaderboardHighlightOptions as ah, type LeaderboardHighlightResponse as ai, type PreloaderApi as aj, type SocialApi as ak, type ShareMetadata as al, type ShareLinkResult as am, type SocialQRCodeOptions as an, type QRCodeResult as ao, type Avatar3dApi as ap, type AssetManifest as aq, type Avatar3dConfig as ar, type ShowEditorOptions as as, type Avatar3dEdits as at, type AdsApi as au, type PostApi as av, type RoomsApi as aw, type InitializationOptions as ax, type InitializationContext as ay, type HudInsets as az, type RpcNotification as b, type LeaderboardHighlightContext as b0, createHost as b1, type VenusSimulationState as b2, type VenusSimulationEffect as b3, type VenusSimulationRecipe as b4, type RecipeRequirementQuery as b5, type BatchRecipeRequirementsResult as b6, type VenusSimulationAPI as b7, type VenusConfig as b8, type VenusRoomsConfig as b9, type ActionSheetOption as ba, RpcClient as c, type NavigationStackInfo as d, type NotificationsApi as e, type ScheduleLocalNotification as f, type ScheduleNotificationOptions as g, type PopupsApi as h, type ActionSheetItem as i, type ShowActionSheetOptions as j, type ShowAlertOptions as k, type ShowConfirmOptions as l, type ShowToastOptions as m, type ShowInterstitialAdOptions as n, type ShowRewardedAdOptions as o, type ProfileApi as p, type Profile as q, type SubPath as r, type ServerTimeData as s, type AiApi as t, type AiChatCompletionRequest as u, type AiChatCompletionData as v, type HapticsApi as w, HapticFeedbackStyle as x, type FeaturesApi as y, type SleepCallback as z };
|