@series-inc/venus-sdk 3.0.6 → 3.1.0-beta.0
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/README.md +1180 -14
- package/dist/{AdsApi-CIXV8I_p.d.mts → AdsApi-meVfUcZy.d.mts} +164 -355
- package/dist/{AdsApi-CIXV8I_p.d.ts → AdsApi-meVfUcZy.d.ts} +164 -355
- package/dist/chunk-2PDL7CQK.mjs +26 -0
- package/dist/chunk-2PDL7CQK.mjs.map +1 -0
- package/dist/{chunk-LBJFUHOH.mjs → chunk-EMVTVSGL.mjs} +1471 -737
- package/dist/chunk-EMVTVSGL.mjs.map +1 -0
- package/dist/chunk-IZLOB7DV.mjs +343 -0
- package/dist/chunk-IZLOB7DV.mjs.map +1 -0
- package/dist/{chunk-MWUS3A7C.mjs → chunk-QABXMFND.mjs} +3 -7
- package/dist/chunk-QABXMFND.mjs.map +1 -0
- package/dist/core-5JLON75E.mjs +4 -0
- package/dist/{core-RDMPQV6U.mjs.map → core-5JLON75E.mjs.map} +1 -1
- package/dist/index.cjs +1883 -778
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +113 -61
- package/dist/index.d.ts +113 -61
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/dist/venus-api/index.cjs +1806 -748
- 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 +311 -3
- package/dist/venus-api/index.mjs.map +1 -1
- package/dist/vite/index.cjs +534 -0
- package/dist/vite/index.cjs.map +1 -0
- package/dist/vite/index.mjs +527 -0
- package/dist/vite/index.mjs.map +1 -0
- package/dist/webview/index.cjs +346 -0
- package/dist/webview/index.cjs.map +1 -0
- package/dist/webview/index.d.mts +17 -0
- package/dist/webview/index.d.ts +17 -0
- package/dist/webview/index.mjs +4 -0
- package/dist/webview/index.mjs.map +1 -0
- package/package.json +19 -1
- package/dist/chunk-LBJFUHOH.mjs.map +0 -1
- package/dist/chunk-MWUS3A7C.mjs.map +0 -1
- package/dist/core-RDMPQV6U.mjs +0 -3
|
@@ -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
|
}
|
|
@@ -391,12 +392,12 @@ interface Recipe {
|
|
|
391
392
|
}
|
|
392
393
|
interface TriggerRecipeChainOptions {
|
|
393
394
|
roomId?: string;
|
|
394
|
-
context?:
|
|
395
|
+
context?: any;
|
|
395
396
|
}
|
|
396
397
|
interface CollectRecipeResult {
|
|
397
398
|
success: boolean;
|
|
398
399
|
runId: string;
|
|
399
|
-
rewards:
|
|
400
|
+
rewards: any;
|
|
400
401
|
message: string;
|
|
401
402
|
}
|
|
402
403
|
interface ExecuteScopedRecipeResult {
|
|
@@ -416,265 +417,28 @@ interface GetBatchRecipeRequirements {
|
|
|
416
417
|
success: boolean;
|
|
417
418
|
results: RecipeRequirementResult[];
|
|
418
419
|
}
|
|
419
|
-
interface SimulationPersonalState {
|
|
420
|
-
inventory: Record<string, number | string>;
|
|
421
|
-
activeRuns: SimulationRunSummary[];
|
|
422
|
-
disabledRecipes: string[];
|
|
423
|
-
}
|
|
424
|
-
interface SimulationRoomActiveRecipe {
|
|
425
|
-
recipeId: string;
|
|
426
|
-
scope: 'room' | 'actor';
|
|
427
|
-
startedAt: number;
|
|
428
|
-
expiresAt: number;
|
|
429
|
-
commitmentEndsAt?: number;
|
|
430
|
-
}
|
|
431
|
-
interface SimulationRoomState {
|
|
432
|
-
activeRecipes: Record<string, SimulationRoomActiveRecipe>;
|
|
433
|
-
sharedAssets: Record<string, number | string>;
|
|
434
|
-
actors: Array<Record<string, unknown>>;
|
|
435
|
-
activeRuns: SimulationRunSummary[];
|
|
436
|
-
}
|
|
437
|
-
type SimulationState = SimulationPersonalState | SimulationRoomState;
|
|
438
|
-
interface SimulationSlotContainer {
|
|
439
|
-
entityId: string;
|
|
440
|
-
slots: Record<string, unknown>;
|
|
441
|
-
isOwned: boolean;
|
|
442
|
-
powerCalculationRecipe?: string;
|
|
443
|
-
}
|
|
444
|
-
interface SimulationAvailableItem {
|
|
445
|
-
entityId: string;
|
|
446
|
-
quantity: number;
|
|
447
|
-
metadata: Record<string, unknown>;
|
|
448
|
-
tags: string[];
|
|
449
|
-
isCompatible: boolean;
|
|
450
|
-
}
|
|
451
|
-
interface SimulationSlotValidationResult {
|
|
452
|
-
valid: boolean;
|
|
453
|
-
error?: string;
|
|
454
|
-
}
|
|
455
|
-
interface SimulationAssignment {
|
|
456
|
-
id: string;
|
|
457
|
-
containerId: string;
|
|
458
|
-
slotId: string;
|
|
459
|
-
itemId: string | null;
|
|
460
|
-
profileId: string;
|
|
461
|
-
appId: string;
|
|
462
|
-
createdAt: number;
|
|
463
|
-
metadata?: Record<string, unknown>;
|
|
464
|
-
}
|
|
465
|
-
interface SimulationSlotMutationResult {
|
|
466
|
-
success: boolean;
|
|
467
|
-
error?: string;
|
|
468
|
-
association?: SimulationAssignment;
|
|
469
|
-
}
|
|
470
|
-
interface SimulationBatchOperationAssign {
|
|
471
|
-
type: 'assign';
|
|
472
|
-
containerId: string;
|
|
473
|
-
slotId: string;
|
|
474
|
-
itemId: string;
|
|
475
|
-
}
|
|
476
|
-
interface SimulationBatchOperationRemove {
|
|
477
|
-
type: 'remove';
|
|
478
|
-
containerId: string;
|
|
479
|
-
slotId: string;
|
|
480
|
-
itemId?: string;
|
|
481
|
-
}
|
|
482
|
-
type SimulationBatchOperation = SimulationBatchOperationAssign | SimulationBatchOperationRemove;
|
|
483
|
-
interface SimulationBatchOperationResult {
|
|
484
|
-
success: boolean;
|
|
485
|
-
error?: string;
|
|
486
|
-
association?: SimulationAssignment;
|
|
487
|
-
operation: SimulationBatchOperation;
|
|
488
|
-
}
|
|
489
|
-
interface SimulationBatchOperationsResult {
|
|
490
|
-
success: boolean;
|
|
491
|
-
results: SimulationBatchOperationResult[];
|
|
492
|
-
affectedContainers: string[];
|
|
493
|
-
}
|
|
494
|
-
interface SimulationPowerPreview {
|
|
495
|
-
currentPower: number;
|
|
496
|
-
previewPower: number;
|
|
497
|
-
powerDelta: number;
|
|
498
|
-
breakdown: Record<string, number>;
|
|
499
|
-
}
|
|
500
|
-
interface ExecuteRecipeResponse {
|
|
501
|
-
success: boolean;
|
|
502
|
-
status?: string;
|
|
503
|
-
runId?: string;
|
|
504
|
-
expiresAt?: string;
|
|
505
|
-
queuePosition?: number;
|
|
506
|
-
outputs?: Record<string, number | string>;
|
|
507
|
-
data?: Record<string, unknown>;
|
|
508
|
-
message?: string;
|
|
509
|
-
amountRequested?: number;
|
|
510
|
-
amountFulfilled?: number;
|
|
511
|
-
partialSuccess?: boolean;
|
|
512
|
-
}
|
|
513
420
|
interface SimulationApi {
|
|
514
|
-
|
|
515
|
-
getStateAsync(roomId?: string): Promise<SimulationState>;
|
|
421
|
+
getStateAsync(roomId?: string): Promise<any>;
|
|
516
422
|
getConfigAsync(roomId?: string): Promise<VenusSimulationConfig>;
|
|
517
|
-
executeRecipeAsync(recipeId: string, inputs?:
|
|
518
|
-
getActiveRunsAsync(options?: GetActiveRunsOptions): Promise<
|
|
423
|
+
executeRecipeAsync(recipeId: string, inputs?: any, options?: ExecuteRecipeOptions): Promise<any>;
|
|
424
|
+
getActiveRunsAsync(options?: GetActiveRunsOptions): Promise<any>;
|
|
519
425
|
collectRecipeAsync(runId: string): Promise<CollectRecipeResult>;
|
|
520
|
-
executeScopedRecipeAsync(recipeId: string, entity: string, inputs?:
|
|
521
|
-
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>;
|
|
522
428
|
getAvailableRecipesAsync(options?: GetAvailableRecipesOptions): Promise<GetAvailableRecipesResult>;
|
|
523
429
|
getRecipeRequirementsAsync(recipe: Recipe): Promise<RecipeRequirementResult>;
|
|
524
430
|
getBatchRecipeRequirementsAsync(recipes: Recipe[]): Promise<GetBatchRecipeRequirements>;
|
|
525
|
-
resolveFieldValueAsync(entityId: string, fieldPath: string, entity?: string): Promise<
|
|
526
|
-
getEntityMetadataAsync(entityId: string): Promise<
|
|
527
|
-
getSlotContainersAsync(): Promise<
|
|
528
|
-
getSlotAssignmentsAsync(containerId: string): Promise<
|
|
529
|
-
assignItemToSlotAsync(containerId: string, slotId: string, itemId: string): Promise<
|
|
530
|
-
removeItemFromSlotAsync(containerId: string, slotId: string): Promise<
|
|
531
|
-
getAvailableItemsAsync(containerId: string, slotId: string): Promise<
|
|
532
|
-
calculatePowerPreviewAsync(containerId: string, slotId: string, candidateItemId: string): Promise<
|
|
533
|
-
validateSlotAssignmentAsync(containerId: string, slotId: string, itemId: string): Promise<
|
|
534
|
-
executeBatchOperationsAsync(operations: Array<
|
|
535
|
-
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
interface VenusRoomPayload extends Record<string, unknown> {
|
|
539
|
-
id: string;
|
|
540
|
-
name?: string;
|
|
541
|
-
currentPlayers?: string[];
|
|
542
|
-
maxPlayers?: number;
|
|
543
|
-
gameType?: string;
|
|
544
|
-
appId?: string;
|
|
545
|
-
type?: string;
|
|
546
|
-
createdBy?: string;
|
|
547
|
-
createdAt?: number;
|
|
548
|
-
updatedAt?: number;
|
|
549
|
-
isPrivate?: boolean;
|
|
550
|
-
status?: string;
|
|
551
|
-
customMetadata?: Record<string, unknown>;
|
|
552
|
-
admins?: string[];
|
|
553
|
-
roomCode?: string;
|
|
554
|
-
description?: string;
|
|
555
|
-
data?: Record<string, unknown>;
|
|
556
|
-
version?: string;
|
|
557
|
-
}
|
|
558
|
-
declare class VenusRoom {
|
|
559
|
-
readonly id: string;
|
|
560
|
-
name?: string;
|
|
561
|
-
players: string[];
|
|
562
|
-
maxPlayers?: number;
|
|
563
|
-
gameType?: string;
|
|
564
|
-
appId?: string;
|
|
565
|
-
type?: string;
|
|
566
|
-
createdBy?: string;
|
|
567
|
-
createdAt?: number;
|
|
568
|
-
updatedAt?: number;
|
|
569
|
-
isPrivate?: boolean;
|
|
570
|
-
status?: string;
|
|
571
|
-
customMetadata: Record<string, unknown>;
|
|
572
|
-
admins: string[];
|
|
573
|
-
roomCode?: string;
|
|
574
|
-
description?: string;
|
|
575
|
-
data: Record<string, unknown>;
|
|
576
|
-
version?: string;
|
|
577
|
-
constructor(roomData: VenusRoomPayload);
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
interface CreateRoomOptions {
|
|
581
|
-
maxPlayers?: number;
|
|
582
|
-
gameType?: string;
|
|
583
|
-
isPrivate?: boolean;
|
|
584
|
-
roomCode?: string;
|
|
585
|
-
name?: string;
|
|
586
|
-
description?: string;
|
|
587
|
-
customMetadata?: Record<string, unknown>;
|
|
588
|
-
data?: Record<string, unknown>;
|
|
589
|
-
}
|
|
590
|
-
interface JoinRoomMatchCriteria {
|
|
591
|
-
isPrivate?: boolean;
|
|
592
|
-
hasSpace?: boolean;
|
|
593
|
-
gameType?: string;
|
|
594
|
-
[key: string]: unknown;
|
|
595
|
-
}
|
|
596
|
-
interface JoinOrCreateRoomOptions {
|
|
597
|
-
matchCriteria?: JoinRoomMatchCriteria;
|
|
598
|
-
createOptions: CreateRoomOptions;
|
|
599
|
-
}
|
|
600
|
-
interface JoinOrCreateResult {
|
|
601
|
-
action: 'created' | 'joined';
|
|
602
|
-
room: VenusRoom;
|
|
603
|
-
playersJoined: number;
|
|
604
|
-
}
|
|
605
|
-
interface ListRoomsOptions {
|
|
606
|
-
includeArchived?: boolean;
|
|
607
|
-
}
|
|
608
|
-
interface RoomDataUpdate {
|
|
609
|
-
type: 'H5_ROOM_DATA_UPDATED';
|
|
610
|
-
roomId: string;
|
|
611
|
-
roomData: Record<string, unknown>;
|
|
612
|
-
timestamp?: number;
|
|
613
|
-
}
|
|
614
|
-
type RoomMessageEventType = 'H5_ROOM_MESSAGE_RECEIVED' | 'H5_ROOM_MESSAGE_UPDATED' | 'H5_ROOM_MESSAGE_DELETED';
|
|
615
|
-
interface RoomMessageEvent {
|
|
616
|
-
type: RoomMessageEventType;
|
|
617
|
-
roomId: string;
|
|
618
|
-
message: Record<string, unknown>;
|
|
619
|
-
timestamp?: number;
|
|
620
|
-
}
|
|
621
|
-
interface ProposedMoveEvent {
|
|
622
|
-
type: 'app:h5:proposedMoveValidationUpdated';
|
|
623
|
-
roomId: string;
|
|
624
|
-
proposedMoveData: Record<string, unknown>;
|
|
625
|
-
proposedMoveId?: string;
|
|
626
|
-
changeType?: string;
|
|
627
|
-
timestamp?: number;
|
|
628
|
-
}
|
|
629
|
-
interface RoomSubscriptionOptions {
|
|
630
|
-
onData?: (event: RoomDataUpdate) => void;
|
|
631
|
-
onMessages?: (event: RoomMessageEvent) => void;
|
|
632
|
-
onGameEvents?: (event: ProposedMoveEvent) => void;
|
|
633
|
-
}
|
|
634
|
-
interface ProposeMoveRequest {
|
|
635
|
-
gameSpecificState: Record<string, unknown>;
|
|
636
|
-
moveType: string;
|
|
637
|
-
clientContext?: Record<string, unknown>;
|
|
638
|
-
clientProposalId?: string;
|
|
639
|
-
}
|
|
640
|
-
interface ProposeMoveResult {
|
|
641
|
-
proposedMoveId: string;
|
|
642
|
-
}
|
|
643
|
-
interface ValidateMoveVerdict {
|
|
644
|
-
isValid: boolean;
|
|
645
|
-
reason?: string | null;
|
|
646
|
-
validatorId?: string | null;
|
|
647
|
-
}
|
|
648
|
-
interface ValidateMoveResult {
|
|
649
|
-
success: boolean;
|
|
650
|
-
moveId: string;
|
|
651
|
-
isValid: boolean;
|
|
652
|
-
reason?: string | null;
|
|
653
|
-
}
|
|
654
|
-
interface UpdateRoomDataOptions {
|
|
655
|
-
merge?: boolean;
|
|
656
|
-
}
|
|
657
|
-
interface RoomMessageRequest {
|
|
658
|
-
message: Record<string, unknown>;
|
|
659
|
-
metadata?: Record<string, unknown>;
|
|
660
|
-
}
|
|
661
|
-
interface StartRoomGameOptions {
|
|
662
|
-
gameConfig?: Record<string, unknown>;
|
|
663
|
-
turnOrder?: string[] | null;
|
|
664
|
-
}
|
|
665
|
-
interface RoomsApi {
|
|
666
|
-
createRoomAsync(options: CreateRoomOptions): Promise<VenusRoom>;
|
|
667
|
-
joinOrCreateRoomAsync(options: JoinOrCreateRoomOptions): Promise<JoinOrCreateResult>;
|
|
668
|
-
joinRoomByCodeAsync(roomCode: string): Promise<VenusRoom>;
|
|
669
|
-
getUserRoomsAsync(options?: ListRoomsOptions): Promise<VenusRoom[]>;
|
|
670
|
-
subscribeAsync(room: VenusRoom, options?: RoomSubscriptionOptions): Promise<() => void>;
|
|
671
|
-
updateRoomDataAsync(room: VenusRoom, updates: Record<string, unknown>, options?: UpdateRoomDataOptions): Promise<void>;
|
|
672
|
-
getRoomDataAsync(room: VenusRoom): Promise<Record<string, unknown>>;
|
|
673
|
-
sendRoomMessageAsync(room: VenusRoom, message: RoomMessageRequest): Promise<string>;
|
|
674
|
-
leaveRoomAsync(room: VenusRoom): Promise<void>;
|
|
675
|
-
startRoomGameAsync(room: VenusRoom, options?: StartRoomGameOptions): Promise<void>;
|
|
676
|
-
proposeMoveAsync(room: VenusRoom, request: ProposeMoveRequest): Promise<ProposeMoveResult>;
|
|
677
|
-
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>;
|
|
678
442
|
}
|
|
679
443
|
|
|
680
444
|
interface VenusMessage {
|
|
@@ -765,6 +529,83 @@ declare class VenusTransport implements RpcTransport {
|
|
|
765
529
|
private notifyVenusMessageReceived;
|
|
766
530
|
}
|
|
767
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
|
+
|
|
768
609
|
interface LoggingApi {
|
|
769
610
|
logDebug(message: string, ...args: any[]): void;
|
|
770
611
|
logError(message: string, ...args: any[]): void;
|
|
@@ -773,6 +614,7 @@ interface LoggingApi {
|
|
|
773
614
|
interface SharedAssetsApi {
|
|
774
615
|
loadCharactersBundle(): Promise<ArrayBuffer>;
|
|
775
616
|
loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
|
|
617
|
+
loadLibraryCode(libraryKey: string): Promise<string>;
|
|
776
618
|
}
|
|
777
619
|
|
|
778
620
|
declare class RpcSharedAssetsApi implements SharedAssetsApi {
|
|
@@ -781,6 +623,7 @@ declare class RpcSharedAssetsApi implements SharedAssetsApi {
|
|
|
781
623
|
constructor(rpcClient: RpcClient, venusApi: VenusAPI);
|
|
782
624
|
loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
|
|
783
625
|
loadCharactersBundle(): Promise<ArrayBuffer>;
|
|
626
|
+
loadLibraryCode(libraryKey: string): Promise<string>;
|
|
784
627
|
}
|
|
785
628
|
interface LoadEmbeddedAssetsRequest {
|
|
786
629
|
assetKey: string;
|
|
@@ -1145,72 +988,23 @@ interface RecipeRequirementResult {
|
|
|
1145
988
|
recipeId: string;
|
|
1146
989
|
entity: string | null;
|
|
1147
990
|
amount?: number;
|
|
1148
|
-
inputs: Record<string,
|
|
991
|
+
inputs: Record<string, any>;
|
|
1149
992
|
canAfford: boolean;
|
|
1150
993
|
disabled: boolean;
|
|
1151
994
|
}
|
|
1152
|
-
interface
|
|
1153
|
-
|
|
1154
|
-
recipeId: string;
|
|
1155
|
-
status: string;
|
|
1156
|
-
startTime: number;
|
|
1157
|
-
expiresAt: number;
|
|
1158
|
-
entity?: string;
|
|
1159
|
-
inputs?: Record<string, number | string>;
|
|
1160
|
-
outputs?: Record<string, number | string>;
|
|
1161
|
-
commitmentEndsAt?: number;
|
|
1162
|
-
participantCount?: number;
|
|
1163
|
-
}
|
|
1164
|
-
type VenusSimulationStateResponse = SimulationPersonalState | SimulationRoomState;
|
|
1165
|
-
type SimulationUpdateType = 'entity' | 'activeRuns' | 'snapshot';
|
|
1166
|
-
interface SimulationUpdateBase {
|
|
1167
|
-
timestamp: number;
|
|
1168
|
-
reason?: 'recipe_completed' | 'auto_restart' | 'manual_update' | 'state_sync';
|
|
1169
|
-
}
|
|
1170
|
-
interface SimulationEntityUpdate extends SimulationUpdateBase {
|
|
1171
|
-
type: 'entity';
|
|
1172
|
-
entities: Array<{
|
|
1173
|
-
entityId: string;
|
|
1174
|
-
quantity: number | string;
|
|
1175
|
-
}>;
|
|
1176
|
-
}
|
|
1177
|
-
interface SimulationActiveRunsUpdate extends SimulationUpdateBase {
|
|
1178
|
-
type: 'activeRuns';
|
|
995
|
+
interface VenusSimulationState {
|
|
996
|
+
inventory: Record<string, number | string>;
|
|
1179
997
|
activeRuns: Array<{
|
|
1180
998
|
id: string;
|
|
1181
999
|
recipeId: string;
|
|
1182
1000
|
status: string;
|
|
1183
1001
|
startTime: number;
|
|
1184
1002
|
expiresAt: number;
|
|
1185
|
-
entity?: string;
|
|
1186
1003
|
inputs?: Record<string, number | string>;
|
|
1187
1004
|
outputs?: Record<string, number | string>;
|
|
1188
|
-
}>;
|
|
1189
|
-
}
|
|
1190
|
-
interface SimulationSnapshotUpdate extends SimulationUpdateBase {
|
|
1191
|
-
type: 'snapshot';
|
|
1192
|
-
entities?: Array<{
|
|
1193
|
-
entityId: string;
|
|
1194
|
-
quantity: number | string;
|
|
1195
|
-
}>;
|
|
1196
|
-
activeRuns?: Array<{
|
|
1197
|
-
id: string;
|
|
1198
|
-
recipeId: string;
|
|
1199
|
-
status: string;
|
|
1200
|
-
startTime: number;
|
|
1201
|
-
expiresAt: number;
|
|
1202
1005
|
entity?: string;
|
|
1203
|
-
inputs?: Record<string, number | string>;
|
|
1204
|
-
outputs?: Record<string, number | string>;
|
|
1205
1006
|
}>;
|
|
1206
|
-
|
|
1207
|
-
type SimulationUpdateData = SimulationEntityUpdate | SimulationActiveRunsUpdate | SimulationSnapshotUpdate;
|
|
1208
|
-
interface SimulationSubscribeOptions {
|
|
1209
|
-
entities?: string[];
|
|
1210
|
-
tags?: string[];
|
|
1211
|
-
activeRuns?: boolean;
|
|
1212
|
-
roomId?: string;
|
|
1213
|
-
onUpdate: (data: SimulationUpdateData) => void;
|
|
1007
|
+
disabledRecipes: string[];
|
|
1214
1008
|
}
|
|
1215
1009
|
interface VenusSimulationEffect {
|
|
1216
1010
|
type: string;
|
|
@@ -1264,40 +1058,33 @@ interface RecipeRequirementQuery {
|
|
|
1264
1058
|
interface BatchRecipeRequirementsResult {
|
|
1265
1059
|
success: boolean;
|
|
1266
1060
|
results: RecipeRequirementResult[];
|
|
1267
|
-
errors?: Array<
|
|
1061
|
+
errors?: Array<any>;
|
|
1268
1062
|
}
|
|
1269
|
-
interface
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
roomId?: string
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
queuePosition?: number;
|
|
1295
|
-
outputs?: Record<string, number | string>;
|
|
1296
|
-
data?: Record<string, unknown>;
|
|
1297
|
-
message?: string;
|
|
1298
|
-
amountRequested?: number;
|
|
1299
|
-
amountFulfilled?: number;
|
|
1300
|
-
partialSuccess?: boolean;
|
|
1063
|
+
interface VenusSimulationAPI {
|
|
1064
|
+
isEnabled(): boolean;
|
|
1065
|
+
getStateAsync(options?: {
|
|
1066
|
+
roomId?: string;
|
|
1067
|
+
}): Promise<VenusSimulationState>;
|
|
1068
|
+
getConfigAsync(): Promise<VenusSimulationConfig>;
|
|
1069
|
+
executeRecipeAsync(recipeId: string, inputs?: Record<string, any>, options?: any): Promise<any>;
|
|
1070
|
+
executeScopedRecipeAsync(recipeId: string, entity: string, inputs?: Record<string, any>, roomId?: string, options?: any): Promise<any>;
|
|
1071
|
+
getActiveRunsAsync(): Promise<any[]>;
|
|
1072
|
+
collectRecipeAsync(runId: string): Promise<any>;
|
|
1073
|
+
triggerRecipeChainAsync(triggerRecipeId: string, context?: any, roomId?: string): Promise<any>;
|
|
1074
|
+
getRecipeRequirementsAsync(recipeId: string, entity?: string, amount?: number): Promise<RecipeRequirementResult>;
|
|
1075
|
+
getBatchRecipeRequirementsAsync(queries: RecipeRequirementQuery[]): Promise<BatchRecipeRequirementsResult>;
|
|
1076
|
+
getAvailableRecipesAsync(roomId?: string, includeActorRecipes?: boolean): Promise<Array<any>>;
|
|
1077
|
+
resolveFieldValueAsync(entityId: string, fieldPath: string, entity?: string): Promise<any>;
|
|
1078
|
+
getEntityMetadataAsync(entityId: string): Promise<any>;
|
|
1079
|
+
getSlotContainersAsync(): Promise<Array<any>>;
|
|
1080
|
+
getSlotAssignmentsAsync(containerId: string): Promise<Array<any>>;
|
|
1081
|
+
assignItemToSlotAsync(containerId: string, slotId: string, itemId: string): Promise<any>;
|
|
1082
|
+
removeItemFromSlotAsync(containerId: string, slotId: string): Promise<any>;
|
|
1083
|
+
getAvailableItemsAsync(containerId: string, slotId: string): Promise<Array<any>>;
|
|
1084
|
+
calculatePowerPreviewAsync(containerId: string, slotId: string, candidateItemId: string): Promise<any>;
|
|
1085
|
+
validateSlotAssignmentAsync(containerId: string, slotId: string, itemId: string): Promise<any>;
|
|
1086
|
+
executeBatchOperationsAsync(operations: Array<any>, validateOnly?: boolean): Promise<any>;
|
|
1087
|
+
sumContributions(contributions: Record<string, any>): Record<string, number>;
|
|
1301
1088
|
}
|
|
1302
1089
|
interface VenusConfig {
|
|
1303
1090
|
/**
|
|
@@ -1328,6 +1115,7 @@ interface VenusConfig {
|
|
|
1328
1115
|
orientation: string;
|
|
1329
1116
|
hapticsEnabled: boolean;
|
|
1330
1117
|
};
|
|
1118
|
+
theme?: Record<string, any>;
|
|
1331
1119
|
environment?: {
|
|
1332
1120
|
isDevelopment: boolean;
|
|
1333
1121
|
platform: string;
|
|
@@ -1383,7 +1171,7 @@ interface VenusAPI {
|
|
|
1383
1171
|
venus: any;
|
|
1384
1172
|
};
|
|
1385
1173
|
initializeAsync(options?: InitializationOptions): Promise<InitializationContext>;
|
|
1386
|
-
simulation:
|
|
1174
|
+
simulation: VenusSimulationAPI;
|
|
1387
1175
|
leaderboard: LeaderboardApi;
|
|
1388
1176
|
log(message: string, ...args: any[]): void;
|
|
1389
1177
|
error(message: string, ...args: any[]): void;
|
|
@@ -1544,7 +1332,7 @@ interface VenusAPI {
|
|
|
1544
1332
|
isOptional?: boolean;
|
|
1545
1333
|
}>>;
|
|
1546
1334
|
cleanupAssets(): void;
|
|
1547
|
-
assetLoader
|
|
1335
|
+
assetLoader?: {
|
|
1548
1336
|
getCached(url: string): string | null;
|
|
1549
1337
|
};
|
|
1550
1338
|
showAvatar3dEditorAsync(options: {
|
|
@@ -1565,22 +1353,43 @@ interface VenusAPI {
|
|
|
1565
1353
|
isInStack: boolean;
|
|
1566
1354
|
stackPosition: number;
|
|
1567
1355
|
};
|
|
1568
|
-
rooms:
|
|
1356
|
+
rooms: {
|
|
1357
|
+
create(options: any): Promise<VenusRoom>;
|
|
1358
|
+
joinOrCreate(options: any): Promise<{
|
|
1359
|
+
action: 'created' | 'joined';
|
|
1360
|
+
room: VenusRoom;
|
|
1361
|
+
playersJoined: number;
|
|
1362
|
+
}>;
|
|
1363
|
+
joinByCode(roomCode: string): Promise<VenusRoom>;
|
|
1364
|
+
list(includeArchived?: boolean): Promise<VenusRoom[]>;
|
|
1365
|
+
subscribeToRoom(room: VenusRoom, options: {
|
|
1366
|
+
onData?: (event: any) => void;
|
|
1367
|
+
onMessages?: (event: any) => void;
|
|
1368
|
+
onMoves?: (event: any) => void;
|
|
1369
|
+
onGameEvents?: (event: any) => void;
|
|
1370
|
+
}): () => void;
|
|
1371
|
+
proposeMove(room: VenusRoom, proposalPayload: {
|
|
1372
|
+
gameSpecificState: any;
|
|
1373
|
+
moveType: string;
|
|
1374
|
+
clientContext?: Record<string, any>;
|
|
1375
|
+
clientProposalId?: string;
|
|
1376
|
+
}): Promise<{
|
|
1377
|
+
proposedMoveId: string;
|
|
1378
|
+
}>;
|
|
1379
|
+
validateMove(room: VenusRoom, moveId: string, isValid: boolean, reason?: string, validatorId?: string): Promise<any>;
|
|
1380
|
+
updateRoomData(room: VenusRoom, updates: any, merge?: boolean): Promise<any>;
|
|
1381
|
+
getRoomData(room: VenusRoom): Promise<any>;
|
|
1382
|
+
sendRoomMessage(room: VenusRoom, messageData: any): Promise<string>;
|
|
1383
|
+
startRoomGame(room: VenusRoom, gameConfig?: any, turnOrder?: any): Promise<any>;
|
|
1384
|
+
leaveRoom(room: VenusRoom): Promise<any>;
|
|
1385
|
+
};
|
|
1569
1386
|
notifyCleanupComplete(): void;
|
|
1570
1387
|
RoomEvents: {
|
|
1571
1388
|
OPTIMISTIC_GAME_STATE_UPDATED: string;
|
|
1572
1389
|
PROPOSED_MOVE_VALIDATION_UPDATED: string;
|
|
1573
1390
|
};
|
|
1574
|
-
numbers
|
|
1575
|
-
|
|
1576
|
-
normalize(value: string | number | any): any;
|
|
1577
|
-
format: {
|
|
1578
|
-
incremental(value: any): string;
|
|
1579
|
-
};
|
|
1580
|
-
calculateGeometricSeriesCost(baseCost: number | string, multiplier: number, currentQuantity: number, purchaseAmount: number): any;
|
|
1581
|
-
calculateMaxAffordableDecimal(availableCash: number | string, baseCost: number | string, multiplier: number, currentQuantity: number): number;
|
|
1582
|
-
formatDecimalCurrency(decimalValue: any): string;
|
|
1583
|
-
Decimal: any;
|
|
1391
|
+
numbers?: {
|
|
1392
|
+
normalize(value: string | number): string;
|
|
1584
1393
|
};
|
|
1585
1394
|
iap: IapApi;
|
|
1586
1395
|
cdn: CdnApi;
|
|
@@ -1609,4 +1418,4 @@ interface AdsApi {
|
|
|
1609
1418
|
showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
|
|
1610
1419
|
}
|
|
1611
1420
|
|
|
1612
|
-
export { type
|
|
1421
|
+
export { type AwakeCallback as $, type ActionSheetOption as A, type BatchRecipeRequirementsResult as B, type ShowRewardedAdOptions as C, type ProfileApi as D, type CdnApi as E, type SubPath as F, type FetchBlobOptions as G, type Host as H, type ServerTimeData as I, type GetFutureTimeOptions as J, type AiApi as K, type AiChatCompletionRequest as L, type AiChatCompletionData as M, type NavigationApi as N, type HapticsApi as O, type Profile as P, type QuitOptions as Q, type RecipeRequirementResult as R, type StorageApi as S, type TimeApi as T, HapticFeedbackStyle as U, type VenusAPI as V, type FeaturesApi as W, type Experiment as X, type LifecycleApi as Y, type SleepCallback as Z, type Subscription as _, type VenusSimulationState as a, type RecipeInfo as a$, type PauseCallback as a0, type ResumeCallback as a1, type QuitCallback as a2, type SimulationApi as a3, type ExecuteRecipeOptions as a4, type CollectRecipeResult as a5, type GetActiveRunsOptions as a6, type ExecuteScopedRecipeResult as a7, type GetAvailableRecipesOptions as a8, type GetAvailableRecipesResult as a9, type AssetManifest as aA, type Avatar3dConfig as aB, type ShowEditorOptions as aC, type Avatar3dEdits as aD, type AdsApi as aE, type PostApi as aF, type RoomsApi as aG, type InitializationOptions as aH, type InitializationContext as aI, type HudInsets as aJ, type AiMessage as aK, type Asset as aL, type Category as aM, MockAvatarApi as aN, type TimeIntervalTriggerInput as aO, type NotificationTriggerInput as aP, type OnRequestCallback as aQ, type OnResponseCallback as aR, type OnNotificationCallback as aS, type RpcTransport as aT, type CreateRoomOptions as aU, type JoinOrCreateResult as aV, type RoomSubscriptionOptions as aW, type ProposeMovePayload as aX, type ProposeMoveResult as aY, type ValidateMoveResult as aZ, type ExecuteScopedRecipeOptions as a_, type Recipe as aa, type GetBatchRecipeRequirements as ab, type TriggerRecipeChainOptions as ac, VenusTransport as ad, type LoggingApi as ae, type IapApi as af, type SpendCurrencyOptions as ag, type LoadEmbeddedAssetsResponse as ah, type SharedAssetsApi as ai, type LeaderboardApi as aj, type ScoreToken as ak, type SubmitScoreParams as al, type SubmitScoreResult as am, type GetPagedScoresOptions as an, type PagedScoresResponse as ao, type PlayerRankOptions as ap, type PlayerRankResult as aq, type GetPodiumScoresOptions as ar, type PodiumScoresResponse as as, type PreloaderApi as at, type SocialApi as au, type ShareMetadata as av, type ShareLinkResult as aw, type SocialQRCodeOptions as ax, type QRCodeResult as ay, type Avatar3dApi as az, type VenusSimulationEffect as b, RpcSharedAssetsApi as b0, type LoadEmbeddedAssetsRequest as b1, type LeaderboardModeConfig as b2, type LeaderboardPeriodType as b3, type LeaderboardPeriodConfig as b4, type LeaderboardAntiCheatConfig as b5, type LeaderboardDisplaySettings as b6, type LeaderboardConfig as b7, type LeaderboardEntry as b8, type PodiumScoresContext as b9, createHost as ba, type VenusSimulationRecipe as c, type VenusSimulationConfig as d, type RecipeRequirementQuery as e, type VenusSimulationAPI as f, type VenusConfig as g, type VenusRoomsConfig as h, VenusRoom as i, type AnalyticsApi as j, type RpcRequest as k, type RpcResponse as l, type RpcNotification as m, RpcClient as n, type NavigationStackInfo as o, type PushAppOptions as p, type NotificationsApi as q, type ScheduleLocalNotification as r, type ScheduleNotificationOptions as s, type PopupsApi as t, type ActionSheetItem as u, type ShowActionSheetOptions as v, type ShowAlertOptions as w, type ShowConfirmOptions as x, type ShowToastOptions as y, type ShowInterstitialAdOptions as z };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __esm = (fn, res) => function __init() {
|
|
7
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
8
|
+
};
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23
|
+
|
|
24
|
+
export { __esm, __export, __publicField, __toCommonJS };
|
|
25
|
+
//# sourceMappingURL=chunk-2PDL7CQK.mjs.map
|
|
26
|
+
//# sourceMappingURL=chunk-2PDL7CQK.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-2PDL7CQK.mjs"}
|