@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 +32 -32
- package/dist/{AdsApi-DXn_TaWi.d.ts → AdsApi-BnxLfQ-v.d.ts} +20 -1
- package/dist/{chunk-5XBFJDPG.js → chunk-34YNUZ3X.js} +1890 -29
- package/dist/chunk-34YNUZ3X.js.map +1 -0
- package/dist/{chunk-RJ67JK7Z.js → chunk-3APM3V2M.js} +2 -2
- package/dist/chunk-3APM3V2M.js.map +1 -0
- package/dist/chunk-O3JPKPJ2.js +12 -0
- package/dist/chunk-O3JPKPJ2.js.map +1 -0
- package/dist/core-NMKO2UFW.js +3 -0
- package/dist/{core-OSRBQAXR.js.map → core-NMKO2UFW.js.map} +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +3 -4
- package/dist/venus-api/index.d.ts +12 -12
- package/dist/venus-api/index.js +3 -4
- package/dist/venus-api/index.js.map +1 -1
- package/dist/vite/index.css +1 -1
- package/dist/vite/index.css.map +1 -1
- package/dist/vite/index.js +2 -2
- package/dist/vite/index.js.map +1 -1
- package/dist/webview/index.js +1 -1
- package/package.json +70 -70
- package/dist/SandboxHost-WLGZNAWM.js +0 -2031
- package/dist/SandboxHost-WLGZNAWM.js.map +0 -1
- package/dist/chunk-5XBFJDPG.js.map +0 -1
- package/dist/chunk-5XX6DE7Y.js +0 -1890
- package/dist/chunk-5XX6DE7Y.js.map +0 -1
- package/dist/chunk-PITOHCJG.js +0 -12
- package/dist/chunk-PITOHCJG.js.map +0 -1
- package/dist/chunk-RJ67JK7Z.js.map +0 -1
- package/dist/core-OSRBQAXR.js +0 -3
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
|
|
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 };
|