@rtsdk/topia 0.5.0 → 0.5.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.cjs +100 -87
- package/dist/index.d.ts +3 -1
- package/dist/index.js +100 -87
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -39666,7 +39666,7 @@ class SDKController {
|
|
|
39666
39666
|
topiaPublicApi() {
|
|
39667
39667
|
return this.topia.axios;
|
|
39668
39668
|
}
|
|
39669
|
-
errorHandler({ error, message = "Something went wrong. Please try again or contact support.", }) {
|
|
39669
|
+
errorHandler({ error, message = "Something went wrong. Please try again or contact support.", params, }) {
|
|
39670
39670
|
var _a, _b;
|
|
39671
39671
|
const stackTrace = new Error("Thrown here:");
|
|
39672
39672
|
let data = {}, errorMessage = message, method = "unknown", stack = "empty", status = 500, url = "unknown";
|
|
@@ -39692,6 +39692,7 @@ class SDKController {
|
|
|
39692
39692
|
data,
|
|
39693
39693
|
message: errorMessage,
|
|
39694
39694
|
method,
|
|
39695
|
+
params,
|
|
39695
39696
|
stack,
|
|
39696
39697
|
stackTrace,
|
|
39697
39698
|
status,
|
|
@@ -39749,7 +39750,7 @@ class DroppedAsset extends Asset {
|
|
|
39749
39750
|
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/${updateType}`, Object.assign({}, payload), this.requestOptions);
|
|
39750
39751
|
}
|
|
39751
39752
|
catch (error) {
|
|
39752
|
-
throw this.errorHandler({ error });
|
|
39753
|
+
throw this.errorHandler({ error, params: { payload, updateType } });
|
|
39753
39754
|
}
|
|
39754
39755
|
}));
|
|
39755
39756
|
Object.assign(this, options.attributes);
|
|
@@ -39841,7 +39842,7 @@ class DroppedAsset extends Asset {
|
|
|
39841
39842
|
this.dataObject = dataObject || this.dataObject;
|
|
39842
39843
|
}
|
|
39843
39844
|
catch (error) {
|
|
39844
|
-
throw this.errorHandler({ error });
|
|
39845
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
39845
39846
|
}
|
|
39846
39847
|
});
|
|
39847
39848
|
}
|
|
@@ -39867,7 +39868,7 @@ class DroppedAsset extends Asset {
|
|
|
39867
39868
|
this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
|
|
39868
39869
|
}
|
|
39869
39870
|
catch (error) {
|
|
39870
|
-
throw this.errorHandler({ error });
|
|
39871
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
39871
39872
|
}
|
|
39872
39873
|
});
|
|
39873
39874
|
}
|
|
@@ -39892,7 +39893,7 @@ class DroppedAsset extends Asset {
|
|
|
39892
39893
|
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
|
|
39893
39894
|
}
|
|
39894
39895
|
catch (error) {
|
|
39895
|
-
throw this.errorHandler({ error });
|
|
39896
|
+
throw this.errorHandler({ error, params: { path, amount, options } });
|
|
39896
39897
|
}
|
|
39897
39898
|
});
|
|
39898
39899
|
}
|
|
@@ -39911,11 +39912,12 @@ class DroppedAsset extends Asset {
|
|
|
39911
39912
|
* ```
|
|
39912
39913
|
*/
|
|
39913
39914
|
updateBroadcast({ assetBroadcast, assetBroadcastAll, broadcasterEmail, }) {
|
|
39915
|
+
const params = { assetBroadcast, assetBroadcastAll, broadcasterEmail };
|
|
39914
39916
|
try {
|
|
39915
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
39917
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "set-asset-broadcast");
|
|
39916
39918
|
}
|
|
39917
39919
|
catch (error) {
|
|
39918
|
-
throw this.errorHandler({ error });
|
|
39920
|
+
throw this.errorHandler({ error, params });
|
|
39919
39921
|
}
|
|
39920
39922
|
}
|
|
39921
39923
|
/**
|
|
@@ -39939,21 +39941,22 @@ class DroppedAsset extends Asset {
|
|
|
39939
39941
|
* ```
|
|
39940
39942
|
*/
|
|
39941
39943
|
updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }) {
|
|
39944
|
+
const params = {
|
|
39945
|
+
clickType,
|
|
39946
|
+
clickableLink,
|
|
39947
|
+
clickableLinkTitle,
|
|
39948
|
+
clickableDisplayTextDescription,
|
|
39949
|
+
clickableDisplayTextHeadline,
|
|
39950
|
+
isForceLinkInIframe,
|
|
39951
|
+
isOpenLinkInDrawer,
|
|
39952
|
+
portalName,
|
|
39953
|
+
position,
|
|
39954
|
+
};
|
|
39942
39955
|
try {
|
|
39943
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
39944
|
-
clickType,
|
|
39945
|
-
clickableLink,
|
|
39946
|
-
clickableLinkTitle,
|
|
39947
|
-
clickableDisplayTextDescription,
|
|
39948
|
-
clickableDisplayTextHeadline,
|
|
39949
|
-
isForceLinkInIframe,
|
|
39950
|
-
isOpenLinkInDrawer,
|
|
39951
|
-
portalName,
|
|
39952
|
-
position,
|
|
39953
|
-
}, "change-click-type");
|
|
39956
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "change-click-type");
|
|
39954
39957
|
}
|
|
39955
39958
|
catch (error) {
|
|
39956
|
-
throw this.errorHandler({ error });
|
|
39959
|
+
throw this.errorHandler({ error, params });
|
|
39957
39960
|
}
|
|
39958
39961
|
}
|
|
39959
39962
|
/**
|
|
@@ -39973,11 +39976,12 @@ class DroppedAsset extends Asset {
|
|
|
39973
39976
|
* ```
|
|
39974
39977
|
*/
|
|
39975
39978
|
updateCustomTextAsset(style, text) {
|
|
39979
|
+
const params = { style, text };
|
|
39976
39980
|
try {
|
|
39977
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
39981
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "set-custom-text");
|
|
39978
39982
|
}
|
|
39979
39983
|
catch (error) {
|
|
39980
|
-
throw this.errorHandler({ error });
|
|
39984
|
+
throw this.errorHandler({ error, params });
|
|
39981
39985
|
}
|
|
39982
39986
|
}
|
|
39983
39987
|
/**
|
|
@@ -39999,11 +40003,21 @@ class DroppedAsset extends Asset {
|
|
|
39999
40003
|
* ```
|
|
40000
40004
|
*/
|
|
40001
40005
|
updateMediaType({ audioRadius, audioSliderVolume, isVideo, mediaLink, mediaName, mediaType, portalName, syncUserMedia, }) {
|
|
40006
|
+
const params = {
|
|
40007
|
+
audioRadius,
|
|
40008
|
+
audioSliderVolume,
|
|
40009
|
+
isVideo,
|
|
40010
|
+
mediaLink,
|
|
40011
|
+
mediaName,
|
|
40012
|
+
mediaType,
|
|
40013
|
+
portalName,
|
|
40014
|
+
syncUserMedia,
|
|
40015
|
+
};
|
|
40002
40016
|
try {
|
|
40003
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
40017
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "change-media-type");
|
|
40004
40018
|
}
|
|
40005
40019
|
catch (error) {
|
|
40006
|
-
throw this.errorHandler({ error });
|
|
40020
|
+
throw this.errorHandler({ error, params });
|
|
40007
40021
|
}
|
|
40008
40022
|
}
|
|
40009
40023
|
/**
|
|
@@ -40020,7 +40034,7 @@ class DroppedAsset extends Asset {
|
|
|
40020
40034
|
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { isMutezone }, "set-mute-zone");
|
|
40021
40035
|
}
|
|
40022
40036
|
catch (error) {
|
|
40023
|
-
throw this.errorHandler({ error });
|
|
40037
|
+
throw this.errorHandler({ error, params: { isMutezone } });
|
|
40024
40038
|
}
|
|
40025
40039
|
}
|
|
40026
40040
|
/**
|
|
@@ -40037,7 +40051,7 @@ class DroppedAsset extends Asset {
|
|
|
40037
40051
|
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { isWebhookZoneEnabled }, "set-webhook-zone");
|
|
40038
40052
|
}
|
|
40039
40053
|
catch (error) {
|
|
40040
|
-
throw this.errorHandler({ error });
|
|
40054
|
+
throw this.errorHandler({ error, params: { isWebhookZoneEnabled } });
|
|
40041
40055
|
}
|
|
40042
40056
|
}
|
|
40043
40057
|
/**
|
|
@@ -40050,11 +40064,12 @@ class DroppedAsset extends Asset {
|
|
|
40050
40064
|
* ```
|
|
40051
40065
|
*/
|
|
40052
40066
|
updatePosition(x, y, yOrderAdjust) {
|
|
40067
|
+
const params = { x, y, yOrderAdjust };
|
|
40053
40068
|
try {
|
|
40054
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
40069
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "set-position");
|
|
40055
40070
|
}
|
|
40056
40071
|
catch (error) {
|
|
40057
|
-
throw this.errorHandler({ error });
|
|
40072
|
+
throw this.errorHandler({ error, params });
|
|
40058
40073
|
}
|
|
40059
40074
|
}
|
|
40060
40075
|
/**
|
|
@@ -40071,11 +40086,12 @@ class DroppedAsset extends Asset {
|
|
|
40071
40086
|
* ```
|
|
40072
40087
|
*/
|
|
40073
40088
|
updatePrivateZone({ isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap, }) {
|
|
40089
|
+
const params = { isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap };
|
|
40074
40090
|
try {
|
|
40075
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
40091
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "set-private-zone");
|
|
40076
40092
|
}
|
|
40077
40093
|
catch (error) {
|
|
40078
|
-
throw this.errorHandler({ error });
|
|
40094
|
+
throw this.errorHandler({ error, params });
|
|
40079
40095
|
}
|
|
40080
40096
|
}
|
|
40081
40097
|
/**
|
|
@@ -40092,7 +40108,7 @@ class DroppedAsset extends Asset {
|
|
|
40092
40108
|
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { assetScale }, "change-scale");
|
|
40093
40109
|
}
|
|
40094
40110
|
catch (error) {
|
|
40095
|
-
throw this.errorHandler({ error });
|
|
40111
|
+
throw this.errorHandler({ error, params: { assetScale } });
|
|
40096
40112
|
}
|
|
40097
40113
|
}
|
|
40098
40114
|
/**
|
|
@@ -40109,7 +40125,7 @@ class DroppedAsset extends Asset {
|
|
|
40109
40125
|
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { mediaId }, "change-uploaded-media-selected");
|
|
40110
40126
|
}
|
|
40111
40127
|
catch (error) {
|
|
40112
|
-
throw this.errorHandler({ error });
|
|
40128
|
+
throw this.errorHandler({ error, params: { mediaId } });
|
|
40113
40129
|
}
|
|
40114
40130
|
}
|
|
40115
40131
|
/**
|
|
@@ -40122,11 +40138,12 @@ class DroppedAsset extends Asset {
|
|
|
40122
40138
|
* ```
|
|
40123
40139
|
*/
|
|
40124
40140
|
updateWebImageLayers(bottom, top) {
|
|
40141
|
+
const params = { bottom, top };
|
|
40125
40142
|
try {
|
|
40126
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
40143
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "set-webimage-layers");
|
|
40127
40144
|
}
|
|
40128
40145
|
catch (error) {
|
|
40129
|
-
throw this.errorHandler({ error });
|
|
40146
|
+
throw this.errorHandler({ error, params });
|
|
40130
40147
|
}
|
|
40131
40148
|
}
|
|
40132
40149
|
/**
|
|
@@ -40150,23 +40167,13 @@ class DroppedAsset extends Asset {
|
|
|
40150
40167
|
*/
|
|
40151
40168
|
addWebhook({ dataObject, description, isUniqueOnly, title, type, url, }) {
|
|
40152
40169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40170
|
+
const params = { dataObject, description, isUniqueOnly, title, type, url };
|
|
40153
40171
|
try {
|
|
40154
|
-
const response = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/webhooks`, {
|
|
40155
|
-
active: true,
|
|
40156
|
-
assetId: this.id,
|
|
40157
|
-
dataObject,
|
|
40158
|
-
description,
|
|
40159
|
-
enteredBy: "",
|
|
40160
|
-
isUniqueOnly,
|
|
40161
|
-
title,
|
|
40162
|
-
type,
|
|
40163
|
-
url,
|
|
40164
|
-
urlSlug: this.urlSlug,
|
|
40165
|
-
}, this.requestOptions);
|
|
40172
|
+
const response = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/webhooks`, Object.assign(Object.assign({}, params), { active: true, assetId: this.id, enteredBy: "", urlSlug: this.urlSlug }), this.requestOptions);
|
|
40166
40173
|
return response.data.webhookId;
|
|
40167
40174
|
}
|
|
40168
40175
|
catch (error) {
|
|
40169
|
-
throw this.errorHandler({ error });
|
|
40176
|
+
throw this.errorHandler({ error, params });
|
|
40170
40177
|
}
|
|
40171
40178
|
});
|
|
40172
40179
|
}
|
|
@@ -40184,16 +40191,17 @@ class DroppedAsset extends Asset {
|
|
|
40184
40191
|
*/
|
|
40185
40192
|
setInteractiveSettings({ isInteractive = false, interactivePublicKey = "", }) {
|
|
40186
40193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40194
|
+
const params = {
|
|
40195
|
+
interactivePublicKey,
|
|
40196
|
+
isInteractive,
|
|
40197
|
+
};
|
|
40187
40198
|
try {
|
|
40188
|
-
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/set-asset-interactive-settings`,
|
|
40189
|
-
interactivePublicKey,
|
|
40190
|
-
isInteractive,
|
|
40191
|
-
}, this.requestOptions);
|
|
40199
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/set-asset-interactive-settings`, params, this.requestOptions);
|
|
40192
40200
|
this.isInteractive = isInteractive;
|
|
40193
40201
|
this.interactivePublicKey = interactivePublicKey;
|
|
40194
40202
|
}
|
|
40195
40203
|
catch (error) {
|
|
40196
|
-
throw this.errorHandler({ error });
|
|
40204
|
+
throw this.errorHandler({ error, params });
|
|
40197
40205
|
}
|
|
40198
40206
|
});
|
|
40199
40207
|
}
|
|
@@ -40227,7 +40235,7 @@ class DroppedAsset extends Asset {
|
|
|
40227
40235
|
return response.data;
|
|
40228
40236
|
}
|
|
40229
40237
|
catch (error) {
|
|
40230
|
-
throw this.errorHandler({ error });
|
|
40238
|
+
throw this.errorHandler({ error, params: { periodType, dateValue, year } });
|
|
40231
40239
|
}
|
|
40232
40240
|
});
|
|
40233
40241
|
}
|
|
@@ -40345,7 +40353,7 @@ class World extends SDKController {
|
|
|
40345
40353
|
this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
|
|
40346
40354
|
}
|
|
40347
40355
|
catch (error) {
|
|
40348
|
-
throw this.errorHandler({ error });
|
|
40356
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
40349
40357
|
}
|
|
40350
40358
|
});
|
|
40351
40359
|
/**
|
|
@@ -40369,7 +40377,7 @@ class World extends SDKController {
|
|
|
40369
40377
|
this.dataObject = dataObject || this.dataObject;
|
|
40370
40378
|
}
|
|
40371
40379
|
catch (error) {
|
|
40372
|
-
throw this.errorHandler({ error });
|
|
40380
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
40373
40381
|
}
|
|
40374
40382
|
});
|
|
40375
40383
|
Object.assign(this, options.attributes);
|
|
@@ -40425,7 +40433,7 @@ class World extends SDKController {
|
|
|
40425
40433
|
*/
|
|
40426
40434
|
updateDetails({ controls, description, forceAuthOnLogin, height, name, spawnPosition, width, }) {
|
|
40427
40435
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40428
|
-
const
|
|
40436
|
+
const params = {
|
|
40429
40437
|
controls,
|
|
40430
40438
|
description,
|
|
40431
40439
|
forceAuthOnLogin,
|
|
@@ -40435,12 +40443,12 @@ class World extends SDKController {
|
|
|
40435
40443
|
width,
|
|
40436
40444
|
};
|
|
40437
40445
|
try {
|
|
40438
|
-
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/world-details`,
|
|
40439
|
-
const cleanPayload = removeUndefined(
|
|
40446
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/world-details`, params, this.requestOptions);
|
|
40447
|
+
const cleanPayload = removeUndefined(params);
|
|
40440
40448
|
Object.assign(this, cleanPayload);
|
|
40441
40449
|
}
|
|
40442
40450
|
catch (error) {
|
|
40443
|
-
throw this.errorHandler({ error });
|
|
40451
|
+
throw this.errorHandler({ error, params });
|
|
40444
40452
|
}
|
|
40445
40453
|
});
|
|
40446
40454
|
}
|
|
@@ -40499,7 +40507,7 @@ class World extends SDKController {
|
|
|
40499
40507
|
return droppedAssets;
|
|
40500
40508
|
}
|
|
40501
40509
|
catch (error) {
|
|
40502
|
-
throw this.errorHandler({ error });
|
|
40510
|
+
throw this.errorHandler({ error, params: { uniqueName, isPartial, isReversed } });
|
|
40503
40511
|
}
|
|
40504
40512
|
});
|
|
40505
40513
|
}
|
|
@@ -40533,7 +40541,7 @@ class World extends SDKController {
|
|
|
40533
40541
|
return droppedAssets;
|
|
40534
40542
|
}
|
|
40535
40543
|
catch (error) {
|
|
40536
|
-
throw this.errorHandler({ error });
|
|
40544
|
+
throw this.errorHandler({ error, params: { sceneDropId, uniqueName } });
|
|
40537
40545
|
}
|
|
40538
40546
|
});
|
|
40539
40547
|
}
|
|
@@ -40658,12 +40666,13 @@ class World extends SDKController {
|
|
|
40658
40666
|
*/
|
|
40659
40667
|
dropScene({ assetSuffix, position, sceneId, }) {
|
|
40660
40668
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40669
|
+
const params = { assetSuffix, position, sceneId };
|
|
40661
40670
|
try {
|
|
40662
|
-
const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/drop-scene`,
|
|
40671
|
+
const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/drop-scene`, params, this.requestOptions);
|
|
40663
40672
|
return result;
|
|
40664
40673
|
}
|
|
40665
40674
|
catch (error) {
|
|
40666
|
-
throw this.errorHandler({ error });
|
|
40675
|
+
throw this.errorHandler({ error, params });
|
|
40667
40676
|
}
|
|
40668
40677
|
});
|
|
40669
40678
|
}
|
|
@@ -40690,7 +40699,7 @@ class World extends SDKController {
|
|
|
40690
40699
|
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/change-scene`, { sceneId }, this.requestOptions);
|
|
40691
40700
|
}
|
|
40692
40701
|
catch (error) {
|
|
40693
|
-
throw this.errorHandler({ error });
|
|
40702
|
+
throw this.errorHandler({ error, params: { sceneId } });
|
|
40694
40703
|
}
|
|
40695
40704
|
});
|
|
40696
40705
|
}
|
|
@@ -40715,7 +40724,7 @@ class World extends SDKController {
|
|
|
40715
40724
|
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
|
|
40716
40725
|
}
|
|
40717
40726
|
catch (error) {
|
|
40718
|
-
throw this.errorHandler({ error });
|
|
40727
|
+
throw this.errorHandler({ error, params: { path, amount, options } });
|
|
40719
40728
|
}
|
|
40720
40729
|
});
|
|
40721
40730
|
}
|
|
@@ -40771,7 +40780,7 @@ class World extends SDKController {
|
|
|
40771
40780
|
return response.data;
|
|
40772
40781
|
}
|
|
40773
40782
|
catch (error) {
|
|
40774
|
-
throw this.errorHandler({ error });
|
|
40783
|
+
throw this.errorHandler({ error, params: { periodType, dateValue, year } });
|
|
40775
40784
|
}
|
|
40776
40785
|
});
|
|
40777
40786
|
}
|
|
@@ -40994,7 +41003,7 @@ class User extends SDKController {
|
|
|
40994
41003
|
this.dataObject = dataObject || this.dataObject;
|
|
40995
41004
|
}
|
|
40996
41005
|
catch (error) {
|
|
40997
|
-
throw this.errorHandler({ error });
|
|
41006
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
40998
41007
|
}
|
|
40999
41008
|
});
|
|
41000
41009
|
}
|
|
@@ -41021,7 +41030,7 @@ class User extends SDKController {
|
|
|
41021
41030
|
this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
|
|
41022
41031
|
}
|
|
41023
41032
|
catch (error) {
|
|
41024
|
-
throw this.errorHandler({ error });
|
|
41033
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
41025
41034
|
}
|
|
41026
41035
|
});
|
|
41027
41036
|
}
|
|
@@ -41046,7 +41055,7 @@ class User extends SDKController {
|
|
|
41046
41055
|
yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
|
|
41047
41056
|
}
|
|
41048
41057
|
catch (error) {
|
|
41049
|
-
throw this.errorHandler({ error });
|
|
41058
|
+
throw this.errorHandler({ error, params: { path, amount, options } });
|
|
41050
41059
|
}
|
|
41051
41060
|
});
|
|
41052
41061
|
}
|
|
@@ -41131,7 +41140,7 @@ class Visitor extends User {
|
|
|
41131
41140
|
}, this.requestOptions);
|
|
41132
41141
|
}
|
|
41133
41142
|
catch (error) {
|
|
41134
|
-
throw this.errorHandler({ error });
|
|
41143
|
+
throw this.errorHandler({ error, params: { shouldTeleportVisitor, x, y } });
|
|
41135
41144
|
}
|
|
41136
41145
|
});
|
|
41137
41146
|
}
|
|
@@ -41150,15 +41159,16 @@ class Visitor extends User {
|
|
|
41150
41159
|
*/
|
|
41151
41160
|
fireToast({ groupId, title, text }) {
|
|
41152
41161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41162
|
+
const params = {
|
|
41163
|
+
groupId,
|
|
41164
|
+
title,
|
|
41165
|
+
text,
|
|
41166
|
+
};
|
|
41153
41167
|
try {
|
|
41154
|
-
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/fire-toast`,
|
|
41155
|
-
groupId,
|
|
41156
|
-
title,
|
|
41157
|
-
text,
|
|
41158
|
-
}, this.requestOptions);
|
|
41168
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/fire-toast`, params, this.requestOptions);
|
|
41159
41169
|
}
|
|
41160
41170
|
catch (error) {
|
|
41161
|
-
throw this.errorHandler({ error });
|
|
41171
|
+
throw this.errorHandler({ error, params });
|
|
41162
41172
|
}
|
|
41163
41173
|
});
|
|
41164
41174
|
}
|
|
@@ -41177,15 +41187,16 @@ class Visitor extends User {
|
|
|
41177
41187
|
*/
|
|
41178
41188
|
openIframe({ link, shouldOpenInDrawer, title }) {
|
|
41179
41189
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41190
|
+
const params = {
|
|
41191
|
+
link,
|
|
41192
|
+
shouldOpenInDrawer,
|
|
41193
|
+
title,
|
|
41194
|
+
};
|
|
41180
41195
|
try {
|
|
41181
|
-
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/open-iframe`,
|
|
41182
|
-
link,
|
|
41183
|
-
shouldOpenInDrawer,
|
|
41184
|
-
title,
|
|
41185
|
-
}, this.requestOptions);
|
|
41196
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/open-iframe`, params, this.requestOptions);
|
|
41186
41197
|
}
|
|
41187
41198
|
catch (error) {
|
|
41188
|
-
throw this.errorHandler({ error });
|
|
41199
|
+
throw this.errorHandler({ error, params });
|
|
41189
41200
|
}
|
|
41190
41201
|
});
|
|
41191
41202
|
}
|
|
@@ -41230,7 +41241,7 @@ class Visitor extends User {
|
|
|
41230
41241
|
return result;
|
|
41231
41242
|
}
|
|
41232
41243
|
catch (error) {
|
|
41233
|
-
throw this.errorHandler({ error });
|
|
41244
|
+
throw this.errorHandler({ error, params: { id, name } });
|
|
41234
41245
|
}
|
|
41235
41246
|
});
|
|
41236
41247
|
}
|
|
@@ -41276,7 +41287,7 @@ class Visitor extends User {
|
|
|
41276
41287
|
this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
|
|
41277
41288
|
}
|
|
41278
41289
|
catch (error) {
|
|
41279
|
-
throw this.errorHandler({ error });
|
|
41290
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
41280
41291
|
}
|
|
41281
41292
|
});
|
|
41282
41293
|
}
|
|
@@ -41301,7 +41312,7 @@ class Visitor extends User {
|
|
|
41301
41312
|
this.dataObject = dataObject || this.dataObject;
|
|
41302
41313
|
}
|
|
41303
41314
|
catch (error) {
|
|
41304
|
-
throw this.errorHandler({ error });
|
|
41315
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
41305
41316
|
}
|
|
41306
41317
|
});
|
|
41307
41318
|
}
|
|
@@ -41326,7 +41337,7 @@ class Visitor extends User {
|
|
|
41326
41337
|
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
|
|
41327
41338
|
}
|
|
41328
41339
|
catch (error) {
|
|
41329
|
-
throw this.errorHandler({ error });
|
|
41340
|
+
throw this.errorHandler({ error, params: { path, amount, options } });
|
|
41330
41341
|
}
|
|
41331
41342
|
});
|
|
41332
41343
|
}
|
|
@@ -41531,6 +41542,7 @@ class DroppedAssetFactory extends SDKController {
|
|
|
41531
41542
|
}
|
|
41532
41543
|
getWithUniqueName(uniqueName, urlSlug, interactivePublicKey, interactiveSecret) {
|
|
41533
41544
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41545
|
+
const params = { uniqueName, urlSlug, interactivePublicKey, interactiveSecret };
|
|
41534
41546
|
const interactiveJWT = jwt.sign(interactivePublicKey, interactiveSecret);
|
|
41535
41547
|
try {
|
|
41536
41548
|
const response = yield this.topiaPublicApi().get(`/world/${urlSlug}/asset-by-unique-name/${uniqueName}`, { headers: { interactiveJWT, publickey: interactivePublicKey } });
|
|
@@ -41538,12 +41550,13 @@ class DroppedAssetFactory extends SDKController {
|
|
|
41538
41550
|
return new DroppedAsset(this.topia, id, urlSlug, { attributes: response.data });
|
|
41539
41551
|
}
|
|
41540
41552
|
catch (error) {
|
|
41541
|
-
throw this.errorHandler({ error });
|
|
41553
|
+
throw this.errorHandler({ error, params });
|
|
41542
41554
|
}
|
|
41543
41555
|
});
|
|
41544
41556
|
}
|
|
41545
41557
|
drop(asset, { interactivePublicKey, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }) {
|
|
41546
41558
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41559
|
+
const params = { interactivePublicKey, sceneDropId, uniqueName, urlSlug, yOrderAdjust };
|
|
41547
41560
|
try {
|
|
41548
41561
|
const response = yield this.topiaPublicApi().post(`/world/${urlSlug}/assets`, {
|
|
41549
41562
|
assetId: asset.id,
|
|
@@ -41557,7 +41570,7 @@ class DroppedAssetFactory extends SDKController {
|
|
|
41557
41570
|
return new DroppedAsset(this.topia, id, urlSlug, { credentials: asset.credentials });
|
|
41558
41571
|
}
|
|
41559
41572
|
catch (error) {
|
|
41560
|
-
throw this.errorHandler({ error });
|
|
41573
|
+
throw this.errorHandler({ error, params });
|
|
41561
41574
|
}
|
|
41562
41575
|
});
|
|
41563
41576
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1448,13 +1448,15 @@ declare class SDKController implements SDKInterface {
|
|
|
1448
1448
|
topia: Topia;
|
|
1449
1449
|
constructor(topia: Topia, credentials?: InteractiveCredentials);
|
|
1450
1450
|
topiaPublicApi(): axios.AxiosInstance;
|
|
1451
|
-
errorHandler({ error, message, }: {
|
|
1451
|
+
errorHandler({ error, message, params, }: {
|
|
1452
1452
|
error?: Error | AxiosError | unknown;
|
|
1453
1453
|
message?: string;
|
|
1454
|
+
params?: object;
|
|
1454
1455
|
}): {
|
|
1455
1456
|
data: {};
|
|
1456
1457
|
message: string;
|
|
1457
1458
|
method: string;
|
|
1459
|
+
params: object | undefined;
|
|
1458
1460
|
stack: string;
|
|
1459
1461
|
stackTrace: Error;
|
|
1460
1462
|
status: number;
|
package/dist/index.js
CHANGED
|
@@ -39664,7 +39664,7 @@ class SDKController {
|
|
|
39664
39664
|
topiaPublicApi() {
|
|
39665
39665
|
return this.topia.axios;
|
|
39666
39666
|
}
|
|
39667
|
-
errorHandler({ error, message = "Something went wrong. Please try again or contact support.", }) {
|
|
39667
|
+
errorHandler({ error, message = "Something went wrong. Please try again or contact support.", params, }) {
|
|
39668
39668
|
var _a, _b;
|
|
39669
39669
|
const stackTrace = new Error("Thrown here:");
|
|
39670
39670
|
let data = {}, errorMessage = message, method = "unknown", stack = "empty", status = 500, url = "unknown";
|
|
@@ -39690,6 +39690,7 @@ class SDKController {
|
|
|
39690
39690
|
data,
|
|
39691
39691
|
message: errorMessage,
|
|
39692
39692
|
method,
|
|
39693
|
+
params,
|
|
39693
39694
|
stack,
|
|
39694
39695
|
stackTrace,
|
|
39695
39696
|
status,
|
|
@@ -39747,7 +39748,7 @@ class DroppedAsset extends Asset {
|
|
|
39747
39748
|
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/${updateType}`, Object.assign({}, payload), this.requestOptions);
|
|
39748
39749
|
}
|
|
39749
39750
|
catch (error) {
|
|
39750
|
-
throw this.errorHandler({ error });
|
|
39751
|
+
throw this.errorHandler({ error, params: { payload, updateType } });
|
|
39751
39752
|
}
|
|
39752
39753
|
}));
|
|
39753
39754
|
Object.assign(this, options.attributes);
|
|
@@ -39839,7 +39840,7 @@ class DroppedAsset extends Asset {
|
|
|
39839
39840
|
this.dataObject = dataObject || this.dataObject;
|
|
39840
39841
|
}
|
|
39841
39842
|
catch (error) {
|
|
39842
|
-
throw this.errorHandler({ error });
|
|
39843
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
39843
39844
|
}
|
|
39844
39845
|
});
|
|
39845
39846
|
}
|
|
@@ -39865,7 +39866,7 @@ class DroppedAsset extends Asset {
|
|
|
39865
39866
|
this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
|
|
39866
39867
|
}
|
|
39867
39868
|
catch (error) {
|
|
39868
|
-
throw this.errorHandler({ error });
|
|
39869
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
39869
39870
|
}
|
|
39870
39871
|
});
|
|
39871
39872
|
}
|
|
@@ -39890,7 +39891,7 @@ class DroppedAsset extends Asset {
|
|
|
39890
39891
|
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
|
|
39891
39892
|
}
|
|
39892
39893
|
catch (error) {
|
|
39893
|
-
throw this.errorHandler({ error });
|
|
39894
|
+
throw this.errorHandler({ error, params: { path, amount, options } });
|
|
39894
39895
|
}
|
|
39895
39896
|
});
|
|
39896
39897
|
}
|
|
@@ -39909,11 +39910,12 @@ class DroppedAsset extends Asset {
|
|
|
39909
39910
|
* ```
|
|
39910
39911
|
*/
|
|
39911
39912
|
updateBroadcast({ assetBroadcast, assetBroadcastAll, broadcasterEmail, }) {
|
|
39913
|
+
const params = { assetBroadcast, assetBroadcastAll, broadcasterEmail };
|
|
39912
39914
|
try {
|
|
39913
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
39915
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "set-asset-broadcast");
|
|
39914
39916
|
}
|
|
39915
39917
|
catch (error) {
|
|
39916
|
-
throw this.errorHandler({ error });
|
|
39918
|
+
throw this.errorHandler({ error, params });
|
|
39917
39919
|
}
|
|
39918
39920
|
}
|
|
39919
39921
|
/**
|
|
@@ -39937,21 +39939,22 @@ class DroppedAsset extends Asset {
|
|
|
39937
39939
|
* ```
|
|
39938
39940
|
*/
|
|
39939
39941
|
updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }) {
|
|
39942
|
+
const params = {
|
|
39943
|
+
clickType,
|
|
39944
|
+
clickableLink,
|
|
39945
|
+
clickableLinkTitle,
|
|
39946
|
+
clickableDisplayTextDescription,
|
|
39947
|
+
clickableDisplayTextHeadline,
|
|
39948
|
+
isForceLinkInIframe,
|
|
39949
|
+
isOpenLinkInDrawer,
|
|
39950
|
+
portalName,
|
|
39951
|
+
position,
|
|
39952
|
+
};
|
|
39940
39953
|
try {
|
|
39941
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
39942
|
-
clickType,
|
|
39943
|
-
clickableLink,
|
|
39944
|
-
clickableLinkTitle,
|
|
39945
|
-
clickableDisplayTextDescription,
|
|
39946
|
-
clickableDisplayTextHeadline,
|
|
39947
|
-
isForceLinkInIframe,
|
|
39948
|
-
isOpenLinkInDrawer,
|
|
39949
|
-
portalName,
|
|
39950
|
-
position,
|
|
39951
|
-
}, "change-click-type");
|
|
39954
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "change-click-type");
|
|
39952
39955
|
}
|
|
39953
39956
|
catch (error) {
|
|
39954
|
-
throw this.errorHandler({ error });
|
|
39957
|
+
throw this.errorHandler({ error, params });
|
|
39955
39958
|
}
|
|
39956
39959
|
}
|
|
39957
39960
|
/**
|
|
@@ -39971,11 +39974,12 @@ class DroppedAsset extends Asset {
|
|
|
39971
39974
|
* ```
|
|
39972
39975
|
*/
|
|
39973
39976
|
updateCustomTextAsset(style, text) {
|
|
39977
|
+
const params = { style, text };
|
|
39974
39978
|
try {
|
|
39975
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
39979
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "set-custom-text");
|
|
39976
39980
|
}
|
|
39977
39981
|
catch (error) {
|
|
39978
|
-
throw this.errorHandler({ error });
|
|
39982
|
+
throw this.errorHandler({ error, params });
|
|
39979
39983
|
}
|
|
39980
39984
|
}
|
|
39981
39985
|
/**
|
|
@@ -39997,11 +40001,21 @@ class DroppedAsset extends Asset {
|
|
|
39997
40001
|
* ```
|
|
39998
40002
|
*/
|
|
39999
40003
|
updateMediaType({ audioRadius, audioSliderVolume, isVideo, mediaLink, mediaName, mediaType, portalName, syncUserMedia, }) {
|
|
40004
|
+
const params = {
|
|
40005
|
+
audioRadius,
|
|
40006
|
+
audioSliderVolume,
|
|
40007
|
+
isVideo,
|
|
40008
|
+
mediaLink,
|
|
40009
|
+
mediaName,
|
|
40010
|
+
mediaType,
|
|
40011
|
+
portalName,
|
|
40012
|
+
syncUserMedia,
|
|
40013
|
+
};
|
|
40000
40014
|
try {
|
|
40001
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
40015
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "change-media-type");
|
|
40002
40016
|
}
|
|
40003
40017
|
catch (error) {
|
|
40004
|
-
throw this.errorHandler({ error });
|
|
40018
|
+
throw this.errorHandler({ error, params });
|
|
40005
40019
|
}
|
|
40006
40020
|
}
|
|
40007
40021
|
/**
|
|
@@ -40018,7 +40032,7 @@ class DroppedAsset extends Asset {
|
|
|
40018
40032
|
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { isMutezone }, "set-mute-zone");
|
|
40019
40033
|
}
|
|
40020
40034
|
catch (error) {
|
|
40021
|
-
throw this.errorHandler({ error });
|
|
40035
|
+
throw this.errorHandler({ error, params: { isMutezone } });
|
|
40022
40036
|
}
|
|
40023
40037
|
}
|
|
40024
40038
|
/**
|
|
@@ -40035,7 +40049,7 @@ class DroppedAsset extends Asset {
|
|
|
40035
40049
|
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { isWebhookZoneEnabled }, "set-webhook-zone");
|
|
40036
40050
|
}
|
|
40037
40051
|
catch (error) {
|
|
40038
|
-
throw this.errorHandler({ error });
|
|
40052
|
+
throw this.errorHandler({ error, params: { isWebhookZoneEnabled } });
|
|
40039
40053
|
}
|
|
40040
40054
|
}
|
|
40041
40055
|
/**
|
|
@@ -40048,11 +40062,12 @@ class DroppedAsset extends Asset {
|
|
|
40048
40062
|
* ```
|
|
40049
40063
|
*/
|
|
40050
40064
|
updatePosition(x, y, yOrderAdjust) {
|
|
40065
|
+
const params = { x, y, yOrderAdjust };
|
|
40051
40066
|
try {
|
|
40052
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
40067
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "set-position");
|
|
40053
40068
|
}
|
|
40054
40069
|
catch (error) {
|
|
40055
|
-
throw this.errorHandler({ error });
|
|
40070
|
+
throw this.errorHandler({ error, params });
|
|
40056
40071
|
}
|
|
40057
40072
|
}
|
|
40058
40073
|
/**
|
|
@@ -40069,11 +40084,12 @@ class DroppedAsset extends Asset {
|
|
|
40069
40084
|
* ```
|
|
40070
40085
|
*/
|
|
40071
40086
|
updatePrivateZone({ isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap, }) {
|
|
40087
|
+
const params = { isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap };
|
|
40072
40088
|
try {
|
|
40073
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
40089
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "set-private-zone");
|
|
40074
40090
|
}
|
|
40075
40091
|
catch (error) {
|
|
40076
|
-
throw this.errorHandler({ error });
|
|
40092
|
+
throw this.errorHandler({ error, params });
|
|
40077
40093
|
}
|
|
40078
40094
|
}
|
|
40079
40095
|
/**
|
|
@@ -40090,7 +40106,7 @@ class DroppedAsset extends Asset {
|
|
|
40090
40106
|
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { assetScale }, "change-scale");
|
|
40091
40107
|
}
|
|
40092
40108
|
catch (error) {
|
|
40093
|
-
throw this.errorHandler({ error });
|
|
40109
|
+
throw this.errorHandler({ error, params: { assetScale } });
|
|
40094
40110
|
}
|
|
40095
40111
|
}
|
|
40096
40112
|
/**
|
|
@@ -40107,7 +40123,7 @@ class DroppedAsset extends Asset {
|
|
|
40107
40123
|
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { mediaId }, "change-uploaded-media-selected");
|
|
40108
40124
|
}
|
|
40109
40125
|
catch (error) {
|
|
40110
|
-
throw this.errorHandler({ error });
|
|
40126
|
+
throw this.errorHandler({ error, params: { mediaId } });
|
|
40111
40127
|
}
|
|
40112
40128
|
}
|
|
40113
40129
|
/**
|
|
@@ -40120,11 +40136,12 @@ class DroppedAsset extends Asset {
|
|
|
40120
40136
|
* ```
|
|
40121
40137
|
*/
|
|
40122
40138
|
updateWebImageLayers(bottom, top) {
|
|
40139
|
+
const params = { bottom, top };
|
|
40123
40140
|
try {
|
|
40124
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this,
|
|
40141
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, params, "set-webimage-layers");
|
|
40125
40142
|
}
|
|
40126
40143
|
catch (error) {
|
|
40127
|
-
throw this.errorHandler({ error });
|
|
40144
|
+
throw this.errorHandler({ error, params });
|
|
40128
40145
|
}
|
|
40129
40146
|
}
|
|
40130
40147
|
/**
|
|
@@ -40148,23 +40165,13 @@ class DroppedAsset extends Asset {
|
|
|
40148
40165
|
*/
|
|
40149
40166
|
addWebhook({ dataObject, description, isUniqueOnly, title, type, url, }) {
|
|
40150
40167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40168
|
+
const params = { dataObject, description, isUniqueOnly, title, type, url };
|
|
40151
40169
|
try {
|
|
40152
|
-
const response = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/webhooks`, {
|
|
40153
|
-
active: true,
|
|
40154
|
-
assetId: this.id,
|
|
40155
|
-
dataObject,
|
|
40156
|
-
description,
|
|
40157
|
-
enteredBy: "",
|
|
40158
|
-
isUniqueOnly,
|
|
40159
|
-
title,
|
|
40160
|
-
type,
|
|
40161
|
-
url,
|
|
40162
|
-
urlSlug: this.urlSlug,
|
|
40163
|
-
}, this.requestOptions);
|
|
40170
|
+
const response = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/webhooks`, Object.assign(Object.assign({}, params), { active: true, assetId: this.id, enteredBy: "", urlSlug: this.urlSlug }), this.requestOptions);
|
|
40164
40171
|
return response.data.webhookId;
|
|
40165
40172
|
}
|
|
40166
40173
|
catch (error) {
|
|
40167
|
-
throw this.errorHandler({ error });
|
|
40174
|
+
throw this.errorHandler({ error, params });
|
|
40168
40175
|
}
|
|
40169
40176
|
});
|
|
40170
40177
|
}
|
|
@@ -40182,16 +40189,17 @@ class DroppedAsset extends Asset {
|
|
|
40182
40189
|
*/
|
|
40183
40190
|
setInteractiveSettings({ isInteractive = false, interactivePublicKey = "", }) {
|
|
40184
40191
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40192
|
+
const params = {
|
|
40193
|
+
interactivePublicKey,
|
|
40194
|
+
isInteractive,
|
|
40195
|
+
};
|
|
40185
40196
|
try {
|
|
40186
|
-
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/set-asset-interactive-settings`,
|
|
40187
|
-
interactivePublicKey,
|
|
40188
|
-
isInteractive,
|
|
40189
|
-
}, this.requestOptions);
|
|
40197
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/assets/${this.id}/set-asset-interactive-settings`, params, this.requestOptions);
|
|
40190
40198
|
this.isInteractive = isInteractive;
|
|
40191
40199
|
this.interactivePublicKey = interactivePublicKey;
|
|
40192
40200
|
}
|
|
40193
40201
|
catch (error) {
|
|
40194
|
-
throw this.errorHandler({ error });
|
|
40202
|
+
throw this.errorHandler({ error, params });
|
|
40195
40203
|
}
|
|
40196
40204
|
});
|
|
40197
40205
|
}
|
|
@@ -40225,7 +40233,7 @@ class DroppedAsset extends Asset {
|
|
|
40225
40233
|
return response.data;
|
|
40226
40234
|
}
|
|
40227
40235
|
catch (error) {
|
|
40228
|
-
throw this.errorHandler({ error });
|
|
40236
|
+
throw this.errorHandler({ error, params: { periodType, dateValue, year } });
|
|
40229
40237
|
}
|
|
40230
40238
|
});
|
|
40231
40239
|
}
|
|
@@ -40343,7 +40351,7 @@ class World extends SDKController {
|
|
|
40343
40351
|
this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
|
|
40344
40352
|
}
|
|
40345
40353
|
catch (error) {
|
|
40346
|
-
throw this.errorHandler({ error });
|
|
40354
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
40347
40355
|
}
|
|
40348
40356
|
});
|
|
40349
40357
|
/**
|
|
@@ -40367,7 +40375,7 @@ class World extends SDKController {
|
|
|
40367
40375
|
this.dataObject = dataObject || this.dataObject;
|
|
40368
40376
|
}
|
|
40369
40377
|
catch (error) {
|
|
40370
|
-
throw this.errorHandler({ error });
|
|
40378
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
40371
40379
|
}
|
|
40372
40380
|
});
|
|
40373
40381
|
Object.assign(this, options.attributes);
|
|
@@ -40423,7 +40431,7 @@ class World extends SDKController {
|
|
|
40423
40431
|
*/
|
|
40424
40432
|
updateDetails({ controls, description, forceAuthOnLogin, height, name, spawnPosition, width, }) {
|
|
40425
40433
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40426
|
-
const
|
|
40434
|
+
const params = {
|
|
40427
40435
|
controls,
|
|
40428
40436
|
description,
|
|
40429
40437
|
forceAuthOnLogin,
|
|
@@ -40433,12 +40441,12 @@ class World extends SDKController {
|
|
|
40433
40441
|
width,
|
|
40434
40442
|
};
|
|
40435
40443
|
try {
|
|
40436
|
-
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/world-details`,
|
|
40437
|
-
const cleanPayload = removeUndefined(
|
|
40444
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/world-details`, params, this.requestOptions);
|
|
40445
|
+
const cleanPayload = removeUndefined(params);
|
|
40438
40446
|
Object.assign(this, cleanPayload);
|
|
40439
40447
|
}
|
|
40440
40448
|
catch (error) {
|
|
40441
|
-
throw this.errorHandler({ error });
|
|
40449
|
+
throw this.errorHandler({ error, params });
|
|
40442
40450
|
}
|
|
40443
40451
|
});
|
|
40444
40452
|
}
|
|
@@ -40497,7 +40505,7 @@ class World extends SDKController {
|
|
|
40497
40505
|
return droppedAssets;
|
|
40498
40506
|
}
|
|
40499
40507
|
catch (error) {
|
|
40500
|
-
throw this.errorHandler({ error });
|
|
40508
|
+
throw this.errorHandler({ error, params: { uniqueName, isPartial, isReversed } });
|
|
40501
40509
|
}
|
|
40502
40510
|
});
|
|
40503
40511
|
}
|
|
@@ -40531,7 +40539,7 @@ class World extends SDKController {
|
|
|
40531
40539
|
return droppedAssets;
|
|
40532
40540
|
}
|
|
40533
40541
|
catch (error) {
|
|
40534
|
-
throw this.errorHandler({ error });
|
|
40542
|
+
throw this.errorHandler({ error, params: { sceneDropId, uniqueName } });
|
|
40535
40543
|
}
|
|
40536
40544
|
});
|
|
40537
40545
|
}
|
|
@@ -40656,12 +40664,13 @@ class World extends SDKController {
|
|
|
40656
40664
|
*/
|
|
40657
40665
|
dropScene({ assetSuffix, position, sceneId, }) {
|
|
40658
40666
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40667
|
+
const params = { assetSuffix, position, sceneId };
|
|
40659
40668
|
try {
|
|
40660
|
-
const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/drop-scene`,
|
|
40669
|
+
const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/drop-scene`, params, this.requestOptions);
|
|
40661
40670
|
return result;
|
|
40662
40671
|
}
|
|
40663
40672
|
catch (error) {
|
|
40664
|
-
throw this.errorHandler({ error });
|
|
40673
|
+
throw this.errorHandler({ error, params });
|
|
40665
40674
|
}
|
|
40666
40675
|
});
|
|
40667
40676
|
}
|
|
@@ -40688,7 +40697,7 @@ class World extends SDKController {
|
|
|
40688
40697
|
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/change-scene`, { sceneId }, this.requestOptions);
|
|
40689
40698
|
}
|
|
40690
40699
|
catch (error) {
|
|
40691
|
-
throw this.errorHandler({ error });
|
|
40700
|
+
throw this.errorHandler({ error, params: { sceneId } });
|
|
40692
40701
|
}
|
|
40693
40702
|
});
|
|
40694
40703
|
}
|
|
@@ -40713,7 +40722,7 @@ class World extends SDKController {
|
|
|
40713
40722
|
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
|
|
40714
40723
|
}
|
|
40715
40724
|
catch (error) {
|
|
40716
|
-
throw this.errorHandler({ error });
|
|
40725
|
+
throw this.errorHandler({ error, params: { path, amount, options } });
|
|
40717
40726
|
}
|
|
40718
40727
|
});
|
|
40719
40728
|
}
|
|
@@ -40769,7 +40778,7 @@ class World extends SDKController {
|
|
|
40769
40778
|
return response.data;
|
|
40770
40779
|
}
|
|
40771
40780
|
catch (error) {
|
|
40772
|
-
throw this.errorHandler({ error });
|
|
40781
|
+
throw this.errorHandler({ error, params: { periodType, dateValue, year } });
|
|
40773
40782
|
}
|
|
40774
40783
|
});
|
|
40775
40784
|
}
|
|
@@ -40992,7 +41001,7 @@ class User extends SDKController {
|
|
|
40992
41001
|
this.dataObject = dataObject || this.dataObject;
|
|
40993
41002
|
}
|
|
40994
41003
|
catch (error) {
|
|
40995
|
-
throw this.errorHandler({ error });
|
|
41004
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
40996
41005
|
}
|
|
40997
41006
|
});
|
|
40998
41007
|
}
|
|
@@ -41019,7 +41028,7 @@ class User extends SDKController {
|
|
|
41019
41028
|
this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
|
|
41020
41029
|
}
|
|
41021
41030
|
catch (error) {
|
|
41022
|
-
throw this.errorHandler({ error });
|
|
41031
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
41023
41032
|
}
|
|
41024
41033
|
});
|
|
41025
41034
|
}
|
|
@@ -41044,7 +41053,7 @@ class User extends SDKController {
|
|
|
41044
41053
|
yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
|
|
41045
41054
|
}
|
|
41046
41055
|
catch (error) {
|
|
41047
|
-
throw this.errorHandler({ error });
|
|
41056
|
+
throw this.errorHandler({ error, params: { path, amount, options } });
|
|
41048
41057
|
}
|
|
41049
41058
|
});
|
|
41050
41059
|
}
|
|
@@ -41129,7 +41138,7 @@ class Visitor extends User {
|
|
|
41129
41138
|
}, this.requestOptions);
|
|
41130
41139
|
}
|
|
41131
41140
|
catch (error) {
|
|
41132
|
-
throw this.errorHandler({ error });
|
|
41141
|
+
throw this.errorHandler({ error, params: { shouldTeleportVisitor, x, y } });
|
|
41133
41142
|
}
|
|
41134
41143
|
});
|
|
41135
41144
|
}
|
|
@@ -41148,15 +41157,16 @@ class Visitor extends User {
|
|
|
41148
41157
|
*/
|
|
41149
41158
|
fireToast({ groupId, title, text }) {
|
|
41150
41159
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41160
|
+
const params = {
|
|
41161
|
+
groupId,
|
|
41162
|
+
title,
|
|
41163
|
+
text,
|
|
41164
|
+
};
|
|
41151
41165
|
try {
|
|
41152
|
-
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/fire-toast`,
|
|
41153
|
-
groupId,
|
|
41154
|
-
title,
|
|
41155
|
-
text,
|
|
41156
|
-
}, this.requestOptions);
|
|
41166
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/fire-toast`, params, this.requestOptions);
|
|
41157
41167
|
}
|
|
41158
41168
|
catch (error) {
|
|
41159
|
-
throw this.errorHandler({ error });
|
|
41169
|
+
throw this.errorHandler({ error, params });
|
|
41160
41170
|
}
|
|
41161
41171
|
});
|
|
41162
41172
|
}
|
|
@@ -41175,15 +41185,16 @@ class Visitor extends User {
|
|
|
41175
41185
|
*/
|
|
41176
41186
|
openIframe({ link, shouldOpenInDrawer, title }) {
|
|
41177
41187
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41188
|
+
const params = {
|
|
41189
|
+
link,
|
|
41190
|
+
shouldOpenInDrawer,
|
|
41191
|
+
title,
|
|
41192
|
+
};
|
|
41178
41193
|
try {
|
|
41179
|
-
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/open-iframe`,
|
|
41180
|
-
link,
|
|
41181
|
-
shouldOpenInDrawer,
|
|
41182
|
-
title,
|
|
41183
|
-
}, this.requestOptions);
|
|
41194
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/open-iframe`, params, this.requestOptions);
|
|
41184
41195
|
}
|
|
41185
41196
|
catch (error) {
|
|
41186
|
-
throw this.errorHandler({ error });
|
|
41197
|
+
throw this.errorHandler({ error, params });
|
|
41187
41198
|
}
|
|
41188
41199
|
});
|
|
41189
41200
|
}
|
|
@@ -41228,7 +41239,7 @@ class Visitor extends User {
|
|
|
41228
41239
|
return result;
|
|
41229
41240
|
}
|
|
41230
41241
|
catch (error) {
|
|
41231
|
-
throw this.errorHandler({ error });
|
|
41242
|
+
throw this.errorHandler({ error, params: { id, name } });
|
|
41232
41243
|
}
|
|
41233
41244
|
});
|
|
41234
41245
|
}
|
|
@@ -41274,7 +41285,7 @@ class Visitor extends User {
|
|
|
41274
41285
|
this.dataObject = Object.assign(Object.assign({}, (this.dataObject || {})), (dataObject || {}));
|
|
41275
41286
|
}
|
|
41276
41287
|
catch (error) {
|
|
41277
|
-
throw this.errorHandler({ error });
|
|
41288
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
41278
41289
|
}
|
|
41279
41290
|
});
|
|
41280
41291
|
}
|
|
@@ -41299,7 +41310,7 @@ class Visitor extends User {
|
|
|
41299
41310
|
this.dataObject = dataObject || this.dataObject;
|
|
41300
41311
|
}
|
|
41301
41312
|
catch (error) {
|
|
41302
|
-
throw this.errorHandler({ error });
|
|
41313
|
+
throw this.errorHandler({ error, params: { dataObject, options } });
|
|
41303
41314
|
}
|
|
41304
41315
|
});
|
|
41305
41316
|
}
|
|
@@ -41324,7 +41335,7 @@ class Visitor extends User {
|
|
|
41324
41335
|
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/increment-data-object-value`, { path, amount, lock }, this.requestOptions);
|
|
41325
41336
|
}
|
|
41326
41337
|
catch (error) {
|
|
41327
|
-
throw this.errorHandler({ error });
|
|
41338
|
+
throw this.errorHandler({ error, params: { path, amount, options } });
|
|
41328
41339
|
}
|
|
41329
41340
|
});
|
|
41330
41341
|
}
|
|
@@ -41529,6 +41540,7 @@ class DroppedAssetFactory extends SDKController {
|
|
|
41529
41540
|
}
|
|
41530
41541
|
getWithUniqueName(uniqueName, urlSlug, interactivePublicKey, interactiveSecret) {
|
|
41531
41542
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41543
|
+
const params = { uniqueName, urlSlug, interactivePublicKey, interactiveSecret };
|
|
41532
41544
|
const interactiveJWT = jwt.sign(interactivePublicKey, interactiveSecret);
|
|
41533
41545
|
try {
|
|
41534
41546
|
const response = yield this.topiaPublicApi().get(`/world/${urlSlug}/asset-by-unique-name/${uniqueName}`, { headers: { interactiveJWT, publickey: interactivePublicKey } });
|
|
@@ -41536,12 +41548,13 @@ class DroppedAssetFactory extends SDKController {
|
|
|
41536
41548
|
return new DroppedAsset(this.topia, id, urlSlug, { attributes: response.data });
|
|
41537
41549
|
}
|
|
41538
41550
|
catch (error) {
|
|
41539
|
-
throw this.errorHandler({ error });
|
|
41551
|
+
throw this.errorHandler({ error, params });
|
|
41540
41552
|
}
|
|
41541
41553
|
});
|
|
41542
41554
|
}
|
|
41543
41555
|
drop(asset, { interactivePublicKey, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }) {
|
|
41544
41556
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41557
|
+
const params = { interactivePublicKey, sceneDropId, uniqueName, urlSlug, yOrderAdjust };
|
|
41545
41558
|
try {
|
|
41546
41559
|
const response = yield this.topiaPublicApi().post(`/world/${urlSlug}/assets`, {
|
|
41547
41560
|
assetId: asset.id,
|
|
@@ -41555,7 +41568,7 @@ class DroppedAssetFactory extends SDKController {
|
|
|
41555
41568
|
return new DroppedAsset(this.topia, id, urlSlug, { credentials: asset.credentials });
|
|
41556
41569
|
}
|
|
41557
41570
|
catch (error) {
|
|
41558
|
-
throw this.errorHandler({ error });
|
|
41571
|
+
throw this.errorHandler({ error, params });
|
|
41559
41572
|
}
|
|
41560
41573
|
});
|
|
41561
41574
|
}
|
package/package.json
CHANGED