@series-inc/venus-sdk 3.3.0 → 3.4.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.
Files changed (41) hide show
  1. package/dist/{AdsApi-OXtzPhiB.d.mts → AdsApi-CrobHGGD.d.ts} +2 -1
  2. package/dist/{chunk-QABXMFND.mjs → chunk-3APM3V2M.js} +2 -2
  3. package/dist/chunk-3APM3V2M.js.map +1 -0
  4. package/dist/{chunk-UXY5CKKG.mjs → chunk-3UPXLWK7.js} +3 -3
  5. package/dist/chunk-3UPXLWK7.js.map +1 -0
  6. package/dist/{chunk-FFDRA6ET.mjs → chunk-RUYSUI26.js} +176 -179
  7. package/dist/chunk-RUYSUI26.js.map +1 -0
  8. package/dist/core-NMKO2UFW.js +3 -0
  9. package/dist/{core-62LWDHN7.mjs.map → core-NMKO2UFW.js.map} +1 -1
  10. package/dist/index.d.ts +3 -2
  11. package/dist/{index.mjs → index.js} +5 -6
  12. package/dist/{index.mjs.map → index.js.map} +1 -1
  13. package/dist/venus-api/index.d.ts +2 -2
  14. package/dist/venus-api/{index.mjs → index.js} +20 -34
  15. package/dist/venus-api/index.js.map +1 -0
  16. package/dist/vite/{index.mjs → index.js} +2 -2
  17. package/dist/vite/index.js.map +1 -0
  18. package/dist/webview/index.js +3 -0
  19. package/dist/webview/{index.mjs.map → index.js.map} +1 -1
  20. package/package.json +13 -18
  21. package/dist/AdsApi-OXtzPhiB.d.ts +0 -1551
  22. package/dist/chunk-FFDRA6ET.mjs.map +0 -1
  23. package/dist/chunk-NSSMTXJJ.mjs +0 -7
  24. package/dist/chunk-NSSMTXJJ.mjs.map +0 -1
  25. package/dist/chunk-QABXMFND.mjs.map +0 -1
  26. package/dist/chunk-UXY5CKKG.mjs.map +0 -1
  27. package/dist/core-62LWDHN7.mjs +0 -4
  28. package/dist/index.cjs +0 -5273
  29. package/dist/index.cjs.map +0 -1
  30. package/dist/index.d.mts +0 -904
  31. package/dist/venus-api/index.cjs +0 -7186
  32. package/dist/venus-api/index.cjs.map +0 -1
  33. package/dist/venus-api/index.d.mts +0 -15
  34. package/dist/venus-api/index.mjs.map +0 -1
  35. package/dist/vite/index.cjs +0 -554
  36. package/dist/vite/index.cjs.map +0 -1
  37. package/dist/vite/index.mjs.map +0 -1
  38. package/dist/webview/index.cjs +0 -15
  39. package/dist/webview/index.cjs.map +0 -1
  40. package/dist/webview/index.d.mts +0 -15
  41. package/dist/webview/index.mjs +0 -4
package/dist/index.d.mts DELETED
@@ -1,904 +0,0 @@
1
- import { A as AnalyticsApi, r as RpcRequest, s as RpcResponse, t as RpcNotification, u as RpcClient, V as VenusAPI, H as Host, v as StorageApi, N as NavigationApi, Q as QuitOptions, w as NavigationStackInfo, x as PushAppOptions, y as NotificationsApi, z as ScheduleLocalNotification, C as ScheduleNotificationOptions, D as PopupsApi, E as ShowToastOptions, F as ShowInterstitialAdOptions, G as ShowRewardedAdOptions, I as ProfileApi, P as Profile, J as DeviceApi, K as DeviceInfo, L as EnvironmentApi, M as EnvironmentInfo, O as SystemApi, T as SafeArea, U as CdnApi, W as SubPath, X as FetchBlobOptions, Y as TimeApi, Z as ServerTimeData, _ as GetFutureTimeOptions, $ as AiApi, a0 as AiChatCompletionRequest, a1 as AiChatCompletionData, a2 as HapticsApi, a3 as HapticFeedbackStyle, a4 as FeaturesApi, a5 as Experiment, a6 as LifecycleApi, a7 as SleepCallback, a8 as Subscription, a9 as AwakeCallback, aa as PauseCallback, ab as ResumeCallback, ac as QuitCallback, ad as SimulationApi, ae as SimulationSlotValidationResult, g as SimulationSubscribeOptions, af as SimulationBatchOperation, ag as SimulationBatchOperationsResult, ah as SimulationAvailableItem, ai as SimulationPowerPreview, aj as SimulationSlotMutationResult, ak as SimulationSlotContainer, al as SimulationAssignment, am as SimulationState, j as VenusSimulationConfig, an as ExecuteRecipeOptions, ao as ExecuteRecipeResponse, ap as CollectRecipeResult, aq as GetActiveRunsOptions, S as SimulationRunSummary, ar as ExecuteScopedRecipeOptions, as as ExecuteScopedRecipeResult, at as GetAvailableRecipesOptions, au as GetAvailableRecipesResult, av as Recipe, R as RecipeRequirementResult, aw as GetBatchRecipeRequirements, ax as TriggerRecipeChainOptions, ay as RoomDataUpdate, az as RoomMessageEvent, aA as ProposedMoveEvent, aB as VenusTransport, aC as RoomsApi, aD as CreateRoomOptions, q as VenusRoom, aE as JoinOrCreateRoomOptions, aF as JoinOrCreateResult, aG as ListRoomsOptions, aH as UpdateRoomDataOptions, aI as RoomMessageRequest, aJ as StartRoomGameOptions, aK as ProposeMoveRequest, aL as ProposeMoveResult, aM as ValidateMoveVerdict, aN as ValidateMoveResult, aO as RoomSubscriptionOptions, aP as LoggingApi, aQ as IapApi, aR as SpendCurrencyOptions, aS as LoadEmbeddedAssetsResponse, aT as SharedAssetsApi, aU as LeaderboardApi, aV as ScoreToken, aW as SubmitScoreParams, aX as SubmitScoreResult, aY as GetPagedScoresOptions, aZ as PagedScoresResponse, a_ as PlayerRankOptions, a$ as PlayerRankResult, b0 as GetPodiumScoresOptions, b1 as PodiumScoresResponse, b2 as PreloaderApi, b3 as SocialApi, b4 as ShareMetadata, b5 as ShareLinkResult, b6 as SocialQRCodeOptions, b7 as QRCodeResult, b8 as Avatar3dApi, b9 as AssetManifest, ba as Avatar3dConfig, bb as ShowEditorOptions, bc as Avatar3dEdits, bd as AdsApi, be as InitializationOptions, bf as InitializationContext } from './AdsApi-OXtzPhiB.mjs';
2
- export { bg as AiMessage, bh as Asset, bi as Category, bK as HudInsets, bq as JoinRoomMatchCriteria, bF as LeaderboardAntiCheatConfig, bH as LeaderboardConfig, bG as LeaderboardDisplaySettings, bI as LeaderboardEntry, bC as LeaderboardModeConfig, bE as LeaderboardPeriodConfig, bD as LeaderboardPeriodType, bB as LoadEmbeddedAssetsRequest, bj as MockAvatarApi, bl as NotificationTriggerInput, bo as OnNotificationCallback, bm as OnRequestCallback, bn as OnResponseCallback, bJ as PodiumScoresContext, bt as RecipeInfo, br as RoomMessageEventType, bA as RpcSharedAssetsApi, bp as RpcTransport, bx as SimulationBatchOperationAssign, by as SimulationBatchOperationRemove, bz as SimulationBatchOperationResult, bu as SimulationPersonalState, bv as SimulationRoomActiveRecipe, bw as SimulationRoomState, bk as TimeIntervalTriggerInput, bs as VenusRoomPayload, bL as createHost } from './AdsApi-OXtzPhiB.mjs';
3
- export { WEBVIEW_LIBRARY_SHIM_SOURCE, getWebviewLibraryShimSource } from './webview/index.mjs';
4
-
5
- declare class MockAnalyticsApi implements AnalyticsApi {
6
- recordCustomEvent(eventName: string, payload: Record<string, any>): Promise<void>;
7
- trackFunnelStep(stepNumber: number, stepName: string, funnelName?: string): Promise<void>;
8
- }
9
-
10
- type RpcMessage = RpcRequest | RpcResponse | RpcNotification;
11
-
12
- declare class RpcAnalyticsApi implements AnalyticsApi {
13
- private readonly rpcClient;
14
- constructor(rpcClient: RpcClient);
15
- recordCustomEvent(eventName: string, payload: Record<string, any>): Promise<void>;
16
- trackFunnelStep(stepNumber: number, stepName: string, funnelName?: string): Promise<void>;
17
- }
18
-
19
- declare function initializeAnalytics(venusApiInstance: VenusAPI, host: Host): void;
20
-
21
- type StorageType = 'globalStorage' | 'deviceCache' | 'appStorage';
22
- declare function createMockStorageApi(storageType: StorageType, appUrl?: string): MockStorageApi;
23
- declare class MockStorageApi implements StorageApi {
24
- private readonly prefix;
25
- private readonly syncDelay;
26
- private readonly orderStorageKey;
27
- constructor(prefix: string, syncDelay: number);
28
- clear(): Promise<void>;
29
- getAllItems(): Promise<string[]>;
30
- getItem(key: string): Promise<string | null>;
31
- key(index: number): Promise<string | null>;
32
- length(): Promise<number>;
33
- removeItem(key: string): Promise<void>;
34
- setItem(key: string, item: string): Promise<void>;
35
- setMultipleItems(entries: {
36
- key: string;
37
- value: string;
38
- }[]): Promise<void>;
39
- removeMultipleItems(keys: string[]): Promise<void>;
40
- private buildKey;
41
- private extractKey;
42
- private keys;
43
- private simulateSyncDelay;
44
- private readOrder;
45
- private normalizeOrder;
46
- private rebuildOrderFromStorage;
47
- private upsertOrder;
48
- private bulkUpsertOrder;
49
- private removeFromOrder;
50
- private bulkRemoveFromOrder;
51
- private writeOrder;
52
- private clearOrder;
53
- private dedupeKeys;
54
- }
55
-
56
- interface MethodIds {
57
- clear: string;
58
- getItem: string;
59
- getKey: string;
60
- length: string;
61
- removeItem: string;
62
- setItem: string;
63
- getAllItems?: string;
64
- removeMultipleItems?: string;
65
- setMultipleItems?: string;
66
- }
67
- declare class RpcStorageApi implements StorageApi {
68
- private readonly rpcClient;
69
- private readonly methodIds;
70
- constructor(rpcClient: RpcClient, methodIds: MethodIds);
71
- clear(): Promise<void>;
72
- getItem(key: string): Promise<string | null>;
73
- setItem(key: string, value: string): Promise<void>;
74
- key(index: number): Promise<string | null>;
75
- length(): Promise<number>;
76
- removeItem(key: string): Promise<void>;
77
- removeMultipleItems(keys: string[]): Promise<void>;
78
- getAllItems(): Promise<string[]>;
79
- setMultipleItems(items: {
80
- key: string;
81
- value: string;
82
- }[]): Promise<void>;
83
- }
84
-
85
- declare function initializeStorage(venusApiInstance: VenusAPI, host: Host): void;
86
-
87
- declare class MockNavigationApi implements NavigationApi {
88
- private readonly venusApi;
89
- constructor(venusApi: VenusAPI);
90
- requestPopOrQuit(options?: QuitOptions): Promise<boolean>;
91
- getStackInfo(): NavigationStackInfo;
92
- popApp(): Promise<void>;
93
- pushApp(appId: string, options?: PushAppOptions): Promise<void>;
94
- private log;
95
- }
96
-
97
- declare class RpcNavigationApi implements NavigationApi {
98
- private readonly venusApi;
99
- private readonly rpcClient;
100
- constructor(rpcClient: RpcClient, venusApi: VenusAPI);
101
- requestPopOrQuit(options?: QuitOptions): Promise<boolean>;
102
- getStackInfo(): NavigationStackInfo;
103
- popApp(): Promise<void>;
104
- pushApp(appId: string, options?: PushAppOptions): Promise<void>;
105
- }
106
-
107
- declare function initializeStackNavigation(venusApi: VenusAPI, host: Host): void;
108
-
109
- declare class MockNotificationsApi implements NotificationsApi {
110
- private readonly venusApi;
111
- constructor(venusApi: VenusAPI);
112
- cancelNotification(notificationId: string): Promise<boolean>;
113
- getAllScheduledLocalNotifications(): Promise<ScheduleLocalNotification[]>;
114
- isLocalNotificationsEnabled(): Promise<boolean>;
115
- scheduleAsync(title: string, body: string, seconds: number, notificationId?: string, options?: ScheduleNotificationOptions): Promise<string | null>;
116
- setLocalNotificationsEnabled(enabled: boolean): Promise<boolean>;
117
- }
118
-
119
- declare class RpcNotificationsApi implements NotificationsApi {
120
- private readonly rpcClient;
121
- constructor(rpcClient: RpcClient);
122
- scheduleAsync(title: string, body: string, seconds: number, notificationId?: string, options?: ScheduleNotificationOptions): Promise<string | null>;
123
- cancelNotification(id: string): Promise<boolean>;
124
- getAllScheduledLocalNotifications(): Promise<ScheduleLocalNotification[]>;
125
- isLocalNotificationsEnabled(): Promise<boolean>;
126
- setLocalNotificationsEnabled(enabled: boolean): Promise<boolean>;
127
- }
128
- type NotificationContent = {
129
- title: string | null;
130
- subtitle: string | null;
131
- body: string | null;
132
- data?: Record<string, any>;
133
- };
134
-
135
- declare function initializeLocalNotifications(venusApi: VenusAPI, host: Host): void;
136
-
137
- declare class RpcPopupsApi implements PopupsApi {
138
- private readonly rpcClient;
139
- constructor(rpcClient: RpcClient);
140
- showToast(message: string, options?: ShowToastOptions): Promise<boolean>;
141
- }
142
- interface ShowToastResponse {
143
- shown: boolean;
144
- actionTriggered: boolean;
145
- }
146
-
147
- interface MockActionSheetItem {
148
- id?: string;
149
- label: string;
150
- icon?: string;
151
- }
152
- interface MockActionSheetOptions {
153
- title?: string;
154
- message?: string;
155
- cancelButtonText?: string;
156
- disableCancel?: boolean;
157
- }
158
- interface MockOverlay {
159
- container: HTMLElement;
160
- elements: OverlayElements;
161
- adOverlay: HTMLElement;
162
- actionSheetOverlay: HTMLElement;
163
- appVisibilityState: 'visible' | 'hidden';
164
- showAdOverlay: (options?: ShowInterstitialAdOptions | ShowRewardedAdOptions) => Promise<boolean>;
165
- showActionSheet: (items: MockActionSheetItem[], options?: MockActionSheetOptions) => Promise<string | number | null>;
166
- }
167
- interface OverlayElements {
168
- menuButton: HTMLElement;
169
- }
170
-
171
- declare class MockPopupsApi implements PopupsApi {
172
- private readonly overlay;
173
- constructor(override: MockOverlay);
174
- showToast(message: string, options?: ShowToastOptions): Promise<boolean>;
175
- }
176
-
177
- declare function initializePopups(venusApi: VenusAPI, host: Host): void;
178
-
179
- declare class HostProfileApi implements ProfileApi {
180
- private readonly venusApi;
181
- constructor(venusApi: VenusAPI);
182
- getCurrentProfile(): Profile;
183
- }
184
-
185
- declare class MockProfileApi implements ProfileApi {
186
- private readonly venusApi;
187
- constructor(venusApi: VenusAPI);
188
- getCurrentProfile(): Profile;
189
- }
190
-
191
- declare function initializeProfile(venusApi: VenusAPI, host: Host): void;
192
-
193
- declare class HostDeviceApi implements DeviceApi {
194
- private readonly venusApi;
195
- constructor(venusApi: VenusAPI);
196
- getDevice(): DeviceInfo;
197
- }
198
-
199
- declare class MockDeviceApi implements DeviceApi {
200
- private readonly venusApi;
201
- constructor(venusApi: VenusAPI);
202
- getDevice(): DeviceInfo;
203
- }
204
-
205
- declare class HostEnvironmentApi implements EnvironmentApi {
206
- private readonly venusApi;
207
- constructor(venusApi: VenusAPI);
208
- getEnvironment(): EnvironmentInfo;
209
- }
210
-
211
- declare class MockEnvironmentApi implements EnvironmentApi {
212
- private readonly venusApi;
213
- constructor(venusApi: VenusAPI);
214
- getEnvironment(): EnvironmentInfo;
215
- }
216
-
217
- /**
218
- * Host implementation of SystemApi that delegates to device and environment APIs.
219
- * Acts as a facade combining both system-level information sources.
220
- */
221
- declare class HostSystemApi implements SystemApi {
222
- private readonly deviceApi;
223
- private readonly environmentApi;
224
- private readonly venusApi;
225
- constructor(deviceApi: DeviceApi, environmentApi: EnvironmentApi, venusApi: VenusAPI);
226
- getDevice(): DeviceInfo;
227
- getEnvironment(): EnvironmentInfo;
228
- getSafeArea(): SafeArea;
229
- isMobile(): boolean;
230
- isWeb(): boolean;
231
- }
232
-
233
- /**
234
- * Mock implementation of SystemApi for local development.
235
- * Delegates to mock device and environment APIs.
236
- */
237
- declare class MockSystemApi implements SystemApi {
238
- private readonly deviceApi;
239
- private readonly environmentApi;
240
- private readonly venusApi;
241
- constructor(deviceApi: DeviceApi, environmentApi: EnvironmentApi, venusApi: VenusAPI);
242
- getDevice(): DeviceInfo;
243
- getEnvironment(): EnvironmentInfo;
244
- getSafeArea(): SafeArea;
245
- isMobile(): boolean;
246
- isWeb(): boolean;
247
- }
248
-
249
- declare function initializeSystem(venusApi: VenusAPI, host: Host): void;
250
-
251
- declare class HostCdnApi implements CdnApi {
252
- private readonly baseUrl;
253
- constructor(baseUrl: string);
254
- fetchBlob(path: SubPath, options?: FetchBlobOptions): Promise<Blob>;
255
- fetchFromCdn(url: string, request?: RequestInit): Promise<Response>;
256
- getAssetCdnBaseUrl(): string;
257
- resolveAssetUrl(subPath: string): string;
258
- resolveAvatarAssetUrl(subPath: string): string;
259
- resolveSharedLibUrl(subPath: string): string;
260
- }
261
-
262
- declare class MockCdnApi implements CdnApi {
263
- private readonly venusApi;
264
- constructor(venusApi: VenusAPI);
265
- private get baseUrl();
266
- private get forceRemoteCdn();
267
- fetchBlob(path: SubPath, options?: FetchBlobOptions): Promise<Blob>;
268
- getAssetCdnBaseUrl(): string;
269
- resolveAssetUrl(subPath: string): string;
270
- resolveAvatarAssetUrl(subPath: string): string;
271
- resolveSharedLibUrl(subPath: string): string;
272
- fetchFromCdn(url: string, options?: RequestInit): Promise<Response>;
273
- }
274
-
275
- declare function initializeCdn(venusApi: VenusAPI, host: Host): void;
276
-
277
- declare class HostTimeApi implements TimeApi {
278
- private readonly rpcClient;
279
- private readonly venusApi;
280
- constructor(rpcClient: RpcClient, venusApi: VenusAPI);
281
- requestTimeAsync(): Promise<ServerTimeData>;
282
- formatTime(timestamp: number, options?: any): string;
283
- formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
284
- getFutureTimeAsync(options?: GetFutureTimeOptions): Promise<number>;
285
- }
286
-
287
- declare function isPacificDaylightTime(date: Date): boolean;
288
-
289
- declare class MockTimeApi implements TimeApi {
290
- private readonly venusApi;
291
- constructor(venusApi: VenusAPI);
292
- formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
293
- formatTime(timestamp: number, options?: any): string;
294
- getFutureTimeAsync(options?: GetFutureTimeOptions): Promise<number>;
295
- requestTimeAsync(): Promise<ServerTimeData>;
296
- }
297
-
298
- declare function initializeTime(venusApi: VenusAPI, host: Host): void;
299
-
300
- declare class RpcAiApi implements AiApi {
301
- private readonly rpcClient;
302
- constructor(rpcClient: RpcClient);
303
- requestChatCompletionAsync(request: AiChatCompletionRequest): Promise<AiChatCompletionData>;
304
- getAvailableCompletionModels(): Promise<Array<string>>;
305
- }
306
-
307
- declare class MockAiApi implements AiApi {
308
- requestChatCompletionAsync(request: AiChatCompletionRequest): Promise<AiChatCompletionData>;
309
- getAvailableCompletionModels(): Promise<Array<string>>;
310
- }
311
-
312
- declare function initializeAi(venusApi: VenusAPI, host: Host): void;
313
-
314
- declare class RpcHapticsApi implements HapticsApi {
315
- private readonly rpcClient;
316
- constructor(rpcClient: RpcClient);
317
- triggerHapticAsync(style: HapticFeedbackStyle): Promise<void>;
318
- }
319
-
320
- declare class MockHapticsApi implements HapticsApi {
321
- private readonly venusApi;
322
- constructor(venusApi: VenusAPI);
323
- triggerHapticAsync(style: HapticFeedbackStyle): Promise<void>;
324
- }
325
-
326
- declare function initializeHaptics(venusApi: VenusAPI, host: Host): void;
327
-
328
- declare class RpcFeaturesApi implements FeaturesApi {
329
- private readonly rpcClient;
330
- constructor(rcpClient: RpcClient);
331
- getExperiment(experimentName: string): Promise<Experiment | null>;
332
- getFeatureFlag(flagName: string): Promise<boolean>;
333
- getFeatureGate(gateName: string): Promise<boolean>;
334
- }
335
-
336
- declare class MockFeaturesApi implements FeaturesApi {
337
- getExperiment(experimentName: string): Promise<Experiment | null>;
338
- getFeatureFlag(flagName: string): Promise<boolean>;
339
- getFeatureGate(gateName: string): Promise<boolean>;
340
- }
341
-
342
- declare function initializeFeaturesApi(venusApi: VenusAPI, host: Host): void;
343
-
344
- declare class MockLifecycleApi implements LifecycleApi {
345
- private pauseCallbacks;
346
- private resumeCallbacks;
347
- private awakeCallbacks;
348
- private sleepCallbacks;
349
- private quitCallbacks;
350
- onSleep(callback: SleepCallback): Subscription;
351
- onAwake(callback: AwakeCallback): Subscription;
352
- onPause(callback: PauseCallback): Subscription;
353
- onResume(callback: ResumeCallback): Subscription;
354
- onQuit(callback: QuitCallback): Subscription;
355
- triggerPauseCallbacks(): void;
356
- triggerResumeCallbacks(): void;
357
- triggerAwakeCallbacks(): void;
358
- triggerSleepCallbacks(): void;
359
- triggerQuitCallbacks(): void;
360
- }
361
-
362
- declare class RpcLifecycleApi implements LifecycleApi {
363
- private readonly rpcClient;
364
- constructor(rpcClient: RpcClient);
365
- onQuit(callback: QuitCallback): Subscription;
366
- onSleep(callback: SleepCallback): Subscription;
367
- onAwake(callback: AwakeCallback): Subscription;
368
- onResume(callback: ResumeCallback): Subscription;
369
- onPause(callback: PauseCallback): Subscription;
370
- }
371
-
372
- declare function initializeLifecycleApi(venusApi: VenusAPI, host: Host): void;
373
-
374
- declare class RpcSimulationApi implements SimulationApi {
375
- private readonly rpcClient;
376
- private _simulationConfig;
377
- private readonly subscriptionCallbacks;
378
- constructor(rpcClient: RpcClient);
379
- isEnabled(): boolean;
380
- validateSlotAssignmentAsync(containerId: string, slotId: string, itemId: string): Promise<SimulationSlotValidationResult>;
381
- subscribeAsync(options: SimulationSubscribeOptions): Promise<() => void>;
382
- executeBatchOperationsAsync(operations: Array<SimulationBatchOperation>, validateOnly?: boolean): Promise<SimulationBatchOperationsResult>;
383
- getAvailableItemsAsync(containerId: string, slotId: string): Promise<SimulationAvailableItem[]>;
384
- calculatePowerPreviewAsync(containerId: string, slotId: string, candidateItemId: string): Promise<SimulationPowerPreview>;
385
- assignItemToSlotAsync(containerId: string, slotId: string, itemId: string): Promise<SimulationSlotMutationResult>;
386
- removeItemFromSlotAsync(containerId: string, slotId: string): Promise<SimulationSlotMutationResult>;
387
- getSlotContainersAsync(): Promise<SimulationSlotContainer[]>;
388
- getSlotAssignmentsAsync(containerId: string): Promise<SimulationAssignment[]>;
389
- getStateAsync(roomId?: string): Promise<SimulationState>;
390
- getConfigAsync(roomId?: string): Promise<VenusSimulationConfig>;
391
- executeRecipeAsync(recipeId: string, inputs?: Record<string, unknown>, options?: ExecuteRecipeOptions): Promise<ExecuteRecipeResponse>;
392
- collectRecipeAsync(runId: string): Promise<CollectRecipeResult>;
393
- getActiveRunsAsync(options?: GetActiveRunsOptions): Promise<SimulationRunSummary[]>;
394
- executeScopedRecipeAsync(recipeId: string, entity: string, inputs?: Record<string, unknown>, options?: ExecuteScopedRecipeOptions): Promise<ExecuteScopedRecipeResult>;
395
- getAvailableRecipesAsync(options?: GetAvailableRecipesOptions): Promise<GetAvailableRecipesResult>;
396
- getRecipeRequirementsAsync(recipe: Recipe): Promise<RecipeRequirementResult>;
397
- getBatchRecipeRequirementsAsync(recipes: Recipe[]): Promise<GetBatchRecipeRequirements>;
398
- triggerRecipeChainAsync(recipeId: string, options?: TriggerRecipeChainOptions): Promise<ExecuteRecipeResponse>;
399
- getEntityMetadataAsync(entityId: string): Promise<Record<string, unknown>>;
400
- resolveFieldValueAsync(entityId: string, fieldPath: string, entity?: string): Promise<unknown>;
401
- private handleSimulationUpdate;
402
- private ensureValidSubscribeOptions;
403
- }
404
-
405
- declare function initializeSimulation(venusApi: VenusAPI, host: Host): void;
406
-
407
- interface RoomNotificationSubscriptionState {
408
- data: Record<string, Array<(event: RoomDataUpdate) => void>>;
409
- messages: Record<string, Array<(event: RoomMessageEvent) => void>>;
410
- gameEvents: Record<string, Array<(event: ProposedMoveEvent) => void>>;
411
- }
412
- /**
413
- * Set up room notification listeners using the transport's onVenusMessage hook.
414
- * This routes host-sent room notifications (H5_ROOM_DATA_UPDATED, etc.) to the
415
- * callbacks registered in the RoomsApi instance.
416
- * @param transport The Venus transport to listen for messages
417
- * @param getSubscriptions Function to retrieve subscription state from RoomsApi
418
- */
419
- declare function setupRoomNotifications(transport: VenusTransport, getSubscriptions: () => RoomNotificationSubscriptionState): Subscription;
420
-
421
- declare class RpcRoomsApi implements RoomsApi {
422
- private readonly rpcClient;
423
- private readonly subscriptions;
424
- constructor(rpcClient: RpcClient);
425
- /**
426
- * Get the subscription state for external access (used by setupRoomNotifications)
427
- */
428
- getSubscriptions(): RoomNotificationSubscriptionState;
429
- /**
430
- * Set up room notification routing from the transport
431
- */
432
- setupNotifications(transport: VenusTransport): void;
433
- createRoomAsync(options: CreateRoomOptions): Promise<VenusRoom>;
434
- joinOrCreateRoomAsync(options: JoinOrCreateRoomOptions): Promise<JoinOrCreateResult>;
435
- joinRoomByCodeAsync(roomCode: string): Promise<VenusRoom>;
436
- getUserRoomsAsync(options?: ListRoomsOptions): Promise<VenusRoom[]>;
437
- updateRoomDataAsync(room: VenusRoom, updates: Record<string, unknown>, options?: UpdateRoomDataOptions): Promise<void>;
438
- getRoomDataAsync(room: VenusRoom): Promise<Record<string, unknown>>;
439
- sendRoomMessageAsync(venusRoom: VenusRoom, request: RoomMessageRequest): Promise<string>;
440
- leaveRoomAsync(room: VenusRoom): Promise<void>;
441
- startRoomGameAsync(room: VenusRoom, options?: StartRoomGameOptions): Promise<void>;
442
- proposeMoveAsync(room: VenusRoom, proposalPayload: ProposeMoveRequest): Promise<ProposeMoveResult>;
443
- validateMoveAsync(_room: VenusRoom, moveId: string, verdict: ValidateMoveVerdict): Promise<ValidateMoveResult>;
444
- subscribeAsync(room: VenusRoom, options?: RoomSubscriptionOptions): Promise<() => void>;
445
- }
446
-
447
- declare function initializeRoomsApi(venusApi: VenusAPI, host: Host): void;
448
-
449
- declare class MockLoggingApi implements LoggingApi {
450
- logDebug(message?: any, ...args: any[]): void;
451
- logError(message: string, ...args: any[]): void;
452
- }
453
-
454
- declare class RpcLoggingApi implements LoggingApi {
455
- private readonly host;
456
- private readonly rpcClient;
457
- constructor(host: Host, rpcClient: RpcClient);
458
- logDebug(message: string, ...args: any[]): void;
459
- logError(message: string, ...args: any[]): void;
460
- private buildMessage;
461
- private toStringArg;
462
- }
463
-
464
- declare function initializeLoggingApi(venusApi: VenusAPI, host: Host): void;
465
-
466
- declare class RpcIapApi implements IapApi {
467
- private readonly rpcClient;
468
- constructor(rpcClient: RpcClient);
469
- getHardCurrencyBalance(): Promise<number>;
470
- spendCurrency(productId: string, cost: number, options?: SpendCurrencyOptions): Promise<void>;
471
- openStore(): Promise<void>;
472
- getCurrencyIcon(): Promise<LoadEmbeddedAssetsResponse>;
473
- }
474
-
475
- declare class MockSharedAssetsApi implements SharedAssetsApi {
476
- private readonly venusApi;
477
- constructor(venusApi: VenusAPI);
478
- loadAssetsBundle(game: string, bundleKey: string, fileType?: string): Promise<ArrayBuffer>;
479
- }
480
-
481
- type ModuleSpecifierMatch = 'exact' | 'prefix';
482
- interface ModuleSpecifierConfig {
483
- match: ModuleSpecifierMatch;
484
- value: string;
485
- behavior?: 'default' | 'react-jsx-runtime' | 'react-jsx-dev-runtime' | 'namespace';
486
- }
487
- interface EmbeddedLibraryDefinition {
488
- libraryKey: string;
489
- assetKey: string;
490
- packageName: string;
491
- version: string;
492
- globalVar: string;
493
- cdnPath: string;
494
- moduleSpecifiers: ModuleSpecifierConfig[];
495
- loadStage: number;
496
- enabled: boolean;
497
- }
498
- declare const DEFAULT_SHARED_LIB_CDN_BASE = "https://venus-static-01293ak.web.app/libs";
499
- declare const EMBEDDED_LIBRARIES: EmbeddedLibraryDefinition[];
500
- declare const EMBEDDED_LIBRARY_BY_KEY: Record<string, EmbeddedLibraryDefinition>;
501
- declare const MODULE_TO_LIBRARY_SPECIFIERS: {
502
- libraryKey: string;
503
- match: ModuleSpecifierMatch;
504
- value: string;
505
- behavior?: "default" | "react-jsx-runtime" | "react-jsx-dev-runtime" | "namespace";
506
- }[];
507
- /**
508
- * Get library definition by key, throwing if not found.
509
- * @param libraryKey - Library key (e.g., 'phaser@3.90.0')
510
- * @returns Library definition
511
- * @throws Error if library key is not found
512
- */
513
- declare function getLibraryDefinition(libraryKey: string): EmbeddedLibraryDefinition;
514
-
515
- /**
516
- * Base64 encoding/decoding utilities for embedded assets and libraries.
517
- *
518
- * These utilities handle base64 data received from the Venus host via RPC,
519
- * converting it to ArrayBuffer or UTF-8 strings with appropriate fallbacks
520
- * for different JavaScript environments.
521
- */
522
- /**
523
- * Convert base64 string to ArrayBuffer.
524
- * Uses native atob() when available for best performance.
525
- */
526
- declare function base64ToArrayBuffer(base64: string): ArrayBuffer;
527
- /**
528
- * Convert base64 string to UTF-8 string.
529
- * Tries multiple decoding strategies for maximum compatibility.
530
- */
531
- declare function base64ToUtf8(base64: string): string;
532
-
533
- declare class MockIapApi implements IapApi {
534
- private _hardCurrency;
535
- get hardCurrency(): number;
536
- set hardCurrency(value: number);
537
- spendCurrency(productId: string, cost: number, options?: SpendCurrencyOptions): Promise<void>;
538
- getHardCurrencyBalance(): Promise<number>;
539
- openStore(): Promise<void>;
540
- getCurrencyIcon(): Promise<LoadEmbeddedAssetsResponse>;
541
- }
542
-
543
- declare function initializeIap(venusApiInstance: VenusAPI, host: Host): void;
544
-
545
- declare class RpcLeaderboardApi implements LeaderboardApi {
546
- private readonly rpcClient;
547
- /** Cache of score tokens for automatic hash computation */
548
- private tokenCache;
549
- constructor(rpcClient: RpcClient);
550
- /**
551
- * Create a score token for submitting a score.
552
- * Token is cached for automatic hash computation if score sealing is enabled.
553
- *
554
- * @param mode - Optional game mode
555
- * @returns Score token with sealing data if enabled
556
- */
557
- createScoreToken(mode?: string): Promise<ScoreToken>;
558
- /**
559
- * Submit a score to the leaderboard.
560
- * Automatically computes hash if score sealing is enabled and token was created via createScoreToken().
561
- *
562
- * @param params - Score submission parameters
563
- * @returns Submission result with acceptance status and rank
564
- * @throws Error if token not found in cache
565
- */
566
- submitScore(params: SubmitScoreParams): Promise<SubmitScoreResult>;
567
- getPagedScores(options?: GetPagedScoresOptions): Promise<PagedScoresResponse>;
568
- getMyRank(options?: PlayerRankOptions): Promise<PlayerRankResult>;
569
- getPodiumScores(options?: GetPodiumScoresOptions): Promise<PodiumScoresResponse>;
570
- }
571
-
572
- declare class MockLeaderboardApi implements LeaderboardApi {
573
- private tokens;
574
- /** Cache of score tokens for automatic hash computation */
575
- private tokenCache;
576
- private entriesByMode;
577
- private tokenCounter;
578
- private enableScoreSealing;
579
- private scoreSealingSecret;
580
- constructor(options?: {
581
- enableScoreSealing?: boolean;
582
- scoreSealingSecret?: string;
583
- });
584
- /**
585
- * Configure mock leaderboard settings
586
- *
587
- * @param options - Configuration options
588
- */
589
- configure(options: {
590
- enableScoreSealing?: boolean;
591
- scoreSealingSecret?: string;
592
- }): void;
593
- private generateNonce;
594
- private getModeKey;
595
- private getEntriesForMode;
596
- /**
597
- * Create a mock score token for testing.
598
- * Token is cached for automatic hash computation if score sealing is enabled.
599
- *
600
- * @param mode - Optional game mode
601
- * @returns Score token with sealing data if enabled
602
- */
603
- createScoreToken(mode?: string): Promise<ScoreToken>;
604
- /**
605
- * Submit a mock score to the leaderboard.
606
- * Automatically computes hash if score sealing is enabled and token was created via createScoreToken().
607
- *
608
- * @param params - Score submission parameters
609
- * @returns Submission result with acceptance status and rank
610
- * @throws Error if token not found in cache or validation fails
611
- */
612
- submitScore(params: SubmitScoreParams): Promise<SubmitScoreResult>;
613
- getPagedScores(options?: GetPagedScoresOptions): Promise<PagedScoresResponse>;
614
- getMyRank(_options?: PlayerRankOptions): Promise<PlayerRankResult>;
615
- getPodiumScores(options?: GetPodiumScoresOptions): Promise<PodiumScoresResponse>;
616
- }
617
-
618
- /**
619
- * Hash algorithm used for score sealing
620
- */
621
- declare const HASH_ALGORITHM_WEB_CRYPTO = "SHA-256";
622
- declare const HASH_ALGORITHM_NODE = "sha256";
623
- /**
624
- * Compute HMAC-SHA256 hash for score sealing.
625
- * Hash always includes: score, duration, token
626
- * Matches server-side hash computation exactly.
627
- *
628
- * @param score - The score value
629
- * @param duration - Duration in seconds
630
- * @param token - Score token
631
- * @param sealingNonce - One-time nonce for this submission
632
- * @param sealingSecret - Secret key for HMAC
633
- * @returns Hex-encoded hash string
634
- */
635
- declare function computeScoreHash(score: number, duration: number, token: string, sealingNonce: string, sealingSecret: string): Promise<string>;
636
-
637
- declare function initializeLeaderboard(venusApiInstance: VenusAPI, host: Host): void;
638
-
639
- declare class MockPreloaderApi implements PreloaderApi {
640
- showLoadScreen(): Promise<void>;
641
- hideLoadScreen(): Promise<void>;
642
- setLoaderText(text: string): Promise<void>;
643
- setLoaderProgress(progress: number): Promise<void>;
644
- }
645
-
646
- declare class RpcPreloaderApi implements PreloaderApi {
647
- private readonly rpcClient;
648
- constructor(rpcClient: RpcClient);
649
- showLoadScreen(): Promise<void>;
650
- hideLoadScreen(): Promise<void>;
651
- setLoaderText(text: string): Promise<void>;
652
- setLoaderProgress(progress: number): Promise<void>;
653
- }
654
-
655
- declare function initializePreloader(venusApi: VenusAPI, host: Host): void;
656
-
657
- declare class RpcSocialApi implements SocialApi {
658
- private readonly rpcClient;
659
- constructor(rpcClient: RpcClient);
660
- shareLinkAsync(options: {
661
- launchParams: Record<string, string>;
662
- metadata?: ShareMetadata;
663
- }): Promise<ShareLinkResult>;
664
- createQRCodeAsync(options: {
665
- launchParams: Record<string, string>;
666
- metadata?: ShareMetadata;
667
- qrOptions?: SocialQRCodeOptions;
668
- }): Promise<QRCodeResult>;
669
- }
670
-
671
- declare class MockSocialApi implements SocialApi {
672
- shareLinkAsync(options: {
673
- launchParams: Record<string, string>;
674
- }): Promise<ShareLinkResult>;
675
- createQRCodeAsync(options: {
676
- launchParams: Record<string, string>;
677
- qrOptions?: SocialQRCodeOptions;
678
- }): Promise<QRCodeResult>;
679
- private createMockUrl;
680
- }
681
-
682
- declare function initializeSocial(venusApi: VenusAPI, host: Host): void;
683
-
684
- declare class RpcAvatarApi implements Avatar3dApi {
685
- private readonly venusApi;
686
- private readonly rpcClient;
687
- constructor(rpcClient: RpcClient, venusApi: VenusAPI);
688
- downloadAssetPaths(): Promise<Record<string, string[]>>;
689
- downloadManifest(): Promise<AssetManifest>;
690
- loadAvatar(avatarId?: string): Promise<Avatar3dConfig | null>;
691
- saveAvatar(config: Avatar3dConfig): Promise<string>;
692
- deleteAvatar(): Promise<void>;
693
- showEditor(options?: ShowEditorOptions): Promise<Avatar3dEdits>;
694
- private fetchFromCdn;
695
- private log;
696
- }
697
-
698
- declare function initializeAvatar3d(venusApi: VenusAPI, host: Host): void;
699
-
700
- declare class RpcAdsApi implements AdsApi {
701
- private readonly rpcClient;
702
- constructor(rpcClient: RpcClient);
703
- showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
704
- isRewardedAdReadyAsync(): Promise<boolean>;
705
- showRewardedAdAsync(options?: ShowRewardedAdOptions): Promise<boolean>;
706
- }
707
-
708
- declare class MockAdsApi implements AdsApi {
709
- private mockOverlay;
710
- constructor(mockOverlay: MockOverlay);
711
- isRewardedAdReadyAsync(): Promise<boolean>;
712
- showRewardedAdAsync(options?: ShowRewardedAdOptions): Promise<boolean>;
713
- showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
714
- private log;
715
- }
716
-
717
- declare function initializeAds(venusApiInstance: VenusAPI, host: Host): void;
718
-
719
- declare const SDK_VERSION: string;
720
-
721
- declare enum VenusMessageId {
722
- H5_RESPONSE = "H5_RESPONSE",
723
- IS_REWARDED_AD_READY = "H5_IS_REWARDED_AD_READY",
724
- SHOW_REWARDED_AD = "H5_SHOW_REWARDED_AD",
725
- LOG_ANALYTICS_EVENT = "H5_LOG_ANALYTICS_EVENT",
726
- TRACK_FUNNEL_STEP = "H5_TRACK_FUNNEL_STEP",
727
- DEVICE_CACHE_GET_ITEM = "H5_DEVICE_CACHE_GET_ITEM",
728
- DEVICE_CACHE_SET_ITEM = "H5_DEVICE_CACHE_SET_ITEM",
729
- DEVICE_CACHE_REMOVE_ITEM = "H5_DEVICE_CACHE_REMOVE_ITEM",
730
- DEVICE_CACHE_CLEAR = "H5_DEVICE_CACHE_CLEAR",
731
- DEVICE_CACHE_KEY = "H5_DEVICE_CACHE_KEY",
732
- DEVICE_CACHE_LENGTH = "H5_DEVICE_CACHE_LENGTH",
733
- APP_STORAGE_GET_ITEM = "H5_APP_STORAGE_GET_ITEM",
734
- APP_STORAGE_SET_ITEM = "H5_APP_STORAGE_SET_ITEM",
735
- APP_STORAGE_REMOVE_ITEM = "H5_APP_STORAGE_REMOVE_ITEM",
736
- APP_STORAGE_CLEAR = "H5_APP_STORAGE_CLEAR",
737
- APP_STORAGE_KEY = "H5_APP_STORAGE_KEY",
738
- APP_STORAGE_LENGTH = "H5_APP_STORAGE_LENGTH",
739
- APP_STORAGE_GET_ALL_ITEMS = "H5_APP_STORAGE_GET_ALL_ITEMS",
740
- APP_STORAGE_SET_MULTIPLE_ITEMS = "H5_APP_STORAGE_SET_MULTIPLE_ITEMS",
741
- APP_STORAGE_REMOVE_MULTIPLE_ITEMS = "H5_APP_STORAGE_REMOVE_MULTIPLE_ITEMS",
742
- GLOBAL_STORAGE_GET_ITEM = "H5_GLOBAL_STORAGE_GET_ITEM",
743
- GLOBAL_STORAGE_SET_ITEM = "H5_GLOBAL_STORAGE_SET_ITEM",
744
- GLOBAL_STORAGE_REMOVE_ITEM = "H5_GLOBAL_STORAGE_REMOVE_ITEM",
745
- GLOBAL_STORAGE_CLEAR = "H5_GLOBAL_STORAGE_CLEAR",
746
- GLOBAL_STORAGE_KEY = "H5_GLOBAL_STORAGE_KEY",
747
- GLOBAL_STORAGE_LENGTH = "H5_GLOBAL_STORAGE_LENGTH",
748
- GLOBAL_STORAGE_GET_ALL_ITEMS = "H5_GLOBAL_STORAGE_GET_ALL_ITEMS",
749
- GLOBAL_STORAGE_SET_MULTIPLE_ITEMS = "H5_GLOBAL_STORAGE_SET_MULTIPLE_ITEMS",
750
- GLOBAL_STORAGE_REMOVE_MULTIPLE_ITEMS = "H5_GLOBAL_STORAGE_REMOVE_MULTIPLE_ITEMS",
751
- AVATAR3D_LOAD = "H5_AVATAR3D_LOAD",
752
- AVATAR3D_SAVE = "H5_AVATAR3D_SAVE",
753
- AVATAR3D_DELETE = "H5_AVATAR3D_DELETE",
754
- H5_STACK_PUSH_REQUEST = "H5_STACK_PUSH_REQUEST",
755
- H5_STACK_POP_REQUEST = "H5_STACK_POP_REQUEST",
756
- SCHEDULE_LOCAL_NOTIFICATION = "H5_SCHEDULE_LOCAL_NOTIFICATION",
757
- CANCEL_LOCAL_NOTIFICATION = "H5_CANCEL_LOCAL_NOTIFICATION",
758
- GET_ALL_SCHEDULED_LOCAL_NOTIFICATIONS = "H5_GET_ALL_SCHEDULED_LOCAL_NOTIFICATIONS",
759
- IS_LOCAL_NOTIFICATIONS_ENABLED = "H5_IS_LOCAL_NOTIFICATIONS_ENABLED",
760
- SET_LOCAL_NOTIFICATIONS_ENABLED = "H5_SET_LOCAL_NOTIFICATIONS_ENABLED",
761
- TOAST = "H5_TOAST",
762
- REQUEST_SERVER_TIME = "H5_REQUEST_SERVER_TIME",
763
- SHARE_LINK = "H5_SHARE_LINK",
764
- CREATE_SHARE_QRCODE = "H5_CREATE_SHARE_QRCODE",
765
- AI_CHAT_COMPLETION = "H5_AI_CHAT_COMPLETION",
766
- AI_GET_AVAILABLE_MODELS = "H5_AI_GET_AVAILABLE_MODELS",
767
- TRIGGER_HAPTIC = "H5_TRIGGER_HAPTIC",
768
- DEBUG = "H5_DEBUG",
769
- H5_IAP_GET_WALLET = "H5_IAP_GET_WALLET",
770
- H5_IAP_SPEND_CURRENCY = "H5_IAP_SPEND_CURRENCY",
771
- SHOW_INTERSTITIAL_AD = "H5_SHOW_INTERSTITIAL_AD",
772
- IAP_SPEND_CURRENCY_COMPLETE = "IAP_SPEND_CURRENCY_COMPLETE",
773
- IAP_WALLET_UPDATE = "IAP_WALLET_UPDATE",
774
- READY = "READY",
775
- INIT_SDK = "INITIALIZE_SDK",
776
- PAUSE = "PAUSE",
777
- RESUME = "RESUME",
778
- AWAKE = "AWAKE",
779
- SLEEP = "SLEEP",
780
- QUIT = "QUIT",
781
- /** given the experiment name, returns the entire experiment object as configured for the current user */
782
- GET_EXPERIMENT = "H5_GET_EXPERIMENT",
783
- /** returns the boolean value for a feature flag using the statsig parameter store, or the feature flags constants as fallback */
784
- GET_FEATURE_FLAG = "H5_GET_FEATURE_FLAG",
785
- /** returns the gate value (boolean) for a given feature gate for the current user */
786
- GET_FEATURE_GATE = "H5_GET_FEATURE_GATE",
787
- H5_SIMULATION_EXECUTE_RECIPE = "H5_SIMULATION_EXECUTE_RECIPE",
788
- H5_SIMULATION_GET_ACTIVE_RUNS = "H5_SIMULATION_GET_ACTIVE_RUNS",
789
- H5_SIMULATION_COLLECT_RECIPE = "H5_SIMULATION_COLLECT_RECIPE",
790
- H5_SIMULATION_EXECUTE_SCOPED_RECIPE = "H5_SIMULATION_EXECUTE_SCOPED_RECIPE",
791
- H5_SIMULATION_GET_AVAILABLE_RECIPES = "H5_SIMULATION_GET_AVAILABLE_RECIPES",
792
- H5_SIMULATION_GET_RECIPE_REQUIREMENTS = "H5_SIMULATION_GET_RECIPE_REQUIREMENTS",
793
- H5_SIMULATION_GET_BATCH_RECIPE_REQUIREMENTS = "H5_SIMULATION_GET_BATCH_RECIPE_REQUIREMENTS",
794
- H5_SIMULATION_TRIGGER_RECIPE_CHAIN = "H5_SIMULATION_TRIGGER_RECIPE_CHAIN",
795
- H5_SIMULATION_RESOLVE_VALUE = "H5_SIMULATION_RESOLVE_VALUE",
796
- H5_SIMULATION_GET_ENTITY_METADATA = "H5_SIMULATION_GET_ENTITY_METADATA",
797
- H5_SIMULATION_GET_STATE = "H5_SIMULATION_GET_STATE",
798
- H5_SIMULATION_GET_CONFIG = "H5_SIMULATION_GET_CONFIG",
799
- H5_SIMULATION_GET_CONTAINERS = "H5_SIMULATION_GET_CONTAINERS",
800
- H5_SIMULATION_GET_ASSIGNMENTS = "H5_SIMULATION_GET_ASSIGNMENTS",
801
- H5_SIMULATION_ASSIGN_ITEM = "H5_SIMULATION_ASSIGN_ITEM",
802
- H5_SIMULATION_REMOVE_ITEM = "H5_SIMULATION_REMOVE_ITEM",
803
- H5_SIMULATION_CALCULATE_POWER_PREVIEW = "H5_SIMULATION_CALCULATE_POWER_PREVIEW",
804
- H5_SIMULATION_GET_AVAILABLE_ITEMS = "H5_SIMULATION_GET_AVAILABLE_ITEMS",
805
- H5_SIMULATION_VALIDATE_ASSIGNMENT = "H5_SIMULATION_VALIDATE_ASSIGNMENT",
806
- H5_SIMULATION_BATCH_OPERATIONS = "H5_SIMULATION_BATCH_OPERATIONS",
807
- H5_SIMULATION_SUBSCRIBE = "H5_SIMULATION_SUBSCRIBE",
808
- H5_SIMULATION_UNSUBSCRIBE = "H5_SIMULATION_UNSUBSCRIBE",
809
- H5_SIMULATION_UPDATE = "H5_SIMULATION_UPDATE",
810
- H5_LEADERBOARD_CREATE_SCORE_TOKEN = "H5_LEADERBOARD_CREATE_SCORE_TOKEN",
811
- H5_LEADERBOARD_SUBMIT_SCORE = "H5_LEADERBOARD_SUBMIT_SCORE",
812
- H5_LEADERBOARD_GET_PAGED_SCORES = "H5_LEADERBOARD_GET_PAGED_SCORES",
813
- H5_LEADERBOARD_GET_PODIUM_SCORES = "H5_LEADERBOARD_GET_PODIUM_SCORES",
814
- H5_LEADERBOARD_GET_MY_RANK = "H5_LEADERBOARD_GET_MY_RANK",
815
- H5_ROOM_CREATE = "H5_ROOM_CREATE",
816
- H5_ROOM_JOIN = "H5_ROOM_JOIN",
817
- H5_ROOM_JOIN_OR_CREATE = "H5_ROOM_JOIN_OR_CREATE",
818
- H5_ROOM_LEAVE = "H5_ROOM_LEAVE",
819
- H5_ROOM_UPDATE_DATA = "H5_ROOM_UPDATE_DATA",
820
- H5_ROOM_GET_DATA = "H5_ROOM_GET_DATA",
821
- H5_ROOM_SUBSCRIBE = "H5_ROOM_SUBSCRIBE",
822
- H5_ROOM_UNSUBSCRIBE = "H5_ROOM_UNSUBSCRIBE",
823
- H5_ROOM_SEND_MESSAGE = "H5_ROOM_SEND_MESSAGE",
824
- H5_ROOM_GET_MESSAGES = "H5_ROOM_GET_MESSAGES",
825
- H5_ROOM_LIST_ROOMS = "H5_ROOM_LIST_ROOMS",
826
- H5_ROOM_LIST_PUBLIC = "H5_ROOM_LIST_PUBLIC",
827
- H5_ROOM_SEARCH = "H5_ROOM_SEARCH",
828
- H5_ROOM_JOIN_BY_CODE = "H5_ROOM_JOIN_BY_CODE",
829
- H5_ROOM_GET_USER_ROOMS = "H5_ROOM_GET_USER_ROOMS",
830
- H5_ROOM_GET_PLAYERS = "H5_ROOM_GET_PLAYERS",
831
- H5_ROOM_UPDATE_PLAYER_DATA = "H5_ROOM_UPDATE_PLAYER_DATA",
832
- H5_ROOM_START_GAME = "H5_ROOM_START_GAME",
833
- H5_ROOM_PROPOSE_MOVE = "h5:room:proposeMove",
834
- H5_ROOM_END_GAME = "H5_ROOM_END_GAME",
835
- H5_ROOM_ELIMINATE_PLAYER = "H5_ROOM_ELIMINATE_PLAYER",
836
- H5_ROOM_PROMOTE_TO_SPECTATOR = "H5_ROOM_PROMOTE_TO_SPECTATOR",
837
- H5_LOAD_EMBEDDED_ASSET = "H5_LOAD_EMBEDDED_ASSET",
838
- H5_SHOW_LOAD_SCREEN = "H5_SHOW_LOAD_SCREEN",
839
- H5_HIDE_LOAD_SCREEN = "H5_HIDE_LOAD_SCREEN",
840
- H5_SET_LOADER_TEXT = "H5_SET_LOADER_TEXT",
841
- H5_SET_LOADER_PROGRESS = "H5_SET_LOADER_PROGRESS",
842
- H5_IAP_OPEN_STORE = "H5_IAP_OPEN_STORE",
843
- H5_IAP_GET_CURRENCY_ICON = "H5_IAP_GET_CURRENCY_ICON"
844
- }
845
-
846
- declare class RemoteHost implements Host {
847
- readonly ads: AdsApi;
848
- readonly analytics: AnalyticsApi;
849
- readonly deviceCache: StorageApi;
850
- readonly appStorage: StorageApi;
851
- readonly globalStorage: StorageApi;
852
- readonly avatar3d: Avatar3dApi;
853
- readonly navigation: NavigationApi;
854
- readonly notifications: NotificationsApi;
855
- readonly popups: PopupsApi;
856
- readonly profile: ProfileApi;
857
- readonly system: SystemApi;
858
- readonly cdn: CdnApi;
859
- readonly time: TimeApi;
860
- readonly ai: AiApi;
861
- readonly haptics: HapticsApi;
862
- readonly features: FeaturesApi;
863
- readonly lifecycle: LifecycleApi;
864
- readonly simulation: SimulationApi;
865
- readonly rooms: RoomsApi;
866
- readonly logging: LoggingApi;
867
- readonly iap: IapApi;
868
- readonly leaderboard: LeaderboardApi;
869
- readonly preloader: PreloaderApi;
870
- readonly social: SocialApi;
871
- get isInitialized(): boolean;
872
- private readonly venusApi;
873
- private readonly rpcClient;
874
- private _isInitialized;
875
- constructor(venusApi: VenusAPI);
876
- initialize(options?: InitializationOptions): Promise<InitializationContext>;
877
- private log;
878
- }
879
- interface InitResponse {
880
- initializeAsleep: boolean;
881
- instanceId: string;
882
- profile: {
883
- id: string;
884
- username: string;
885
- avatarUrl?: string | null;
886
- isAnonymous?: boolean;
887
- };
888
- safeArea?: SafeArea;
889
- launchParams: Record<string, string>;
890
- environment: EnvironmentInfo;
891
- device: DeviceInfo;
892
- locale: string;
893
- languageCode: string;
894
- rooms?: {
895
- gameType?: string;
896
- rulesPreset?: string;
897
- matchmaking?: Record<string, any>;
898
- createOptions?: Record<string, any>;
899
- privateMatchDefaults?: Record<string, any>;
900
- [key: string]: any;
901
- };
902
- }
903
-
904
- export { AdsApi, AiApi, AiChatCompletionData, AiChatCompletionRequest, AnalyticsApi, AssetManifest, Avatar3dApi, Avatar3dConfig, Avatar3dEdits, AwakeCallback, CdnApi, CollectRecipeResult, CreateRoomOptions, DEFAULT_SHARED_LIB_CDN_BASE, DeviceApi, DeviceInfo, EMBEDDED_LIBRARIES, EMBEDDED_LIBRARY_BY_KEY, type EmbeddedLibraryDefinition, EnvironmentApi, EnvironmentInfo, ExecuteRecipeOptions, ExecuteRecipeResponse, ExecuteScopedRecipeOptions, ExecuteScopedRecipeResult, Experiment, FeaturesApi, FetchBlobOptions, GetActiveRunsOptions, GetAvailableRecipesOptions, GetAvailableRecipesResult, GetBatchRecipeRequirements, GetFutureTimeOptions, GetPagedScoresOptions, GetPodiumScoresOptions, HASH_ALGORITHM_NODE, HASH_ALGORITHM_WEB_CRYPTO, HapticFeedbackStyle, HapticsApi, Host, HostCdnApi, HostDeviceApi, HostEnvironmentApi, HostProfileApi, HostSystemApi, HostTimeApi, IapApi, type InitResponse, InitializationContext, InitializationOptions, JoinOrCreateResult, JoinOrCreateRoomOptions, LeaderboardApi, LifecycleApi, ListRoomsOptions, LoadEmbeddedAssetsResponse, LoggingApi, MODULE_TO_LIBRARY_SPECIFIERS, type MethodIds, MockAdsApi, MockAiApi, MockAnalyticsApi, MockCdnApi, MockDeviceApi, MockEnvironmentApi, MockFeaturesApi, MockHapticsApi, MockIapApi, MockLeaderboardApi, MockLifecycleApi, MockLoggingApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockPreloaderApi, MockProfileApi, MockSharedAssetsApi, MockSocialApi, MockStorageApi, MockSystemApi, MockTimeApi, type ModuleSpecifierConfig, type ModuleSpecifierMatch, NavigationApi, NavigationStackInfo, type NotificationContent, NotificationsApi, PagedScoresResponse, PauseCallback, PlayerRankOptions, PlayerRankResult, PodiumScoresResponse, PopupsApi, PreloaderApi, ProfileApi, ProposeMoveRequest, ProposeMoveResult, ProposedMoveEvent, PushAppOptions, QRCodeResult, QuitCallback, QuitOptions, Recipe, RemoteHost, ResumeCallback, RoomDataUpdate, RoomMessageEvent, RoomMessageRequest, type RoomNotificationSubscriptionState, RoomSubscriptionOptions, RoomsApi, RpcAdsApi, RpcAiApi, RpcAnalyticsApi, RpcAvatarApi, RpcClient, RpcFeaturesApi, RpcHapticsApi, RpcIapApi, RpcLeaderboardApi, RpcLifecycleApi, RpcLoggingApi, type RpcMessage, RpcNavigationApi, RpcNotification, RpcNotificationsApi, RpcPopupsApi, RpcPreloaderApi, RpcRequest, RpcResponse, RpcRoomsApi, RpcSimulationApi, RpcSocialApi, RpcStorageApi, SDK_VERSION, SafeArea, ScheduleLocalNotification, ScheduleNotificationOptions, ScoreToken, ServerTimeData, ShareLinkResult, ShareMetadata, SharedAssetsApi, ShowEditorOptions, ShowInterstitialAdOptions, ShowRewardedAdOptions, ShowToastOptions, type ShowToastResponse, SimulationApi, SimulationAssignment, SimulationAvailableItem, SimulationBatchOperation, SimulationBatchOperationsResult, SimulationPowerPreview, SimulationRunSummary, SimulationSlotContainer, SimulationSlotMutationResult, SimulationSlotValidationResult, SimulationState, SleepCallback, SocialApi, SocialQRCodeOptions, SpendCurrencyOptions, StartRoomGameOptions, StorageApi, type StorageType, SubPath, SubmitScoreParams, SubmitScoreResult, Subscription, SystemApi, TimeApi, TriggerRecipeChainOptions, UpdateRoomDataOptions, ValidateMoveResult, ValidateMoveVerdict, VenusMessageId, VenusRoom, base64ToArrayBuffer, base64ToUtf8, computeScoreHash, createMockStorageApi, getLibraryDefinition, initializeAds, initializeAi, initializeAnalytics, initializeAvatar3d, initializeCdn, initializeFeaturesApi, initializeHaptics, initializeIap, initializeLeaderboard, initializeLifecycleApi, initializeLocalNotifications, initializeLoggingApi, initializePopups, initializePreloader, initializeProfile, initializeRoomsApi, initializeSimulation, initializeSocial, initializeStackNavigation, initializeStorage, initializeSystem, initializeTime, isPacificDaylightTime, setupRoomNotifications };