@rtsdk/topia 0.17.7 → 0.17.8

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
@@ -117,9 +117,11 @@ type ResponseType$1 = {
117
117
  *
118
118
  * @example
119
119
  * ```ts
120
- * const scene = await new Scene(topia, "sceneId", {
120
+ * import { Scene } from "utils/topiaInit.ts";
121
+ *
122
+ * const scene = await Scene.get(exampleSceneId, {
121
123
  * attributes: { name: "My Scene" },
122
- * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
124
+ * credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", visitorId: 1, urlSlug: "exampleUrlSlug" }
123
125
  * });
124
126
  * ```
125
127
  */
@@ -143,9 +145,10 @@ declare class Scene extends SDKController implements SceneInterface {
143
145
  *
144
146
  * @example
145
147
  * ```ts
146
- * const droppedAsset = await new DroppedAsset(topia, "1giFZb0sQ3X27L7uGyQX", "example", {
147
- * attributes: { text: "My Dropped Asset" },
148
- * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
148
+ * import { DroppedAsset } from "utils/topiaInit.ts";
149
+ *
150
+ * const droppedAsset = await DroppedAsset.get(exampleDroppedAssetId, exampleUrlSlug, {
151
+ * credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", visitorId: 1, urlSlug: "exampleUrlSlug" }
149
152
  * });
150
153
  * ```
151
154
  */
@@ -622,9 +625,11 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
622
625
  *
623
626
  * @example
624
627
  * ```ts
625
- * const world = await new World(topia, "exampleWorld", {
628
+ * import { World } from "utils/topiaInit.ts";
629
+ *
630
+ * const world = await World.create(exampleUrlSlug, {
626
631
  * attributes: { name: "Example World" },
627
- * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
632
+ * credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", visitorId: 1, urlSlug: "exampleUrlSlug" }
628
633
  * });
629
634
  * ```
630
635
  */
@@ -1076,9 +1081,11 @@ declare class World extends SDKController implements WorldInterface {
1076
1081
  *
1077
1082
  * @example
1078
1083
  * ```ts
1079
- * const user = await new User(topia, {
1080
- * profileId: 1,
1081
- * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
1084
+ * import { User } from "utils/topiaInit.ts";
1085
+ *
1086
+ * const user = await User.create({
1087
+ * profileId: "exampleProfileId",
1088
+ * credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", profileId: "exampleProfileId", visitorId: 1, urlSlug: "exampleUrlSlug" }
1082
1089
  * });
1083
1090
  * ```
1084
1091
  */
@@ -1487,7 +1494,9 @@ declare class User extends SDKController implements UserInterface {
1487
1494
  *
1488
1495
  * @example
1489
1496
  * ```ts
1490
- * const visitor = await new Visitor(topia, id, urlSlug, { attributes: { moveTo: { x: 0, y: 0 } }, credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" } });
1497
+ * import { Visitor } from "utils/topiaInit.ts";
1498
+ *
1499
+ * const visitor = await Visitor.get(visitorId, urlSlug, { attributes: { moveTo: { x: 0, y: 0 } }, credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", profileId: "exampleProfileId", visitorId: 1, urlSlug: "exampleUrlSlug" } });
1491
1500
  * ```
1492
1501
  */
1493
1502
  declare class Visitor extends User implements VisitorInterface {
@@ -2421,9 +2430,11 @@ declare abstract class SDKController implements SDKInterface {
2421
2430
  *
2422
2431
  * @example
2423
2432
  * ```ts
2424
- * const asset = await new Asset(topia, "id", {
2433
+ * import { Asset } from "utils/topiaInit.ts";
2434
+ *
2435
+ * const asset = await Asset.create(assetId, {
2425
2436
  * attributes: { assetName: "My Asset", isPublic: false },
2426
- * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
2437
+ * credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", visitorId: 1, urlSlug: "exampleUrlSlug" }
2427
2438
  * });
2428
2439
  * ```
2429
2440
  */
@@ -2475,8 +2486,10 @@ declare class Asset extends SDKController implements AssetInterface {
2475
2486
  *
2476
2487
  * @example
2477
2488
  * ```ts
2478
- * const ecosystem =await new Ecosystem(topia, {
2479
- * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
2489
+ * import { Ecosystem } from "utils/topiaInit.ts";
2490
+ *
2491
+ * const ecosystem = await Ecosystem.create({
2492
+ * credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", visitorId: 1, urlSlug: "exampleUrlSlug" }
2480
2493
  * });
2481
2494
  * ```
2482
2495
  */
@@ -2599,7 +2612,7 @@ declare class Ecosystem extends SDKController {
2599
2612
  * @example
2600
2613
  * ```ts
2601
2614
  * const webRTC = await new WebRTCConnector(topia, {
2602
- * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
2615
+ * credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", profileId: "exampleProfileId", visitorId: 1, urlSlug: "exampleUrlSlug" }
2603
2616
  * });
2604
2617
  * ```
2605
2618
  */
@@ -2626,9 +2639,11 @@ declare class WebRTCConnector extends SDKController implements WebRTCConnectorIn
2626
2639
  *
2627
2640
  * @example
2628
2641
  * ```ts
2629
- * const activity = await new WorldActivity(topia, "exampleWorld", {
2642
+ * import { WorldActivity } from "utils/topiaInit.ts";
2643
+ *
2644
+ * const activity = await WorldActivity.create(urlSlug, {
2630
2645
  * attributes: { name: "Example World" },
2631
- * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
2646
+ * credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", visitorId: 1, urlSlug: "exampleUrlSlug" }
2632
2647
  * });
2633
2648
  * ```
2634
2649
  */