@series-inc/venus-sdk 2.2.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.
@@ -0,0 +1,692 @@
1
+ interface AnalyticsApi {
2
+ recordCustomEvent(eventName: string, payload?: Record<string, any>): Promise<void>;
3
+ trackFunnelStep(stepNumber: number, stepName: string, funnelName?: string): Promise<void>;
4
+ }
5
+
6
+ interface NavigationStackInfo {
7
+ isInStack: boolean;
8
+ stackPosition: number;
9
+ isTopOfStack: boolean;
10
+ stackDepth: number;
11
+ parentInstanceId: string;
12
+ }
13
+ interface PushAppOptions {
14
+ contextData?: any;
15
+ appParams?: any;
16
+ }
17
+ interface QuitOptions {
18
+ reason?: string;
19
+ forceClose?: boolean;
20
+ [key: string]: any;
21
+ }
22
+ interface NavigationApi {
23
+ pushApp(appId: string, options?: PushAppOptions): Promise<void>;
24
+ popApp(): Promise<void>;
25
+ getStackInfo(): NavigationStackInfo;
26
+ requestPopOrQuit(options?: QuitOptions): Promise<boolean>;
27
+ }
28
+
29
+ interface ShowConfirmOptions {
30
+ confirmText?: string;
31
+ cancelText?: string;
32
+ }
33
+ interface ShowAlertOptions {
34
+ buttonText?: string;
35
+ }
36
+ interface ShowToastOptions {
37
+ duration?: number;
38
+ variant?: 'success' | 'error' | 'warning' | 'info';
39
+ action?: {
40
+ label: string;
41
+ };
42
+ }
43
+ interface PopupsApi {
44
+ showAlert(title: string, message: string, options?: ShowAlertOptions): Promise<void>;
45
+ showConfirm(title: string, message: string, options?: ShowConfirmOptions): Promise<boolean>;
46
+ showToast(message: string, options?: ShowToastOptions): Promise<boolean>;
47
+ showActionSheet(items: ActionSheetItem[], options?: ShowActionSheetOptions): Promise<string | number | null>;
48
+ }
49
+ interface ActionSheetItem {
50
+ id?: string;
51
+ label: string;
52
+ icon?: string;
53
+ }
54
+ interface ShowActionSheetOptions {
55
+ title?: string;
56
+ message?: string;
57
+ cancelButtonText?: string;
58
+ disableCancel?: boolean;
59
+ }
60
+
61
+ type SubPath = string;
62
+ interface FetchBlobOptions {
63
+ timeout?: number;
64
+ }
65
+ interface CdnApi {
66
+ resolveAssetUrl(subPath: string): string;
67
+ resolveAvatarAssetUrl(subPath: string): string;
68
+ resolveSharedLibUrl(subPath: string): string;
69
+ getAssetCdnBaseUrl(): string;
70
+ fetchFromCdn(url: string, request?: RequestInit): Promise<Response>;
71
+ fetchBlob(path: SubPath, options?: FetchBlobOptions): Promise<Blob>;
72
+ }
73
+
74
+ interface AiMessage {
75
+ /**
76
+ * Depends on the model you are using. Most common is user, system, and assistant.
77
+ * If you are unsure, look up the specific model you are using.
78
+ */
79
+ role: string;
80
+ content: string;
81
+ }
82
+ type AiChatCompletionRequest = {
83
+ model: string;
84
+ messages?: Array<AiMessage>;
85
+ maxTokens?: number;
86
+ temperature?: number;
87
+ topP?: number;
88
+ topK?: number;
89
+ n?: number;
90
+ stop?: string | string[];
91
+ presencePenalty?: number;
92
+ frequencyPenalty?: number;
93
+ logitBias?: Record<string, number>;
94
+ seed?: number;
95
+ /**
96
+ * This is ONLY ever used when running the sdk outside of venus.
97
+ * This gets ignored when the game using the sdk is used within a venus instance.
98
+ *
99
+ * In other words, this should only be uswed when developing a game locally.
100
+ */
101
+ apiKey?: string;
102
+ };
103
+ type AiChatCompletionData = {
104
+ id: string;
105
+ ullm_id: string;
106
+ cost: {
107
+ prompt_cost: number;
108
+ completion_cost: number;
109
+ };
110
+ object: string;
111
+ created: number;
112
+ model: string;
113
+ choices: Array<{
114
+ index: number;
115
+ message: {
116
+ role: string;
117
+ content: string;
118
+ };
119
+ finish_reason: string;
120
+ }>;
121
+ usage: {
122
+ prompt_tokens: number;
123
+ completion_tokens: number;
124
+ total_tokens: number;
125
+ reasoning_tokens?: number;
126
+ cache_read_tokens?: number;
127
+ cache_write_tokens?: number;
128
+ };
129
+ };
130
+ interface AiApi {
131
+ requestChatCompletionAsync(request: AiChatCompletionRequest): Promise<AiChatCompletionData>;
132
+ getAvailableCompletionModels(): Promise<Array<string>>;
133
+ }
134
+
135
+ declare enum HapticFeedbackStyle {
136
+ Light = "light",
137
+ Medium = "medium",
138
+ Heavy = "heavy",
139
+ Success = "success",
140
+ Warning = "warning",
141
+ Error = "error"
142
+ }
143
+ interface HapticsApi {
144
+ triggerHapticAsync(style: HapticFeedbackStyle): Promise<void>;
145
+ }
146
+
147
+ interface Insets {
148
+ top: number;
149
+ right: number;
150
+ bottom: number;
151
+ left: number;
152
+ }
153
+ interface PostInfo {
154
+ postId: string;
155
+ config: null;
156
+ isLiked: boolean;
157
+ isFollowing: boolean;
158
+ likesCount: number;
159
+ commentsCount: number;
160
+ }
161
+ interface PlayContext {
162
+ hudInsets: Insets;
163
+ postData?: PostInfo;
164
+ format: 'post';
165
+ }
166
+ type OnPlayCallback = (context: PlayContext) => void;
167
+ type OnPauseCallback = () => void;
168
+ type OnResumeCallback = () => void;
169
+ type OnQuitCallback = () => void;
170
+ type OnHideCallback = () => void;
171
+ interface ShowContext {
172
+ hudInsets: Insets;
173
+ postData?: PostInfo;
174
+ }
175
+ type OnShowCallback = (context: ShowContext) => void;
176
+ type OnCleanupCallback = () => void;
177
+ interface LifecycleApi {
178
+ onPlay(callback: OnPlayCallback): void;
179
+ onPause(callback: OnPauseCallback): void;
180
+ onResume(callback: OnResumeCallback): void;
181
+ onQuit(callback: OnQuitCallback): void;
182
+ onHide(callback: OnHideCallback): void;
183
+ onShow(callback: OnShowCallback): void;
184
+ onCleanup(callback: OnCleanupCallback): void;
185
+ }
186
+
187
+ interface SpendCurrencyOptions {
188
+ screenName?: string;
189
+ }
190
+ interface IapApi {
191
+ getHardCurrencyBalance(): Promise<number>;
192
+ spendCurrency(productId: string, amount: number, options?: SpendCurrencyOptions): Promise<void>;
193
+ }
194
+
195
+ interface Avatar3dConfig {
196
+ headAsset: string | null;
197
+ outfitAsset: string | null;
198
+ hatAsset: string | null;
199
+ hairAsset: string | null;
200
+ faceAccessoryAsset: string | null;
201
+ animationAsset: string | null;
202
+ skinColor: string | null;
203
+ }
204
+
205
+ interface Asset {
206
+ id: string;
207
+ filename: string;
208
+ displayName: string;
209
+ preload?: boolean;
210
+ tags?: string[];
211
+ metadata?: Record<string, any>;
212
+ }
213
+ interface Category {
214
+ displayName?: string;
215
+ type: 'mesh';
216
+ assets: Asset[];
217
+ }
218
+ interface AssetManifest {
219
+ version: string;
220
+ generatedAt: string;
221
+ categories: Record<string, Category>;
222
+ }
223
+
224
+ interface Avatar3dEdits {
225
+ wasChanged: boolean;
226
+ config: Avatar3dConfig | null;
227
+ savedAvatarId: string | null;
228
+ }
229
+ interface ShowEditorOptions {
230
+ currentAvatar?: any;
231
+ contextData?: any;
232
+ onSave?: () => void;
233
+ onCancel?: () => void;
234
+ }
235
+ interface Avatar3dApi {
236
+ loadAvatar(avatarId?: string): Promise<Avatar3dConfig | null>;
237
+ saveAvatar(config: Avatar3dConfig): Promise<string>;
238
+ deleteAvatar(): Promise<void>;
239
+ downloadManifest(): Promise<AssetManifest>;
240
+ showEditor(options?: ShowEditorOptions): Promise<Avatar3dEdits>;
241
+ downloadAssetPaths(): Promise<Record<string, string[]>>;
242
+ }
243
+
244
+ declare global {
245
+ interface Window {
246
+ VenusPrototyping?: {
247
+ showAvatarEditorOverlay: (options: any, resolve: (args: any) => void) => Promise<void>;
248
+ };
249
+ }
250
+ }
251
+ declare class MockAvatarApi implements Avatar3dApi {
252
+ private readonly _venusApi;
253
+ private cachedAssets;
254
+ private cachedVersion;
255
+ constructor(venusApi: VenusAPI);
256
+ downloadAssetPaths(): Promise<Record<string, string[]>>;
257
+ deleteAvatar(): Promise<void>;
258
+ loadAvatar(avatar3dId?: string): Promise<Avatar3dConfig | null>;
259
+ saveAvatar(config: Avatar3dConfig): Promise<string>;
260
+ downloadManifest(): Promise<AssetManifest>;
261
+ showEditor(options?: ShowEditorOptions): Promise<Avatar3dEdits>;
262
+ private getAssets;
263
+ private loadAssetsManifest;
264
+ private selectAvatarConfig;
265
+ private selectAsset;
266
+ private seededRandom;
267
+ private simpleHash;
268
+ private getAllAssetPaths;
269
+ private log;
270
+ }
271
+
272
+ /**
273
+ * DEFINITIVE TypeScript definitions for Venus H5 API
274
+ *
275
+ * This is the single source of truth for all H5 games.
276
+ *
277
+ * Usage in H5 games:
278
+ * ```typescript
279
+ * import type { VenusAPI } from '../../venus-api/types';
280
+ * declare const VenusAPI: VenusAPI;
281
+ * ```
282
+ */
283
+
284
+ interface RecipeRequirementResult {
285
+ recipeId: string;
286
+ entity: string | null;
287
+ amount?: number;
288
+ inputs: Record<string, any>;
289
+ canAfford: boolean;
290
+ disabled: boolean;
291
+ }
292
+ interface VenusSimulationState {
293
+ inventory: Record<string, number | string>;
294
+ activeRuns: Array<{
295
+ id: string;
296
+ recipeId: string;
297
+ status: string;
298
+ startTime: number;
299
+ expiresAt: number;
300
+ inputs?: Record<string, number | string>;
301
+ outputs?: Record<string, number | string>;
302
+ entity?: string;
303
+ }>;
304
+ disabledRecipes: string[];
305
+ }
306
+ interface VenusSimulationEffect {
307
+ type: string;
308
+ target: any;
309
+ value: any;
310
+ }
311
+ interface VenusSimulationRecipe {
312
+ scope: 'player' | 'room' | 'actor';
313
+ inputs: Record<string, any>;
314
+ autoRestart?: boolean;
315
+ beginEffects?: VenusSimulationEffect[];
316
+ endEffects?: VenusSimulationEffect[];
317
+ outputs?: Record<string, any>;
318
+ duration?: number;
319
+ maxRestartCondition?: any;
320
+ metadata?: {
321
+ startsDisabled?: boolean;
322
+ autoRestart?: boolean;
323
+ maxRestartCondition?: any;
324
+ };
325
+ guards?: Record<string, any>;
326
+ effects?: Array<any>;
327
+ clientViewable?: boolean;
328
+ }
329
+ interface VenusSimulationConfig {
330
+ version: string;
331
+ entities: Record<string, {
332
+ tags?: string[];
333
+ metadata?: Record<string, any>;
334
+ stackable?: boolean;
335
+ neverConsumable?: boolean;
336
+ clientViewable?: boolean;
337
+ slots?: Record<string, {
338
+ allowedTags: string[];
339
+ maxItems: number;
340
+ }>;
341
+ actorTemplate?: {
342
+ defaultState?: Record<string, any>;
343
+ availableRecipes?: string[];
344
+ };
345
+ }>;
346
+ recipes: Record<string, VenusSimulationRecipe>;
347
+ fieldResolution?: Record<string, any>;
348
+ matchmaking?: Record<string, any>;
349
+ }
350
+ interface RecipeRequirementQuery {
351
+ recipeId: string;
352
+ entity?: string;
353
+ batchAmount?: number;
354
+ }
355
+ interface BatchRecipeRequirementsResult {
356
+ success: boolean;
357
+ results: RecipeRequirementResult[];
358
+ errors?: Array<any>;
359
+ }
360
+ interface VenusSimulationAPI {
361
+ isEnabled(): boolean;
362
+ getStateAsync(options?: {
363
+ roomId?: string;
364
+ }): Promise<VenusSimulationState>;
365
+ getConfigAsync(): Promise<VenusSimulationConfig>;
366
+ executeRecipeAsync(recipeId: string, inputs?: Record<string, any>, options?: any): Promise<any>;
367
+ executeScopedRecipeAsync(recipeId: string, entity: string, inputs?: Record<string, any>, roomId?: string, options?: any): Promise<any>;
368
+ getActiveRunsAsync(): Promise<any[]>;
369
+ collectRecipeAsync(runId: string): Promise<any>;
370
+ triggerRecipeChainAsync(triggerRecipeId: string, context?: any, roomId?: string): Promise<any>;
371
+ getRecipeRequirementsAsync(recipeId: string, entity?: string, amount?: number): Promise<RecipeRequirementResult>;
372
+ getBatchRecipeRequirementsAsync(queries: RecipeRequirementQuery[]): Promise<BatchRecipeRequirementsResult>;
373
+ getAvailableRecipesAsync(roomId?: string, includeActorRecipes?: boolean): Promise<Array<any>>;
374
+ resolveFieldValueAsync(entityId: string, fieldPath: string, entity?: string): Promise<any>;
375
+ getEntityMetadataAsync(entityId: string): Promise<any>;
376
+ getSlotContainersAsync(): Promise<Array<any>>;
377
+ getSlotAssignmentsAsync(containerId: string): Promise<Array<any>>;
378
+ assignItemToSlotAsync(containerId: string, slotId: string, itemId: string): Promise<any>;
379
+ removeItemFromSlotAsync(containerId: string, slotId: string): Promise<any>;
380
+ getAvailableItemsAsync(containerId: string, slotId: string): Promise<Array<any>>;
381
+ calculatePowerPreviewAsync(containerId: string, slotId: string, candidateItemId: string): Promise<any>;
382
+ validateSlotAssignmentAsync(containerId: string, slotId: string, itemId: string): Promise<any>;
383
+ executeBatchOperationsAsync(operations: Array<any>, validateOnly?: boolean): Promise<any>;
384
+ sumContributions(contributions: Record<string, any>): Record<string, number>;
385
+ }
386
+ interface VenusConfig {
387
+ user?: {
388
+ id: string;
389
+ username?: string;
390
+ languageCode: string;
391
+ locale: string;
392
+ };
393
+ profile?: {
394
+ id: string;
395
+ username: string;
396
+ avatarUrl?: string;
397
+ };
398
+ device?: {
399
+ screenSize: {
400
+ width: number;
401
+ height: number;
402
+ };
403
+ viewportSize: {
404
+ width: number;
405
+ height: number;
406
+ };
407
+ orientation: string;
408
+ hapticsEnabled: boolean;
409
+ };
410
+ theme?: Record<string, any>;
411
+ environment?: {
412
+ isDevelopment: boolean;
413
+ platform: string;
414
+ platformVersion: string;
415
+ browserInfo?: {
416
+ browser: string;
417
+ isMobile: boolean;
418
+ };
419
+ };
420
+ ui: {
421
+ safeArea: {
422
+ top: number;
423
+ left: number;
424
+ right: number;
425
+ bottom: number;
426
+ };
427
+ controls: Record<string, any>;
428
+ };
429
+ }
430
+ interface ActionSheetOption {
431
+ label: string;
432
+ icon?: string;
433
+ id?: string;
434
+ }
435
+ interface Profile {
436
+ id: string;
437
+ name: string;
438
+ username: string;
439
+ }
440
+ interface VenusAPI {
441
+ config: VenusConfig;
442
+ _mock: any;
443
+ _bootstrap: {
444
+ apiInjected: boolean;
445
+ venus: any;
446
+ };
447
+ initializeAsync(options?: {
448
+ helpText?: string;
449
+ hardDisableMock?: boolean;
450
+ mock?: Record<string, any>;
451
+ }): Promise<boolean>;
452
+ simulation: VenusSimulationAPI;
453
+ log(message: string, ...args: any[]): void;
454
+ error(message: string, ...args: any[]): void;
455
+ isAvailable(): boolean;
456
+ isMobile(): boolean;
457
+ isWeb(): boolean;
458
+ isMock(): boolean;
459
+ /**
460
+ * @deprecated Please use the new analytics API. VenusAPI.analytics
461
+ * @param options
462
+ */
463
+ logCustomEvent(options: {
464
+ eventName: string;
465
+ params?: Record<string, any>;
466
+ }): Promise<void>;
467
+ getExperiment(options: {
468
+ experimentName: string;
469
+ }): Promise<any>;
470
+ getFeatureFlag(options: {
471
+ flagName: string;
472
+ }): Promise<any>;
473
+ getFeatureGate(options: {
474
+ gateName: string;
475
+ }): Promise<any>;
476
+ getCurrentProfile(): Profile;
477
+ /**
478
+ * @deprecated Please use the popups API. (e.g, VenusAPI.popups)
479
+ */
480
+ showToast(message: string | {
481
+ message: string;
482
+ duration?: number;
483
+ variant?: string;
484
+ action?: {
485
+ label: string;
486
+ };
487
+ }): Promise<boolean>;
488
+ /**
489
+ * @deprecated Please use the popups API. (e.g, VenusAPI.popups)
490
+ */
491
+ showAlert(options: {
492
+ title: string;
493
+ message: string;
494
+ buttonText?: string;
495
+ }): Promise<void>;
496
+ /**
497
+ * @deprecated Please use the popups API. (e.g, VenusAPI.popups)
498
+ */
499
+ showConfirm(options: {
500
+ title: string;
501
+ message: string;
502
+ confirmText?: string;
503
+ cancelText?: string;
504
+ }): Promise<boolean>;
505
+ /**
506
+ * @deprecated Please use the popups API. (e.g, VenusAPI.popups)
507
+ */
508
+ showActionSheet(options: {
509
+ title: string;
510
+ message?: string;
511
+ options: ActionSheetOption[];
512
+ cancelButtonText?: string;
513
+ disableCancel?: boolean;
514
+ }): Promise<string | number | null>;
515
+ triggerHapticAsync(style: HapticFeedbackStyle): Promise<void>;
516
+ deviceCache: {
517
+ setItem(key: string, value: string): Promise<void>;
518
+ getItem(key: string): Promise<string | null>;
519
+ removeItem(key: string): Promise<void>;
520
+ clear(): Promise<void>;
521
+ length(): Promise<number>;
522
+ key(index: number): Promise<string | null>;
523
+ };
524
+ appStorage: {
525
+ setItem(key: string, value: string): Promise<void>;
526
+ getItem(key: string): Promise<string | null>;
527
+ removeItem(key: string): Promise<void>;
528
+ clear(): Promise<void>;
529
+ length(): Promise<number>;
530
+ key(index: number): Promise<string | null>;
531
+ getAllItems(): Promise<string[]>;
532
+ setMultipleItems(items: {
533
+ key: string;
534
+ value: string;
535
+ }[]): Promise<void>;
536
+ removeMultipleItems(keys: string[]): Promise<void>;
537
+ };
538
+ globalStorage: {
539
+ setItem(key: string, value: string): Promise<void>;
540
+ getItem(key: string): Promise<string | null>;
541
+ removeItem(key: string): Promise<void>;
542
+ clear(): Promise<void>;
543
+ length(): Promise<number>;
544
+ key(index: number): Promise<string | null>;
545
+ };
546
+ onShow(handler: (context?: ShowContext) => void): void;
547
+ onPlay(handler: (context?: PlayContext) => void): void;
548
+ onPause(handler: () => void): void;
549
+ onResume(handler: () => void): void;
550
+ onQuit(handler: () => void): void;
551
+ onHide(handler: (context?: any) => void): void;
552
+ onCleanup(handler: () => void): void;
553
+ requestPopOrQuit(options?: QuitOptions): Promise<boolean>;
554
+ getPostInteractionsAsync(): Promise<any>;
555
+ getPostInteractions(): Promise<any>;
556
+ toggleLikeAsync(): Promise<any>;
557
+ toggleFollowAsync(): Promise<any>;
558
+ openCommentsAsync(options?: any): Promise<void>;
559
+ sharePostAsync(options: {
560
+ message: string;
561
+ title?: string;
562
+ additionalInfo?: any;
563
+ }): Promise<void>;
564
+ /**
565
+ * @deprecated Please use the ads API. (e.g, VenusAPI.ads)
566
+ */
567
+ isRewardedAdReadyAsync(): Promise<boolean>;
568
+ /**
569
+ * @deprecated Please use the ads API. (e.g, VenusAPI.ads)
570
+ */
571
+ showRewardedAdAsync(): Promise<boolean>;
572
+ requestTimeAsync(): Promise<{
573
+ serverTime: number;
574
+ }>;
575
+ getFutureTimeAsync(options: {
576
+ days?: number;
577
+ hours?: number;
578
+ minutes?: number;
579
+ timeOfDay?: any;
580
+ timezone?: string;
581
+ }): Promise<number>;
582
+ formatTime(timestamp: number, options?: any): string;
583
+ formatNumber(value: number, options?: any): string;
584
+ /**
585
+ * @deprecated Please use the cdn API. VenusAPI.cdn
586
+ */
587
+ fetchFromCdn(url: string, options?: RequestInit): Promise<Response>;
588
+ /**
589
+ * @deprecated Please use the cdn API. VenusAPI.cdn
590
+ */
591
+ resolveAssetUrl(path: string): string;
592
+ /**
593
+ * @deprecated Please use the cdn API. VenusAPI.cdn
594
+ */
595
+ resolveAvatarAssetUrl(path: string): string;
596
+ /**
597
+ * @deprecated Please use the cdn API. VenusAPI.cdn
598
+ */
599
+ resolveSharedLibUrl(path: string): string;
600
+ /**
601
+ * @deprecated Please use the cdn API. VenusAPI.cdn
602
+ */
603
+ getAssetCdnBaseUrl(): string;
604
+ loadAsset(url: string, options?: {
605
+ type?: string;
606
+ streaming?: boolean;
607
+ cache?: boolean;
608
+ timeout?: number;
609
+ isOptional?: boolean;
610
+ }): Promise<string>;
611
+ preloadAssets(assets: Array<string | {
612
+ url: string;
613
+ isOptional?: boolean;
614
+ }>, options?: {
615
+ onProgress?: (progress: number, info: any) => void;
616
+ }): Promise<Array<{
617
+ success: boolean;
618
+ isOptional?: boolean;
619
+ }>>;
620
+ cleanupAssets(): void;
621
+ assetLoader?: {
622
+ getCached(url: string): string | null;
623
+ };
624
+ scheduleLocalNotifAsync(options: {
625
+ title: string;
626
+ body: string;
627
+ timeFromNow: number;
628
+ data?: any;
629
+ sound?: string;
630
+ badge?: number;
631
+ }): Promise<string>;
632
+ cancelLocalNotifAsync(notificationId: string): Promise<void>;
633
+ getAllLocalNotifsAsync(): Promise<Array<any>>;
634
+ isLocalNotifEnabledAsync(): Promise<boolean>;
635
+ setLocalNotifEnabledAsync(enabled: boolean): Promise<void>;
636
+ showAvatar3dEditorAsync(options: {
637
+ currentAvatar?: any;
638
+ contextData?: any;
639
+ }): Promise<Avatar3dEdits>;
640
+ loadAvatar3dAsync(avatarId?: string): Promise<any>;
641
+ saveAvatar3dAsync(config: any): Promise<string>;
642
+ deleteAvatar3dAsync(): Promise<void>;
643
+ downloadAvatar3dAssetPathsAsync(): Promise<Record<string, string[]>>;
644
+ downloadAvatar3dManifestAsync(): Promise<AssetManifest>;
645
+ pushAppAsync(appId: string, options?: {
646
+ contextData?: any;
647
+ appParams?: any;
648
+ }): Promise<any>;
649
+ popAppAsync(): Promise<void>;
650
+ getStackInfo(): {
651
+ isInStack: boolean;
652
+ stackPosition: number;
653
+ };
654
+ rooms: {
655
+ create(options: any): Promise<any>;
656
+ join(roomId: string): Promise<any>;
657
+ joinOrCreate(options: any): Promise<any>;
658
+ };
659
+ createRoom(options: any): Promise<any>;
660
+ joinRoom(roomId: string): Promise<any>;
661
+ joinOrCreateRoom(options: any): Promise<any>;
662
+ listPublicRooms(gameType?: string, limit?: number): Promise<any>;
663
+ searchRooms(searchQuery: string, gameType?: string, limit?: number): Promise<any>;
664
+ joinRoomByCode(roomCode: string): Promise<any>;
665
+ getUserRooms(appId: string, includeArchived?: boolean): Promise<any>;
666
+ quickMatch(gameType: string): Promise<any>;
667
+ isRoomSystemEnabled(): boolean;
668
+ createGameRoom(options: any): Promise<any>;
669
+ subscribeToGameEvents(roomId: string, callback: (event: any) => void): () => void;
670
+ notifyCleanupComplete(): void;
671
+ RoomEvents: {
672
+ OPTIMISTIC_GAME_STATE_UPDATED: string;
673
+ PROPOSED_MOVE_VALIDATION_UPDATED: string;
674
+ };
675
+ numbers?: {
676
+ normalize(value: string | number): string;
677
+ };
678
+ iap: IapApi;
679
+ cdn: CdnApi;
680
+ ads: AdsApi;
681
+ ai: AiApi;
682
+ popups: PopupsApi;
683
+ analytics: AnalyticsApi;
684
+ }
685
+
686
+ interface AdsApi {
687
+ isRewardedAdReadyAsync(): Promise<boolean>;
688
+ showRewardedAdAsync(): Promise<boolean>;
689
+ showInterstitialAd(): Promise<boolean>;
690
+ }
691
+
692
+ export { type VenusConfig as $, type AnalyticsApi as A, type Avatar3dEdits as B, type CdnApi as C, type SubPath as D, type AiMessage as E, type FetchBlobOptions as F, type Asset as G, type HapticsApi as H, type IapApi as I, type Category as J, type Insets as K, type LifecycleApi as L, MockAvatarApi as M, type NavigationApi as N, type OnCleanupCallback as O, type PushAppOptions as P, type QuitOptions as Q, type RecipeRequirementResult as R, type ShowActionSheetOptions as S, type PostInfo as T, type VenusSimulationState as U, type VenusAPI as V, type VenusSimulationEffect as W, type VenusSimulationRecipe as X, type RecipeRequirementQuery as Y, type BatchRecipeRequirementsResult as Z, type VenusSimulationAPI as _, type NavigationStackInfo as a, type ActionSheetOption as a0, type PopupsApi as b, type ActionSheetItem as c, type ShowAlertOptions as d, type ShowConfirmOptions as e, type ShowToastOptions as f, type Profile as g, type AiApi as h, type AiChatCompletionRequest as i, type AiChatCompletionData as j, HapticFeedbackStyle as k, type OnShowCallback as l, type OnHideCallback as m, type OnPauseCallback as n, type OnPlayCallback as o, type OnQuitCallback as p, type OnResumeCallback as q, type PlayContext as r, type ShowContext as s, type VenusSimulationConfig as t, type SpendCurrencyOptions as u, type AdsApi as v, type Avatar3dApi as w, type AssetManifest as x, type Avatar3dConfig as y, type ShowEditorOptions as z };