@series-inc/rundot-game-sdk 5.17.0 → 5.18.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
@@ -26,7 +26,7 @@ await RundotGameAPI.initializeAsync()
26
26
 
27
27
  ## Documentation
28
28
 
29
- The complete RUN.game SDK manuals live on [Run.game Docs](https://series-1.gitbook.io/getreel-docs). Start there for setup guides, API references, tutorials, and best practices.
29
+ The complete RUN.game SDK manuals live on [Run.game Docs](https://series-1.gitbook.io/rundot-docs). Start there for setup guides, API references, tutorials, and best practices.
30
30
 
31
31
  ## Support & Links
32
32
 
@@ -1,4 +1,4 @@
1
- import { H as LeaderboardApi, I as ImageGenApi, A as AudioGenApi, V as VideoGenApi, q as SpriteGenApi, T as ThreeDGenApi } from './LeaderboardApi--NKuV2tJ.js';
1
+ import { H as LeaderboardApi, I as ImageGenApi, A as AudioGenApi, V as VideoGenApi, q as SpriteGenApi, T as ThreeDGenApi } from './LeaderboardApi-BKte9LP0.js';
2
2
 
3
3
  interface StorageApi {
4
4
  key(index: number): Promise<string | null>;
@@ -30,6 +30,10 @@ interface RpcResponse {
30
30
  result?: any;
31
31
  error?: {
32
32
  message: string;
33
+ /** Machine-readable error code (e.g. THREE_D_GEN_PROVIDER_REJECTED), when the host provides one. */
34
+ code?: string;
35
+ /** Human-readable cause from an upstream provider, when available. */
36
+ detail?: string;
33
37
  stack?: string;
34
38
  };
35
39
  }
@@ -216,7 +220,7 @@ interface ScheduleLocalNotification {
216
220
  payload?: Record<string, any>;
217
221
  trigger?: NotificationTriggerInput;
218
222
  }
219
- type RCSAvailabilityReason = 'not_subscribed' | 'no_phone' | 'feature_disabled' | 'unknown';
223
+ type RCSAvailabilityReason = 'needs_consent' | 'no_phone' | 'feature_disabled' | 'unknown';
220
224
  interface RCSAvailabilityStatus {
221
225
  available: boolean;
222
226
  reason?: RCSAvailabilityReason;
@@ -224,13 +228,66 @@ interface RCSAvailabilityStatus {
224
228
  interface ScheduleRCSInput {
225
229
  title: string;
226
230
  body: string;
231
+ /** Opaque continuation id; platform resolves to OneLink at send time. */
227
232
  ctaUrl?: string;
233
+ /** Hydrated into H5 notificationParams when the user taps the message CTA. */
234
+ continuationParams?: Record<string, string>;
228
235
  image?: string;
236
+ /** ISO8601 UTC; mutually exclusive with delaySeconds */
237
+ triggerAt?: string;
238
+ /** Seconds from now; mutually exclusive with triggerAt; max 7 days */
239
+ delaySeconds?: number;
229
240
  }
230
- type ScheduleRCSStatus = 'pending' | 'sent' | 'dry_run';
241
+ type ScheduleRCSStatus = 'pending' | 'sent' | 'dry_run' | 'failed';
231
242
  interface ScheduleRCSResult {
232
243
  scheduleId: string;
233
244
  status: ScheduleRCSStatus;
245
+ /**
246
+ * Reserved for a future schedule-status API. Not returned by
247
+ * `scheduleRCSAsync` in v1 (rate-cap deferral is handled internally at
248
+ * dispatch time).
249
+ */
250
+ estimatedSendAt?: string;
251
+ }
252
+ /**
253
+ * Optional inputs for `requestRCSOptInAsync`. The host modal interpolates
254
+ * `rewardCopy` into the heading shown to the user (e.g. "Get 100 gems —
255
+ * never miss a {{gameName}} update."). When omitted, the modal falls back
256
+ * to a generic copy.
257
+ */
258
+ interface RequestRCSOptInInput {
259
+ rewardCopy?: string;
260
+ }
261
+ /**
262
+ * Outcome of the opt-in flow as far as the game is concerned. The host
263
+ * resolves to one of these AFTER the user closes / completes the modal:
264
+ *
265
+ * - `subscribed` — user is now subscribed (newly opted-in OR
266
+ * previously confirmed) and reachable.
267
+ * - `already_subscribed` — user was already subscribed, no action taken.
268
+ * - `pending_confirmation` — user submitted; awaiting Braze double opt-in
269
+ * SMS reply ("Y"). Game should not assume the
270
+ * user is reachable yet — re-check with
271
+ * `getRCSAvailableAsync` later.
272
+ * - `declined` — user dismissed the modal ("Maybe later" /
273
+ * "I'll do it later"). No backend call made.
274
+ */
275
+ type RCSOptInStatus = 'already_subscribed' | 'subscribed' | 'declined' | 'pending_confirmation';
276
+ interface RequestRCSOptInResult {
277
+ status: RCSOptInStatus;
278
+ /**
279
+ * `true` only when this call completes with `status === 'subscribed'` because
280
+ * the user newly confirmed opt-in (typically: modal stayed open through the
281
+ * pending state until Braze double opt-in succeeded). Useful for one-shot
282
+ * rewards.
283
+ *
284
+ * `false` for `already_subscribed`, `pending_confirmation`, and `declined`.
285
+ * If the user dismisses while pending and replies "Y" later, a second call
286
+ * returns `already_subscribed` with `newlySubscribed: false` — games should
287
+ * not grant a reward in that case unless they track confirmation themselves
288
+ * (e.g. poll `getRCSAvailableAsync`).
289
+ */
290
+ newlySubscribed: boolean;
234
291
  }
235
292
  interface NotificationsApi {
236
293
  scheduleAsync(title: string, body: string, seconds: number, notificationId?: string, options?: ScheduleNotificationOptions): Promise<string | null>;
@@ -240,6 +297,13 @@ interface NotificationsApi {
240
297
  setLocalNotificationsEnabled(enabled: boolean): Promise<boolean>;
241
298
  getRCSAvailableAsync(): Promise<RCSAvailabilityStatus>;
242
299
  scheduleRCSAsync(input: ScheduleRCSInput): Promise<ScheduleRCSResult>;
300
+ /**
301
+ * Trigger the platform-owned RCS opt-in modal. The host shows one of the
302
+ * three modal states depending on whether the user has a phone on file and
303
+ * is already subscribed, then resolves with the outcome above. Games should
304
+ * call this in response to a user gesture (TCPA), not as a passive prompt.
305
+ */
306
+ requestRCSOptInAsync(input?: RequestRCSOptInInput): Promise<RequestRCSOptInResult>;
243
307
  }
244
308
 
245
309
  interface ShowToastOptions {
@@ -1312,6 +1376,8 @@ interface RundotGameMessage {
1312
1376
  value?: any;
1313
1377
  data?: any;
1314
1378
  error?: string;
1379
+ errorCode?: string;
1380
+ errorDetail?: string;
1315
1381
  script?: string;
1316
1382
  };
1317
1383
  instanceId: string;
@@ -1587,6 +1653,12 @@ interface UgcEntry {
1587
1653
  authorId: string;
1588
1654
  authorName: string;
1589
1655
  authorAvatarUrl: string | null;
1656
+ /**
1657
+ * Profile IDs permitted to edit this entry, in addition to authorId.
1658
+ * Member-scoped: populated in member reads (get-as-member, listMine, listShared)
1659
+ * and listCollaborators; discovery surfaces (browse, getMany) return [].
1660
+ */
1661
+ editorIds: string[];
1590
1662
  contentType: string;
1591
1663
  data: Record<string, unknown>;
1592
1664
  createdAt: number;
@@ -1668,6 +1740,16 @@ interface UgcListResponse {
1668
1740
  entries: UgcEntry[];
1669
1741
  nextCursor?: string;
1670
1742
  }
1743
+ interface UgcCollaboratorParams {
1744
+ /** Entry to manage collaborators on. */
1745
+ entryId: string;
1746
+ /** Profile ID of the collaborator to add/remove. */
1747
+ profileId: string;
1748
+ }
1749
+ interface UgcMembersResponse {
1750
+ authorId: string;
1751
+ editorIds: string[];
1752
+ }
1671
1753
  interface UgcBrowseResponse {
1672
1754
  entries: Array<UgcEntry & {
1673
1755
  isLikedByMe?: boolean;
@@ -1832,6 +1914,30 @@ interface UgcApi {
1832
1914
  * @returns Paginated list of entries with isLikedByMe status
1833
1915
  */
1834
1916
  browse(params?: UgcBrowseParams): Promise<UgcBrowseResponse>;
1917
+ /**
1918
+ * List entries shared with the current user (where they are an editor).
1919
+ * Mirrors listMine but for collaborator (not author) relationships.
1920
+ * @param params List parameters (optional filtering and pagination)
1921
+ * @returns Paginated list of entries
1922
+ */
1923
+ listShared(params?: UgcListParams): Promise<UgcListResponse>;
1924
+ /**
1925
+ * Add a collaborator (editor) to an entry. Author-only.
1926
+ * Idempotent; adding the author or an existing editor is a no-op.
1927
+ * @param params Entry ID and the collaborator's profile ID
1928
+ */
1929
+ addCollaborator(params: UgcCollaboratorParams): Promise<void>;
1930
+ /**
1931
+ * Remove a collaborator from an entry. Author-only, or self-leave.
1932
+ * @param params Entry ID and the collaborator's profile ID
1933
+ */
1934
+ removeCollaborator(params: UgcCollaboratorParams): Promise<void>;
1935
+ /**
1936
+ * List the author + editors of an entry. Readable by any member.
1937
+ * @param entryId Entry ID
1938
+ * @returns The author ID and editor profile IDs
1939
+ */
1940
+ listCollaborators(entryId: string): Promise<UgcMembersResponse>;
1835
1941
  /**
1836
1942
  * Like an entry
1837
1943
  * @param id Entry ID to like
@@ -2352,6 +2458,112 @@ interface FilesApi {
2352
2458
  getCompletedJobs(): Promise<FilesJobEvent[]>;
2353
2459
  }
2354
2460
 
2461
+ /** Canonical UGC contentType for recorded gameplay clips — the de-facto "clips collection". */
2462
+ declare const CLIP_CONTENT_TYPE = "clip";
2463
+ interface ClipAudioOptions {
2464
+ /** Capture the player's microphone. Default true. Gated by capture consent (T2 and below). */
2465
+ microphone?: boolean;
2466
+ /** Capture game audio (requires useGameAudio to have registered a node). Default true. */
2467
+ gameAudio?: boolean;
2468
+ }
2469
+ type ClipPipPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
2470
+ interface ClipPipLayout {
2471
+ position?: ClipPipPosition;
2472
+ widthFraction?: number;
2473
+ }
2474
+ interface ClipCameraOptions {
2475
+ facingMode?: 'user' | 'environment';
2476
+ pip?: ClipPipLayout;
2477
+ }
2478
+ interface StartClipRecordingOptions {
2479
+ /** The game canvas to record. Element, CSS selector, or omitted to auto-detect the first <canvas>. */
2480
+ canvas?: HTMLCanvasElement | string;
2481
+ fps?: number;
2482
+ /** Auto-stop after this many ms (default 60000). */
2483
+ maxDurationMs?: number;
2484
+ /** Audio knobs; both default on. Omit for game audio + mic. */
2485
+ audio?: ClipAudioOptions;
2486
+ /**
2487
+ * Enable webcam PiP overlay. `true` → front camera, bottom-right 25%.
2488
+ * Pass `ClipCameraOptions` for custom facing mode / layout.
2489
+ * Default `false` (no camera).
2490
+ */
2491
+ camera?: boolean | ClipCameraOptions;
2492
+ /** Called when camera was requested but getUserMedia rejects (recording continues without PiP). */
2493
+ onCameraUnavailable?: () => void;
2494
+ /**
2495
+ * 'auto' (default): the SDK samples the canvas continuously.
2496
+ * 'manual': the game drives frames by calling clips.captureFrame() in its render
2497
+ * loop (after world-render, before UI-render) so in-canvas UI is excluded.
2498
+ */
2499
+ captureMode?: 'auto' | 'manual';
2500
+ /** Force a specific MediaRecorder mime type (throws if unsupported). */
2501
+ mimeType?: string;
2502
+ videoBitsPerSecond?: number;
2503
+ /** Called when maxDurationMs caps capture; the caller should then call stopRecordingAsync(). */
2504
+ onAutoStop?: () => void;
2505
+ }
2506
+ interface ClipBlob {
2507
+ blob: Blob;
2508
+ mimeType: string;
2509
+ durationMs: number;
2510
+ width: number;
2511
+ height: number;
2512
+ sizeBytes: number;
2513
+ }
2514
+ interface ClipPersistOptions {
2515
+ /** 'ugc' (default) uploads + registers a private UGC entry; 'none' returns only the blob. */
2516
+ persist?: 'none' | 'ugc';
2517
+ title?: string;
2518
+ tags?: string[];
2519
+ /** Merge extra fields into the UGC data blob. */
2520
+ data?: Record<string, unknown>;
2521
+ }
2522
+ interface ClipResult extends ClipBlob {
2523
+ /** Present when persisted as UGC. */
2524
+ ugc?: UgcEntry;
2525
+ fileKey?: string;
2526
+ /** Signed, expiring URL for immediate playback only — not durable, not persisted. */
2527
+ fileUrl?: string;
2528
+ }
2529
+ interface ClipsSupport {
2530
+ canRecord: boolean;
2531
+ canUseMicrophone: boolean;
2532
+ canUseCamera: boolean;
2533
+ reason?: string;
2534
+ }
2535
+ type CaptureConsentStatus = 'granted' | 'denied' | 'undetermined';
2536
+ interface CaptureConsent {
2537
+ status: CaptureConsentStatus;
2538
+ canAskAgain: boolean;
2539
+ }
2540
+ interface ClipsApi {
2541
+ isSupportedAsync(): Promise<ClipsSupport>;
2542
+ /** Inspect the per-app capture consent without prompting. T1 apps always report granted. */
2543
+ getCaptureConsentAsync(): Promise<CaptureConsent>;
2544
+ /**
2545
+ * Pop the app-owned native consent harness (T2 and below) to collect/refresh consent.
2546
+ * Pass `includesCamera` when the upcoming recording uses the webcam so the correct
2547
+ * device permission (camera vs microphone) drives the single-opt-in decision.
2548
+ */
2549
+ requestCaptureConsentAsync(opts?: {
2550
+ includesCamera?: boolean;
2551
+ }): Promise<CaptureConsent>;
2552
+ /** Register the game's master Web Audio output node so clips can capture game audio. */
2553
+ useGameAudio(node: AudioNode): void;
2554
+ startRecordingAsync(options?: StartClipRecordingOptions): Promise<void>;
2555
+ /**
2556
+ * In captureMode 'manual', snapshot the current game canvas into the recording
2557
+ * surface (call once per render frame, after world-render and before UI-render,
2558
+ * to exclude in-canvas UI). No-op when not recording or in 'auto' mode.
2559
+ */
2560
+ captureFrame(): void;
2561
+ stopRecordingAsync(persist?: ClipPersistOptions): Promise<ClipResult>;
2562
+ cancelRecordingAsync(): Promise<void>;
2563
+ /** Promote a private clip UGC entry to shared (file + UGC visibility -> public). */
2564
+ publishClipAsync(ugcId: string): Promise<UgcEntry>;
2565
+ }
2566
+
2355
2567
  interface Entitlement {
2356
2568
  docId: string;
2357
2569
  userId: string;
@@ -3002,6 +3214,7 @@ interface Host {
3002
3214
  readonly audioGen: AudioGenApi;
3003
3215
  readonly videoGen: VideoGenApi;
3004
3216
  readonly files: FilesApi;
3217
+ readonly clips: ClipsApi;
3005
3218
  readonly spriteGen: SpriteGenApi;
3006
3219
  readonly threeDGen: ThreeDGenApi;
3007
3220
  readonly entitlements: EntitlementApi;
@@ -3497,6 +3710,7 @@ interface RundotGameAPI {
3497
3710
  audioGen: AudioGenApi;
3498
3711
  videoGen: VideoGenApi;
3499
3712
  files: FilesApi;
3713
+ clips: ClipsApi;
3500
3714
  spriteGen: SpriteGenApi;
3501
3715
  threeDGen: ThreeDGenApi;
3502
3716
  entitlements: EntitlementApi;
@@ -3523,4 +3737,4 @@ interface AdsApi {
3523
3737
  showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
3524
3738
  }
3525
3739
 
3526
- export { type FetchFromCdnOptions as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type RCSAvailabilityStatus as F, type ScheduleRCSInput as G, type Host as H, type ScheduleRCSResult as I, type PopupsApi as J, type ShowToastOptions as K, type ShowInterstitialAdOptions as L, type ShowRewardedAdOptions as M, type NavigationApi as N, type ProfileApi as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type DeviceApi as T, type DeviceInfo as U, type EnvironmentApi as V, type EnvironmentInfo as W, type SystemApi as X, type SafeArea as Y, type AddToHomeScreenResult as Z, type CdnApi as _, type RecipeRequirementQuery as a, type SpendCurrencyOptions as a$, type AssetUrlResult as a0, type TimeApi as a1, type ServerTimeData as a2, type GetFutureTimeOptions as a3, type AiApi as a4, type AiChatCompletionRequest as a5, type AiChatCompletionData as a6, type AiChatCompletionStreamOptions as a7, type AiChatCompletionStreamChunk as a8, type HapticsApi as a9, type GetActiveRunsOptions as aA, type ExecuteScopedRecipeOptions as aB, type ExecuteScopedRecipeResult as aC, type GetAvailableRecipesOptions as aD, type GetAvailableRecipesResult as aE, type Recipe as aF, type GetBatchRecipeRequirements as aG, type TriggerRecipeChainOptions as aH, type RoomDataUpdate as aI, type RoomMessageEvent as aJ, type ProposedMoveEvent as aK, RundotGameTransport as aL, type RoomsApi as aM, type CreateRoomOptions as aN, type JoinOrCreateRoomOptions as aO, type JoinOrCreateResult as aP, type ListRoomsOptions as aQ, type UpdateRoomDataOptions as aR, type RoomMessageRequest as aS, type StartRoomGameOptions as aT, type ProposeMoveRequest as aU, type ProposeMoveResult as aV, type ValidateMoveVerdict as aW, type ValidateMoveResult as aX, type RoomSubscriptionOptions as aY, type LoggingApi as aZ, type IapApi as a_, HapticFeedbackStyle as aa, type FeaturesApi as ab, type Experiment as ac, type LifecycleApi as ad, type SleepCallback as ae, type Subscription as af, type AwakeCallback as ag, type PauseCallback as ah, type ResumeCallback as ai, type QuitCallback as aj, type BackButtonCallback as ak, type SimulationApi as al, type SimulationSlotValidationResult as am, type SimulationBatchOperation as an, type SimulationBatchOperationsResult as ao, type SimulationAvailableItem as ap, type SimulationPowerPreview as aq, type SimulationSlotMutationResult as ar, type SimulationSlotContainer as as, type SimulationAssignment as at, type SimulationState as au, type ExecuteRecipeOptions as av, type ExecuteRecipeResponse as aw, type CollectRecipeResult as ax, type ResetStateOptions as ay, type ResetStateResult as az, type RecipeRequirementResult as b, type FilesApi as b$, type SpendCurrencyResult as b0, type SubscriptionTier as b1, type RunSubscriptionsResponse as b2, type SubscriptionInterval as b3, type PurchaseSubscriptionResponse as b4, type OpenStoreResult as b5, type LoadEmbeddedAssetsResponse as b6, type SharedAssetsApi as b7, type PreloaderApi as b8, type SocialApi as b9, type AdminSpriteGenApi as bA, type AdminAudioGenApi as bB, type AdminThreeDGenApi as bC, type AppRole as bD, type AdminUgcBrowseParams as bE, type AdminUgcBrowseResponse as bF, type AdminUgcListReportsParams as bG, type AdminUgcListReportsResponse as bH, type AdminUgcResolveAction as bI, type AdminGenBrowseParams as bJ, type AdminGenBrowseResponse as bK, type ImageGenEntry as bL, type AdminGenListReportsParams as bM, type AdminGenListReportsResponse as bN, type ImageGenReport as bO, type AdminGenResolveAction as bP, type SpriteGenEntry as bQ, type SpriteGenReport as bR, type ThreeDGenEntry as bS, type ThreeDGenReport as bT, type Avatar3dApi as bU, type AssetManifest as bV, type Avatar3dConfig as bW, type ShowEditorOptions as bX, type Avatar3dEdits as bY, type AdsApi as bZ, type SharedStorageHostApi as b_, type ShareMetadata as ba, type ShareLinkResult as bb, type SocialQRCodeOptions as bc, type QRCodeResult as bd, type ShareClickData as be, type ShareFileOptions as bf, type ShareFileResult as bg, type CanShareFileResult as bh, type EntitlementApi as bi, type Entitlement as bj, type LedgerEntry as bk, type ShopApi as bl, type StorefrontResponse as bm, type StorefrontItem as bn, type ShopPurchaseResponse as bo, type ShopOrderHistoryResponse as bp, type PromptLoginResult as bq, type AccessTier as br, type AccessGateApi as bs, type TextGenApi as bt, type UgcApi as bu, type VideoApi as bv, type AppApi as bw, type AdminUgcApi as bx, type AdminImageGenApi as by, type AdminVideoGenApi as bz, type RundotGameAvailableRecipe as c, type RoomMessageEventType as c$, type MultiplayerApi as c0, type AttributionApi as c1, type InitializationContext as c2, type InitializationOptions as c3, AccessDeniedError as c4, type AdminGenApi as c5, type AdminImageGenBrowseParams as c6, type AdminImageGenBrowseResponse as c7, type AdminImageGenListReportsParams as c8, type AdminImageGenListReportsResponse as c9, type AudioGenEntry as cA, type AudioGenReport as cB, type Category as cC, type ConnectionState as cD, type GetSubscriptionsForTierRequest as cE, type HudInsets as cF, type InboundForKeyEntry as cG, type InboundMethodIds as cH, type InboundStorageApi as cI, type IsPlayerSubscribedRequest as cJ, type JoinOrCreateRoomEnvelopeResponse as cK, type JoinRoomMatchCriteria as cL, type LoadEmbeddedAssetsRequest as cM, MockAvatarApi as cN, type NotificationTriggerInput as cO, type OnNotificationCallback as cP, type OnRequestCallback as cQ, type OnResponseCallback as cR, type ProposedMovePayload as cS, type Protocol as cT, type PurchaseSubscriptionRequest as cU, type RCSAvailabilityReason as cV, ROOM_GAME_PHASES as cW, type RecipeInfo as cX, type RoomEnvelopeResponse as cY, type RoomEvents as cZ, type RoomGamePhase as c_, type AdminImageGenResolveAction as ca, type AdminSpriteGenBrowseParams as cb, type AdminSpriteGenBrowseResponse as cc, type AdminSpriteGenListReportsParams as cd, type AdminSpriteGenListReportsResponse as ce, type AdminSpriteGenResolveAction as cf, type AdminThreeDGenBrowseParams as cg, type AdminThreeDGenBrowseResponse as ch, type AdminThreeDGenListReportsParams as ci, type AdminThreeDGenListReportsResponse as cj, type AdminThreeDGenResolveAction as ck, type AdminUgcEntry as cl, type AdminVideoGenBrowseParams as cm, type AdminVideoGenBrowseResponse as cn, type AdminVideoGenListReportsParams as co, type AdminVideoGenListReportsResponse as cp, type AdminVideoGenResolveAction as cq, type AiContentBlock as cr, type AiImageContent as cs, type AiImageUrlContent as ct, type AiMessage as cu, type AiResponseFormat as cv, type AiTextContent as cw, type AiToolResultContent as cx, type AiToolUseContent as cy, type Asset as cz, type RundotGameCollectRecipeResult as d, type RoomMessagePayload as d0, type RoomsEnvelopeResponse as d1, RpcInboundStorageApi as d2, RpcSharedAssetsApi as d3, type RpcTransport as d4, type RunSubscription as d5, type RundotGameRoomCustomMetadata as d6, type RundotGameRoomPayload as d7, type RundotGameRoomRules as d8, type RundotGameRoomRulesGameState as d9, SHARE_FILE_ALLOWED_MIME_TYPES as da, SHARE_FILE_MAX_SIZE_BYTES as db, type ScheduleRCSStatus as dc, type ServerPlayer as dd, type ServerRoom as de, type ShareFileMimeType as df, type ShopOrder as dg, type SimulationBatchOperationAssign as dh, type SimulationBatchOperationRemove as di, type SimulationBatchOperationResult as dj, type SimulationPersonalState as dk, type SimulationRoomActiveRecipe as dl, type SimulationRoomState as dm, type StorefrontCollection as dn, type StorefrontCollectionItem as dp, type SubPath as dq, type Tool as dr, type ToolChoice as ds, type ToolUse as dt, type TimeIntervalTriggerInput as du, type UgcReport as dv, type VideoGenEntry as dw, type VideoGenReport as dx, createHost as dy, resolveCollectionItemPrice as dz, type RundotGameExecuteRecipeOptions as e, type RundotGameExecuteRecipeResult as f, type RundotGameExecuteScopedRecipeOptions as g, RundotGameRoom as h, type RundotGameSimulationConfig as i, type RundotGameSimulationEffect as j, type RundotGameSimulationRecipe as k, type RundotGameSimulationStateResponse as l, type SimulationEntityUpdate as m, type SimulationRunSummary as n, type SimulationSnapshotUpdate as o, type SimulationSubscribeOptions as p, type SimulationUpdateData as q, type SimulationUpdateType as r, type RpcRequest as s, type RpcResponse as t, type RpcNotification as u, RpcClient as v, type StorageApi as w, type NavigationStackInfo as x, type PushAppOptions as y, type NavigateToGameOptions as z };
3740
+ export { type AddToHomeScreenResult as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type RCSAvailabilityStatus as F, type ScheduleRCSInput as G, type Host as H, type ScheduleRCSResult as I, type RequestRCSOptInInput as J, type RequestRCSOptInResult as K, type PopupsApi as L, type ShowToastOptions as M, type NavigationApi as N, type ShowInterstitialAdOptions as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type ShowRewardedAdOptions as T, type ProfileApi as U, type DeviceApi as V, type DeviceInfo as W, type EnvironmentApi as X, type EnvironmentInfo as Y, type SystemApi as Z, type SafeArea as _, type RecipeRequirementQuery as a, type LoggingApi as a$, type CdnApi as a0, type FetchFromCdnOptions as a1, type AssetUrlResult as a2, type TimeApi as a3, type ServerTimeData as a4, type GetFutureTimeOptions as a5, type AiApi as a6, type AiChatCompletionRequest as a7, type AiChatCompletionData as a8, type AiChatCompletionStreamOptions as a9, type ResetStateOptions as aA, type ResetStateResult as aB, type GetActiveRunsOptions as aC, type ExecuteScopedRecipeOptions as aD, type ExecuteScopedRecipeResult as aE, type GetAvailableRecipesOptions as aF, type GetAvailableRecipesResult as aG, type Recipe as aH, type GetBatchRecipeRequirements as aI, type TriggerRecipeChainOptions as aJ, type RoomDataUpdate as aK, type RoomMessageEvent as aL, type ProposedMoveEvent as aM, RundotGameTransport as aN, type RoomsApi as aO, type CreateRoomOptions as aP, type JoinOrCreateRoomOptions as aQ, type JoinOrCreateResult as aR, type ListRoomsOptions as aS, type UpdateRoomDataOptions as aT, type RoomMessageRequest as aU, type StartRoomGameOptions as aV, type ProposeMoveRequest as aW, type ProposeMoveResult as aX, type ValidateMoveVerdict as aY, type ValidateMoveResult as aZ, type RoomSubscriptionOptions as a_, type AiChatCompletionStreamChunk as aa, type HapticsApi as ab, HapticFeedbackStyle as ac, type FeaturesApi as ad, type Experiment as ae, type LifecycleApi as af, type SleepCallback as ag, type Subscription as ah, type AwakeCallback as ai, type PauseCallback as aj, type ResumeCallback as ak, type QuitCallback as al, type BackButtonCallback as am, type SimulationApi as an, type SimulationSlotValidationResult as ao, type SimulationBatchOperation as ap, type SimulationBatchOperationsResult as aq, type SimulationAvailableItem as ar, type SimulationPowerPreview as as, type SimulationSlotMutationResult as at, type SimulationSlotContainer as au, type SimulationAssignment as av, type SimulationState as aw, type ExecuteRecipeOptions as ax, type ExecuteRecipeResponse as ay, type CollectRecipeResult as az, type RecipeRequirementResult as b, type AdsApi as b$, type IapApi as b0, type SpendCurrencyOptions as b1, type SpendCurrencyResult as b2, type SubscriptionTier as b3, type RunSubscriptionsResponse as b4, type SubscriptionInterval as b5, type PurchaseSubscriptionResponse as b6, type OpenStoreResult as b7, type LoadEmbeddedAssetsResponse as b8, type SharedAssetsApi as b9, type AdminImageGenApi as bA, type AdminVideoGenApi as bB, type AdminSpriteGenApi as bC, type AdminAudioGenApi as bD, type AdminThreeDGenApi as bE, type AppRole as bF, type AdminUgcBrowseParams as bG, type AdminUgcBrowseResponse as bH, type AdminUgcListReportsParams as bI, type AdminUgcListReportsResponse as bJ, type AdminUgcResolveAction as bK, type AdminGenBrowseParams as bL, type AdminGenBrowseResponse as bM, type ImageGenEntry as bN, type AdminGenListReportsParams as bO, type AdminGenListReportsResponse as bP, type ImageGenReport as bQ, type AdminGenResolveAction as bR, type SpriteGenEntry as bS, type SpriteGenReport as bT, type ThreeDGenEntry as bU, type ThreeDGenReport as bV, type Avatar3dApi as bW, type AssetManifest as bX, type Avatar3dConfig as bY, type ShowEditorOptions as bZ, type Avatar3dEdits as b_, type PreloaderApi as ba, type SocialApi as bb, type ShareMetadata as bc, type ShareLinkResult as bd, type SocialQRCodeOptions as be, type QRCodeResult as bf, type ShareClickData as bg, type ShareFileOptions as bh, type ShareFileResult as bi, type CanShareFileResult as bj, type EntitlementApi as bk, type Entitlement as bl, type LedgerEntry as bm, type ShopApi as bn, type StorefrontResponse as bo, type StorefrontItem as bp, type ShopPurchaseResponse as bq, type ShopOrderHistoryResponse as br, type PromptLoginResult as bs, type AccessTier as bt, type AccessGateApi as bu, type TextGenApi as bv, type UgcApi as bw, type VideoApi as bx, type AppApi as by, type AdminUgcApi as bz, type RundotGameAvailableRecipe as c, type JoinRoomMatchCriteria as c$, type SharedStorageHostApi as c0, type FilesApi as c1, type ClipsApi as c2, type MultiplayerApi as c3, type AttributionApi as c4, type InitializationContext as c5, type InitializationOptions as c6, type CaptureConsent as c7, type StartClipRecordingOptions as c8, type ClipBlob as c9, type AdminVideoGenListReportsResponse as cA, type AdminVideoGenResolveAction as cB, type AiContentBlock as cC, type AiImageContent as cD, type AiImageUrlContent as cE, type AiMessage as cF, type AiResponseFormat as cG, type AiTextContent as cH, type AiToolResultContent as cI, type AiToolUseContent as cJ, type Asset as cK, type AudioGenEntry as cL, type AudioGenReport as cM, CLIP_CONTENT_TYPE as cN, type Category as cO, type ClipAudioOptions as cP, type ClipCameraOptions as cQ, type ClipPipLayout as cR, type ClipPipPosition as cS, type ConnectionState as cT, type GetSubscriptionsForTierRequest as cU, type HudInsets as cV, type InboundForKeyEntry as cW, type InboundMethodIds as cX, type InboundStorageApi as cY, type IsPlayerSubscribedRequest as cZ, type JoinOrCreateRoomEnvelopeResponse as c_, type ClipsSupport as ca, type ClipPersistOptions as cb, type ClipResult as cc, type UgcEntry as cd, type CaptureConsentStatus as ce, AccessDeniedError as cf, type AdminGenApi as cg, type AdminImageGenBrowseParams as ch, type AdminImageGenBrowseResponse as ci, type AdminImageGenListReportsParams as cj, type AdminImageGenListReportsResponse as ck, type AdminImageGenResolveAction as cl, type AdminSpriteGenBrowseParams as cm, type AdminSpriteGenBrowseResponse as cn, type AdminSpriteGenListReportsParams as co, type AdminSpriteGenListReportsResponse as cp, type AdminSpriteGenResolveAction as cq, type AdminThreeDGenBrowseParams as cr, type AdminThreeDGenBrowseResponse as cs, type AdminThreeDGenListReportsParams as ct, type AdminThreeDGenListReportsResponse as cu, type AdminThreeDGenResolveAction as cv, type AdminUgcEntry as cw, type AdminVideoGenBrowseParams as cx, type AdminVideoGenBrowseResponse as cy, type AdminVideoGenListReportsParams as cz, type RundotGameCollectRecipeResult as d, type LoadEmbeddedAssetsRequest as d0, MockAvatarApi as d1, type NotificationTriggerInput as d2, type OnNotificationCallback as d3, type OnRequestCallback as d4, type OnResponseCallback as d5, type ProposedMovePayload as d6, type Protocol as d7, type PurchaseSubscriptionRequest as d8, type RCSAvailabilityReason as d9, type SimulationBatchOperationRemove as dA, type SimulationBatchOperationResult as dB, type SimulationPersonalState as dC, type SimulationRoomActiveRecipe as dD, type SimulationRoomState as dE, type StorefrontCollection as dF, type StorefrontCollectionItem as dG, type SubPath as dH, type Tool as dI, type ToolChoice as dJ, type ToolUse as dK, type TimeIntervalTriggerInput as dL, type UgcReport as dM, type VideoGenEntry as dN, type VideoGenReport as dO, createHost as dP, resolveCollectionItemPrice as dQ, type RCSOptInStatus as da, ROOM_GAME_PHASES as db, type RecipeInfo as dc, type RoomEnvelopeResponse as dd, type RoomEvents as de, type RoomGamePhase as df, type RoomMessageEventType as dg, type RoomMessagePayload as dh, type RoomsEnvelopeResponse as di, RpcInboundStorageApi as dj, RpcSharedAssetsApi as dk, type RpcTransport as dl, type RunSubscription as dm, type RundotGameRoomCustomMetadata as dn, type RundotGameRoomPayload as dp, type RundotGameRoomRules as dq, type RundotGameRoomRulesGameState as dr, SHARE_FILE_ALLOWED_MIME_TYPES as ds, SHARE_FILE_MAX_SIZE_BYTES as dt, type ScheduleRCSStatus as du, type ServerPlayer as dv, type ServerRoom as dw, type ShareFileMimeType as dx, type ShopOrder as dy, type SimulationBatchOperationAssign as dz, type RundotGameExecuteRecipeOptions as e, type RundotGameExecuteRecipeResult as f, type RundotGameExecuteScopedRecipeOptions as g, RundotGameRoom as h, type RundotGameSimulationConfig as i, type RundotGameSimulationEffect as j, type RundotGameSimulationRecipe as k, type RundotGameSimulationStateResponse as l, type SimulationEntityUpdate as m, type SimulationRunSummary as n, type SimulationSnapshotUpdate as o, type SimulationSubscribeOptions as p, type SimulationUpdateData as q, type SimulationUpdateType as r, type RpcRequest as s, type RpcResponse as t, type RpcNotification as u, RpcClient as v, type StorageApi as w, type NavigationStackInfo as x, type PushAppOptions as y, type NavigateToGameOptions as z };
@@ -1,4 +1,4 @@
1
- type ImageGenModel = 'gemini-3.1-flash-image-preview' | 'gemini-3-pro-image-preview';
1
+ type ImageGenModel = 'gemini-3.1-flash-image-preview' | 'gemini-3-pro-image-preview' | 'gpt-image-1' | 'gpt-image-2';
2
2
  type BgRemovalModel = 'bria' | 'birefnet';
3
3
  type BiRefNetVariant = 'light' | 'heavy' | 'portrait';
4
4
  interface RemoveBackgroundOptions {
@@ -29,10 +29,22 @@ interface ImageGenParams {
29
29
  removeBackground?: boolean | RemoveBackgroundOptions;
30
30
  /** Model to use. Defaults to 'gemini-3.1-flash-image-preview' (Nano Banana 2). */
31
31
  model?: ImageGenModel;
32
+ /**
33
+ * Native output resolution. Only supported by 'gemini-3-pro-image-preview'
34
+ * (Nano Banana Pro); passing it with any other model is rejected. Defaults to
35
+ * '1K'. Use '2K' or '4K' for studio-quality output.
36
+ */
37
+ imageSize?: '1K' | '2K' | '4K';
32
38
  }
33
39
  interface ImageGenResult {
40
+ /** UUID assigned by the server for this generation. */
41
+ generationId: string;
34
42
  imageUrl: string;
35
43
  prompt: string;
44
+ /** Resolved model name (server may upgrade deprecated aliases). */
45
+ model: string;
46
+ /** Seed used (echoed back even when client did not specify one). */
47
+ seed: number;
36
48
  }
37
49
  interface ImageGenJobEvent {
38
50
  jobId: string;
@@ -107,13 +119,19 @@ interface AudioGenSFXParams {
107
119
  /** Opaque correlation ID echoed back in job events for client-side recovery. */
108
120
  clientRef?: string;
109
121
  }
122
+ type MusicModel = 'elevenlabs' | 'lyria3' | 'lyria3-pro' | 'minimax-music-2.6';
110
123
  interface AudioGenMusicParams {
111
124
  type: 'music';
112
125
  provider?: AudioGenProvider;
113
126
  /** Genre, tempo, instruments, mood — "orchestral victory fanfare, triumphant brass" */
114
127
  prompt: string;
115
- /** Duration in seconds (REQUIRED, 1–300). */
128
+ /**
129
+ * Duration in seconds (3–300). Required for ElevenLabs; ignored by FAL
130
+ * models which produce a fixed-length track.
131
+ */
116
132
  durationSec: number;
133
+ /** Music generation model. Default: 'elevenlabs'. */
134
+ model?: MusicModel;
117
135
  /** Opaque correlation ID echoed back in job events for client-side recovery. */
118
136
  clientRef?: string;
119
137
  }
@@ -303,6 +321,10 @@ interface SpriteGenParams {
303
321
  width?: number;
304
322
  height?: number;
305
323
  bgMode?: 'transparent' | 'white' | 'include';
324
+ /** Disable smart-crop (auto-crop to content bounds). Default true. Set false to get exact requested dimensions. */
325
+ smartCrop?: boolean;
326
+ /** Disable pixel-perfect grid alignment. Default true. Can alter output dimensions slightly. */
327
+ pixelPerfect?: boolean;
306
328
  theme?: string;
307
329
  style?: string;
308
330
  colors?: string[];
@@ -370,7 +392,7 @@ interface SpriteGenApi {
370
392
  getCompletedJobs(): Promise<SpriteGenJobEvent[]>;
371
393
  }
372
394
 
373
- type ThreeDGenProvider = 'pixal3d' | 'hunyuan3d-v3.1-pro' | 'trellis-2';
395
+ type ThreeDGenProvider = 'pixal3d' | 'hunyuan3d-v3.1-pro' | 'trellis-2' | 'meshy';
374
396
  type ThreeDGenMode = 'image-to-3d' | 'text-to-3d';
375
397
  type ThreeDGenQuality = 'draft' | 'standard' | 'high';
376
398
  interface ThreeDGenBase {
@@ -431,7 +453,25 @@ interface Trellis2ImageTo3DParams extends ThreeDGenBase {
431
453
  imageUrl: string;
432
454
  providerOptions?: Record<string, never>;
433
455
  }
434
- type ThreeDGenParams = Pixal3DImageTo3DParams | HunyuanImageTo3DParams | HunyuanTextTo3DParams | Trellis2ImageTo3DParams;
456
+ /** Meshy native generation provider options (texture + PBR controls). */
457
+ interface MeshyProviderOptions {
458
+ should_texture?: boolean;
459
+ enable_pbr?: boolean;
460
+ ai_model?: string;
461
+ }
462
+ interface MeshyImageTo3DParams extends ThreeDGenBase {
463
+ provider: 'meshy';
464
+ mode: 'image-to-3d';
465
+ imageUrl: string;
466
+ providerOptions?: MeshyProviderOptions;
467
+ }
468
+ interface MeshyTextTo3DParams extends ThreeDGenBase {
469
+ provider: 'meshy';
470
+ mode: 'text-to-3d';
471
+ prompt: string;
472
+ providerOptions?: MeshyProviderOptions;
473
+ }
474
+ type ThreeDGenParams = Pixal3DImageTo3DParams | HunyuanImageTo3DParams | HunyuanTextTo3DParams | Trellis2ImageTo3DParams | MeshyImageTo3DParams | MeshyTextTo3DParams;
435
475
  interface ThreeDGenResult {
436
476
  generationId: string;
437
477
  modelUrl: string;