@rtsdk/topia 0.6.3 → 0.7.0
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 +12 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.js +12 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -40863,7 +40863,7 @@ class User extends SDKController {
|
|
|
40863
40863
|
super(topia, {
|
|
40864
40864
|
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
40865
40865
|
interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
|
|
40866
|
-
profileId: options.profileId,
|
|
40866
|
+
profileId: options === null || options === void 0 ? void 0 : options.profileId,
|
|
40867
40867
|
urlSlug: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug,
|
|
40868
40868
|
visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
|
|
40869
40869
|
});
|
|
@@ -40871,7 +40871,7 @@ class User extends SDKController {
|
|
|
40871
40871
|
_User_assetsMap.set(this, void 0);
|
|
40872
40872
|
_User_scenesMap.set(this, void 0);
|
|
40873
40873
|
_User_worldsMap.set(this, void 0);
|
|
40874
|
-
this.profileId = options.profileId;
|
|
40874
|
+
this.profileId = options === null || options === void 0 ? void 0 : options.profileId;
|
|
40875
40875
|
this.dataObject = {};
|
|
40876
40876
|
this.profile = {};
|
|
40877
40877
|
__classPrivateFieldSet(this, _User_adminWorldsMap, {}, "f");
|
|
@@ -41674,13 +41674,21 @@ class DroppedAssetFactory extends SDKController {
|
|
|
41674
41674
|
}
|
|
41675
41675
|
});
|
|
41676
41676
|
}
|
|
41677
|
-
drop(asset, { interactivePublicKey, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }) {
|
|
41677
|
+
drop(asset, { interactivePublicKey, isInteractive, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }) {
|
|
41678
41678
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41679
|
-
const params = { interactivePublicKey, sceneDropId, uniqueName, urlSlug, yOrderAdjust };
|
|
41679
|
+
const params = { interactivePublicKey, isInteractive, sceneDropId, uniqueName, urlSlug, yOrderAdjust };
|
|
41680
|
+
if (isInteractive && !interactivePublicKey) {
|
|
41681
|
+
throw this.errorHandler({
|
|
41682
|
+
message: "interactivePublicKey is required",
|
|
41683
|
+
params,
|
|
41684
|
+
sdkMethod: "DroppedAssetFactory.drop",
|
|
41685
|
+
});
|
|
41686
|
+
}
|
|
41680
41687
|
try {
|
|
41681
41688
|
const response = yield this.topiaPublicApi().post(`/world/${urlSlug}/assets`, {
|
|
41682
41689
|
assetId: asset.id,
|
|
41683
41690
|
interactivePublicKey,
|
|
41691
|
+
isInteractive,
|
|
41684
41692
|
position: { x, y },
|
|
41685
41693
|
sceneDropId,
|
|
41686
41694
|
uniqueName,
|
package/dist/index.d.ts
CHANGED
|
@@ -1613,8 +1613,9 @@ declare class DroppedAssetFactory extends SDKController {
|
|
|
1613
1613
|
create(id: string, urlSlug: string, options?: DroppedAssetOptionalInterface): DroppedAsset;
|
|
1614
1614
|
get(id: string, urlSlug: string, options?: DroppedAssetOptionalInterface): Promise<DroppedAsset>;
|
|
1615
1615
|
getWithUniqueName(uniqueName: string, urlSlug: string, interactivePublicKey: string, interactiveSecret: string): Promise<DroppedAsset>;
|
|
1616
|
-
drop(asset: Asset, { interactivePublicKey, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }: {
|
|
1616
|
+
drop(asset: Asset, { interactivePublicKey, isInteractive, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }: {
|
|
1617
1617
|
interactivePublicKey?: string;
|
|
1618
|
+
isInteractive?: boolean;
|
|
1618
1619
|
position: {
|
|
1619
1620
|
x: number;
|
|
1620
1621
|
y: number;
|
package/dist/index.js
CHANGED
|
@@ -40861,7 +40861,7 @@ class User extends SDKController {
|
|
|
40861
40861
|
super(topia, {
|
|
40862
40862
|
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
40863
40863
|
interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
|
|
40864
|
-
profileId: options.profileId,
|
|
40864
|
+
profileId: options === null || options === void 0 ? void 0 : options.profileId,
|
|
40865
40865
|
urlSlug: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug,
|
|
40866
40866
|
visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
|
|
40867
40867
|
});
|
|
@@ -40869,7 +40869,7 @@ class User extends SDKController {
|
|
|
40869
40869
|
_User_assetsMap.set(this, void 0);
|
|
40870
40870
|
_User_scenesMap.set(this, void 0);
|
|
40871
40871
|
_User_worldsMap.set(this, void 0);
|
|
40872
|
-
this.profileId = options.profileId;
|
|
40872
|
+
this.profileId = options === null || options === void 0 ? void 0 : options.profileId;
|
|
40873
40873
|
this.dataObject = {};
|
|
40874
40874
|
this.profile = {};
|
|
40875
40875
|
__classPrivateFieldSet(this, _User_adminWorldsMap, {}, "f");
|
|
@@ -41672,13 +41672,21 @@ class DroppedAssetFactory extends SDKController {
|
|
|
41672
41672
|
}
|
|
41673
41673
|
});
|
|
41674
41674
|
}
|
|
41675
|
-
drop(asset, { interactivePublicKey, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }) {
|
|
41675
|
+
drop(asset, { interactivePublicKey, isInteractive, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }) {
|
|
41676
41676
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41677
|
-
const params = { interactivePublicKey, sceneDropId, uniqueName, urlSlug, yOrderAdjust };
|
|
41677
|
+
const params = { interactivePublicKey, isInteractive, sceneDropId, uniqueName, urlSlug, yOrderAdjust };
|
|
41678
|
+
if (isInteractive && !interactivePublicKey) {
|
|
41679
|
+
throw this.errorHandler({
|
|
41680
|
+
message: "interactivePublicKey is required",
|
|
41681
|
+
params,
|
|
41682
|
+
sdkMethod: "DroppedAssetFactory.drop",
|
|
41683
|
+
});
|
|
41684
|
+
}
|
|
41678
41685
|
try {
|
|
41679
41686
|
const response = yield this.topiaPublicApi().post(`/world/${urlSlug}/assets`, {
|
|
41680
41687
|
assetId: asset.id,
|
|
41681
41688
|
interactivePublicKey,
|
|
41689
|
+
isInteractive,
|
|
41682
41690
|
position: { x, y },
|
|
41683
41691
|
sceneDropId,
|
|
41684
41692
|
uniqueName,
|
package/package.json
CHANGED