@rtsdk/topia 0.9.0 → 0.9.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/README.md +9 -0
- package/dist/index.cjs +21 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +21 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -205,6 +205,15 @@ try {
|
|
|
205
205
|
|
|
206
206
|
Once complete be sure to also call `await keyAsset.updateDataObject({ turnCount: turnCount + 1 });` so that the next player is free to take their turn!
|
|
207
207
|
|
|
208
|
+
**Custom analytics**
|
|
209
|
+
You can leverage the data object methods for all types to track analytics unique to your Public Key by passing `analytics` as an optional array to all calls that set, update, or increment data objects!
|
|
210
|
+
|
|
211
|
+
```js
|
|
212
|
+
await droppedAsset.updateDataObject({ isResetInProgress: true }, { analytics: ["resetCount"], lock: { lockId } });
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Note: This does NOT impact the data objects themselves but rather allows you to track custom analytics (incremented by 1) across all instances of your application with a given Public Key.
|
|
216
|
+
|
|
208
217
|
<br>
|
|
209
218
|
|
|
210
219
|
<hr/>
|
package/dist/index.cjs
CHANGED
|
@@ -40973,6 +40973,26 @@ class User extends SDKController {
|
|
|
40973
40973
|
get worlds() {
|
|
40974
40974
|
return __classPrivateFieldGet(this, _User_worldsMap, "f");
|
|
40975
40975
|
}
|
|
40976
|
+
/**
|
|
40977
|
+
* @summary
|
|
40978
|
+
* Verify user has valid interactive credentials
|
|
40979
|
+
*
|
|
40980
|
+
* @usage
|
|
40981
|
+
* ```ts
|
|
40982
|
+
* await user.checkInteractiveCredentials();
|
|
40983
|
+
* ```
|
|
40984
|
+
*/
|
|
40985
|
+
checkInteractiveCredentials() {
|
|
40986
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40987
|
+
try {
|
|
40988
|
+
const response = yield this.topiaPublicApi().get(`/auth/interactive-credentials`, this.requestOptions);
|
|
40989
|
+
return response.data;
|
|
40990
|
+
}
|
|
40991
|
+
catch (error) {
|
|
40992
|
+
throw this.errorHandler({ error, sdkMethod: "User.checkInteractiveCredentials" });
|
|
40993
|
+
}
|
|
40994
|
+
});
|
|
40995
|
+
}
|
|
40976
40996
|
/**
|
|
40977
40997
|
* @summary
|
|
40978
40998
|
* Returns all assets owned by User when an email address is provided.
|
|
@@ -42066,7 +42086,7 @@ class WorldFactory extends SDKController {
|
|
|
42066
42086
|
*
|
|
42067
42087
|
* @usage
|
|
42068
42088
|
* ```
|
|
42069
|
-
* await World.deleteDroppedAssets(urlSlug, ["exampleDroppedAssetId1", "exampleDroppedAssetId2"], {
|
|
42089
|
+
* await World.deleteDroppedAssets(urlSlug, ["exampleDroppedAssetId1", "exampleDroppedAssetId2"], { interactivePublicKey, interactiveSecret });
|
|
42070
42090
|
* ```
|
|
42071
42091
|
*/
|
|
42072
42092
|
deleteDroppedAssets(urlSlug, droppedAssetIds, credentials) {
|
package/dist/index.d.ts
CHANGED
|
@@ -784,6 +784,16 @@ declare class User extends SDKController implements UserInterface {
|
|
|
784
784
|
get worlds(): {
|
|
785
785
|
[key: string]: World;
|
|
786
786
|
};
|
|
787
|
+
/**
|
|
788
|
+
* @summary
|
|
789
|
+
* Verify user has valid interactive credentials
|
|
790
|
+
*
|
|
791
|
+
* @usage
|
|
792
|
+
* ```ts
|
|
793
|
+
* await user.checkInteractiveCredentials();
|
|
794
|
+
* ```
|
|
795
|
+
*/
|
|
796
|
+
checkInteractiveCredentials(): Promise<void | ResponseType$1>;
|
|
787
797
|
/**
|
|
788
798
|
* @summary
|
|
789
799
|
* Returns all assets owned by User when an email address is provided.
|
|
@@ -1934,7 +1944,7 @@ declare class WorldFactory extends SDKController {
|
|
|
1934
1944
|
*
|
|
1935
1945
|
* @usage
|
|
1936
1946
|
* ```
|
|
1937
|
-
* await World.deleteDroppedAssets(urlSlug, ["exampleDroppedAssetId1", "exampleDroppedAssetId2"], {
|
|
1947
|
+
* await World.deleteDroppedAssets(urlSlug, ["exampleDroppedAssetId1", "exampleDroppedAssetId2"], { interactivePublicKey, interactiveSecret });
|
|
1938
1948
|
* ```
|
|
1939
1949
|
*/
|
|
1940
1950
|
deleteDroppedAssets(urlSlug: string, droppedAssetIds: string[], credentials: {
|
package/dist/index.js
CHANGED
|
@@ -40971,6 +40971,26 @@ class User extends SDKController {
|
|
|
40971
40971
|
get worlds() {
|
|
40972
40972
|
return __classPrivateFieldGet(this, _User_worldsMap, "f");
|
|
40973
40973
|
}
|
|
40974
|
+
/**
|
|
40975
|
+
* @summary
|
|
40976
|
+
* Verify user has valid interactive credentials
|
|
40977
|
+
*
|
|
40978
|
+
* @usage
|
|
40979
|
+
* ```ts
|
|
40980
|
+
* await user.checkInteractiveCredentials();
|
|
40981
|
+
* ```
|
|
40982
|
+
*/
|
|
40983
|
+
checkInteractiveCredentials() {
|
|
40984
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40985
|
+
try {
|
|
40986
|
+
const response = yield this.topiaPublicApi().get(`/auth/interactive-credentials`, this.requestOptions);
|
|
40987
|
+
return response.data;
|
|
40988
|
+
}
|
|
40989
|
+
catch (error) {
|
|
40990
|
+
throw this.errorHandler({ error, sdkMethod: "User.checkInteractiveCredentials" });
|
|
40991
|
+
}
|
|
40992
|
+
});
|
|
40993
|
+
}
|
|
40974
40994
|
/**
|
|
40975
40995
|
* @summary
|
|
40976
40996
|
* Returns all assets owned by User when an email address is provided.
|
|
@@ -42064,7 +42084,7 @@ class WorldFactory extends SDKController {
|
|
|
42064
42084
|
*
|
|
42065
42085
|
* @usage
|
|
42066
42086
|
* ```
|
|
42067
|
-
* await World.deleteDroppedAssets(urlSlug, ["exampleDroppedAssetId1", "exampleDroppedAssetId2"], {
|
|
42087
|
+
* await World.deleteDroppedAssets(urlSlug, ["exampleDroppedAssetId1", "exampleDroppedAssetId2"], { interactivePublicKey, interactiveSecret });
|
|
42068
42088
|
* ```
|
|
42069
42089
|
*/
|
|
42070
42090
|
deleteDroppedAssets(urlSlug, droppedAssetIds, credentials) {
|
package/package.json
CHANGED