@rtsdk/topia 0.6.0 → 0.6.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 +39 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +39 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -39714,7 +39714,15 @@ class SDKController {
|
|
|
39714
39714
|
*/
|
|
39715
39715
|
class Asset extends SDKController {
|
|
39716
39716
|
constructor(topia, id, options = { attributes: {}, credentials: {} }) {
|
|
39717
|
-
|
|
39717
|
+
var _a, _b, _c, _d, _e;
|
|
39718
|
+
// assetId and urlSlug should only be used when Asset is extended by DroppedAsset
|
|
39719
|
+
super(topia, {
|
|
39720
|
+
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
39721
|
+
assetId: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.assetId,
|
|
39722
|
+
interactiveNonce: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.interactiveNonce,
|
|
39723
|
+
urlSlug: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.urlSlug,
|
|
39724
|
+
visitorId: (_e = options === null || options === void 0 ? void 0 : options.credentials) === null || _e === void 0 ? void 0 : _e.visitorId,
|
|
39725
|
+
});
|
|
39718
39726
|
this.id = id;
|
|
39719
39727
|
Object.assign(this, options.attributes);
|
|
39720
39728
|
}
|
|
@@ -39744,7 +39752,7 @@ var _DroppedAsset_updateDroppedAsset;
|
|
|
39744
39752
|
class DroppedAsset extends Asset {
|
|
39745
39753
|
constructor(topia, id, urlSlug, options = { attributes: { text: "" }, credentials: {} }) {
|
|
39746
39754
|
var _a;
|
|
39747
|
-
super(topia, id, { attributes: options.attributes, credentials: Object.assign(Object.assign({}, options.credentials), { urlSlug }) });
|
|
39755
|
+
super(topia, id, { attributes: options.attributes, credentials: Object.assign(Object.assign({}, options.credentials), { assetId: id, urlSlug }) });
|
|
39748
39756
|
// private methods
|
|
39749
39757
|
_DroppedAsset_updateDroppedAsset.set(this, (payload, updateType) => __awaiter(this, void 0, void 0, function* () {
|
|
39750
39758
|
try {
|
|
@@ -40262,7 +40270,13 @@ _DroppedAsset_updateDroppedAsset = new WeakMap();
|
|
|
40262
40270
|
*/
|
|
40263
40271
|
class Scene extends SDKController {
|
|
40264
40272
|
constructor(topia, id, options = { attributes: {}, credentials: {} }) {
|
|
40265
|
-
|
|
40273
|
+
var _a, _b, _c, _d;
|
|
40274
|
+
super(topia, {
|
|
40275
|
+
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
40276
|
+
interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
|
|
40277
|
+
urlSlug: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug,
|
|
40278
|
+
visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
|
|
40279
|
+
});
|
|
40266
40280
|
this.id = id;
|
|
40267
40281
|
Object.assign(this, options.attributes);
|
|
40268
40282
|
}
|
|
@@ -40318,7 +40332,13 @@ var _World_droppedAssetsMap;
|
|
|
40318
40332
|
*/
|
|
40319
40333
|
class World extends SDKController {
|
|
40320
40334
|
constructor(topia, urlSlug, options = { attributes: {}, credentials: {} }) {
|
|
40321
|
-
|
|
40335
|
+
var _a, _b, _c;
|
|
40336
|
+
super(topia, {
|
|
40337
|
+
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
40338
|
+
interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
|
|
40339
|
+
urlSlug,
|
|
40340
|
+
visitorId: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.visitorId,
|
|
40341
|
+
});
|
|
40322
40342
|
_World_droppedAssetsMap.set(this, void 0);
|
|
40323
40343
|
////////// data objects
|
|
40324
40344
|
/**
|
|
@@ -40824,7 +40844,14 @@ var _User_adminWorldsMap, _User_assetsMap, _User_scenesMap, _User_worldsMap;
|
|
|
40824
40844
|
*/
|
|
40825
40845
|
class User extends SDKController {
|
|
40826
40846
|
constructor(topia, options = { profileId: null, credentials: {} }) {
|
|
40827
|
-
|
|
40847
|
+
var _a, _b, _c, _d;
|
|
40848
|
+
super(topia, {
|
|
40849
|
+
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
40850
|
+
interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
|
|
40851
|
+
profileId: options.profileId,
|
|
40852
|
+
urlSlug: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug,
|
|
40853
|
+
visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
|
|
40854
|
+
});
|
|
40828
40855
|
_User_adminWorldsMap.set(this, void 0);
|
|
40829
40856
|
_User_assetsMap.set(this, void 0);
|
|
40830
40857
|
_User_scenesMap.set(this, void 0);
|
|
@@ -41426,7 +41453,13 @@ var _WorldActivity_visitorsMap;
|
|
|
41426
41453
|
*/
|
|
41427
41454
|
class WorldActivity extends SDKController {
|
|
41428
41455
|
constructor(topia, urlSlug, options = { credentials: {} }) {
|
|
41429
|
-
|
|
41456
|
+
var _a, _b, _c;
|
|
41457
|
+
super(topia, {
|
|
41458
|
+
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
41459
|
+
interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
|
|
41460
|
+
urlSlug,
|
|
41461
|
+
visitorId: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.visitorId,
|
|
41462
|
+
});
|
|
41430
41463
|
_WorldActivity_visitorsMap.set(this, void 0);
|
|
41431
41464
|
this.urlSlug = urlSlug;
|
|
41432
41465
|
__classPrivateFieldSet(this, _WorldActivity_visitorsMap, {}, "f");
|
package/dist/index.d.ts
CHANGED
|
@@ -1085,7 +1085,7 @@ interface AssetInterface extends SDKInterface {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
type AssetOptionalInterface = {
|
|
1087
1087
|
attributes?: AssetInterface | object;
|
|
1088
|
-
credentials?: InteractiveCredentials
|
|
1088
|
+
credentials?: InteractiveCredentials;
|
|
1089
1089
|
};
|
|
1090
1090
|
|
|
1091
1091
|
interface DroppedAssetInterface extends AssetInterface {
|
|
@@ -1246,7 +1246,7 @@ interface SceneInterface {
|
|
|
1246
1246
|
}
|
|
1247
1247
|
type SceneOptionalInterface = {
|
|
1248
1248
|
attributes?: SceneInterface | object;
|
|
1249
|
-
credentials?: InteractiveCredentials
|
|
1249
|
+
credentials?: InteractiveCredentials;
|
|
1250
1250
|
};
|
|
1251
1251
|
|
|
1252
1252
|
interface TopiaInterface {
|
|
@@ -1268,7 +1268,7 @@ interface UserInterface {
|
|
|
1268
1268
|
dataObject?: object | null;
|
|
1269
1269
|
}
|
|
1270
1270
|
interface UserOptionalInterface {
|
|
1271
|
-
credentials?: InteractiveCredentials
|
|
1271
|
+
credentials?: InteractiveCredentials;
|
|
1272
1272
|
profileId?: string | null;
|
|
1273
1273
|
visitorId?: number | null;
|
|
1274
1274
|
urlSlug?: string;
|
|
@@ -1311,7 +1311,7 @@ interface VisitorInterface extends SDKInterface {
|
|
|
1311
1311
|
}
|
|
1312
1312
|
interface VisitorOptionalInterface {
|
|
1313
1313
|
attributes?: VisitorInterface | object;
|
|
1314
|
-
credentials?: InteractiveCredentials
|
|
1314
|
+
credentials?: InteractiveCredentials;
|
|
1315
1315
|
}
|
|
1316
1316
|
interface MoveVisitorInterface {
|
|
1317
1317
|
shouldTeleportVisitor: boolean;
|
|
@@ -1346,7 +1346,7 @@ interface WebhookInterface {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
|
|
1348
1348
|
interface WorldActivityOptionalInterface {
|
|
1349
|
-
credentials?: InteractiveCredentials
|
|
1349
|
+
credentials?: InteractiveCredentials;
|
|
1350
1350
|
}
|
|
1351
1351
|
interface MoveAllVisitorsInterface {
|
|
1352
1352
|
shouldFetchVisitors?: boolean;
|
|
@@ -1405,7 +1405,7 @@ interface WorldInterface extends SDKInterface, WorldDetailsInterface {
|
|
|
1405
1405
|
}
|
|
1406
1406
|
interface WorldOptionalInterface {
|
|
1407
1407
|
attributes?: WorldDetailsInterface | object;
|
|
1408
|
-
credentials?: InteractiveCredentials
|
|
1408
|
+
credentials?: InteractiveCredentials;
|
|
1409
1409
|
}
|
|
1410
1410
|
interface WorldWebhooksInterface {
|
|
1411
1411
|
webhooks: Array<WebhookInterface>;
|
package/dist/index.js
CHANGED
|
@@ -39712,7 +39712,15 @@ class SDKController {
|
|
|
39712
39712
|
*/
|
|
39713
39713
|
class Asset extends SDKController {
|
|
39714
39714
|
constructor(topia, id, options = { attributes: {}, credentials: {} }) {
|
|
39715
|
-
|
|
39715
|
+
var _a, _b, _c, _d, _e;
|
|
39716
|
+
// assetId and urlSlug should only be used when Asset is extended by DroppedAsset
|
|
39717
|
+
super(topia, {
|
|
39718
|
+
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
39719
|
+
assetId: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.assetId,
|
|
39720
|
+
interactiveNonce: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.interactiveNonce,
|
|
39721
|
+
urlSlug: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.urlSlug,
|
|
39722
|
+
visitorId: (_e = options === null || options === void 0 ? void 0 : options.credentials) === null || _e === void 0 ? void 0 : _e.visitorId,
|
|
39723
|
+
});
|
|
39716
39724
|
this.id = id;
|
|
39717
39725
|
Object.assign(this, options.attributes);
|
|
39718
39726
|
}
|
|
@@ -39742,7 +39750,7 @@ var _DroppedAsset_updateDroppedAsset;
|
|
|
39742
39750
|
class DroppedAsset extends Asset {
|
|
39743
39751
|
constructor(topia, id, urlSlug, options = { attributes: { text: "" }, credentials: {} }) {
|
|
39744
39752
|
var _a;
|
|
39745
|
-
super(topia, id, { attributes: options.attributes, credentials: Object.assign(Object.assign({}, options.credentials), { urlSlug }) });
|
|
39753
|
+
super(topia, id, { attributes: options.attributes, credentials: Object.assign(Object.assign({}, options.credentials), { assetId: id, urlSlug }) });
|
|
39746
39754
|
// private methods
|
|
39747
39755
|
_DroppedAsset_updateDroppedAsset.set(this, (payload, updateType) => __awaiter(this, void 0, void 0, function* () {
|
|
39748
39756
|
try {
|
|
@@ -40260,7 +40268,13 @@ _DroppedAsset_updateDroppedAsset = new WeakMap();
|
|
|
40260
40268
|
*/
|
|
40261
40269
|
class Scene extends SDKController {
|
|
40262
40270
|
constructor(topia, id, options = { attributes: {}, credentials: {} }) {
|
|
40263
|
-
|
|
40271
|
+
var _a, _b, _c, _d;
|
|
40272
|
+
super(topia, {
|
|
40273
|
+
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
40274
|
+
interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
|
|
40275
|
+
urlSlug: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug,
|
|
40276
|
+
visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
|
|
40277
|
+
});
|
|
40264
40278
|
this.id = id;
|
|
40265
40279
|
Object.assign(this, options.attributes);
|
|
40266
40280
|
}
|
|
@@ -40316,7 +40330,13 @@ var _World_droppedAssetsMap;
|
|
|
40316
40330
|
*/
|
|
40317
40331
|
class World extends SDKController {
|
|
40318
40332
|
constructor(topia, urlSlug, options = { attributes: {}, credentials: {} }) {
|
|
40319
|
-
|
|
40333
|
+
var _a, _b, _c;
|
|
40334
|
+
super(topia, {
|
|
40335
|
+
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
40336
|
+
interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
|
|
40337
|
+
urlSlug,
|
|
40338
|
+
visitorId: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.visitorId,
|
|
40339
|
+
});
|
|
40320
40340
|
_World_droppedAssetsMap.set(this, void 0);
|
|
40321
40341
|
////////// data objects
|
|
40322
40342
|
/**
|
|
@@ -40822,7 +40842,14 @@ var _User_adminWorldsMap, _User_assetsMap, _User_scenesMap, _User_worldsMap;
|
|
|
40822
40842
|
*/
|
|
40823
40843
|
class User extends SDKController {
|
|
40824
40844
|
constructor(topia, options = { profileId: null, credentials: {} }) {
|
|
40825
|
-
|
|
40845
|
+
var _a, _b, _c, _d;
|
|
40846
|
+
super(topia, {
|
|
40847
|
+
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
40848
|
+
interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
|
|
40849
|
+
profileId: options.profileId,
|
|
40850
|
+
urlSlug: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.urlSlug,
|
|
40851
|
+
visitorId: (_d = options === null || options === void 0 ? void 0 : options.credentials) === null || _d === void 0 ? void 0 : _d.visitorId,
|
|
40852
|
+
});
|
|
40826
40853
|
_User_adminWorldsMap.set(this, void 0);
|
|
40827
40854
|
_User_assetsMap.set(this, void 0);
|
|
40828
40855
|
_User_scenesMap.set(this, void 0);
|
|
@@ -41424,7 +41451,13 @@ var _WorldActivity_visitorsMap;
|
|
|
41424
41451
|
*/
|
|
41425
41452
|
class WorldActivity extends SDKController {
|
|
41426
41453
|
constructor(topia, urlSlug, options = { credentials: {} }) {
|
|
41427
|
-
|
|
41454
|
+
var _a, _b, _c;
|
|
41455
|
+
super(topia, {
|
|
41456
|
+
apiKey: (_a = options === null || options === void 0 ? void 0 : options.credentials) === null || _a === void 0 ? void 0 : _a.apiKey,
|
|
41457
|
+
interactiveNonce: (_b = options === null || options === void 0 ? void 0 : options.credentials) === null || _b === void 0 ? void 0 : _b.interactiveNonce,
|
|
41458
|
+
urlSlug,
|
|
41459
|
+
visitorId: (_c = options === null || options === void 0 ? void 0 : options.credentials) === null || _c === void 0 ? void 0 : _c.visitorId,
|
|
41460
|
+
});
|
|
41428
41461
|
_WorldActivity_visitorsMap.set(this, void 0);
|
|
41429
41462
|
this.urlSlug = urlSlug;
|
|
41430
41463
|
__classPrivateFieldSet(this, _WorldActivity_visitorsMap, {}, "f");
|
package/package.json
CHANGED