@rtsdk/topia 0.3.6 → 0.3.8
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 +24 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +24 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -40269,6 +40269,7 @@ class World extends SDKController {
|
|
|
40269
40269
|
constructor(topia, urlSlug, options = { attributes: {}, credentials: {} }) {
|
|
40270
40270
|
super(topia, options.credentials);
|
|
40271
40271
|
_World_droppedAssetsMap.set(this, void 0);
|
|
40272
|
+
////////// data objects
|
|
40272
40273
|
/**
|
|
40273
40274
|
* @summary
|
|
40274
40275
|
* Retrieves the data object for a world. Must have valid interactive credentials from a visitor in the world.
|
|
@@ -40642,6 +40643,28 @@ class World extends SDKController {
|
|
|
40642
40643
|
}
|
|
40643
40644
|
});
|
|
40644
40645
|
}
|
|
40646
|
+
////////// webhooks
|
|
40647
|
+
/**
|
|
40648
|
+
* @summary
|
|
40649
|
+
* Retrieve all webhooks in a world.
|
|
40650
|
+
*
|
|
40651
|
+
* @usage
|
|
40652
|
+
* ```ts
|
|
40653
|
+
* await world.fetchWebhooks();
|
|
40654
|
+
* const webhooks = world.webhooks;
|
|
40655
|
+
* ```
|
|
40656
|
+
*/
|
|
40657
|
+
fetchWebhooks() {
|
|
40658
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40659
|
+
try {
|
|
40660
|
+
const response = yield this.topiaPublicApi().get(`/world/${this.urlSlug}/webhooks`, this.requestOptions);
|
|
40661
|
+
this.webhooks = response.data;
|
|
40662
|
+
}
|
|
40663
|
+
catch (error) {
|
|
40664
|
+
throw this.errorHandler({ error });
|
|
40665
|
+
}
|
|
40666
|
+
});
|
|
40667
|
+
}
|
|
40645
40668
|
}
|
|
40646
40669
|
_World_droppedAssetsMap = new WeakMap();
|
|
40647
40670
|
|
|
@@ -41068,7 +41091,7 @@ class Visitor extends User {
|
|
|
41068
41091
|
turnAVOff() {
|
|
41069
41092
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41070
41093
|
try {
|
|
41071
|
-
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/turn-av-off`, this.requestOptions);
|
|
41094
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/turn-av-off`, {}, this.requestOptions);
|
|
41072
41095
|
}
|
|
41073
41096
|
catch (error) {
|
|
41074
41097
|
throw this.errorHandler({ error });
|
package/dist/index.d.ts
CHANGED
|
@@ -374,6 +374,7 @@ declare class World extends SDKController implements WorldInterface {
|
|
|
374
374
|
urlSlug: string;
|
|
375
375
|
dataObject?: object | null | undefined;
|
|
376
376
|
sceneDropIds?: [string] | null | undefined;
|
|
377
|
+
webhooks?: WorldWebhooksInterface | null | undefined;
|
|
377
378
|
constructor(topia: Topia, urlSlug: string, options?: WorldOptionalInterface);
|
|
378
379
|
get droppedAssets(): {
|
|
379
380
|
[key: string]: DroppedAsset;
|
|
@@ -606,6 +607,17 @@ declare class World extends SDKController implements WorldInterface {
|
|
|
606
607
|
releaseLock?: boolean;
|
|
607
608
|
};
|
|
608
609
|
}): Promise<void | ResponseType>;
|
|
610
|
+
/**
|
|
611
|
+
* @summary
|
|
612
|
+
* Retrieve all webhooks in a world.
|
|
613
|
+
*
|
|
614
|
+
* @usage
|
|
615
|
+
* ```ts
|
|
616
|
+
* await world.fetchWebhooks();
|
|
617
|
+
* const webhooks = world.webhooks;
|
|
618
|
+
* ```
|
|
619
|
+
*/
|
|
620
|
+
fetchWebhooks(): Promise<void | ResponseType>;
|
|
609
621
|
}
|
|
610
622
|
|
|
611
623
|
/**
|
|
@@ -1047,6 +1059,7 @@ interface DroppedAssetInterface extends AssetInterface {
|
|
|
1047
1059
|
portalCoordsY?: number | null;
|
|
1048
1060
|
showMediaAsIfPeer?: boolean | null;
|
|
1049
1061
|
syncUserMedia?: boolean | null;
|
|
1062
|
+
uniqueName?: string | null;
|
|
1050
1063
|
urlSlug: string;
|
|
1051
1064
|
tagJson?: string | null;
|
|
1052
1065
|
text?: string | null;
|
|
@@ -1150,6 +1163,7 @@ interface UserInterface {
|
|
|
1150
1163
|
fetchDataObject(): Promise<void | ResponseType>;
|
|
1151
1164
|
setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType>;
|
|
1152
1165
|
incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType>;
|
|
1166
|
+
dataObject?: object | null;
|
|
1153
1167
|
}
|
|
1154
1168
|
interface UserOptionalInterface {
|
|
1155
1169
|
credentials?: InteractiveCredentials | object;
|
|
@@ -1213,6 +1227,21 @@ interface OpenIframeInterface {
|
|
|
1213
1227
|
title?: string;
|
|
1214
1228
|
}
|
|
1215
1229
|
|
|
1230
|
+
interface WebhookInterface {
|
|
1231
|
+
webhookId?: string;
|
|
1232
|
+
assetId?: string;
|
|
1233
|
+
active: boolean;
|
|
1234
|
+
dataObject?: object;
|
|
1235
|
+
dateAdded: Date;
|
|
1236
|
+
description: string;
|
|
1237
|
+
isUniqueOnly: boolean;
|
|
1238
|
+
lastUpdated?: Date;
|
|
1239
|
+
title: string;
|
|
1240
|
+
type: string;
|
|
1241
|
+
url: string;
|
|
1242
|
+
urlSlug: string;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1216
1245
|
interface WorldActivityOptionalInterface {
|
|
1217
1246
|
credentials?: InteractiveCredentials | object;
|
|
1218
1247
|
}
|
|
@@ -1275,6 +1304,9 @@ interface WorldOptionalInterface {
|
|
|
1275
1304
|
attributes?: WorldDetailsInterface | object;
|
|
1276
1305
|
credentials?: InteractiveCredentials | object;
|
|
1277
1306
|
}
|
|
1307
|
+
interface WorldWebhooksInterface {
|
|
1308
|
+
webhooks: Array<WebhookInterface>;
|
|
1309
|
+
}
|
|
1278
1310
|
|
|
1279
1311
|
/**
|
|
1280
1312
|
* @summary
|
|
@@ -1496,4 +1528,4 @@ declare class WorldFactory {
|
|
|
1496
1528
|
create(urlSlug: string, options?: WorldOptionalInterface): World;
|
|
1497
1529
|
}
|
|
1498
1530
|
|
|
1499
|
-
export { Asset, AssetFactory, AssetInterface, AssetOptionalInterface, AssetOptions, DroppedAsset, DroppedAssetClickType, DroppedAssetFactory, DroppedAssetInterface, DroppedAssetMediaType, DroppedAssetOptionalInterface, DroppedAssetOptions, FireToastInterface, InteractiveCredentials, MoveAllVisitorsInterface, MoveVisitorInterface, OpenIframeInterface, ResponseType, SDKController, SDKInterface, Scene, SceneFactory, SceneInterface, SceneOptionalInterface, Topia, TopiaInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface, User, UserFactory, UserInterface, UserOptionalInterface, UserOptions, Visitor, VisitorFactory, VisitorInterface, VisitorOptionalInterface, VisitorOptions, VisitorType, VisitorsToMoveArrayType, VisitorsToMoveType, World, WorldActivity, WorldActivityFactory, WorldActivityOptionalInterface, WorldDetailsInterface, WorldFactory, WorldInterface, WorldOptionalInterface, WorldOptions };
|
|
1531
|
+
export { Asset, AssetFactory, AssetInterface, AssetOptionalInterface, AssetOptions, DroppedAsset, DroppedAssetClickType, DroppedAssetFactory, DroppedAssetInterface, DroppedAssetMediaType, DroppedAssetOptionalInterface, DroppedAssetOptions, FireToastInterface, InteractiveCredentials, MoveAllVisitorsInterface, MoveVisitorInterface, OpenIframeInterface, ResponseType, SDKController, SDKInterface, Scene, SceneFactory, SceneInterface, SceneOptionalInterface, Topia, TopiaInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface, User, UserFactory, UserInterface, UserOptionalInterface, UserOptions, Visitor, VisitorFactory, VisitorInterface, VisitorOptionalInterface, VisitorOptions, VisitorType, VisitorsToMoveArrayType, VisitorsToMoveType, WebhookInterface, World, WorldActivity, WorldActivityFactory, WorldActivityOptionalInterface, WorldDetailsInterface, WorldFactory, WorldInterface, WorldOptionalInterface, WorldOptions, WorldWebhooksInterface };
|
package/dist/index.js
CHANGED
|
@@ -40267,6 +40267,7 @@ class World extends SDKController {
|
|
|
40267
40267
|
constructor(topia, urlSlug, options = { attributes: {}, credentials: {} }) {
|
|
40268
40268
|
super(topia, options.credentials);
|
|
40269
40269
|
_World_droppedAssetsMap.set(this, void 0);
|
|
40270
|
+
////////// data objects
|
|
40270
40271
|
/**
|
|
40271
40272
|
* @summary
|
|
40272
40273
|
* Retrieves the data object for a world. Must have valid interactive credentials from a visitor in the world.
|
|
@@ -40640,6 +40641,28 @@ class World extends SDKController {
|
|
|
40640
40641
|
}
|
|
40641
40642
|
});
|
|
40642
40643
|
}
|
|
40644
|
+
////////// webhooks
|
|
40645
|
+
/**
|
|
40646
|
+
* @summary
|
|
40647
|
+
* Retrieve all webhooks in a world.
|
|
40648
|
+
*
|
|
40649
|
+
* @usage
|
|
40650
|
+
* ```ts
|
|
40651
|
+
* await world.fetchWebhooks();
|
|
40652
|
+
* const webhooks = world.webhooks;
|
|
40653
|
+
* ```
|
|
40654
|
+
*/
|
|
40655
|
+
fetchWebhooks() {
|
|
40656
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40657
|
+
try {
|
|
40658
|
+
const response = yield this.topiaPublicApi().get(`/world/${this.urlSlug}/webhooks`, this.requestOptions);
|
|
40659
|
+
this.webhooks = response.data;
|
|
40660
|
+
}
|
|
40661
|
+
catch (error) {
|
|
40662
|
+
throw this.errorHandler({ error });
|
|
40663
|
+
}
|
|
40664
|
+
});
|
|
40665
|
+
}
|
|
40643
40666
|
}
|
|
40644
40667
|
_World_droppedAssetsMap = new WeakMap();
|
|
40645
40668
|
|
|
@@ -41066,7 +41089,7 @@ class Visitor extends User {
|
|
|
41066
41089
|
turnAVOff() {
|
|
41067
41090
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41068
41091
|
try {
|
|
41069
|
-
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/turn-av-off`, this.requestOptions);
|
|
41092
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/turn-av-off`, {}, this.requestOptions);
|
|
41070
41093
|
}
|
|
41071
41094
|
catch (error) {
|
|
41072
41095
|
throw this.errorHandler({ error });
|
package/package.json
CHANGED