-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypedef.d.ts
89 lines (80 loc) · 2.51 KB
/
typedef.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
type HandleType = 'world' | 'worldList' | 'session' | 'sessionList'
type RecordApiSearchSortField = 'CreationDate' | 'LastUpdateDate' | 'FirstPublishTime'
type RecordApiSearchSortDirection = 'Ascending' | 'Descending'
type RecordApiSearchParameters = {
recordType: string
count: number
offset: number
private: boolean
requiredTags: string[]
optionalTags: string[]
excludedTags: string[]
sortBy: RecordApiSearchSortField
sortDirection: RecordApiSearchSortDirection
}
type WorldSearchRequestParameters = import('express-serve-static-core').ParamsDictionary | {
term?: string
pageIndex: number
}
type WorldSearchResult = {
hasMoreResults: boolean
records: WorldInfo[]
}
/**
* A data model that contains information of the Resonite user.
*/
type User = {
/**The username of the user. */
username: string
}
/**
* Common data properties found in a world or session returned by the Resonite API.
*/
type BaseWorldSessionInfo = {
/** The plain text name of the world or session */
title: string
/** The rich text name of the world or session. */
name: string
/** The description of the world or session. */
description: string
}
/**
* The world information returned by the Resonite API.
*/
type WorldInfo = BaseWorldSessionInfo | {
/** id The record id of the world. */
id: string
/** The name of the owner who owns the world. */
ownerName: string
/** The id of the owner who owns the world. */
ownerId: string
/** The thumbnail image of the world as a URL. */
thumbnailUri: string
/** Additional tags that help define the world. */
tags: string[]
/** The date and time the world was first created on. */
creationTime: string | Date
/** The url of the world for go.resonite.com. */
goUri: string
/** The date and time the world was first published on. */
firstPublishTime: string | Date
/** The date and tiem the world was last modified on. */
lastModificationTime: string | Date
}
/**
* The session information returned by the Resonite API.
*/
type SessionInfo = BaseWorldSessionInfo | {
/** The username of the host that is hosting the session. */
hostUsername: string
/** The number of users that are present in the session. */
totalJoinedUsers: number
/** The max number of users that can be in the session. */
maxUsers: number
/** The current FrooxEngine version that this session is running on. */
appVersion: string
/** The users in the current session. */
sessionUsers: User[]
/** The thumbnail image of the session as a URL. */
thumbnailUrl: string
}