@rtsdk/topia 0.1.0 → 0.1.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 +0 -13
- package/dist/index.js +1 -14
- package/dist/types/example.d.ts +6 -0
- package/dist/types/src/__mocks__/assets.d.ts +99 -0
- package/dist/{src/__mocks__/index.js → types/src/__mocks__/index.d.ts} +4 -4
- package/dist/types/src/__mocks__/scenes.d.ts +79 -0
- package/dist/types/src/__mocks__/visitors.d.ts +83 -0
- package/dist/types/src/__mocks__/worlds.d.ts +73 -0
- package/dist/types/src/controllers/Asset.d.ts +20 -0
- package/dist/types/src/controllers/DroppedAsset.d.ts +285 -0
- package/dist/types/src/controllers/SDKController.d.ts +48 -0
- package/dist/types/src/controllers/Scene.d.ts +19 -0
- package/dist/types/src/controllers/Topia.d.ts +33 -0
- package/dist/types/src/controllers/User.d.ts +58 -0
- package/dist/types/src/controllers/Visitor.d.ts +50 -0
- package/dist/types/src/controllers/World.d.ts +143 -0
- package/dist/types/src/controllers/WorldActivity.d.ts +83 -0
- package/dist/{src/interfaces/AssetInterfaces.js → types/src/controllers/__tests__/asset.test.d.ts} +1 -1
- package/dist/{src/interfaces/DroppedAssetInterfaces.js → types/src/controllers/__tests__/droppedAsset.test.d.ts} +1 -1
- package/dist/{src/interfaces/SDKInterfaces.js → types/src/controllers/__tests__/scene.test.d.ts} +1 -1
- package/dist/{src/interfaces/SceneInterfaces.js → types/src/controllers/__tests__/user.test.d.ts} +1 -1
- package/dist/types/src/controllers/__tests__/visitor.test.d.ts +1 -0
- package/dist/types/src/controllers/__tests__/world.test.d.ts +1 -0
- package/dist/types/src/controllers/__tests__/worldActivity.test.d.ts +1 -0
- package/dist/{src/controllers/index.js → types/src/controllers/index.d.ts} +9 -9
- package/dist/types/src/factories/AssetFactory.d.ts +8 -0
- package/dist/types/src/factories/DroppedAssetFactory.d.ts +16 -0
- package/dist/types/src/factories/SceneFactory.d.ts +9 -0
- package/dist/types/src/factories/UserFactory.d.ts +8 -0
- package/dist/types/src/factories/VisitorFactory.d.ts +9 -0
- package/dist/types/src/factories/WorldActivityFactory.d.ts +8 -0
- package/dist/types/src/factories/WorldFactory.d.ts +8 -0
- package/dist/{src/factories/index.js → types/src/factories/index.d.ts} +7 -7
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/interfaces/AssetInterfaces.d.ts +26 -0
- package/dist/types/src/interfaces/DroppedAssetInterfaces.d.ts +102 -0
- package/dist/types/src/interfaces/SDKInterfaces.d.ts +8 -0
- package/dist/types/src/interfaces/SceneInterfaces.d.ts +27 -0
- package/dist/types/src/interfaces/TopiaInterfaces.d.ts +10 -0
- package/dist/types/src/interfaces/UserInterfaces.d.ts +6 -0
- package/dist/types/src/interfaces/VisitorInterfaces.d.ts +37 -0
- package/dist/types/src/interfaces/WorldActivityInterfaces.d.ts +11 -0
- package/dist/types/src/interfaces/WorldInterfaces.d.ts +32 -0
- package/dist/{src/interfaces/index.js → types/src/interfaces/index.d.ts} +9 -9
- package/dist/types/src/types/DroppedAssetTypes.d.ts +10 -0
- package/dist/types/src/types/InteractiveCredentialsTypes.d.ts +8 -0
- package/dist/types/src/types/OptionsTypes.d.ts +21 -0
- package/dist/types/src/types/ResponseTypes.d.ts +4 -0
- package/dist/types/src/types/VisitorTypes.d.ts +33 -0
- package/dist/{src/types/index.js → types/src/types/index.d.ts} +5 -4
- package/dist/types/src/utils/__tests__/removeUndefined.test.d.ts +1 -0
- package/dist/types/src/utils/__tests__/scatterVisitors.test.d.ts +1 -0
- package/dist/types/src/utils/getBrowserWarning.d.ts +1 -0
- package/dist/{src/utils/index.js → types/src/utils/index.d.ts} +3 -3
- package/dist/types/src/utils/removeUndefined.d.ts +8 -0
- package/dist/types/src/utils/scatterVisitors.d.ts +4 -0
- package/package.json +3 -2
- package/dist/example.js +0 -32
- package/dist/src/__mocks__/assets.js +0 -249
- package/dist/src/__mocks__/scenes.js +0 -104
- package/dist/src/__mocks__/visitors.js +0 -83
- package/dist/src/__mocks__/worlds.js +0 -52
- package/dist/src/controllers/Asset.js +0 -39
- package/dist/src/controllers/DroppedAsset.js +0 -461
- package/dist/src/controllers/SDKController.js +0 -85
- package/dist/src/controllers/Scene.js +0 -39
- package/dist/src/controllers/Topia.js +0 -39
- package/dist/src/controllers/User.js +0 -139
- package/dist/src/controllers/Visitor.js +0 -92
- package/dist/src/controllers/World.js +0 -256
- package/dist/src/controllers/WorldActivity.js +0 -162
- package/dist/src/controllers/__tests__/asset.test.js +0 -37
- package/dist/src/controllers/__tests__/droppedAsset.test.js +0 -98
- package/dist/src/controllers/__tests__/scene.test.js +0 -38
- package/dist/src/controllers/__tests__/user.test.js +0 -49
- package/dist/src/controllers/__tests__/visitor.test.js +0 -47
- package/dist/src/controllers/__tests__/world.test.js +0 -51
- package/dist/src/controllers/__tests__/worldActivity.test.js +0 -63
- package/dist/src/factories/AssetFactory.js +0 -11
- package/dist/src/factories/DroppedAssetFactory.js +0 -42
- package/dist/src/factories/SceneFactory.js +0 -27
- package/dist/src/factories/UserFactory.js +0 -10
- package/dist/src/factories/VisitorFactory.js +0 -26
- package/dist/src/factories/WorldActivityFactory.js +0 -10
- package/dist/src/factories/WorldFactory.js +0 -10
- package/dist/src/index.js +0 -28
- package/dist/src/interfaces/TopiaInterfaces.js +0 -1
- package/dist/src/interfaces/UserInterfaces.js +0 -1
- package/dist/src/interfaces/VisitorInterfaces.js +0 -1
- package/dist/src/interfaces/WorldActivityInterfaces.js +0 -1
- package/dist/src/interfaces/WorldInterfaces.js +0 -1
- package/dist/src/types/DroppedAssetTypes.js +0 -12
- package/dist/src/types/InteractiveCredentialsTypes.js +0 -1
- package/dist/src/types/OptionsTypes.js +0 -1
- package/dist/src/types/ResponseTypes.js +0 -1
- package/dist/src/types/VisitorTypes.js +0 -1
- package/dist/src/utils/__tests__/removeUndefined.test.js +0 -10
- package/dist/src/utils/__tests__/scatterVisitors.test.js +0 -11
- package/dist/src/utils/getBrowserWarning.js +0 -5
- package/dist/src/utils/removeUndefined.js +0 -11
- package/dist/src/utils/scatterVisitors.js +0 -8
package/dist/index.cjs
CHANGED
|
@@ -41039,19 +41039,6 @@ class WorldFactory {
|
|
|
41039
41039
|
}
|
|
41040
41040
|
}
|
|
41041
41041
|
|
|
41042
|
-
exports.DroppedAssetClickType = void 0;
|
|
41043
|
-
(function (DroppedAssetClickType) {
|
|
41044
|
-
DroppedAssetClickType["NONE"] = "none";
|
|
41045
|
-
DroppedAssetClickType["LINK"] = "link";
|
|
41046
|
-
DroppedAssetClickType["PORTAL"] = "portal";
|
|
41047
|
-
DroppedAssetClickType["TELEPORT"] = "teleport";
|
|
41048
|
-
})(exports.DroppedAssetClickType || (exports.DroppedAssetClickType = {}));
|
|
41049
|
-
exports.DroppedAssetMediaType = void 0;
|
|
41050
|
-
(function (DroppedAssetMediaType) {
|
|
41051
|
-
DroppedAssetMediaType["NONE"] = "none";
|
|
41052
|
-
DroppedAssetMediaType["LINK"] = "link";
|
|
41053
|
-
})(exports.DroppedAssetMediaType || (exports.DroppedAssetMediaType = {}));
|
|
41054
|
-
|
|
41055
41042
|
Error.stackTraceLimit = 20;
|
|
41056
41043
|
process.on("unhandledRejection", (reason) => {
|
|
41057
41044
|
if (reason && reason.data) {
|
package/dist/index.js
CHANGED
|
@@ -41037,19 +41037,6 @@ class WorldFactory {
|
|
|
41037
41037
|
}
|
|
41038
41038
|
}
|
|
41039
41039
|
|
|
41040
|
-
var DroppedAssetClickType;
|
|
41041
|
-
(function (DroppedAssetClickType) {
|
|
41042
|
-
DroppedAssetClickType["NONE"] = "none";
|
|
41043
|
-
DroppedAssetClickType["LINK"] = "link";
|
|
41044
|
-
DroppedAssetClickType["PORTAL"] = "portal";
|
|
41045
|
-
DroppedAssetClickType["TELEPORT"] = "teleport";
|
|
41046
|
-
})(DroppedAssetClickType || (DroppedAssetClickType = {}));
|
|
41047
|
-
var DroppedAssetMediaType;
|
|
41048
|
-
(function (DroppedAssetMediaType) {
|
|
41049
|
-
DroppedAssetMediaType["NONE"] = "none";
|
|
41050
|
-
DroppedAssetMediaType["LINK"] = "link";
|
|
41051
|
-
})(DroppedAssetMediaType || (DroppedAssetMediaType = {}));
|
|
41052
|
-
|
|
41053
41040
|
Error.stackTraceLimit = 20;
|
|
41054
41041
|
process.on("unhandledRejection", (reason) => {
|
|
41055
41042
|
if (reason && reason.data) {
|
|
@@ -41076,4 +41063,4 @@ process.on("uncaughtException", function (err) {
|
|
|
41076
41063
|
process.exit(1);
|
|
41077
41064
|
});
|
|
41078
41065
|
|
|
41079
|
-
export { AssetFactory,
|
|
41066
|
+
export { AssetFactory, DroppedAssetFactory, SceneFactory, Topia, UserFactory, VisitorFactory, WorldActivityFactory, WorldFactory };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export declare const assets: ({
|
|
2
|
+
id: string;
|
|
3
|
+
addedOn: string;
|
|
4
|
+
assetName: string;
|
|
5
|
+
specialType: null;
|
|
6
|
+
topLayerURL: string;
|
|
7
|
+
bottomLayerURL: string;
|
|
8
|
+
creatorTags?: undefined;
|
|
9
|
+
isPublic?: undefined;
|
|
10
|
+
kitId?: undefined;
|
|
11
|
+
layer0?: undefined;
|
|
12
|
+
layer1?: undefined;
|
|
13
|
+
library?: undefined;
|
|
14
|
+
originalAssetId?: undefined;
|
|
15
|
+
originalKit?: undefined;
|
|
16
|
+
ownerId?: undefined;
|
|
17
|
+
ownerName?: undefined;
|
|
18
|
+
purchased?: undefined;
|
|
19
|
+
purchasedDate?: undefined;
|
|
20
|
+
purchasedFrom?: undefined;
|
|
21
|
+
tagJson?: undefined;
|
|
22
|
+
transactionId?: undefined;
|
|
23
|
+
type?: undefined;
|
|
24
|
+
urlSlug?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
addedOn: string;
|
|
27
|
+
assetName: string;
|
|
28
|
+
creatorTags: {};
|
|
29
|
+
isPublic: boolean;
|
|
30
|
+
kitId: string;
|
|
31
|
+
layer0: null;
|
|
32
|
+
layer1: string;
|
|
33
|
+
library: string;
|
|
34
|
+
originalAssetId: string;
|
|
35
|
+
originalKit: string;
|
|
36
|
+
ownerId: string;
|
|
37
|
+
ownerName: string;
|
|
38
|
+
purchased: boolean;
|
|
39
|
+
purchasedDate: string;
|
|
40
|
+
purchasedFrom: string;
|
|
41
|
+
tagJson: string;
|
|
42
|
+
transactionId: string;
|
|
43
|
+
type: string;
|
|
44
|
+
urlSlug: string;
|
|
45
|
+
id?: undefined;
|
|
46
|
+
specialType?: undefined;
|
|
47
|
+
topLayerURL?: undefined;
|
|
48
|
+
bottomLayerURL?: undefined;
|
|
49
|
+
})[];
|
|
50
|
+
export declare const droppedAssets: {
|
|
51
|
+
id: string;
|
|
52
|
+
assetId: string;
|
|
53
|
+
assetName: string;
|
|
54
|
+
assetScale: number;
|
|
55
|
+
assetBroadcastAll: boolean;
|
|
56
|
+
assetBroadcast: boolean;
|
|
57
|
+
audioRadius: null;
|
|
58
|
+
audioSliderVolume: null;
|
|
59
|
+
isPrivateZone: boolean;
|
|
60
|
+
isPrivateZoneChatDisabled: boolean;
|
|
61
|
+
privateZoneUserCap: null;
|
|
62
|
+
broadcasterEmail: null;
|
|
63
|
+
clickType: null;
|
|
64
|
+
clickableLink: null;
|
|
65
|
+
clickableLinkTitle: null;
|
|
66
|
+
clickablePortal: null;
|
|
67
|
+
creationDatetime: number;
|
|
68
|
+
clickableDisplayTextDescription: null;
|
|
69
|
+
clickableDisplayTextHeadline: null;
|
|
70
|
+
position: {
|
|
71
|
+
x: number;
|
|
72
|
+
y: number;
|
|
73
|
+
};
|
|
74
|
+
portalCoordsX: null;
|
|
75
|
+
portalCoordsY: null;
|
|
76
|
+
specialType: null;
|
|
77
|
+
topLayerURL: string;
|
|
78
|
+
bottomLayerURL: string;
|
|
79
|
+
text: null;
|
|
80
|
+
textStyle: {
|
|
81
|
+
textColor: string;
|
|
82
|
+
textSize: number;
|
|
83
|
+
textWidth: number;
|
|
84
|
+
textWeight: string;
|
|
85
|
+
textFont: string;
|
|
86
|
+
textFontFamily: string;
|
|
87
|
+
};
|
|
88
|
+
teleportX: null;
|
|
89
|
+
teleportY: null;
|
|
90
|
+
syncUserMedia: null;
|
|
91
|
+
mediaLink: null;
|
|
92
|
+
mediaType: null;
|
|
93
|
+
mediaUploadedId: null;
|
|
94
|
+
mediaName: null;
|
|
95
|
+
isMutezone: null;
|
|
96
|
+
isVideo: null;
|
|
97
|
+
isVideoPlayer: null;
|
|
98
|
+
uniqueName: null;
|
|
99
|
+
}[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./assets";
|
|
2
|
-
export * from "./scenes";
|
|
3
|
-
export * from "./visitors";
|
|
4
|
-
export * from "./worlds";
|
|
1
|
+
export * from "./assets";
|
|
2
|
+
export * from "./scenes";
|
|
3
|
+
export * from "./visitors";
|
|
4
|
+
export * from "./worlds";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export declare const scenes: ({
|
|
2
|
+
description: string;
|
|
3
|
+
height: number;
|
|
4
|
+
name: string;
|
|
5
|
+
urlSlug: string;
|
|
6
|
+
purchasedDate: {
|
|
7
|
+
_seconds: number;
|
|
8
|
+
_nanoseconds: number;
|
|
9
|
+
};
|
|
10
|
+
background: string;
|
|
11
|
+
spawnPosition: {
|
|
12
|
+
radius: number;
|
|
13
|
+
y: number;
|
|
14
|
+
x: number;
|
|
15
|
+
};
|
|
16
|
+
worldCenteredAtZero: boolean;
|
|
17
|
+
width: number;
|
|
18
|
+
price: string;
|
|
19
|
+
originalKit: string;
|
|
20
|
+
isPublic: boolean;
|
|
21
|
+
created: {
|
|
22
|
+
_seconds: number;
|
|
23
|
+
_nanoseconds: number;
|
|
24
|
+
};
|
|
25
|
+
id: string;
|
|
26
|
+
timesGetFree?: undefined;
|
|
27
|
+
timesUsed?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
background: null;
|
|
30
|
+
description: string;
|
|
31
|
+
price: number;
|
|
32
|
+
height: number;
|
|
33
|
+
urlSlug: string;
|
|
34
|
+
originalKit: string;
|
|
35
|
+
worldCenteredAtZero: boolean;
|
|
36
|
+
spawnPosition: {
|
|
37
|
+
x: number;
|
|
38
|
+
radius: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
41
|
+
timesGetFree: number;
|
|
42
|
+
isPublic: boolean;
|
|
43
|
+
timesUsed: number;
|
|
44
|
+
created: {
|
|
45
|
+
_seconds: number;
|
|
46
|
+
_nanoseconds: number;
|
|
47
|
+
};
|
|
48
|
+
purchasedDate: {
|
|
49
|
+
_seconds: number;
|
|
50
|
+
_nanoseconds: number;
|
|
51
|
+
};
|
|
52
|
+
name: string;
|
|
53
|
+
width: number;
|
|
54
|
+
id: string;
|
|
55
|
+
} | {
|
|
56
|
+
background: string;
|
|
57
|
+
name: string;
|
|
58
|
+
timesUsed: number;
|
|
59
|
+
height: number;
|
|
60
|
+
spawnPosition: {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
radius: number;
|
|
64
|
+
};
|
|
65
|
+
price: number;
|
|
66
|
+
urlSlug: string;
|
|
67
|
+
created: {
|
|
68
|
+
_seconds: number;
|
|
69
|
+
_nanoseconds: number;
|
|
70
|
+
};
|
|
71
|
+
description: string;
|
|
72
|
+
width: number;
|
|
73
|
+
id: string;
|
|
74
|
+
purchasedDate?: undefined;
|
|
75
|
+
worldCenteredAtZero?: undefined;
|
|
76
|
+
originalKit?: undefined;
|
|
77
|
+
isPublic?: undefined;
|
|
78
|
+
timesGetFree?: undefined;
|
|
79
|
+
})[];
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export declare const visitor: {
|
|
2
|
+
visitorId: number;
|
|
3
|
+
color: string;
|
|
4
|
+
moveTo: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
moveFrom: {};
|
|
9
|
+
username: string;
|
|
10
|
+
sitting: boolean;
|
|
11
|
+
gestureType: number;
|
|
12
|
+
performer: boolean;
|
|
13
|
+
performerNear: boolean;
|
|
14
|
+
shareScreen: boolean;
|
|
15
|
+
isBackground: boolean;
|
|
16
|
+
muted: boolean;
|
|
17
|
+
hidden: boolean;
|
|
18
|
+
newId: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
movedOn: number;
|
|
21
|
+
lastUpdate: number;
|
|
22
|
+
isMobile: boolean;
|
|
23
|
+
token: string;
|
|
24
|
+
isAdmin: boolean;
|
|
25
|
+
isRecording: boolean;
|
|
26
|
+
isRecordingBot: boolean;
|
|
27
|
+
};
|
|
28
|
+
export declare const visitors: {
|
|
29
|
+
"1": {
|
|
30
|
+
visitorId: number;
|
|
31
|
+
color: string;
|
|
32
|
+
moveTo: {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
};
|
|
36
|
+
moveFrom: {};
|
|
37
|
+
username: string;
|
|
38
|
+
sitting: boolean;
|
|
39
|
+
gestureType: number;
|
|
40
|
+
performer: boolean;
|
|
41
|
+
performerNear: boolean;
|
|
42
|
+
shareScreen: boolean;
|
|
43
|
+
isBackground: boolean;
|
|
44
|
+
muted: boolean;
|
|
45
|
+
hidden: boolean;
|
|
46
|
+
newId: string;
|
|
47
|
+
displayName: string;
|
|
48
|
+
movedOn: number;
|
|
49
|
+
lastUpdate: number;
|
|
50
|
+
isMobile: boolean;
|
|
51
|
+
token: string;
|
|
52
|
+
isAdmin: boolean;
|
|
53
|
+
isRecording: boolean;
|
|
54
|
+
isRecordingBot: boolean;
|
|
55
|
+
};
|
|
56
|
+
"2": {
|
|
57
|
+
visitorId: number;
|
|
58
|
+
color: string;
|
|
59
|
+
moveTo: {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
};
|
|
63
|
+
moveFrom: {};
|
|
64
|
+
username: string;
|
|
65
|
+
sitting: boolean;
|
|
66
|
+
gestureType: number;
|
|
67
|
+
performer: boolean;
|
|
68
|
+
performerNear: boolean;
|
|
69
|
+
shareScreen: boolean;
|
|
70
|
+
isBackground: boolean;
|
|
71
|
+
muted: boolean;
|
|
72
|
+
hidden: boolean;
|
|
73
|
+
newId: string;
|
|
74
|
+
displayName: string;
|
|
75
|
+
movedOn: number;
|
|
76
|
+
lastUpdate: number;
|
|
77
|
+
isMobile: boolean;
|
|
78
|
+
token: string;
|
|
79
|
+
isAdmin: boolean;
|
|
80
|
+
isRecording: boolean;
|
|
81
|
+
isRecordingBot: boolean;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare const worlds: ({
|
|
2
|
+
description: string;
|
|
3
|
+
name: string;
|
|
4
|
+
heroImage: string;
|
|
5
|
+
urlSlug: string;
|
|
6
|
+
background?: undefined;
|
|
7
|
+
created?: undefined;
|
|
8
|
+
controls?: undefined;
|
|
9
|
+
enforceWhitelistOnLogin?: undefined;
|
|
10
|
+
forceAuthOnLogin?: undefined;
|
|
11
|
+
height?: undefined;
|
|
12
|
+
mapExists?: undefined;
|
|
13
|
+
redirectTo?: undefined;
|
|
14
|
+
spawnPosition?: undefined;
|
|
15
|
+
tileBackgroundEverywhere?: undefined;
|
|
16
|
+
useTopiaPassword?: undefined;
|
|
17
|
+
width?: undefined;
|
|
18
|
+
alt?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
background: null;
|
|
21
|
+
created: {
|
|
22
|
+
_seconds: number;
|
|
23
|
+
_nanoseconds: number;
|
|
24
|
+
};
|
|
25
|
+
controls: {
|
|
26
|
+
isShowingCurrentGuests: boolean;
|
|
27
|
+
hideShareScreen: boolean;
|
|
28
|
+
isZoneConversationHidden: boolean;
|
|
29
|
+
allowUserToTurnOnNotifications: boolean;
|
|
30
|
+
isPeerConversationHidden: boolean;
|
|
31
|
+
disableHideVideo: boolean;
|
|
32
|
+
isWorldConversationHidden: boolean;
|
|
33
|
+
allowUsersToTurnOnNotifications: boolean;
|
|
34
|
+
allowMuteAll: boolean;
|
|
35
|
+
isMobileDisabled: boolean;
|
|
36
|
+
};
|
|
37
|
+
description: string;
|
|
38
|
+
enforceWhitelistOnLogin: boolean;
|
|
39
|
+
forceAuthOnLogin: boolean;
|
|
40
|
+
height: number;
|
|
41
|
+
heroImage: string;
|
|
42
|
+
mapExists: boolean;
|
|
43
|
+
name: string;
|
|
44
|
+
redirectTo: null;
|
|
45
|
+
spawnPosition: {
|
|
46
|
+
radius: number;
|
|
47
|
+
y: number;
|
|
48
|
+
x: number;
|
|
49
|
+
};
|
|
50
|
+
tileBackgroundEverywhere: null;
|
|
51
|
+
useTopiaPassword: boolean;
|
|
52
|
+
urlSlug: string;
|
|
53
|
+
width: number;
|
|
54
|
+
alt?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
alt: string;
|
|
57
|
+
description: string;
|
|
58
|
+
name: string;
|
|
59
|
+
heroImage: string;
|
|
60
|
+
urlSlug: string;
|
|
61
|
+
background?: undefined;
|
|
62
|
+
created?: undefined;
|
|
63
|
+
controls?: undefined;
|
|
64
|
+
enforceWhitelistOnLogin?: undefined;
|
|
65
|
+
forceAuthOnLogin?: undefined;
|
|
66
|
+
height?: undefined;
|
|
67
|
+
mapExists?: undefined;
|
|
68
|
+
redirectTo?: undefined;
|
|
69
|
+
spawnPosition?: undefined;
|
|
70
|
+
tileBackgroundEverywhere?: undefined;
|
|
71
|
+
useTopiaPassword?: undefined;
|
|
72
|
+
width?: undefined;
|
|
73
|
+
})[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SDKController } from "controllers/SDKController";
|
|
2
|
+
import { Topia } from "controllers/Topia";
|
|
3
|
+
import { AssetInterface, AssetOptionalInterface } from "interfaces";
|
|
4
|
+
import { ResponseType } from "types";
|
|
5
|
+
/**
|
|
6
|
+
* @summary
|
|
7
|
+
* Create an instance of Asset class with a given asset id and optional attributes and session credentials.
|
|
8
|
+
*
|
|
9
|
+
* @usage
|
|
10
|
+
* ```ts
|
|
11
|
+
* await new Asset(topia, "assetId", { attributes: { assetName: "My Asset", isPublic: false } });
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare class Asset extends SDKController implements AssetInterface {
|
|
15
|
+
readonly id?: string;
|
|
16
|
+
jwt?: string;
|
|
17
|
+
constructor(topia: Topia, id: string, options?: AssetOptionalInterface);
|
|
18
|
+
fetchPlatformAssets(): Promise<object | ResponseType>;
|
|
19
|
+
}
|
|
20
|
+
export default Asset;
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { AxiosResponse } from "axios";
|
|
2
|
+
import { Asset } from "controllers/Asset";
|
|
3
|
+
import { Topia } from "controllers/Topia";
|
|
4
|
+
import { DroppedAssetInterface, DroppedAssetOptionalInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface } from "interfaces";
|
|
5
|
+
import { ResponseType } from "types";
|
|
6
|
+
/**
|
|
7
|
+
* @summary
|
|
8
|
+
* Create an instance of Dropped Asset class with a given dropped asset id, url slug, and optional attributes and session credentials.
|
|
9
|
+
*
|
|
10
|
+
* @usage
|
|
11
|
+
* ```ts
|
|
12
|
+
* await new DroppedAsset(topia, "1giFZb0sQ3X27L7uGyQX", "example", { attributes: { text: "" }, credentials: { assetId: "1giFZb0sQ3X27L7uGyQX" } } });
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare class DroppedAsset extends Asset implements DroppedAssetInterface {
|
|
16
|
+
#private;
|
|
17
|
+
dataObject?: object | null;
|
|
18
|
+
readonly id?: string | undefined;
|
|
19
|
+
text?: string | null | undefined;
|
|
20
|
+
urlSlug: string;
|
|
21
|
+
isInteractive?: boolean | null;
|
|
22
|
+
interactivePublicKey?: string | null;
|
|
23
|
+
constructor(topia: Topia, id: string, urlSlug: string, options?: DroppedAssetOptionalInterface);
|
|
24
|
+
/**
|
|
25
|
+
* @summary
|
|
26
|
+
* Retrieves dropped asset details.
|
|
27
|
+
*
|
|
28
|
+
* @usage
|
|
29
|
+
* ```ts
|
|
30
|
+
* await droppedAsset.fetchDroppedAssetById();
|
|
31
|
+
* const { assetName } = droppedAsset;
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
fetchDroppedAssetById(): Promise<void | ResponseType>;
|
|
35
|
+
/**
|
|
36
|
+
* @summary
|
|
37
|
+
* Delete dropped asset.
|
|
38
|
+
*
|
|
39
|
+
* @usage
|
|
40
|
+
* ```ts
|
|
41
|
+
* await droppedAsset.deleteDroppedAsset();
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
deleteDroppedAsset(): Promise<void | ResponseType>;
|
|
45
|
+
/**
|
|
46
|
+
* @summary
|
|
47
|
+
* Retrieves the data object for a dropped asset.
|
|
48
|
+
*
|
|
49
|
+
* @usage
|
|
50
|
+
* ```ts
|
|
51
|
+
* await droppedAsset.fetchDroppedAssetDataObject();
|
|
52
|
+
* const { dataObject } = droppedAsset;
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
fetchDroppedAssetDataObject(): Promise<void | ResponseType>;
|
|
56
|
+
/**
|
|
57
|
+
* @summary
|
|
58
|
+
* Sets the data object for a dropped asset.
|
|
59
|
+
*
|
|
60
|
+
* Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
|
|
61
|
+
*
|
|
62
|
+
* @usage
|
|
63
|
+
* ```ts
|
|
64
|
+
* await droppedAsset.setDroppedAssetDataObject({
|
|
65
|
+
* "exampleKey": "exampleValue",
|
|
66
|
+
* });
|
|
67
|
+
* const { dataObject } = droppedAsset;
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
setDroppedAssetDataObject(dataObject: object, options?: {
|
|
71
|
+
lock?: {
|
|
72
|
+
lockId: string;
|
|
73
|
+
releaseLock?: boolean;
|
|
74
|
+
};
|
|
75
|
+
}): Promise<void | ResponseType>;
|
|
76
|
+
/**
|
|
77
|
+
* @summary
|
|
78
|
+
* Updates the data object for a dropped asset.
|
|
79
|
+
*
|
|
80
|
+
* Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
|
|
81
|
+
*
|
|
82
|
+
* @usage
|
|
83
|
+
* ```ts
|
|
84
|
+
* await droppedAsset.updateDroppedAssetDataObject({
|
|
85
|
+
* "exampleKey": "exampleValue",
|
|
86
|
+
* });
|
|
87
|
+
* const { dataObject } = droppedAsset;
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
updateDroppedAssetDataObject(dataObject: object, options?: {
|
|
91
|
+
lock?: {
|
|
92
|
+
lockId: string;
|
|
93
|
+
releaseLock?: boolean;
|
|
94
|
+
};
|
|
95
|
+
}): Promise<void | ResponseType>;
|
|
96
|
+
/**
|
|
97
|
+
* @summary
|
|
98
|
+
* Updates broadcast options for a dropped asset.
|
|
99
|
+
*
|
|
100
|
+
* @usage
|
|
101
|
+
* ```ts
|
|
102
|
+
* await droppedAsset.updateBroadcast({
|
|
103
|
+
* assetBroadcast: true,
|
|
104
|
+
* assetBroadcastAll: true,
|
|
105
|
+
* broadcasterEmail: "example@email.com"
|
|
106
|
+
* });
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
updateBroadcast({ assetBroadcast, assetBroadcastAll, broadcasterEmail, }: UpdateBroadcastInterface): Promise<void | ResponseType>;
|
|
110
|
+
/**
|
|
111
|
+
* @summary
|
|
112
|
+
* Updates click options for a dropped asset.
|
|
113
|
+
*
|
|
114
|
+
* @usage
|
|
115
|
+
* ```ts
|
|
116
|
+
* await droppedAsset.updateClickType({
|
|
117
|
+
* "clickType": "portal",
|
|
118
|
+
* "clickableLink": "https://topia.io",
|
|
119
|
+
* "clickableLinkTitle": "My awesome link!",
|
|
120
|
+
* "clickableDisplayTextDescription": "Description",
|
|
121
|
+
* "clickableDisplayTextHeadline": "Title",
|
|
122
|
+
* "position": {
|
|
123
|
+
* "x": 0,
|
|
124
|
+
* "y": 0
|
|
125
|
+
* },
|
|
126
|
+
* "portalName": "community"
|
|
127
|
+
* });
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, portalName, position, }: UpdateClickTypeInterface): Promise<void | ResponseType>;
|
|
131
|
+
/**
|
|
132
|
+
* @summary
|
|
133
|
+
* Updates text and style of a dropped asset.
|
|
134
|
+
*
|
|
135
|
+
* @usage
|
|
136
|
+
* ```ts
|
|
137
|
+
* const style = {
|
|
138
|
+
* "textColor": "#abc123",
|
|
139
|
+
* "textFontFamily": "Arial",
|
|
140
|
+
* "textSize": 40,
|
|
141
|
+
* "textWeight": "normal",
|
|
142
|
+
* "textWidth": 200
|
|
143
|
+
* };
|
|
144
|
+
* await droppedAsset.updateCustomTextAsset(style, "hello world");
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
updateCustomTextAsset(style: object, text: string | null | undefined): Promise<void | ResponseType>;
|
|
148
|
+
/**
|
|
149
|
+
* @summary
|
|
150
|
+
* Updates media options for a dropped asset.
|
|
151
|
+
*
|
|
152
|
+
* @usage
|
|
153
|
+
* ```ts
|
|
154
|
+
* await droppedAsset.updateMediaType({
|
|
155
|
+
* "mediaType": "link",
|
|
156
|
+
* "mediaLink": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
|
157
|
+
* "isVideo": true,
|
|
158
|
+
* "syncUserMedia": true,
|
|
159
|
+
* "audioSliderVolume: 30"
|
|
160
|
+
* "portalName": "community",
|
|
161
|
+
* "audioRadius": 0,
|
|
162
|
+
* "mediaName": "string"
|
|
163
|
+
* });
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
updateMediaType({ audioRadius, audioSliderVolume, isVideo, mediaLink, mediaName, mediaType, portalName, syncUserMedia, }: UpdateMediaTypeInterface): Promise<void | ResponseType>;
|
|
167
|
+
/**
|
|
168
|
+
* @summary
|
|
169
|
+
* Updates mute zone options for a dropped asset.
|
|
170
|
+
*
|
|
171
|
+
* @usage
|
|
172
|
+
* ```ts
|
|
173
|
+
* await droppedAsset.updateMuteZone(true);
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
updateMuteZone(isMutezone: boolean): Promise<void | ResponseType>;
|
|
177
|
+
/**
|
|
178
|
+
* @summary
|
|
179
|
+
* Updates webhook zone options for a dropped asset.
|
|
180
|
+
*
|
|
181
|
+
* @usage
|
|
182
|
+
* ```ts
|
|
183
|
+
* await droppedAsset.updateWebhookZone(true);
|
|
184
|
+
* ```
|
|
185
|
+
*/
|
|
186
|
+
updateWebhookZone(isWebhookZoneEnabled: boolean): Promise<void | ResponseType>;
|
|
187
|
+
/**
|
|
188
|
+
* @summary
|
|
189
|
+
* Moves a dropped asset to specified coordinates.
|
|
190
|
+
*
|
|
191
|
+
* @usage
|
|
192
|
+
* ```ts
|
|
193
|
+
* await droppedAsset.updatePosition(100,200);
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
updatePosition(x: number, y: number): Promise<void | ResponseType>;
|
|
197
|
+
/**
|
|
198
|
+
* @summary
|
|
199
|
+
* Updates private zone options for a dropped asset.
|
|
200
|
+
*
|
|
201
|
+
* @usage
|
|
202
|
+
* ```ts
|
|
203
|
+
* await droppedAsset.updatePrivateZone({
|
|
204
|
+
* "isPrivateZone": false,
|
|
205
|
+
* "isPrivateZoneChatDisabled": true,
|
|
206
|
+
* "privateZoneUserCap": 10
|
|
207
|
+
* });
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
updatePrivateZone({ isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap, }: UpdatePrivateZoneInterface): Promise<void | ResponseType>;
|
|
211
|
+
/**
|
|
212
|
+
* @summary
|
|
213
|
+
* Updates the size of a dropped asset.
|
|
214
|
+
*
|
|
215
|
+
* @usage
|
|
216
|
+
* ```ts
|
|
217
|
+
* await droppedAsset.assetScale(.5);
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
updateScale(assetScale: number): Promise<void | ResponseType>;
|
|
221
|
+
/**
|
|
222
|
+
* @summary
|
|
223
|
+
* Change or remove media embedded in a dropped asset.
|
|
224
|
+
*
|
|
225
|
+
* @usage
|
|
226
|
+
* ```ts
|
|
227
|
+
* await droppedAsset.updateUploadedMediaSelected("LVWyxwNxI96eLjnXWwYO");
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
updateUploadedMediaSelected(mediaId: string): Promise<void | ResponseType>;
|
|
231
|
+
/**
|
|
232
|
+
* @summary
|
|
233
|
+
* Change or remove top and bottom layers of a dropped asset.
|
|
234
|
+
*
|
|
235
|
+
* @usage
|
|
236
|
+
* ```ts
|
|
237
|
+
* await droppedAsset.updateWebImageLayers("","https://www.shutterstock.com/image-vector/colorful-illustration-test-word-260nw-1438324490.jpg");
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
240
|
+
updateWebImageLayers(bottom: string, top: string): Promise<void | ResponseType>;
|
|
241
|
+
/**
|
|
242
|
+
* @summary
|
|
243
|
+
* Add a webhook to a dropped asset
|
|
244
|
+
*
|
|
245
|
+
* @usage
|
|
246
|
+
* ```ts
|
|
247
|
+
* await droppedAsset.addWebhook({
|
|
248
|
+
* active: true,
|
|
249
|
+
* dataObject: {},
|
|
250
|
+
* description: "Webhook desc",
|
|
251
|
+
* enteredBy: "you",
|
|
252
|
+
* isUniqueOnly: false,
|
|
253
|
+
* title: "title",
|
|
254
|
+
* type: "type",
|
|
255
|
+
* url: "https://url.com",
|
|
256
|
+
* urlSlug: "world",
|
|
257
|
+
* });
|
|
258
|
+
* ```
|
|
259
|
+
*/
|
|
260
|
+
addWebhook({ dataObject, description, isUniqueOnly, title, type, url, }: {
|
|
261
|
+
dataObject: object;
|
|
262
|
+
description: string;
|
|
263
|
+
isUniqueOnly: boolean;
|
|
264
|
+
title: string;
|
|
265
|
+
type: string;
|
|
266
|
+
url: string;
|
|
267
|
+
}): Promise<void | AxiosResponse>;
|
|
268
|
+
/**
|
|
269
|
+
* @summary
|
|
270
|
+
* Set the interactive settings on a dropped asset
|
|
271
|
+
*
|
|
272
|
+
* @usage
|
|
273
|
+
* ```ts
|
|
274
|
+
* await droppedAsset.setInteractiveSettings({
|
|
275
|
+
* isInteractive: true,
|
|
276
|
+
* interactivePublicKey: "xyz"
|
|
277
|
+
* });
|
|
278
|
+
* ```
|
|
279
|
+
*/
|
|
280
|
+
setInteractiveSettings({ isInteractive, interactivePublicKey, }: {
|
|
281
|
+
isInteractive?: boolean;
|
|
282
|
+
interactivePublicKey: string;
|
|
283
|
+
}): Promise<void | ResponseType>;
|
|
284
|
+
}
|
|
285
|
+
export default DroppedAsset;
|