@rtsdk/topia 0.3.1 → 0.3.2
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 +39 -5
- package/dist/index.d.ts +22 -5
- package/dist/index.js +39 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -40445,7 +40445,7 @@ class World extends SDKController {
|
|
|
40445
40445
|
*
|
|
40446
40446
|
* @usage
|
|
40447
40447
|
* ```ts
|
|
40448
|
-
* await world.
|
|
40448
|
+
* await world.fetchDroppedAssetsWithUniqueName();
|
|
40449
40449
|
* const assets = world.droppedAssets;
|
|
40450
40450
|
* ```
|
|
40451
40451
|
*/
|
|
@@ -40468,6 +40468,40 @@ class World extends SDKController {
|
|
|
40468
40468
|
}
|
|
40469
40469
|
});
|
|
40470
40470
|
}
|
|
40471
|
+
/**
|
|
40472
|
+
* @summary
|
|
40473
|
+
* Retrieve all assets dropped in a world matching dropSceneId.
|
|
40474
|
+
*
|
|
40475
|
+
* @usage
|
|
40476
|
+
* ```ts
|
|
40477
|
+
* await world.fetchDroppedAssetsBySceneDropId({
|
|
40478
|
+
* sceneDropId: "sceneDropIdExample",
|
|
40479
|
+
* uniqueName: "optionalUniqueNameExample",
|
|
40480
|
+
* });
|
|
40481
|
+
* const assets = world.droppedAssets;
|
|
40482
|
+
* ```
|
|
40483
|
+
*/
|
|
40484
|
+
fetchDroppedAssetsBySceneDropId({ sceneDropId, uniqueName, }) {
|
|
40485
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40486
|
+
try {
|
|
40487
|
+
if (!sceneDropId)
|
|
40488
|
+
throw this.errorHandler({ message: "A sceneDropId is required." });
|
|
40489
|
+
const response = yield this.topiaPublicApi().get(`/world/${this.urlSlug}/assets-with-scene-drop-id/${sceneDropId}?${uniqueName ? `?uniqueName=${uniqueName}` : ""}`, this.requestOptions);
|
|
40490
|
+
// create temp map and then update private property only once
|
|
40491
|
+
const droppedAssets = [];
|
|
40492
|
+
for (const asset of response.data.assets) {
|
|
40493
|
+
droppedAssets.push(new DroppedAsset(this.topia, asset.id, this.urlSlug, {
|
|
40494
|
+
attributes: asset,
|
|
40495
|
+
credentials: this.credentials,
|
|
40496
|
+
}));
|
|
40497
|
+
}
|
|
40498
|
+
return droppedAssets;
|
|
40499
|
+
}
|
|
40500
|
+
catch (error) {
|
|
40501
|
+
throw this.errorHandler({ error });
|
|
40502
|
+
}
|
|
40503
|
+
});
|
|
40504
|
+
}
|
|
40471
40505
|
/**
|
|
40472
40506
|
* @summary
|
|
40473
40507
|
* Update multiple custom text dropped assets with a single style while preserving text for specified dropped assets only.
|
|
@@ -40751,7 +40785,7 @@ class User extends SDKController {
|
|
|
40751
40785
|
*
|
|
40752
40786
|
* @usage
|
|
40753
40787
|
* ```ts
|
|
40754
|
-
* await user.
|
|
40788
|
+
* await user.updateDataObject({
|
|
40755
40789
|
* "exampleKey": "exampleValue",
|
|
40756
40790
|
* });
|
|
40757
40791
|
* ```
|
|
@@ -40940,7 +40974,7 @@ class Visitor extends User {
|
|
|
40940
40974
|
*
|
|
40941
40975
|
* @usage
|
|
40942
40976
|
* ```ts
|
|
40943
|
-
* const dataObject = await visitor.
|
|
40977
|
+
* const dataObject = await visitor.fetchDataObject();
|
|
40944
40978
|
* ```
|
|
40945
40979
|
*/
|
|
40946
40980
|
fetchDataObject() {
|
|
@@ -40963,7 +40997,7 @@ class Visitor extends User {
|
|
|
40963
40997
|
*
|
|
40964
40998
|
* @usage
|
|
40965
40999
|
* ```ts
|
|
40966
|
-
* await visitor.
|
|
41000
|
+
* await visitor.setDataObject({
|
|
40967
41001
|
* "exampleKey": "exampleValue",
|
|
40968
41002
|
* });
|
|
40969
41003
|
* ```
|
|
@@ -40988,7 +41022,7 @@ class Visitor extends User {
|
|
|
40988
41022
|
*
|
|
40989
41023
|
* @usage
|
|
40990
41024
|
* ```ts
|
|
40991
|
-
* await visitor.
|
|
41025
|
+
* await visitor.updateDataObject({
|
|
40992
41026
|
* "exampleKey": "exampleValue",
|
|
40993
41027
|
* });
|
|
40994
41028
|
* ```
|
package/dist/index.d.ts
CHANGED
|
@@ -428,7 +428,7 @@ declare class World extends SDKController implements WorldInterface {
|
|
|
428
428
|
*
|
|
429
429
|
* @usage
|
|
430
430
|
* ```ts
|
|
431
|
-
* await world.
|
|
431
|
+
* await world.fetchDroppedAssetsWithUniqueName();
|
|
432
432
|
* const assets = world.droppedAssets;
|
|
433
433
|
* ```
|
|
434
434
|
*/
|
|
@@ -437,6 +437,23 @@ declare class World extends SDKController implements WorldInterface {
|
|
|
437
437
|
isPartial?: boolean;
|
|
438
438
|
isReversed?: boolean;
|
|
439
439
|
}): Promise<DroppedAsset[]>;
|
|
440
|
+
/**
|
|
441
|
+
* @summary
|
|
442
|
+
* Retrieve all assets dropped in a world matching dropSceneId.
|
|
443
|
+
*
|
|
444
|
+
* @usage
|
|
445
|
+
* ```ts
|
|
446
|
+
* await world.fetchDroppedAssetsBySceneDropId({
|
|
447
|
+
* sceneDropId: "sceneDropIdExample",
|
|
448
|
+
* uniqueName: "optionalUniqueNameExample",
|
|
449
|
+
* });
|
|
450
|
+
* const assets = world.droppedAssets;
|
|
451
|
+
* ```
|
|
452
|
+
*/
|
|
453
|
+
fetchDroppedAssetsBySceneDropId({ sceneDropId, uniqueName, }: {
|
|
454
|
+
sceneDropId: string;
|
|
455
|
+
uniqueName?: string;
|
|
456
|
+
}): Promise<DroppedAsset[]>;
|
|
440
457
|
/**
|
|
441
458
|
* @summary
|
|
442
459
|
* Update multiple custom text dropped assets with a single style while preserving text for specified dropped assets only.
|
|
@@ -659,7 +676,7 @@ declare class User extends SDKController implements UserInterface {
|
|
|
659
676
|
*
|
|
660
677
|
* @usage
|
|
661
678
|
* ```ts
|
|
662
|
-
* await user.
|
|
679
|
+
* await user.updateDataObject({
|
|
663
680
|
* "exampleKey": "exampleValue",
|
|
664
681
|
* });
|
|
665
682
|
* ```
|
|
@@ -770,7 +787,7 @@ declare class Visitor extends User implements VisitorInterface {
|
|
|
770
787
|
*
|
|
771
788
|
* @usage
|
|
772
789
|
* ```ts
|
|
773
|
-
* const dataObject = await visitor.
|
|
790
|
+
* const dataObject = await visitor.fetchDataObject();
|
|
774
791
|
* ```
|
|
775
792
|
*/
|
|
776
793
|
fetchDataObject(): Promise<void | ResponseType>;
|
|
@@ -782,7 +799,7 @@ declare class Visitor extends User implements VisitorInterface {
|
|
|
782
799
|
*
|
|
783
800
|
* @usage
|
|
784
801
|
* ```ts
|
|
785
|
-
* await visitor.
|
|
802
|
+
* await visitor.setDataObject({
|
|
786
803
|
* "exampleKey": "exampleValue",
|
|
787
804
|
* });
|
|
788
805
|
* ```
|
|
@@ -801,7 +818,7 @@ declare class Visitor extends User implements VisitorInterface {
|
|
|
801
818
|
*
|
|
802
819
|
* @usage
|
|
803
820
|
* ```ts
|
|
804
|
-
* await visitor.
|
|
821
|
+
* await visitor.updateDataObject({
|
|
805
822
|
* "exampleKey": "exampleValue",
|
|
806
823
|
* });
|
|
807
824
|
* ```
|
package/dist/index.js
CHANGED
|
@@ -40443,7 +40443,7 @@ class World extends SDKController {
|
|
|
40443
40443
|
*
|
|
40444
40444
|
* @usage
|
|
40445
40445
|
* ```ts
|
|
40446
|
-
* await world.
|
|
40446
|
+
* await world.fetchDroppedAssetsWithUniqueName();
|
|
40447
40447
|
* const assets = world.droppedAssets;
|
|
40448
40448
|
* ```
|
|
40449
40449
|
*/
|
|
@@ -40466,6 +40466,40 @@ class World extends SDKController {
|
|
|
40466
40466
|
}
|
|
40467
40467
|
});
|
|
40468
40468
|
}
|
|
40469
|
+
/**
|
|
40470
|
+
* @summary
|
|
40471
|
+
* Retrieve all assets dropped in a world matching dropSceneId.
|
|
40472
|
+
*
|
|
40473
|
+
* @usage
|
|
40474
|
+
* ```ts
|
|
40475
|
+
* await world.fetchDroppedAssetsBySceneDropId({
|
|
40476
|
+
* sceneDropId: "sceneDropIdExample",
|
|
40477
|
+
* uniqueName: "optionalUniqueNameExample",
|
|
40478
|
+
* });
|
|
40479
|
+
* const assets = world.droppedAssets;
|
|
40480
|
+
* ```
|
|
40481
|
+
*/
|
|
40482
|
+
fetchDroppedAssetsBySceneDropId({ sceneDropId, uniqueName, }) {
|
|
40483
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40484
|
+
try {
|
|
40485
|
+
if (!sceneDropId)
|
|
40486
|
+
throw this.errorHandler({ message: "A sceneDropId is required." });
|
|
40487
|
+
const response = yield this.topiaPublicApi().get(`/world/${this.urlSlug}/assets-with-scene-drop-id/${sceneDropId}?${uniqueName ? `?uniqueName=${uniqueName}` : ""}`, this.requestOptions);
|
|
40488
|
+
// create temp map and then update private property only once
|
|
40489
|
+
const droppedAssets = [];
|
|
40490
|
+
for (const asset of response.data.assets) {
|
|
40491
|
+
droppedAssets.push(new DroppedAsset(this.topia, asset.id, this.urlSlug, {
|
|
40492
|
+
attributes: asset,
|
|
40493
|
+
credentials: this.credentials,
|
|
40494
|
+
}));
|
|
40495
|
+
}
|
|
40496
|
+
return droppedAssets;
|
|
40497
|
+
}
|
|
40498
|
+
catch (error) {
|
|
40499
|
+
throw this.errorHandler({ error });
|
|
40500
|
+
}
|
|
40501
|
+
});
|
|
40502
|
+
}
|
|
40469
40503
|
/**
|
|
40470
40504
|
* @summary
|
|
40471
40505
|
* Update multiple custom text dropped assets with a single style while preserving text for specified dropped assets only.
|
|
@@ -40749,7 +40783,7 @@ class User extends SDKController {
|
|
|
40749
40783
|
*
|
|
40750
40784
|
* @usage
|
|
40751
40785
|
* ```ts
|
|
40752
|
-
* await user.
|
|
40786
|
+
* await user.updateDataObject({
|
|
40753
40787
|
* "exampleKey": "exampleValue",
|
|
40754
40788
|
* });
|
|
40755
40789
|
* ```
|
|
@@ -40938,7 +40972,7 @@ class Visitor extends User {
|
|
|
40938
40972
|
*
|
|
40939
40973
|
* @usage
|
|
40940
40974
|
* ```ts
|
|
40941
|
-
* const dataObject = await visitor.
|
|
40975
|
+
* const dataObject = await visitor.fetchDataObject();
|
|
40942
40976
|
* ```
|
|
40943
40977
|
*/
|
|
40944
40978
|
fetchDataObject() {
|
|
@@ -40961,7 +40995,7 @@ class Visitor extends User {
|
|
|
40961
40995
|
*
|
|
40962
40996
|
* @usage
|
|
40963
40997
|
* ```ts
|
|
40964
|
-
* await visitor.
|
|
40998
|
+
* await visitor.setDataObject({
|
|
40965
40999
|
* "exampleKey": "exampleValue",
|
|
40966
41000
|
* });
|
|
40967
41001
|
* ```
|
|
@@ -40986,7 +41020,7 @@ class Visitor extends User {
|
|
|
40986
41020
|
*
|
|
40987
41021
|
* @usage
|
|
40988
41022
|
* ```ts
|
|
40989
|
-
* await visitor.
|
|
41023
|
+
* await visitor.updateDataObject({
|
|
40990
41024
|
* "exampleKey": "exampleValue",
|
|
40991
41025
|
* });
|
|
40992
41026
|
* ```
|
package/package.json
CHANGED