@rtsdk/topia 0.15.3 → 0.15.5

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.cjs CHANGED
@@ -39649,6 +39649,8 @@ class SDKController {
39649
39649
  interactiveNonce,
39650
39650
  visitorId,
39651
39651
  assetId,
39652
+ urlSlug,
39653
+ profileId,
39652
39654
  date: new Date(),
39653
39655
  };
39654
39656
  this.jwt = jwt.sign(payload, topia.interactiveSecret);
@@ -39715,23 +39717,16 @@ class SDKController {
39715
39717
  *
39716
39718
  * @usage
39717
39719
  * ```ts
39718
- * await new Asset(topia, "assetId", {
39720
+ * await new Asset(topia, "id", {
39719
39721
  * attributes: { assetName: "My Asset", isPublic: false },
39720
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
39722
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
39721
39723
  * });
39722
39724
  * ```
39723
39725
  */
39724
39726
  class Asset extends SDKController {
39725
39727
  constructor(topia, id, options = { attributes: {}, credentials: {} }) {
39726
- var _a, _b, _c, _d, _e;
39727
- // assetId and urlSlug should only be used when Asset is extended by DroppedAsset
39728
- super(topia, {
39729
- apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
39730
- assetId: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.assetId,
39731
- interactiveNonce: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.interactiveNonce,
39732
- urlSlug: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.urlSlug,
39733
- visitorId: (_e = options === null || options === void 0 ? void 0 : options.credentials) === null || _e === void 0 ? void 0 : _e.visitorId,
39734
- });
39728
+ // options.credentials.assetId is the dropped asset id and is used to validate the interactive credentials. It should NOT match the id that's passed to the constructor.
39729
+ super(topia, Object.assign({}, options.credentials));
39735
39730
  this.id = id;
39736
39731
  Object.assign(this, options.attributes);
39737
39732
  }
@@ -39853,8 +39848,8 @@ var _DroppedAsset_updateDroppedAsset;
39853
39848
  * @usage
39854
39849
  * ```ts
39855
39850
  * await new DroppedAsset(topia, "1giFZb0sQ3X27L7uGyQX", "example", {
39856
- * attributes: { text: "My Asset" },
39857
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", visitorId: 1 }
39851
+ * attributes: { text: "My Dropped Asset" },
39852
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
39858
39853
  * });
39859
39854
  * ```
39860
39855
  */
@@ -40487,19 +40482,13 @@ _DroppedAsset_updateDroppedAsset = new WeakMap();
40487
40482
  * ```ts
40488
40483
  * await new Scene(topia, "sceneId", {
40489
40484
  * attributes: { name: "My Scene" },
40490
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
40485
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
40491
40486
  * });
40492
40487
  * ```
40493
40488
  */
40494
40489
  class Scene extends SDKController {
40495
40490
  constructor(topia, id, options = { attributes: {}, credentials: {} }) {
40496
- var _a, _b, _c, _d;
40497
- super(topia, {
40498
- apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
40499
- interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
40500
- urlSlug: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug,
40501
- visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
40502
- });
40491
+ super(topia, Object.assign({}, options.credentials));
40503
40492
  this.id = id;
40504
40493
  Object.assign(this, options.attributes);
40505
40494
  }
@@ -40573,19 +40562,14 @@ var _World_droppedAssetsMap;
40573
40562
  * ```ts
40574
40563
  * await new World(topia, "exampleWorld", {
40575
40564
  * attributes: { name: "Example World" },
40576
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
40565
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
40577
40566
  * });
40578
40567
  * ```
40579
40568
  */
40580
40569
  class World extends SDKController {
40581
40570
  constructor(topia, urlSlug, options = { attributes: {}, credentials: {} }) {
40582
- var _a, _b, _c, _d;
40583
- super(topia, {
40584
- apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
40585
- interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
40586
- urlSlug: ((_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug) || urlSlug,
40587
- visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
40588
- });
40571
+ var _a;
40572
+ super(topia, Object.assign({ urlSlug: ((_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.urlSlug) || urlSlug }, options.credentials));
40589
40573
  _World_droppedAssetsMap.set(this, void 0);
40590
40574
  ////////// data objects
40591
40575
  /**
@@ -41121,7 +41105,7 @@ class World extends SDKController {
41121
41105
  * await world.triggerActivity({ type: "GAME_ON", assetId: "abc123" });
41122
41106
  * ```
41123
41107
  */
41124
- triggerActivity({ type, assetId, excludeFromNotification }) {
41108
+ triggerActivity({ type, assetId, excludeFromNotification, }) {
41125
41109
  return __awaiter(this, void 0, void 0, function* () {
41126
41110
  try {
41127
41111
  const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/set-activity`, { type, assetId, excludeFromNotification }, this.requestOptions);
@@ -41262,22 +41246,13 @@ var _User_adminWorldsMap, _User_assetsMap, _User_scenesMap, _User_worldsMap;
41262
41246
  * ```ts
41263
41247
  * await new User(topia, {
41264
41248
  * profileId: 1,
41265
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
41249
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
41266
41250
  * });
41267
41251
  * ```
41268
41252
  */
41269
41253
  class User extends SDKController {
41270
41254
  constructor(topia, options = { profileId: null, credentials: {} }) {
41271
- var _a, _b, _c, _d, _e, _f;
41272
- super(topia, {
41273
- apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
41274
- interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
41275
- profileId: options === null || options === void 0 ? void 0 : options.profileId,
41276
- urlSlug: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug,
41277
- visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
41278
- iframeId: (_e = options === null || options === void 0 ? void 0 : options.credentials) === null || _e === void 0 ? void 0 : _e.iframeId,
41279
- gameEngineId: (_f = options === null || options === void 0 ? void 0 : options.credentials) === null || _f === void 0 ? void 0 : _f.gameEngineId,
41280
- });
41255
+ super(topia, Object.assign({ profileId: options === null || options === void 0 ? void 0 : options.profileId }, options.credentials));
41281
41256
  _User_adminWorldsMap.set(this, void 0);
41282
41257
  _User_assetsMap.set(this, void 0);
41283
41258
  _User_scenesMap.set(this, void 0);
@@ -41839,7 +41814,7 @@ _User_adminWorldsMap = new WeakMap(), _User_assetsMap = new WeakMap(), _User_sce
41839
41814
  *
41840
41815
  * @usage
41841
41816
  * ```ts
41842
- * await new Visitor(topia, id, urlSlug, { attributes: { moveTo: { x: 0, y: 0 } } });
41817
+ * await new Visitor(topia, id, urlSlug, { attributes: { moveTo: { x: 0, y: 0 } }, credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" } });
41843
41818
  * ```
41844
41819
  */
41845
41820
  class Visitor extends User {
@@ -42059,7 +42034,8 @@ class Visitor extends User {
42059
42034
  *
42060
42035
  * @usage
42061
42036
  * ```ts
42062
- * await visitor.grantExpression({ name: "Eyes" });
42037
+ * await visitor.grantExpression({ id: "exampleExpressionId" });
42038
+ * await visitor.grantExpression({ name: "exampleExpressionName" });
42063
42039
  * ```
42064
42040
  */
42065
42041
  grantExpression({ id, name }) {
@@ -42280,18 +42256,14 @@ class Visitor extends User {
42280
42256
  * @usage
42281
42257
  * ```ts
42282
42258
  * await new WebRTCConnector(topia, {
42283
- * credentials: { interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
42259
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
42284
42260
  * });
42285
42261
  * ```
42286
42262
  */
42287
42263
  class WebRTCConnector extends SDKController {
42288
42264
  constructor(topia, urlSlug, options = { twilioConfig: {}, credentials: {} }) {
42289
- var _a, _b, _c;
42290
- super(topia, {
42291
- interactiveNonce: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.interactiveNonce,
42292
- urlSlug: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.urlSlug,
42293
- visitorId: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.visitorId,
42294
- });
42265
+ var _a;
42266
+ super(topia, Object.assign({ urlSlug: ((_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.urlSlug) || urlSlug }, options.credentials));
42295
42267
  this.twilioConfig = options === null || options === void 0 ? void 0 : options.twilioConfig;
42296
42268
  this.urlSlug = urlSlug;
42297
42269
  }
@@ -42329,19 +42301,14 @@ var _WorldActivity_visitorsMap;
42329
42301
  * ```ts
42330
42302
  * await new WorldActivity(topia, "exampleWorld", {
42331
42303
  * attributes: { name: "Example World" },
42332
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
42304
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
42333
42305
  * });
42334
42306
  * ```
42335
42307
  */
42336
42308
  class WorldActivity extends SDKController {
42337
42309
  constructor(topia, urlSlug, options = { credentials: {} }) {
42338
- var _a, _b, _c, _d;
42339
- super(topia, {
42340
- apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
42341
- interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
42342
- urlSlug: ((_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug) || urlSlug,
42343
- visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
42344
- });
42310
+ var _a;
42311
+ super(topia, Object.assign({ urlSlug: ((_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.urlSlug) || urlSlug }, options.credentials));
42345
42312
  _WorldActivity_visitorsMap.set(this, void 0);
42346
42313
  this.urlSlug = urlSlug;
42347
42314
  __classPrivateFieldSet(this, _WorldActivity_visitorsMap, {}, "f");
@@ -42511,7 +42478,7 @@ class AssetFactory extends SDKController {
42511
42478
  *
42512
42479
  * @usage
42513
42480
  * ```
42514
- * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42481
+ * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42515
42482
  * ```
42516
42483
  */
42517
42484
  create(id, options) {
@@ -42567,7 +42534,7 @@ class DroppedAssetFactory extends SDKController {
42567
42534
  *
42568
42535
  * @usage
42569
42536
  * ```
42570
- * const droppedAssetInstance = await DroppedAsset.create(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42537
+ * const droppedAssetInstance = await DroppedAsset.create(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42571
42538
  * ```
42572
42539
  */
42573
42540
  create(id, urlSlug, options) {
@@ -42579,7 +42546,7 @@ class DroppedAssetFactory extends SDKController {
42579
42546
  *
42580
42547
  * @usage
42581
42548
  * ```
42582
- * const droppedAssetInstance = await DroppedAsset.get(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42549
+ * const droppedAssetInstance = await DroppedAsset.get(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42583
42550
  * ```
42584
42551
  */
42585
42552
  get(id, urlSlug, options) {
@@ -42626,7 +42593,7 @@ class DroppedAssetFactory extends SDKController {
42626
42593
  *
42627
42594
  * @usage
42628
42595
  * ```
42629
- * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42596
+ * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42630
42597
  * const droppedAssetInstance = await DroppedAsset.get(assetInstance, {
42631
42598
  assetScale: 1.5,
42632
42599
  flipped: true,
@@ -42709,7 +42676,7 @@ class SceneFactory {
42709
42676
  *
42710
42677
  * @usage
42711
42678
  * ```
42712
- * const sceneInstance = await Scene.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42679
+ * const sceneInstance = await Scene.create(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42713
42680
  * ```
42714
42681
  */
42715
42682
  create(id, options) {
@@ -42721,7 +42688,7 @@ class SceneFactory {
42721
42688
  *
42722
42689
  * @usage
42723
42690
  * ```
42724
- * const sceneInstance = await Scene.get(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42691
+ * const sceneInstance = await Scene.get(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42725
42692
  * ```
42726
42693
  */
42727
42694
  get(id, options) {
@@ -42749,7 +42716,7 @@ class UserFactory {
42749
42716
  *
42750
42717
  * @usage
42751
42718
  * ```
42752
- * const userInstance = await User.create({ credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42719
+ * const userInstance = await User.create({ credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42753
42720
  * ```
42754
42721
  */
42755
42722
  create(options) {
@@ -42773,7 +42740,7 @@ class VisitorFactory {
42773
42740
  *
42774
42741
  * @usage
42775
42742
  * ```
42776
- * const visitorInstance = await Visitor.create(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42743
+ * const visitorInstance = await Visitor.create(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42777
42744
  * ```
42778
42745
  */
42779
42746
  create(id, urlSlug, options) {
@@ -42785,7 +42752,7 @@ class VisitorFactory {
42785
42752
  *
42786
42753
  * @usage
42787
42754
  * ```
42788
- * const visitorInstance = await Visitor.get(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42755
+ * const visitorInstance = await Visitor.get(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42789
42756
  * ```
42790
42757
  */
42791
42758
  get(id, urlSlug, options) {
@@ -42813,7 +42780,7 @@ class WebRTCConnectorFactory {
42813
42780
  *
42814
42781
  * @usage
42815
42782
  * ```
42816
- * const userInstance = await WebRTCConnector.create({ credentials: { interactiveNonce, interactivePublicKey, urlSlug, visitorId }, twilioConfig: {} });
42783
+ * const userInstance = await WebRTCConnector.create({ credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId }, twilioConfig: {} });
42817
42784
  * ```
42818
42785
  */
42819
42786
  create(urlSlug, options) {
@@ -42837,7 +42804,7 @@ class WorldActivityFactory {
42837
42804
  *
42838
42805
  * @usage
42839
42806
  * ```
42840
- * const worldActivityInstance = await WorldActivity.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42807
+ * const worldActivityInstance = await WorldActivity.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42841
42808
  * ```
42842
42809
  */
42843
42810
  create(urlSlug, options) {
@@ -42861,7 +42828,7 @@ class WorldFactory extends SDKController {
42861
42828
  *
42862
42829
  * @usage
42863
42830
  * ```
42864
- * const worldInstance = await World.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42831
+ * const worldInstance = await World.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42865
42832
  * ```
42866
42833
  */
42867
42834
  create(urlSlug, options) {
package/dist/index.d.ts CHANGED
@@ -79,7 +79,7 @@ type ResponseType$1 = {
79
79
  * ```ts
80
80
  * await new Scene(topia, "sceneId", {
81
81
  * attributes: { name: "My Scene" },
82
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
82
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
83
83
  * });
84
84
  * ```
85
85
  */
@@ -106,8 +106,8 @@ declare class Scene extends SDKController implements SceneInterface {
106
106
  * @usage
107
107
  * ```ts
108
108
  * await new DroppedAsset(topia, "1giFZb0sQ3X27L7uGyQX", "example", {
109
- * attributes: { text: "My Asset" },
110
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", visitorId: 1 }
109
+ * attributes: { text: "My Dropped Asset" },
110
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
111
111
  * });
112
112
  * ```
113
113
  */
@@ -489,7 +489,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
489
489
  * ```ts
490
490
  * await new World(topia, "exampleWorld", {
491
491
  * attributes: { name: "Example World" },
492
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
492
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
493
493
  * });
494
494
  * ```
495
495
  */
@@ -765,7 +765,7 @@ declare class World extends SDKController implements WorldInterface {
765
765
  * await world.triggerActivity({ type: "GAME_ON", assetId: "abc123" });
766
766
  * ```
767
767
  */
768
- triggerActivity({ type, assetId, excludeFromNotification }: {
768
+ triggerActivity({ type, assetId, excludeFromNotification, }: {
769
769
  type: WorldActivityTypes;
770
770
  assetId: string;
771
771
  excludeFromNotification?: (string | number)[];
@@ -894,7 +894,7 @@ declare class World extends SDKController implements WorldInterface {
894
894
  * ```ts
895
895
  * await new User(topia, {
896
896
  * profileId: 1,
897
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
897
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
898
898
  * });
899
899
  * ```
900
900
  */
@@ -1266,7 +1266,7 @@ declare class User extends SDKController implements UserInterface {
1266
1266
  *
1267
1267
  * @usage
1268
1268
  * ```ts
1269
- * await new Visitor(topia, id, urlSlug, { attributes: { moveTo: { x: 0, y: 0 } } });
1269
+ * await new Visitor(topia, id, urlSlug, { attributes: { moveTo: { x: 0, y: 0 } }, credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" } });
1270
1270
  * ```
1271
1271
  */
1272
1272
  declare class Visitor extends User implements VisitorInterface {
@@ -1382,7 +1382,8 @@ declare class Visitor extends User implements VisitorInterface {
1382
1382
  *
1383
1383
  * @usage
1384
1384
  * ```ts
1385
- * await visitor.grantExpression({ name: "Eyes" });
1385
+ * await visitor.grantExpression({ id: "exampleExpressionId" });
1386
+ * await visitor.grantExpression({ name: "exampleExpressionName" });
1386
1387
  * ```
1387
1388
  */
1388
1389
  grantExpression({ id, name }: {
@@ -1630,6 +1631,8 @@ interface DroppedAssetInterface extends AssetInterface {
1630
1631
  existingKey?: string | null;
1631
1632
  interactivePublicKey?: string | null;
1632
1633
  isInteractive?: boolean | null;
1634
+ isLandmarkZoneEnabled?: boolean | null;
1635
+ isPrivateZone?: boolean | null;
1633
1636
  isVideoPlayer?: boolean | null;
1634
1637
  kitId?: string | null;
1635
1638
  layer0?: string | null;
@@ -2031,9 +2034,9 @@ declare abstract class SDKController implements SDKInterface {
2031
2034
  *
2032
2035
  * @usage
2033
2036
  * ```ts
2034
- * await new Asset(topia, "assetId", {
2037
+ * await new Asset(topia, "id", {
2035
2038
  * attributes: { assetName: "My Asset", isPublic: false },
2036
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
2039
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
2037
2040
  * });
2038
2041
  * ```
2039
2042
  */
@@ -2087,7 +2090,7 @@ declare class Asset extends SDKController implements AssetInterface {
2087
2090
  * @usage
2088
2091
  * ```ts
2089
2092
  * await new WebRTCConnector(topia, {
2090
- * credentials: { interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
2093
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
2091
2094
  * });
2092
2095
  * ```
2093
2096
  */
@@ -2117,7 +2120,7 @@ declare class WebRTCConnector extends SDKController implements WebRTCConnectorIn
2117
2120
  * ```ts
2118
2121
  * await new WorldActivity(topia, "exampleWorld", {
2119
2122
  * attributes: { name: "Example World" },
2120
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
2123
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
2121
2124
  * });
2122
2125
  * ```
2123
2126
  */
@@ -2219,7 +2222,7 @@ declare class AssetFactory extends SDKController {
2219
2222
  *
2220
2223
  * @usage
2221
2224
  * ```
2222
- * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
2225
+ * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
2223
2226
  * ```
2224
2227
  */
2225
2228
  create(id: string, options?: AssetOptionalInterface): Asset;
@@ -2257,7 +2260,7 @@ declare class DroppedAssetFactory extends SDKController {
2257
2260
  *
2258
2261
  * @usage
2259
2262
  * ```
2260
- * const droppedAssetInstance = await DroppedAsset.create(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
2263
+ * const droppedAssetInstance = await DroppedAsset.create(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
2261
2264
  * ```
2262
2265
  */
2263
2266
  create(id: string, urlSlug: string, options?: DroppedAssetOptionalInterface): DroppedAsset;
@@ -2267,7 +2270,7 @@ declare class DroppedAssetFactory extends SDKController {
2267
2270
  *
2268
2271
  * @usage
2269
2272
  * ```
2270
- * const droppedAssetInstance = await DroppedAsset.get(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
2273
+ * const droppedAssetInstance = await DroppedAsset.get(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
2271
2274
  * ```
2272
2275
  */
2273
2276
  get(id: string, urlSlug: string, options?: DroppedAssetOptionalInterface): Promise<DroppedAsset>;
@@ -2292,7 +2295,7 @@ declare class DroppedAssetFactory extends SDKController {
2292
2295
  *
2293
2296
  * @usage
2294
2297
  * ```
2295
- * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
2298
+ * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
2296
2299
  * const droppedAssetInstance = await DroppedAsset.get(assetInstance, {
2297
2300
  assetScale: 1.5,
2298
2301
  flipped: true,
@@ -2353,7 +2356,7 @@ declare class SceneFactory {
2353
2356
  *
2354
2357
  * @usage
2355
2358
  * ```
2356
- * const sceneInstance = await Scene.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
2359
+ * const sceneInstance = await Scene.create(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
2357
2360
  * ```
2358
2361
  */
2359
2362
  create(id: string, options?: SceneOptionalInterface): Scene;
@@ -2363,7 +2366,7 @@ declare class SceneFactory {
2363
2366
  *
2364
2367
  * @usage
2365
2368
  * ```
2366
- * const sceneInstance = await Scene.get(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
2369
+ * const sceneInstance = await Scene.get(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
2367
2370
  * ```
2368
2371
  */
2369
2372
  get(id: string, options?: SceneOptionalInterface): Promise<Scene>;
@@ -2384,7 +2387,7 @@ declare class UserFactory {
2384
2387
  *
2385
2388
  * @usage
2386
2389
  * ```
2387
- * const userInstance = await User.create({ credentials: { interactiveNonce, interactivePublicKey, visitorId } });
2390
+ * const userInstance = await User.create({ credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
2388
2391
  * ```
2389
2392
  */
2390
2393
  create(options?: UserOptionalInterface): User;
@@ -2405,7 +2408,7 @@ declare class VisitorFactory {
2405
2408
  *
2406
2409
  * @usage
2407
2410
  * ```
2408
- * const visitorInstance = await Visitor.create(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
2411
+ * const visitorInstance = await Visitor.create(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
2409
2412
  * ```
2410
2413
  */
2411
2414
  create(id: number, urlSlug: string, options?: VisitorOptionalInterface): Visitor;
@@ -2415,7 +2418,7 @@ declare class VisitorFactory {
2415
2418
  *
2416
2419
  * @usage
2417
2420
  * ```
2418
- * const visitorInstance = await Visitor.get(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
2421
+ * const visitorInstance = await Visitor.get(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
2419
2422
  * ```
2420
2423
  */
2421
2424
  get(id: number, urlSlug: string, options?: VisitorOptionalInterface): Promise<Visitor>;
@@ -2436,7 +2439,7 @@ declare class WebRTCConnectorFactory {
2436
2439
  *
2437
2440
  * @usage
2438
2441
  * ```
2439
- * const userInstance = await WebRTCConnector.create({ credentials: { interactiveNonce, interactivePublicKey, urlSlug, visitorId }, twilioConfig: {} });
2442
+ * const userInstance = await WebRTCConnector.create({ credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId }, twilioConfig: {} });
2440
2443
  * ```
2441
2444
  */
2442
2445
  create(urlSlug: string, options?: WebRTCConnectorOptionalInterface): WebRTCConnector;
@@ -2457,7 +2460,7 @@ declare class WorldActivityFactory {
2457
2460
  *
2458
2461
  * @usage
2459
2462
  * ```
2460
- * const worldActivityInstance = await WorldActivity.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
2463
+ * const worldActivityInstance = await WorldActivity.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
2461
2464
  * ```
2462
2465
  */
2463
2466
  create(urlSlug: string, options?: WorldOptionalInterface): WorldActivity;
@@ -2477,7 +2480,7 @@ declare class WorldFactory extends SDKController {
2477
2480
  *
2478
2481
  * @usage
2479
2482
  * ```
2480
- * const worldInstance = await World.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
2483
+ * const worldInstance = await World.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
2481
2484
  * ```
2482
2485
  */
2483
2486
  create(urlSlug: string, options?: WorldOptionalInterface): World;
@@ -2500,4 +2503,4 @@ declare class WorldFactory extends SDKController {
2500
2503
  }>;
2501
2504
  }
2502
2505
 
2503
- export { Asset, AssetFactory, AssetInterface, AssetOptionalInterface, AssetOptions, AssetType, DroppedAsset, DroppedAssetClickType, DroppedAssetFactory, DroppedAssetInterface, DroppedAssetMediaType, DroppedAssetOptionalInterface, DroppedAssetOptions, FireToastInterface, InteractiveCredentials, MoveAllVisitorsInterface, MoveVisitorInterface, OpenIframeInterface, ResponseType$1 as ResponseType, SDKController, SDKInterface, Scene, SceneFactory, SceneInterface, SceneOptionalInterface, Topia, TopiaInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateDroppedAssetInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface, User, UserFactory, UserInterface, UserOptionalInterface, UserOptions, Visitor, VisitorFactory, VisitorInterface, VisitorOptionalInterface, VisitorOptions, VisitorType, VisitorsToMoveArrayType, VisitorsToMoveType, WebRTCConnector, WebRTCConnectorFactory, WebRTCConnectorInterface, WebRTCConnectorOptionalInterface, WebhookInterface, World, WorldActivity, WorldActivityFactory, WorldActivityOptionalInterface, WorldDetailsInterface, WorldFactory, WorldInterface, WorldOptionalInterface, WorldOptions, WorldWebhooksInterface };
2506
+ export { Asset, AssetFactory, AssetInterface, AssetOptionalInterface, AssetOptions, AssetType, DroppedAsset, DroppedAssetClickType, DroppedAssetFactory, DroppedAssetInterface, DroppedAssetMediaType, DroppedAssetOptionalInterface, DroppedAssetOptions, FireToastInterface, InteractiveCredentials, MoveAllVisitorsInterface, MoveVisitorInterface, OpenIframeInterface, ResponseType$1 as ResponseType, SDKController, SDKInterface, Scene, SceneFactory, SceneInterface, SceneOptionalInterface, Topia, TopiaInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateDroppedAssetInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface, User, UserFactory, UserInterface, UserOptionalInterface, UserOptions, Visitor, VisitorFactory, VisitorInterface, VisitorOptionalInterface, VisitorOptions, VisitorType, VisitorsToMoveArrayType, VisitorsToMoveType, WebRTCConnector, WebRTCConnectorFactory, WebRTCConnectorInterface, WebRTCConnectorOptionalInterface, WebhookInterface, World, WorldActivity, WorldActivityFactory, WorldActivityOptionalInterface, WorldActivityTypes, WorldDetailsInterface, WorldFactory, WorldInterface, WorldOptionalInterface, WorldOptions, WorldWebhooksInterface };
package/dist/index.js CHANGED
@@ -39647,6 +39647,8 @@ class SDKController {
39647
39647
  interactiveNonce,
39648
39648
  visitorId,
39649
39649
  assetId,
39650
+ urlSlug,
39651
+ profileId,
39650
39652
  date: new Date(),
39651
39653
  };
39652
39654
  this.jwt = jwt.sign(payload, topia.interactiveSecret);
@@ -39713,23 +39715,16 @@ class SDKController {
39713
39715
  *
39714
39716
  * @usage
39715
39717
  * ```ts
39716
- * await new Asset(topia, "assetId", {
39718
+ * await new Asset(topia, "id", {
39717
39719
  * attributes: { assetName: "My Asset", isPublic: false },
39718
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
39720
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
39719
39721
  * });
39720
39722
  * ```
39721
39723
  */
39722
39724
  class Asset extends SDKController {
39723
39725
  constructor(topia, id, options = { attributes: {}, credentials: {} }) {
39724
- var _a, _b, _c, _d, _e;
39725
- // assetId and urlSlug should only be used when Asset is extended by DroppedAsset
39726
- super(topia, {
39727
- apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
39728
- assetId: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.assetId,
39729
- interactiveNonce: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.interactiveNonce,
39730
- urlSlug: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.urlSlug,
39731
- visitorId: (_e = options === null || options === void 0 ? void 0 : options.credentials) === null || _e === void 0 ? void 0 : _e.visitorId,
39732
- });
39726
+ // options.credentials.assetId is the dropped asset id and is used to validate the interactive credentials. It should NOT match the id that's passed to the constructor.
39727
+ super(topia, Object.assign({}, options.credentials));
39733
39728
  this.id = id;
39734
39729
  Object.assign(this, options.attributes);
39735
39730
  }
@@ -39851,8 +39846,8 @@ var _DroppedAsset_updateDroppedAsset;
39851
39846
  * @usage
39852
39847
  * ```ts
39853
39848
  * await new DroppedAsset(topia, "1giFZb0sQ3X27L7uGyQX", "example", {
39854
- * attributes: { text: "My Asset" },
39855
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", visitorId: 1 }
39849
+ * attributes: { text: "My Dropped Asset" },
39850
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
39856
39851
  * });
39857
39852
  * ```
39858
39853
  */
@@ -40485,19 +40480,13 @@ _DroppedAsset_updateDroppedAsset = new WeakMap();
40485
40480
  * ```ts
40486
40481
  * await new Scene(topia, "sceneId", {
40487
40482
  * attributes: { name: "My Scene" },
40488
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
40483
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
40489
40484
  * });
40490
40485
  * ```
40491
40486
  */
40492
40487
  class Scene extends SDKController {
40493
40488
  constructor(topia, id, options = { attributes: {}, credentials: {} }) {
40494
- var _a, _b, _c, _d;
40495
- super(topia, {
40496
- apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
40497
- interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
40498
- urlSlug: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug,
40499
- visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
40500
- });
40489
+ super(topia, Object.assign({}, options.credentials));
40501
40490
  this.id = id;
40502
40491
  Object.assign(this, options.attributes);
40503
40492
  }
@@ -40571,19 +40560,14 @@ var _World_droppedAssetsMap;
40571
40560
  * ```ts
40572
40561
  * await new World(topia, "exampleWorld", {
40573
40562
  * attributes: { name: "Example World" },
40574
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
40563
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
40575
40564
  * });
40576
40565
  * ```
40577
40566
  */
40578
40567
  class World extends SDKController {
40579
40568
  constructor(topia, urlSlug, options = { attributes: {}, credentials: {} }) {
40580
- var _a, _b, _c, _d;
40581
- super(topia, {
40582
- apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
40583
- interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
40584
- urlSlug: ((_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug) || urlSlug,
40585
- visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
40586
- });
40569
+ var _a;
40570
+ super(topia, Object.assign({ urlSlug: ((_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.urlSlug) || urlSlug }, options.credentials));
40587
40571
  _World_droppedAssetsMap.set(this, void 0);
40588
40572
  ////////// data objects
40589
40573
  /**
@@ -41119,7 +41103,7 @@ class World extends SDKController {
41119
41103
  * await world.triggerActivity({ type: "GAME_ON", assetId: "abc123" });
41120
41104
  * ```
41121
41105
  */
41122
- triggerActivity({ type, assetId, excludeFromNotification }) {
41106
+ triggerActivity({ type, assetId, excludeFromNotification, }) {
41123
41107
  return __awaiter(this, void 0, void 0, function* () {
41124
41108
  try {
41125
41109
  const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/set-activity`, { type, assetId, excludeFromNotification }, this.requestOptions);
@@ -41260,22 +41244,13 @@ var _User_adminWorldsMap, _User_assetsMap, _User_scenesMap, _User_worldsMap;
41260
41244
  * ```ts
41261
41245
  * await new User(topia, {
41262
41246
  * profileId: 1,
41263
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
41247
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
41264
41248
  * });
41265
41249
  * ```
41266
41250
  */
41267
41251
  class User extends SDKController {
41268
41252
  constructor(topia, options = { profileId: null, credentials: {} }) {
41269
- var _a, _b, _c, _d, _e, _f;
41270
- super(topia, {
41271
- apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
41272
- interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
41273
- profileId: options === null || options === void 0 ? void 0 : options.profileId,
41274
- urlSlug: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug,
41275
- visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
41276
- iframeId: (_e = options === null || options === void 0 ? void 0 : options.credentials) === null || _e === void 0 ? void 0 : _e.iframeId,
41277
- gameEngineId: (_f = options === null || options === void 0 ? void 0 : options.credentials) === null || _f === void 0 ? void 0 : _f.gameEngineId,
41278
- });
41253
+ super(topia, Object.assign({ profileId: options === null || options === void 0 ? void 0 : options.profileId }, options.credentials));
41279
41254
  _User_adminWorldsMap.set(this, void 0);
41280
41255
  _User_assetsMap.set(this, void 0);
41281
41256
  _User_scenesMap.set(this, void 0);
@@ -41837,7 +41812,7 @@ _User_adminWorldsMap = new WeakMap(), _User_assetsMap = new WeakMap(), _User_sce
41837
41812
  *
41838
41813
  * @usage
41839
41814
  * ```ts
41840
- * await new Visitor(topia, id, urlSlug, { attributes: { moveTo: { x: 0, y: 0 } } });
41815
+ * await new Visitor(topia, id, urlSlug, { attributes: { moveTo: { x: 0, y: 0 } }, credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" } });
41841
41816
  * ```
41842
41817
  */
41843
41818
  class Visitor extends User {
@@ -42057,7 +42032,8 @@ class Visitor extends User {
42057
42032
  *
42058
42033
  * @usage
42059
42034
  * ```ts
42060
- * await visitor.grantExpression({ name: "Eyes" });
42035
+ * await visitor.grantExpression({ id: "exampleExpressionId" });
42036
+ * await visitor.grantExpression({ name: "exampleExpressionName" });
42061
42037
  * ```
42062
42038
  */
42063
42039
  grantExpression({ id, name }) {
@@ -42278,18 +42254,14 @@ class Visitor extends User {
42278
42254
  * @usage
42279
42255
  * ```ts
42280
42256
  * await new WebRTCConnector(topia, {
42281
- * credentials: { interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
42257
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
42282
42258
  * });
42283
42259
  * ```
42284
42260
  */
42285
42261
  class WebRTCConnector extends SDKController {
42286
42262
  constructor(topia, urlSlug, options = { twilioConfig: {}, credentials: {} }) {
42287
- var _a, _b, _c;
42288
- super(topia, {
42289
- interactiveNonce: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.interactiveNonce,
42290
- urlSlug: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.urlSlug,
42291
- visitorId: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.visitorId,
42292
- });
42263
+ var _a;
42264
+ super(topia, Object.assign({ urlSlug: ((_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.urlSlug) || urlSlug }, options.credentials));
42293
42265
  this.twilioConfig = options === null || options === void 0 ? void 0 : options.twilioConfig;
42294
42266
  this.urlSlug = urlSlug;
42295
42267
  }
@@ -42327,19 +42299,14 @@ var _WorldActivity_visitorsMap;
42327
42299
  * ```ts
42328
42300
  * await new WorldActivity(topia, "exampleWorld", {
42329
42301
  * attributes: { name: "Example World" },
42330
- * credentials: { apiKey: "exampleKey", interactiveNonce: "exampleNonce", urlSlug: "exampleWorld", visitorId: 1 }
42302
+ * credentials: { interactiveNonce: "exampleNonce", assetId: "droppedAssetId", visitorId: 1, urlSlug: "exampleWorld" }
42331
42303
  * });
42332
42304
  * ```
42333
42305
  */
42334
42306
  class WorldActivity extends SDKController {
42335
42307
  constructor(topia, urlSlug, options = { credentials: {} }) {
42336
- var _a, _b, _c, _d;
42337
- super(topia, {
42338
- apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
42339
- interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
42340
- urlSlug: ((_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug) || urlSlug,
42341
- visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
42342
- });
42308
+ var _a;
42309
+ super(topia, Object.assign({ urlSlug: ((_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.urlSlug) || urlSlug }, options.credentials));
42343
42310
  _WorldActivity_visitorsMap.set(this, void 0);
42344
42311
  this.urlSlug = urlSlug;
42345
42312
  __classPrivateFieldSet(this, _WorldActivity_visitorsMap, {}, "f");
@@ -42509,7 +42476,7 @@ class AssetFactory extends SDKController {
42509
42476
  *
42510
42477
  * @usage
42511
42478
  * ```
42512
- * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42479
+ * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42513
42480
  * ```
42514
42481
  */
42515
42482
  create(id, options) {
@@ -42565,7 +42532,7 @@ class DroppedAssetFactory extends SDKController {
42565
42532
  *
42566
42533
  * @usage
42567
42534
  * ```
42568
- * const droppedAssetInstance = await DroppedAsset.create(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42535
+ * const droppedAssetInstance = await DroppedAsset.create(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42569
42536
  * ```
42570
42537
  */
42571
42538
  create(id, urlSlug, options) {
@@ -42577,7 +42544,7 @@ class DroppedAssetFactory extends SDKController {
42577
42544
  *
42578
42545
  * @usage
42579
42546
  * ```
42580
- * const droppedAssetInstance = await DroppedAsset.get(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42547
+ * const droppedAssetInstance = await DroppedAsset.get(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42581
42548
  * ```
42582
42549
  */
42583
42550
  get(id, urlSlug, options) {
@@ -42624,7 +42591,7 @@ class DroppedAssetFactory extends SDKController {
42624
42591
  *
42625
42592
  * @usage
42626
42593
  * ```
42627
- * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42594
+ * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42628
42595
  * const droppedAssetInstance = await DroppedAsset.get(assetInstance, {
42629
42596
  assetScale: 1.5,
42630
42597
  flipped: true,
@@ -42707,7 +42674,7 @@ class SceneFactory {
42707
42674
  *
42708
42675
  * @usage
42709
42676
  * ```
42710
- * const sceneInstance = await Scene.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42677
+ * const sceneInstance = await Scene.create(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42711
42678
  * ```
42712
42679
  */
42713
42680
  create(id, options) {
@@ -42719,7 +42686,7 @@ class SceneFactory {
42719
42686
  *
42720
42687
  * @usage
42721
42688
  * ```
42722
- * const sceneInstance = await Scene.get(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42689
+ * const sceneInstance = await Scene.get(id, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42723
42690
  * ```
42724
42691
  */
42725
42692
  get(id, options) {
@@ -42747,7 +42714,7 @@ class UserFactory {
42747
42714
  *
42748
42715
  * @usage
42749
42716
  * ```
42750
- * const userInstance = await User.create({ credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42717
+ * const userInstance = await User.create({ credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42751
42718
  * ```
42752
42719
  */
42753
42720
  create(options) {
@@ -42771,7 +42738,7 @@ class VisitorFactory {
42771
42738
  *
42772
42739
  * @usage
42773
42740
  * ```
42774
- * const visitorInstance = await Visitor.create(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42741
+ * const visitorInstance = await Visitor.create(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42775
42742
  * ```
42776
42743
  */
42777
42744
  create(id, urlSlug, options) {
@@ -42783,7 +42750,7 @@ class VisitorFactory {
42783
42750
  *
42784
42751
  * @usage
42785
42752
  * ```
42786
- * const visitorInstance = await Visitor.get(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42753
+ * const visitorInstance = await Visitor.get(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42787
42754
  * ```
42788
42755
  */
42789
42756
  get(id, urlSlug, options) {
@@ -42811,7 +42778,7 @@ class WebRTCConnectorFactory {
42811
42778
  *
42812
42779
  * @usage
42813
42780
  * ```
42814
- * const userInstance = await WebRTCConnector.create({ credentials: { interactiveNonce, interactivePublicKey, urlSlug, visitorId }, twilioConfig: {} });
42781
+ * const userInstance = await WebRTCConnector.create({ credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId }, twilioConfig: {} });
42815
42782
  * ```
42816
42783
  */
42817
42784
  create(urlSlug, options) {
@@ -42835,7 +42802,7 @@ class WorldActivityFactory {
42835
42802
  *
42836
42803
  * @usage
42837
42804
  * ```
42838
- * const worldActivityInstance = await WorldActivity.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42805
+ * const worldActivityInstance = await WorldActivity.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42839
42806
  * ```
42840
42807
  */
42841
42808
  create(urlSlug, options) {
@@ -42859,7 +42826,7 @@ class WorldFactory extends SDKController {
42859
42826
  *
42860
42827
  * @usage
42861
42828
  * ```
42862
- * const worldInstance = await World.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42829
+ * const worldInstance = await World.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
42863
42830
  * ```
42864
42831
  */
42865
42832
  create(urlSlug, options) {
package/package.json CHANGED
@@ -60,5 +60,5 @@
60
60
  "yalc-push": "yarn build && yalc publish --push --dev --no-scripts"
61
61
  },
62
62
  "type": "module",
63
- "version": "0.15.03"
63
+ "version": "0.15.05"
64
64
  }