@rtsdk/topia 0.14.0 → 0.15.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 +53 -1
- package/dist/index.d.ts +40 -6
- package/dist/index.js +53 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -41104,6 +41104,34 @@ class World extends SDKController {
|
|
|
41104
41104
|
}
|
|
41105
41105
|
});
|
|
41106
41106
|
}
|
|
41107
|
+
/**
|
|
41108
|
+
* @summary
|
|
41109
|
+
* Display a message via a toast to all visitors currently in a world.
|
|
41110
|
+
*
|
|
41111
|
+
* @usage
|
|
41112
|
+
* ```ts
|
|
41113
|
+
* await world.fireToast({
|
|
41114
|
+
* groupId: "custom-message",
|
|
41115
|
+
* title: "Hello World",
|
|
41116
|
+
* text: "Thank you for participating!",
|
|
41117
|
+
* });
|
|
41118
|
+
* ```
|
|
41119
|
+
*/
|
|
41120
|
+
fireToast({ groupId, title, text }) {
|
|
41121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41122
|
+
const params = {
|
|
41123
|
+
groupId,
|
|
41124
|
+
title,
|
|
41125
|
+
text,
|
|
41126
|
+
};
|
|
41127
|
+
try {
|
|
41128
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/fire-toast`, params, this.requestOptions);
|
|
41129
|
+
}
|
|
41130
|
+
catch (error) {
|
|
41131
|
+
throw this.errorHandler({ error, params, sdkMethod: "Visitor.fireToast" });
|
|
41132
|
+
}
|
|
41133
|
+
});
|
|
41134
|
+
}
|
|
41107
41135
|
/**
|
|
41108
41136
|
* @summary
|
|
41109
41137
|
* Increments a specific value in the data object for a world by the amount specified. Must have valid interactive credentials from a visitor in the world.
|
|
@@ -41655,6 +41683,29 @@ class User extends SDKController {
|
|
|
41655
41683
|
}
|
|
41656
41684
|
});
|
|
41657
41685
|
}
|
|
41686
|
+
/**
|
|
41687
|
+
* @summary
|
|
41688
|
+
* Get expressions
|
|
41689
|
+
*
|
|
41690
|
+
* @usage
|
|
41691
|
+
* ```ts
|
|
41692
|
+
* await user.getExpressions({ getUnlockablesOnly: true, });
|
|
41693
|
+
* ```
|
|
41694
|
+
*/
|
|
41695
|
+
getExpressions({ name, getUnlockablesOnly, }) {
|
|
41696
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41697
|
+
try {
|
|
41698
|
+
let query = `?getUnlockablesOnly=${getUnlockablesOnly}`;
|
|
41699
|
+
if (name)
|
|
41700
|
+
query += `&name=${name}`;
|
|
41701
|
+
const result = yield this.topiaPublicApi().get(`/expressions?getUnlockablesOnly=${getUnlockablesOnly}`, this.requestOptions);
|
|
41702
|
+
return result.data;
|
|
41703
|
+
}
|
|
41704
|
+
catch (error) {
|
|
41705
|
+
throw this.errorHandler({ error, params: { name, getUnlockablesOnly }, sdkMethod: "User.getExpressions" });
|
|
41706
|
+
}
|
|
41707
|
+
});
|
|
41708
|
+
}
|
|
41658
41709
|
/**
|
|
41659
41710
|
* @summary
|
|
41660
41711
|
* Retrieves the data object for a user.
|
|
@@ -42538,7 +42589,7 @@ class DroppedAssetFactory extends SDKController {
|
|
|
42538
42589
|
});
|
|
42539
42590
|
* ```
|
|
42540
42591
|
*/
|
|
42541
|
-
drop(asset, { assetScale = 1, clickType, clickableDisplayTextDescription, clickableDisplayTextHeadline, clickableLink, clickableLinkTitle, flipped, interactivePublicKey, isInteractive, isForceLinkInIframe, isOpenLinkInDrawer, isTextTopLayer = false, layer0
|
|
42592
|
+
drop(asset, { assetScale = 1, clickType, clickableDisplayTextDescription, clickableDisplayTextHeadline, clickableLink, clickableLinkTitle, flipped, interactivePublicKey, isInteractive, isForceLinkInIframe, isOpenLinkInDrawer, isTextTopLayer = false, layer0, layer1, position: { x, y }, sceneDropId, text, textColor, textFontFamily, textSize, textWeight, textWidth, uniqueName, urlSlug, yOrderAdjust, }) {
|
|
42542
42593
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42543
42594
|
let specialType = null;
|
|
42544
42595
|
if (layer0 || layer1)
|
|
@@ -42564,6 +42615,7 @@ class DroppedAssetFactory extends SDKController {
|
|
|
42564
42615
|
specialType,
|
|
42565
42616
|
text,
|
|
42566
42617
|
textColor,
|
|
42618
|
+
textFontFamily,
|
|
42567
42619
|
textSize,
|
|
42568
42620
|
textWeight,
|
|
42569
42621
|
textWidth,
|
package/dist/index.d.ts
CHANGED
|
@@ -755,6 +755,20 @@ declare class World extends SDKController implements WorldInterface {
|
|
|
755
755
|
duration?: number;
|
|
756
756
|
position?: object;
|
|
757
757
|
}): Promise<ResponseType$1 | string>;
|
|
758
|
+
/**
|
|
759
|
+
* @summary
|
|
760
|
+
* Display a message via a toast to all visitors currently in a world.
|
|
761
|
+
*
|
|
762
|
+
* @usage
|
|
763
|
+
* ```ts
|
|
764
|
+
* await world.fireToast({
|
|
765
|
+
* groupId: "custom-message",
|
|
766
|
+
* title: "Hello World",
|
|
767
|
+
* text: "Thank you for participating!",
|
|
768
|
+
* });
|
|
769
|
+
* ```
|
|
770
|
+
*/
|
|
771
|
+
fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType$1>;
|
|
758
772
|
/**
|
|
759
773
|
* @summary
|
|
760
774
|
* Retrieves the data object for a world. Must have valid interactive credentials from a visitor in the world.
|
|
@@ -1148,6 +1162,19 @@ declare class User extends SDKController implements UserInterface {
|
|
|
1148
1162
|
subject: string;
|
|
1149
1163
|
to: string;
|
|
1150
1164
|
}): Promise<object | ResponseType$1>;
|
|
1165
|
+
/**
|
|
1166
|
+
* @summary
|
|
1167
|
+
* Get expressions
|
|
1168
|
+
*
|
|
1169
|
+
* @usage
|
|
1170
|
+
* ```ts
|
|
1171
|
+
* await user.getExpressions({ getUnlockablesOnly: true, });
|
|
1172
|
+
* ```
|
|
1173
|
+
*/
|
|
1174
|
+
getExpressions({ name, getUnlockablesOnly, }: {
|
|
1175
|
+
name?: string;
|
|
1176
|
+
getUnlockablesOnly?: boolean;
|
|
1177
|
+
}): Promise<ResponseType$1>;
|
|
1151
1178
|
/**
|
|
1152
1179
|
* @summary
|
|
1153
1180
|
* Retrieves the data object for a user.
|
|
@@ -1706,6 +1733,12 @@ type SceneOptionalInterface = {
|
|
|
1706
1733
|
credentials?: InteractiveCredentials;
|
|
1707
1734
|
};
|
|
1708
1735
|
|
|
1736
|
+
interface FireToastInterface {
|
|
1737
|
+
groupId?: string;
|
|
1738
|
+
title: string;
|
|
1739
|
+
text?: string;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1709
1742
|
interface TopiaInterface {
|
|
1710
1743
|
apiDomain?: string;
|
|
1711
1744
|
apiKey?: string;
|
|
@@ -1776,11 +1809,6 @@ interface MoveVisitorInterface {
|
|
|
1776
1809
|
x: number;
|
|
1777
1810
|
y: number;
|
|
1778
1811
|
}
|
|
1779
|
-
interface FireToastInterface {
|
|
1780
|
-
groupId?: string;
|
|
1781
|
-
title: string;
|
|
1782
|
-
text?: string;
|
|
1783
|
-
}
|
|
1784
1812
|
interface OpenIframeInterface {
|
|
1785
1813
|
droppedAssetId: string;
|
|
1786
1814
|
link: string;
|
|
@@ -1857,6 +1885,10 @@ interface WorldInterface extends SDKInterface, WorldDetailsInterface {
|
|
|
1857
1885
|
isPartial?: boolean;
|
|
1858
1886
|
isReversed?: boolean;
|
|
1859
1887
|
}): Promise<DroppedAsset[]>;
|
|
1888
|
+
fetchDroppedAssetsBySceneDropId({ sceneDropId, uniqueName, }: {
|
|
1889
|
+
sceneDropId: string;
|
|
1890
|
+
uniqueName?: string;
|
|
1891
|
+
}): Promise<DroppedAsset[]>;
|
|
1860
1892
|
updateCustomTextDroppedAssets(droppedAssetsToUpdate: Array<DroppedAsset>, style: object): Promise<object>;
|
|
1861
1893
|
dropScene({ assetSuffix, position, sceneId, }: {
|
|
1862
1894
|
assetSuffix: string;
|
|
@@ -1865,6 +1897,7 @@ interface WorldInterface extends SDKInterface, WorldDetailsInterface {
|
|
|
1865
1897
|
}): Promise<object | ResponseType$1>;
|
|
1866
1898
|
replaceScene(sceneId: string): Promise<void | ResponseType$1>;
|
|
1867
1899
|
fetchDataObject(): Promise<void | ResponseType$1>;
|
|
1900
|
+
fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType$1>;
|
|
1868
1901
|
setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType$1>;
|
|
1869
1902
|
updateDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
|
|
1870
1903
|
incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
|
|
@@ -2239,7 +2272,7 @@ declare class DroppedAssetFactory extends SDKController {
|
|
|
2239
2272
|
});
|
|
2240
2273
|
* ```
|
|
2241
2274
|
*/
|
|
2242
|
-
drop(asset: Asset, { assetScale, clickType, clickableDisplayTextDescription, clickableDisplayTextHeadline, clickableLink, clickableLinkTitle, flipped, interactivePublicKey, isInteractive, isForceLinkInIframe, isOpenLinkInDrawer, isTextTopLayer, layer0, layer1, position: { x, y }, sceneDropId, text, textColor, textSize, textWeight, textWidth, uniqueName, urlSlug, yOrderAdjust, }: {
|
|
2275
|
+
drop(asset: Asset, { assetScale, clickType, clickableDisplayTextDescription, clickableDisplayTextHeadline, clickableLink, clickableLinkTitle, flipped, interactivePublicKey, isInteractive, isForceLinkInIframe, isOpenLinkInDrawer, isTextTopLayer, layer0, layer1, position: { x, y }, sceneDropId, text, textColor, textFontFamily, textSize, textWeight, textWidth, uniqueName, urlSlug, yOrderAdjust, }: {
|
|
2243
2276
|
assetScale?: number;
|
|
2244
2277
|
flipped?: boolean;
|
|
2245
2278
|
clickType?: string;
|
|
@@ -2261,6 +2294,7 @@ declare class DroppedAssetFactory extends SDKController {
|
|
|
2261
2294
|
sceneDropId?: string;
|
|
2262
2295
|
text?: string;
|
|
2263
2296
|
textColor?: string;
|
|
2297
|
+
textFontFamily?: string;
|
|
2264
2298
|
textSize?: number;
|
|
2265
2299
|
textWeight?: string;
|
|
2266
2300
|
textWidth?: number;
|
package/dist/index.js
CHANGED
|
@@ -41102,6 +41102,34 @@ class World extends SDKController {
|
|
|
41102
41102
|
}
|
|
41103
41103
|
});
|
|
41104
41104
|
}
|
|
41105
|
+
/**
|
|
41106
|
+
* @summary
|
|
41107
|
+
* Display a message via a toast to all visitors currently in a world.
|
|
41108
|
+
*
|
|
41109
|
+
* @usage
|
|
41110
|
+
* ```ts
|
|
41111
|
+
* await world.fireToast({
|
|
41112
|
+
* groupId: "custom-message",
|
|
41113
|
+
* title: "Hello World",
|
|
41114
|
+
* text: "Thank you for participating!",
|
|
41115
|
+
* });
|
|
41116
|
+
* ```
|
|
41117
|
+
*/
|
|
41118
|
+
fireToast({ groupId, title, text }) {
|
|
41119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41120
|
+
const params = {
|
|
41121
|
+
groupId,
|
|
41122
|
+
title,
|
|
41123
|
+
text,
|
|
41124
|
+
};
|
|
41125
|
+
try {
|
|
41126
|
+
yield this.topiaPublicApi().put(`/world/${this.urlSlug}/fire-toast`, params, this.requestOptions);
|
|
41127
|
+
}
|
|
41128
|
+
catch (error) {
|
|
41129
|
+
throw this.errorHandler({ error, params, sdkMethod: "Visitor.fireToast" });
|
|
41130
|
+
}
|
|
41131
|
+
});
|
|
41132
|
+
}
|
|
41105
41133
|
/**
|
|
41106
41134
|
* @summary
|
|
41107
41135
|
* Increments a specific value in the data object for a world by the amount specified. Must have valid interactive credentials from a visitor in the world.
|
|
@@ -41653,6 +41681,29 @@ class User extends SDKController {
|
|
|
41653
41681
|
}
|
|
41654
41682
|
});
|
|
41655
41683
|
}
|
|
41684
|
+
/**
|
|
41685
|
+
* @summary
|
|
41686
|
+
* Get expressions
|
|
41687
|
+
*
|
|
41688
|
+
* @usage
|
|
41689
|
+
* ```ts
|
|
41690
|
+
* await user.getExpressions({ getUnlockablesOnly: true, });
|
|
41691
|
+
* ```
|
|
41692
|
+
*/
|
|
41693
|
+
getExpressions({ name, getUnlockablesOnly, }) {
|
|
41694
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41695
|
+
try {
|
|
41696
|
+
let query = `?getUnlockablesOnly=${getUnlockablesOnly}`;
|
|
41697
|
+
if (name)
|
|
41698
|
+
query += `&name=${name}`;
|
|
41699
|
+
const result = yield this.topiaPublicApi().get(`/expressions?getUnlockablesOnly=${getUnlockablesOnly}`, this.requestOptions);
|
|
41700
|
+
return result.data;
|
|
41701
|
+
}
|
|
41702
|
+
catch (error) {
|
|
41703
|
+
throw this.errorHandler({ error, params: { name, getUnlockablesOnly }, sdkMethod: "User.getExpressions" });
|
|
41704
|
+
}
|
|
41705
|
+
});
|
|
41706
|
+
}
|
|
41656
41707
|
/**
|
|
41657
41708
|
* @summary
|
|
41658
41709
|
* Retrieves the data object for a user.
|
|
@@ -42536,7 +42587,7 @@ class DroppedAssetFactory extends SDKController {
|
|
|
42536
42587
|
});
|
|
42537
42588
|
* ```
|
|
42538
42589
|
*/
|
|
42539
|
-
drop(asset, { assetScale = 1, clickType, clickableDisplayTextDescription, clickableDisplayTextHeadline, clickableLink, clickableLinkTitle, flipped, interactivePublicKey, isInteractive, isForceLinkInIframe, isOpenLinkInDrawer, isTextTopLayer = false, layer0
|
|
42590
|
+
drop(asset, { assetScale = 1, clickType, clickableDisplayTextDescription, clickableDisplayTextHeadline, clickableLink, clickableLinkTitle, flipped, interactivePublicKey, isInteractive, isForceLinkInIframe, isOpenLinkInDrawer, isTextTopLayer = false, layer0, layer1, position: { x, y }, sceneDropId, text, textColor, textFontFamily, textSize, textWeight, textWidth, uniqueName, urlSlug, yOrderAdjust, }) {
|
|
42540
42591
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42541
42592
|
let specialType = null;
|
|
42542
42593
|
if (layer0 || layer1)
|
|
@@ -42562,6 +42613,7 @@ class DroppedAssetFactory extends SDKController {
|
|
|
42562
42613
|
specialType,
|
|
42563
42614
|
text,
|
|
42564
42615
|
textColor,
|
|
42616
|
+
textFontFamily,
|
|
42565
42617
|
textSize,
|
|
42566
42618
|
textWeight,
|
|
42567
42619
|
textWidth,
|
package/package.json
CHANGED