@rtsdk/topia 0.16.0 → 0.16.2
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 +16 -16
- package/dist/index.d.ts +61 -31
- package/dist/index.js +16 -16
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -39988,12 +39988,12 @@ class DroppedAsset extends Asset {
|
|
|
39988
39988
|
* const dataObject = await droppedAsset.fetchDataObject();
|
|
39989
39989
|
* ```
|
|
39990
39990
|
*/
|
|
39991
|
-
fetchDataObject(appPublicKey,
|
|
39991
|
+
fetchDataObject(appPublicKey, appJWT) {
|
|
39992
39992
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39993
39993
|
try {
|
|
39994
39994
|
let query = "";
|
|
39995
39995
|
if (appPublicKey)
|
|
39996
|
-
query = `?appPublicKey=${appPublicKey}&
|
|
39996
|
+
query = `?appPublicKey=${appPublicKey}&appJWT=${appJWT}`;
|
|
39997
39997
|
const response = yield this.topiaPublicApi().get(`/world/${this.urlSlug}/assets/${this.id}/data-object${query}`, this.requestOptions);
|
|
39998
39998
|
this.dataObject = response.data;
|
|
39999
39999
|
return response.data;
|
|
@@ -40502,12 +40502,12 @@ class Ecosystem extends SDKController {
|
|
|
40502
40502
|
* const dataObject = await ecosystem.fetchDataObject("exampleAppPublicKey", "exampleAppPublicKeyJWT");
|
|
40503
40503
|
* ```
|
|
40504
40504
|
*/
|
|
40505
|
-
fetchDataObject(appPublicKey,
|
|
40505
|
+
fetchDataObject(appPublicKey, appJWT) {
|
|
40506
40506
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40507
40507
|
try {
|
|
40508
40508
|
let query = "";
|
|
40509
40509
|
if (appPublicKey)
|
|
40510
|
-
query = `?appPublicKey=${appPublicKey}&
|
|
40510
|
+
query = `?appPublicKey=${appPublicKey}&appJWT=${appJWT}`;
|
|
40511
40511
|
const response = yield this.topiaPublicApi().get(`/ecosystem/data-object${query}`, this.requestOptions);
|
|
40512
40512
|
this.dataObject = response.data;
|
|
40513
40513
|
return response.data;
|
|
@@ -40526,8 +40526,8 @@ class Ecosystem extends SDKController {
|
|
|
40526
40526
|
* @usage
|
|
40527
40527
|
* ```ts
|
|
40528
40528
|
* await ecosystem.setDataObject({ "exampleKey": "exampleValue" }, {
|
|
40529
|
-
*
|
|
40530
|
-
*
|
|
40529
|
+
* sharedAppPublicKey: "exampleAppPublicKey",
|
|
40530
|
+
* sharedAppJWT: "exampleAppPublicKeyJWT",}
|
|
40531
40531
|
* });
|
|
40532
40532
|
* ```
|
|
40533
40533
|
*/
|
|
@@ -40551,8 +40551,8 @@ class Ecosystem extends SDKController {
|
|
|
40551
40551
|
* @usage
|
|
40552
40552
|
* ```ts
|
|
40553
40553
|
* await ecosystem.updateDataObject({ "exampleKey": "exampleValue" }, {
|
|
40554
|
-
*
|
|
40555
|
-
*
|
|
40554
|
+
* sharedAppPublicKey: "exampleAppPublicKey",
|
|
40555
|
+
* sharedAppJWT: "exampleAppPublicKeyJWT",}
|
|
40556
40556
|
* });
|
|
40557
40557
|
* ```
|
|
40558
40558
|
*/
|
|
@@ -40576,8 +40576,8 @@ class Ecosystem extends SDKController {
|
|
|
40576
40576
|
* @usage
|
|
40577
40577
|
* ```ts
|
|
40578
40578
|
* await ecosystem.incrementDataObjectValue("key", 1, {
|
|
40579
|
-
*
|
|
40580
|
-
*
|
|
40579
|
+
* sharedAppPublicKey: "exampleAppPublicKey",
|
|
40580
|
+
* sharedAppJWT: "exampleAppPublicKeyJWT",}
|
|
40581
40581
|
* });
|
|
40582
40582
|
* ```
|
|
40583
40583
|
*/
|
|
@@ -40705,11 +40705,11 @@ class World extends SDKController {
|
|
|
40705
40705
|
* const { dataObject } = world;
|
|
40706
40706
|
* ```
|
|
40707
40707
|
*/
|
|
40708
|
-
this.fetchDataObject = (appPublicKey,
|
|
40708
|
+
this.fetchDataObject = (appPublicKey, appJWT) => __awaiter(this, void 0, void 0, function* () {
|
|
40709
40709
|
try {
|
|
40710
40710
|
let query = "";
|
|
40711
40711
|
if (appPublicKey)
|
|
40712
|
-
query = `?appPublicKey=${appPublicKey}&
|
|
40712
|
+
query = `?appPublicKey=${appPublicKey}&appJWT=${appJWT}`;
|
|
40713
40713
|
const response = yield this.topiaPublicApi().get(`/world/${this.urlSlug}/get-data-object${query}`, this.requestOptions);
|
|
40714
40714
|
this.dataObject = response.data;
|
|
40715
40715
|
return response.data;
|
|
@@ -41845,14 +41845,14 @@ class User extends SDKController {
|
|
|
41845
41845
|
* const dataObject = await user.fetchDataObject();
|
|
41846
41846
|
* ```
|
|
41847
41847
|
*/
|
|
41848
|
-
fetchDataObject(appPublicKey,
|
|
41848
|
+
fetchDataObject(appPublicKey, appJWT) {
|
|
41849
41849
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41850
41850
|
try {
|
|
41851
41851
|
if (!this.profileId)
|
|
41852
41852
|
throw "This method requires the use of a profileId";
|
|
41853
41853
|
let query = "";
|
|
41854
41854
|
if (appPublicKey)
|
|
41855
|
-
query = `?appPublicKey=${appPublicKey}&
|
|
41855
|
+
query = `?appPublicKey=${appPublicKey}&appJWT=${appJWT}`;
|
|
41856
41856
|
const response = yield this.topiaPublicApi().get(`/user/dataObjects/${this.profileId}/get-data-object${query}`, this.requestOptions);
|
|
41857
41857
|
this.dataObject = response.data;
|
|
41858
41858
|
return response.data;
|
|
@@ -42245,12 +42245,12 @@ class Visitor extends User {
|
|
|
42245
42245
|
* const dataObject = await visitor.fetchDataObject();
|
|
42246
42246
|
* ```
|
|
42247
42247
|
*/
|
|
42248
|
-
fetchDataObject(appPublicKey,
|
|
42248
|
+
fetchDataObject(appPublicKey, appJWT) {
|
|
42249
42249
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42250
42250
|
try {
|
|
42251
42251
|
let query = "";
|
|
42252
42252
|
if (appPublicKey)
|
|
42253
|
-
query = `?appPublicKey=${appPublicKey}&
|
|
42253
|
+
query = `?appPublicKey=${appPublicKey}&appJWT=${appJWT}`;
|
|
42254
42254
|
const response = yield this.topiaPublicApi().get(`/world/${this.urlSlug}/visitors/${this.id}/get-data-object${query}`, this.requestOptions);
|
|
42255
42255
|
this.dataObject = response.data;
|
|
42256
42256
|
return response.data;
|
package/dist/index.d.ts
CHANGED
|
@@ -213,7 +213,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
|
|
|
213
213
|
* const dataObject = await droppedAsset.fetchDataObject();
|
|
214
214
|
* ```
|
|
215
215
|
*/
|
|
216
|
-
fetchDataObject(appPublicKey?: string,
|
|
216
|
+
fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType$1>;
|
|
217
217
|
/**
|
|
218
218
|
* @summary
|
|
219
219
|
* Sets the data object for a dropped asset.
|
|
@@ -229,7 +229,9 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
|
|
|
229
229
|
*/
|
|
230
230
|
setDataObject(dataObject: object, options?: {
|
|
231
231
|
appPublicKey?: string;
|
|
232
|
-
|
|
232
|
+
appJWT?: string;
|
|
233
|
+
sharedAppPublicKey?: string;
|
|
234
|
+
sharedAppJWT?: string;
|
|
233
235
|
analytics?: AnalyticType[];
|
|
234
236
|
lock?: {
|
|
235
237
|
lockId: string;
|
|
@@ -251,7 +253,9 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
|
|
|
251
253
|
*/
|
|
252
254
|
updateDataObject(dataObject: object, options?: {
|
|
253
255
|
appPublicKey?: string;
|
|
254
|
-
|
|
256
|
+
appJWT?: string;
|
|
257
|
+
sharedAppPublicKey?: string;
|
|
258
|
+
sharedAppJWT?: string;
|
|
255
259
|
analytics?: AnalyticType[];
|
|
256
260
|
lock?: {
|
|
257
261
|
lockId: string;
|
|
@@ -271,7 +275,9 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
|
|
|
271
275
|
*/
|
|
272
276
|
incrementDataObjectValue(path: string, amount: number, options?: {
|
|
273
277
|
appPublicKey?: string;
|
|
274
|
-
|
|
278
|
+
appJWT?: string;
|
|
279
|
+
sharedAppPublicKey?: string;
|
|
280
|
+
sharedAppJWT?: string;
|
|
275
281
|
analytics?: AnalyticType[];
|
|
276
282
|
lock?: {
|
|
277
283
|
lockId: string;
|
|
@@ -827,7 +833,7 @@ declare class World extends SDKController implements WorldInterface {
|
|
|
827
833
|
* const { dataObject } = world;
|
|
828
834
|
* ```
|
|
829
835
|
*/
|
|
830
|
-
fetchDataObject: (appPublicKey?: string,
|
|
836
|
+
fetchDataObject: (appPublicKey?: string, appJWT?: string) => Promise<void | ResponseType$1>;
|
|
831
837
|
/**
|
|
832
838
|
* @summary
|
|
833
839
|
* Sets the data object for a user. Must have valid interactive credentials from a visitor in the world.
|
|
@@ -844,7 +850,9 @@ declare class World extends SDKController implements WorldInterface {
|
|
|
844
850
|
*/
|
|
845
851
|
setDataObject: (dataObject: object | null | undefined, options?: {
|
|
846
852
|
appPublicKey?: string;
|
|
847
|
-
|
|
853
|
+
appJWT?: string;
|
|
854
|
+
sharedAppPublicKey?: string;
|
|
855
|
+
sharedAppJWT?: string;
|
|
848
856
|
analytics?: AnalyticType[];
|
|
849
857
|
lock?: {
|
|
850
858
|
lockId: string;
|
|
@@ -867,7 +875,9 @@ declare class World extends SDKController implements WorldInterface {
|
|
|
867
875
|
*/
|
|
868
876
|
updateDataObject: (dataObject: object, options?: {
|
|
869
877
|
appPublicKey?: string;
|
|
870
|
-
|
|
878
|
+
appJWT?: string;
|
|
879
|
+
sharedAppPublicKey?: string;
|
|
880
|
+
sharedAppJWT?: string;
|
|
871
881
|
analytics?: AnalyticType[];
|
|
872
882
|
lock?: {
|
|
873
883
|
lockId: string;
|
|
@@ -887,7 +897,9 @@ declare class World extends SDKController implements WorldInterface {
|
|
|
887
897
|
*/
|
|
888
898
|
incrementDataObjectValue(path: string, amount: number, options?: {
|
|
889
899
|
appPublicKey?: string;
|
|
890
|
-
|
|
900
|
+
appJWT?: string;
|
|
901
|
+
sharedAppPublicKey?: string;
|
|
902
|
+
sharedAppJWT?: string;
|
|
891
903
|
analytics?: AnalyticType[];
|
|
892
904
|
lock?: {
|
|
893
905
|
lockId: string;
|
|
@@ -1238,7 +1250,7 @@ declare class User extends SDKController implements UserInterface {
|
|
|
1238
1250
|
* const dataObject = await user.fetchDataObject();
|
|
1239
1251
|
* ```
|
|
1240
1252
|
*/
|
|
1241
|
-
fetchDataObject(appPublicKey?: string,
|
|
1253
|
+
fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType$1>;
|
|
1242
1254
|
/**
|
|
1243
1255
|
* @summary
|
|
1244
1256
|
* Sets the data object for a user.
|
|
@@ -1254,7 +1266,9 @@ declare class User extends SDKController implements UserInterface {
|
|
|
1254
1266
|
*/
|
|
1255
1267
|
setDataObject(dataObject: object | null | undefined, options?: {
|
|
1256
1268
|
appPublicKey?: string;
|
|
1257
|
-
|
|
1269
|
+
appJWT?: string;
|
|
1270
|
+
sharedAppPublicKey?: string;
|
|
1271
|
+
sharedAppJWT?: string;
|
|
1258
1272
|
analytics?: AnalyticType[];
|
|
1259
1273
|
lock?: {
|
|
1260
1274
|
lockId: string;
|
|
@@ -1276,7 +1290,9 @@ declare class User extends SDKController implements UserInterface {
|
|
|
1276
1290
|
*/
|
|
1277
1291
|
updateDataObject(dataObject: object, options?: {
|
|
1278
1292
|
appPublicKey?: string;
|
|
1279
|
-
|
|
1293
|
+
appJWT?: string;
|
|
1294
|
+
sharedAppPublicKey?: string;
|
|
1295
|
+
sharedAppJWT?: string;
|
|
1280
1296
|
analytics?: AnalyticType[];
|
|
1281
1297
|
lock?: {
|
|
1282
1298
|
lockId: string;
|
|
@@ -1296,7 +1312,9 @@ declare class User extends SDKController implements UserInterface {
|
|
|
1296
1312
|
*/
|
|
1297
1313
|
incrementDataObjectValue(path: string, amount: number, options?: {
|
|
1298
1314
|
appPublicKey?: string;
|
|
1299
|
-
|
|
1315
|
+
appJWT?: string;
|
|
1316
|
+
sharedAppPublicKey?: string;
|
|
1317
|
+
sharedAppJWT?: string;
|
|
1300
1318
|
analytics?: AnalyticType[];
|
|
1301
1319
|
lock?: {
|
|
1302
1320
|
lockId: string;
|
|
@@ -1468,7 +1486,7 @@ declare class Visitor extends User implements VisitorInterface {
|
|
|
1468
1486
|
* const dataObject = await visitor.fetchDataObject();
|
|
1469
1487
|
* ```
|
|
1470
1488
|
*/
|
|
1471
|
-
fetchDataObject(appPublicKey?: string,
|
|
1489
|
+
fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType$1>;
|
|
1472
1490
|
/**
|
|
1473
1491
|
* @summary
|
|
1474
1492
|
* Sets the data object for a visitor.
|
|
@@ -1484,7 +1502,9 @@ declare class Visitor extends User implements VisitorInterface {
|
|
|
1484
1502
|
*/
|
|
1485
1503
|
setDataObject(dataObject: object | null | undefined, options?: {
|
|
1486
1504
|
appPublicKey?: string;
|
|
1487
|
-
|
|
1505
|
+
appJWT?: string;
|
|
1506
|
+
sharedAppPublicKey?: string;
|
|
1507
|
+
sharedAppJWT?: string;
|
|
1488
1508
|
analytics?: AnalyticType[];
|
|
1489
1509
|
lock?: {
|
|
1490
1510
|
lockId: string;
|
|
@@ -1506,7 +1526,9 @@ declare class Visitor extends User implements VisitorInterface {
|
|
|
1506
1526
|
*/
|
|
1507
1527
|
updateDataObject(dataObject: object, options?: {
|
|
1508
1528
|
appPublicKey?: string;
|
|
1509
|
-
|
|
1529
|
+
appJWT?: string;
|
|
1530
|
+
sharedAppPublicKey?: string;
|
|
1531
|
+
sharedAppJWT?: string;
|
|
1510
1532
|
analytics?: AnalyticType[];
|
|
1511
1533
|
lock?: {
|
|
1512
1534
|
lockId: string;
|
|
@@ -1526,7 +1548,9 @@ declare class Visitor extends User implements VisitorInterface {
|
|
|
1526
1548
|
*/
|
|
1527
1549
|
incrementDataObjectValue(path: string, amount: number, options?: {
|
|
1528
1550
|
appPublicKey?: string;
|
|
1529
|
-
|
|
1551
|
+
appJWT?: string;
|
|
1552
|
+
sharedAppPublicKey?: string;
|
|
1553
|
+
sharedAppJWT?: string;
|
|
1530
1554
|
analytics?: AnalyticType[];
|
|
1531
1555
|
lock?: {
|
|
1532
1556
|
lockId: string;
|
|
@@ -1631,7 +1655,7 @@ type AssetOptionalInterface = {
|
|
|
1631
1655
|
interface DroppedAssetInterface extends AssetInterface {
|
|
1632
1656
|
fetchDroppedAssetById(): Promise<void | ResponseType$1>;
|
|
1633
1657
|
deleteDroppedAsset(): Promise<void | ResponseType$1>;
|
|
1634
|
-
fetchDataObject(appPublicKey?: string,
|
|
1658
|
+
fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType$1>;
|
|
1635
1659
|
setDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
|
|
1636
1660
|
updateDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
|
|
1637
1661
|
incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
|
|
@@ -1794,7 +1818,7 @@ interface UpdatePrivateZoneInterface {
|
|
|
1794
1818
|
}
|
|
1795
1819
|
|
|
1796
1820
|
interface EcosystemInterface {
|
|
1797
|
-
fetchDataObject(appPublicKey?: string,
|
|
1821
|
+
fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType$1>;
|
|
1798
1822
|
setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType$1>;
|
|
1799
1823
|
updateDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
|
|
1800
1824
|
incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
|
|
@@ -1851,7 +1875,7 @@ interface UserInterface {
|
|
|
1851
1875
|
fetchPlatformAssets(): Promise<object | ResponseType$1>;
|
|
1852
1876
|
fetchScenes(): Promise<void | ResponseType$1>;
|
|
1853
1877
|
fetchWorldsByKey(): Promise<void | ResponseType$1>;
|
|
1854
|
-
fetchDataObject(appPublicKey?: string,
|
|
1878
|
+
fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType$1>;
|
|
1855
1879
|
setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType$1>;
|
|
1856
1880
|
incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
|
|
1857
1881
|
dataObject?: object | null;
|
|
@@ -1868,7 +1892,7 @@ interface VisitorInterface extends SDKInterface {
|
|
|
1868
1892
|
moveVisitor({ shouldTeleportVisitor, x, y }: MoveVisitorInterface): Promise<void | ResponseType$1>;
|
|
1869
1893
|
fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType$1>;
|
|
1870
1894
|
openIframe({ link, shouldOpenInDrawer, title }: OpenIframeInterface): Promise<void | ResponseType$1>;
|
|
1871
|
-
fetchDataObject(appPublicKey?: string,
|
|
1895
|
+
fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType$1>;
|
|
1872
1896
|
setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType$1>;
|
|
1873
1897
|
updateDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
|
|
1874
1898
|
incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
|
|
@@ -1995,7 +2019,7 @@ interface WorldInterface extends SDKInterface, WorldDetailsInterface {
|
|
|
1995
2019
|
}): Promise<object | ResponseType$1>;
|
|
1996
2020
|
replaceScene(sceneId: string): Promise<void | ResponseType$1>;
|
|
1997
2021
|
fireToast({ groupId, title, text }: FireToastInterface): Promise<void | ResponseType$1>;
|
|
1998
|
-
fetchDataObject(appPublicKey?: string,
|
|
2022
|
+
fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType$1>;
|
|
1999
2023
|
setDataObject(dataObject: object | null | undefined, options: object): Promise<void | ResponseType$1>;
|
|
2000
2024
|
updateDataObject(dataObject: object, options: object): Promise<void | ResponseType$1>;
|
|
2001
2025
|
incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
|
|
@@ -2167,7 +2191,7 @@ declare class Ecosystem extends SDKController {
|
|
|
2167
2191
|
* const dataObject = await ecosystem.fetchDataObject("exampleAppPublicKey", "exampleAppPublicKeyJWT");
|
|
2168
2192
|
* ```
|
|
2169
2193
|
*/
|
|
2170
|
-
fetchDataObject(appPublicKey?: string,
|
|
2194
|
+
fetchDataObject(appPublicKey?: string, appJWT?: string): Promise<void | ResponseType$1>;
|
|
2171
2195
|
/**
|
|
2172
2196
|
* @summary
|
|
2173
2197
|
* Sets the data object for a Topia ecosystem.
|
|
@@ -2177,14 +2201,16 @@ declare class Ecosystem extends SDKController {
|
|
|
2177
2201
|
* @usage
|
|
2178
2202
|
* ```ts
|
|
2179
2203
|
* await ecosystem.setDataObject({ "exampleKey": "exampleValue" }, {
|
|
2180
|
-
*
|
|
2181
|
-
*
|
|
2204
|
+
* sharedAppPublicKey: "exampleAppPublicKey",
|
|
2205
|
+
* sharedAppJWT: "exampleAppPublicKeyJWT",}
|
|
2182
2206
|
* });
|
|
2183
2207
|
* ```
|
|
2184
2208
|
*/
|
|
2185
2209
|
setDataObject(dataObject: object | null | undefined, options?: {
|
|
2186
2210
|
appPublicKey?: string;
|
|
2187
|
-
|
|
2211
|
+
appJWT?: string;
|
|
2212
|
+
sharedAppPublicKey?: string;
|
|
2213
|
+
sharedAppJWT?: string;
|
|
2188
2214
|
analytics?: AnalyticType[];
|
|
2189
2215
|
lock?: {
|
|
2190
2216
|
lockId: string;
|
|
@@ -2200,14 +2226,16 @@ declare class Ecosystem extends SDKController {
|
|
|
2200
2226
|
* @usage
|
|
2201
2227
|
* ```ts
|
|
2202
2228
|
* await ecosystem.updateDataObject({ "exampleKey": "exampleValue" }, {
|
|
2203
|
-
*
|
|
2204
|
-
*
|
|
2229
|
+
* sharedAppPublicKey: "exampleAppPublicKey",
|
|
2230
|
+
* sharedAppJWT: "exampleAppPublicKeyJWT",}
|
|
2205
2231
|
* });
|
|
2206
2232
|
* ```
|
|
2207
2233
|
*/
|
|
2208
2234
|
updateDataObject(dataObject: object, options?: {
|
|
2209
2235
|
appPublicKey?: string;
|
|
2210
|
-
|
|
2236
|
+
appJWT?: string;
|
|
2237
|
+
sharedAppPublicKey?: string;
|
|
2238
|
+
sharedAppJWT?: string;
|
|
2211
2239
|
analytics?: AnalyticType[];
|
|
2212
2240
|
lock?: {
|
|
2213
2241
|
lockId: string;
|
|
@@ -2223,14 +2251,16 @@ declare class Ecosystem extends SDKController {
|
|
|
2223
2251
|
* @usage
|
|
2224
2252
|
* ```ts
|
|
2225
2253
|
* await ecosystem.incrementDataObjectValue("key", 1, {
|
|
2226
|
-
*
|
|
2227
|
-
*
|
|
2254
|
+
* sharedAppPublicKey: "exampleAppPublicKey",
|
|
2255
|
+
* sharedAppJWT: "exampleAppPublicKeyJWT",}
|
|
2228
2256
|
* });
|
|
2229
2257
|
* ```
|
|
2230
2258
|
*/
|
|
2231
2259
|
incrementDataObjectValue(path: string, amount: number, options?: {
|
|
2232
2260
|
appPublicKey?: string;
|
|
2233
|
-
|
|
2261
|
+
appJWT?: string;
|
|
2262
|
+
sharedAppPublicKey?: string;
|
|
2263
|
+
sharedAppJWT?: string;
|
|
2234
2264
|
analytics?: AnalyticType[];
|
|
2235
2265
|
lock?: {
|
|
2236
2266
|
lockId: string;
|
package/dist/index.js
CHANGED
|
@@ -39986,12 +39986,12 @@ class DroppedAsset extends Asset {
|
|
|
39986
39986
|
* const dataObject = await droppedAsset.fetchDataObject();
|
|
39987
39987
|
* ```
|
|
39988
39988
|
*/
|
|
39989
|
-
fetchDataObject(appPublicKey,
|
|
39989
|
+
fetchDataObject(appPublicKey, appJWT) {
|
|
39990
39990
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39991
39991
|
try {
|
|
39992
39992
|
let query = "";
|
|
39993
39993
|
if (appPublicKey)
|
|
39994
|
-
query = `?appPublicKey=${appPublicKey}&
|
|
39994
|
+
query = `?appPublicKey=${appPublicKey}&appJWT=${appJWT}`;
|
|
39995
39995
|
const response = yield this.topiaPublicApi().get(`/world/${this.urlSlug}/assets/${this.id}/data-object${query}`, this.requestOptions);
|
|
39996
39996
|
this.dataObject = response.data;
|
|
39997
39997
|
return response.data;
|
|
@@ -40500,12 +40500,12 @@ class Ecosystem extends SDKController {
|
|
|
40500
40500
|
* const dataObject = await ecosystem.fetchDataObject("exampleAppPublicKey", "exampleAppPublicKeyJWT");
|
|
40501
40501
|
* ```
|
|
40502
40502
|
*/
|
|
40503
|
-
fetchDataObject(appPublicKey,
|
|
40503
|
+
fetchDataObject(appPublicKey, appJWT) {
|
|
40504
40504
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40505
40505
|
try {
|
|
40506
40506
|
let query = "";
|
|
40507
40507
|
if (appPublicKey)
|
|
40508
|
-
query = `?appPublicKey=${appPublicKey}&
|
|
40508
|
+
query = `?appPublicKey=${appPublicKey}&appJWT=${appJWT}`;
|
|
40509
40509
|
const response = yield this.topiaPublicApi().get(`/ecosystem/data-object${query}`, this.requestOptions);
|
|
40510
40510
|
this.dataObject = response.data;
|
|
40511
40511
|
return response.data;
|
|
@@ -40524,8 +40524,8 @@ class Ecosystem extends SDKController {
|
|
|
40524
40524
|
* @usage
|
|
40525
40525
|
* ```ts
|
|
40526
40526
|
* await ecosystem.setDataObject({ "exampleKey": "exampleValue" }, {
|
|
40527
|
-
*
|
|
40528
|
-
*
|
|
40527
|
+
* sharedAppPublicKey: "exampleAppPublicKey",
|
|
40528
|
+
* sharedAppJWT: "exampleAppPublicKeyJWT",}
|
|
40529
40529
|
* });
|
|
40530
40530
|
* ```
|
|
40531
40531
|
*/
|
|
@@ -40549,8 +40549,8 @@ class Ecosystem extends SDKController {
|
|
|
40549
40549
|
* @usage
|
|
40550
40550
|
* ```ts
|
|
40551
40551
|
* await ecosystem.updateDataObject({ "exampleKey": "exampleValue" }, {
|
|
40552
|
-
*
|
|
40553
|
-
*
|
|
40552
|
+
* sharedAppPublicKey: "exampleAppPublicKey",
|
|
40553
|
+
* sharedAppJWT: "exampleAppPublicKeyJWT",}
|
|
40554
40554
|
* });
|
|
40555
40555
|
* ```
|
|
40556
40556
|
*/
|
|
@@ -40574,8 +40574,8 @@ class Ecosystem extends SDKController {
|
|
|
40574
40574
|
* @usage
|
|
40575
40575
|
* ```ts
|
|
40576
40576
|
* await ecosystem.incrementDataObjectValue("key", 1, {
|
|
40577
|
-
*
|
|
40578
|
-
*
|
|
40577
|
+
* sharedAppPublicKey: "exampleAppPublicKey",
|
|
40578
|
+
* sharedAppJWT: "exampleAppPublicKeyJWT",}
|
|
40579
40579
|
* });
|
|
40580
40580
|
* ```
|
|
40581
40581
|
*/
|
|
@@ -40703,11 +40703,11 @@ class World extends SDKController {
|
|
|
40703
40703
|
* const { dataObject } = world;
|
|
40704
40704
|
* ```
|
|
40705
40705
|
*/
|
|
40706
|
-
this.fetchDataObject = (appPublicKey,
|
|
40706
|
+
this.fetchDataObject = (appPublicKey, appJWT) => __awaiter(this, void 0, void 0, function* () {
|
|
40707
40707
|
try {
|
|
40708
40708
|
let query = "";
|
|
40709
40709
|
if (appPublicKey)
|
|
40710
|
-
query = `?appPublicKey=${appPublicKey}&
|
|
40710
|
+
query = `?appPublicKey=${appPublicKey}&appJWT=${appJWT}`;
|
|
40711
40711
|
const response = yield this.topiaPublicApi().get(`/world/${this.urlSlug}/get-data-object${query}`, this.requestOptions);
|
|
40712
40712
|
this.dataObject = response.data;
|
|
40713
40713
|
return response.data;
|
|
@@ -41843,14 +41843,14 @@ class User extends SDKController {
|
|
|
41843
41843
|
* const dataObject = await user.fetchDataObject();
|
|
41844
41844
|
* ```
|
|
41845
41845
|
*/
|
|
41846
|
-
fetchDataObject(appPublicKey,
|
|
41846
|
+
fetchDataObject(appPublicKey, appJWT) {
|
|
41847
41847
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41848
41848
|
try {
|
|
41849
41849
|
if (!this.profileId)
|
|
41850
41850
|
throw "This method requires the use of a profileId";
|
|
41851
41851
|
let query = "";
|
|
41852
41852
|
if (appPublicKey)
|
|
41853
|
-
query = `?appPublicKey=${appPublicKey}&
|
|
41853
|
+
query = `?appPublicKey=${appPublicKey}&appJWT=${appJWT}`;
|
|
41854
41854
|
const response = yield this.topiaPublicApi().get(`/user/dataObjects/${this.profileId}/get-data-object${query}`, this.requestOptions);
|
|
41855
41855
|
this.dataObject = response.data;
|
|
41856
41856
|
return response.data;
|
|
@@ -42243,12 +42243,12 @@ class Visitor extends User {
|
|
|
42243
42243
|
* const dataObject = await visitor.fetchDataObject();
|
|
42244
42244
|
* ```
|
|
42245
42245
|
*/
|
|
42246
|
-
fetchDataObject(appPublicKey,
|
|
42246
|
+
fetchDataObject(appPublicKey, appJWT) {
|
|
42247
42247
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42248
42248
|
try {
|
|
42249
42249
|
let query = "";
|
|
42250
42250
|
if (appPublicKey)
|
|
42251
|
-
query = `?appPublicKey=${appPublicKey}&
|
|
42251
|
+
query = `?appPublicKey=${appPublicKey}&appJWT=${appJWT}`;
|
|
42252
42252
|
const response = yield this.topiaPublicApi().get(`/world/${this.urlSlug}/visitors/${this.id}/get-data-object${query}`, this.requestOptions);
|
|
42253
42253
|
this.dataObject = response.data;
|
|
42254
42254
|
return response.data;
|
package/package.json
CHANGED