@rtsdk/topia 0.19.2 → 0.19.4

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/dist/index.d.ts CHANGED
@@ -106,7 +106,7 @@ type WorldOptions = {
106
106
  credentials?: InteractiveCredentials | undefined;
107
107
  };
108
108
 
109
- type ResponseType$1 = {
109
+ type ResponseType = {
110
110
  message?: string;
111
111
  statusCode?: number;
112
112
  success?: boolean;
@@ -139,7 +139,7 @@ declare class Scene extends SDKController implements SceneInterface {
139
139
  * const { name } = scene;
140
140
  * ```
141
141
  */
142
- fetchSceneById(): Promise<void | ResponseType$1>;
142
+ fetchSceneById(): Promise<void | ResponseType>;
143
143
  }
144
144
 
145
145
  /**
@@ -178,7 +178,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
178
178
  * const { assetName } = droppedAsset;
179
179
  * ```
180
180
  */
181
- fetchDroppedAssetById(): Promise<void | ResponseType$1>;
181
+ fetchDroppedAssetById(): Promise<void | ResponseType>;
182
182
  /**
183
183
  * Updates dropped asset details and assigns the response data to the instance. Requires Public Key to have the `canUpdateDroppedAssets` permission.
184
184
  *
@@ -211,7 +211,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
211
211
  * const { assetName } = droppedAsset;
212
212
  * ```
213
213
  */
214
- updateDroppedAsset({ assetScale, audioRadius, audioSliderVolume, clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, flipped, isInteractive, isTextTopLayer, isVideo, interactivePublicKey, layer0, layer1, mediaLink, mediaName, mediaType, portalName, position, specialType, syncUserMedia, text, textColor, textSize, textWeight, textWidth, uniqueName, yOrderAdjust, }: UpdateDroppedAssetInterface): Promise<void | ResponseType$1>;
214
+ updateDroppedAsset({ assetScale, audioRadius, audioSliderVolume, clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, flipped, isInteractive, isTextTopLayer, isVideo, interactivePublicKey, layer0, layer1, mediaLink, mediaName, mediaType, portalName, position, specialType, syncUserMedia, text, textColor, textSize, textWeight, textWidth, uniqueName, yOrderAdjust, }: UpdateDroppedAssetInterface): Promise<void | ResponseType>;
215
215
  /**
216
216
  * Deletes the dropped asset (removes it from the world).
217
217
  *
@@ -222,7 +222,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
222
222
  * await droppedAsset.deleteDroppedAsset();
223
223
  * ```
224
224
  */
225
- deleteDroppedAsset(): Promise<void | ResponseType$1>;
225
+ deleteDroppedAsset(): Promise<void | ResponseType>;
226
226
  /**
227
227
  * Retrieves the data object for a dropped asset.
228
228
  *
@@ -237,7 +237,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
237
237
  *
238
238
  * @returns {Promise<object | ResponseType>} Returns the data object or an error response.
239
239
  */
240
- fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType$1>;
240
+ fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType>;
241
241
  /**
242
242
  * Sets the data object for a dropped asset and assigns the response data to the instance.
243
243
  *
@@ -271,7 +271,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
271
271
  lockId: string;
272
272
  releaseLock?: boolean;
273
273
  };
274
- }): Promise<void | ResponseType$1>;
274
+ }): Promise<void | ResponseType>;
275
275
  /**
276
276
  * Updates the data object for a dropped asset and assigns the response data to the instance.
277
277
  *
@@ -302,7 +302,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
302
302
  lockId: string;
303
303
  releaseLock?: boolean;
304
304
  };
305
- }): Promise<void | ResponseType$1>;
305
+ }): Promise<void | ResponseType>;
306
306
  /**
307
307
  * Increments a specific value in the data object for a dropped asset by the amount specified. Must have valid interactive credentials from a visitor in the world.
308
308
  *
@@ -328,7 +328,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
328
328
  lockId: string;
329
329
  releaseLock?: boolean;
330
330
  };
331
- }): Promise<void | ResponseType$1>;
331
+ }): Promise<void | ResponseType>;
332
332
  /**
333
333
  * Updates broadcast options for a dropped asset.
334
334
  *
@@ -345,7 +345,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
345
345
  *
346
346
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
347
347
  */
348
- updateBroadcast({ assetBroadcast, assetBroadcastAll, broadcasterEmail, }: UpdateBroadcastInterface): Promise<void | ResponseType$1>;
348
+ updateBroadcast({ assetBroadcast, assetBroadcastAll, broadcasterEmail, }: UpdateBroadcastInterface): Promise<void | ResponseType>;
349
349
  /**
350
350
  * Updates click options for a dropped asset.
351
351
  *
@@ -369,7 +369,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
369
369
  *
370
370
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
371
371
  */
372
- updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }: UpdateClickTypeInterface): Promise<void | ResponseType$1>;
372
+ updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }: UpdateClickTypeInterface): Promise<void | ResponseType>;
373
373
  /**
374
374
  * Adds an array of links to an asset. Maximum is 20 links.
375
375
  *
@@ -397,7 +397,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
397
397
  *
398
398
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
399
399
  */
400
- setClickableLinkMulti({ clickableLinks }: SetClickableLinkMultiInterface): Promise<void | ResponseType$1>;
400
+ setClickableLinkMulti({ clickableLinks }: SetClickableLinkMultiInterface): Promise<void | ResponseType>;
401
401
  /**
402
402
  * Updates multiple clickable links for a dropped asset.
403
403
  *
@@ -419,7 +419,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
419
419
  *
420
420
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
421
421
  */
422
- updateClickableLinkMulti({ clickableLink, clickableLinkTitle, isForceLinkInIframe, isOpenLinkInDrawer, existingLinkId, linkSamlQueryParams, }: UpdateClickableLinkMultiInterface): Promise<void | ResponseType$1>;
422
+ updateClickableLinkMulti({ clickableLink, clickableLinkTitle, isForceLinkInIframe, isOpenLinkInDrawer, existingLinkId, linkSamlQueryParams, }: UpdateClickableLinkMultiInterface): Promise<void | ResponseType>;
423
423
  /**
424
424
  * Removes a clickable link from a dropped asset.
425
425
  *
@@ -432,7 +432,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
432
432
  *
433
433
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
434
434
  */
435
- removeClickableLink({ linkId }: RemoveClickableLinkInterface): Promise<void | ResponseType$1>;
435
+ removeClickableLink({ linkId }: RemoveClickableLinkInterface): Promise<void | ResponseType>;
436
436
  /**
437
437
  * Updates text and style of a dropped asset.
438
438
  *
@@ -452,7 +452,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
452
452
  *
453
453
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
454
454
  */
455
- updateCustomTextAsset(style: object | undefined | null, text: string | null | undefined): Promise<void | ResponseType$1>;
455
+ updateCustomTextAsset(style: object | undefined | null, text: string | null | undefined): Promise<void | ResponseType>;
456
456
  /**
457
457
  * Updates media options for a dropped asset.
458
458
  *
@@ -474,7 +474,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
474
474
  *
475
475
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
476
476
  */
477
- updateMediaType({ audioRadius, audioSliderVolume, isVideo, mediaLink, mediaName, mediaType, portalName, syncUserMedia, }: UpdateMediaTypeInterface): Promise<void | ResponseType$1>;
477
+ updateMediaType({ audioRadius, audioSliderVolume, isVideo, mediaLink, mediaName, mediaType, portalName, syncUserMedia, }: UpdateMediaTypeInterface): Promise<void | ResponseType>;
478
478
  /**
479
479
  * Updates mute zone options for a dropped asset.
480
480
  *
@@ -487,7 +487,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
487
487
  *
488
488
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
489
489
  */
490
- updateMuteZone(isMutezone: boolean): Promise<void | ResponseType$1>;
490
+ updateMuteZone(isMutezone: boolean): Promise<void | ResponseType>;
491
491
  /**
492
492
  * Updates landmark zone options for a dropped asset.
493
493
  *
@@ -508,7 +508,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
508
508
  isLandmarkZoneEnabled: boolean;
509
509
  landmarkZoneName?: string;
510
510
  landmarkZoneIsVisible?: boolean;
511
- }): Promise<void | ResponseType$1>;
511
+ }): Promise<void | ResponseType>;
512
512
  /**
513
513
  * Updates webhook zone options for a dropped asset.
514
514
  *
@@ -521,7 +521,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
521
521
  *
522
522
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
523
523
  */
524
- updateWebhookZone(isWebhookZoneEnabled: boolean): Promise<void | ResponseType$1>;
524
+ updateWebhookZone(isWebhookZoneEnabled: boolean): Promise<void | ResponseType>;
525
525
  /**
526
526
  * Moves a dropped asset to specified coordinates.
527
527
  *
@@ -534,7 +534,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
534
534
  *
535
535
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
536
536
  */
537
- updatePosition(x: number, y: number, yOrderAdjust?: number): Promise<void | ResponseType$1>;
537
+ updatePosition(x: number, y: number, yOrderAdjust?: number): Promise<void | ResponseType>;
538
538
  /**
539
539
  * Updates private zone options for a dropped asset.
540
540
  *
@@ -551,7 +551,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
551
551
  *
552
552
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
553
553
  */
554
- updatePrivateZone({ isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap, }: UpdatePrivateZoneInterface): Promise<void | ResponseType$1>;
554
+ updatePrivateZone({ isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap, }: UpdatePrivateZoneInterface): Promise<void | ResponseType>;
555
555
  /**
556
556
  * Updates the size of a dropped asset.
557
557
  *
@@ -564,7 +564,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
564
564
  *
565
565
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
566
566
  */
567
- updateScale(assetScale: number): Promise<void | ResponseType$1>;
567
+ updateScale(assetScale: number): Promise<void | ResponseType>;
568
568
  /**
569
569
  * Flip an dropped asset.
570
570
  *
@@ -577,7 +577,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
577
577
  *
578
578
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
579
579
  */
580
- flip(): Promise<void | ResponseType$1>;
580
+ flip(): Promise<void | ResponseType>;
581
581
  /**
582
582
  * Change or remove media embedded in a dropped asset.
583
583
  *
@@ -590,7 +590,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
590
590
  *
591
591
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
592
592
  */
593
- updateUploadedMediaSelected(mediaId: string): Promise<void | ResponseType$1>;
593
+ updateUploadedMediaSelected(mediaId: string): Promise<void | ResponseType>;
594
594
  /**
595
595
  * Change or remove top and bottom layers of a dropped asset.
596
596
  *
@@ -603,7 +603,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
603
603
  *
604
604
  * @returns {Promise<void | ResponseType>} Returns the updated dropped asset or an error.
605
605
  */
606
- updateWebImageLayers(bottom: string, top: string): Promise<void | ResponseType$1>;
606
+ updateWebImageLayers(bottom: string, top: string): Promise<void | ResponseType>;
607
607
  /**
608
608
  * Add a webhook to a dropped asset
609
609
  *
@@ -650,7 +650,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
650
650
  setInteractiveSettings({ isInteractive, interactivePublicKey, }: {
651
651
  isInteractive?: boolean;
652
652
  interactivePublicKey: string;
653
- }): Promise<void | ResponseType$1>;
653
+ }): Promise<void | ResponseType>;
654
654
  /**
655
655
  * Checks if this dropped asset exists with the current app's public key installed.
656
656
  *
@@ -686,7 +686,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
686
686
  periodType: "week" | "month" | "quarter" | "year";
687
687
  dateValue: number;
688
688
  year: number;
689
- }): Promise<void | ResponseType$1>;
689
+ }): Promise<void | ResponseType>;
690
690
  }
691
691
 
692
692
  /**
@@ -724,7 +724,7 @@ declare class World extends SDKController implements WorldInterface {
724
724
  * const { name } = world;
725
725
  * ```
726
726
  */
727
- fetchDetails(): Promise<void | ResponseType$1>;
727
+ fetchDetails(): Promise<void | ResponseType>;
728
728
  /**
729
729
  * Update details of a world.
730
730
  *
@@ -750,7 +750,7 @@ declare class World extends SDKController implements WorldInterface {
750
750
  * const { name, description } = world;
751
751
  * ```
752
752
  */
753
- updateDetails({ controls, description, forceAuthOnLogin, height, name, spawnPosition, width, }: WorldDetailsInterface): Promise<void | ResponseType$1>;
753
+ updateDetails({ controls, description, forceAuthOnLogin, height, name, spawnPosition, width, }: WorldDetailsInterface): Promise<void | ResponseType>;
754
754
  /**
755
755
  * Set close world settings
756
756
  *
@@ -779,7 +779,7 @@ declare class World extends SDKController implements WorldInterface {
779
779
  updateCloseWorldSettings({ closeWorldDescription, isWorldClosed, }: {
780
780
  closeWorldDescription: string;
781
781
  isWorldClosed: boolean;
782
- }): Promise<void | ResponseType$1>;
782
+ }): Promise<void | ResponseType>;
783
783
  /**
784
784
  * Retrieve all assets dropped in a world.
785
785
  *
@@ -793,7 +793,7 @@ declare class World extends SDKController implements WorldInterface {
793
793
  * const assets = world.droppedAssets;
794
794
  * ```
795
795
  */
796
- fetchDroppedAssets(): Promise<void | ResponseType$1>;
796
+ fetchDroppedAssets(): Promise<void | ResponseType>;
797
797
  /**
798
798
  * Retrieve all assets dropped in a world matching uniqueName.
799
799
  *
@@ -888,7 +888,7 @@ declare class World extends SDKController implements WorldInterface {
888
888
  * { sceneDropIds: [] }
889
889
  * ```
890
890
  */
891
- fetchSceneDropIds(): Promise<object | ResponseType$1>;
891
+ fetchSceneDropIds(): Promise<object | ResponseType>;
892
892
  /**
893
893
  * Fetch a list of all scene drop ids and dropped assets in a world
894
894
  *
@@ -920,7 +920,7 @@ declare class World extends SDKController implements WorldInterface {
920
920
  * }
921
921
  * ```
922
922
  */
923
- fetchScenes(): Promise<object | ResponseType$1>;
923
+ fetchScenes(): Promise<object | ResponseType>;
924
924
  /**
925
925
  * Drops a scene in a world and returns sceneDropId.
926
926
  *
@@ -951,7 +951,7 @@ declare class World extends SDKController implements WorldInterface {
951
951
  position: object;
952
952
  sceneDropId?: string;
953
953
  sceneId: string;
954
- }): Promise<ResponseType$1>;
954
+ }): Promise<ResponseType>;
955
955
  /**
956
956
  * Replace the current scene of a world.
957
957
  *
@@ -974,7 +974,7 @@ declare class World extends SDKController implements WorldInterface {
974
974
  *
975
975
  * @returns {Promise<void | ResponseType>} Returns `{ success: true }` or an error.
976
976
  */
977
- replaceScene(sceneId: string): Promise<void | ResponseType$1>;
977
+ replaceScene(sceneId: string): Promise<void | ResponseType>;
978
978
  /**
979
979
  * Get all particles available
980
980
  *
@@ -989,7 +989,7 @@ declare class World extends SDKController implements WorldInterface {
989
989
  * @returns {Promise<ResponseType>} Returns an array of particles or an error response.
990
990
  * ```
991
991
  */
992
- getAllParticles(): Promise<object | ResponseType$1>;
992
+ getAllParticles(): Promise<object | ResponseType>;
993
993
  /**
994
994
  * Trigger a particle effect at a position in the world
995
995
  *
@@ -1011,7 +1011,7 @@ declare class World extends SDKController implements WorldInterface {
1011
1011
  name?: string;
1012
1012
  duration?: number;
1013
1013
  position?: object;
1014
- }): Promise<ResponseType$1 | string>;
1014
+ }): Promise<ResponseType | string>;
1015
1015
  /**
1016
1016
  * Add an activity to a world
1017
1017
  * excludeFromNotification is an array of visitorIds to exclude from the notification
@@ -1029,7 +1029,7 @@ declare class World extends SDKController implements WorldInterface {
1029
1029
  type: WorldActivityType;
1030
1030
  assetId: string;
1031
1031
  excludeFromNotification?: (string | number)[];
1032
- }): Promise<ResponseType$1 | string>;
1032
+ }): Promise<ResponseType | string>;
1033
1033
  /**
1034
1034
  * Display a message via a toast to all visitors currently in a world.
1035
1035
  *
@@ -1046,7 +1046,7 @@ declare class World extends SDKController implements WorldInterface {
1046
1046
  *
1047
1047
  * @returns {Promise<void | ResponseType>} Returns `{ success: true }` or an error.
1048
1048
  */
1049
- fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType$1>;
1049
+ fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType>;
1050
1050
  /**
1051
1051
  * Retrieves the data object for a world. Must have valid interactive credentials from a visitor in the world.
1052
1052
  *
@@ -1060,7 +1060,7 @@ declare class World extends SDKController implements WorldInterface {
1060
1060
  * const { dataObject } = world;
1061
1061
  * ```
1062
1062
  */
1063
- fetchDataObject: (appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string) => Promise<void | ResponseType$1>;
1063
+ fetchDataObject: (appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string) => Promise<void | ResponseType>;
1064
1064
  /**
1065
1065
  * Sets the data object for a user. Must have valid interactive credentials from a visitor in the world.
1066
1066
  *
@@ -1093,7 +1093,7 @@ declare class World extends SDKController implements WorldInterface {
1093
1093
  lockId: string;
1094
1094
  releaseLock?: boolean;
1095
1095
  };
1096
- }) => Promise<void | ResponseType$1>;
1096
+ }) => Promise<void | ResponseType>;
1097
1097
  /**
1098
1098
  * Updates the data object for a world. Must have valid interactive credentials from a visitor in the world.
1099
1099
  *
@@ -1123,7 +1123,7 @@ declare class World extends SDKController implements WorldInterface {
1123
1123
  lockId: string;
1124
1124
  releaseLock?: boolean;
1125
1125
  };
1126
- }) => Promise<void | ResponseType$1>;
1126
+ }) => Promise<void | ResponseType>;
1127
1127
  /**
1128
1128
  * Increments a specific value in the data object for a world by the amount specified. Must have valid interactive credentials from a visitor in the world.
1129
1129
  *
@@ -1149,7 +1149,7 @@ declare class World extends SDKController implements WorldInterface {
1149
1149
  lockId: string;
1150
1150
  releaseLock?: boolean;
1151
1151
  };
1152
- }): Promise<void | ResponseType$1>;
1152
+ }): Promise<void | ResponseType>;
1153
1153
  /**
1154
1154
  * Retrieve all webhooks in a world.
1155
1155
  *
@@ -1163,7 +1163,7 @@ declare class World extends SDKController implements WorldInterface {
1163
1163
  * const webhooks = world.webhooks;
1164
1164
  * ```
1165
1165
  */
1166
- fetchWebhooks(): Promise<void | ResponseType$1>;
1166
+ fetchWebhooks(): Promise<void | ResponseType>;
1167
1167
  /**
1168
1168
  * Retrieve world analytics by day, week, month, quarter, or year
1169
1169
  *
@@ -1184,7 +1184,7 @@ declare class World extends SDKController implements WorldInterface {
1184
1184
  periodType: "week" | "month" | "quarter" | "year";
1185
1185
  dateValue: number;
1186
1186
  year: number;
1187
- }): Promise<void | ResponseType$1>;
1187
+ }): Promise<void | ResponseType>;
1188
1188
  }
1189
1189
 
1190
1190
  /**
@@ -1192,6 +1192,10 @@ declare class World extends SDKController implements WorldInterface {
1192
1192
  *
1193
1193
  * @remarks
1194
1194
  * This class should be instantiated via UserInventoryItemFactory only.
1195
+ * UserInventoryItem represents an instance of an InventoryItem owned by a specific user or visitor.
1196
+ * It includes ownership details like quantity, grant_source, and user-specific metadata.
1197
+ *
1198
+ * @keywords inventory, item, user, visitor, owned, granted
1195
1199
  *
1196
1200
  * @property inventoryItemId - The root inventory item's id
1197
1201
  */
@@ -1205,52 +1209,26 @@ declare class UserInventoryItem extends InventoryItem implements UserInventoryIt
1205
1209
  metadata?: object | null;
1206
1210
  grant_source: string;
1207
1211
  type: string;
1212
+ image_url: string;
1208
1213
  profile_id?: string | null;
1214
+ item: UserInventoryItemMetadataType;
1209
1215
  constructor(topia: Topia, id: string, options?: UserInventoryItemOptionalInterface);
1210
1216
  /**
1211
1217
  * Fetches the user inventory item details from the platform and assigns them to this instance.
1212
1218
  *
1213
- * @example
1214
- * ```ts
1215
- * await userInventoryItem.fetchUserInventoryItemById();
1216
- * ```
1219
+ * @keywords get, fetch, retrieve, load, user, inventory, item, details, owned
1217
1220
  *
1218
- * @returns {Promise<void>} Returns when the item has been fetched and assigned.
1219
- */
1220
- fetchUserInventoryItemById(): Promise<void>;
1221
- }
1222
-
1223
- /**
1224
- * InventoryItem represents an item in a user's inventory.
1225
- *
1226
- * @remarks
1227
- * This class should be instantiated via InventoryFactory only.
1228
- *
1229
- * @keywords inventory, item, asset, object
1230
- */
1231
- declare class InventoryItem extends SDKController implements InventoryItemInterface {
1232
- id: string;
1233
- name?: string;
1234
- description?: string;
1235
- type?: string;
1236
- created_at?: Date;
1237
- updated_at?: Date;
1238
- metadata?: object | null;
1239
- image_path?: string;
1240
- interactive_key_id?: string;
1241
- status?: string;
1242
- constructor(topia: Topia, id: string, options?: InventoryItemOptionalInterface);
1243
- /**
1244
- * Fetches the inventory item details from the platform and assigns them to this instance.
1221
+ * @category Inventory
1245
1222
  *
1246
1223
  * @example
1247
1224
  * ```ts
1248
- * await item.fetchInventoryItemById();
1225
+ * await userInventoryItem.fetchUserInventoryItemById();
1226
+ * const { quantity, grant_source, item } = userInventoryItem;
1249
1227
  * ```
1250
1228
  *
1251
- * @returns {Promise<InventoryItem>} Returns when the item has been fetched and assigned.
1229
+ * @returns {Promise<void>} Populates this UserInventoryItem instance with all properties from the platform.
1252
1230
  */
1253
- fetchInventoryItemById(): Promise<InventoryItem>;
1231
+ fetchUserInventoryItemById(): Promise<void>;
1254
1232
  }
1255
1233
 
1256
1234
  /**
@@ -1284,7 +1262,7 @@ declare class User extends SDKController implements UserInterface {
1284
1262
  get worlds(): {
1285
1263
  [key: string]: World;
1286
1264
  };
1287
- checkInteractiveCredentials(): Promise<void | ResponseType$1>;
1265
+ checkInteractiveCredentials(): Promise<void | ResponseType>;
1288
1266
  /**
1289
1267
  * Returns all avatars owned by User
1290
1268
  *
@@ -1299,7 +1277,7 @@ declare class User extends SDKController implements UserInterface {
1299
1277
  *
1300
1278
  * @returns {Promise<void | ResponseType>} Returns the avatars or an error.
1301
1279
  */
1302
- fetchAvatars(): Promise<void | ResponseType$1>;
1280
+ fetchAvatars(): Promise<void | ResponseType>;
1303
1281
  /**
1304
1282
  * Add a new avatar
1305
1283
  *
@@ -1373,7 +1351,7 @@ declare class User extends SDKController implements UserInterface {
1373
1351
  * await user.uploadAvatarFiles("exampleAvatarId", formData);
1374
1352
  * ```
1375
1353
  */
1376
- addAvatar(formData: FormData): Promise<void | ResponseType$1>;
1354
+ addAvatar(formData: FormData): Promise<void | ResponseType>;
1377
1355
  /**
1378
1356
  * Update avatar and sprite sheet records and upload files to existing sprite sheet and avatar storage buckets
1379
1357
  *
@@ -1447,7 +1425,7 @@ declare class User extends SDKController implements UserInterface {
1447
1425
  * await user.uploadAvatarFiles("exampleAvatarId", formData);
1448
1426
  * ```
1449
1427
  */
1450
- updateAvatar(avatarId: string, formData: FormData): Promise<void | ResponseType$1>;
1428
+ updateAvatar(avatarId: string, formData: FormData): Promise<void | ResponseType>;
1451
1429
  /**
1452
1430
  * Update avatar and sprite sheet records and upload files to existing sprite sheet and avatar storage buckets
1453
1431
  *
@@ -1460,7 +1438,7 @@ declare class User extends SDKController implements UserInterface {
1460
1438
  * await user.deleteAvatar("exampleAvatarId");
1461
1439
  * ```
1462
1440
  */
1463
- deleteAvatar(avatarId: string): Promise<void | ResponseType$1>;
1441
+ deleteAvatar(avatarId: string): Promise<void | ResponseType>;
1464
1442
  /**
1465
1443
  * Returns all assets owned by User when an email address is provided.
1466
1444
  *
@@ -1474,7 +1452,7 @@ declare class User extends SDKController implements UserInterface {
1474
1452
  * const userAssets = user.assets;
1475
1453
  * ```
1476
1454
  */
1477
- fetchAssets(): Promise<void | ResponseType$1>;
1455
+ fetchAssets(): Promise<void | ResponseType>;
1478
1456
  /**
1479
1457
  * Returns all platform assets.
1480
1458
  *
@@ -1489,7 +1467,7 @@ declare class User extends SDKController implements UserInterface {
1489
1467
  *
1490
1468
  * @returns {Promise<object | ResponseType>} Returns the platform assets or an error response.
1491
1469
  */
1492
- fetchPlatformAssets(): Promise<object | ResponseType$1>;
1470
+ fetchPlatformAssets(): Promise<object | ResponseType>;
1493
1471
  /**
1494
1472
  * Returns all scenes owned by User.
1495
1473
  *
@@ -1503,7 +1481,7 @@ declare class User extends SDKController implements UserInterface {
1503
1481
  * const userScenes = user.scenes;
1504
1482
  * ```
1505
1483
  */
1506
- fetchScenes(): Promise<void | ResponseType$1>;
1484
+ fetchScenes(): Promise<void | ResponseType>;
1507
1485
  /**
1508
1486
  * Retrieves all worlds owned by user with matching API Key, creates a new World object for each, and creates new map of Worlds accessible via user.worlds.
1509
1487
  *
@@ -1522,7 +1500,7 @@ declare class User extends SDKController implements UserInterface {
1522
1500
  * { urlSlug: new World({ apiKey, worldArgs, urlSlug }) }
1523
1501
  * ```
1524
1502
  */
1525
- fetchWorldsByKey(): Promise<void | ResponseType$1>;
1503
+ fetchWorldsByKey(): Promise<void | ResponseType>;
1526
1504
  /**
1527
1505
  * Retrieves all worlds a user with matching API Key is an admin in, creates a new World object for each, and creates new map of Worlds accessible via user.adminWorlds.
1528
1506
  *
@@ -1536,7 +1514,7 @@ declare class User extends SDKController implements UserInterface {
1536
1514
  * const adminWorlds = user.adminWorlds;
1537
1515
  * ```
1538
1516
  */
1539
- fetchAdminWorldsByKey(): Promise<void | ResponseType$1>;
1517
+ fetchAdminWorldsByKey(): Promise<void | ResponseType>;
1540
1518
  /**
1541
1519
  * Retrieves ids of all dropped assets in all worlds with a matching interactivePublicKey.
1542
1520
  *
@@ -1552,7 +1530,7 @@ declare class User extends SDKController implements UserInterface {
1552
1530
  *
1553
1531
  * @returns {Promise<object | ResponseType>} Returns the `urlSlugs` of worlds where the Public Key is found or an error response.
1554
1532
  */
1555
- fetchInteractiveWorldsByKey(interactivePublicKey: string): Promise<object | ResponseType$1>;
1533
+ fetchInteractiveWorldsByKey(interactivePublicKey: string): Promise<object | ResponseType>;
1556
1534
  /**
1557
1535
  * Send an email
1558
1536
  *
@@ -1570,7 +1548,7 @@ declare class User extends SDKController implements UserInterface {
1570
1548
  html: string;
1571
1549
  subject: string;
1572
1550
  to: string;
1573
- }): Promise<object | ResponseType$1>;
1551
+ }): Promise<object | ResponseType>;
1574
1552
  /**
1575
1553
  * Get expressions
1576
1554
  *
@@ -1588,7 +1566,7 @@ declare class User extends SDKController implements UserInterface {
1588
1566
  getExpressions({ name, getUnlockablesOnly, }: {
1589
1567
  name?: string;
1590
1568
  getUnlockablesOnly?: boolean;
1591
- }): Promise<ResponseType$1>;
1569
+ }): Promise<ResponseType>;
1592
1570
  /**
1593
1571
  * Retrieves the data object for a user.
1594
1572
  *
@@ -1603,7 +1581,7 @@ declare class User extends SDKController implements UserInterface {
1603
1581
  *
1604
1582
  * @returns {Promise<object | ResponseType>} Returns the data object or an error response.
1605
1583
  */
1606
- fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType$1>;
1584
+ fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType>;
1607
1585
  /**
1608
1586
  * Sets the data object for a user.
1609
1587
  *
@@ -1637,7 +1615,7 @@ declare class User extends SDKController implements UserInterface {
1637
1615
  lockId: string;
1638
1616
  releaseLock?: boolean;
1639
1617
  };
1640
- }): Promise<void | ResponseType$1>;
1618
+ }): Promise<void | ResponseType>;
1641
1619
  /**
1642
1620
  * Updates the data object for a user.
1643
1621
  *
@@ -1669,7 +1647,7 @@ declare class User extends SDKController implements UserInterface {
1669
1647
  lockId: string;
1670
1648
  releaseLock?: boolean;
1671
1649
  };
1672
- }): Promise<void | ResponseType$1>;
1650
+ }): Promise<void | ResponseType>;
1673
1651
  /**
1674
1652
  * Increments a specific value in the data object for a user by the amount specified. Must have valid interactive credentials from a visitor in the world.
1675
1653
  *
@@ -1695,7 +1673,7 @@ declare class User extends SDKController implements UserInterface {
1695
1673
  lockId: string;
1696
1674
  releaseLock?: boolean;
1697
1675
  };
1698
- }): Promise<void | ResponseType$1>;
1676
+ }): Promise<void | ResponseType>;
1699
1677
  /**
1700
1678
  * Retrieves all inventory items owned by this user and app's key.
1701
1679
  *
@@ -1723,7 +1701,7 @@ declare class User extends SDKController implements UserInterface {
1723
1701
  *
1724
1702
  * @returns {Promise<UserInventoryItem>} Returns the UserInventoryItem granted.
1725
1703
  */
1726
- grantInventoryItem(item: InventoryItem, quantity?: number): Promise<UserInventoryItem>;
1704
+ grantInventoryItem(item: InventoryItemInterface, quantity?: number): Promise<UserInventoryItem>;
1727
1705
  /**
1728
1706
  * Modifies the quantity of an inventory item in this user's inventory.
1729
1707
  *
@@ -1737,7 +1715,45 @@ declare class User extends SDKController implements UserInterface {
1737
1715
  *
1738
1716
  * @returns {Promise<UserInventoryItem>} Returns the updated inventory item or a response object.
1739
1717
  */
1740
- modifyInventoryItemQuantity(item: UserInventoryItem, quantity: number): Promise<UserInventoryItem>;
1718
+ modifyInventoryItemQuantity(item: UserInventoryItemInterface, quantity: number): Promise<UserInventoryItem>;
1719
+ }
1720
+
1721
+ /**
1722
+ * InventoryItem represents an item in a user's inventory.
1723
+ *
1724
+ * @remarks
1725
+ * This class should be instantiated via InventoryFactory only.
1726
+ *
1727
+ * @keywords inventory, item, asset, object
1728
+ */
1729
+ declare class InventoryItem extends SDKController implements InventoryItemInterface {
1730
+ id: string;
1731
+ name?: string;
1732
+ description?: string;
1733
+ type?: string;
1734
+ created_at?: Date;
1735
+ updated_at?: Date;
1736
+ metadata?: object | null;
1737
+ image_path?: string;
1738
+ interactive_key_id?: string;
1739
+ status?: string;
1740
+ constructor(topia: Topia, id: string, options?: InventoryItemOptionalInterface);
1741
+ /**
1742
+ * Fetches the inventory item details from the platform and assigns them to this instance.
1743
+ *
1744
+ * @keywords get, fetch, retrieve, load, inventory, item, details
1745
+ *
1746
+ * @category Inventory
1747
+ *
1748
+ * @example
1749
+ * ```ts
1750
+ * await item.fetchInventoryItemById();
1751
+ * const { name, description, type } = item;
1752
+ * ```
1753
+ *
1754
+ * @returns {Promise<InventoryItem>} Returns this InventoryItem instance with all properties populated from the platform.
1755
+ */
1756
+ fetchInventoryItemById(): Promise<InventoryItem>;
1741
1757
  }
1742
1758
 
1743
1759
  /**
@@ -1769,7 +1785,7 @@ declare class Visitor extends User implements VisitorInterface {
1769
1785
  * @returns
1770
1786
  * Returns details for a visitor in a world by id and urlSlug
1771
1787
  */
1772
- fetchVisitor(): Promise<void | ResponseType$1>;
1788
+ fetchVisitor(): Promise<void | ResponseType>;
1773
1789
  /**
1774
1790
  * Teleport or walk a visitor currently in a world to a single set of coordinates.
1775
1791
  *
@@ -1787,7 +1803,7 @@ declare class Visitor extends User implements VisitorInterface {
1787
1803
  * @returns
1788
1804
  * Returns `{ success: true }` if the visitor was moved successfully.
1789
1805
  */
1790
- moveVisitor({ shouldTeleportVisitor, x, y }: MoveVisitorInterface): Promise<void | ResponseType$1>;
1806
+ moveVisitor({ shouldTeleportVisitor, x, y }: MoveVisitorInterface): Promise<void | ResponseType>;
1791
1807
  /**
1792
1808
  * Display a message via a toast to a visitor currently in a world.
1793
1809
  *
@@ -1804,7 +1820,7 @@ declare class Visitor extends User implements VisitorInterface {
1804
1820
  *
1805
1821
  * @returns {Promise<void | ResponseType>} Returns `{ success: true }` or an error.
1806
1822
  */
1807
- fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType$1>;
1823
+ fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType>;
1808
1824
  /**
1809
1825
  * Open an iframe in a drawer or modal for a visitor currently in a world.
1810
1826
  *
@@ -1824,7 +1840,7 @@ declare class Visitor extends User implements VisitorInterface {
1824
1840
  *
1825
1841
  * @returns {Promise<void | ResponseType>} Returns `{ success: true }` or an error.
1826
1842
  */
1827
- openIframe({ droppedAssetId, link, shouldOpenInDrawer, title, }: OpenIframeInterface): Promise<void | ResponseType$1>;
1843
+ openIframe({ droppedAssetId, link, shouldOpenInDrawer, title, }: OpenIframeInterface): Promise<void | ResponseType>;
1828
1844
  /**
1829
1845
  * Reload an iframe for a visitor currently in a world.
1830
1846
  *
@@ -1839,7 +1855,7 @@ declare class Visitor extends User implements VisitorInterface {
1839
1855
  *
1840
1856
  * @returns {Promise<void | ResponseType>} Returns `{ success: true }` or an error.
1841
1857
  */
1842
- reloadIframe(droppedAssetId: string): Promise<void | ResponseType$1>;
1858
+ reloadIframe(droppedAssetId: string): Promise<void | ResponseType>;
1843
1859
  /**
1844
1860
  * Close an iframe for a visitor currently in a world.
1845
1861
  *
@@ -1854,7 +1870,7 @@ declare class Visitor extends User implements VisitorInterface {
1854
1870
  *
1855
1871
  * @returns {Promise<void | ResponseType>} Returns `{ success: true }` or an error.
1856
1872
  */
1857
- closeIframe(droppedAssetId: string): Promise<void | ResponseType$1>;
1873
+ closeIframe(droppedAssetId: string): Promise<void | ResponseType>;
1858
1874
  /**
1859
1875
  * Mute and turn video off for a visitor currently in a world.
1860
1876
  *
@@ -1867,7 +1883,7 @@ declare class Visitor extends User implements VisitorInterface {
1867
1883
  *
1868
1884
  * @returns {Promise<void | ResponseType>} Returns `{ success: true }` or an error.
1869
1885
  */
1870
- turnAVOff(): Promise<void | ResponseType$1>;
1886
+ turnAVOff(): Promise<void | ResponseType>;
1871
1887
  /**
1872
1888
  * Get expressions
1873
1889
  *
@@ -1884,7 +1900,7 @@ declare class Visitor extends User implements VisitorInterface {
1884
1900
  getExpressions({ name, getUnlockablesOnly, }: {
1885
1901
  name?: string;
1886
1902
  getUnlockablesOnly?: boolean;
1887
- }): Promise<ResponseType$1>;
1903
+ }): Promise<ResponseType>;
1888
1904
  /**
1889
1905
  * Grant expression to a visitor by id or name.
1890
1906
  *
@@ -1903,7 +1919,7 @@ declare class Visitor extends User implements VisitorInterface {
1903
1919
  grantExpression({ id, name }: {
1904
1920
  id?: string;
1905
1921
  name?: string;
1906
- }): Promise<ResponseType$1>;
1922
+ }): Promise<ResponseType>;
1907
1923
  /**
1908
1924
  * Get all particles available
1909
1925
  *
@@ -1918,7 +1934,7 @@ declare class Visitor extends User implements VisitorInterface {
1918
1934
  *
1919
1935
  * @returns {Promise<ResponseType>} Returns an array of particles or an error response.
1920
1936
  */
1921
- getAllParticles(): Promise<ResponseType$1>;
1937
+ getAllParticles(): Promise<ResponseType>;
1922
1938
  /**
1923
1939
  * Trigger a particle effect on a visitor
1924
1940
  *
@@ -1937,7 +1953,7 @@ declare class Visitor extends User implements VisitorInterface {
1937
1953
  id?: string;
1938
1954
  name?: string;
1939
1955
  duration?: number;
1940
- }): Promise<ResponseType$1 | string>;
1956
+ }): Promise<ResponseType | string>;
1941
1957
  /**
1942
1958
  * Retrieves the data object for a visitor.
1943
1959
  *
@@ -1952,7 +1968,7 @@ declare class Visitor extends User implements VisitorInterface {
1952
1968
  *
1953
1969
  * @returns {Promise<object | ResponseType>} Returns the data object or an error response.
1954
1970
  */
1955
- fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType$1>;
1971
+ fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType>;
1956
1972
  /**
1957
1973
  * Sets the data object for a visitor.
1958
1974
  *
@@ -1986,7 +2002,7 @@ declare class Visitor extends User implements VisitorInterface {
1986
2002
  lockId: string;
1987
2003
  releaseLock?: boolean;
1988
2004
  };
1989
- }): Promise<void | ResponseType$1>;
2005
+ }): Promise<void | ResponseType>;
1990
2006
  /**
1991
2007
  * Updates the data object for a visitor.
1992
2008
  *
@@ -2018,7 +2034,7 @@ declare class Visitor extends User implements VisitorInterface {
2018
2034
  lockId: string;
2019
2035
  releaseLock?: boolean;
2020
2036
  };
2021
- }): Promise<void | ResponseType$1>;
2037
+ }): Promise<void | ResponseType>;
2022
2038
  /**
2023
2039
  * Increments a specific value in the data object for a visitor by the amount specified. Must have valid interactive credentials from a visitor in the world.
2024
2040
  *
@@ -2044,7 +2060,7 @@ declare class Visitor extends User implements VisitorInterface {
2044
2060
  lockId: string;
2045
2061
  releaseLock?: boolean;
2046
2062
  };
2047
- }): Promise<void | ResponseType$1>;
2063
+ }): Promise<void | ResponseType>;
2048
2064
  /**
2049
2065
  * Update analytics for a given public key. Must have valid interactive credentials from a visitor in the world.
2050
2066
  *
@@ -2055,7 +2071,7 @@ declare class Visitor extends User implements VisitorInterface {
2055
2071
  * await visitor.updatePublicKeyAnalytics([{ analyticName: "joins", profileId, uniqueKey: profileId, urlSlug }]);
2056
2072
  * ```
2057
2073
  */
2058
- updatePublicKeyAnalytics(analytics?: AnalyticType[]): Promise<void | ResponseType$1>;
2074
+ updatePublicKeyAnalytics(analytics?: AnalyticType[]): Promise<void | ResponseType>;
2059
2075
  /**
2060
2076
  * Setup signal to visitor
2061
2077
  *
@@ -2066,7 +2082,7 @@ declare class Visitor extends User implements VisitorInterface {
2066
2082
  * await visitor.sendSignalToVisitor(iceServers);
2067
2083
  * ```
2068
2084
  */
2069
- sendSignalToVisitor(signal: any): Promise<void | (ResponseType$1 & {
2085
+ sendSignalToVisitor(signal: any): Promise<void | (ResponseType & {
2070
2086
  answerSignal: any;
2071
2087
  })>;
2072
2088
  /**
@@ -2083,23 +2099,52 @@ declare class Visitor extends User implements VisitorInterface {
2083
2099
  */
2084
2100
  fetchInventoryItem(item: InventoryItem): Promise<UserInventoryItem>;
2085
2101
  /**
2086
- * Gets an NPC for this visitor, if one exists.
2102
+ * Retrieves the NPC (Non-Player Character) associated with this visitor, if one exists.
2103
+ *
2104
+ * @remarks
2105
+ * Each visitor can have one NPC per application public key. NPCs are AI-controlled
2106
+ * characters that follow the visitor around the world. They are created using inventory
2107
+ * items of type "npc" and appear as additional avatars that track the visitor's position.
2108
+ * If no NPC exists for this visitor and app, returns null.
2109
+ *
2110
+ * @keywords get, fetch, retrieve, npc, bot, follower, character, assistant, companion
2111
+ *
2112
+ * @category NPCs
2087
2113
  *
2088
2114
  * @example
2089
2115
  * ```ts
2090
- * await visitor.getNpc();
2116
+ * const npc = await visitor.getNpc();
2117
+ * if (npc) {
2118
+ * console.log(`NPC position: ${npc.position}`);
2119
+ * console.log(`NPC ID: ${npc.id}`);
2120
+ * } else {
2121
+ * console.log('No NPC found for this visitor');
2122
+ * }
2091
2123
  * ```
2092
2124
  *
2093
- * @returns {Promise<Visitor | null>} Returns a Visitor object representing the NPC.
2125
+ * @returns {Promise<Visitor | null>} Returns a Visitor object representing the NPC, or null if none exists.
2094
2126
  */
2095
2127
  getNpc(): Promise<Visitor | null>;
2096
2128
  /**
2097
- * Creates an NPC that follows this visitor using an inventory item the visitor owns.
2098
- * One NPC is allowed per visitor, per application public key.
2129
+ * Creates an NPC (Non-Player Character) that follows this visitor using an inventory item the visitor owns.
2130
+ *
2131
+ * @remarks
2132
+ * One NPC is allowed per visitor, per application public key. NPCs are AI-controlled
2133
+ * characters that automatically follow the visitor around the world. They appear as
2134
+ * additional avatars and can be useful for companions, guides, or assistant characters.
2135
+ *
2136
+ * Requirements:
2137
+ * - The visitor must own a user inventory item of type "npc"
2138
+ * - The item must have been granted to the visitor before calling this method
2139
+ * - Only one NPC can exist per visitor per app at a time
2140
+ *
2141
+ * @keywords create, spawn, add, npc, bot, follower, character, assistant, companion
2099
2142
  *
2100
- * @param userInventoryItemId The ID of the user's inventory item (must be an NPC type item owned by this visitor).
2101
- * @param options Optional configuration for the NPC.
2102
- * @param options.showNameplate Whether to display a nameplate above the NPC (default: true).
2143
+ * @category NPCs
2144
+ *
2145
+ * @param userInventoryItemId - The ID of the user's inventory item (must be an NPC type item owned by this visitor)
2146
+ * @param options - Optional configuration for the NPC
2147
+ * @param options.showNameplate - Whether to display a nameplate above the NPC (default: true)
2103
2148
  *
2104
2149
  * @example
2105
2150
  * ```ts
@@ -2113,17 +2158,31 @@ declare class Visitor extends User implements VisitorInterface {
2113
2158
  * const npc = await visitor.createNpc(userItem.id, { showNameplate: false });
2114
2159
  * ```
2115
2160
  *
2116
- * @returns {Promise<Visitor>} Returns a Visitor object representing the created NPC.
2161
+ * @returns {Promise<Visitor>} Returns a Visitor object representing the created NPC. The NPC will automatically follow the visitor.
2117
2162
  */
2118
2163
  createNpc(userInventoryItemId: string, options?: {
2119
2164
  showNameplate?: boolean;
2120
2165
  }): Promise<Visitor>;
2121
2166
  /**
2122
- * Deletes the NPC this app has assigned to this visitor.
2167
+ * Deletes the NPC (Non-Player Character) this app has assigned to this visitor.
2168
+ *
2169
+ * @remarks
2170
+ * This method removes the NPC associated with this visitor for the current application.
2171
+ * The NPC will immediately disappear from the world. The underlying inventory item
2172
+ * is not consumed and can be used to create a new NPC later.
2173
+ *
2174
+ * @keywords delete, remove, destroy, dismiss, despawn, npc, bot, follower, character
2175
+ *
2176
+ * @category NPCs
2123
2177
  *
2124
2178
  * @example
2125
2179
  * ```ts
2126
- * await visitor.deleteNpc();
2180
+ * // Check if NPC exists before deleting
2181
+ * const npc = await visitor.getNpc();
2182
+ * if (npc) {
2183
+ * await visitor.deleteNpc();
2184
+ * console.log('NPC removed successfully');
2185
+ * }
2127
2186
  * ```
2128
2187
  *
2129
2188
  * @returns {Promise<void>} Returns nothing if successful.
@@ -2146,17 +2205,34 @@ declare class Visitor extends User implements VisitorInterface {
2146
2205
  /**
2147
2206
  * Grants an inventory item to this visitor.
2148
2207
  *
2149
- * @param item The InventoryItem to modify.
2150
- * @param quantity The new quantity to set.
2208
+ * @remarks
2209
+ * This method requires that the inventory item is already defined in your application's inventory system.
2210
+ * Each visitor can only be granted an item once. Use modifyInventoryItemQuantity() to adjust quantities
2211
+ * for items the visitor already owns. The grant_source will be set to track where the item came from.
2212
+ *
2213
+ * Important: This method will throw an error if the visitor already owns this inventory item.
2214
+ * Check visitorInventoryItems first or use modifyInventoryItemQuantity() to update existing items.
2215
+ *
2216
+ * @keywords grant, give, add, inventory, item, visitor, award, reward
2217
+ *
2218
+ * @category Inventory
2219
+ *
2220
+ * @param item - The InventoryItem to grant to the visitor
2221
+ * @param quantity - The quantity to grant (default: 1)
2151
2222
  *
2152
2223
  * @example
2153
2224
  * ```ts
2154
- * await visitor.grantInventoryItem("item-id-123", 2);
2225
+ * // First create or fetch the inventory item
2226
+ * const item = await InventoryItem.get("item-id-123");
2227
+ *
2228
+ * // Grant it to the visitor
2229
+ * const userItem = await visitor.grantInventoryItem(item, 2);
2230
+ * console.log(`Granted ${userItem.quantity} items to visitor`);
2155
2231
  * ```
2156
2232
  *
2157
- * @returns {Promise<UserInventoryItem>} Returns the updated inventory item or a response object.
2233
+ * @returns {Promise<UserInventoryItem>} Returns the granted UserInventoryItem with quantity and metadata.
2158
2234
  */
2159
- grantInventoryItem(item: InventoryItem, quantity?: number): Promise<UserInventoryItem>;
2235
+ grantInventoryItem(item: InventoryItemInterface, quantity?: number): Promise<UserInventoryItem>;
2160
2236
  /**
2161
2237
  * Modifies the quantity of an inventory item in this visitor's inventory.
2162
2238
  * Supports upsert behavior - if the visitor doesn't own the item yet, it will be granted first.
@@ -2175,7 +2251,7 @@ declare class Visitor extends User implements VisitorInterface {
2175
2251
  *
2176
2252
  * @returns {Promise<UserInventoryItem>} Returns the updated inventory item or a response object.
2177
2253
  */
2178
- modifyInventoryItemQuantity(item: UserInventoryItem | InventoryItem, quantity: number): Promise<UserInventoryItem>;
2254
+ modifyInventoryItemQuantity(item: UserInventoryItemInterface | InventoryItemInterface, quantity: number): Promise<UserInventoryItem>;
2179
2255
  }
2180
2256
 
2181
2257
  type VisitorType = {
@@ -2259,29 +2335,29 @@ type AssetOptionalInterface = {
2259
2335
  };
2260
2336
 
2261
2337
  interface DroppedAssetInterface extends AssetInterface {
2262
- fetchDroppedAssetById(): Promise<void | ResponseType$1>;
2263
- deleteDroppedAsset(): Promise<void | ResponseType$1>;
2264
- fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType$1>;
2265
- setDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
2266
- updateDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
2267
- incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
2268
- updateBroadcast({ assetBroadcast, assetBroadcastAll, broadcasterEmail, }: UpdateBroadcastInterface): Promise<void | ResponseType$1>;
2269
- updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }: UpdateClickTypeInterface): Promise<void | ResponseType$1>;
2270
- updateCustomTextAsset(style: object | undefined | null, text: string | null | undefined): Promise<void | ResponseType$1>;
2271
- updateMediaType({ audioRadius, audioSliderVolume, isVideo, mediaLink, mediaName, mediaType, portalName, syncUserMedia, }: UpdateMediaTypeInterface): Promise<void | ResponseType$1>;
2272
- updateMuteZone(isMutezone: boolean): Promise<void | ResponseType$1>;
2338
+ fetchDroppedAssetById(): Promise<void | ResponseType>;
2339
+ deleteDroppedAsset(): Promise<void | ResponseType>;
2340
+ fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType>;
2341
+ setDataObject(dataObject: object, options: object): Promise<void | ResponseType>;
2342
+ updateDataObject(dataObject: object, options: object): Promise<void | ResponseType>;
2343
+ incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType>;
2344
+ updateBroadcast({ assetBroadcast, assetBroadcastAll, broadcasterEmail, }: UpdateBroadcastInterface): Promise<void | ResponseType>;
2345
+ updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }: UpdateClickTypeInterface): Promise<void | ResponseType>;
2346
+ updateCustomTextAsset(style: object | undefined | null, text: string | null | undefined): Promise<void | ResponseType>;
2347
+ updateMediaType({ audioRadius, audioSliderVolume, isVideo, mediaLink, mediaName, mediaType, portalName, syncUserMedia, }: UpdateMediaTypeInterface): Promise<void | ResponseType>;
2348
+ updateMuteZone(isMutezone: boolean): Promise<void | ResponseType>;
2273
2349
  updateLandmarkZone({ isLandmarkZoneEnabled, landmarkZoneName, landmarkZoneIsVisible, }: {
2274
2350
  isLandmarkZoneEnabled: boolean;
2275
2351
  landmarkZoneName?: string;
2276
2352
  landmarkZoneIsVisible?: boolean;
2277
- }): Promise<void | ResponseType$1>;
2278
- updateWebhookZone(isWebhookZoneEnabled: boolean): Promise<void | ResponseType$1>;
2279
- updatePosition(x: number, y: number, yOrderAdjust?: number): Promise<void | ResponseType$1>;
2280
- updatePrivateZone({ isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap, }: UpdatePrivateZoneInterface): Promise<void | ResponseType$1>;
2281
- updateScale(assetScale: number): Promise<void | ResponseType$1>;
2282
- flip(): Promise<void | ResponseType$1>;
2283
- updateUploadedMediaSelected(mediaId: string): Promise<void | ResponseType$1>;
2284
- updateWebImageLayers(bottom: string, top: string): Promise<void | ResponseType$1>;
2353
+ }): Promise<void | ResponseType>;
2354
+ updateWebhookZone(isWebhookZoneEnabled: boolean): Promise<void | ResponseType>;
2355
+ updatePosition(x: number, y: number, yOrderAdjust?: number): Promise<void | ResponseType>;
2356
+ updatePrivateZone({ isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap, }: UpdatePrivateZoneInterface): Promise<void | ResponseType>;
2357
+ updateScale(assetScale: number): Promise<void | ResponseType>;
2358
+ flip(): Promise<void | ResponseType>;
2359
+ updateUploadedMediaSelected(mediaId: string): Promise<void | ResponseType>;
2360
+ updateWebImageLayers(bottom: string, top: string): Promise<void | ResponseType>;
2285
2361
  addWebhook({ dataObject, description, isUniqueOnly, title, type, url, }: {
2286
2362
  dataObject: object;
2287
2363
  description: string;
@@ -2293,15 +2369,15 @@ interface DroppedAssetInterface extends AssetInterface {
2293
2369
  setInteractiveSettings({ isInteractive, interactivePublicKey, }: {
2294
2370
  isInteractive?: boolean;
2295
2371
  interactivePublicKey: string;
2296
- }): Promise<void | ResponseType$1>;
2297
- setClickableLinkMulti({ clickableLinks }: SetClickableLinkMultiInterface): Promise<void | ResponseType$1>;
2298
- updateClickableLinkMulti({ clickableLink, clickableLinkTitle, isForceLinkInIframe, isOpenLinkInDrawer, existingLinkId, linkSamlQueryParams, }: UpdateClickableLinkMultiInterface): Promise<void | ResponseType$1>;
2299
- removeClickableLink({ linkId }: RemoveClickableLinkInterface): Promise<void | ResponseType$1>;
2372
+ }): Promise<void | ResponseType>;
2373
+ setClickableLinkMulti({ clickableLinks }: SetClickableLinkMultiInterface): Promise<void | ResponseType>;
2374
+ updateClickableLinkMulti({ clickableLink, clickableLinkTitle, isForceLinkInIframe, isOpenLinkInDrawer, existingLinkId, linkSamlQueryParams, }: UpdateClickableLinkMultiInterface): Promise<void | ResponseType>;
2375
+ removeClickableLink({ linkId }: RemoveClickableLinkInterface): Promise<void | ResponseType>;
2300
2376
  fetchDroppedAssetAnalytics({ periodType, dateValue, year, }: {
2301
2377
  periodType: "week" | "month" | "quarter" | "year";
2302
2378
  dateValue: number;
2303
2379
  year: number;
2304
- }): Promise<void | ResponseType$1>;
2380
+ }): Promise<void | ResponseType>;
2305
2381
  id?: string;
2306
2382
  assetId?: string;
2307
2383
  assetScale?: number | null;
@@ -2462,18 +2538,18 @@ interface UpdatePrivateZoneInterface {
2462
2538
  privateZoneUserCap: number;
2463
2539
  }
2464
2540
 
2465
- interface EcosystemInterface {
2466
- fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType$1>;
2467
- setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType$1>;
2468
- updateDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
2469
- incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
2541
+ interface EcosystemInterface extends SDKInterface {
2542
+ fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType>;
2543
+ setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType>;
2544
+ updateDataObject(dataObject: object, options: object): Promise<void | ResponseType>;
2545
+ incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType>;
2470
2546
  }
2471
2547
  interface EcosystemOptionalInterface {
2472
2548
  credentials?: InteractiveCredentials;
2473
2549
  }
2474
2550
 
2475
2551
  interface SceneInterface {
2476
- fetchSceneById(): Promise<void | ResponseType$1>;
2552
+ fetchSceneById(): Promise<void | ResponseType>;
2477
2553
  id: string;
2478
2554
  background?: null;
2479
2555
  description?: string;
@@ -2516,28 +2592,28 @@ interface TopiaInterface {
2516
2592
  }
2517
2593
 
2518
2594
  interface UserInterface {
2519
- checkInteractiveCredentials(): Promise<void | ResponseType$1>;
2520
- fetchAvatars(): Promise<void | ResponseType$1>;
2521
- addAvatar(formData: FormData): Promise<void | ResponseType$1>;
2522
- updateAvatar(avatarId: string, formData: FormData): Promise<void | ResponseType$1>;
2523
- deleteAvatar(avatarId: string): Promise<void | ResponseType$1>;
2524
- fetchAssets(): Promise<void | ResponseType$1>;
2525
- fetchPlatformAssets(): Promise<object | ResponseType$1>;
2526
- fetchScenes(): Promise<void | ResponseType$1>;
2527
- fetchWorldsByKey(): Promise<void | ResponseType$1>;
2595
+ checkInteractiveCredentials(): Promise<void | ResponseType>;
2596
+ fetchAvatars(): Promise<void | ResponseType>;
2597
+ addAvatar(formData: FormData): Promise<void | ResponseType>;
2598
+ updateAvatar(avatarId: string, formData: FormData): Promise<void | ResponseType>;
2599
+ deleteAvatar(avatarId: string): Promise<void | ResponseType>;
2600
+ fetchAssets(): Promise<void | ResponseType>;
2601
+ fetchPlatformAssets(): Promise<object | ResponseType>;
2602
+ fetchScenes(): Promise<void | ResponseType>;
2603
+ fetchWorldsByKey(): Promise<void | ResponseType>;
2528
2604
  sendEmail({ html, subject, to }: {
2529
2605
  html: string;
2530
2606
  subject: string;
2531
2607
  to: string;
2532
- }): Promise<object | ResponseType$1>;
2608
+ }): Promise<object | ResponseType>;
2533
2609
  getExpressions({ name, getUnlockablesOnly }: {
2534
2610
  name?: string;
2535
2611
  getUnlockablesOnly?: boolean;
2536
- }): Promise<ResponseType$1>;
2537
- fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType$1>;
2538
- setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType$1>;
2539
- updateDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
2540
- incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
2612
+ }): Promise<ResponseType>;
2613
+ fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType>;
2614
+ setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType>;
2615
+ updateDataObject(dataObject: object, options: object): Promise<void | ResponseType>;
2616
+ incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType>;
2541
2617
  fetchInventoryItems(): Promise<void>;
2542
2618
  inventoryItems: UserInventoryItem[];
2543
2619
  grantInventoryItem(item: InventoryItem, quantity: number): Promise<UserInventoryItem>;
@@ -2552,27 +2628,27 @@ interface UserOptionalInterface {
2552
2628
  }
2553
2629
 
2554
2630
  interface VisitorInterface extends SDKInterface {
2555
- fetchVisitor(): Promise<void | ResponseType$1>;
2556
- moveVisitor({ shouldTeleportVisitor, x, y }: MoveVisitorInterface): Promise<void | ResponseType$1>;
2557
- fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType$1>;
2558
- openIframe({ link, shouldOpenInDrawer, title }: OpenIframeInterface): Promise<void | ResponseType$1>;
2559
- reloadIframe(droppedAssetId: string): Promise<void | ResponseType$1>;
2560
- closeIframe(droppedAssetId: string): Promise<void | ResponseType$1>;
2561
- turnAVOff(): Promise<void | ResponseType$1>;
2631
+ fetchVisitor(): Promise<void | ResponseType>;
2632
+ moveVisitor({ shouldTeleportVisitor, x, y }: MoveVisitorInterface): Promise<void | ResponseType>;
2633
+ fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType>;
2634
+ openIframe({ link, shouldOpenInDrawer, title }: OpenIframeInterface): Promise<void | ResponseType>;
2635
+ reloadIframe(droppedAssetId: string): Promise<void | ResponseType>;
2636
+ closeIframe(droppedAssetId: string): Promise<void | ResponseType>;
2637
+ turnAVOff(): Promise<void | ResponseType>;
2562
2638
  getExpressions({ name, getUnlockablesOnly }: {
2563
2639
  name?: string;
2564
2640
  getUnlockablesOnly?: boolean;
2565
- }): Promise<ResponseType$1>;
2641
+ }): Promise<ResponseType>;
2566
2642
  grantExpression({ id, name }: {
2567
2643
  id?: string;
2568
2644
  name?: string;
2569
- }): Promise<ResponseType$1>;
2570
- getAllParticles(): Promise<ResponseType$1>;
2645
+ }): Promise<ResponseType>;
2646
+ getAllParticles(): Promise<ResponseType>;
2571
2647
  fetchInventoryItems(): Promise<void>;
2572
2648
  inventoryItems: UserInventoryItem[];
2573
- grantInventoryItem(item: InventoryItem, quantity: number): Promise<UserInventoryItem>;
2574
- modifyInventoryItemQuantity(item: UserInventoryItem, quantity: number): Promise<UserInventoryItem>;
2575
- fetchInventoryItem(item: InventoryItem): Promise<UserInventoryItem>;
2649
+ grantInventoryItem(item: InventoryItemInterface, quantity: number): Promise<UserInventoryItem>;
2650
+ modifyInventoryItemQuantity(item: UserInventoryItemInterface | InventoryItemInterface, quantity: number): Promise<UserInventoryItem>;
2651
+ fetchInventoryItem(item: InventoryItemInterface): Promise<UserInventoryItem>;
2576
2652
  createNpc(userInventoryItemId: string, options?: {
2577
2653
  showNameplate?: boolean;
2578
2654
  }): Promise<Visitor>;
@@ -2582,13 +2658,13 @@ interface VisitorInterface extends SDKInterface {
2582
2658
  id?: string;
2583
2659
  name?: string;
2584
2660
  duration?: number;
2585
- }): Promise<ResponseType$1 | string>;
2586
- fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType$1>;
2587
- setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType$1>;
2588
- updateDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
2589
- incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
2590
- updatePublicKeyAnalytics(analytics?: AnalyticType[]): Promise<void | ResponseType$1>;
2591
- sendSignalToVisitor(signal: any): Promise<void | (ResponseType$1 & {
2661
+ }): Promise<ResponseType | string>;
2662
+ fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType>;
2663
+ setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType>;
2664
+ updateDataObject(dataObject: object, options: object): Promise<void | ResponseType>;
2665
+ incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType>;
2666
+ updatePublicKeyAnalytics(analytics?: AnalyticType[]): Promise<void | ResponseType>;
2667
+ sendSignalToVisitor(signal: any): Promise<void | (ResponseType & {
2592
2668
  answerSignal: any;
2593
2669
  })>;
2594
2670
  color?: string;
@@ -2651,7 +2727,7 @@ interface WebhookInterface {
2651
2727
  }
2652
2728
 
2653
2729
  interface WebRTCConnectorInterface {
2654
- getTwilioConfig(): Promise<void | ResponseType$1>;
2730
+ getTwilioConfig(): Promise<void | ResponseType>;
2655
2731
  }
2656
2732
  interface WebRTCConnectorOptionalInterface {
2657
2733
  credentials?: InteractiveCredentials;
@@ -2696,13 +2772,13 @@ interface WorldDetailsInterface {
2696
2772
  width?: number;
2697
2773
  }
2698
2774
  interface WorldInterface extends SDKInterface, WorldDetailsInterface {
2699
- fetchDetails(): Promise<void | ResponseType$1>;
2700
- updateDetails({ controls, description, forceAuthOnLogin, height, name, spawnPosition, width, }: WorldDetailsInterface): Promise<void | ResponseType$1>;
2775
+ fetchDetails(): Promise<void | ResponseType>;
2776
+ updateDetails({ controls, description, forceAuthOnLogin, height, name, spawnPosition, width, }: WorldDetailsInterface): Promise<void | ResponseType>;
2701
2777
  updateCloseWorldSettings({ closeWorldDescription, isWorldClosed, }: {
2702
2778
  closeWorldDescription: string;
2703
2779
  isWorldClosed: boolean;
2704
- }): Promise<void | ResponseType$1>;
2705
- fetchDroppedAssets(): Promise<void | ResponseType$1>;
2780
+ }): Promise<void | ResponseType>;
2781
+ fetchDroppedAssets(): Promise<void | ResponseType>;
2706
2782
  fetchDroppedAssetsWithUniqueName({ uniqueName, isPartial, isReversed, }: {
2707
2783
  uniqueName: string;
2708
2784
  isPartial?: boolean;
@@ -2714,37 +2790,37 @@ interface WorldInterface extends SDKInterface, WorldDetailsInterface {
2714
2790
  }): Promise<DroppedAsset[]>;
2715
2791
  updateCustomTextDroppedAssets(droppedAssetsToUpdate: Array<DroppedAsset>, style: object): Promise<object>;
2716
2792
  fetchLandmarkZones(landmarkZoneName?: string, sceneDropId?: string): Promise<DroppedAsset[]>;
2717
- fetchSceneDropIds(): Promise<object | ResponseType$1>;
2718
- fetchScenes(): Promise<object | ResponseType$1>;
2793
+ fetchSceneDropIds(): Promise<object | ResponseType>;
2794
+ fetchScenes(): Promise<object | ResponseType>;
2719
2795
  dropScene({ assetSuffix, position, sceneId, }: {
2720
2796
  assetSuffix: string;
2721
2797
  position: object;
2722
2798
  sceneId: string;
2723
- }): Promise<object | ResponseType$1>;
2724
- replaceScene(sceneId: string): Promise<void | ResponseType$1>;
2725
- getAllParticles(): Promise<ResponseType$1>;
2799
+ }): Promise<object | ResponseType>;
2800
+ replaceScene(sceneId: string): Promise<void | ResponseType>;
2801
+ getAllParticles(): Promise<ResponseType>;
2726
2802
  triggerParticle({ id, name, duration, position, }: {
2727
2803
  id?: string;
2728
2804
  name?: string;
2729
2805
  duration?: number;
2730
2806
  position?: object;
2731
- }): Promise<ResponseType$1 | string>;
2807
+ }): Promise<ResponseType | string>;
2732
2808
  triggerActivity({ type, assetId, excludeFromNotification, }: {
2733
2809
  type: WorldActivityType;
2734
2810
  assetId: string;
2735
2811
  excludeFromNotification?: (string | number)[];
2736
- }): Promise<ResponseType$1 | string>;
2737
- fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType$1>;
2738
- fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType$1>;
2739
- setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType$1>;
2740
- updateDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
2741
- incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
2742
- fetchWebhooks(): Promise<void | ResponseType$1>;
2812
+ }): Promise<ResponseType | string>;
2813
+ fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType>;
2814
+ fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType>;
2815
+ setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType>;
2816
+ updateDataObject(dataObject: object, options: object): Promise<void | ResponseType>;
2817
+ incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType>;
2818
+ fetchWebhooks(): Promise<void | ResponseType>;
2743
2819
  fetchWorldAnalytics({ periodType, dateValue, year, }: {
2744
2820
  periodType: "week" | "month" | "quarter" | "year";
2745
2821
  dateValue: number;
2746
2822
  year: number;
2747
- }): Promise<void | ResponseType$1>;
2823
+ }): Promise<void | ResponseType>;
2748
2824
  dataObject?: object | null;
2749
2825
  }
2750
2826
  interface WorldOptionalInterface {
@@ -2771,6 +2847,7 @@ type InteractiveCredentials$1 = {
2771
2847
  * Interface for an inventory item.
2772
2848
  */
2773
2849
  interface InventoryItemInterface extends SDKInterface {
2850
+ fetchInventoryItemById(): Promise<InventoryItem>;
2774
2851
  id: string;
2775
2852
  name?: string;
2776
2853
  description?: string;
@@ -2779,6 +2856,7 @@ interface InventoryItemInterface extends SDKInterface {
2779
2856
  updated_at?: Date;
2780
2857
  metadata?: object | null;
2781
2858
  image_path?: string;
2859
+ image_url?: string;
2782
2860
  interactive_key_id?: string;
2783
2861
  status?: string;
2784
2862
  }
@@ -2791,31 +2869,53 @@ type InventoryItemOptionalInterface = {
2791
2869
  * Interface for a user-owned inventory item.
2792
2870
  */
2793
2871
  interface UserInventoryItemInterface extends InventoryItemInterface {
2794
- userItemId: string;
2795
2872
  user_id: string;
2796
2873
  item_id: string;
2797
2874
  quantity: number;
2798
2875
  created_at?: Date;
2799
2876
  updated_at?: Date;
2800
- metadata?: object | null;
2801
2877
  grant_source: string;
2802
2878
  profile_id?: string | null;
2879
+ item: UserInventoryItemMetadataType;
2803
2880
  }
2804
2881
  type UserInventoryItemOptionalInterface = {
2805
2882
  attributes?: UserInventoryItemInterface | object;
2806
2883
  credentials?: InteractiveCredentials$1;
2807
2884
  };
2885
+ type UserInventoryItemMetadataType = {
2886
+ id: string;
2887
+ name: string;
2888
+ description: string;
2889
+ type: string;
2890
+ metadata: object | null;
2891
+ image_url: string;
2892
+ };
2808
2893
 
2809
2894
  /**
2810
- * Create a single instance of Topia axios used for all calls to the public API in all classes
2895
+ * Main Topia SDK client for configuring API access and authentication.
2896
+ *
2897
+ * @remarks
2898
+ * This class should be instantiated ONCE per application at initialization time.
2899
+ * The instance configures the Axios HTTP client with proper authentication headers
2900
+ * and base URL, and is passed to all factory classes to create controllers.
2901
+ *
2902
+ * Configuration options:
2903
+ * - apiKey: Your Topia API key for server-side authentication
2904
+ * - interactiveKey/interactiveSecret: For interactive iframe applications
2905
+ * - apiDomain: API endpoint domain (defaults to "api.topia.io")
2906
+ * - apiProtocol: HTTP protocol (defaults to "https")
2907
+ *
2908
+ * @keywords topia, client, sdk, initialization, config, setup, api
2811
2909
  *
2812
2910
  * @example
2813
2911
  * ```ts
2814
- * const topia = await new Topia({
2912
+ * import { Topia } from "@rtsdk/topia";
2913
+ *
2914
+ * const topia = new Topia({
2915
+ * apiKey: "your-api-key",
2815
2916
  * apiDomain: "api.topia.io",
2816
- * apiKey: "exampleKey",
2817
- * interactiveKey: "key",
2818
- * interactiveSecret: "secret",
2917
+ * interactiveKey: "your-public-key",
2918
+ * interactiveSecret: "your-secret-key",
2819
2919
  * });
2820
2920
  * ```
2821
2921
  */
@@ -2838,24 +2938,24 @@ declare class Topia implements TopiaInterface {
2838
2938
  }
2839
2939
 
2840
2940
  /**
2841
- * Create an instance of SDKController class with credentials.
2941
+ * Abstract base controller that provides common functionality for all SDK controllers.
2942
+ *
2943
+ * @remarks
2944
+ * This class should NOT be instantiated directly. It serves as the base class for all
2945
+ * SDK controllers (World, Visitor, User, etc.) and provides:
2946
+ * - Authentication and credential management
2947
+ * - Axios instance configuration for API calls
2948
+ * - Standardized error handling
2949
+ * - JWT token generation for interactive credentials
2950
+ *
2951
+ * @keywords base, controller, sdk, authentication, api, abstract
2842
2952
  *
2843
2953
  * @example
2844
2954
  * ```ts
2845
- * const credentials = {
2846
- * assetId: "exampleAsset",
2847
- * interactiveNonce: "exampleNonce"
2848
- * interactivePublicKey: "examplePublicKey",
2849
- * visitorId: 1,
2850
- * url: "https://topia.io",
2955
+ * // This class is extended by all controllers
2956
+ * export class World extends SDKController implements WorldInterface {
2957
+ * // World-specific implementation
2851
2958
  * }
2852
- * const topia = await new Topia({
2853
- * apiDomain: "api.topia.io",
2854
- * apiKey: "exampleKey",
2855
- * interactiveKey: "key",
2856
- * interactiveSecret: "secret",
2857
- * }
2858
- * await new SDKController({ credentials, topia });
2859
2959
  * ```
2860
2960
  */
2861
2961
  declare abstract class SDKController implements SDKInterface {
@@ -2864,7 +2964,40 @@ declare abstract class SDKController implements SDKInterface {
2864
2964
  requestOptions: object;
2865
2965
  topia: Topia;
2866
2966
  constructor(topia: Topia, credentials?: InteractiveCredentials);
2967
+ /**
2968
+ * Returns the configured Axios instance for making API calls to Topia's Public API.
2969
+ *
2970
+ * @remarks
2971
+ * All HTTP requests to the Topia API should use this method to ensure proper
2972
+ * authentication headers and base URL configuration are applied.
2973
+ *
2974
+ * @keywords api, axios, http, request, client, public api
2975
+ *
2976
+ * @returns {AxiosInstance} The configured Axios client instance with authentication headers.
2977
+ */
2867
2978
  topiaPublicApi(): axios.AxiosInstance;
2979
+ /**
2980
+ * Standardized error handler for all SDK operations.
2981
+ *
2982
+ * @remarks
2983
+ * This method processes errors from API calls and formats them consistently across the SDK.
2984
+ * It extracts relevant error information including:
2985
+ * - HTTP status codes and response data
2986
+ * - Error messages from API responses
2987
+ * - Stack traces for debugging
2988
+ * - Request details (URL, method, parameters)
2989
+ *
2990
+ * All errors thrown by SDK methods flow through this handler to ensure consistent error format.
2991
+ *
2992
+ * @keywords error, exception, handler, debugging, api error, http error
2993
+ *
2994
+ * @param error - The error object from the failed operation (AxiosError, Error, or unknown)
2995
+ * @param message - Optional custom error message (defaults to generic message)
2996
+ * @param params - Optional parameters that were passed to the failed method
2997
+ * @param sdkMethod - Optional name of the SDK method that failed (e.g., "World.fetchDetails")
2998
+ *
2999
+ * @returns {object} Standardized error object with properties: data, message, method, params, sdkMethod, stack, status, success, url
3000
+ */
2868
3001
  errorHandler({ error, message, params, sdkMethod, }: {
2869
3002
  error?: Error | AxiosError | unknown;
2870
3003
  message?: string;
@@ -2913,7 +3046,7 @@ declare class Asset extends SDKController implements AssetInterface {
2913
3046
  *
2914
3047
  * @returns {Promise<object | ResponseType>} Returns the asset details or an error response.
2915
3048
  */
2916
- fetchAssetById(): Promise<object | ResponseType$1>;
3049
+ fetchAssetById(): Promise<object | ResponseType>;
2917
3050
  /**
2918
3051
  * Updates platform asset details.
2919
3052
  *
@@ -2941,7 +3074,7 @@ declare class Asset extends SDKController implements AssetInterface {
2941
3074
  shouldUploadImages?: boolean;
2942
3075
  tagJson: string;
2943
3076
  topLayerURL?: string;
2944
- }): Promise<object | ResponseType$1>;
3077
+ }): Promise<object | ResponseType>;
2945
3078
  }
2946
3079
 
2947
3080
  /**
@@ -2963,7 +3096,7 @@ declare class Ecosystem extends SDKController {
2963
3096
  /**
2964
3097
  * Retrieves the data object for a Topia ecosystem. Requires canUpdateEcosystemDataObjects permission to be set to true for the public key.
2965
3098
  *
2966
- * @keywords get, fetch, retrieve, load, data, object, state
3099
+ * @keywords get, fetch, retrieve, load, ecosystem, data, object, state, global, platform
2967
3100
  *
2968
3101
  * @category Data Objects
2969
3102
  *
@@ -2972,9 +3105,9 @@ declare class Ecosystem extends SDKController {
2972
3105
  * const dataObject = await ecosystem.fetchDataObject("exampleAppPublicKey", "exampleAppPublicKeyJWT");
2973
3106
  * ```
2974
3107
  *
2975
- * @returns {Promise<object | ResponseType>} Returns the data object or an error response.
3108
+ * @returns {Promise<void | ResponseType>} Populates the dataObject property with ecosystem-wide data, or returns an error response.
2976
3109
  */
2977
- fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType$1>;
3110
+ fetchDataObject(appPublicKey?: string, appJWT?: string, sharedAppPublicKey?: string, sharedAppJWT?: string): Promise<void | ResponseType>;
2978
3111
  /**
2979
3112
  * Sets the data object for a Topia ecosystem.
2980
3113
  *
@@ -2983,7 +3116,7 @@ declare class Ecosystem extends SDKController {
2983
3116
  *
2984
3117
  * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
2985
3118
  *
2986
- * @keywords set, assign, store, save, data, object, state
3119
+ * @keywords set, assign, store, save, ecosystem, data, object, state, global, platform
2987
3120
  *
2988
3121
  * @category Data Objects
2989
3122
  *
@@ -2995,6 +3128,8 @@ declare class Ecosystem extends SDKController {
2995
3128
  * });
2996
3129
  * const { exampleKey } = ecosystem.dataObject;
2997
3130
  * ```
3131
+ *
3132
+ * @returns {Promise<void | ResponseType>} Returns success or an error response.
2998
3133
  */
2999
3134
  setDataObject(dataObject: object | null | undefined, options?: {
3000
3135
  appPublicKey?: string;
@@ -3006,7 +3141,7 @@ declare class Ecosystem extends SDKController {
3006
3141
  lockId: string;
3007
3142
  releaseLock?: boolean;
3008
3143
  };
3009
- }): Promise<void | ResponseType$1>;
3144
+ }): Promise<void | ResponseType>;
3010
3145
  /**
3011
3146
  * Updates the data object for a Topia ecosystem.
3012
3147
  *
@@ -3015,7 +3150,7 @@ declare class Ecosystem extends SDKController {
3015
3150
  *
3016
3151
  * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
3017
3152
  *
3018
- * @keywords update, modify, change, edit, alter, data, object, state
3153
+ * @keywords update, modify, change, edit, alter, ecosystem, data, object, state, global, platform
3019
3154
  *
3020
3155
  * @category Data Objects
3021
3156
  *
@@ -3033,6 +3168,8 @@ declare class Ecosystem extends SDKController {
3033
3168
  * });
3034
3169
  * const { exampleKey } = ecosystem.dataObject;
3035
3170
  * ```
3171
+ *
3172
+ * @returns {Promise<void | ResponseType>} Returns success or an error response.
3036
3173
  */
3037
3174
  updateDataObject(dataObject: object, options?: {
3038
3175
  appPublicKey?: string;
@@ -3044,7 +3181,7 @@ declare class Ecosystem extends SDKController {
3044
3181
  lockId: string;
3045
3182
  releaseLock?: boolean;
3046
3183
  };
3047
- }): Promise<void | ResponseType$1>;
3184
+ }): Promise<void | ResponseType>;
3048
3185
  /**
3049
3186
  * Increments a specific value in the data object for a Topia ecosystem by the amount specified. Must have valid interactive credentials from a visitor in the world.
3050
3187
  *
@@ -3053,7 +3190,7 @@ declare class Ecosystem extends SDKController {
3053
3190
  *
3054
3191
  * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
3055
3192
  *
3056
- * @keywords increment, increase, add, count, data, object, state
3193
+ * @keywords increment, increase, add, count, ecosystem, data, object, state, global, platform
3057
3194
  *
3058
3195
  * @category Data Objects
3059
3196
  *
@@ -3064,6 +3201,8 @@ declare class Ecosystem extends SDKController {
3064
3201
  * sharedAppJWT: "exampleAppPublicKeyJWT",}
3065
3202
  * });
3066
3203
  * ```
3204
+ *
3205
+ * @returns {Promise<void | ResponseType>} Returns success or an error response.
3067
3206
  */
3068
3207
  incrementDataObjectValue(path: string, amount: number, options?: {
3069
3208
  appPublicKey?: string;
@@ -3075,31 +3214,44 @@ declare class Ecosystem extends SDKController {
3075
3214
  lockId: string;
3076
3215
  releaseLock?: boolean;
3077
3216
  };
3078
- }): Promise<void | ResponseType$1>;
3217
+ }): Promise<void | ResponseType>;
3079
3218
  /**
3080
3219
  * Retrieves all inventory items for a given keyholder (app public key).
3081
3220
  *
3082
- * @keywords get, fetch, retrieve, list, inventory, items, keyholder
3221
+ * @keywords get, fetch, retrieve, list, inventory, items, keyholder, ecosystem, catalog
3222
+ *
3223
+ * @category Inventory
3083
3224
  *
3084
3225
  * @example
3085
3226
  * ```ts
3086
- * const items = await ecosystem.fetchInventoryItems("appPublicKey", "appJWT");
3227
+ * await ecosystem.fetchInventoryItems();
3228
+ * const items = ecosystem.inventoryItems;
3087
3229
  * ```
3088
3230
  *
3089
- * @returns {Promise<object[]>} Returns an array of InventoryItem objects.
3231
+ * @returns {Promise<void>} Populates the inventoryItems property with an array of InventoryItem objects.
3090
3232
  */
3091
3233
  fetchInventoryItems(): Promise<void>;
3092
3234
  get inventoryItems(): InventoryItem[];
3093
3235
  }
3094
3236
 
3095
3237
  /**
3096
- * Create an instance of WebRTCConnector class with optional session credentials.
3238
+ * WebRTC connector for managing real-time video and audio connections in Topia worlds.
3239
+ *
3240
+ * @remarks
3241
+ * This class should NOT be instantiated directly. Use WebRTCConnectorFactory to create instances.
3242
+ * The WebRTCConnector provides access to Twilio configuration needed for establishing
3243
+ * peer-to-peer video and audio connections between visitors in a world.
3244
+ *
3245
+ * @see WebRTCConnectorFactory for proper instantiation
3246
+ *
3247
+ * @keywords webrtc, video, audio, twilio, real-time, communication, voice, peer
3097
3248
  *
3098
3249
  * @example
3099
3250
  * ```ts
3100
- * const webRTC = await new WebRTCConnector(topia, {
3101
- * credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", profileId: "exampleProfileId", visitorId: 1, urlSlug: "exampleUrlSlug" }
3102
- * });
3251
+ * import { WebRTC } from "utils/topiaInit.ts";
3252
+ *
3253
+ * const webrtc = await WebRTC.create(urlSlug, { credentials });
3254
+ * const config = await webrtc.getTwilioConfig();
3103
3255
  * ```
3104
3256
  */
3105
3257
  declare class WebRTCConnector extends SDKController implements WebRTCConnectorInterface {
@@ -3107,14 +3259,27 @@ declare class WebRTCConnector extends SDKController implements WebRTCConnectorIn
3107
3259
  urlSlug: string;
3108
3260
  constructor(topia: Topia, urlSlug: string, options?: WebRTCConnectorOptionalInterface);
3109
3261
  /**
3110
- * Get twilio
3262
+ * Retrieves the Twilio configuration for WebRTC connections in a world.
3263
+ *
3264
+ * @remarks
3265
+ * This method fetches the Twilio room configuration needed to establish peer-to-peer
3266
+ * video and audio connections between visitors. The configuration includes authentication
3267
+ * tokens and room settings. Call this before initializing WebRTC connections.
3268
+ *
3269
+ * @keywords get, fetch, retrieve, webrtc, twilio, configuration, video, audio, connection
3270
+ *
3271
+ * @category WebRTC
3111
3272
  *
3112
3273
  * @example
3113
3274
  * ```ts
3114
3275
  * await webRTCConnector.getTwilioConfig();
3276
+ * const { twilioConfig } = webRTCConnector;
3277
+ * console.log(twilioConfig); // Use for WebRTC setup
3115
3278
  * ```
3279
+ *
3280
+ * @returns {Promise<void | ResponseType>} Populates twilioConfig property with Twilio room configuration, or returns an error response.
3116
3281
  */
3117
- getTwilioConfig(): Promise<void | ResponseType$1>;
3282
+ getTwilioConfig(): Promise<void | ResponseType>;
3118
3283
  }
3119
3284
 
3120
3285
  /**
@@ -3203,7 +3368,7 @@ declare class WorldActivity extends SDKController {
3203
3368
  * @returns
3204
3369
  * Updates each Visitor instance and worldActivity.visitors map.
3205
3370
  */
3206
- moveAllVisitors({ shouldFetchVisitors, shouldTeleportVisitors, scatterVisitorsBy, x, y, }: MoveAllVisitorsInterface): Promise<(void | ResponseType$1)[] | undefined>;
3371
+ moveAllVisitors({ shouldFetchVisitors, shouldTeleportVisitors, scatterVisitorsBy, x, y, }: MoveAllVisitorsInterface): Promise<(void | ResponseType)[] | undefined>;
3207
3372
  /**
3208
3373
  * Teleport or walk a list of visitors currently in a world to various coordinates.
3209
3374
  *
@@ -3232,7 +3397,7 @@ declare class WorldActivity extends SDKController {
3232
3397
  * @returns
3233
3398
  * Updates each Visitor instance and worldActivity.visitors map.
3234
3399
  */
3235
- moveVisitors(visitorsToMove: VisitorsToMoveArrayType): Promise<(void | ResponseType$1)[]>;
3400
+ moveVisitors(visitorsToMove: VisitorsToMoveArrayType): Promise<(void | ResponseType)[]>;
3236
3401
  }
3237
3402
 
3238
3403
  /**
@@ -4025,4 +4190,4 @@ declare class WorldFactory extends SDKController {
4025
4190
  }>;
4026
4191
  }
4027
4192
 
4028
- export { AnalyticType, AnimationMetaType, Asset, AssetFactory, AssetInterface, AssetOptionalInterface, AssetOptions, AssetType, DroppedAsset, DroppedAssetClickType, DroppedAssetFactory, DroppedAssetInterface, DroppedAssetLinkType, DroppedAssetMediaType, DroppedAssetMediaVolumeRadius, DroppedAssetOptionalInterface, DroppedAssetOptions, Ecosystem, EcosystemFactory, EcosystemInterface, EcosystemOptionalInterface, FireToastInterface, FrameType, InteractiveCredentials, InventoryItemInterface, InventoryItemOptionalInterface, MoveAllVisitorsInterface, MoveVisitorInterface, OpenIframeInterface, RemoveClickableLinkInterface, ResponseType$1 as ResponseType, SDKController, SDKInterface, Scene, SceneFactory, SceneInterface, SceneOptionalInterface, SetClickableLinkMultiInterface, Topia, TopiaInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateClickableLinkMultiInterface, UpdateDroppedAssetInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface, User, UserFactory, UserInterface, UserInventoryItemInterface, UserInventoryItemOptionalInterface, UserOptionalInterface, UserOptions, Visitor, VisitorFactory, VisitorInterface, VisitorOptionalInterface, VisitorOptions, VisitorType, VisitorsToMoveArrayType, VisitorsToMoveType, WebRTCConnector, WebRTCConnectorFactory, WebRTCConnectorInterface, WebRTCConnectorOptionalInterface, WebhookInterface, World, WorldActivity, WorldActivityFactory, WorldActivityOptionalInterface, WorldActivityType, WorldDetailsInterface, WorldFactory, WorldInterface, WorldOptionalInterface, WorldOptions, WorldWebhooksInterface };
4193
+ export { AnalyticType, AnimationMetaType, Asset, AssetFactory, AssetInterface, AssetOptionalInterface, AssetOptions, AssetType, DroppedAsset, DroppedAssetClickType, DroppedAssetFactory, DroppedAssetInterface, DroppedAssetLinkType, DroppedAssetMediaType, DroppedAssetMediaVolumeRadius, DroppedAssetOptionalInterface, DroppedAssetOptions, Ecosystem, EcosystemFactory, EcosystemInterface, EcosystemOptionalInterface, FireToastInterface, FrameType, InteractiveCredentials, InventoryItemInterface, InventoryItemOptionalInterface, MoveAllVisitorsInterface, MoveVisitorInterface, OpenIframeInterface, RemoveClickableLinkInterface, ResponseType, SDKController, SDKInterface, Scene, SceneFactory, SceneInterface, SceneOptionalInterface, SetClickableLinkMultiInterface, Topia, TopiaInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateClickableLinkMultiInterface, UpdateDroppedAssetInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface, User, UserFactory, UserInterface, UserInventoryItemInterface, UserInventoryItemMetadataType, UserInventoryItemOptionalInterface, UserOptionalInterface, UserOptions, Visitor, VisitorFactory, VisitorInterface, VisitorOptionalInterface, VisitorOptions, VisitorType, VisitorsToMoveArrayType, VisitorsToMoveType, WebRTCConnector, WebRTCConnectorFactory, WebRTCConnectorInterface, WebRTCConnectorOptionalInterface, WebhookInterface, World, WorldActivity, WorldActivityFactory, WorldActivityOptionalInterface, WorldActivityType, WorldDetailsInterface, WorldFactory, WorldInterface, WorldOptionalInterface, WorldOptions, WorldWebhooksInterface };