@rtsdk/topia 0.15.6 → 0.15.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 +8 -8
- package/dist/index.d.ts +29 -7
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -39792,26 +39792,26 @@ class Asset extends SDKController {
|
|
|
39792
39792
|
}
|
|
39793
39793
|
}
|
|
39794
39794
|
|
|
39795
|
-
|
|
39795
|
+
exports.DroppedAssetClickType = void 0;
|
|
39796
39796
|
(function (DroppedAssetClickType) {
|
|
39797
39797
|
DroppedAssetClickType["NONE"] = "none";
|
|
39798
39798
|
DroppedAssetClickType["LINK"] = "link";
|
|
39799
39799
|
DroppedAssetClickType["PORTAL"] = "portal";
|
|
39800
39800
|
DroppedAssetClickType["TELEPORT"] = "teleport";
|
|
39801
39801
|
DroppedAssetClickType["WEBHOOK"] = "webhook";
|
|
39802
|
-
})(DroppedAssetClickType || (DroppedAssetClickType = {}));
|
|
39803
|
-
|
|
39802
|
+
})(exports.DroppedAssetClickType || (exports.DroppedAssetClickType = {}));
|
|
39803
|
+
exports.DroppedAssetMediaType = void 0;
|
|
39804
39804
|
(function (DroppedAssetMediaType) {
|
|
39805
39805
|
DroppedAssetMediaType["NONE"] = "none";
|
|
39806
39806
|
DroppedAssetMediaType["LINK"] = "link";
|
|
39807
|
-
})(DroppedAssetMediaType || (DroppedAssetMediaType = {}));
|
|
39807
|
+
})(exports.DroppedAssetMediaType || (exports.DroppedAssetMediaType = {}));
|
|
39808
39808
|
|
|
39809
|
-
|
|
39809
|
+
exports.WorldActivityType = void 0;
|
|
39810
39810
|
(function (WorldActivityType) {
|
|
39811
39811
|
WorldActivityType["GAME_ON"] = "GAME_ON";
|
|
39812
39812
|
WorldActivityType["GAME_WAITING"] = "GAME_WAITING";
|
|
39813
39813
|
WorldActivityType["GAME_HIGH_SCORE"] = "GAME_HIGH_SCORE";
|
|
39814
|
-
})(WorldActivityType || (WorldActivityType = {}));
|
|
39814
|
+
})(exports.WorldActivityType || (exports.WorldActivityType = {}));
|
|
39815
39815
|
|
|
39816
39816
|
const getBrowserWarning = () => {
|
|
39817
39817
|
if (typeof window !== "undefined") {
|
|
@@ -40117,7 +40117,7 @@ class DroppedAsset extends Asset {
|
|
|
40117
40117
|
* });
|
|
40118
40118
|
* ```
|
|
40119
40119
|
*/
|
|
40120
|
-
updateClickType({ clickType = DroppedAssetClickType.LINK, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }) {
|
|
40120
|
+
updateClickType({ clickType = exports.DroppedAssetClickType.LINK, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }) {
|
|
40121
40121
|
const params = {
|
|
40122
40122
|
clickType,
|
|
40123
40123
|
clickableLink,
|
|
@@ -42580,7 +42580,7 @@ class DroppedAssetFactory extends SDKController {
|
|
|
42580
42580
|
throw "An apiKey or interactive credentials are required.";
|
|
42581
42581
|
const response = yield this.topiaPublicApi().get(`/world/${urlSlug}/asset-by-unique-name/${uniqueName}`, { headers });
|
|
42582
42582
|
const { id } = response.data;
|
|
42583
|
-
return new DroppedAsset(this.topia, id, urlSlug, { attributes: response.data });
|
|
42583
|
+
return new DroppedAsset(this.topia, id, urlSlug, { attributes: response.data, credentials });
|
|
42584
42584
|
}
|
|
42585
42585
|
catch (error) {
|
|
42586
42586
|
throw this.errorHandler({ error, params, sdkMethod: "DroppedAssetFactory.getWithUniqueName" });
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,33 @@ type AssetType = {
|
|
|
21
21
|
topLayerURL: string;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
+
type AnimationMetaType = {
|
|
25
|
+
loop: boolean;
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
hideLoop: boolean;
|
|
29
|
+
};
|
|
30
|
+
type FrameType = {
|
|
31
|
+
frame: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
w: number;
|
|
35
|
+
h: number;
|
|
36
|
+
};
|
|
37
|
+
rotated: boolean;
|
|
38
|
+
trimmed: boolean;
|
|
39
|
+
spriteSourceSize: {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
w: number;
|
|
43
|
+
h: number;
|
|
44
|
+
};
|
|
45
|
+
sourceSize: {
|
|
46
|
+
w: number;
|
|
47
|
+
h: number;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
24
51
|
declare enum DroppedAssetClickType {
|
|
25
52
|
NONE = "none",
|
|
26
53
|
LINK = "link",
|
|
@@ -2283,12 +2310,7 @@ declare class DroppedAssetFactory extends SDKController {
|
|
|
2283
2310
|
* const droppedAssetInstance = await DroppedAsset.getWithUniqueName("exampleUniqueName", urlSlug, interactiveSecret, credentials);
|
|
2284
2311
|
* ```
|
|
2285
2312
|
*/
|
|
2286
|
-
getWithUniqueName(uniqueName: string, urlSlug: string, interactiveSecret: string, credentials:
|
|
2287
|
-
apiKey?: string;
|
|
2288
|
-
interactiveNonce?: string;
|
|
2289
|
-
interactivePublicKey: string;
|
|
2290
|
-
visitorId?: number;
|
|
2291
|
-
}): Promise<DroppedAsset>;
|
|
2313
|
+
getWithUniqueName(uniqueName: string, urlSlug: string, interactiveSecret: string, credentials: InteractiveCredentials): Promise<DroppedAsset>;
|
|
2292
2314
|
/**
|
|
2293
2315
|
* @summary
|
|
2294
2316
|
* Drops an asset in a world and returns a new instance of DroppedAsset class with all properties.
|
|
@@ -2503,4 +2525,4 @@ declare class WorldFactory extends SDKController {
|
|
|
2503
2525
|
}>;
|
|
2504
2526
|
}
|
|
2505
2527
|
|
|
2506
|
-
export { Asset, AssetFactory, AssetInterface, AssetOptionalInterface, AssetOptions, AssetType, DroppedAsset, DroppedAssetClickType, DroppedAssetFactory, DroppedAssetInterface, DroppedAssetMediaType, DroppedAssetOptionalInterface, DroppedAssetOptions, FireToastInterface, InteractiveCredentials, MoveAllVisitorsInterface, MoveVisitorInterface, OpenIframeInterface, ResponseType$1 as ResponseType, SDKController, SDKInterface, Scene, SceneFactory, SceneInterface, SceneOptionalInterface, Topia, TopiaInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateDroppedAssetInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface, User, UserFactory, UserInterface, UserOptionalInterface, UserOptions, Visitor, VisitorFactory, VisitorInterface, VisitorOptionalInterface, VisitorOptions, VisitorType, VisitorsToMoveArrayType, VisitorsToMoveType, WebRTCConnector, WebRTCConnectorFactory, WebRTCConnectorInterface, WebRTCConnectorOptionalInterface, WebhookInterface, World, WorldActivity, WorldActivityFactory, WorldActivityOptionalInterface, WorldActivityType, WorldDetailsInterface, WorldFactory, WorldInterface, WorldOptionalInterface, WorldOptions, WorldWebhooksInterface };
|
|
2528
|
+
export { AnalyticType, AnimationMetaType, Asset, AssetFactory, AssetInterface, AssetOptionalInterface, AssetOptions, AssetType, DroppedAsset, DroppedAssetClickType, DroppedAssetFactory, DroppedAssetInterface, DroppedAssetMediaType, DroppedAssetOptionalInterface, DroppedAssetOptions, FireToastInterface, FrameType, InteractiveCredentials, MoveAllVisitorsInterface, MoveVisitorInterface, OpenIframeInterface, ResponseType$1 as ResponseType, SDKController, SDKInterface, Scene, SceneFactory, SceneInterface, SceneOptionalInterface, Topia, TopiaInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateDroppedAssetInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface, User, UserFactory, UserInterface, UserOptionalInterface, UserOptions, Visitor, VisitorFactory, VisitorInterface, VisitorOptionalInterface, VisitorOptions, VisitorType, VisitorsToMoveArrayType, VisitorsToMoveType, WebRTCConnector, WebRTCConnectorFactory, WebRTCConnectorInterface, WebRTCConnectorOptionalInterface, WebhookInterface, World, WorldActivity, WorldActivityFactory, WorldActivityOptionalInterface, WorldActivityType, WorldDetailsInterface, WorldFactory, WorldInterface, WorldOptionalInterface, WorldOptions, WorldWebhooksInterface };
|
package/dist/index.js
CHANGED
|
@@ -42578,7 +42578,7 @@ class DroppedAssetFactory extends SDKController {
|
|
|
42578
42578
|
throw "An apiKey or interactive credentials are required.";
|
|
42579
42579
|
const response = yield this.topiaPublicApi().get(`/world/${urlSlug}/asset-by-unique-name/${uniqueName}`, { headers });
|
|
42580
42580
|
const { id } = response.data;
|
|
42581
|
-
return new DroppedAsset(this.topia, id, urlSlug, { attributes: response.data });
|
|
42581
|
+
return new DroppedAsset(this.topia, id, urlSlug, { attributes: response.data, credentials });
|
|
42582
42582
|
}
|
|
42583
42583
|
catch (error) {
|
|
42584
42584
|
throw this.errorHandler({ error, params, sdkMethod: "DroppedAssetFactory.getWithUniqueName" });
|
|
@@ -42896,4 +42896,4 @@ process.on("uncaughtException", function (err) {
|
|
|
42896
42896
|
process.exit(1);
|
|
42897
42897
|
});
|
|
42898
42898
|
|
|
42899
|
-
export { Asset, AssetFactory, DroppedAsset, DroppedAssetFactory, SDKController, Scene, SceneFactory, Topia, User, UserFactory, Visitor, VisitorFactory, WebRTCConnector, WebRTCConnectorFactory, World, WorldActivity, WorldActivityFactory, WorldFactory };
|
|
42899
|
+
export { Asset, AssetFactory, DroppedAsset, DroppedAssetClickType, DroppedAssetFactory, DroppedAssetMediaType, SDKController, Scene, SceneFactory, Topia, User, UserFactory, Visitor, VisitorFactory, WebRTCConnector, WebRTCConnectorFactory, World, WorldActivity, WorldActivityFactory, WorldActivityType, WorldFactory };
|
package/package.json
CHANGED