@rtsdk/topia 0.8.5 → 0.9.1

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.js CHANGED
@@ -39715,7 +39715,7 @@ class SDKController {
39715
39715
  */
39716
39716
  class Asset extends SDKController {
39717
39717
  constructor(topia, id, options = { attributes: {}, credentials: {} }) {
39718
- var _a, _b, _c, _d, _e;
39718
+ var _a, _b, _c, _d, _e, _f;
39719
39719
  // assetId and urlSlug should only be used when Asset is extended by DroppedAsset
39720
39720
  super(topia, {
39721
39721
  apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
@@ -39725,12 +39725,23 @@ class Asset extends SDKController {
39725
39725
  visitorId: (_e = options === null || options === void 0 ? void 0 : options.credentials) === null || _e === void 0 ? void 0 : _e.visitorId,
39726
39726
  });
39727
39727
  this.id = id;
39728
+ this.urlSlug = (_f = options === null || options === void 0 ? void 0 : options.credentials) === null || _f === void 0 ? void 0 : _f.urlSlug;
39728
39729
  Object.assign(this, options.attributes);
39729
39730
  }
39731
+ /**
39732
+ * @summary
39733
+ * Retrieves platform asset details.
39734
+ *
39735
+ * @usage
39736
+ * ```ts
39737
+ * await asset.fetchAssetById();
39738
+ * const { assetName } = asset;
39739
+ * ```
39740
+ */
39730
39741
  fetchAssetById() {
39731
39742
  return __awaiter(this, void 0, void 0, function* () {
39732
39743
  try {
39733
- const response = yield this.topiaPublicApi().get(`/assets/${this.id}`, this.requestOptions);
39744
+ const response = yield this.topiaPublicApi().get(`/assets/${this.urlSlug}/${this.id}`, this.requestOptions);
39734
39745
  return response.data;
39735
39746
  }
39736
39747
  catch (error) {
@@ -39850,8 +39861,8 @@ class DroppedAsset extends Asset {
39850
39861
  setDataObject(dataObject, options = {}) {
39851
39862
  return __awaiter(this, void 0, void 0, function* () {
39852
39863
  try {
39853
- const { lock = {} } = options;
39854
- yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/set-data-object`, { dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
39864
+ const { analytics = [], lock = {} } = options;
39865
+ yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/set-data-object`, { analytics, dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
39855
39866
  this.dataObject = dataObject || this.dataObject;
39856
39867
  }
39857
39868
  catch (error) {
@@ -39876,8 +39887,8 @@ class DroppedAsset extends Asset {
39876
39887
  updateDataObject(dataObject, options = {}) {
39877
39888
  return __awaiter(this, void 0, void 0, function* () {
39878
39889
  try {
39879
- const { lock = {} } = options;
39880
- yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/update-data-object`, { dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
39890
+ const { analytics = [], lock = {} } = options;
39891
+ yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/update-data-object`, { analytics, dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
39881
39892
  this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
39882
39893
  }
39883
39894
  catch (error) {
@@ -39902,8 +39913,8 @@ class DroppedAsset extends Asset {
39902
39913
  incrementDataObjectValue(path, amount, options = {}) {
39903
39914
  return __awaiter(this, void 0, void 0, function* () {
39904
39915
  try {
39905
- const { lock = {} } = options;
39906
- yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
39916
+ const { analytics = [], lock = {} } = options;
39917
+ yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/increment-data-object-value`, { path, amount, analytics, lock }, this.requestOptions);
39907
39918
  }
39908
39919
  catch (error) {
39909
39920
  throw this.errorHandler({
@@ -40311,6 +40322,16 @@ class Scene extends SDKController {
40311
40322
  this.id = id;
40312
40323
  Object.assign(this, options.attributes);
40313
40324
  }
40325
+ /**
40326
+ * @summary
40327
+ * Retrieves scene details.
40328
+ *
40329
+ * @usage
40330
+ * ```ts
40331
+ * await scene.fetchSceneById();
40332
+ * const { name } = scene;
40333
+ * ```
40334
+ */
40314
40335
  fetchSceneById() {
40315
40336
  return __awaiter(this, void 0, void 0, function* () {
40316
40337
  try {
@@ -40411,8 +40432,8 @@ class World extends SDKController {
40411
40432
  */
40412
40433
  this.setDataObject = (dataObject, options = {}) => __awaiter(this, void 0, void 0, function* () {
40413
40434
  try {
40414
- const { lock = {} } = options;
40415
- yield this.topiaPublicApi().put(`/world/${this.urlSlug}/set-data-object`, { dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
40435
+ const { analytics = [], lock = {} } = options;
40436
+ yield this.topiaPublicApi().put(`/world/${this.urlSlug}/set-data-object`, { analytics, dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
40416
40437
  this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
40417
40438
  }
40418
40439
  catch (error) {
@@ -40435,8 +40456,8 @@ class World extends SDKController {
40435
40456
  */
40436
40457
  this.updateDataObject = (dataObject, options = {}) => __awaiter(this, void 0, void 0, function* () {
40437
40458
  try {
40438
- const { lock = {} } = options;
40439
- yield this.topiaPublicApi().put(`/world/${this.urlSlug}/update-data-object`, { dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
40459
+ const { analytics = [], lock = {} } = options;
40460
+ yield this.topiaPublicApi().put(`/world/${this.urlSlug}/update-data-object`, { analytics, dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
40440
40461
  this.dataObject = dataObject || this.dataObject;
40441
40462
  }
40442
40463
  catch (error) {
@@ -40828,8 +40849,8 @@ class World extends SDKController {
40828
40849
  incrementDataObjectValue(path, amount, options = {}) {
40829
40850
  return __awaiter(this, void 0, void 0, function* () {
40830
40851
  try {
40831
- const { lock = {} } = options;
40832
- yield this.topiaPublicApi().put(`/world/${this.urlSlug}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
40852
+ const { analytics, lock = {} } = options;
40853
+ yield this.topiaPublicApi().put(`/world/${this.urlSlug}/increment-data-object-value`, { path, amount, analytics, lock }, this.requestOptions);
40833
40854
  }
40834
40855
  catch (error) {
40835
40856
  throw this.errorHandler({
@@ -40950,9 +40971,35 @@ class User extends SDKController {
40950
40971
  get worlds() {
40951
40972
  return __classPrivateFieldGet(this, _User_worldsMap, "f");
40952
40973
  }
40974
+ /**
40975
+ * @summary
40976
+ * Verify user has valid interactive credentials
40977
+ *
40978
+ * @usage
40979
+ * ```ts
40980
+ * await user.checkInteractiveCredentials();
40981
+ * ```
40982
+ */
40983
+ checkInteractiveCredentials() {
40984
+ return __awaiter(this, void 0, void 0, function* () {
40985
+ try {
40986
+ const response = yield this.topiaPublicApi().get(`/auth/interactive-credentials`, this.requestOptions);
40987
+ return response.data;
40988
+ }
40989
+ catch (error) {
40990
+ throw this.errorHandler({ error, sdkMethod: "User.checkInteractiveCredentials" });
40991
+ }
40992
+ });
40993
+ }
40953
40994
  /**
40954
40995
  * @summary
40955
40996
  * Returns all assets owned by User when an email address is provided.
40997
+ *
40998
+ * @usage
40999
+ * ```ts
41000
+ * await user.fetchAssets();
41001
+ * const userAssets = user.assets;
41002
+ * ```
40956
41003
  */
40957
41004
  fetchAssets() {
40958
41005
  return __awaiter(this, void 0, void 0, function* () {
@@ -40975,7 +41022,12 @@ class User extends SDKController {
40975
41022
  }
40976
41023
  /**
40977
41024
  * @summary
40978
- * Returns all platform assets
41025
+ * Returns all platform assets.
41026
+ *
41027
+ * @usage
41028
+ * ```ts
41029
+ * const assets = await user.fetchPlatformAssets();
41030
+ * ```
40979
41031
  */
40980
41032
  fetchPlatformAssets() {
40981
41033
  return __awaiter(this, void 0, void 0, function* () {
@@ -40990,7 +41042,13 @@ class User extends SDKController {
40990
41042
  }
40991
41043
  /**
40992
41044
  * @summary
40993
- * Returns all scenes owned by User
41045
+ * Returns all scenes owned by User.
41046
+ *
41047
+ * @usage
41048
+ * ```ts
41049
+ * await user.fetchScenes();
41050
+ * const userScenes = user.scenes;
41051
+ * ```
40994
41052
  */
40995
41053
  fetchScenes() {
40996
41054
  return __awaiter(this, void 0, void 0, function* () {
@@ -41139,8 +41197,8 @@ class User extends SDKController {
41139
41197
  try {
41140
41198
  if (!this.profileId)
41141
41199
  throw "This method requires the use of a profileId";
41142
- const { lock = {} } = options;
41143
- yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/set-data-object`, { dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
41200
+ const { analytics = [], lock = {} } = options;
41201
+ yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/set-data-object`, { analytics, dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
41144
41202
  this.dataObject = dataObject || this.dataObject;
41145
41203
  }
41146
41204
  catch (error) {
@@ -41166,8 +41224,8 @@ class User extends SDKController {
41166
41224
  try {
41167
41225
  if (!this.profileId)
41168
41226
  throw "This method requires the use of a profileId";
41169
- const { lock = {} } = options;
41170
- yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/update-data-object`, { dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
41227
+ const { analytics = [], lock = {} } = options;
41228
+ yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/update-data-object`, { analytics, dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
41171
41229
  this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
41172
41230
  }
41173
41231
  catch (error) {
@@ -41192,8 +41250,8 @@ class User extends SDKController {
41192
41250
  incrementDataObjectValue(path, amount, options = {}) {
41193
41251
  return __awaiter(this, void 0, void 0, function* () {
41194
41252
  try {
41195
- const { lock = {} } = options;
41196
- yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
41253
+ const { analytics = [], lock = {} } = options;
41254
+ yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/increment-data-object-value`, { path, amount, analytics, lock }, this.requestOptions);
41197
41255
  }
41198
41256
  catch (error) {
41199
41257
  throw this.errorHandler({ error, params: { path, amount, options }, sdkMethod: "User.incrementDataObjectValue" });
@@ -41464,8 +41522,8 @@ class Visitor extends User {
41464
41522
  setDataObject(dataObject, options = {}) {
41465
41523
  return __awaiter(this, void 0, void 0, function* () {
41466
41524
  try {
41467
- const { lock = {} } = options;
41468
- yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/set-data-object`, { dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
41525
+ const { analytics = [], lock = {} } = options;
41526
+ yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/set-data-object`, { analytics, dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
41469
41527
  this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
41470
41528
  }
41471
41529
  catch (error) {
@@ -41489,8 +41547,8 @@ class Visitor extends User {
41489
41547
  updateDataObject(dataObject, options = {}) {
41490
41548
  return __awaiter(this, void 0, void 0, function* () {
41491
41549
  try {
41492
- const { lock = {} } = options;
41493
- yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/update-data-object`, { dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
41550
+ const { analytics = [], lock = {} } = options;
41551
+ yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/update-data-object`, { analytics, dataObject: dataObject || this.dataObject, lock }, this.requestOptions);
41494
41552
  this.dataObject = dataObject || this.dataObject;
41495
41553
  }
41496
41554
  catch (error) {
@@ -41515,8 +41573,8 @@ class Visitor extends User {
41515
41573
  incrementDataObjectValue(path, amount, options = {}) {
41516
41574
  return __awaiter(this, void 0, void 0, function* () {
41517
41575
  try {
41518
- const { lock = {} } = options;
41519
- yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
41576
+ const { analytics = [], lock = {} } = options;
41577
+ yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/increment-data-object-value`, { path, amount, analytics, lock }, this.requestOptions);
41520
41578
  }
41521
41579
  catch (error) {
41522
41580
  throw this.errorHandler({
@@ -41711,23 +41769,62 @@ class Topia {
41711
41769
  }
41712
41770
  }
41713
41771
 
41772
+ /**
41773
+ * @usage
41774
+ * ```ts
41775
+ * const Asset = new AssetFactory(myTopiaInstance);
41776
+ * ```
41777
+ */
41714
41778
  class AssetFactory {
41715
41779
  constructor(topia) {
41716
41780
  this.topia = topia;
41717
41781
  this.create;
41718
41782
  }
41783
+ /**
41784
+ * @summary
41785
+ * Instantiate a new instance of Asset class.
41786
+ *
41787
+ * @usage
41788
+ * ```
41789
+ * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
41790
+ * ```
41791
+ */
41719
41792
  create(id, options) {
41720
41793
  return new Asset(this.topia, id, options);
41721
41794
  }
41722
41795
  }
41723
41796
 
41797
+ /**
41798
+ * @usage
41799
+ * ```ts
41800
+ * const DroppedAsset = new DroppedAssetFactory(myTopiaInstance);
41801
+ * ```
41802
+ */
41724
41803
  class DroppedAssetFactory extends SDKController {
41725
41804
  constructor(topia) {
41726
41805
  super(topia);
41727
41806
  }
41807
+ /**
41808
+ * @summary
41809
+ * Instantiate a new instance of DroppedAsset class.
41810
+ *
41811
+ * @usage
41812
+ * ```
41813
+ * const droppedAssetInstance = await DroppedAsset.create(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
41814
+ * ```
41815
+ */
41728
41816
  create(id, urlSlug, options) {
41729
41817
  return new DroppedAsset(this.topia, id, urlSlug, options);
41730
41818
  }
41819
+ /**
41820
+ * @summary
41821
+ * Instantiate a new instance of DroppedAsset class and retrieve all properties.
41822
+ *
41823
+ * @usage
41824
+ * ```
41825
+ * const droppedAssetInstance = await DroppedAsset.get(assetId, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
41826
+ * ```
41827
+ */
41731
41828
  get(id, urlSlug, options) {
41732
41829
  return __awaiter(this, void 0, void 0, function* () {
41733
41830
  const droppedAsset = new DroppedAsset(this.topia, id, urlSlug, options);
@@ -41735,6 +41832,15 @@ class DroppedAssetFactory extends SDKController {
41735
41832
  return droppedAsset;
41736
41833
  });
41737
41834
  }
41835
+ /**
41836
+ * @summary
41837
+ * Searches dropped assets within a world by a provide `uniqueName`. If a single match is found, a new instance of DroppedAsset class is returned all properties.
41838
+ *
41839
+ * @usage
41840
+ * ```
41841
+ * const droppedAssetInstance = await DroppedAsset.getWithUniqueName("exampleUniqueName", urlSlug, { interactivePublicKey, interactiveSecret });
41842
+ * ```
41843
+ */
41738
41844
  getWithUniqueName(uniqueName, urlSlug, credentials) {
41739
41845
  return __awaiter(this, void 0, void 0, function* () {
41740
41846
  const { apiKey, interactivePublicKey, interactiveSecret } = credentials;
@@ -41757,6 +41863,26 @@ class DroppedAssetFactory extends SDKController {
41757
41863
  }
41758
41864
  });
41759
41865
  }
41866
+ /**
41867
+ * @summary
41868
+ * Drops an asset in a world and returns a new instance of DroppedAsset class with all properties.
41869
+ *
41870
+ * @usage
41871
+ * ```
41872
+ * const assetInstance = await Asset.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
41873
+ * const droppedAssetInstance = await DroppedAsset.get(assetInstance, {
41874
+ assetScale: 1.5,
41875
+ flipped: true,
41876
+ layer0: "",
41877
+ layer1: "https://pathtoimage.png",
41878
+ interactivePublicKey,
41879
+ isInteractive: true,
41880
+ position: { x: 0, y: 0 },
41881
+ uniqueName: "exampleUniqueName",
41882
+ urlSlug,
41883
+ });
41884
+ * ```
41885
+ */
41760
41886
  drop(asset, { assetScale = 1, flipped, interactivePublicKey, isInteractive, layer0 = "", layer1 = "", position: { x, y }, sceneDropId, text, textColor, textSize, textWeight, textWidth, uniqueName, urlSlug, yOrderAdjust, }) {
41761
41887
  return __awaiter(this, void 0, void 0, function* () {
41762
41888
  let specialType = null;
@@ -41801,14 +41927,38 @@ class DroppedAssetFactory extends SDKController {
41801
41927
  }
41802
41928
  }
41803
41929
 
41930
+ /**
41931
+ * @usage
41932
+ * ```ts
41933
+ * const Scene = new SceneFactory(myTopiaInstance);
41934
+ * ```
41935
+ */
41804
41936
  class SceneFactory {
41805
41937
  constructor(topia) {
41806
41938
  this.topia = topia;
41807
41939
  this.create;
41808
41940
  }
41941
+ /**
41942
+ * @summary
41943
+ * Instantiate a new instance of Scene class.
41944
+ *
41945
+ * @usage
41946
+ * ```
41947
+ * const sceneInstance = await Scene.create(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
41948
+ * ```
41949
+ */
41809
41950
  create(id, options) {
41810
41951
  return new Scene(this.topia, id, options);
41811
41952
  }
41953
+ /**
41954
+ * @summary
41955
+ * Instantiate a new instance of Scene class and retrieve all properties.
41956
+ *
41957
+ * @usage
41958
+ * ```
41959
+ * const sceneInstance = await Scene.get(id, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
41960
+ * ```
41961
+ */
41812
41962
  get(id, options) {
41813
41963
  return __awaiter(this, void 0, void 0, function* () {
41814
41964
  const scene = yield new Scene(this.topia, id, options);
@@ -41818,22 +41968,61 @@ class SceneFactory {
41818
41968
  }
41819
41969
  }
41820
41970
 
41971
+ /**
41972
+ * @usage
41973
+ * ```ts
41974
+ * const User = new UserFactory(myTopiaInstance);
41975
+ * ```
41976
+ */
41821
41977
  class UserFactory {
41822
41978
  constructor(topia) {
41823
41979
  this.topia = topia;
41824
41980
  }
41981
+ /**
41982
+ * @summary
41983
+ * Instantiate a new instance of User class.
41984
+ *
41985
+ * @usage
41986
+ * ```
41987
+ * const userInstance = await User.create({ credentials: { interactiveNonce, interactivePublicKey, visitorId } });
41988
+ * ```
41989
+ */
41825
41990
  create(options) {
41826
41991
  return new User(this.topia, options);
41827
41992
  }
41828
41993
  }
41829
41994
 
41995
+ /**
41996
+ * @usage
41997
+ * ```ts
41998
+ * const Visitor = new VisitorFactory(myTopiaInstance);
41999
+ * ```
42000
+ */
41830
42001
  class VisitorFactory {
41831
42002
  constructor(topia) {
41832
42003
  this.topia = topia;
41833
42004
  }
42005
+ /**
42006
+ * @summary
42007
+ * Instantiate a new instance of Visitor class.
42008
+ *
42009
+ * @usage
42010
+ * ```
42011
+ * const visitorInstance = await Visitor.create(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42012
+ * ```
42013
+ */
41834
42014
  create(id, urlSlug, options) {
41835
42015
  return new Visitor(this.topia, id, urlSlug, options);
41836
42016
  }
42017
+ /**
42018
+ * @summary
42019
+ * Instantiate a new instance of Visitor class and retrieve all properties.
42020
+ *
42021
+ * @usage
42022
+ * ```
42023
+ * const visitorInstance = await Visitor.get(id, urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42024
+ * ```
42025
+ */
41837
42026
  get(id, urlSlug, options) {
41838
42027
  return __awaiter(this, void 0, void 0, function* () {
41839
42028
  const visitor = new Visitor(this.topia, id, urlSlug, options);
@@ -41843,22 +42032,61 @@ class VisitorFactory {
41843
42032
  }
41844
42033
  }
41845
42034
 
42035
+ /**
42036
+ * @usage
42037
+ * ```ts
42038
+ * const WorldActivity = new WorldActivityFactory(myTopiaInstance);
42039
+ * ```
42040
+ */
41846
42041
  class WorldActivityFactory {
41847
42042
  constructor(topia) {
41848
42043
  this.topia = topia;
41849
42044
  }
42045
+ /**
42046
+ * @summary
42047
+ * Instantiate a new instance of WorldActivity class.
42048
+ *
42049
+ * @usage
42050
+ * ```
42051
+ * const worldActivityInstance = await WorldActivity.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42052
+ * ```
42053
+ */
41850
42054
  create(urlSlug, options) {
41851
42055
  return new WorldActivity(this.topia, urlSlug, options);
41852
42056
  }
41853
42057
  }
41854
42058
 
42059
+ /**
42060
+ * @usage
42061
+ * ```ts
42062
+ * const World = new WorldFactory(myTopiaInstance);
42063
+ * ```
42064
+ */
41855
42065
  class WorldFactory extends SDKController {
41856
42066
  constructor(topia) {
41857
42067
  super(topia);
41858
42068
  }
42069
+ /**
42070
+ * @summary
42071
+ * Instantiate a new instance of World class.
42072
+ *
42073
+ * @usage
42074
+ * ```
42075
+ * const worldInstance = await World.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
42076
+ * ```
42077
+ */
41859
42078
  create(urlSlug, options) {
41860
42079
  return new World(this.topia, urlSlug, options);
41861
42080
  }
42081
+ /**
42082
+ * @summary
42083
+ * Deletes an array of Dropped Assets from within a world and returns success: true
42084
+ *
42085
+ * @usage
42086
+ * ```
42087
+ * await World.deleteDroppedAssets(urlSlug, ["exampleDroppedAssetId1", "exampleDroppedAssetId2"], { interactivePublicKey, interactiveSecret });
42088
+ * ```
42089
+ */
41862
42090
  deleteDroppedAssets(urlSlug, droppedAssetIds, credentials) {
41863
42091
  return __awaiter(this, void 0, void 0, function* () {
41864
42092
  const { apiKey, interactivePublicKey, interactiveSecret } = credentials;
package/package.json CHANGED
@@ -59,5 +59,5 @@
59
59
  "local-publish": "yarn build && yalc publish --push --no-scripts"
60
60
  },
61
61
  "type": "module",
62
- "version": "0.8.5"
62
+ "version": "0.9.1"
63
63
  }