@series-inc/venus-sdk 4.0.0 → 4.0.1-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 CHANGED
@@ -1,33 +1,33 @@
1
- # Venus SDK API
2
-
3
- Build connected HTML5 games that integrate deeply with the Venus platform. This package provides the client SDK used by hosted games as well as the local mock environment for development.
4
-
5
- ## Highlights
6
-
7
- - Typed APIs for Venus platform services (simulation, rooms, analytics, ads, and more)
8
- - Host-aware tooling including lifecycle hooks, safe-area utilities, and asset loading helpers
9
-
10
- ## Quick Start
11
-
12
- ### Installation
13
-
14
- ```bash
15
- npm install @series-inc/venus-sdk@latest
16
- ```
17
-
18
- ### Initialize
19
-
20
- ```typescript
21
- import { default as VenusAPI } from '@series-inc/venus-sdk/api'
22
-
23
- // Initialize the API
24
- await VenusAPI.initializeAsync()
25
- ```
26
-
27
- ## Documentation
28
-
29
- The complete Venus SDK manuals live on [Venus Docs](https://series-1.gitbook.io/getreel-docs). Start there for setup guides, API references, tutorials, and best practices.
30
-
31
- ## Support & Links
32
-
1
+ # Venus SDK API
2
+
3
+ Build connected HTML5 games that integrate deeply with the Venus platform. This package provides the client SDK used by hosted games as well as the local mock environment for development.
4
+
5
+ ## Highlights
6
+
7
+ - Typed APIs for Venus platform services (simulation, rooms, analytics, ads, and more)
8
+ - Host-aware tooling including lifecycle hooks, safe-area utilities, and asset loading helpers
9
+
10
+ ## Quick Start
11
+
12
+ ### Installation
13
+
14
+ ```bash
15
+ npm install @series-inc/venus-sdk@latest
16
+ ```
17
+
18
+ ### Initialize
19
+
20
+ ```typescript
21
+ import { default as VenusAPI } from '@series-inc/venus-sdk/api'
22
+
23
+ // Initialize the API
24
+ await VenusAPI.initializeAsync()
25
+ ```
26
+
27
+ ## Documentation
28
+
29
+ The complete Venus SDK manuals live on [Venus Docs](https://series-1.gitbook.io/getreel-docs). Start there for setup guides, API references, tutorials, and best practices.
30
+
31
+ ## Support & Links
32
+
33
33
  - [Join our Discord!](https://discord.gg/NcjhKQHx)
@@ -525,6 +525,19 @@ interface SimulationPowerPreview {
525
525
  powerDelta: number;
526
526
  breakdown: Record<string, number>;
527
527
  }
528
+ interface ResetStateOptions {
529
+ /** Optional recipe to run after reset (overrides lifecycle.onReset) */
530
+ initializeRecipe?: string;
531
+ }
532
+ interface ResetStateResult {
533
+ success: boolean;
534
+ /** Number of active runs that were cancelled */
535
+ clearedRuns: number;
536
+ /** Number of slot assignments that were deleted */
537
+ clearedSlots: number;
538
+ /** Recipe that was executed after reset (if any) */
539
+ recipeExecuted: string | null;
540
+ }
528
541
  interface ExecuteRecipeResponse {
529
542
  success: boolean;
530
543
  status?: string;
@@ -561,6 +574,12 @@ interface SimulationApi {
561
574
  validateSlotAssignmentAsync(containerId: string, slotId: string, itemId: string): Promise<SimulationSlotValidationResult>;
562
575
  executeBatchOperationsAsync(operations: Array<SimulationBatchOperation>, validateOnly?: boolean): Promise<SimulationBatchOperationsResult>;
563
576
  subscribeAsync(options: SimulationSubscribeOptions): Promise<() => void>;
577
+ /**
578
+ * Reset all simulation state for the current player.
579
+ * Clears inventory, cancels active runs, and removes slot assignments.
580
+ * Optionally runs an initialization recipe after reset.
581
+ */
582
+ resetStateAsync(options?: ResetStateOptions): Promise<ResetStateResult>;
564
583
  }
565
584
 
566
585
  declare const ROOM_GAME_PHASES: readonly ["waiting", "playing", "ended"];
@@ -1665,4 +1684,4 @@ interface AdsApi {
1665
1684
  showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
1666
1685
  }
1667
1686
 
1668
- 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 RoomEnvelopeResponse as bA, type RoomsEnvelopeResponse as bB, type JoinOrCreateRoomEnvelopeResponse as bC, type RecipeInfo as bD, type SimulationPersonalState as bE, type SimulationRoomActiveRecipe as bF, type SimulationRoomState as bG, type SimulationBatchOperationAssign as bH, type SimulationBatchOperationRemove as bI, type SimulationBatchOperationResult as bJ, RpcSharedAssetsApi as bK, type LoadEmbeddedAssetsRequest as bL, type LeaderboardModeConfig as bM, type LeaderboardPeriodType as bN, type LeaderboardPeriodConfig as bO, type LeaderboardAntiCheatConfig as bP, type LeaderboardDisplaySettings as bQ, type LeaderboardConfig as bR, type LeaderboardEntry as bS, type PodiumScoresContext as bT, type HudInsets as bU, createHost as bV, type Avatar3dConfig as ba, type ShowEditorOptions as bb, type Avatar3dEdits as bc, type AdsApi as bd, type InitializationContext as be, type InitializationOptions as bf, type AiMessage as bg, type Asset as bh, type Category as bi, MockAvatarApi as bj, type TimeIntervalTriggerInput as bk, type NotificationTriggerInput as bl, type OnRequestCallback as bm, type OnResponseCallback as bn, type OnNotificationCallback as bo, type RpcTransport as bp, type JoinRoomMatchCriteria as bq, type RoomMessageEventType as br, type RoomMessagePayload as bs, type ProposedMovePayload as bt, ROOM_GAME_PHASES as bu, type RoomGamePhase as bv, type VenusRoomRulesGameState as bw, type VenusRoomRules as bx, type VenusRoomCustomMetadata as by, type VenusRoomPayload as bz, type SimulationEntityUpdate as c, type SimulationActiveRunsUpdate as d, type SimulationSnapshotUpdate as e, type SimulationUpdateData as f, type SimulationSubscribeOptions as g, type VenusSimulationEffect as h, type VenusSimulationRecipe as i, type VenusSimulationConfig as j, type RecipeRequirementQuery as k, type VenusExecuteRecipeOptions as l, type VenusExecuteScopedRecipeOptions as m, type VenusAvailableRecipe as n, type VenusCollectRecipeResult as o, type VenusExecuteRecipeResult as p, VenusRoom as q, type RpcRequest as r, type RpcResponse as s, type RpcNotification as t, RpcClient as u, type StorageApi as v, type NavigationStackInfo as w, type PushAppOptions as x, type NotificationsApi as y, type ScheduleLocalNotification as z };
1687
+ 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 PagedScoresResponse 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 RoomDataUpdate as aA, type RoomMessageEvent as aB, type ProposedMoveEvent as aC, VenusTransport as aD, type RoomsApi as aE, type CreateRoomOptions as aF, type JoinOrCreateRoomOptions as aG, type JoinOrCreateResult as aH, type ListRoomsOptions as aI, type UpdateRoomDataOptions as aJ, type RoomMessageRequest as aK, type StartRoomGameOptions as aL, type ProposeMoveRequest as aM, type ProposeMoveResult as aN, type ValidateMoveVerdict as aO, type ValidateMoveResult as aP, type RoomSubscriptionOptions as aQ, type LoggingApi as aR, type IapApi as aS, type SpendCurrencyOptions as aT, type LoadEmbeddedAssetsResponse as aU, type SharedAssetsApi as aV, type LeaderboardApi as aW, type ScoreToken as aX, type SubmitScoreParams as aY, type SubmitScoreResult as aZ, type GetPagedScoresOptions 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 ResetStateOptions as aq, type ResetStateResult as ar, type GetActiveRunsOptions as as, type ExecuteScopedRecipeOptions as at, type ExecuteScopedRecipeResult as au, type GetAvailableRecipesOptions as av, type GetAvailableRecipesResult as aw, type Recipe as ax, type GetBatchRecipeRequirements as ay, type TriggerRecipeChainOptions as az, type SimulationUpdateType as b, type PlayerRankOptions as b0, type PlayerRankResult as b1, type GetPodiumScoresOptions as b2, type PodiumScoresResponse as b3, type PreloaderApi as b4, type SocialApi as b5, type ShareMetadata as b6, type ShareLinkResult as b7, type SocialQRCodeOptions as b8, type QRCodeResult as b9, type VenusRoomCustomMetadata as bA, type VenusRoomPayload as bB, type RoomEnvelopeResponse as bC, type RoomsEnvelopeResponse as bD, type JoinOrCreateRoomEnvelopeResponse as bE, type RecipeInfo as bF, type SimulationPersonalState as bG, type SimulationRoomActiveRecipe as bH, type SimulationRoomState as bI, type SimulationBatchOperationAssign as bJ, type SimulationBatchOperationRemove as bK, type SimulationBatchOperationResult as bL, RpcSharedAssetsApi as bM, type LoadEmbeddedAssetsRequest as bN, type LeaderboardModeConfig as bO, type LeaderboardPeriodType as bP, type LeaderboardPeriodConfig as bQ, type LeaderboardAntiCheatConfig as bR, type LeaderboardDisplaySettings as bS, type LeaderboardConfig as bT, type LeaderboardEntry as bU, type PodiumScoresContext as bV, type HudInsets as bW, createHost as bX, type Avatar3dApi as ba, type AssetManifest as bb, type Avatar3dConfig as bc, type ShowEditorOptions as bd, type Avatar3dEdits as be, type AdsApi as bf, type InitializationContext as bg, type InitializationOptions as bh, type AiMessage as bi, type Asset as bj, type Category as bk, MockAvatarApi as bl, type TimeIntervalTriggerInput as bm, type NotificationTriggerInput as bn, type OnRequestCallback as bo, type OnResponseCallback as bp, type OnNotificationCallback as bq, type RpcTransport as br, type JoinRoomMatchCriteria as bs, type RoomMessageEventType as bt, type RoomMessagePayload as bu, type ProposedMovePayload as bv, ROOM_GAME_PHASES as bw, type RoomGamePhase as bx, type VenusRoomRulesGameState as by, type VenusRoomRules 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 };